]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agolibsa: make env_discard() public
tsoome [Wed, 19 Aug 2020 15:27:09 +0000 (15:27 +0000)]
libsa: make env_discard() public

Allow env_discard() to be used outside environment.c

3 years agolibsa: cstyle cleanup for environment.c
tsoome [Wed, 19 Aug 2020 15:20:33 +0000 (15:20 +0000)]
libsa: cstyle cleanup for environment.c

No functional changes.

3 years agoUnbreak `freebsd-update updatesready'.
grembo [Wed, 19 Aug 2020 15:11:27 +0000 (15:11 +0000)]
Unbreak `freebsd-update updatesready'.

The command would only work if PWD happened to be WORKDIR.
Also, exit 1 in case WORKDIR exists, but isn't accessible
by the current user.

PR: 242709
Reported by: Max Fiedler
MFC after: 1 week

3 years agocache: when adding an already existing entry assert on a complete match
mjg [Wed, 19 Aug 2020 15:08:14 +0000 (15:08 +0000)]
cache: when adding an already existing entry assert on a complete match

3 years agocache: tidy up the comment above cache_prehash
mjg [Wed, 19 Aug 2020 15:07:28 +0000 (15:07 +0000)]
cache: tidy up the comment above cache_prehash

3 years agoMark COVERAGE and KCOV as part of KCSAN
andrew [Wed, 19 Aug 2020 14:11:25 +0000 (14:11 +0000)]
Mark COVERAGE and KCOV as part of KCSAN

While not strictly true this stops them from trying to use the KCSAN atomic
hooks and allows these to be compiled into the same kernel.

Sponsored by: Innovate UK

3 years agoCross-reference development.7 and tests.7
0mp [Wed, 19 Aug 2020 13:09:31 +0000 (13:09 +0000)]
Cross-reference development.7 and tests.7

MFC after: 7 days

3 years agoAvoid evaluating the XHCI control endpoint context.
hselasky [Wed, 19 Aug 2020 11:50:12 +0000 (11:50 +0000)]
Avoid evaluating the XHCI control endpoint context.

The XHCI specification says that the XHCI controller should detect
reception of the USB device descriptors, and automatically update
the max packet size in the control endpoint context.

Differential Revision: https://reviews.freebsd.org/D26104
Reviewed by: kp@
MFC after: 1 week
Sponsored by: Mellanox Technologies

3 years agoFix the real shared libraries (lib*.so.X) from OLD_FILES to OLD_LIBS,
netchild [Wed, 19 Aug 2020 10:01:05 +0000 (10:01 +0000)]
Fix the real shared libraries (lib*.so.X) from OLD_FILES to OLD_LIBS,
as it is supposed to be.

3 years agoPrint current buffer latency in dmesg for the USB audio driver and not just
hselasky [Wed, 19 Aug 2020 08:05:37 +0000 (08:05 +0000)]
Print current buffer latency in dmesg for the USB audio driver and not just
the maximum.

MFC after: 1 week
Sponsored by: Mellanox Technologies

3 years agovfs: remove the always-curthread td argument from VOP_RECLAIM
mjg [Wed, 19 Aug 2020 07:28:01 +0000 (07:28 +0000)]
vfs: remove the always-curthread td argument from VOP_RECLAIM

3 years agovfs: drop the error parameter from vn_isdisk, introduce vn_isdisk_error
mjg [Wed, 19 Aug 2020 02:51:17 +0000 (02:51 +0000)]
vfs: drop the error parameter from vn_isdisk, introduce vn_isdisk_error

Most consumers pass NULL.

3 years agovfs: sanity check mount counters in vfs_op_enter
mjg [Wed, 19 Aug 2020 02:50:09 +0000 (02:50 +0000)]
vfs: sanity check mount counters in vfs_op_enter

3 years agoThree typos:
imp [Wed, 19 Aug 2020 02:18:11 +0000 (02:18 +0000)]
Three typos:
Amiga is a proper noun
Condition is traditionally spelled starting with 'c'
Some, but not all, of the over/under-voltage instances were hyphenated.
Since they are all adverb phrases, they all need to be hyphenated.

Pointy hat: imp

3 years agobectl(8): Fix output of `bectl list` for the 'Mountpoint' column.
rew [Wed, 19 Aug 2020 00:09:39 +0000 (00:09 +0000)]
bectl(8): Fix output of `bectl list` for the 'Mountpoint' column.

Currently, the output of `bectl list` doesn't align the 'Mountpoint' column
correctly when the 'mounted' property of a boot environment dataset is longer
than the default column width.

Set the 'Mountpoint' column width to the boot environment dataset with the
longest 'mounted' property or to the default width, whichever is greater.

PR:             241064
Reported by: vermaden@interia.pl
Reviewed by:    kevans (mentor)
Approved by:    kevans (mentor)
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D26048

3 years agoIncrease BER to PER lookup table size in an attempt to mitigate panics
zec [Tue, 18 Aug 2020 22:46:46 +0000 (22:46 +0000)]
Increase BER to PER lookup table size in an attempt to mitigate panics
with LRO and TSO.

Reported by:    rstone

3 years agoFix ber parameter description.
zec [Tue, 18 Aug 2020 22:15:51 +0000 (22:15 +0000)]
Fix ber parameter description.

3 years agolinux: add sysctl compat.linux.use_emul_path
mjg [Tue, 18 Aug 2020 22:04:22 +0000 (22:04 +0000)]
linux: add sysctl compat.linux.use_emul_path

This is a step towards facilitating jails with only Linux binaries.
Supporting emul_path adds path lookups which are completely spurious
if the binary at hand runs in a Linux-based root directory.

It defaults to on (== current behavior).

make -C /root/linux-5.3-rc8 -s -j 1 bzImage:

use_emul_path=1: 101.65s user 68.68s system 100% cpu 2:49.62 total
use_emul_path=0: 101.41s user 64.32s system 100% cpu 2:45.02 total

3 years agolinux: consistently use LFREEPATH instead of open-coding it
mjg [Tue, 18 Aug 2020 22:03:55 +0000 (22:03 +0000)]
linux: consistently use LFREEPATH instead of open-coding it

3 years agoFix two typos.
imp [Tue, 18 Aug 2020 21:42:02 +0000 (21:42 +0000)]
Fix two typos.

Submitted by: rpokala@
MFC After: 3 days

3 years agoDocument the ZFS events as best I can. These are not well documented.
imp [Tue, 18 Aug 2020 21:26:58 +0000 (21:26 +0000)]
Document the ZFS events as best I can. These are not well documented.

MFC After: 3 days

3 years agoDocument the AEON subsystem for the Amiga's power button.
imp [Tue, 18 Aug 2020 21:26:54 +0000 (21:26 +0000)]
Document the AEON subsystem for the Amiga's power button.

MFC After: 3 days

3 years agoDocument the PMU system
imp [Tue, 18 Aug 2020 21:26:50 +0000 (21:26 +0000)]
Document the PMU system

The pmu(4) and adb(4) drivers on powerpc generate PMU events. Document them.

The allwinner power modules also generate these events. Document those as well.

MFC After: 3 days

3 years agoGEOM::rotation_rate changes are also signaled via devctl.
imp [Tue, 18 Aug 2020 21:26:45 +0000 (21:26 +0000)]
GEOM::rotation_rate changes are also signaled via devctl.

MFC After: 3 days

3 years agoMove the possible event types into a column table to make it easier to read.
imp [Tue, 18 Aug 2020 21:26:39 +0000 (21:26 +0000)]
Move the possible event types into a column table to make it easier to read.

Sort system type alphabetically.
Remove some commas that aren't in the devd notification messages.

MFC After: 3 days
Reviewed by: 0mp (earlier versions), jhb (useful feedback on earlier versions)
Differential Revision: https://reviews.freebsd.org/D26105

3 years agogdb(4): Support empty qSupported queries
cem [Tue, 18 Aug 2020 20:59:10 +0000 (20:59 +0000)]
gdb(4): Support empty qSupported queries

Technically a client may send a qSupported query without specifying any
client features.  We should respond with our supported list in that case
instead of bailing with error.

Reported by: rlibby
Reviewed by: emaste, rlibby, vangyzen
Sponsored by: Isilon
Differential Revision: https://reviews.freebsd.org/D26115

3 years agoNone of system, subsystem, or type may have spaces in them. Convert the spaces
imp [Tue, 18 Aug 2020 20:20:45 +0000 (20:20 +0000)]
None of system, subsystem, or type may have spaces in them. Convert the spaces
to dashes.

Approved by: manu@

3 years agozfs: add an option to the bootloader to rewind the ZFS checkpoint
oshogbo [Tue, 18 Aug 2020 19:48:04 +0000 (19:48 +0000)]
zfs: add an option to the bootloader to rewind the ZFS checkpoint

The checkpoints are another way of keeping the state of ZFS.
During the rewind, the pool has to be exported.
This makes checkpoints unusable when using ZFS as root.
Add the option to rewind the ZFS checkpoint at the boot time.
If checkpoint exists, a new option for rewinding a checkpoint will appear in
the bootloader menu.
We fully support boot environments.
If the rewind option is selected, the boot loader will show a list of
boot environments that existed before the checkpoint.

Reviewed by: tsoome, allanjude, kevans (ok with high-level overview)
Differential Revision: https://reviews.freebsd.org/D24920

3 years agoTCP Cubic: recalculate cwnd for every ACK.
rscheff [Tue, 18 Aug 2020 19:34:31 +0000 (19:34 +0000)]
TCP Cubic: recalculate cwnd for every ACK.

Since cubic calculates cwnd based on absolute
time, retaining RFC3465 (ABC) once-per-window updates
can lead to dramatic changes of cwnd in the convex
region. Updating cwnd for each incoming ack minimizes
this delta, preventing unintentional line-rate bursts.

Reviewed by: chengc_netapp.com, tuexen (mentor)
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D26060

3 years agoFix two bugs I introduced in r362563.
tuexen [Tue, 18 Aug 2020 19:25:03 +0000 (19:25 +0000)]
Fix two bugs I introduced in r362563.
Found by running syzkaller.

MFC after: 3 days

3 years agopf.conf(5): Assorted fixes
gbe [Tue, 18 Aug 2020 17:30:51 +0000 (17:30 +0000)]
pf.conf(5): Assorted fixes

- new sentence new line
- blank lines in fill mode

3 years agobt(4) has already been removed. Add a deprecation notice.
imp [Tue, 18 Aug 2020 17:29:01 +0000 (17:29 +0000)]
bt(4) has already been removed. Add a deprecation notice.

MFC After: 1 day

3 years agouptime(1): Add EXAMPLES section
fernape [Tue, 18 Aug 2020 16:58:37 +0000 (16:58 +0000)]
uptime(1): Add EXAMPLES section

Add a simple example

Approved by: manpages (bcr@)
Differential Revision: https://reviews.freebsd.org/D26063

3 years agoriscv: Use global mimpid in identify_cpu()
nick [Tue, 18 Aug 2020 16:51:04 +0000 (16:51 +0000)]
riscv: Use global mimpid in identify_cpu()

sbi_init() sets mimpid, we can use that value.

Reviewed by: philip (mentor), kp (mentor)
Approved by: philip (mentor), kp (mentor)
Sponsored by: Axiado
Differential Revision: https://reviews.freebsd.org/D26092

3 years agocam: add missing MAKEDEV_NOWAIT in passregister
mjg [Tue, 18 Aug 2020 16:06:16 +0000 (16:06 +0000)]
cam: add missing MAKEDEV_NOWAIT in passregister

Reported by: dhw

3 years agoCheck the XHCI endpoint state before issuing XHCI endpoint commands.
hselasky [Tue, 18 Aug 2020 15:44:03 +0000 (15:44 +0000)]
Check the XHCI endpoint state before issuing XHCI endpoint commands.

Differential Revision: https://reviews.freebsd.org/D26064
Reviewed by: kp@ and bz@
MFC after: 1 week
Sponsored by: Mellanox Technologies

3 years agoFix handling of ancillary data on non-AF_UNIX Linux sockets.
markj [Tue, 18 Aug 2020 14:17:14 +0000 (14:17 +0000)]
Fix handling of ancillary data on non-AF_UNIX Linux sockets.

After r340674, the "continue" would restart the loop without having
updated clen, resulting in an infinite loop.  Restore the old behaviour
of simply ignoring all control messages on such sockets, since we
currently only implement handling for AF_UNIX-specific messages.

Reported by: syzkaller
Reviewed by: tijl
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26093

3 years agoRevert r364310.
markj [Tue, 18 Aug 2020 14:09:49 +0000 (14:09 +0000)]
Revert r364310.

Some of the resulting fallout in CAM does not appear straightforward to
fix, so simply revert the commit for now in the absence of a better
solution.

Discussed with: mjg
Reported by: dhw

3 years agoiicmux: fix a sign error in comparison
avg [Tue, 18 Aug 2020 12:14:01 +0000 (12:14 +0000)]
iicmux: fix a sign error in comparison

Because pcell_t is unsigned both sides of the comparison were treated as
such.
Because of that error iicmux created all possible sub-buses even if only
a subset was defined in the device tree.

MFC after: 1 week

3 years agoExport a routine to provide the TSC_AUX MSR value and use this in vmm.
grehan [Tue, 18 Aug 2020 11:36:38 +0000 (11:36 +0000)]
Export a routine to provide the TSC_AUX MSR value and use this in vmm.

Also, drop an unnecessary set of braces.

Requested by: kib
Reviewed by: kib
MFC after: 3 weeks

3 years agoUse complete OIDs to avoid confusion
0mp [Tue, 18 Aug 2020 10:30:55 +0000 (10:30 +0000)]
Use complete OIDs to avoid confusion

Submitted by: otis_sk.freebsd.org
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26098

3 years agonetmap: fix parsing of legacy nmr->nr_ringid
vmaffione [Tue, 18 Aug 2020 08:03:28 +0000 (08:03 +0000)]
netmap: fix parsing of legacy nmr->nr_ringid

Code was checking for NETMAP_{SW,HW}_RING in req->nr_ringid which
had already been masked by NETMAP_RING_MASK. Therefore, the comparisons
always failed and set NR_REG_ALL_NIC. Check against the original nmr
structure.

Submitted by: bpoole@packetforensics.com
Reported by: bpoole@packetforensics.com
Reviewed by: giuseppe.lettieri@unipi.it
Approved by: vmaffione
MFC after: 1 week

3 years agoSupport guest rdtscp and rdpid instructions on Intel VT-x
grehan [Tue, 18 Aug 2020 07:23:47 +0000 (07:23 +0000)]
Support guest rdtscp and rdpid instructions on Intel VT-x

Enable any of rdtscp and/or rdpid for bhyve guests on Intel-based hosts
that support the "enable RDTSCP" VM-execution control.

Submitted by: adam_fenn.io
Reported by: chuck
Reviewed by: chuck, grehan, jhb
Approved by: jhb (bhyve), grehan
MFC after: 3 weeks
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D26003

3 years agoAllow guest device MMIO access from bootmem memory segments.
grehan [Tue, 18 Aug 2020 07:08:17 +0000 (07:08 +0000)]
Allow guest device MMIO access from bootmem memory segments.

Recent versions of UEFI have moved local APIC timer initialization into
the early SEC phase which runs out of ROM, prior to self-relocating
into RAM. This results in a hypervisor exit.

Currently bhyve prevents instruction emulation from segments that aren't
marked as "sysmem" aka guest RAM, with the vm_gpa_hold() routine failing.
However, there is no reason for this restriction: the hypervisor already
controls whether EPT mappings are marked as executable.

Fix by dropping the redundant check of sysmem.

MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D25955

3 years agoUse better gone_in_dev rather than just gone_in to print the device name.
imp [Tue, 18 Aug 2020 06:34:56 +0000 (06:34 +0000)]
Use better gone_in_dev rather than just gone_in to print the device name.

3 years agoDocument that PC Card will likely be removed before 13.
imp [Tue, 18 Aug 2020 06:18:18 +0000 (06:18 +0000)]
Document that PC Card will likely be removed before 13.

This was discussed in arch@ a while ago. Most of the 16-bit drivers that it
relied on have been removed. There's only a few other drivers remaining that
support it, and those are very rare the days (even the once ubiquitious wi(1)
is now quite rare).

Indvidual drivers will be handled separately before pccard itself is removed.

3 years agoModernize a bit.
imp [Tue, 18 Aug 2020 06:07:34 +0000 (06:07 +0000)]
Modernize a bit.

Remove PC Card specific information. It's of little value these days and on
the way out after most of its drivers have been removed.
Use iwn instead of wi device.

3 years agoAdd an entry to UPDATING for r364330.
rmacklem [Tue, 18 Aug 2020 02:02:36 +0000 (02:02 +0000)]
Add an entry to UPDATING for r364330.

3 years agoBump __FreeBSD_version for r364330, since it changed the internal API
rmacklem [Tue, 18 Aug 2020 01:57:48 +0000 (01:57 +0000)]
Bump __FreeBSD_version for r364330, since it changed the internal API
between the NFS modules such that they all need to be re-compiled from
sources.

3 years agoDelete the unused "use_ext" argument to nfscl_reqstart().
rmacklem [Tue, 18 Aug 2020 01:41:12 +0000 (01:41 +0000)]
Delete the unused "use_ext" argument to nfscl_reqstart().

This is a partial revert of r363210, since the "use_ext" argument added
by that commit is not actually useful.

This patch should not result in any semantics change.

3 years agoRemove "emulation" of clone(CLONE_PARENT | CLONE_THREAD).
markj [Mon, 17 Aug 2020 21:30:49 +0000 (21:30 +0000)]
Remove "emulation" of clone(CLONE_PARENT | CLONE_THREAD).

On Linux this is supposed to result in EINVAL.

Reported by: syzkaller
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agoFix a lock leak when emulating futex(FUTEX_WAIT_BITSET).
markj [Mon, 17 Aug 2020 21:30:15 +0000 (21:30 +0000)]
Fix a lock leak when emulating futex(FUTEX_WAIT_BITSET).

Reported by: syzkaller
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agonet80211: replace magic number by define
bz [Mon, 17 Aug 2020 20:18:01 +0000 (20:18 +0000)]
net80211: replace magic number by define

Rather than coding an array size of [4] replace the number with
WME_NUM_AC.

MFC after: 2 weeks
Reviewed by: adrian
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision: https://reviews.freebsd.org/D26090

3 years agonet80211: VHT correct NSS Set loop boundary
bz [Mon, 17 Aug 2020 20:16:33 +0000 (20:16 +0000)]
net80211: VHT correct NSS Set loop boundary

For the <VHT-MCS, NSS> tuple, NSS is 1..8 (or in our loop case 0..7
but not 0..6). Correct the boundry to check for < 8 and not < 7.

MFC after: 2 weeks
Reviewed by: adrian
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision: https://reviews.freebsd.org/D26087

3 years agoAdd a USE_GCC_TOOLCHAINS knob to make universe.
jhb [Mon, 17 Aug 2020 20:11:43 +0000 (20:11 +0000)]
Add a USE_GCC_TOOLCHAINS knob to make universe.

This uses GCC toolchains instead of LLVM on architectures supported by
GCC.  Currently this uses GCC 6 on aarch64, amd64, i386, and mips.

Although this does also try to use GCC 6 on powerpc, it is always
skipped for now since a powerpc-gcc6 package is not available and the
structure of make universe makes it hard to skip a subset of arches
for a target.  This should be short-lived as freebsd-gcc9 does include
a powerpc-gcc9 package so powerpc should work once this switches to
GCC 9.

Discussed with: emaste
Differential Revision: https://reviews.freebsd.org/D25732

3 years agodwmmc: remove printf even under bootverbose
bz [Mon, 17 Aug 2020 20:07:14 +0000 (20:07 +0000)]
dwmmc: remove printf even under bootverbose

Remove two debugging printfs, even if hidden under boot -v.
They seemed to be of debug nature and always spit onto the
console when running camcontrol devlist -v.

Reviewed by: manu
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25962

3 years agoscandir-compat11.c: Remove unused declaration for qsort_b().
kib [Mon, 17 Aug 2020 19:14:09 +0000 (19:14 +0000)]
scandir-compat11.c: Remove unused declaration for qsort_b().

Sponsored by: The FreeBSD Foundation
MFC after: 0 days

3 years agoipfw: line up `ipfw -t list` with and without timestamp
emaste [Mon, 17 Aug 2020 18:53:23 +0000 (18:53 +0000)]
ipfw: line up `ipfw -t list` with and without timestamp

From the PR:
    When I run `ipfw -t list` on release/12 or current, I get misaligned
    output between lines that do and do not have a last match timestamp,
    like so:

    00100 Tue Aug 11 03:03:26 2020 allow ip from any to any via lo0
    00200                         deny ip from any to 127.0.0.0/8

    (specifically, the "allow" and "deny" strings do not line up)

PR: 248608
Submitted by: Taylor Stearns
MFC after: 3 days

3 years agoMove -L${LIBCOMPATTMP}/usr/lib${libcompat} from CFLAGS to LDFLAGS.
jhb [Mon, 17 Aug 2020 17:17:33 +0000 (17:17 +0000)]
Move -L${LIBCOMPATTMP}/usr/lib${libcompat} from CFLAGS to LDFLAGS.

This is only needed when linking and fixes various "unused command
line argument" warnings during the lib32 build.

Reviewed by: bdrewery
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D26068

3 years agoSkip Linux madvise(MADV_DONTNEED) on unmanaged objects.
markj [Mon, 17 Aug 2020 17:14:56 +0000 (17:14 +0000)]
Skip Linux madvise(MADV_DONTNEED) on unmanaged objects.

vm_object_madvise() is a no-op for unmanaged objects, but we should also
limit the scope of mappings on which pmap_remove() is called.  In
particular, with the WIP largepage shm objects patch the kernel must
remove mappings of such objects along superpage boundaries, and without
this check Linux madvise(MADV_DONTNEED) could violate that requirement.

Reviewed by: alc, kib
MFC with: r362631
Sponsored by: Juniper Networks, Klara Inc.
Differential Revision: https://reviews.freebsd.org/D26084

3 years agogpart(8): Recognize apple-zfs and solaris-reserved partition ids
cem [Mon, 17 Aug 2020 17:07:05 +0000 (17:07 +0000)]
gpart(8): Recognize apple-zfs and solaris-reserved partition ids

Introduce G_PART_ALIAS_SOLARIS_RESERVED, GPT_ENT_TYPE_SOLARIS_RESERVED et al.,
to make gpart show output more convenient on systems with illumos/openindiana
disks visible.

Submitted by: Juraj Lutter <otis AT sk.FreeBSD.org>
Reviewed by: bcr(manpages), delphij, myself
Differential Revision: https://reviews.freebsd.org/D26012

3 years agonet80211: return 80P80 before 160
bz [Mon, 17 Aug 2020 16:51:21 +0000 (16:51 +0000)]
net80211: return 80P80 before 160

In ieee80211_vht_get_chwidth_ie() we need to return 80P80 (3) before
VHT160 (2) as otherwise we'll never use 80P80.  Fix the order.

MFC after: 2 weeks
X-MFC with: r364303 (which missed this)
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")

3 years agoMerge commit 4d52ebb9b9c7 from llvm git (by Chen Zheng):
dim [Mon, 17 Aug 2020 16:37:46 +0000 (16:37 +0000)]
Merge commit 4d52ebb9b9c7 from llvm git (by Chen Zheng):

  [PowerPC] Make StartMI ignore COPY like instructions.

  Reviewed By: lkail

  Differential Revision: https://reviews.llvm.org/D85659

This fixes an assertion failure when building world for powerpc. It was
reported upstream as <https://bugs.llvm.org/show_bug.cgi?id=47041>.

3 years agoRevert r364275, for reapplying the final upstream fix:
dim [Mon, 17 Aug 2020 16:34:10 +0000 (16:34 +0000)]
Revert r364275, for reapplying the final upstream fix:

Tentatively apply https://reviews.llvm.org/D85659, which fixes an
assertion failure when building world for powerpc. This has been
reported upstream as <https://bugs.llvm.org/show_bug.cgi?id=47041>.

3 years agonet80211: remove vertical whitespace
bz [Mon, 17 Aug 2020 16:28:59 +0000 (16:28 +0000)]
net80211: remove vertical whitespace

No functional changes.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")

3 years agoWith INVARIANTS panic immediately if M_WAITOK is requested in a
glebius [Mon, 17 Aug 2020 15:37:08 +0000 (15:37 +0000)]
With INVARIANTS panic immediately if M_WAITOK is requested in a
non-sleepable context.  Previously only _sleep() would panic.
This will catch misuse of M_WAITOK at development stage rather
than at stress load stage.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D26027

3 years agoExtend EIIOE field handling according to ses4r5 draft.
mav [Mon, 17 Aug 2020 15:11:46 +0000 (15:11 +0000)]
Extend EIIOE field handling according to ses4r5 draft.

It should not affect any existing systems.

MFC after: 2 weeks

3 years agoextfs: remove redundant little endian conversion.
pfg [Mon, 17 Aug 2020 15:05:41 +0000 (15:05 +0000)]
extfs: remove redundant little endian conversion.

The NSEC_TO_XTIME macro already calls the htole32(), so there is no need
to call it twice. This code does nothing on LE platforms and affects only
nanosecond and birthtime fields so it's difficult to notice on regular use.

X-MFC with: r361136

3 years agoAdd libprivateevent libs to ObsoleteFiles.inc
emaste [Mon, 17 Aug 2020 14:07:29 +0000 (14:07 +0000)]
Add libprivateevent libs to ObsoleteFiles.inc

Missed in r361607

Reported by: dim

3 years agoCommit a missing piece of r364302.
markj [Mon, 17 Aug 2020 14:06:51 +0000 (14:06 +0000)]
Commit a missing piece of r364302.

This had failed to apply due to a merge conflict.

Reported by: Jenkins
MFC with: r364302

3 years agoFor consistency and to avoid any problems getting past the 31bit
bz [Mon, 17 Aug 2020 13:51:25 +0000 (13:51 +0000)]
For consistency and to avoid any problems getting past the 31bit
boundry change the last two IF_Mbps(2500) and additionally one
IF_Mbps(5000) to ULL as well.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")

3 years agocpuset(1): Update the usage message.
markj [Mon, 17 Aug 2020 13:08:04 +0000 (13:08 +0000)]
cpuset(1): Update the usage message.

Parameters related to domain selection were not listed.

MFC after: 1 week
Sponsored by: Juniper Networks, Klara Inc.

3 years ago80211: consistently order 160 and 80+80
bz [Mon, 17 Aug 2020 13:04:18 +0000 (13:04 +0000)]
80211: consistently order 160 and 80+80

For flags and checks the order goes VHT160 and then VHT80P80 unless
checks are in reverse order ("more comes first") in which case we
deal with VHT80P80 first.
The one reverse order to pick out is where we check channel
prefernences.  While it may seem that VHT160 is better, finding
two "free" channels (VHT 80+80) is more likely so we do prefer that.

While dealing with VHT160 and VHT80P80 add extra clauses previously
missing or marked TODO in a few places.

Reviewed by: adrian, gnn
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision: https://reviews.freebsd.org/D26002

3 years agoRemove the VM map zone.
markj [Mon, 17 Aug 2020 13:02:01 +0000 (13:02 +0000)]
Remove the VM map zone.

Today, the zone is only used to allocate a trio of kernel maps: the
kernel map itself, and the exec and pipe submaps.  Maps for user
processes are dynamically allocated but are embedded in the vmspace
structure, which is allocated from its own zone.  Make the
aforementioned kernel maps statically allocated and get rid of the zone.

While here, remove a stale comment above vmspace_alloc() and change the
names of locks initialized in vm_map_init() to match vmspace_zinit().

Reported by: alc
Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26052

3 years ago80211: consistently spell 80P80
bz [Mon, 17 Aug 2020 12:52:57 +0000 (12:52 +0000)]
80211: consistently spell 80P80

The standard uses 80+80 and 80p80 but nowhere 80_80.
Switch the latter to 80P80 for all the macros and comments refering
to #defined flags which I could find.
The only place we leave as 80p80 is the ifconfig command line arguments
as we spell them all in lower case.
Ideally we would use 80+80 for any interactions with the user and
80P80 for anything internal but let us not confuse parsers and
hence avoid the '+' in either case.

Reviewed by: adrian, gnn
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision: https://reviews.freebsd.org/D26001

3 years agoasmc(4): Add support for MacBook7,1.
markj [Mon, 17 Aug 2020 12:47:08 +0000 (12:47 +0000)]
asmc(4): Add support for MacBook7,1.

PR: 248693
Submitted by: gcx61@interia.pl
MFC after: 1 week

3 years agonet80211 / ifconfig: cleanup the use of IEEE80211_FVHT_USEVHT*
bz [Mon, 17 Aug 2020 12:43:07 +0000 (12:43 +0000)]
net80211 / ifconfig: cleanup the use of IEEE80211_FVHT_USEVHT*

Rather then using magic numbers duplicate IEEE80211_FVHT_VHT* in
ifconfig (cleanup of these and other flags used and not exposed by
net80211 should happen later) and use those.
In the kernel this simplifies one ioctl path (the other one currently
relies on individual bit flags being passed in).
We also re-order the 80P80 and 160 flag for 160 to come before 80+80
and more clearly leave the flags as TODO in one of the 160/80+80 cases.

Reviewed by: adrian
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision: https://reviews.freebsd.org/D26000

3 years agopmcstat.8: Improve description of -T
0mp [Mon, 17 Aug 2020 10:51:03 +0000 (10:51 +0000)]
pmcstat.8: Improve description of -T

3 years agoRevert 363598
0mp [Mon, 17 Aug 2020 10:25:02 +0000 (10:25 +0000)]
Revert 363598

The original wording was better.

Reported by: rgrimes

3 years agoComment out TODO notes from bectl(8) manual page
0mp [Mon, 17 Aug 2020 08:43:36 +0000 (08:43 +0000)]
Comment out TODO notes from bectl(8) manual page

MFC after: 2 days

3 years agoRemove an unnecessary macro
0mp [Mon, 17 Aug 2020 08:24:50 +0000 (08:24 +0000)]
Remove an unnecessary macro

MFC after: 2 days

3 years agoedquota(8): Cleanup to make it WARNS=6 clean.
delphij [Mon, 17 Aug 2020 05:57:22 +0000 (05:57 +0000)]
edquota(8): Cleanup to make it WARNS=6 clean.

Tested with: make tinderbox
MFC after: 2 weeks

3 years agoDon't explicitly specify c99 or gnu99 as the default is now gnu99.
delphij [Mon, 17 Aug 2020 05:57:02 +0000 (05:57 +0000)]
Don't explicitly specify c99 or gnu99 as the default is now gnu99.

MFC after: 2 weeks

3 years agoRemove heuristic for dealing with trailing newlines being truncated by mailers.
imp [Sun, 16 Aug 2020 23:55:23 +0000 (23:55 +0000)]
Remove heuristic for dealing with trailing newlines being truncated by mailers.

Every version of patch since the first one posted to mod.sources in 1985 have
included a heuristic for coping with the state of email messaging at the
time. This heuristic would add up to 4 blank lines to a patch if it thought it
needed it. The trouble is, though this causes at least one bug.

The bug in my case is that if you have a context diff whose last hunk only
deletes 3 or fewer lines, then if you try to reverse apply it with -R, it will
fail. The reason for this is the heuristic builds an internal representation
that includes those blank lines. However, it should really replicate the lines
from the pattern lines line it would any other time, not assume they are blank
lines. Removing this heuristic will prevent patch from misapplying the lines
removed after applying a 'fuzz' factor to the previous blank line in the file. I
believe this will only affect 'new-style' 4.3BSD context diffs and not the
older-style 4.2BSD diffs and plain, non-context diffs. It won't affect any of
the newer formats, since they don't use the 'omitted' construct in the same way.

Since this heuristic was put into patch at a time when email / etc ate trailing
white space on a regular basis, and since it's clear that this heuristic is the
wrong thing to do at least some of the time, it's better to remove it
entirely. It's not been needed for maybe 20 years since patch files are not
usually corrupted. If there are a small number of patch files that would benefit
from this corruption fixing, those already-currupt patches can be fixed by the
addition of blank lines. I'd wager that no one will ever come to me with an
example of a once-working patch file that breaks with this change. However, I
have 2 patches from the first 195 patches to 2.11BSD that are affected by this
bug, suggesting that the relative frequency of the issue has changed
signficantly since the original heuristic was put into place.

Reviewed by: phk@
Differential Revision: https://reviews.freebsd.org/D26081

3 years agoFix powerpc build.
kib [Sun, 16 Aug 2020 22:50:59 +0000 (22:50 +0000)]
Fix powerpc build.

Sponsored by: The FreeBSD Foundation

3 years agoVMIO reads: enable for UFS
kib [Sun, 16 Aug 2020 21:07:19 +0000 (21:07 +0000)]
VMIO reads: enable for UFS

Move v_object creation earlier, so that VIRF_PGREAD is never set if
v_object is NULL.  There is no much harm from instantiating v_object
when later check for append-only flags disallows open.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25968

3 years agoVMIO reads: enable for nullfs upper vnode if the lower vnode supports it.
kib [Sun, 16 Aug 2020 21:05:56 +0000 (21:05 +0000)]
VMIO reads: enable for nullfs upper vnode if the lower vnode supports it.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25968

3 years agoVMIO read
kib [Sun, 16 Aug 2020 21:02:45 +0000 (21:02 +0000)]
VMIO read

If possible, i.e. if the requested range is resident valid in the vm
object queue, and some secondary conditions hold, copy data for
read(2) directly from the valid cached pages, avoiding vnode lock and
instantiating buffers.  I intentionally do not start read-ahead, nor
handle the advises on the cached range.

Filesystems indicate support for VMIO reads by setting VIRF_PGREAD
flag, which must not be cleared until vnode reclamation.

Currently only filesystems that use vnode pager for v_objects can
enable it, due to reliance on vnp_size.  There is a WIP to handle it
for tmpfs.

Reviewed by: markj
Discussed with: jeff
Tested by: pho
Benchmarked by: mjg
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25968

3 years agovm_object: allow paging_in_progress to be acquired after object termination.
kib [Sun, 16 Aug 2020 20:57:02 +0000 (20:57 +0000)]
vm_object: allow paging_in_progress to be acquired after object termination.

The vm objects are type-stable, and can be accessed even after the
last reference is dropped, or in case of vnode objects, after vgone()
destroyed it as well.

Stop asserting that pip == 0 after vm_object_terminate() waited for
existing owners to drop it, we only want to drain them before setting
OBJ_DEAD flag.  Also stop asserting pip == 0 in object destructor.

Update comments explaining the interaction between paging_in_progress
and termination.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25968

3 years agoAtomically update vm_object vnp_size, where atomic is available.
kib [Sun, 16 Aug 2020 20:52:24 +0000 (20:52 +0000)]
Atomically update vm_object vnp_size, where atomic is available.

This will be used later, where it matters on 32bit arches.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25968

3 years agoMerge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
dim [Sun, 16 Aug 2020 19:14:04 +0000 (19:14 +0000)]
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.0-rc1-47-gff47911ddfc.

MFC after: 6 weeks

3 years agovfs: retire vrefl as a symbol
mjg [Sun, 16 Aug 2020 18:51:12 +0000 (18:51 +0000)]
vfs: retire vrefl as a symbol

vrefl calls vref and there is only one in-tree consumer.

Keep it as a macro for assertion purposes.

3 years agovfs: assert that VI_TEXT_REF is not already set
mjg [Sun, 16 Aug 2020 18:45:31 +0000 (18:45 +0000)]
vfs: assert that VI_TEXT_REF is not already set

3 years agocache: add NOCAPCHECK to the list of supported flags for lockless lookup
mjg [Sun, 16 Aug 2020 18:33:24 +0000 (18:33 +0000)]
cache: add NOCAPCHECK to the list of supported flags for lockless lookup

It is de facto supported in that lockless lookup does not do any capability
checks.

3 years agovfs: restore sorted order of unused nameidata flags
mjg [Sun, 16 Aug 2020 18:27:42 +0000 (18:27 +0000)]
vfs: restore sorted order of unused nameidata flags

3 years agoMerge ^/head r364264 through r364278.
dim [Sun, 16 Aug 2020 18:24:48 +0000 (18:24 +0000)]
Merge ^/head r364264 through r364278.

3 years agoSet tentative merge date.
dim [Sun, 16 Aug 2020 18:23:52 +0000 (18:23 +0000)]
Set tentative merge date.

3 years agovfs: use namei_zone for getcwd allocations
mjg [Sun, 16 Aug 2020 18:21:21 +0000 (18:21 +0000)]
vfs: use namei_zone for getcwd allocations

instead of malloc.

Note that this should probably be wrapped with a dedicated API and other
vn_getcwd callers did not get converted.

3 years agolibcasper: Introduce cap_net a network service for Casper.
oshogbo [Sun, 16 Aug 2020 18:12:21 +0000 (18:12 +0000)]
libcasper: Introduce cap_net a network service for Casper.

Reviewed by: emaste, markj (previous version), bcr (man page)
Differential Revision: https://reviews.freebsd.org/D24688

3 years agoTentatively apply https://reviews.llvm.org/D85659, which fixes an
dim [Sun, 16 Aug 2020 18:10:15 +0000 (18:10 +0000)]
Tentatively apply https://reviews.llvm.org/D85659, which fixes an
assertion failure when building world for powerpc. This has been
reported upstream as <https://bugs.llvm.org/show_bug.cgi?id=47041>.