]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoMFV: r362286
Jung-uk Kim [Thu, 18 Jun 2020 18:09:16 +0000 (18:09 +0000)]
MFV: r362286

Merge flex 2.6.4.

3 years agoWhitespace changes, not functional change intended.
Michael Tuexen [Thu, 18 Jun 2020 16:22:09 +0000 (16:22 +0000)]
Whitespace changes, not functional change intended.

MFC after: 1 week

3 years agoMake audit tests depend on /dev/auditpipe. This should fix
Edward Tomasz Napierala [Thu, 18 Jun 2020 15:41:16 +0000 (15:41 +0000)]
Make audit tests depend on /dev/auditpipe. This should fix
some 416 failing tests on armv7:

https://ci.freebsd.org/job/FreeBSD-head-armv7-test/lastCompletedBuild/testReport/

Reviewed by: asomers
MFC after: 2 weeks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25144

3 years agosplit(1): Add EXAMPLES section
Fernando Apesteguía [Thu, 18 Jun 2020 15:14:10 +0000 (15:14 +0000)]
split(1): Add EXAMPLES section

Add EXAMPLES covering -d, -n and -p
Include small explanation about the size of the chunks for the -n option

Approved by: 0mp
Differential Revision: https://reviews.freebsd.org/D25198

3 years agoAdd HISTORY sections to banner(6), basename(1), limits(1) and vmstat(8)
Gordon Bergling [Thu, 18 Jun 2020 13:19:56 +0000 (13:19 +0000)]
Add HISTORY sections to banner(6), basename(1), limits(1) and vmstat(8)

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D25019

3 years agofgetln(3): Add a Caveats Section
Gordon Bergling [Thu, 18 Jun 2020 13:13:04 +0000 (13:13 +0000)]
fgetln(3): Add a Caveats Section

Reviewed by: yuripv, bcr (mentor)
Approved by: bcr (mentror)
Obtained from: OpenBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24916

3 years agoFix the --guid flag description
Mateusz Piotrowski [Thu, 18 Jun 2020 12:29:24 +0000 (12:29 +0000)]
Fix the --guid flag description

MFC after: 2 weeks

3 years agoClean up and improve manual page for fuser(1)
Mateusz Piotrowski [Thu, 18 Jun 2020 11:18:26 +0000 (11:18 +0000)]
Clean up and improve manual page for fuser(1)

- Mention option's arguments in the list of options (so that now we mention
  "-N system" instead of just "-N").
- Stylize signals and other constants like O_APPEND with Dv.
- Sort options.
- Change indentation width for readability.
- Fix a couple of typos.
- Sort symbols list.
- Use Sy instead of Cm for symbols. They are not command modifiers.
- Use Ex -std in the EXIT STATUS section for consistency with other manual
  pages.
- Use Ql instead of Dq Li for inline code examples as Li has recently been
  deprecated by mdoc.

Reviewed by: bcr
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25332

3 years agoImprove periodic(8) manual page presentation
Mateusz Piotrowski [Thu, 18 Jun 2020 10:52:51 +0000 (10:52 +0000)]
Improve periodic(8) manual page presentation

- Update synopsis to present all available arguments.
- Consistently call the argument specifying an arbitrary directory a
  "directory".
- Do not put macros into -width argument to Bl. They do not expand there.
- Stylize command modifiers like "daily" with Cm instead of Pa. While
  technically periodic(8) operates on directories with such names, it is
  confusing from the perspective of the manual page reader as Pa and Ar are
  stylized the same way. Also, I cannot recall a single manual page where
  Pa would be used to describe the syntax of command-line arguments.

MFC after: 2 weeks

3 years agotee(1): Add EXAMPLES section
Fernando Apesteguía [Thu, 18 Jun 2020 10:48:37 +0000 (10:48 +0000)]
tee(1): Add EXAMPLES section

Probably the simplest one ever.

Approved by: gbe@, 0mp@
Differential Revision: https://reviews.freebsd.org/D25206

3 years agolockf(1): Add EXAMPLES section
Fernando Apesteguía [Thu, 18 Jun 2020 08:31:04 +0000 (08:31 +0000)]
lockf(1): Add EXAMPLES section

 * Add pretty small EXAMPLES section
 * While here, fix a warning in line 98 (new sentence in new line)

Approved by: bcr@
Differential Revision: https://reviews.freebsd.org/D25205

3 years agonl(1): Add EXAMPLES section
Fernando Apesteguía [Thu, 18 Jun 2020 08:26:26 +0000 (08:26 +0000)]
nl(1): Add EXAMPLES section

Add EXAMPLES section covering flags -b[ap] -n -i -s -v

Approved by: bcr@
Differential Revision: Add EXAMPLES section covering flags -b[ap] -n -i -s -v

3 years agoStop assuming we can print rman_res_t with %lx
Andrew Turner [Thu, 18 Jun 2020 06:21:00 +0000 (06:21 +0000)]
Stop assuming we can print rman_res_t with %lx

This is not the case on armv6 and armv7, where we also build this driver.
Fix by casting through uintmax_t and using %jx.

Sponsored by: Innovate UK

3 years agohdac_intr_handler: keep working until global interrupt status clears
Andriy Gapon [Thu, 18 Jun 2020 06:12:06 +0000 (06:12 +0000)]
hdac_intr_handler: keep working until global interrupt status clears

It is plausible that the hardware interrupts a host only when GIS goes
from zero to one.  GIS is formed by OR-ing multiple hardware statuses,
so it's possible that a previously cleared status gets set again while
another status has not been cleared yet.  Thus, there will be no new
interrupt as GIS always stayed set.  If we don't re-examine GIS then we
can leave it set and never get another interrupt again.

Without this change I frequently saw a problem where snd_hda would stop
working.  Setting dev.hdac.1.polling=1 would bring it back to life and
afterwards I could set polling back to zero.  Sometimes the problem
started right after a boot, sometimes it happened after resuming from
S3, frequently it would occur when sound output and input are active
concurrently (such as during conferencing).  I looked at HDAC_INTSTS
while the sound was not working and I saw that both HDAC_INTSTS_GIS and
HDAC_INTSTS_CIS were set, but there were no interrupts.

I have collected some statistics over a period of several days about how
many loops (calls to hdac_one_intr) the new code did for a single
interrupt:
+--------+--------------+
|Loops   |Times Happened|
+--------+--------------+
|0       |301           |
|1       |12857746      |
|2       |280           |
|3       |2             |
|4+      |0             |
+--------+--------------+
I believe that previously the sound would get stuck each time we had to loop
more than once.

The tested hardware is:
hdac1: <AMD (0x15e3) HDA Controller> mem 0xfe680000-0xfe687fff at device 0.6 on pci4
hdacc1: <Realtek ALC269 HDA CODEC> at cad 0 on hdac1

No objections: mav
MFC after: 5 weeks
Differential Revision: https://reviews.freebsd.org/D25128

3 years agoMove all of the functions in ffs_subr.c that are only used by the ufs kernel
Chuck Silvers [Wed, 17 Jun 2020 23:39:52 +0000 (23:39 +0000)]
Move all of the functions in ffs_subr.c that are only used by the ufs kernel
module from that file into ffs_vfsops.c.  This fixes the build for kernel
configs that don't include FFS.

PR: 247256
Submitted by: glebius
Reviewed by: mckusick (earlier version)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D25285

3 years agoClean up fstat.1
Mateusz Piotrowski [Wed, 17 Jun 2020 21:21:57 +0000 (21:21 +0000)]
Clean up fstat.1

- Sort options in the list & indent for readability.
- Pet linters
  - Use "\(em" instead of "--"
  - Remove Tn macros
- Use Ql instead of Dq Li
- Add arguments to the -M, -N, -p, and -u options in their descriptions.
- Use Sy instead of Li for field names. Li is deprecated, and Ql makes no
  sense here.
- Replace a literal block with a list for the table of special names
  related to FD.
- Use Ql instead of ``X''.
- Add a dot after etc.
- Reference fuser(1).

MFC after: 1 week

3 years agoWhen converting the static arrays to mallocarray() in r356621 I missed
Bjoern A. Zeeb [Wed, 17 Jun 2020 21:04:38 +0000 (21:04 +0000)]
When converting the static arrays to mallocarray() in r356621 I missed
one place where we now need to multiply the size of the struct with the
number of entries.  This lead to problems when restarting user space
daemons, as the cleanup was never properly done, resulting in MRT_ADD_VIF
EADDRINUSE.
Properly zero all array elements to avoid this problem.

PR: 246629, 206583
Reported by: (many)
MFC after: 4 days
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")

3 years agoThe call into ifa_ifwithaddr() needs to be epoch protected; ortherwise
Bjoern A. Zeeb [Wed, 17 Jun 2020 20:58:37 +0000 (20:58 +0000)]
The call into ifa_ifwithaddr() needs to be epoch protected; ortherwise
we'll panic on an assertion.
While here, leave a comment that the ifp was never protected and stable
(as glebius pointed out) and this needs to be fixed properly.

Discovered while working on: PR 246629
Reviewed by: glebius
MFC after: 4 days
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")

3 years agoImport flex 2.6.4.
Jung-uk Kim [Wed, 17 Jun 2020 19:57:19 +0000 (19:57 +0000)]
Import flex 2.6.4.

3 years agoClean up the pci host generic driver
Andrew Turner [Wed, 17 Jun 2020 19:56:17 +0000 (19:56 +0000)]
Clean up the pci host generic driver

 - Support Prefetchable Memory.
 - Use the correct rman when allocating memory and ioports.
 - Translate PCI addresses in bus_alloc_resource to allow physical
   addresses that are different than pci addresses.

Reviewed by: Robert Crowston <crowston_protonmail.com>
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D25121

3 years agoSupport pmap_extract_and_hold on arm64 stage 2 mappings
Andrew Turner [Wed, 17 Jun 2020 19:45:05 +0000 (19:45 +0000)]
Support pmap_extract_and_hold on arm64 stage 2 mappings

Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D24469

3 years agoFix admin qpair leak if detached during initial reset.
Alexander Motin [Wed, 17 Jun 2020 17:51:40 +0000 (17:51 +0000)]
Fix admin qpair leak if detached during initial reset.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

3 years agoRemove vfs_statfs and vnode_mount macros from NFS
Alan Somers [Wed, 17 Jun 2020 16:20:19 +0000 (16:20 +0000)]
Remove vfs_statfs and vnode_mount macros from NFS

These macro definitions are no longer needed as the NFS OSX port is long
dead.  The vfs_statfs macro conflicts with the vfsops field of the same
name.

Submitted by: shivank@
Reviewed by: rmacklem
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2020)
Differential Revision: https://reviews.freebsd.org/D25263

3 years agoFix installation of magic file.
Xin LI [Wed, 17 Jun 2020 15:57:59 +0000 (15:57 +0000)]
Fix installation of magic file.

Reported by: lwhsu
MFC after: 2 weeks
X-MFC-with: r362258

3 years agoComplete the ACPI support for ARM Coresight:
Ruslan Bukin [Wed, 17 Jun 2020 15:54:51 +0000 (15:54 +0000)]
Complete the ACPI support for ARM Coresight:
o Parse the ACPI DSD (Device Specific Data) graph property and record
  device connections.
o Split-out FDT support to a separate file.
o Get the corresponding (FDT/ACPI) Coresight platform data in
  the device drivers.

Sponsored by: DARPA, AFRL

3 years agoAllow the self reference to be NULL in case the timer was stopped.
Michael Tuexen [Wed, 17 Jun 2020 15:27:45 +0000 (15:27 +0000)]
Allow the self reference to be NULL in case the timer was stopped.

Submitted by: Timo Voelker
MFC after: 1 week

3 years agoAdd header definition for RFC4340, Datagram Congestion Control Protocol
Tom Jones [Wed, 17 Jun 2020 13:27:13 +0000 (13:27 +0000)]
Add header definition for RFC4340, Datagram Congestion Control Protocol

Add a header definition for DCCP as defined in RFC4340. This header definition
is required to perform validation when receiving and forwarding DCCP packets.
We do not currently support DCCP.

Reviewed by: gallatin, bz
Approved by: bz (co-mentor)
MFC after: 1 week
MFC with: 350749
Differential Revision: https://reviews.freebsd.org/D21179

3 years agoctime(3): Bump .Dd after r362165
Gordon Bergling [Wed, 17 Jun 2020 11:57:48 +0000 (11:57 +0000)]
ctime(3): Bump .Dd after r362165

Reported by: bcr (mentor)
Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
X-MFC-With: r362165

3 years agoAdd all the TCR_EL1 fields
Andrew Turner [Wed, 17 Jun 2020 11:56:10 +0000 (11:56 +0000)]
Add all the TCR_EL1 fields

These will be used when adding support for new Armv8 extensions.

Sponsored by: Innovate UK

3 years agoFix HW TLS offload regression issue after r359919, in mlx5en(4).
Hans Petter Selasky [Wed, 17 Jun 2020 11:14:54 +0000 (11:14 +0000)]
Fix HW TLS offload regression issue after r359919, in mlx5en(4).

Changes in the mbuf layout regarding HW TLS, resulted in wrong detection
of starting mbuf. Use a boolean variable to handle this and pass m_adj()
the top mbuf, so that the packet header is adjusted correctly.

MFC after: 1 week
Sponsored by: Mellanox Technologies

3 years agoAllow multicast packets to be received in promiscious mode, in mlx4en(4).
Hans Petter Selasky [Wed, 17 Jun 2020 11:12:10 +0000 (11:12 +0000)]
Allow multicast packets to be received in promiscious mode, in mlx4en(4).

Make sure we disable the multicast filter in promiscious mode aswell as when
the all multicast flag is set.

MFC after: 1 week
Found by: Tycho Nightingale <tychon@freebsd.org>
Sponsored by: Mellanox Technologies

3 years agoloader: r362262 did miss the pathlen check
Toomas Soome [Wed, 17 Jun 2020 10:56:58 +0000 (10:56 +0000)]
loader: r362262 did miss the pathlen check

While we are checking the "/dev/" prefix, we can skip the paths shorter than
this prefix.

Sponsored by: Netflix, Klara Inc.

3 years agoUpdate opencsd to 0.14.2
Andrew Turner [Wed, 17 Jun 2020 10:42:20 +0000 (10:42 +0000)]
Update opencsd to 0.14.2

Sponsored by: Innovate UK

3 years agoloader: strings in nvlist are counted strings, not c-strings
Toomas Soome [Wed, 17 Jun 2020 10:41:01 +0000 (10:41 +0000)]
loader: strings in nvlist are counted strings, not c-strings

We need to fetch both string size and data, then handle the data.

Reviewed by: allanjude
Sponsored by: Netflix, Klara Inc.

3 years agoRe-apply r333944 to unbreak ports
Antoine Brodin [Wed, 17 Jun 2020 10:11:54 +0000 (10:11 +0000)]
Re-apply r333944 to unbreak ports

3 years agoevdev: Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys.
Vladimir Kondratyev [Wed, 17 Jun 2020 08:35:35 +0000 (08:35 +0000)]
evdev: Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys.

PR: 247292
Submitted by: Yuichiro NAITO <naito.yuichiro@gmail.com>
MFC after: 1 week

3 years agoloader: vidc_init should also erase the screen
Toomas Soome [Wed, 17 Jun 2020 08:08:57 +0000 (08:08 +0000)]
loader: vidc_init should also erase the screen

Inject \e[J to erase the initial loader screen. We have two options,
find where out cursor is and use BIOS scroll for data from boot2 or erase the
display and start from origin. Erasing the screen is easier and we also
get the screen buffer initialized.

Sponsored by: Netflix, Klara Inc.

3 years agoMFV r362254: file 5.39.
Xin LI [Wed, 17 Jun 2020 07:41:28 +0000 (07:41 +0000)]
MFV r362254: file 5.39.

MFC after: 2 weeks

3 years ago[ath] Mention DWDS, expresscard and minipcie.
Adrian Chadd [Wed, 17 Jun 2020 03:16:20 +0000 (03:16 +0000)]
[ath] Mention DWDS, expresscard and minipcie.

I use all of these..

3 years ago[run] mention that some 11n functionality is now available.
Adrian Chadd [Wed, 17 Jun 2020 03:12:43 +0000 (03:12 +0000)]
[run] mention that some 11n functionality is now available.

A-MPDU, short-gi and 40MHz mode is currently not supported, but hey,
it supports enough 11n to be useful.

3 years agoVendor import of file 5.39.
Xin LI [Wed, 17 Jun 2020 01:11:26 +0000 (01:11 +0000)]
Vendor import of file 5.39.

3 years agovm: Drop vm_map_clip_{start,end} macro wrappers
Conrad Meyer [Tue, 16 Jun 2020 22:53:56 +0000 (22:53 +0000)]
vm: Drop vm_map_clip_{start,end} macro wrappers

No functional change.

Reviewed by: dougm, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D25282

3 years agoApply default security flavor in vfs_export
Ryan Moeller [Tue, 16 Jun 2020 21:30:30 +0000 (21:30 +0000)]
Apply default security flavor in vfs_export

There may be some version of mountd out there that does not supply a default
security flavor when none is given for an export.

Set the default security flavor in vfs_export if none is given, and remove the
workaround for oexport compat.

Reported by: npn
Reviewed by: rmacklem
Approved by: mav (mentor)
MFC after: 3 days
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D25300

3 years agortld: Allow to load ET_DYN && DF_1_PIE when tracing.
Konstantin Belousov [Tue, 16 Jun 2020 21:29:02 +0000 (21:29 +0000)]
rtld: Allow to load ET_DYN && DF_1_PIE when tracing.

This makes old ldd to still work on newer tagged PIE binaries.

Also move debug line for hashes before both decisions to not load are
done, so that the end of digest_dynamic() processing and reason to not
load or load is seen in debug trace.

Noted by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agortld: Add debug line for dlopen_object().
Konstantin Belousov [Tue, 16 Jun 2020 21:25:58 +0000 (21:25 +0000)]
rtld: Add debug line for dlopen_object().

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agoSystematically pass RTLD_LO_TRACE to load_needed_objects().
Konstantin Belousov [Tue, 16 Jun 2020 21:23:39 +0000 (21:23 +0000)]
Systematically pass RTLD_LO_TRACE to load_needed_objects().

Which makes all calls to load_object() to observe the flag, except the
calls for preloaded DSOs.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agoComplete a function block with Fc, no content change.
Sergey Kandaurov [Tue, 16 Jun 2020 21:07:51 +0000 (21:07 +0000)]
Complete a function block with Fc, no content change.

Notably, unbreaks rendering with groff.

3 years agoAdd an entry for r362158, r362163, which changes struct export_args.
Rick Macklem [Tue, 16 Jun 2020 20:55:22 +0000 (20:55 +0000)]
Add an entry for r362158, r362163, which changes struct export_args.

3 years agoUpdate VFS_CHECKEXP.9 for the argument changes done by r362158.
Rick Macklem [Tue, 16 Jun 2020 20:51:28 +0000 (20:51 +0000)]
Update VFS_CHECKEXP.9 for the argument changes done by r362158.

The arguments for VFS_CHECKEXP() were changed by r362158.
Also, the numsecflavors and secflavors arguments were not documented,
so add these as well.

This is a content change.

3 years agoboot2: need to expand tab output and mask getchar
Toomas Soome [Tue, 16 Jun 2020 20:35:00 +0000 (20:35 +0000)]
boot2: need to expand tab output and mask getchar

The BIOS ouput char function does not expand tab.
Mask getchar with 0xFF.

Sponsored by: Netflix, Klara Inc.

3 years agoImprove unit parsing of mpsutil.
Juli Mallett [Tue, 16 Jun 2020 19:21:28 +0000 (19:21 +0000)]
Improve unit parsing of mpsutil.

Previously, it used atoi(3) to parse the unit parameter, which would silently
yield a unit of 0 in the presence of an invalid unit number.  As most users of
mpsutil(8) are likely to have at least a unit 0, this is could have confusing
results.

This behaviour was particularly unintuitive if one incorrectly passed an
adapter device name, or a device path, instead of a unit number.  In addition
to using strtoumax(3) instead of atoi(3) to parse unit numbers, support
stripping a device name (e.g. mps1) or path (e.g. /dev/mps2) to just its unit
number.

Reviewed by: scottl (earlier version)

3 years agollvm: Default to -mno-relax on RISC-V
Kristof Provost [Tue, 16 Jun 2020 18:39:56 +0000 (18:39 +0000)]
llvm: Default to -mno-relax on RISC-V

Compiling on a RISC-V system fails with 'relocation R_RISCV_ALIGN
requires unimplemented linker relaxation; recompile with -mno-relax'.

Our default linker (ld.lld) doesn't support relaxation, so default to
no-relax so we don't generate object files the linker can't handle.

Reviewed by: mhorne
Sponsored by: Axiado
Differential Revision: https://reviews.freebsd.org/D25210

3 years agoiSo in doing final checks on OCA firmware with all the latest tweaks the dup-ack...
Randall Stewart [Tue, 16 Jun 2020 18:16:45 +0000 (18:16 +0000)]
iSo in doing final checks on OCA firmware with all the latest tweaks the dup-ack checking
packet drill script was failing with a number of unexpected acks. So it turns
out if you have the default recvwin set up to 1Meg (like OCA's do) and you
have no window scaling (like the dupack checking code) then we have another
case where we are always trying to update the rwnd and sending an
ack when we should not.

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D25298

3 years agonewsyslog(8): make configuration parser more robust.
Eugene Grosbein [Tue, 16 Jun 2020 17:45:23 +0000 (17:45 +0000)]
newsyslog(8): make configuration parser more robust.

Currently newsyslog supports <include> directive that is used
in our default /etc/newsyslog.conf in the following form:

<include> /usr/local/etc/newsyslog.conf.d/*

While this is suitable for ports installing their own rules
for logs rotation, this also makes newsyslog break entire
processing of all files if it encounters single line it cannot parse.
This includes lines referring to nonexistent username/group for log
ownership, so newsyslog stops calling errx() function in the parser.

With this fix, newsyslog uses warnx() instead of errx() in such cases
to print a warning, recover gracefully and continue with execution.

Among other cases, this unbreaks initial creation of log files
having flag "C" at boot time (newsyslog -CN). This is most important
for systems having RAM-based /var file system like nanobsd(8)-based
that rely on newsyslog to bring system log files into existence.

MFC after: 1 month

3 years agoFix pointer name to match the name used in the function prototype
Marc Fonvieille [Tue, 16 Jun 2020 17:05:38 +0000 (17:05 +0000)]
Fix pointer name to match the name used in the function prototype
above (and in termios.c).

Discussed with: Rodney W. Grimes <rgrimes@FreeBSD.org>

3 years agoMake KENV_MVALLEN tunable
Simon J. Gerraty [Tue, 16 Jun 2020 17:02:56 +0000 (17:02 +0000)]
Make KENV_MVALLEN tunable

When doing secure boot, loader wants to export loader.ve.hashed
the value of which typically exceeds KENV_MVALLEN.

Replace use of KENV_MVALLEN with tunable kenv_mvallen.

Add getenv_string_buffer() for the case where a stack buffer cannot be
created and use uma_zone_t kenv_zone for suitably sized buffers.

Reviewed by: stevek, kevans
Obtained from: Abhishek Kulkarni <abkulkarni@juniper.net>
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org//D25259

3 years agolibcasper(3): Document HISTORY within the manpages
Gordon Bergling [Tue, 16 Jun 2020 16:48:52 +0000 (16:48 +0000)]
libcasper(3): Document HISTORY within the manpages

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24695

3 years agocmp(1): Add EXAMPLES section
Fernando Apesteguía [Tue, 16 Jun 2020 15:54:59 +0000 (15:54 +0000)]
cmp(1): Add EXAMPLES section

Add simple examples showing the use of -l, -z, stdin and offsets

Approved by: bcr@
Differential Revision: https://reviews.freebsd.org/D25280

3 years agoFix typo in the documentation about the daily ntpd status
Baptiste Daroussin [Tue, 16 Jun 2020 12:40:19 +0000 (12:40 +0000)]
Fix typo in the documentation about the daily ntpd status

PR: 245679
Submitted by: Taylor Stearns <t@tstearns.com>
MFC after: 3 days

3 years agoSo it turns out rack has a shortcoming in dup-ack counting. It counts the dupacks but
Randall Stewart [Tue, 16 Jun 2020 12:26:23 +0000 (12:26 +0000)]
So it turns out rack has a shortcoming in dup-ack counting. It counts the dupacks but
then does not properly respond to them. This is because a few missing bits are not present.
BBR actually does properly respond (though it also sends a TLP which is interesting and
maybe something to fix)..

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D25294

3 years agoRe-add opencsd as a vendor import from the dist directory
Andrew Turner [Tue, 16 Jun 2020 08:59:44 +0000 (08:59 +0000)]
Re-add opencsd as a vendor import from the dist directory

Sponsored by: Innovate UK

3 years agoRemove opencsd so I can re-import it with the correct ancestry
Andrew Turner [Tue, 16 Jun 2020 08:57:13 +0000 (08:57 +0000)]
Remove opencsd so I can re-import it with the correct ancestry

Sponsored by: Innovate UK

3 years agoloader: zfs_cmd.c does not really compile without libzfs.h
Toomas Soome [Tue, 16 Jun 2020 07:30:34 +0000 (07:30 +0000)]
loader: zfs_cmd.c does not really compile without libzfs.h

Having libzfs.h wrapped in LOADER_ZFS_SUPPORT check does not really make sense,
because we do need function declarations with C99.

Sponsored by: Netflix, Klara Inc.

3 years agoloader: variable i is unused without MBR/GPT support built in
Toomas Soome [Tue, 16 Jun 2020 07:05:03 +0000 (07:05 +0000)]
loader: variable i is unused without MBR/GPT support built in

Because i is only used as index in for loop, declare it in for statement.

Sponsored by: Netflix, Klara Inc.

3 years ago[ifconfig] add UAPSD and LPDC flags
Adrian Chadd [Tue, 16 Jun 2020 04:17:08 +0000 (04:17 +0000)]
[ifconfig] add UAPSD and LPDC flags

* Add UAPSD and LDPC flags
* expand the FLAGS section; it's kinda grown since I started hacking
  on net80211..

3 years agoMake use of the UID_NOBODY and GID_NOGROUP definitions in sys/conf.h.
Rick Macklem [Tue, 16 Jun 2020 02:35:30 +0000 (02:35 +0000)]
Make use of the UID_NOBODY and GID_NOGROUP definitions in sys/conf.h.

r362214 exposed UID_NOBODY and GID_NOGROUP to userspace, so use them
instead of the numbers.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D25281

3 years agoExpose UID_xxx and GID_xxx definitions to userspace.
Rick Macklem [Tue, 16 Jun 2020 02:31:22 +0000 (02:31 +0000)]
Expose UID_xxx and GID_xxx definitions to userspace.

This patch moves the UID_xxx and GID_xxx definitions out of the
#ifdef _KERNEL section, so that userspace programs like mountd
can use them.
There are a couple of userspace programs that do define UID_ROOT,
but they do not include sys/conf.h.  Since they are defined as
the same value, maybe they should be changed to include sys/conf.h.

Reviewed by: kib
Differential Revision: https:/reviews.freebsd.org/D25281

3 years ago[rsu] Update wme ie API use.
Adrian Chadd [Tue, 16 Jun 2020 01:11:40 +0000 (01:11 +0000)]
[rsu] Update wme ie API use.

Whoops, forgot to land this one too!

3 years ago[net80211] Add missing commit to previous-1 uapsd commit.
Adrian Chadd [Tue, 16 Jun 2020 00:28:45 +0000 (00:28 +0000)]
[net80211] Add missing commit to previous-1 uapsd commit.

Whoops; somehow my big commit line didn't include this..  cue the tree breakage emails.

3 years ago[net80211] Add uapsd option to ifconfig
Adrian Chadd [Tue, 16 Jun 2020 00:28:08 +0000 (00:28 +0000)]
[net80211] Add uapsd option to ifconfig

Add an enable/disable option for controlling uapsd.  I'm not yet controlling
the individual AC configs or the service period.

3 years ago[net80211] Add initial U-APSD negotiation support.
Adrian Chadd [Tue, 16 Jun 2020 00:27:32 +0000 (00:27 +0000)]
[net80211] Add initial U-APSD negotiation support.

U-APSD (unscheduled automatic power save delivery) is a power save method
that's a bit better than legacy PS-POLL - stations can mark frames with
an extra flag that tells the AP to leak out more frames after it sends
its own frames rather than needing to send a PS-POLL to get another frame
from the AP.

Now, this code just handles the negotiation bits; it doesn't actually
implement U-APSD.  That's up to drivers, and nothing in the tree yet
implements this.  I /may/ implement this for ath(4) if I eventually care
enough but right now I plan on just implementing it for firmware offload
based NICs that handle this in the NIC.

I'll commit the ifconfig bit after this and I may have some follow-up
commits as this gets used more by me in local testing.

This should be a glorious no-op for everyone else.  If things change
for anyone that isn't fixed by a complete recompile then please reach out
to me.

3 years agoMake Linux uname(2) return x86_64 to 32-bit apps. This helps Steam.
Edward Tomasz Napierala [Mon, 15 Jun 2020 20:12:10 +0000 (20:12 +0000)]
Make Linux uname(2) return x86_64 to 32-bit apps.  This helps Steam.

PR: kern/240432
Analyzed by by: Alex S <iwtcex@gmail.com>
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25248

3 years agoif_vtnet: let vtnet_rx_vq_intr() and vtnet_rxq_tq_intr() share code
Vincenzo Maffione [Mon, 15 Jun 2020 19:46:34 +0000 (19:46 +0000)]
if_vtnet: let vtnet_rx_vq_intr() and vtnet_rxq_tq_intr() share code

Since the two functions are similar, introduce a common function
(vtnet_rx_vq_process()) to share common code.
This also improves locking, by ensuring vrxs_rescheduled is accessed
under the RXQ lock, and taskqueue_enqueue() is not called under the
lock (therefore avoiding a spurious duplicate lock warning).

Reported by: jrtc27
MFC after: 2 weeks

3 years agoRemove the sed hack for ABI tag notes.
John Baldwin [Mon, 15 Jun 2020 19:38:48 +0000 (19:38 +0000)]
Remove the sed hack for ABI tag notes.

The ELF notes compiled in C were placed in a section with the wrong type
(SHT_PROGBITS instead of SHT_NOTE).  Previously, sed was used on the
generated assembly to rewrite the section type.  Instead, write the notes
in assembly which permits setting the correct section type directly.

While here, move inline assembly entry points out of C and into assembly
for aarch64, arm, and riscv.

Reviewed by: kib
Tested on: amd64 (cirrus-ci), riscv64
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25211

3 years agoSimplify MACHINE_ARCH to be a single string.
John Baldwin [Mon, 15 Jun 2020 18:57:43 +0000 (18:57 +0000)]
Simplify MACHINE_ARCH to be a single string.

Big endian and armv4 mean that we are now down to only two supported
variants.  A future change will use MACHINE_ARCH in assembly which
does not support C-style string concatentation and thus needs
MACHINE_ARCH defined as a single string.

Reviewed by: imp
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25211

3 years agoAvoid trying to toggle TSO twice
Ryan Moeller [Mon, 15 Jun 2020 16:35:27 +0000 (16:35 +0000)]
Avoid trying to toggle TSO twice

Remove TSO from the toggle mask when automatically disabled by TXCKSUM* in
various NIC drivers.

Reviewed by: hselasky, np, gallatin, jpaetzel
Approved by: mav (mentor)
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D25120

3 years agoUpdate event masks constant to Bluetooth core spec V5.2
Takanori Watanabe [Mon, 15 Jun 2020 14:58:40 +0000 (14:58 +0000)]
Update event masks constant to Bluetooth core spec V5.2
and add LE Events.

PR: 247257
Submitted by: Marc Veldman

3 years agoImport OpenCSD v0.14.2
Andrew Turner [Mon, 15 Jun 2020 11:30:04 +0000 (11:30 +0000)]
Import OpenCSD v0.14.2

Sponsored by: Innovate UK

3 years agomd5(1): fix style in man page
Fernando Apesteguía [Mon, 15 Jun 2020 10:08:02 +0000 (10:08 +0000)]
md5(1): fix style in man page

Fix a bunch of style problems reported by mandoc(1) and igor:

mandoc: ./md5.1:19:71: STYLE: no blank before trailing delimiter: Nm ... rmd160,
mandoc: ./md5.1:20:23: STYLE: no blank before trailing delimiter: Nm ...  skein512,
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:35:2: STYLE: useless macro: Tn
mandoc: ./md5.1:42:2: STYLE: useless macro: Tn
mandoc: ./md5.1:45:2: STYLE: useless macro: Tn
mandoc: ./md5.1:47:2: STYLE: useless macro: Tn
mandoc: ./md5.1:56:2: STYLE: useless macro: Tn
mandoc: ./md5.1:58:2: STYLE: useless macro: Tn
mandoc: ./md5.1:61:2: STYLE: useless macro: Tn
mandoc: ./md5.1:66:2: STYLE: useless macro: Tn
mandoc: ./md5.1:68:2: STYLE: useless macro: Tn
mandoc: ./md5.1:104:24: STYLE: no blank before trailing delimiter: Nm skein512,
mandoc: ./md5.1:117:6: STYLE: referenced manual not found: Xr sha224 3

igor:
md5.1:46:no comma after "i.e.":either algorithm, [i.e.] to find an input that produces a specific

Approved by: bcr@
Differential Revision: https://reviews.freebsd.org/D25277

3 years agovtnet: Fix regression introduced in r361944
Jessica Clarke [Sun, 14 Jun 2020 22:39:34 +0000 (22:39 +0000)]
vtnet: Fix regression introduced in r361944

For legacy devices that don't support MrgRxBuf (such as bhyve pre-r358180),
r361944 failed to update the receive handler to account for the additional
padding introduced by the unused num_buffers field that is now always present
in struct vtnet_rx_header. Thus, calculate the padding dynamically based on
vtnet_hdr_size.

PR: 247242
Reported by: thj
Tested by: thj

3 years agoiflib: netmap: enter/exit netmap mode after device stops
Vincenzo Maffione [Sun, 14 Jun 2020 21:07:12 +0000 (21:07 +0000)]
iflib: netmap: enter/exit netmap mode after device stops

Avoid possible race conditions by calling nm_set_native_flags()
and nm_clear_native_flags() only after the device has been
stopped.

MFC after: 1 week

3 years agozfsboot: cstyle cleanup
Toomas Soome [Sun, 14 Jun 2020 20:57:24 +0000 (20:57 +0000)]
zfsboot: cstyle cleanup

No functional changes intended.

Sponsored by: Netflix, Klara Inc.

3 years agonetmap: vtnet: fix races in vtnet_netmap_reg()
Vincenzo Maffione [Sun, 14 Jun 2020 20:47:31 +0000 (20:47 +0000)]
netmap: vtnet: fix races in vtnet_netmap_reg()

The nm_register callback needs to call nm_set_native_flags()
or nm_clear_native_flags() once the device has been stopped.
However, in the current implementation this is not true,
as the device is stopped by vtnet_init_locked(). This causes
race conditions where the driver crashes as soon as it
dequeues netmap buffers assuming they are mbufs (or the other
way around).
To fix the issue, we extend vtnet_init_locked() with a second
argument that, if not zero, will set/clear the netmap flags.
This results in a huge simplification of the nm_register
callback itself.
Also, use netmap_reset() to check if a ring is going to be
re-initialized in netmap mode.

MFC after: 1 week

3 years agosh/tests: Add tests for SIGINT in non-jobc background commands
Jilles Tjoelker [Sun, 14 Jun 2020 19:41:24 +0000 (19:41 +0000)]
sh/tests: Add tests for SIGINT in non-jobc background commands

If job control is not enabled, background commands shall ignore SIGINT and
SIGQUIT, and it shall be possible to override that ignore in the same shell.

MFC after: 1 week

3 years ago[PowerPC] Fix scc z8530 driver
Brandon Bergren [Sun, 14 Jun 2020 16:47:16 +0000 (16:47 +0000)]
[PowerPC] Fix scc z8530 driver

Parts of the z8530 driver were still using the SUN channel spacing.

This was invalid on PowerMac and QEMU, where the attachment was to escc,
not escc-legacy. This means the driver has apparently NEVER worked properly
on Macintosh hardware.

Add documentation for the channel spacing details, and change to using
driver-specific initialization instead of hardcoded spacing so either
spacing can be used.

Fixes boot hang in QEMU when using the serial console, and fixes use on
Xserve serial (and presumably PowerMacs that have a Stealth Serial port
or similar)

Reviewed by: jhibbits
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D24661

3 years agoAllocate the mbuf for the signature in the COOKIE or the correct size.
Michael Tuexen [Sun, 14 Jun 2020 16:05:08 +0000 (16:05 +0000)]
Allocate the mbuf for the signature in the COOKIE or the correct size.
While there, do also do some cleanups.

MFC after: 1 week

3 years agoMake linux(4) warn about unsupported CMSG level/type.
Edward Tomasz Napierala [Sun, 14 Jun 2020 14:38:40 +0000 (14:38 +0000)]
Make linux(4) warn about unsupported CMSG level/type.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25255

3 years agoAdd support for the timecreate attribute
Doug Rabson [Sun, 14 Jun 2020 11:41:57 +0000 (11:41 +0000)]
Add support for the timecreate attribute

This maps to the va_birthtime VFS attribute.

3 years agoloader.efi: update console after gfx mode change
Toomas Soome [Sun, 14 Jun 2020 10:13:40 +0000 (10:13 +0000)]
loader.efi: update console after gfx mode change

The gfx mode change should be coordinated with console setup.

3 years agoCleanups, no functional change.
Michael Tuexen [Sun, 14 Jun 2020 09:50:00 +0000 (09:50 +0000)]
Cleanups, no functional change.

MFC after: 1 week

3 years agoMove font related data structured to sys/font.c and update vtfontcvt
Toomas Soome [Sun, 14 Jun 2020 06:58:58 +0000 (06:58 +0000)]
Move font related data structured to sys/font.c and update vtfontcvt

Prepare support to be able to handle font data in loader, consolidate
data structures to sys/font.h and update vtfontcvt.

vtfontcvt update is about to output set of glyphs in form of C source,
the implementation does allow to output compressed or uncompressed font
bitmaps.

Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D24189

3 years agolibc manpages: various improvements from NetBSD
Gordon Bergling [Sun, 14 Jun 2020 05:59:30 +0000 (05:59 +0000)]
libc manpages: various improvements from NetBSD

- Add STANDARDS and HISTORY sections within the appropriate manpages
- Mention two USENIX papers within kqueue(2) and strlcpy(3)

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
Obtained from: NetBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24650

3 years agoAdd HISTORY sections to ZFS and dtrace manpage
Gordon Bergling [Sun, 14 Jun 2020 05:50:28 +0000 (05:50 +0000)]
Add HISTORY sections to ZFS and dtrace manpage

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D23833

3 years agolibutil: Document function HISTORY within the manpages
Gordon Bergling [Sun, 14 Jun 2020 05:35:02 +0000 (05:35 +0000)]
libutil: Document function HISTORY within the manpages

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24795

3 years agoAdd a HISTORY section to ctime(3)
Gordon Bergling [Sun, 14 Jun 2020 05:08:15 +0000 (05:08 +0000)]
Add a HISTORY section to ctime(3)

Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
Obtained from: OpenBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24635

3 years agoOops, r362158 committed a duplicate definition of MAXSECFLAVORS.
Rick Macklem [Sun, 14 Jun 2020 01:22:19 +0000 (01:22 +0000)]
Oops, r362158 committed a duplicate definition of MAXSECFLAVORS.

This patch gets rid of the duplicate.

3 years agoModify mountd to use the new struct export_args committed by r362158.
Rick Macklem [Sun, 14 Jun 2020 00:40:00 +0000 (00:40 +0000)]
Modify mountd to use the new struct export_args committed by r362158.

r362158 modified struct export_args for make the ex_flags field 64bits
and also changed the anonymous credentials to allow more than 16 groups.
This patch fixes mountd.c to use the new structure.
It does allocate larger exportlist and grouplist structures now.
That will be fixed in a future commit.
The only visible change will be that the credentials provided for the
-maproot and -mapall exports options can now have more than 16 groups.

Reviewed by: kib, freqlabs
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D25088

3 years ago[net80211] Treat frames without an rx status as not a decap'ed A-MSDU.
Adrian Chadd [Sun, 14 Jun 2020 00:23:06 +0000 (00:23 +0000)]
[net80211] Treat frames without an rx status as not a decap'ed A-MSDU.

Drivers for NICs which do A-MSDU decap in hardware / driver will need to
set the rx status, so if it's missing then treat it as not a decap'ed
A-MSDU.

3 years ago[net80211] Also convert the ddb path
Adrian Chadd [Sun, 14 Jun 2020 00:21:48 +0000 (00:21 +0000)]
[net80211] Also convert the ddb path

Whoops - this belonged in my previous commit.

3 years agoAdd an entry to UPDATING for r362158.
Rick Macklem [Sun, 14 Jun 2020 00:15:44 +0000 (00:15 +0000)]
Add an entry to UPDATING for r362158.