SVNews

NOTE: This service is experimental and subject to change! Use at your own risk!

Year:   Month: - or - Filter committers: - or -
Filter paths:
Include diffs if smaller than lines.

2018 - 04 - 20   (today)
13:08:04 - r332816
( 3 minutes ago)
by avg
Affects: 
(5 files)
/head/sys/kern/*
call racct_proc_ucred_changed() under the proc lock

The lock is required to ensure that the switch to the new credentials
and the transfer of the process's accounting data from the old
credentials to the new ones is done atomically. Otherwise, some updates
may be applied to the new credentials and then additionally transferred
from the old credentials if the updates happen after proc_set_cred() and
before racct_proc_ucred_changed().

The problem is especially pronounced for RACCT_RSS because
- there is a strict accounting for this resource (it's reclaimable)
- it's updated asynchronously by the vm daemon
- it's updated by setting an absolute value instead of applying a delta

I had to remove a call to rctl_proc_ucred_changed() from
racct_proc_ucred_changed() and make all callers of latter call the
former as well. The reason is that rctl_proc_ucred_changed, as it is
implemented now, cannot be called while holding the proc lock, so the
lock is dropped after calling racct_proc_ucred_changed. Additionally,
I've added calls to crhold / crfree around the rctl call, because
without the proc lock there is no gurantee that the new credentials,
owned by the process, will stay stable. That does not eliminate a
possibility that the credentials passed to the rctl will get stale.
Ideally, rctl_proc_ucred_changed should be able to work under the proc
lock.

Many thanks to kib for pointing out the above problems.

PR: 222027
Discussed with: kib
No comment: trasz
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D15048
12:40:05 - r332815
( 31 minutes ago)
by nyan
Affects:  /stable/11/sys/pc98/cbus/scterm-sck.c
- Use __FBSDID().
- Fix pc98 build.
  Merge from sys/dev/syscons/scterm-teken.c r330918.
12:37:08 - r332814
( 34 minutes ago)
by nyan
Affects:  /stable/11/sys/conf/files.pc98
MFi386: r329199

  Move signal trampolines out of locore.s into separate source file.

This fixes pc98 build.
11:38:29 - r332813
(1 hour 32 minutes ago)
by rmacklem
Affects:  /head/sys/fs/nfsclient/nfs_clport.c
Fix use of pointer after being set NULL.

Using a pointer after setting it NULL is probably not a good plan.
Spotted by inspection during changes for Flexible File Layout Ioerr handling.
This code path obviously isn't normally executed.

MFC after: 1 week
09:57:31 - r332812
(3 hours 13 minutes ago)
by ae
Affects:  /head/sys/net/bpf.c
Add dead_bpf_if structure, that should be used as fake bpf_if
during ifnet detach.

Since destroying interface is not atomic operation and due to the
lack of synhronization during destroy, it is possible, that in the
time between bpfdetach() and if_free() some queued on destroying
interface mbuf will be used by ether_input_internal() and
bpf_peers_present() can dereference NULL bpf_if pointer. To protect
from this, assign pointer to empty bpf_if_ext structure instead of
NULL pointer after bpfdetach().

Reviewed by: melifaro, eugen
Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D15083
09:54:06 - r332811
(3 hours 17 minutes ago)
by ae
Affects: 
(2 files)
/stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c
MFC r332467:
  To avoid possible deadlock do not acquire JQUEUE_LOCK before callout_drain.
09:48:42 - r332810
(3 hours 22 minutes ago)
by ae
Affects: 
(2 files)
/stable/11/sys/netinet6/ip6_fastfwd.c
MFC r332475:
  Add check that mbuf had not multicast layer2 address.
  Such packets should be handled by ip6_mforward().
03:29:06 - r332809
(9 hours 42 minutes ago)
by kevans
Affects:  /head/usr.bin/grep/util.c
bsdgrep: Add some TODOs for future work on operating on chunks
03:23:19 - r332808
(9 hours 47 minutes ago)
by jhibbits
Affects:  /head/sys/powerpc/aim/aim_machdep.c
powerpc64: Set n_slbs = 32 for POWER9

Summary:
POWER9 also contains 32 slbs entries as explained by the POWER9 User Manual:

 "For HPT translation, the POWER9 core contains a unified (combined for both
  instruction and data), 32-entry, fully-associative SLB per thread"

Submitted by: Breno Leitao
Differential Revision: https://reviews.freebsd.org/D15128
03:19:45 - r332807
(9 hours 51 minutes ago)
by jhibbits
Affects: 
(5 files)
/head/sys/powerpc/include/*
/head/sys/powerpc/powerpc/*
powerpc64: Add DSCR support

Summary:
Powerpc64 has support for a register called Data Stream Control Register
(DSCR), which basically controls how the hardware controls the caching and
prefetch for stream operations.

Since mfdscr and mtdscr are privileged instructions, we need to emulate them,
and
keep the custom DSCR configuration per thread.

The purpose of this feature is to change DSCR depending on the operation, set
to DSCR Default Prefetch Depth to deepest on string operations, as memcpy.

Submitted by: Breno Leitao
Differential Revision: https://reviews.freebsd.org/D15081
03:11:51 - r332806
(9 hours 59 minutes ago)
by kevans
Affects:  /head/usr.bin/grep/util.c
bsdgrep: Clean up procmatches a little bit
03:08:46 - r332805
(10 hours 2 minutes ago)
by kevans
Affects:  /head/usr.bin/grep/util.c
bsdgrep: Split match processing out of procfile

procfile is getting kind of hairy, and it's not going to get better as we
correct some more bits that assume we process one line at a time.
01:25:48 - r332804
(11 hours 45 minutes ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfs/nfs_commonport.c
/projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdsubs.c
Update two more kernel files for mirrored DS recovery.
00:59:53 - r332803
(12 hours 11 minutes ago)
by emaste
Affects:  /head/lib/clang/include/lld/Common/Version.inc
lld: use correct number of digits in __FreeBSD_version-style ID

__FreeBSD_version-style IDs should have 5 digits following the major.
00:02:47 - r332802
(13 hours 8 minutes ago)
by gjb
Affects: 
(4 files)
/stable/11/*
Update stable/11 from 11.1-STABLE to 11.2-PRERELEASE, marking the
official start of the code slush.

Set the default mdoc(7) version to 11.2, and update the clang(1)
TARGET_TRIPLE to reflect 11.2. While here, add missing FreeBSD
major versions to mdoc(7).

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
2018 - 04 - 19   (yesterday)
23:53:55 - r332801
(13 hours 17 minutes ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/nfs/nfs_nfssvc.c
/projects/pnfs-planb-server/sys/nfs/nfssvc.h
Update the nfssvc syscall to handle the mirrored DS recovery case.
23:47:37 - r332800
(13 hours 23 minutes ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfs/nfsport.h
Update nfsport.h for the mirror recovery code.
23:17:29 - r332799
(13 hours 53 minutes ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
/projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c
/projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c
Update the last three kernel files for mirrored DS recovery.
22:43:55 - r332798
(14 hours 27 minutes ago)
by mckusick
Affects:  /head/tools/diag/prtblknos/Makefile
/head/tools/diag/prtblknos/main.c
/head/tools/diag/prtblknos/prtblknos.c
Fix incorrect output for a file consisting of a single full-size
block followed by a discontiguous fragment.

Add checks for unallocated inodes and inodes with unknown mode
types.

Cleanup variable declarations by changing from type `int' to types
like ufs_lbn_t, ufs2_daddr_t, etc.

Reported by: bde
22:28:41 - r332797
(14 hours 42 minutes ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfs/nfs_commonsubs.c
/projects/pnfs-planb-server/sys/fs/nfs/nfs_var.h
/projects/pnfs-planb-server/sys/fs/nfs/nfsrvstate.h
Update three more files for mirrored DS recovery.
21:53:57 - r332796
(15 hours 17 minutes ago)
by brooks
Affects: 
(5 files)
/head/tools/tools/sortbench/*
Add sortbench.

This is a set of benchmarks of qsort, mergesort, heapsort, and
optionally wikisort and a script to run them.

Submitted by: Miles Fertel <milesfertel@college.harvard.edu>
Sponsored by: Google Summer of Code 2017
Differential Revision: https://reviews.freebsd.org/D12677
21:05:23 - r332795
(16 hours 5 minutes ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfs/nfs.h
/projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c
Update the first two files for mirrored recovery.
20:58:09 - r332794
(16 hours 13 minutes ago)
by emaste
Affects:  /head/share/mk/bsd.sys.mk
/head/stand/i386/Makefile.inc
Add support for linker-type-specific flags

r332090 added a LINKER_TYPE test to add the --no-rosegment flag when
linking the i386 loader components with lld. Instead, introduce a
general mechanism for setting LDFLAGS for a specific linker type,
and use it for --no-rosegment.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D14998
20:47:53 - r332793
(16 hours 23 minutes ago)
by rmacklem
Affects: 
(3489 files)
/projects/pnfs-planb-server/sys/*
Merge in an up to date kernel from head.
20:36:15 - r332792
(16 hours 35 minutes ago)
by brooks
Affects: 
(8 files)
/head/lib/libc/riscv/*
/head/lib/msun/riscv/*
Replace SOFTFLOAT with __riscv_float_abi_*.

With SOFTFLOAT, libc and libm were built correctly, but any program
including fenv.h itself assumed it was on a hardfloat systen and emitted
inline fpu instructions for fedisableexcept() and friends.

Unlike r315424 which did this for MIPS, I've used riscv_float_abi_soft
and riscv_float_abi_double macros as appropriate rather than using
__riscv_float_abi_soft exclusively. This ensures that attempts to use an
unsupported hardfloat ABI will fail.

Reviewed by: br
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10039
20:31:52 - r332791
(16 hours 39 minutes ago)
by markm
Affects:  /head/sys/modules/random
Remove empty dir no longer required.

Reported by: Jung-uk Kim
20:30:33 - r332790
(16 hours 40 minutes ago)
by rmacklem
Affects:  /head/sys/fs/nfsserver/nfs_nfsdserv.c
Fix OpenDowngrade for NFSv4.1 if a client sets the OPEN_SHARE_ACCESS_WANT* bits.

The NFSv4.1 RFC specifies that the OPEN_SHARE_ACCESS_WANT bits can be set
in the OpenDowngrade share_access argument and are basically ignored.
I do not know of a extant NFSv4.1 client that does this, but this little
patch fixes it just in case.
It also changes the error from NFSERR_BADXDR to NFSERR_INVAL since the NFSv4.1
RFC specifies this as the error to be returned if bogus bits are set.
(The NFSv4.0 RFC didn't specify any error for this, so the error reply can
 be changed for NFSv4.0 as well.)
Found by inspection while looking at a problem with OpenDowngrade reported
for the ESXi 6.5 NFSv4.1 client.

Reported by: andreas.nagy@frequentis.com
PR: 227214
MFC after: 1 week
20:25:19 - r332789
(16 hours 45 minutes ago)
by emaste
Affects:  /head/usr.sbin/pwd_mkdb/pwd_mkdb.c
pwd_mkdb: warn that legacy support is deprecated (if specified)

r283981 switched pwd_mkdb to emit only v4 database entries by default,
and introduced a -l (legacy) option emit v3 entries in addition. The
commit message claims that legacy support will be removed in 12.0, so
emit a warning now if it is used.
18:34:38 - r332788
(18 hours 36 minutes ago)
by nwhitehorn
Affects:  /head/sys/powerpc/aim/mmu_oea64.c
Fix detection of memory overlap with the kernel in the case where a memory
region marked "available" by firmware is contained entirely in the kernel.

This had a tendency to happen with FDTs passed by loader, though could for
other reasons as well, and would result in the kernel slowly cannibalizing
itself for other purposes, eventually resulting in a crash.

A similar fix is needed for mmu_oea.c and should probably just be rolled
at that point into some generic code in platform.c for taking a mem_region
list and removing chunks.

PR: 226974
Submitted by: leandro.lupori@gmail.com
Reviewed by: jhibbits
Differential Revision: D15121
18:10:44 - r332787
(19 hours ago)
by np
Affects:  /head/sys/dev/cxgbe/tom/t4_connect.c
/head/sys/dev/cxgbe/tom/t4_tom.c
cxgbe(4): Fix bugs in the handling of COP rules that match on VLAN tag.

Retrieve the tag from the correct ifnet and use the provided tag
(instead of hardcoded 0xffff, implying no tag) in the routines that
process offload policy.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications
18:08:46 - r332786
(19 hours 2 minutes ago)
by kib
Affects:  /head/sys/i386/include/asmacros.h
Use symbolic constant, explaining the operation.

Sponsored by: The FreeBSD Foundation
17:55:48 - r332785
(19 hours 15 minutes ago)
by mav
Affects: 
(4 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
MFC r332523: 9433 Fix ARC hit rate

When the compressed ARC feature was added in commit d3c2ae1
the method of reference counting in the ARC was modified. As
part of this accounting change the arc_buf_add_ref() function
was removed entirely.

This would have be fine but the arc_buf_add_ref() function
served a second undocumented purpose of updating the ARC access
information when taking a hold on a dbuf. Without this logic
in place a cached dbuf would not migrate its associated
arc_buf_hdr_t to the MFU list. This would negatively impact
the ARC hit rate, particularly on systems with a small ARC.

This change reinstates the missing call to arc_access() from
dbuf_hold() by implementing a new arc_buf_access() function.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tim Chase <tim@chase2k.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
17:19:12 - r332784
(19 hours 52 minutes ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Use 'literal' tags around compiler-rt, as it is a library, not an
application.

Submitted by: dim
Sponsored by: The FreeBSD Foundation
16:05:48 - r332783
(21 hours 5 minutes ago)
by imp
Affects:  /head/sys/dev/nvme/nvme_ns.c
Reword comment to remove awkward constructs, including an "it's" that
shouldn't have been there at all (it wasn't a typo for its, rather a
left-over from an older revision of the comment).

Noticed by: many
16:00:34 - r332782
(21 hours 10 minutes ago)
by jhb
Affects: 
(6 files)
/head/sys/*
Simplify the code to allocate stack for auxv, argv[], and environment vectors.

Remove auxarg_size as it was only used once right after a confusing
assignment in each of the variants of exec_copyout_strings().

Reviewed by: emaste
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D15123
15:52:45 - r332781
(21 hours 18 minutes ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Fix a misspelled word.

Submitted by: dim
Sponsored by: The FreeBSD Foundation
15:39:20 - r332780
(21 hours 31 minutes ago)
by imp
Affects:  /head/sys/dev/nvme/nvme_ns.c
Intel drives have an optimal alignment for I/O. While they honor I/Os
that cross this boundary, they perform better when this isn't the
case. Intel uses the 3rd byte in the vendor specific area for
this. The DC P3500 was previously listed without any explanation. Add
the DC P3520 and DC P4500 to the list.

There won't be any others drives needing this quirk. Intel has
standardized a field in the namespace data in 1.3 (noiob). A future
patch will use that if it exists, with fallback to this method.

Submitted by: Keith Busch
Reviewed by: jimharris@
15:29:10 - r332779
(21 hours 42 minutes ago)
by mav
Affects:  /head/sys/powerpc/powermac/cuda.c
Release memory resource on cuda driver attach failure.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
15:24:21 - r332778
(21 hours 46 minutes ago)
by cem
Affects:  /head/sys/opencrypto/cryptosoft.c
cryptosoft: Do not exceed crd_len around *crypt_multi

When a caller passes in a uio or mbuf chain that is longer than crd_len, in
tandem with a transform that supports the multi-block interface,
swcr_encdec() would process the entire mbuf or uio instead of just the
portion indicated by crd_len (+ crd_skip).

De/encryption are performed in-place, so this would trash subsequent uio or
mbuf contents.

This was introduced in r331639 (mea culpa). It only affects the
{de,en}crypt_multi() family of interfaces. That interface only has one
consumer transform in-tree (for now): Chacha20.

PR: 227605
Submitted by: Valentin Vergez <valentin.vergez AT stormshield.eu>
15:11:18 - r332777
(21 hours 59 minutes ago)
by markj
Affects: 
(2 files)
/stable/11/sys/compat/linuxkpi/common/include/asm/smp.h
MFC r332079:
Fix the definitions of get_cpu() and put_cpu().
15:10:42 - r332776
(22 hours ago)
by markj
Affects: 
(2 files)
/stable/11/share/man/man9/timeout.9
MFC r332043:
Typo.
15:07:53 - r332775
(22 hours 3 minutes ago)
by oleg
Affects: 
(2 files)
/stable/11/sbin/ipfw/ipfw.8
MFC r332403:

Fix a typo.
15:03:48 - r332774
(22 hours 7 minutes ago)
by rrs
Affects:  /head/sys/netinet/tcp_subr.c
/head/sys/netinet/tcp_usrreq.c
These two modules need the tcp_hpts.h file for
when the option is enabled (not sure how LINT/build-universe
missed this) opps.

Sponsored by: Netflix Inc
15:02:53 - r332773
(22 hours 8 minutes ago)
by kevans
Affects:  /head/etc/rc.d/ddb
Fix ddb rc script

r288291 added a call to limits(1), which isn't available before partitions
are mounted. This broke the ddb rc script, which does not provide its own
start_cmd.

Alleviate the situation here by providing a start_cmd. We still have other
problems with diskless setups that need to be considered, but this is a
start.

PR: 206291
Submitted by: cy
Discussed with: rgrimes
MFC after: 3 days
15:02:42 - r332772
(22 hours 8 minutes ago)
by oleg
Affects: 
(2 files)
/stable/11/sys/netpfil/ipfw/ip_fw_table.c
Fix ipfw table creation when net.inet.ip.fw.tables_sets = 0 and non zero set
specified on table creation. This fixes following:

# sysctl net.inet.ip.fw.tables_sets
net.inet.ip.fw.tables_sets: 0
# ipfw table all info
# ipfw set 1 table 1 create type addr
# ipfw set 1 table 1 create type addr
# ipfw add 10 set 1 count ip from table\(1\) to any
00010 count ip from table(1) to any
# ipfw add 10 set 1 count ip from table\(1\) to any
00010 count ip from table(1) to any
# ipfw table all info
 --- table(1), set(1) ---
  kindex: 4, type: addr
  references: 1, valtype: legacy
  algorithm: addr:radix
  items: 0, size: 296
 --- table(1), set(1) ---
  kindex: 3, type: addr
  references: 1, valtype: legacy
  algorithm: addr:radix
  items: 0, size: 296
 --- table(1), set(1) ---
  kindex: 2, type: addr
  references: 0, valtype: legacy
  algorithm: addr:radix
  items: 0, size: 296
 --- table(1), set(1) ---
  kindex: 1, type: addr
  references: 0, valtype: legacy
  algorithm: addr:radix
  items: 0, size: 296
#
14:09:44 - r332771
(23 hours 1 minute ago)
by markj
Affects: 
(4 files)
/head/sys/vm/*
Initialize marker pages in vm_page_domain_init().

They were previously initialized by the corresponding page daemon
threads, but for vmd_inacthead this may be too late if
vm_page_deactivate_noreuse() is called during boot.

Reported and tested by: cperciva
Reviewed by: alc, kib
MFC after: 1 week
13:37:59 - r332770
(23 hours 33 minutes ago)
by rrs
Affects: 
(13 files)
/head/sys/conf/*
/head/sys/netinet/*
/head/sys/sys/*
This commit brings in the TCP high precision timer system (tcp_hpts).
It is the forerunner/foundational work of bringing in both Rack and BBR
which use hpts for pacing out packets. The feature is optional and requires
the TCPHPTS option to be enabled before the feature will be active. TCP
modules that use it must assure that the base component is compile in
the kernel in which they are loaded.

MFC after: Never
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D15020
12:50:49 - r332769
(1 day ago)
by emaste
Affects:  /head/usr.bin/chpass/util.c
chpass: reject change/expiry dates beyond y2106

The pwd.db and spwd.db files store the change and expire dates as
unsigned 32-bit ints, which overflow in 2106. Reject larger values for
now, until the introduction of a v5 password database.

i386 has 32-bit time_t and so dates beyond y2038 are already rejected by
mktime.

PR: 227589
Reviewed by: lidl
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
10:16:39 - r332768
(1 day 2 hours ago)
by ae
Affects: 
(3 files)
/stable/11/sys/netpfil/ipfw/nat64/nat64stl.h
/stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c
MFC r332459:
  Fix integer types mismatch for flags field in nat64stl_cfg structure.

  Also preserve internal flags on NAT64STL reconfiguration.
10:15:11 - r332767
(1 day 2 hours ago)
by ae
Affects: 
(4 files)
/stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c
/stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h
/stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c
MFC r332457:
  Use cfg->nomatch_verdict as return value from NAT64LSN handler when
  given mbuf is considered as not matched.

  If mbuf was consumed or freed during handling, we must return
  IP_FW_DENY, since ipfw's pfil handler ipfw_check_packet() expects
  IP_FW_DENY when mbuf pointer is NULL. This fixes KASSERT panics
  when NAT64 is used with INVARIANTS. Also remove unused nomatch_final
  field from struct nat64lsn_cfg.

  Reported by: Justin Holcomb <justin at justinholcomb dot me>
10:13:28 - r332766
(1 day 2 hours ago)
by ae
Affects: 
(3 files)
/stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c
/stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h
MFC r332456:
  Migrate NAT64 to FIB KPI.
10:11:39 - r332765
(1 day 2 hours ago)
by ae
Affects: 
(3 files)
/stable/11/sys/netpfil/ipfw/ip_fw_table_algo.c
/stable/11/sys/netpfil/ipfw/nat64/nat64stl.c
MFC r316825:
  Use address of specific union member instead of whole union address to
  fix PVS-Studio warnings.

MFC r316826:
  Avoid undefined behavior.

  The 'pktid' variable is modified while being used twice between
  sequence points, probably due to htonl() is macro.
10:08:28 - r332764
(1 day 3 hours ago)
by ae
Affects: 
(2 files)
/stable/11/sbin/ipfw/ipv6.c
MFC r332451:
  Fix indenting in ipv6.c file, use tabs instead of mixing tabs and spaces.
10:06:53 - r332763
(1 day 3 hours ago)
by ae
Affects: 
(4 files)
/stable/11/sbin/ipfw/ipfw2.c
/stable/11/sbin/ipfw/ipfw2.h
/stable/11/sbin/ipfw/ipv6.c
MFC r332449:
  Remove printing of "not" keyword from print_ip6() function.

  After r331668 handling of F_NOT flag done in one place by
  print_instruction() function. Also remove unused argument from
  print_ip[6]() functions.
10:05:12 - r332762
(1 day 3 hours ago)
by ae
Affects: 
(2 files)
/stable/11/sbin/ipfw/ipfw2.c
MFC r332448:
  Remove printing of "not" keyword from print_ip() function.

  After r331668 handling of F_NOT flag done in one place by
  print_instruction() function.
08:56:54 - r332761
(1 day 4 hours ago)
by avg
Affects:  /stable/11/sys/x86/x86/cpu_machdep.c
fix pc98 compilation issue in r332760

pc98 GENERIC still doesn't build, but at least there would be fewer
issues to fix.
07:15:40 - r332760
(1 day 5 hours ago)
by avg
Affects: 
(4 files)
/stable/11/sys/amd64/amd64/vm_machdep.c
/stable/11/sys/i386/i386/vm_machdep.c
/stable/11/sys/x86/x86/cpu_machdep.c
MFC r331878: unify amd64 and i386 cpu_reset() in x86/cpu_machdep.c

stable/11 note: PC98 support was removed in head, so in this branch it
needed to be handled directly
06:20:53 - r332759
(1 day 6 hours ago)
by avg
Affects: 
(3 files)
/stable/10/sys/amd64/amd64/vm_machdep.c
/stable/10/sys/i386/i386/vm_machdep.c
MFC r331875: x86 cpu_reset: if failed to switch to BSP proceed to cpu_reset_real
06:18:21 - r332758
(1 day 6 hours ago)
by avg
Affects: 
(3 files)
/stable/11/sys/amd64/amd64/vm_machdep.c
/stable/11/sys/i386/i386/vm_machdep.c
MFC r331875: x86 cpu_reset: if failed to switch to BSP proceed to cpu_reset_real
06:13:41 - r332757
(1 day 6 hours ago)
by avg
Affects: 
(3 files)
/stable/10/sys/amd64/amd64/vm_machdep.c
/stable/10/sys/i386/i386/vm_machdep.c
MFC r331874: x86 cpu_reset_proxy: no need to stop_cpus() the original processor
06:09:10 - r332756
(1 day 7 hours ago)
by avg
Affects: 
(3 files)
/stable/11/sys/amd64/amd64/vm_machdep.c
/stable/11/sys/i386/i386/vm_machdep.c
MFC r331874: x86 cpu_reset_proxy: no need to stop_cpus() the original processor
06:03:50 - r332755
(1 day 7 hours ago)
by avg
Affects: 
(4 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c
/stable/11/sys/kern/vfs_subr.c
/stable/11/sys/sys/refcount.h
MFC r331666: ZFS vn_rele_async: catch up with the use of refcount(9) for the
vnode use count

It's not sufficient nor required to use the vnode interlock when
checking if we are going to drop the last use count as the code in
vputx() uses refcount (atomic) operations for both checking and
decrementing the use code. Apply the same method to vn_rele_async().
While here, remove vn_rele_inactive(), a wrapper around vrele() that
didn't add any value.

Also, the change required making vfs_refcount_release_if_not_last()
public. I've made vfs_refcount_acquire_if_not_zero() public as well.
They are in sys/refcount.h now. While making the move I've dropped the
vfs_ prefix.

Sponsored by: Panzura
05:52:47 - r332754
(1 day 7 hours ago)
by avg
Affects: 
(3 files)
/stable/10/sbin/mount/mount.8
/stable/10/sys/kern/vfs_mount.c
MFC r331616: vfs_donmount: in certain cases try r/o mount if r/w mount fails

If the operation is not an update, if neither r/w nor r/o mode is
explicitly requested, if the error code hints at the possibility of the
media being read-only, and if the fallback is allowed, then we can try
to automatically downgrade to the readonly mode.

This is especially useful for auto-mounting of removable media that
sometimes can happen to be write-protected.

The fallback to r/o is not enabled by default. It can be requested on a
per-mount basis with a new mount option, 'autoro'. Or it can be
globally allowed by setting vfs.default_autoro.

stable/10 note: this branch does not have SYSCTL_BOOL, so SYSCTL_INT is
used instead.

Relnotes: yes
05:37:32 - r332753
(1 day 7 hours ago)
by avg
Affects: 
(3 files)
/stable/11/sbin/mount/mount.8
/stable/11/sys/kern/vfs_mount.c
MFC r331616: vfs_donmount: in certain cases try r/o mount if r/w mount fails

If the operation is not an update, if neither r/w nor r/o mode is
explicitly requested, if the error code hints at the possibility of the
media being read-only, and if the fallback is allowed, then we can try
to automatically downgrade to the readonly mode.

This is especially useful for auto-mounting of removable media that
sometimes can happen to be write-protected.

The fallback to r/o is not enabled by default. It can be requested on a
per-mount basis with a new mount option, 'autoro'. Or it can be
globally allowed by setting vfs.default_autoro.

Relnotes: yes
05:06:56 - r332752
(1 day 8 hours ago)
by avg
Affects: 
(4 files)
/head/sys/*
set kdb_why to "trap" when calling kdb_trap from trap_fatal

This will allow to hook a ddb script to "kdb.enter.trap" event.
Previously there was no specific name for this event, so it could only
be handled by either "kdb.enter.unknown" or "kdb.enter.default" hooks.
Both are very unspecific.

Having a specific event is useful because the fatal trap condition is
very similar to panic but it has an additional property that the current
stack frame is the frame where the trap occurred. So, both a register
dump and a stack bottom dump have additional information that can help
analyze the problem.

I have added the event only on architectures that have trap_fatal()
function defined. I haven't looked at other architectures. Their
maintainers can add support for the event later.

Sample script:
kdb.enter.trap=bt; show reg; x/aS $rsp,20; x/agx $rsp,20

Reviewed by: kib, jhb, markj
MFC after: 11 days
Sponsored by: Panzura
Differential Revision: https://reviews.freebsd.org/D15093
03:31:41 - r332751
(1 day 9 hours ago)
by kevans
Affects:  /head/stand/efi/boot1/boot1.c
/head/stand/efi/loader/framebuffer.c
efi loader: Address two nits with recent graphics changes

- We should be setting a known graphics mode on conout, but we aren't.
- We shouldn't be setting gop mode if we didn't find a good resolution to
  set, but we were. This made efi_max_resolution=1x1 effectively worthless,
  since it would always set gop mode 0 if nothing else.
02:50:15 - r332750
(1 day 10 hours ago)
by pfg
Affects: 
(3 files)
/stable/10/sys/fs/ext2fs/ext2_lookup.c
/stable/10/sys/ufs/ufs/ufs_vnops.c
MFC r328957:
{ext2|ufs}_readdir: Avoid setting negative ncookies.

ncookies cannot be negative or the allocator will fail. This should only
happen if a caller is very broken but we can still try to survive the
event.

We should probably also verify for uio_resid > MAXPHYS but in that case
it is not clear that just clipping the ncookies value is an adequate
response.
02:47:21 - r332749
(1 day 10 hours ago)
by pfg
Affects: 
(3 files)
/stable/11/sys/fs/ext2fs/ext2_lookup.c
/stable/11/sys/ufs/ufs/ufs_vnops.c
MFC r328957:
{ext2|ufs}_readdir: Avoid setting negative ncookies.

ncookies cannot be negative or the allocator will fail. This should only
happen if a caller is very broken but we can still try to survive the
event.

We should probably also verify for uio_resid > MAXPHYS but in that case
it is not clear that just clipping the ncookies value is an adequate
response.
01:15:19 - r332748
(1 day 11 hours ago)
by kevans
Affects: 
(6 files)
/stable/11/stand/efi/include/*
/stable/11/stand/efi/libefi/*
/stable/11/stand/efi/loader/main.c
MFC r332416: Refactor currdev setting

Refactor the currdev setting to find the device we booted from. Limit
searching when we don't already have a reasonable currdev from that to
the same device only. Search a little harder for ZFS volumes as that's
needed for loader.efi to live on an ESP.
01:14:01 - r332747
(1 day 11 hours ago)
by kevans
Affects: 
(2 files)
/stable/11/usr.sbin/cron/cron/database.c
MFC r332429, r332431

r332429:
cron(8): Reload database if an existing job in cron.d changed as well

Directory mtime will only change if a file is added or removed, not
modified. For /var/cron/tabs, this is fine because of how crontab(1) manages
it using temp files so all crontab(1) changes will trigger a reload of the
database.

For /etc/cron.d and /usr/local/etc/cron.d, this is not necessarily the case.
Instead of checking their mtime, we should descend into them and check mtime
on all jobs also.

r332431:
cron(8): Correct test sense

We're about to use the result of fstat(2) either way, so don't do that if it
fails...
01:10:53 - r332746
(1 day 12 hours ago)
by kevans
Affects: 
(6 files)
/stable/11/stand/efi/boot1/*
MFC r332561,r332573: Rename volume label for ESP

MFC r332561: Rename volume label for ESP

Harry Schmalzbauer reports that some firmware, in his experience, trips
over the ESP we install due to the volume label. It has been theorized that
this is due to some confusion with the label and the path on the ESP to
boot1.efi.

Regardless, Harry found that renaming the label seems to fix it.

MFC r332573: Regenerate FAT templates after r332561

PR: 214282
00:50:51 - r332745
(1 day 12 hours ago)
by emaste
Affects: 
(2 files)
/stable/10/sys/dev/vt/font/vt_font_default.c
MFC r332452: Update vt(4) "Terminus BSD Console" font to v4.46

"Terminus BSD Console" is a derivative of Terminus that is provided
by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the
FreeBSD vt(4) console and other BSDs.

PR: 227409
Sponsored by: The FreeBSD Foundation
00:40:34 - r332744
(1 day 12 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/dev/vt/font/vt_font_default.c
MFC r332452: Update vt(4) "Terminus BSD Console" font to v4.46

"Terminus BSD Console" is a derivative of Terminus that is provided
by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the
FreeBSD vt(4) console and other BSDs.

PR: 227409
Sponsored by: The FreeBSD Foundation
00:11:02 - r332743
(1 day 13 hours ago)
by jhb
Affects: 
(4 files)
/stable/10/sys/x86/x86/identcpu.c
/stable/11/sys/x86/x86/identcpu.c
MFC 331466:
Add a workaround to the hypervisor detection for older versions of KVM.

Originally KVM set %eax to 0 in the cpuid leaf 0x4000000 rather than
to the highest supported leaf in the hypervisor "branch". Detect this
case and fixup the %eax value so that the hypervisor is still
detected.
2018 - 04 - 18   (2 days ago)
23:08:10 - r332742
(1 day 14 hours ago)
by mckusick
Affects:  /head/tools/diag/prtblknos/main.c
/head/tools/diag/prtblknos/prtblknos.c
In addition to the existing argument format:

  prtblknos filesystem_device inode ...

add an additional argument format:

  prtblknos file

which is more convenient than figuring out the filesystem
and inode number for "file".

When given a list of multiple inodes, rather than exiting
the program on an error with one of them, skip over it and
continue with the next one.

Submitted by: bde
22:24:44 - r332741
(1 day 14 hours ago)
by mckusick
Affects:  /head/tools/diag/prtblknos/prtblknos.c
Check the inode type and only attempt to print block lists for
regular files, directories, and symbolic links that require
external storage.

Correct the handling of files with holes and files that have
one or more large blocks and end with a fragment.

Reported by: bde
21:31:13 - r332740
(1 day 15 hours ago)
by kib
Affects: 
(11 files)
/head/lib/libc/sys/procctl.2
/head/sys/*
/head/tests/sys/kern/*
Add PROC_PDEATHSIG_SET to procctl interface.

Allow processes to request the delivery of a signal upon death of
their parent process. Supposed consumer of the feature is PostgreSQL.

Submitted by: Thomas Munro
Reviewed by: jilles, mjg
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D15106
20:31:42 - r332739
(1 day 16 hours ago)
by mav
Affects: 
(4 files)
/stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8
/stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
/stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8
MFC r332641: MFV man pages update from r329502:
7614 zfs device evacuation/removal.
20:09:26 - r332738
(1 day 17 hours ago)
by kib
Affects:  /head/sys/i386/i386/pmap.c
Fix pmap_trm_alloc(M_ZERO).

Sponsored by: The FreeBSD Foundation
20:07:47 - r332737
(1 day 17 hours ago)
by kib
Affects:  /head/sys/i386/i386/trap.c
For fatal traps other than pagefaults, print raw fault error codes.

For pagefaults, the error is already decoded and printed.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
19:18:14 - r332736
(1 day 17 hours ago)
by cy
Affects: 
(8 files)
/stable/11/include/stdio.h
/stable/11/lib/libc/stdio/*
/stable/11/lib/libc/tests/stdio/*
MFC r331936, r331942, r331943, r331945, r331947, r331948

Add new gets_s(3) stdio function.

This implements the gets_s(3) function as documented at
http://en.cppreference.com/w/c/io/gets. It facilitates the
optional removal of gets(3).

Reviewed by: ed
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12785
18:45:34 - r332735
(1 day 18 hours ago)
by jhb
Affects:  /head/sys/x86/x86/msi.c
Fix two off-by-one errors when allocating MSI and MSI-X interrupts.

x86 enforces an (arbitray) limit on the number of available MSI and
MSI-X interrupts to simplify code (in particular, interrupt_source[]
is statically sized). This means that an attempt to allocate an MSI
vector needs to fail if it would go beyond the limit, but the checks
for exceeding the limit had an off-by-one error. In the case of MSI-X
which allocates interrupts one at a time this meant that IRQ 768 kept
getting handed out multiple times for msix_alloc() instead of failing
because all MSI IRQs were in use.

Tested by: lidl
MFC after: 1 week
18:45:04 - r332734
(1 day 18 hours ago)
by shurd
Affects: 
(4 files)
/stable/11/sys/kern/subr_witness.c
/stable/11/sys/net/bpf.c
/stable/11/sys/net/bpfdesc.h
MFC r332388:

Make BPF global lock an SX

This allows NIC drivers to sleep on polling config operations.

PR: 323477
Submitted by: Matthew Macy <mmacy@mattmacy.io>
Reviewed by: shurd
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D14982
18:36:26 - r332733
(1 day 18 hours ago)
by jhb
Affects:  /head/sys/dev/acpica/acpi_resource.c
Workaround fixed I/O port resources encoded as I/O port ranges in _CRS.

ACPI I/O port descriptors use _MIN and _MAX fields to specify the set
of allowable base (start) addresses for an I/O port resource along with
a _LEN field specifying the length. A fixed resource is supposed to be
encoded with _MIN == _MAX, but some buggy firmwares instead set _MAX to
the end of the fixed range. Relocating I/O ranges only make sense in
_PRS (possible resource settings), not in _CRS (current resource settings),
so if an I/O port range with _MAX set set to the end of the range is
present in _CRS, treat it as a fixed I/O port resource starting at
_MIN.

PR: 224096
Submitted by: Harald Böhm <harald@boehm.codes>
Pointy hat to: jhb (taking so long to actually commit this)
MFC after: 1 week
16:27:06 - r332732
(1 day 20 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Fix a typo.

Submitted by: adamw
Sponsored by: The FreeBSD Foundation
16:22:23 - r332731
(1 day 20 hours ago)
by gjb
Affects: 
(4 files)
/stable/10/etc/rc.d/growfs
/stable/11/etc/rc.d/growfs
MFC r326278 (manu):

 growfs: Commit the changes after expanding the partition

 This fix the problem in arm snapshot present since at least 6 months
 where growfs was failing at firstboot and dropped you in a single
 user shell.

Note: In addition to this merge, kern.geom.part.mbr.enforce_chs has
been enabled on the build machine to mitigate against the issue in
the PR referenced.

PR: 226536
Sponsored by: The FreeBSD Foundation
15:44:54 - r332730
(1 day 21 hours ago)
by avg
Affects:  /head/sys/amd64/amd64/trap.c
/head/sys/i386/i386/trap.c
/head/sys/powerpc/powerpc/trap.c
don't check for kdb reentry in trap_fatal(), it's impossible

trap() checks for it earlier and calls kdb_reentry().

Discussed with: jhb
MFC after: 12 days
Sponsored by: Panzura
15:34:18 - r332729
(1 day 21 hours ago)
by shurd
Affects:  /head/sys/net/iflib.c
iflib: Fix queue distribution when there are no threads

Previously, if there are no threads, all queues which targeted
cores that share an L2 cache were bound to a single core. The intent is
to distribute them across these cores.

Reported by: olivier
Reviewed by: sbruno
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15120
14:55:01 - r332728
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Fix an incomplete sentence.

Submitted by: markj
Sponsored by: The FreeBSD Foundation
14:43:33 - r332727
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r325473, rsh(1) '-N' flag addition.

Sponsored by: The FreeBSD Foundation
14:43:32 - r332726
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r328716, new nvmecontrol(8) WDC-specific control options.

Sponsored by: The FreeBSD Foundation
14:43:31 - r332725
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r328668, nvmecontrol(8) SMART data returned in a numeric
value instead of a hex value.

Sponsored by: The FreeBSD Foundation
14:43:30 - r332724
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r331603, sysctl(8) support for setting multiple values to
a multi-value node.

Sponsored by: The FreeBSD Foundation
14:43:29 - r332723
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r322910, umount(8) '-N' flag addition.

Sponsored by: The FreeBSD Foundation
14:43:28 - r332722
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r326413, pfctl(8) route-to properly handles interfaces with
multiple IP addresses.

Sponsored by: The FreeBSD Foundation
14:43:27 - r332721
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r327592, mdmfs(8) tmpfs(5) support.

Sponsored by: The FreeBSD Foundation
14:43:26 - r332720
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r331729, ifconfig(8) random MAC address generation.

Sponsored by: The FreeBSD Foundation
14:43:25 - r332719
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r328604, fsck_ffs(8) exit with non-zero status if filesystem
is not repaired.

Sponsored by: The FreeBSD Foundation
14:43:24 - r332718
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r324674, fsck_ffs(8) no longer reports a filesystem as
'modified' if only the timestamp in the superblock changed.

Sponsored by: The FreeBSD Foundation
14:43:23 - r332717
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r330692, dhclient(8) RFC2131 compliance fix.

Sponsored by: The FreeBSD Foundation
14:43:22 - r332716
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r326778, camcontrol(8) ZAC device type output.

Sponsored by: The FreeBSD Foundation
14:43:21 - r332715
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r328599, service(8) '-j' flag addition.

Sponsored by: The FreeBSD Foundation
14:43:20 - r332714
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r330307, cxgbe(4) firmware version 1.16.63.0.

Sponsored by: The FreeBSD Foundation
14:43:19 - r332713
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r327871, cpucontrol(8) CPU feature re-evaluation ('-e').

Sponsored by: The FreeBSD Foundation
14:43:18 - r332712
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r324380, cpucontrol(8) '-n' flag addition.

Sponsored by: The FreeBSD Foundation
14:43:17 - r332711
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r322254, bsdinstall(8) UEFI-only boot on arm64.

Sponsored by: The FreeBSD Foundation
14:43:16 - r332710
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r321413, bhyve virtio_console(4) support.

Sponsored by: The FreeBSD Foundation
14:43:15 - r332709
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r321241, crontab(1) '-f' flag added.

Sponsored by: The FreeBSD Foundation
14:43:14 - r332708
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r321287, sesutil(8) libxo(3) support.

Sponsored by: The FreeBSD Foundation
14:43:13 - r332707
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r330694, "@" and "!" now allowed in GECOS fields.

Sponsored by: The FreeBSD Foundation
14:43:12 - r332706
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r326848, pw(8) expiration handling fix.

Sponsored by: The FreeBSD Foundation
14:43:11 - r332705
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r322919, pw(8) 'usermod' update to handle empty secondary
group lists (-G '').

Sponsored by: The FreeBSD Foundation
14:43:10 - r332704
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r321262, newsyslog(8) RFC5424-compliant log rotation
messages.

Sponsored by: The FreeBSD Foundation
14:43:09 - r332703
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
/stable/11/release/doc/share/xml/sponsor.ent
Document r331586, mlx5io(4) and mlx5tool(8) additions.

Sponsored by: The FreeBSD Foundation
14:43:08 - r332702
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Fix the revision efibootmgr(8) was merged to stable/11.

Sponsored by: The FreeBSD Foundation
14:43:07 - r332701
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r326725, efibootmgr(8) addition.

Sponsored by: The FreeBSD Foundation
14:43:06 - r332700
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r321929, diskinfo(8) '-s' also includes the device model.

Sponsored by: The FreeBSD Foundation
14:43:05 - r332699
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r321927, diskinfo(8) '-s' and '-p' flag additions.

Sponsored by: The FreeBSD Foundation
14:43:04 - r332698
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r325003, diskinfo(8) rotation rate and TRIM/UNMAP support
displayed.

Sponsored by: The FreeBSD Foundation
14:43:03 - r332697
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r329114, GELI passphrase length no longer visible during
boot by default.

Sponsored by: The FreeBSD Foundation
14:43:02 - r332696
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r322172, libxo(3) 0.8.4.

Sponsored by: The FreeBSD Foundation
14:43:01 - r332695
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r330106, NTP 4.2.8p11.

Sponsored by: The FreeBSD Foundation
14:43:00 - r332694
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r324581, mandoc(1) 1.14.3.

Sponsored by: The FreeBSD Foundation
14:42:59 - r332693
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r321303, libarchive(3) 3.3.2.

Sponsored by: The FreeBSD Foundation
14:42:58 - r332692
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r328874, file(1) 5.32.

Sponsored by: The FreeBSD Foundation
14:42:57 - r332691
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r322442, subversion 1.9.7.

Sponsored by: The FreeBSD Foundation
14:42:56 - r332690
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r327234, tcpdump(1) 4.9.2.

Sponsored by: The FreeBSD Foundation
14:42:55 - r332689
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r331662, tzdata version 2018d.

Sponsored by: The FreeBSD Foundation
14:42:54 - r332688
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r331500, TIAO USB multi-protocol adapter support.

Sponsored by: The FreeBSD Foundation
14:42:53 - r332687
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r326892, Amazon EC2 instances now use Amazon Time Sync
Service, NTP service internal to the EC2 infrastructure.

Sponsored by: The FreeBSD Foundation
14:42:52 - r332686
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r323136 which I overlooked, OpenSSH 7.5p1.

Sponsored by: The FreeBSD Foundation
14:42:51 - r332685
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r323134, OpenSSH version 7.4p1.

Sponsored by: The FreeBSD Foundation
14:42:50 - r332684
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r331638, OpenSSL 1.0.2o.

Sponsored by: The FreeBSD Foundation
14:42:49 - r332683
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r321092, ln(1) '-F' behavior fixed.

Sponsored by: The FreeBSD Foundation
14:42:48 - r332682
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r324270, ps(1) realtime and idle priorities in state flags.

Sponsored by: The FreeBSD Foundation
14:42:47 - r332681
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r324271, ps(1) capsicum capability mode state information.

Sponsored by: The FreeBSD Foundation
14:42:46 - r332680
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r328140, df(1) '--si' alias to '-H'.

Sponsored by: The FreeBSD Foundation
14:42:45 - r332679
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r331471, ps(1) 'jail' keyword.

Sponsored by: The FreeBSD Foundation
14:42:44 - r332678
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r330570, less(1) v530.

Sponsored by: The FreeBSD Foundation
14:42:43 - r332677
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r331246, bmake version 20180222.

Sponsored by: The FreeBSD Foundation
14:42:42 - r332676
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r331838, clang, lld, lldb, llvm, etc. update to 6.0.0.

Sponsored by: The FreeBSD Foundation
14:42:41 - r332675
(1 day 22 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Initial pruning of the relnotes page post-11.1-RELEASE.

Sponsored by: The FreeBSD Foundation
14:34:33 - r332674
(1 day 22 hours ago)
by gjb
Affects: 
(4 files)
/head/release/arm/*
Increase the msdosfs partition size on arm SoC images where the
current size may not be sufficiently large for development and/or
testing.

PR: 227548
Submitted by: trasz
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
14:02:37 - r332673
(1 day 23 hours ago)
by emaste
Affects:  /head/tools/tools/README
Remove mention of tools/recoverdisk, now in sbin

PR: 227570
MFC after: 3 days
13:58:42 - r332672
(1 day 23 hours ago)
by br
Affects:  /head/share/mk/bsd.cpu.mk
Set correct float abi (float abi double) for hard-float build, so
__riscv_float_abi_double macro will be defined by compiler.

The options are:
o lp64 __riscv_float_abi_soft
o lp64f __riscv_float_abi_single
o lp64d __riscv_float_abi_double

Sponsored by: DARPA, AFRL
13:17:14 - r332671
(1 day 23 hours ago)
by lidl
Affects: 
(4 files)
/head/contrib/top/*
top: fix warnings from clang/gcc

Add includes for <curses.h> and <termcap.h> where necessary, and
rename a few internal functions to have a "top_" prefix to avoid
clashes with standard names from curses.h/termcap.h headers.

Top now compiles without warnings on both gcc and clang.

Reviewed by: emaste, imp, jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D15115
12:56:17 - r332670
(2 days ago)
by pho
Affects:  /user/pho/stress2/misc/crossmp10.sh
Added problem found, added missung umount(8) and style fixes.

Sponsored by: Dell EMC Isilon
11:35:22 - r332669
(2 days 1 hour ago)
by pho
Affects:  /user/pho/stress2/misc/crossmp9.sh
Fix umount(8) mistake. Styles fixes.

Sponsored by: Dell EMC Isilon
11:31:16 - r332668
(2 days 1 hour ago)
by pho
Affects:  /user/pho/stress2/misc/crossmp8.sh
Added missing umount(8) and style fixes.
11:28:16 - r332667
(2 days 1 hour ago)
by pho
Affects:  /user/pho/stress2/misc/crossmp4.sh
Added missing exit.

Sponsored by: Dell EMC Isilon
11:27:22 - r332666
(2 days 1 hour ago)
by pho
Affects:  /user/pho/stress2/misc/crossmp3.sh
Added missing umounts @ exit. Style fixes.

Sponsored by: Dell EMC Isilon
11:24:57 - r332665
(2 days 1 hour ago)
by pho
Affects:  /user/pho/stress2/misc/crossmp.sh
Style changes only.

Sponsored by: Dell EMC Isilon
11:02:19 - r332664
(2 days 2 hours ago)
by oshogbo
Affects:  /head/share/man/man9/cnv.9
Add missing argument in the cnv man page.

Reported by: Miłosz Kaniewski <milosz.kaniewski@gmail.com>
MFC after: 1 week
Sponsored by: Wheel Systems
05:58:27 - r332663
(2 days 7 hours ago)
by cperciva
Affects:  /head/release/tools/ec2.conf
Move debug.{trace,debugger}_on_panic and kern.panic_reboot_wait_time in
EC2 instances from sysctl.conf to loader.conf; these can all be set as
loader tunables, and setting them in loader.conf gives us the right
behaviour in the event of a kernel panic taking place prior to when
sysctl.conf is processed.

MFC after: 1 week
02:25:03 - r332662
(2 days 10 hours ago)
by allanjude
Affects:  /head/usr.sbin/iostat/iostat.c
Make `iostat -xC` print CPU information on its own line

Requested by: mahrens
Reviewed by: kenm (maintainer), mahrens
MFC after: 1 week
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D15076
2018 - 04 - 17   (3 days ago)
22:33:41 - r332661
(2 days 14 hours ago)
by benno
Affects:  /head/release/amd64/mkisoimages.sh
Generate hybrid ISO images for amd64.

This keeps the existing El Torito entries for BIOS and UEFI boot code and
adds a GPT in the ISO image's System Area containing boot code for BIOS that
will load /boot/loader from the ISO filesystem and execute it. We then use
etdump to find the EFI System Partition image in the El Torito catalog and
add an entry to the GPT that allows EFI to find it.

Reviewed by: gjb, imp
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D15051
22:30:00 - r332660
(2 days 14 hours ago)
by brooks
Affects:  /head/sys/sparc64/sparc64/trap.c
Remove references to fs_nofault_intr_begin/end.

These should have removed in r332656.

Reported by: mjg, lidl
19:39:47 - r332659
(2 days 17 hours ago)
by trasz
Affects:  /head/usr.sbin/usbconfig/usbconfig.8
/head/usr.sbin/usbconfig/usbconfig.c
Make it possible to pass the ugenX.Y to usbconfig(8) without using "-d",
eg "usbconfig ugen1.2 dump_all_desc".

Reviewed by: hselasky@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
18:49:17 - r332658
(2 days 18 hours ago)
by markj
Affects:  /head/sys/vm/vm_page.c
Ensure that m and skip_m belong to the same object.

Pages allocated from a given reservation may belong to different
objects. It is therefore possible for vm_page_ps_test() to be called
with the base page's object unlocked. Check for this case before
asserting that the object lock is held.

Reported by: jhb
Reviewed by: kib
MFC after: 1 week
18:07:40 - r332657
(2 days 19 hours ago)
by jhb
Affects: 
(7 files)
/head/etc/mtree/BSD.tests.dist
/head/sys/*
/head/tests/sys/*
Properly do a deep copy of the ioctls capability array for fget_cap().

fget_cap() tries to do a cheaper snapshot of a file descriptor without
holding the file descriptor lock. This snapshot does not do a deep
copy of the ioctls capability array, but instead uses a different
return value to inform the caller to retry the copy with the lock
held. However, filecaps_copy() was returning 1 to indicate that a
retry was required, and fget_cap() was checking for 0 (actually
'!filecaps_copy()'). As a result, fget_cap() did not do a deep copy
of the ioctls array and just reused the original pointer. This cause
multiple file descriptor entries to think they owned the same pointer
and eventually resulted in duplicate frees.

The only code path that I'm aware of that triggers this is to create a
listen socket that has a restricted list of ioctls and then call
accept() which calls fget_cap() with a valid filecaps structure from
getsock_cap().

To fix, change the return value of filecaps_copy() to return true if
it succeeds in copying the caps and false if it fails because the lock
is required. I find this more intuitive than fixing the caller in
this case. While here, change the return type from 'int' to 'bool'.

Finally, make filecaps_copy() more robust in the failure case by not
copying any of the source filecaps structure over. This avoids the
possibility of leaking a pointer into a structure if a similar future
caller doesn't properly handle the return value from filecaps_copy()
at the expense of one more branch.

I also added a test case that panics before this change and now passes.

Reviewed by: kib
Discussed with: mjg (not a fan of the extra branch)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D15047
18:04:28 - r332656
(2 days 19 hours ago)
by brooks
Affects: 
(18 files)
/head/ObsoleteFiles.inc
/head/share/man/man9/*
/head/sys/*
Remove the unused fuwintr() and suiwintr() functions.

Half of implementations always failed (returned (-1)) and they were
previously used in only one place.

Reviewed by: kib, andrew
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15102
17:23:47 - r332655
(2 days 19 hours ago)
by cem
Affects:  /head/lib/libmd/mdXhl.c
libmd: Remove trailing whitespace from mdXhl.c

No functional change.

Reported by: me, in a CR from three years ago today
Sponsored by: Dell EMC Isilon
17:20:04 - r332654
(2 days 19 hours ago)
by brooks
Affects:  /head/share/man/man9/copy.9
/head/sys/arm/arm/copystr.S
/head/sys/mips/mips/support.S
Remove unused implementations of copyoutstr().

Also remove the commented out documentation. The documentation arrived
with the import of the copy.9 manpage. I suspect the implementations
came from NetBSD while bootstrapping the Arm and MIPS ports.

Reviewed by: andrew, jmallett
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15108
16:51:27 - r332653
(2 days 20 hours ago)
by gallatin
Affects:  /head/sys/dev/ixgbe/if_ix.c
Restore SIOCGI2C functionality to ixgbe

When ixgbe was converted to iflib, it lost the SIOCGI2C support
that allows ifconfig to print SFP state, optical light levels, etc.
Restore this by plugging in to the ifdi_i2c_req iflib method. Note
that the sanity checking on dev_addr that used to be done in ixgbe is
now done in iflib.

Reviewed by: erj, Matthew Macy <mmacy@mattmacy.io>
Sponsored by: Netflix
16:46:08 - r332652
(2 days 20 hours ago)
by imp
Affects:  /head/sys/conf/files
/head/sys/dev/puc/puc_pci.c
/head/sys/modules/puc/Makefile
Add PNP info to the PCI attahement of the puc driver.

Adjust sys/conf/files and sys/modules/puc/Makefile to omit
pucdata.c now tht it's included by puc_pci.c.

Submitted by: Lakhan Shiva Kamireddy (with build fixes by me)
Pull Request: https://github.com/freebsd/freebsd/pull/136
16:46:01 - r332651
(2 days 20 hours ago)
by imp
Affects:  /head/sys/dev/bce/if_bce.c
Add PNP info to the bce driver.

Submitted by: Lakhan Shiva Kamireddy
Pull Request: https://github.com/freebsd/freebsd/pull/136
16:36:53 - r332650
(2 days 20 hours ago)
by brooks
Affects:  /head/sys/kern/subr_prof.c
Stop using fuswintr() and suswintr() in the profiler.

Always take the AST path rather than calling MD functions which are
often implemented as always failing. The is the case on amd64, arm,
i386, and powerpc. This optimization (inherited from 4.4 Lite) is a
pessimization on those architectures and is the sole use of these
functions. They will be removed in a seperate commit.

Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15101
16:21:23 - r332649
(2 days 20 hours ago)
by emaste
Affects:  /head/lib/clang/include/lld/Common/Version.inc
lld: add a __FreeBSD_version-style identifier to version

This will faciliate a WITH_SYSTEM_LINKER option.

Reviewed by: dim
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15110
15:44:05 - r332648
(2 days 21 hours ago)
by imp
Affects:  /head/sys/ddb/db_command.c
Restore db_radix on parse error, otherwise we'll silently change it to
10 on a botched trace command.
15:34:08 - r332647
(2 days 21 hours ago)
by ken
Affects: 
(2 files)
/stable/11/sys/cam/scsi/scsi_sa.c
MFC r332458:
  ------------------------------------------------------------------------
  r332458 | ken | 2018-04-12 15:21:18 -0600 (Thu, 12 Apr 2018) | 34 lines

  Handle Programmable Early Warning for control commands in sa(4).

  When the tape position is inside the Early Warning area, the tape
  drive will return a sense key of NO SENSE, and an ASC/ASCQ of
  0x00,0x02, which means: End-of-partition/medium detected". If
  this was in response to a control command like WRITE FILEMARKS,
  we correctly translate this as informational status and return
  0 from saerror().

  Programmable Early Warning should be handled the same way, but
  we weren't handling it that way. As a result, if a PEW status
  (sense key of NO SENSE, ASC/ASCQ of 0x00,0x07, "Programmable early
  warning detected") came back in response to a WRITE FILEMARKS,
  we returned an error.

  The impact of this was that if an application was writing to a
  sa(4) device, and a PEW area was set (in the Device Configuration
  Extension subpage -- mode page 0x10, subpage 1), and a filemark
  needed to be written on close, we could wind up returning an error
  to the user on close because of a "failure" to write the filemarks.

  It actually isn't a failure, but rather just a status report from
  the drive, and shouldn't be treated as a failure.

  sys/cam/scsi/scsi_sa.c:
  For control commands in saerror(), treat asc/ascq 0x00,0x07
  the same as 0x00,{0-5} -- not an error. Return 0, since
  the command actually did succeed.

  Reported by: Dr. Andreas Haakh <andreas@haakh.de>
  Tested by: Dr. Andreas Haakh <andreas@haakh.de>
  Sponsored by: Spectra Logic
  ------------------------------------------------------------------------
15:29:32 - r332646
(2 days 21 hours ago)
by ram
Affects:  /head/sys/dev/ocs_fc/ocs_os.c
/head/sys/dev/ocs_fc/ocs_os.h
Moved opts-stack.h include before all other includes.

PR: 227446
Approved by: ken
MFC after: 3 days
12:54:58 - r332645
(3 days ago)
by gallatin
Affects: 
(5 files)
/head/sbin/ifconfig/*
Make lagg creation more fault tolerant

- Warn, don't exit, when SIOCSLAGGPORT returns an error.

When we exit with an error during lagg creation, a single
failed NIC (which no longer attaches) can prevent lagg
creation and other configuration, such as adding an IPv4
address, and thus leave a machine unreachable.

- Preserve non-EEXISTS errors for exit status from SIOCSLAGGPORT,
  in case scripts are looking for it. Hopefully this can be
  extended if other parts of ifconfig can allow a "soft" failure.

- Improve the warning message to mention what lagg and what
  member are problematic.

Reviewed by: jtl, glebius
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D15046
12:52:30 - r332644
(3 days ago)
by emaste
Affects: 
(2 files)
/stable/10/sys/dev/vt/hw/vga/vt_vga.c
MFC r332421: vt: add three more cp437 mappings for vga textmode

In UTF-8 locales mandoc uses a number of characters outside of the Basic
Latin group, e.g. from general punctuation or miscellaneous mathematical
symbols, and these rendered as ? in text mode.

This change adds (char, replacement, code point, description):

  – - U+2013 En Dash
  ⟨ < U+27E8 Mathematical Left Angle Bracket
  ⟩ > U+27E9 Mathematical Right Angle Bracket

This change addresses some common cases; there are others that still
need to be added after a more thorough review.

PR: 227409
Sponsored by: The FreeBSD Foundation
12:51:28 - r332643
(3 days ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/dev/vt/hw/vga/vt_vga.c
MFC r332421: vt: add three more cp437 mappings for vga textmode

In UTF-8 locales mandoc uses a number of characters outside of the Basic
Latin group, e.g. from general punctuation or miscellaneous mathematical
symbols, and these rendered as ? in text mode.

This change adds (char, replacement, code point, description):

  – - U+2013 En Dash
  ⟨ < U+27E8 Mathematical Left Angle Bracket
  ⟩ > U+27E9 Mathematical Right Angle Bracket

This change addresses some common cases; there are others that still
need to be added after a more thorough review.

PR: 227409
Sponsored by: The FreeBSD Foundation
09:05:46 - r332642
(3 days 4 hours ago)
by trasz
Affects: 
(12 files)
/head/contrib/bsnmp/snmpd/snmpmod.3
/head/lib/*
/head/share/man/*
Don't put multiple names on a single .Nm line. This fixes apropos(1)
output, from this:

strnlen, strlen, strlen,(3) - find length of string
│·······

... to this:

strlen, strnlen(3) - find length of string

PR: 223525
MFC after: 2 weeks
02:33:54 - r332641
(3 days 10 hours ago)
by mav
Affects:  /head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
/head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
/head/cddl/contrib/opensolaris/cmd/zpool/zpool.8
MFV man pages update from r329502: 7614 zfs device evacuation/removal.

MFC after: 3 days
02:18:04 - r332640
(3 days 10 hours ago)
by kevans
Affects: 
(38 files)
/stable/11/sys/geom/*
MFC r332387: Annotate geom modules with MODULE_VERSION

GEOM ELI may double ask the password during boot. Once at loader time, and
once at init time.

This happens due a module loading bug. By default GEOM ELI caches the
password in the kernel, but without the MODULE_VERSION annotation, the
kernel loads over the kernel module, even if the GEOM ELI was compiled into
the kernel. In this case, the newly loaded module
purges/invalidates/overwrites the GEOM ELI's password cache, which causes
the double asking.

This MFC commit differs slightly from head, due to pc98 removal. These
changes were trivial and should be obvious.
00:46:21 - r332639
(3 days 12 hours ago)
by emaste
Affects: 
(5 files)
/stable/11/release/*
MFC r332390: make-memstick.sh: put partition args on separate lines

This makes it easier to identify the individual partition types and
facilitates comparisons across architectures.

Sponsored by: The FreeBSD Foundation
00:03:32 - r332638
(3 days 13 hours ago)
by mckusick
Affects: 
(3 files)
/stable/11/lib/libufs/inode.c
/stable/11/lib/libufs/type.c
MFC of 332264, 332266, 332415:

Check for errors in libufs getino() and gracefully fail descriptor
upgrade request in ufs_disk_write().
2018 - 04 - 16   (4 days ago)
21:22:12 - r332637
(3 days 15 hours ago)
by tuexen
Affects: 
(2 files)
/stable/11/usr.bin/systat/sctp.c
MFC r332353:

Don't show the number of currently established SCTP associations,
since this is not monotonically increasing. It's number can be
derived from the other counters shown.
21:20:34 - r332636
(3 days 15 hours ago)
by tuexen
Affects: 
(3 files)
/stable/11/sys/netinet/sctp_usrreq.c
/stable/11/sys/netinet6/sctp6_usrreq.c
MFC r332273:
Fix a logical inversion bug.
Thanks to Irene Ruengeler for finding and reporting this bug.
21:18:44 - r332635
(3 days 15 hours ago)
by tuexen
Affects: 
(2 files)
/stable/11/sys/netinet/sctp_usrreq.c
MFC r332271:

Small cleanup, no functional change.
21:17:18 - r332634
(3 days 15 hours ago)
by tuexen
Affects: 
(2 files)
/stable/11/sys/netinet/sctp_input.c
MFC r332269:

Fix a signed/unsigned warning showing up for the userland stack
on some platforms.
Thanks to Felix Weinrank for reporting the issue.
20:45:21 - r332633
(3 days 16 hours ago)
by jhb
Affects: 
(4 files)
/stable/10/lib/libthr/thread/thr_cancel.c
/stable/11/lib/libthr/thread/thr_cancel.c
MFC 331324: Ensure thread library is initialized in pthread_testcancel().

Call _thr_check_init() before reading curthread in pthread_testcancel().

If a constructor in a library creates a semaphore via sem_init() and
then waits for it via sem_wait(), the program can core dump in
_pthread_testcancel() called from sem_wait(). This is because the
semaphore implementation lives in libc, so the library's constructors
can be run before libthr's constructors.

Sponsored by: DARPA / AFRL
19:33:04 - r332632
(3 days 17 hours ago)
by cem
Affects:  /head/usr.bin/quota/quota.c
quota(1): Fix calculation overflow and underflow

For very large quotas, do the multiplication as a 64 bit value to avoid
overflow.

For very small block sizes (smaller than DEV_BSIZE), multiple first
before dividing by block size to avoid underflow.

PR: 227496
Submitted by: Per Andersson <pa AT chalmers.se>
Sponsored by: Dell EMC Isilon
18:12:15 - r332631
(3 days 18 hours ago)
by asomers
Affects:  /head/sys/kern/vfs_aio.c
/head/tests/sys/aio/Makefile
/head/tests/sys/aio/lio_test.c
lio_listio: return EAGAIN instead of EIO when out of resources

This behavior is already documented by the man page, and suggested by POSIX.

Reviewed by: jhb
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D15099
18:07:51 - r332630
(3 days 19 hours ago)
by brooks
Affects: 
(4 files)
/head/lib/libifconfig/libifconfig_media.c
/head/sbin/*
Remove support for FDDI and token ring media types in userland utilities.

Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15077
17:43:26 - r332629
(3 days 19 hours ago)
by brooks
Affects:  /head/sys/mips/mips/support.S
Remove unused badaddr() function.

Reviewed by: jmallett
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15078
17:30:33 - r332628
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/tools/tools/syscall_timing/syscall_timing.c
MFC r325313:

Make syscall_timing(1) default to a temporary file when run without -p.
17:29:50 - r332627
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/tools/tools/syscall_timing/syscall_timing.c
MFC r325318:

Add benchmark for access(2).
17:28:59 - r332626
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/tools/tools/syscall_timing/syscall_timing.c
MFC r325316:

Add benchmark for getresuid(2) - three pointers, although only "output" ones,
and quite lightwait.

The purpose of this commit, and the previous one, is to be able to measure
overhead of pointer arguments - in case you're running a strange architecture
where pointers and integers are quite different things at the hardware level.
17:27:13 - r332625
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/tools/tools/syscall_timing/syscall_timing.c
MFC r325315:

Add select(2) benchmark. It takes four pointers; unfortunately it's
somewhat heavy.
17:26:32 - r332624
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/tools/tools/syscall_timing/syscall_timing.c
MFC r325314:

Add getpriority(2) benchmark; it's a lightweight syscall which does pretty
much nothing - just like getuid(2) - but takes arguments.
17:25:52 - r332623
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/tools/tools/syscall_timing/syscall_timing.c
MFC r325317:

Add bad_open benchmark, which measures failed opens by calling
open("", O_RDONLY);.
17:24:33 - r332622
(3 days 19 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/sys/cam/ctl/ctl_frontend_iscsi.c
/stable/11/sys/cam/ctl/ctl_frontend_iscsi.h
MFC r331013:

Fix iSCSI target crash on session reinstation.

The crash scenario goes like this: there's a thread waiting on "reinstate";
because it doesn't update the timeout counter it gets terminated by the
callout; at this point the maintenance thread starts the termination routine.
The first thread finishes waiting, proceeds to icl_conn_handoff(), and drops
the refcount, which allows the maintenance thread to free its resources. At
this point another thread receives a PDU. Boom.

PR: 222898, 219866
Sponsored by: playkey.net
17:22:52 - r332621
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/sys/dev/iscsi/iscsi.c
MFC r330937:

Fix typo in a warning message.
17:22:09 - r332620
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/iscsictl/iscsictl.c
MFC r330741:

Make iscsictl(1) display "Disabled" status for disabled sessions.
17:21:26 - r332619
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/sys/dev/iscsi/iscsi.c
MFC r330740:

Check for duplicates when modifying an iSCSI session. Previously we did
this check on open, but "iscsictl -M", or an iSCSI redirect received by
iscsid(8) could end up with two sessions with the same target name and
portal.
17:18:06 - r332618
(3 days 19 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/usr.bin/cpuset/cpuset.1
/stable/11/usr.bin/rctl/rctl.8
MFC r330024:

.Xr rctl(8) and cpuset(1).

PR: 225935
17:15:26 - r332617
(3 days 19 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/sys/amd64/linux/linux_ptrace.c
/stable/11/sys/dev/usb/storage/cfumass.c
MFC r328342:

Add SPDX identifiers to linux_ptrace.c and cfumass.c.
17:14:42 - r332616
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.sbin/iscsid/chap.c
MFC r328336:

Add missing SPDX identifier in iscsid(8).
17:13:54 - r332615
(3 days 19 hours ago)
by trasz
Affects: 
(6 files)
/stable/11/usr.sbin/uefisign/*
MFC r328335:

Add SPDX identifiers for uefisign(8) sources.
17:13:09 - r332614
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/sys/arm/conf/RPI-B
MFC r328195:

Add usb_template(4) to RPI-B kernel config. This is to support the USB OTG
functionality on Raspberry Pi 0.
17:12:18 - r332613
(3 days 19 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/sys/fs/nullfs/null_vfsops.c
MFC r327777:

Make nullfs properly report MNT_AUTOMOUNTED set on the nullfs mount itself,
instead of copying from the underlying filesystem.

PR: 224851
17:08:58 - r332612
(3 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/sys/dev/iscsi/icl_soft.c
MFC r326730:

Move the DIAGNOSTIC check for lost iSCSI PDUs from icl_conn_close()
to icl_conn_free(). It's perfectly valid for the counter to be non-zero
in the former.

Sponsored by: playkey.net
17:06:18 - r332611
(3 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/share/man/man5/autofs.5
MFC r326471:

Document autofs(6) sysctl variables.

PR: 219414
16:42:16 - r332610
(3 days 20 hours ago)
by asomers
Affects: 
(3 files)
/stable/10/usr.bin/tail/reverse.c
/stable/10/usr.bin/tail/tests/tail_test.sh
MFC r329606:

tail: fix "tail -r" for piped input that begins with '\n'

A subtle logic bug, probably introduced in r311895, caused tail to print the
first two lines of piped input in forward order, if the very first character
was a newline.

PR: 222671
Reported by: Jim Long <freebsd-bugzilla@umpquanet.com>, pprocacci@gmail.com
Sponsored by: Spectra Logic Corp
16:33:35 - r332609
(3 days 20 hours ago)
by asomers
Affects: 
(5 files)
/stable/11/libexec/tftpd/*
/stable/11/usr.bin/tftp/tftp.c
MFC r330710, r330718-r330720

r330710:
tftpd: Flush files as soon as they are fully received

On an RRQ, tftpd doesn't exit as soon as it's finished receiving a file.
Instead, it waits five seconds just in case the client didn't receive the
server's last ACK and decides to resend the final DATA packet.
Unfortunately, this created a 5 second delay from when the client thinks
it's done sending the file, and when the file is available for other
processes.

Fix this bug by closing the file as soon as receipt is finished.

PR: 157700
Reported by: Barry Mishler <barry_mishler@yahoo.com>

r330718:
tftpd: Verify world-writability for WRQ when using relative paths

tftpd(8) says that files may only be written if they already exist and are
publicly writable. tftpd.c verifies that a file is publicly writable if it
uses an absolute pathname. However, if the pathname is relative, that check
is skipped. Fix it.

Note that this is not a security vulnerability, because the transfer
ultimately doesn't work unless the file already exists and is owned by user
nobody. Also, this bug does not affect the default configuration, because
the default uses the "-s" option which makes all pathnames absolute.

PR: 226004

r330719:
tftpd: Abort on an WRQ access violation

On a WRQ (write request) tftpd checks whether the client has access
permission for the file in question. If not, then the write is prevented.
However, tftpd doesn't reply with an ERROR packet, nor does it abort.
Instead, it tries to receive the packet anyway.

The symptom is slightly different depending on the nature of the error. If
the target file is nonexistent and tftpd lacks permission to create it, then
tftpd will willingly receive the file, but not write it anywhere. If the
file exists but is not writable, then tftpd will fail to ACK to WRQ.

PR: 225996

r330720:
tftpd: reject unknown opcodes

If tftpd receives a command with an unknown opcode, it simply exits 1. It
doesn't send an ERROR packet, and the client will hang waiting for one. Fix
it.

PR: 226005
16:32:00 - r332608
(3 days 20 hours ago)
by asomers
Affects: 
(5 files)
/stable/11/etc/mtree/BSD.tests.dist
/stable/11/libexec/tftpd/Makefile
/stable/11/libexec/tftpd/tests/functional.c
MFC r330696, r330709, r330742, r331358

r330696:
Add some functional tests for tftpd(8)

tftpd(8) is difficult to test in isolation due to its relationship with
inetd. Create a test program that mimics the behavior of tftp(1) and
inetd(8) and verifies tftpd's response in several different scenarios.

These test cases cover all of the basic TFTP protocol, but not the optional
parts.

PR: 157700
PR: 225996
PR: 226004
PR: 226005
Differential Revision: https://reviews.freebsd.org/D14310

r330709:
Commit missing file from r330696

X-MFC-With: 330696

r330742:
tftpd: fix the build of tests on i386 after 330696

It's those darn printf format specifiers again

Reported by: cy, kibab
X-MFC-With: 330696

r331358:
tftpd: misc Coverity cleanup in the tests

A bunch of unchecked return values from open(2) and read(2)

Reported by: Coverity
CID: 1386900, 1386911, 1386926, 1386928, 1386932, 1386942
CID: 1386961, 1386979
X-MFC-With: 330696
16:29:48 - r332607
(3 days 20 hours ago)
by asomers
Affects: 
(2 files)
/stable/11/share/man/man9/g_bio.9
MFC r330627:

g_bio(9): fix a documentation oversight from r163870
16:28:23 - r332606
(3 days 20 hours ago)
by asomers
Affects: 
(2 files)
/stable/11/usr.sbin/spray/spray.c
MFC r330515:

spray: fix the spelling in an output string
16:27:08 - r332605
(3 days 20 hours ago)
by asomers
Affects: 
(3 files)
/stable/11/libexec/rpc.sprayd/Makefile
/stable/11/libexec/rpc.sprayd/sprayd.c
MFC r330514:

rpc.sprayd: raise WARNS to 6
16:25:42 - r332604
(3 days 20 hours ago)
by asomers
Affects: 
(3 files)
/stable/11/etc/mtree/BSD.tests.dist
/stable/11/tests/sys/net
MFC r329874:

Add tests for lagg(4) and other cloned network interfaces

Unfortunately, most of the tests are disabled because they fairly frequently
trigger panics.

Sponsored by: Spectra Logic Corp
16:24:36 - r332603
(3 days 20 hours ago)
by asomers
Affects: 
(6 files)
/stable/11/usr.sbin/mptutil/*
MFC r329845, r329872

r329845:
Fix numerous Coverity issues in mptutil

Most are memory or file descriptor leaks. Three were unannotated
fallthroughs in a switch/case statement. One was an integer overflow before
widen.

Reported by: Coverity
CID: 1007463 1007462 1007461 1007460 1007459 1007458 1007457
CID: 1006855 1006854 1006853 1006852 1006851 1006850 1006849
CID: 1006848 1006845 1006844 1006843 1006842 1006841 1006840
CID: 1006839 1006838 1006837 1006836 1006835 1006834 1006833
CID: 1006832 1006831 1006831 1006830 1006829 1008334 1008170
CID: 1008169 1008168
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D11013

r329872:
Delete copypasta

Reported by: rpokala
X-MFC-With: 329845
Sponsored by: Spectra Logic Corp
16:23:32 - r332602
(3 days 20 hours ago)
by asomers
Affects: 
(15 files)
/stable/11/sbin/dhclient/*
MFC r329754:

dhclient: raise WARNS to 4

Mostly const-correctness fixes. There were also some variable-shadowing,
unused variable, and a couple of sockaddr type-correctness changes. I also had
trouble with cast-align warnings. I was able to prove that one of them was a
false positive. But ultimately I had to disable the warning program-wide to
deal with the others.

Reviewed by: cem
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D14460
16:22:00 - r332601
(3 days 20 hours ago)
by trasz
Affects: 
(4 files)
/stable/11/sys/dev/iscsi/icl_conn_if.m
/stable/11/sys/dev/iscsi/icl_soft.c
/stable/11/sys/dev/iscsi/icl_wrappers.h
MFC r328341:

Add SPDX tags to iscsi(4).
16:20:39 - r332600
(3 days 20 hours ago)
by asomers
Affects: 
(3 files)
/stable/11/usr.bin/tail/reverse.c
/stable/11/usr.bin/tail/tests/tail_test.sh
MFC r329606:

tail: fix "tail -r" for piped input that begins with '\n'

A subtle logic bug, probably introduced in r311895, caused tail to print the
first two lines of piped input in forward order, if the very first character
was a newline.

PR: 222671
Reported by: Jim Long <freebsd-bugzilla@umpquanet.com>, pprocacci@gmail.com
Sponsored by: Spectra Logic Corp
16:20:21 - r332599
(3 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/share/man/man4/usb_template.4
MFC r328590:

Document the new hw.usb.template behaviour.
16:19:31 - r332598
(3 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/sys/dev/usb/usb_device.c
MFC r328589:

Make the handler routine for the hw.usb.template sysctl trigger the USB
host to reprobe the bus by switching the USB pull up resistors off and
back on. In other words - when FreeBSD is configured as a USB device,
changing the sysctl will be immediately noticed by the machine it's
connected to.

Relnotes: yes
Sponsored by: The FreeBSD Foundation
16:16:24 - r332597
(3 days 20 hours ago)
by trasz
Affects: 
(10 files)
/stable/11/usr.sbin/autofs/*
MFC r328338:

Add SPDX tags for automount(8) et al.
16:15:31 - r332596
(3 days 20 hours ago)
by trasz
Affects: 
(5 files)
/stable/11/sys/fs/autofs/*
MFC r328339:

Add SPDX tags to autofs(5).
16:14:05 - r332595
(3 days 20 hours ago)
by trasz
Affects: 
(4 files)
/stable/11/usr.sbin/ctld/chap.c
/stable/11/usr.sbin/ctld/isns.c
/stable/11/usr.sbin/ctld/uclparse.c
MFC r328337:

Add missing SPDX tags for ctld(8).
16:12:30 - r332594
(3 days 20 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/bin/ps/keyword.c
/stable/11/bin/ps/ps.1
MFC r326430:

Add "vmaddr" ps(1) keyword.
16:10:16 - r332593
(3 days 21 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/usr.bin/gprof/gprof.1
/stable/11/usr.sbin/kgmon/kgmon.8
MFC r326248:

.Xr pmcstat(8) from kgmon(8) and gprof(1).
16:06:27 - r332592
(3 days 21 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/share/man/man9/Makefile
MFC r325403:

Add missing MLINKS for disk_add_alias(9).
16:02:54 - r332591
(3 days 21 hours ago)
by kp
Affects: 
(2 files)
/stable/10/etc/rc.d/pf
MFC r331546:

pf: reload and resync do the same thing

The reload and resync commands for the startup script do exactly the same
thing, so implement one as a call to the other.
16:02:09 - r332590
(3 days 21 hours ago)
by kp
Affects: 
(2 files)
/stable/11/etc/rc.d/pf
MFC r331546:

pf: reload and resync do the same thing

The reload and resync commands for the startup script do exactly the same
thing, so implement one as a call to the other.
16:01:06 - r332589
(3 days 21 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/etc/autofs/special_media
MFC r329312 by eadler@:

etc: clean up trailing whitespace in autofs
15:59:51 - r332588
(3 days 21 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/etc/autofs/Makefile
/stable/11/etc/autofs/include_nis
MFC r326252:

Add /etc/autofs/include_nis, a non-rewriting NIS map.
15:58:53 - r332587
(3 days 21 hours ago)
by trasz
Affects: 
(4 files)
/stable/11/etc/autofs/Makefile
/stable/11/etc/autofs/include_nis
/stable/11/etc/autofs/include_nis_nullfs
MFC r326251:

Rename /etc/autofs/include_nis to /etc/autofs/include_nis_nullfs, to indicate
that this script provides nullfs map rewriting for local mounts.
15:58:02 - r332586
(3 days 21 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/etc/autofs/Makefile
MFC r326250:

Change formatting; no functional changes.
15:57:18 - r332585
(3 days 21 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/etc/autofs/Makefile
/stable/11/etc/autofs/include_nis
MFC r325392:

Add NIS automounter map, which supports rewriting of self-hosted locations
to make them nullfs.

PR: 221010
15:54:38 - r332584
(3 days 21 hours ago)
by trasz
Affects: 
(4 files)
/stable/11/etc/rc.d/automount
/stable/11/etc/rc.d/automountd
/stable/11/etc/rc.d/autounmountd
MFC r325400:

Make autofs(5) rc scripts run earlier, matching those for amd(8).

This helps when you have some daemons that need to access automounted shares.

PR: 221011
15:53:44 - r332583
(3 days 21 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.sbin/ctld/login.c
MFC r325390:

Use proper naming in a debug message.
15:52:52 - r332582
(3 days 21 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/tools/tools/fetchbench
MFC r325312:

Add fetchbench, a trivial HTTP benchmark based on fetch(1).
15:51:19 - r332581
(3 days 21 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/usr.sbin/usbconfig/usbconfig.8
/stable/11/usr.sbin/usbconfig/usbconfig.c
MFC r330875:

Add "usbconfig dump_all_desc", a subcommand to dump all device and config
descriptors.
15:50:10 - r332580
(3 days 21 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.sbin/usbconfig/usbconfig.8
MFC r327522:

Fix warnings from "mandoc -Tlint -Wwarning".
15:49:16 - r332579
(3 days 21 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.sbin/usbconfig/usbconfig.8
MFC r327382:

Improve usbconfig(8) manual page by adding descriptions for subcommands.
15:48:15 - r332578
(3 days 21 hours ago)
by trasz
Affects: 
(7 files)
/stable/11/sys/dev/usb/template/*
MFC r328219:

Add missing manufacturer/serial number string descriptors.
15:46:24 - r332577
(3 days 21 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/sys/dev/usb/template/usb_template_serialnet.c
MFC r328197:

Remove unused index.
15:44:03 - r332576
(3 days 21 hours ago)
by trasz
Affects: 
(4 files)
/stable/11/sys/dev/usb/template/usb_template_midi.c
/stable/11/sys/dev/usb/template/usb_template_phone.c
/stable/11/sys/dev/usb/template/usb_template_serialnet.c
MFC r328196:

Add missing SPDX tags; the rest of the license text is the same as in other
USB templates.
15:42:26 - r332575
(3 days 21 hours ago)
by trasz
Affects: 
(14 files)
/stable/11/share/man/man4/usb_template.4
/stable/11/sys/dev/usb/template/*
MFC r328194:

Add sysctls to control device side USB identifiers. This makes it
possible to change string and numeric vendor and product identifiers,
as well as anything else there might be to change for a particular
device side template, eg the MAC address.

Relnotes: yes
15:39:34 - r332574
(3 days 21 hours ago)
by trasz
Affects: 
(8 files)
/stable/11/sys/dev/usb/template/*
MFC r324626:

Replace some magic numbers in usb_template(4) code with #defines.
There should be no functional changes.
15:13:18 - r332573
(3 days 21 hours ago)
by kevans
Affects: 
(4 files)
/head/stand/efi/boot1/*
Regenerate FAT templates after r332561
15:07:19 - r332572
(3 days 22 hours ago)
by glebius
Affects: 
(2 files)
/stable/11/sys/vm/uma_core.c
Merge r331871:
  Handle a special case when a slab can fit only one allocation,
  and zone has a large alignment. With alignment taken into
  account uk_rsize will be greater than space in a slab. However,
  since we have only one item per slab, it is always naturally
  aligned.

  Code that will panic before this change with 4k page:

  z = uma_zcreate("test", 3984, NULL, NULL, NULL, NULL, 31, 0);
  uma_zalloc(z, M_WAITOK);

  A practical scenario to hit the panic is a machine with 56 CPUs
  and 2 NUMA domains, which yields in zone size of 3984 (on head).

PR: 227116
14:46:02 - r332571
(3 days 22 hours ago)
by lidl
Affects: 
(2 files)
/stable/11/contrib/blacklist/libexec/blacklistd-helper
MFC r328861: Update blacklist-helper to not emit messages from pf during
operation.

Use 'pfctl -k' when blocking a site to kill active tcp connections
from the blocked address.

Fix 'purge' operation for pf, which must dynamically determine which
filters have been created, so the filters can be flushed by name.
14:43:01 - r332570
(3 days 22 hours ago)
by markj
Affects: 
(128 files)
/user/markj/netdump/*
MFH at r332568.
14:42:25 - r332569
(3 days 22 hours ago)
by lidl
Affects: 
(2 files)
/stable/11/sys/sparc64/sparc64/stack_machdep.c
MFC r324512: Don't use a non-zero argument for __builtin_frame_address

Mirror the change made for powerpc64 in r323687. With this
change, gcc 6.4.0 can successfully compile and link a kernel
that runs on sparc64.
14:41:12 - r332568
(3 days 22 hours ago)
by markj
Affects:  /user/markj/netdump/sbin/dumpon/dumpon.8
/user/markj/netdump/sys/netinet/netdump/netdump_client.c
Don't attempt configuration when the interface is not up.

We need to interrogate the driver for its cluster size, which is
not available until the interface is configured.
14:39:34 - r332567
(3 days 22 hours ago)
by trasz
Affects: 
(5 files)
/stable/11/lib/libprocstat/*
/stable/11/usr.bin/procstat/*
MFC r324237:

Make procstat(1) recognize process descriptors, so that it shows
"P" instead of "?" in "procstat -af" output. Note that there are
still a few more DTYPE_* kinds we don't decode yet.

Sponsored by: DARPA, AFRL
14:39:04 - r332566
(3 days 22 hours ago)
by lidl
Affects: 
(8 files)
/stable/11/sys/cddl/dev/*
/stable/11/sys/mips/conf/ERL
/stable/11/sys/modules/dtrace/*
MFC r323206: Enable dtrace support for mips64 and the ERL kernel config

Turn on the required options in the ERL config file, and ensure
that the fbt module is listed as a dependency for mips in
the modules/dtrace/dtraceall/dtraceall.c file.
14:10:19 - r332565
(3 days 23 hours ago)
by tsoome
Affects:  /head/stand/common/commands.c
loader: cstyle cleanup of command.c

just clean it up. no functional changes intended.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D15087
13:52:40 - r332564
(3 days 23 hours ago)
by imp
Affects:  /head/sys/i386/i386/db_trace.c
Use bool instead of boolean_t here. No reason to use boolean_t.

Also, stop passing FALSE to a bool parameter.
13:52:23 - r332563
(3 days 23 hours ago)
by imp
Affects: 
(5 files)
/head/sys/*
No need to force md code to define a macro that's the same as
_BYTE_ORDER. Use that instead.
13:50:01 - r332562
(3 days 23 hours ago)
by kevans
Affects: 
(5 files)
/stable/11/usr.bin/dtc/*
MFC r332483:

dtc(1): Update to upstream 006664a

Highlights:

- Passing "-" to -o will now cause output to go to stdout
- Path-based syntactic sugar for overlays is now accepted. This looks like:

/dts-v1/;
/plugin/;

&{/soc} {
  sid: eeprom@1c14000 {
  compatible = "allwinner,sun8i-h3-sid";
  reg = <0x1c14000 0x400>;
  status = "okay";
  };
};
13:18:18 - r332561
(3 days 23 hours ago)
by kevans
Affects:  /head/stand/efi/boot1/generate-fat.sh
Rename volume label for ESP

Harry Schmalzbauer reports that some firmware, in his experience, trips
over the ESP we install due to the volume label. It has been theorized that
this is due to some confusion with the label and the path on the ESP to
boot1.efi.

Regardless, Harry found that renaming the label seems to fix it.

PR: 214282
MFC after: 3 days
12:46:14 - r332560
(4 days ago)
by tsoome
Affects:  /head/stand/common/commands.c
loader: make sure we do not return garbage from help_getnext

Since we do free subtopic and desc in help_getnext(), we need to set them also
NULL, so we make sure we dont get double free().

Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D15082
09:17:36 - r332559
(4 days 3 hours ago)
by avg
Affects:  /head/usr.sbin/mountd/mountd.c
mountd: fix a crash when getgrouplist reports too many groups

Previously the code only warned about the condition and then happily
proceeded to use the too large value resulting in the array
out-of-bounds access.

Obtained from: Panzura (Chuanbo Zheng)
MFC after: 10 days
Sponsored by: Panzura
08:41:44 - r332558
(4 days 4 hours ago)
by tsoome
Affects:  /head/stand/common/bootstrap.h
/head/stand/common/commands.c
loader: command_errmsg should be const

Use const char * for command_errmsg.
08:15:50 - r332557
(4 days 4 hours ago)
by tsoome
Affects:  /head/stand/common/commands.c
loader: make sure we use snprintf() in commands.c

Safeguard against memory corruptions.
08:03:18 - r332556
(4 days 5 hours ago)
by trasz
Affects:  /head/ObsoleteFiles.inc
Fix ObsoleteFiles.inc entry for libstand.3.

MFC after: 2 weeks
07:26:23 - r332555
(4 days 5 hours ago)
by tsoome
Affects:  /head/stand/common/commands.c
loader: provide values in help_getnext()

With r328289 we attempt to make sure we free the resources allocated in
help_getnext(), however, it is possible that we get no resources allocated
and help_getnext() will return early.

Make sure we have pointers set to NULL early in help_getnext().

Reported by: Andy Fiddaman
04:16:46 - r332554
(4 days 8 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c
MFC r331950: 9434 Speculative prefetch is blocked by device removal code.

Device removal code does not set spa_indirect_vdevs_loaded for pools
that never experienced device removal. At least one visual consequence
of it is completely blocked speculative prefetcher. This patch sets
the variable in such situations.
04:16:10 - r332553
(4 days 8 hours ago)
by mav
Affects: 
(3 files)
/stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
MFC r331713: MFV r331712:
9280 Assertion failure while running removal_with_ganging test with 4K devices

illumos/illumos-gate@243952c7eeef020886e3e2e3df99a513df40584a

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matt Ahrens <Matt.Ahrens@delphix.com>
04:15:25 - r332552
(4 days 8 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
MFC r331711: MFV 331710:
9188 increase size of dbuf cache to reduce indirect block decompression

illumos/illumos-gate@268bbb2a2fa79c36d4695d13a595ba50a7754b76

With compressed ARC (6950) we use up to 25% of our CPU to decompress indirect
blocks, under a workload of random cached reads. To reduce this decompression
cost, we would like to increase the size of the dbuf cache so that more
indirect blocks can be stored uncompressed.

If we are caching entire large files of recordsize=8K, the indirect blocks
use 1/64th as much memory as the data blocks (assuming they have the same
compression ratio). We suggest making the dbuf cache be 1/32nd of all memory,
so that in this scenario we should be able to keep all the indirect blocks
decompressed in the dbuf cache. (We want it to be more than the 1/64th that
the indirect blocks would use because we need to cache other stuff in the
dbuf cache as well.)

In real world workloads, this won't help as dramatically as the example
above, but we think it's still worth it because the risk of decreasing
performance is low. The potential negative performance impact is that we
will be slightly reducing the size of the ARC (by ~3%).

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Allan Jude <allanjude@freebsd.org>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>
04:14:42 - r332551
(4 days 8 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r331709: MFV r331708:
9321 arc_loan_compressed_buf() can increment arc_loaned_bytes by the wrong value

illumos/illumos-gate@9be12bd737714550277bd02b0c693db560976990

arc_loan_compressed_buf() increments arc_loaned_bytes by psize unconditionally
In the case of zfs_compressed_arc_enabled=0, when the buf is returned via
arc_return_buf(), if ARC_BUF_COMPRESSED(buf) is false, then arc_loaned_bytes
is decremented by lsize, not psize.

Switch to using arc_buf_size(buf), instead of psize, which will return
psize or lsize, depending on the result of ARC_BUF_COMPRESSED(buf).

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Allan Jude <allanjude@freebsd.org>
04:14:03 - r332550
(4 days 8 hours ago)
by mav
Affects: 
(10 files)
/stable/11/cddl/contrib/opensolaris/cmd/*
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/*
/stable/11/sys/cddl/contrib/opensolaris/*
MFC r331707: MFV r331706:
9235 rename zpool_rewind_policy_t to zpool_load_policy_t

illumos/illumos-gate@5dafeea3ebd2dd77affc802bcb90f63faf01589f

We want to be able to pass various settings during import/open of a pool,
which are not only related to rewind. Instead of adding a new policy and
duplicate a bunch of code, we should just rename rewind_policy to a more
generic term like load_policy.

For instance, we'd like to set spa->spa_import_flags from the nvlist,
rather from a flags parameter passed to spa_import as in some cases we want
those flags not only for the import case, but also for the open case. One
such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would
allow zfs to open a pool when logs are missing.

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
04:13:19 - r332549
(4 days 8 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
MFC r331705: MFV 331704:
9191 dump vdev tree to zfs_dbgmsg when spa load fails due to missing log devices

illumos/illumos-gate@ccef24b493bcbd146fcd6d8946666cae081470b6

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
04:11:48 - r332548
(4 days 8 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
MFC r331703: MFV 331702:
9187 racing condition between vdev label and spa_last_synced_txg in
vdev_validate

illumos/illumos-gate@d1de72cfa29ab77ff80e2bb0e668a6afa5bccaf0

ztest failed with uncorrectable IO error despite having the fix for #7163.
Both sides of the mirror have CANT_OPEN_BAD_LABEL, which also distinguishes
it from that issue.

Definitely seems like a racing condition between the vdev_validate and spa_sync:
1. Thread A (spa_sync): vdev label is updated to latest txg
2. Thread B (vdev_validate): vdev label's txg is compared to
spa_last_synced_txg and is ahead.
3. Thread A (spa_sync): spa_last_synced_txg is updated to latest txg.

Solution: do not check txg in vdev_validate unless config lock is held.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
04:10:56 - r332547
(4 days 9 hours ago)
by mav
Affects: 
(63 files)
/stable/11/cddl/contrib/opensolaris/*
/stable/11/sys/cddl/contrib/opensolaris/*
/stable/11/sys/conf/files
MFC r331701: MFV r331695, 331700: 9166 zfs storage pool checkpoint

illumos/illumos-gate@8671400134a11c848244896ca51a7db4d0f69da4

The idea of Storage Pool Checkpoint (aka zpool checkpoint) deals with
exactly that. It can be thought of as a “pool-wide snapshot” (or a
variation of extreme rewind that doesn’t corrupt your data). It remembers
the entire state of the pool at the point that it was taken and the user
can revert back to it later or discard it. Its generic use case is an
administrator that is about to perform a set of destructive actions to ZFS
as part of a critical procedure. She takes a checkpoint of the pool before
performing the actions, then rewinds back to it if one of them fails or puts
the pool into an unexpected state. Otherwise, she discards it. With the
assumption that no one else is making modifications to ZFS, she basically
wraps all these actions into a “high-level transaction”.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
04:02:53 - r332546
(4 days 9 hours ago)
by jhibbits
Affects:  /head/sys/powerpc/mpc85xx/fsl_diu.c
Use a resource hint instead of environment variable for DIU mode

This makes it more consistent with FreeBSD norms, rather than using Linux's
norms. Now, instead of needing an environment variable

  video-mode=fslfb:1280x1024@60

Now one would use a hint:

  hint.fb.0.mode=1280x1024@60
03:58:08 - r332545
(4 days 9 hours ago)
by mav
Affects: 
(3 files)
/stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c
/stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c
MFC r331699: Partial MFV r329753:
8809 libzpool should leverage work done in libfakekernel

illumos/illumos-gate@f06dce2c1f0f3af78581e7574f65bfba843ddb6e

Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Andrew Stormont <astormont@racktopsystems.com>

We do not have libfakekernel, but need to reduce code divergence.
03:56:10 - r332544
(4 days 9 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
MFC r331420 (by avg): zfs: fix mismatch between format specifier and type

vdev_dbgmsg_print_tree printed vdev_id of uint64_t type with %u format
specifier. That caused subsequent parameters to be incorrectly read
from the stack and lead to a crash when a wrong value was interpreted as
a string pointer.

This should be upstreamed.
03:55:14 - r332543
(4 days 9 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h
MFC r331414: Reduce struct aggsum_bucket padding to fit into one cache line.
03:54:35 - r332542
(4 days 9 hours ago)
by mav
Affects: 
(4 files)
/stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
/stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
MFC r331408: MFV r331407: 9213 zfs: sytem typo

illumos/illumos-gate@edc8ef7d921c96b23969898aeb766cb24960bda7

Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
Author: Toomas Soome <tsoome@me.com>
03:53:34 - r332541
(4 days 9 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
MFC r331406: MFV r331405: 9084 spa_*_ashift must ignore spare devices

illumos/illumos-gate@b037f3dbd69cef4a7ffd576ad33e07bfaf0b1e84

Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>
03:52:54 - r332540
(4 days 9 hours ago)
by mav
Affects: 
(13 files)
/stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
/stable/11/sys/cddl/contrib/opensolaris/uts/common/*
/stable/11/sys/conf/files
MFC r331404: MFV r331400:
8484 Implement aggregate sum and use for arc counters

In pursuit of improving performance on multi-core systems, we should
implements fanned out counters and use them to improve the performance of
some of the arc statistics. These stats are updated extremely frequently,
and can consume a significant amount of CPU time.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>
03:49:27 - r332539
(4 days 9 hours ago)
by mav
Affects: 
(3 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
MFC r329808: MFV r329807:
8940 Sending an intra-pool resumable send stream may result in EXDEV

illumos/illumos-gate@544132fce3fa6583f01318f9559adc46614343a7

"zfs send -t <token>" for an incremental send should be able to resume
successfully when sending to the same pool: a subtle issue in
zfs_iter_children() doesn't currently allow this.

Because resuming from a token requires "guid" -> "dataset" mapping
(guid_to_name()), we have to walk the whole hierarchy to find the right
snapshots to send.
When resuming an incremental send both source and destination live in the
same pool and have the same guid: this is where zfs_iter_children() gets
confused and picks up the wrong snapshot, so we end up trying to send an
incremental "destination@snap1 -> source@snap2" stream instead of
"source@snap1 -> source@snap2": this fails with an "Invalid cross-device
link" (EXDEV) error.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Author: loli10K <ezomori.nozomu@gmail.com>
03:48:37 - r332538
(4 days 9 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c
MFC r329805: MFV r329803:
9080 recursive enter of vdev_indirect_rwlock from vdev_indirect_remap()

illumos/illumos-gate@bdfded42e66b9fc1395ff2401aa2952f7c44ae34

A scenario came up where a callback executed by vdev_indirect_remap() on a
vdev, calls
vdev_indirect_remap() on the same vdev and tries to reacquire
vdev_indirect_rwlock that
was already acquired from the first call to vdev_indirect_remap(). The specific
scenario,
is that we want to remap a block pointer that is snapshoted but its dataset's
remap_deadlist
is not cached. So in order to add it we issue a read through a
vdev_indirect_remap() on the
same vdev, which brings up the aforementioned issue.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Author: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
03:47:53 - r332537
(4 days 9 hours ago)
by mav
Affects: 
(9 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
/stable/11/sys/conf/files
MFC r329802: MFV r329799, r329800:
9079 race condition in starting and ending condesing thread for indirect vdevs

illumos/illumos-gate@667ec66f1b4f491d5e839644e0912cad1c9e7122

The timeline of the race condition is the following:
[1] Thread A is about to finish condesing the first vdev in
spa_condense_indirect_thread(),
so it calls the spa_condense_indirect_complete_sync() sync task which sets the
spa_condensing_indirect field to NULL. Waiting for the sync task to finish,
thread A
sleeps until the txg is done. When this happens, thread A will acquire
spa_async_lock
and set spa_condense_thread to NULL.
[2] While thread A waits for the txg to finish, thread B which is running
spa_sync() checks
whether it should condense the second vdev in vdev_indirect_should_condense()
by checking
the spa_condensing_indirect field which was set to NULL by
spa_condense_indirect_thread()
from thread A. So it goes on and tries to spawn a new condensing thread in
spa_condense_indirect_start_sync() and the aforementioned assertions fails
because thread A
has not set spa_condense_thread to NULL (which is basically the last thing it
does before
returning).

The main issue here is that we rely on both spa_condensing_indirect and
spa_condense_thread to
signify whether a condensing thread is running. Ideally we would only use one
throughout the
codebase. In addition, for managing spa_condense_thread we currently use
spa_async_lock which
basically tights condensing to scrubing when it comes to pausing and resuming
those actions
during spa export.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
03:45:39 - r332536
(4 days 9 hours ago)
by mav
Affects: 
(20 files)
/stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
/stable/11/cddl/contrib/opensolaris/lib/*
/stable/11/sys/cddl/contrib/opensolaris/uts/common/*
MFC r329798: MFV r329793, r329795:
9075 Improve ZFS pool import/load process and corrupted pool recovery

illumos/illumos-gate@6f7938128a2c5e23f4b970ea101137eadd1470a1

Some work has been done lately to improve the debugability of the ZFS pool
load (and import) process. This includes:

https://www.illumos.org/issues/7638: Refactor spa_load_impl into several
functions
https://www.illumos.org/issues/8961: SPA load/import should tell us why it
failed
https://www.illumos.org/issues/7277: zdb should be able to print zfs_dbgmsg's

To iterate on top of that, there's a few changes that were made to make the
import process more resilient and crash free. One of the first tasks during the
pool load process is to parse a config provided from userland that describes
what devices the pool is composed of. A vdev tree is generated from that config,
and then all the vdevs are opened.

The Meta Object Set (MOS) of the pool is accessed, and several metadata objects
that are necessary to load the pool are read. The exact configuration of the
pool is also stored inside the MOS. Since the configuration provided from
userland is external and might not accurately describe the vdev tree
of the pool at the txg that is being loaded, it cannot be relied upon to safely
operate the pool. For that reason, the configuration in the MOS is read early
on. In the past, the two configurations were compared together and if there was
a mismatch then the load process was aborted and an error was returned.

The latter was a good way to ensure a pool does not get corrupted, however it
made the pool load process needlessly fragile in cases where the vdev
configuration changed or the userland configuration was outdated. Since the MOS
is stored in 3 copies, the configuration provided by userland doesn't have to be
perfect in order to read its contents. Hence, a new approach has been adopted:
The pool is first opened with the untrusted userland configuration just so that
the real configuration can be read from the MOS. The trusted MOS configuration
is then used to generate a new vdev tree and the pool is re-opened.

When the pool is opened with an untrusted configuration, writes are disabled
to avoid accidentally damaging it. During reads, some sanity checks are
performed on block pointers to see if each DVA points to a known vdev;
when the configuration is untrusted, instead of panicking the system if those
checks fail we simply avoid issuing reads to the invalid DVAs.

This new two-step pool load process now allows rewinding pools accross
vdev tree changes such as device replacement, addition, etc. Loading a pool
from an external config file in a clustering environment also becomes much
safer now since the pool will import even if the config is outdated and didn't,
for instance, register a recent device addition.

With this code in place, it became relatively easy to implement a
long-sought-after feature: the ability to import a pool with missing top level
(i.e. non-redundant) devices. Note that since this almost guarantees some loss
Of data, this feature is for now restricted to a read-only import.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
03:44:13 - r332535
(4 days 9 hours ago)
by mav
Affects: 
(3 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
MFC r329783: 8942 zfs promote .../%recv should be an error

illumos/illumos-gate@add927f8c8d101e16c23eb9cd270be4fd7edf7d5

Reported on the ZFSonLinux https://github.com/zfsonlinux/zfs/issues/4843,
fixed by https://github.com/zfsonlinux/zfs/pull/6339:

If we are in the middle of an incremental zfs receive, the child .../%recv
will exist. If you concurrently run zfs promote .../%recv, it will "work",
but then zfs gets confused. For example, there's no obvious way to destroy
the containing filesystem (because it is now a clone of its invisible child).

Attempting to do this promote should be an error. We could fix this by
having zfs_ioc_promote() check if zc_name contains a %, similar to
zfs_ioc_rename().

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: loli10K <ezomori.nozomu@gmail.com>
03:43:29 - r332534
(4 days 9 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
MFC r329777: MFV r329776:
8477 Assertion failed in vdev_state_dirty(): spa_writeable(spa)

illumos/illumos-gate@f4c1745bd6c9829a05ecec15759ede7757100ab5

Illumos 4080 allows "zpool clear" to work on readonly pools: i don't think
this is the intended behaviour, we shouldn't be allowed to clear readonly
pools. Probably.

A fix is already in the ZFS on Linux repository to addess this issue:
https://github.com/zfsonlinux/zfs/commit/92e43c17188d47f47b69318e4884096dec380e36

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: loli10K <ezomori.nozomu@gmail.com>
03:42:47 - r332533
(4 days 9 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c
MFC r329775: MFV r329774:
8408 dsl_props_set_sync_impl() does not handle nested nvlists correctly

illumos/illumos-gate@85723e5eec42f46dbfdb4c09b9e1ed66501d1ccf

When iterating over the input nvlist in dsl_props_set_sync_impl() when we
don't preserve the nvpair name before looking up ZPROP_VALUE, so when we
later go to process it nvpair_name() is always "value" instead of the actual
property name.

This results in a couple of bugs in the recv code:

 - received properties are not restored correctly when failing to receive
  an incremental send stream
 - received properties are not completely replaced by the new ones when
  successfully receiving an incremental send stream

This was discovered on ZFS on Linux (fixed in
https://github.com/zfsonlinux/zfs/commit/5f1346c29997dd4e02acf4c19c875d5484f33b1e)

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: loli10K <ezomori.nozomu@gmail.com>
03:42:06 - r332532
(4 days 9 hours ago)
by mav
Affects: 
(5 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/*
MFC r329771: MFV r329770: 9035 zfs: this statement may fall through

illumos/illumos-gate@46ac8fdfc5a1f9d8240c79a6ae5b2889cbe83553

Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Toomas Soome <tsoome@me.com>
03:41:21 - r332531
(4 days 9 hours ago)
by mav
Affects: 
(3 files)
/stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
MFC r329769: MFV r329766: 8962 zdb should work on non-idle pools

illumos/illumos-gate@e144c4e6c90e7d4dccaad6db660ee42b6e7ba04f

Currently `zdb` consistently fails to examine non-idle pools as it fails
during the `spa_load()` process. The main problem seems to be that
`spa_load_verify()` fails as can be seen below:

$ sudo zdb -d -G dcenter
  zdb: can't open 'dcenter': I/O error

ZFS_DBGMSG(zdb):
  spa_open_common: opening dcenter
  spa_load(dcenter): LOADING
  disk vdev '/dev/dsk/c4t11d0s0': best uberblock found for spa dcenter. txg
40824950
  spa_load(dcenter): using uberblock with txg=40824950
  spa_load(dcenter): UNLOADING
  spa_load(dcenter): RELOADING
  spa_load(dcenter): LOADING
  disk vdev '/dev/dsk/c3t10d0s0': best uberblock found for spa dcenter. txg
40824952
  spa_load(dcenter): using uberblock with txg=40824952
  spa_load(dcenter): FAILED: spa_load_verify failed [error=5]
  spa_load(dcenter): UNLOADING

This change makes `spa_load_verify()` a dryrun when ran from `zdb`. This is
done by creating a global flag in zfs and then setting it in `zdb`.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
03:40:12 - r332530
(4 days 9 hours ago)
by mav
Affects: 
(9 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r329765: MFV r329762: 8961 SPA load/import should tell us why it failed

illumos/illumos-gate@3ee8c80c747c4aa3f83351a6920f30c411236e1b

When we fail to open or import a storage pool, we typically don't get any
additional diagnostic information, just "no pool found" or "can not import".

While there may be no additional user-consumable information, we should at
least make this situation easier to debug/diagnose for developers and support.
For example, we could start by using `zfs_dbgmsg()` to log each thing that we
try when importing, and which things failed. E.g. "tried uberblock of txg X
from label Y of device Z". Also, we could log each of the stages that we go
through in `spa_load_impl()`.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
03:39:24 - r332529
(4 days 9 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
MFC r329761: MFV r329760: 7638 Refactor spa_load_impl into several functions

illumos/illumos-gate@1fd3785ff6601d3e391378c2dcbf4c5f27e1fe32

spa_load_impl has grown out of proportions. It is currently over 700
lines long and makes it very hard to follow or debug the import process
even for experienced ZFS developers. The objective is to split it up
in a series of well commented functions.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
03:38:37 - r332528
(4 days 9 hours ago)
by mav
Affects: 
(5 files)
/stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
/stable/11/sys/cddl/compat/opensolaris/*
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r329759:
9018 Replace kmem_cache_reap_now() with kmem_cache_reap_soon()

illumos/illumos-gate@36a64e62848b51ac5a9a5216e894ec723cfef14e

To prevent kmem_cache reaping from blocking other system resources, turn
kmem_cache_reap_now() (which blocks) into kmem_cache_reap_soon(). Callers
to kmem_cache_reap_soon() should use kmem_cache_reap_active(), which
exploits #9017's new taskq_empty().

Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Author: Tim Kordas <tim.kordas@joyent.com>

FreeBSD does not use taskqueue for kmem caches reaping, so this change
is less dramatic then it is on Illumos, just limiting reaping to 1 time
per second. It may possibly be improved later, if needed.
03:35:43 - r332527
(4 days 9 hours ago)
by ian
Affects:  /head/usr.sbin/daemon/daemon.8
Fix cut-and-pasted line to have the right option letter.

Reported by: 0mp@
Pointy hat: ian@
03:35:18 - r332526
(4 days 9 hours ago)
by mav
Affects: 
(8 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/*
MFC r329755: MFV r329753:
8809 libzpool should leverage work done in libfakekernel

illumos/illumos-gate@f06dce2c1f0f3af78581e7574f65bfba843ddb6e

Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Andrew Stormont <astormont@racktopsystems.com>
03:32:41 - r332525
(4 days 9 hours ago)
by mav
Affects: 
(87 files)
/stable/11/cddl/contrib/opensolaris/*
/stable/11/sys/cddl/contrib/opensolaris/*
/stable/11/sys/conf/files
MFC r329732: MFV r329502: 7614 zfs device evacuation/removal

illumos/illumos-gate@5cabbc6b49070407fb9610cfe73d4c0e0dea3e77

https://www.illumos.org/issues/7614:
This project allows top-level vdevs to be removed from the storage pool with
“zpool remove”, reducing the total amount of storage in the pool. This
operation copies all allocated regions of the device to be removed onto other
devices, recording the mapping from old to new location. After the removal is
complete, read and free operations to the removed (now “indirect”) vdev must
be remapped and performed at the new location on disk. The indirect mapping
table is kept in memory whenever the pool is loaded, so there is minimal
performance overhead when doing operations on the indirect vdev.

The size of the in-memory mapping table will be reduced when its entries
become “obsolete” because they are no longer used by any block pointers in
the pool. An entry becomes obsolete when all the blocks that use it are
freed. An entry can also become obsolete when all the snapshots that
reference it are deleted, and the block pointers that reference it have been
“remapped” in all filesystems/zvols (and clones). Whenever an indirect block
is written, all the block pointers in it will be “remapped” to their new
(concrete) locations if possible. This process can be accelerated by using
the “zfs remap” command to proactively rewrite all indirect blocks that
reference indirect (removed) vdevs.

Note that when a device is removed, we do not verify the checksum of the data
that is copied. This makes the process much faster, but if it were used on
redundant vdevs (i.e. mirror or raidz vdevs), it would be possible to copy
the wrong data, when we have the correct data on e.g. the other side of the
mirror. Therefore, mirror and raidz devices can not be removed.

Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Laager <rlaager@wiktel.com>
Reviewed by: Tim Chase <tim@chase2k.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Prashanth Sreenivasa <pks@delphix.com>
03:14:54 - r332524
(4 days 9 hours ago)
by mav
Affects: 
(5 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r307317: MFV r307313:
5120 zfs should allow large block/gzip/raidz boot pool (loader project)

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Toomas Soome <tsoome@me.com>

openzfs/openzfs@c8811bd3e2427dddbac6c05a59cfe117d8fea370

FreeBSD still does not support booting from gzip-compressed datasets,
so keep one chunk of this commit out.
00:54:58 - r332523
(4 days 12 hours ago)
by mav
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
9433 Fix ARC hit rate

When the compressed ARC feature was added in commit d3c2ae1
the method of reference counting in the ARC was modified. As
part of this accounting change the arc_buf_add_ref() function
was removed entirely.

This would have be fine but the arc_buf_add_ref() function
served a second undocumented purpose of updating the ARC access
information when taking a hold on a dbuf. Without this logic
in place a cached dbuf would not migrate its associated
arc_buf_hdr_t to the MFU list. This would negatively impact
the ARC hit rate, particularly on systems with a small ARC.

This change reinstates the missing call to arc_access() from
dbuf_hold() by implementing a new arc_buf_access() function.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tim Chase <tim@chase2k.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
00:42:45 - r332522
(4 days 12 hours ago)
by kevans
Affects: 
(4 files)
/stable/11/sbin/geom/class/eli/geom_eli.c
/stable/11/sys/geom/eli/g_eli.h
/stable/11/sys/geom/eli/g_eli_integrity.c
MFC r308137, r316312, r332361

r308137:
Fix alignment issues on MIPS: align the pointers properly.

All the 5520 GEOM_ELI tests passed successfully on MIPS64EB.

r316312:
sys/geom/eli: Switch bzero() to explicit_bzero() for sensitive data

In GELI, anywhere we are zeroing out possibly sensitive data, like
the metadata struct, the metadata sector (both contain the encrypted
master key), the user key, or the master key, use explicit_bzero.

Didn't touch the bzero() used to initialize structs.

r332361:
Introduce dry run option for attaching the device.
This will allow us to verify if passphrase and key is valid without
decrypting whole device.
00:29:07 - r332521
(4 days 12 hours ago)
by kevans
Affects: 
(8 files)
/stable/11/sys/geom/part/*
MFC r323108, r323125, r326047-r326049

r323108:
Add efimedia attribute for all GPT partitions.

r323125:
The hard drive media device path contains the size of the partition,
not its end. This makes the GEOM efimedia attribute match the
FreeBSD:Boot1Device environment variable now.

r326047:
Implement efi media tagging for MBR partitioning types.

r326048:
Remove trailing whitespace (one I just introduced and a bunch of
others in the same directory).

r326049:
While the EFI spec allows numbers to be in many forms, libefivar
produces hex numbers for the dsn. Since that come is from EDK2, change
this for symmetry, by generating the dsn as a hex number.

[Missed as part of the efivar/efibootmgr MFCs]

Reported by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
00:18:57 - r332520
(4 days 12 hours ago)
by kevans
Affects:  /stable/11/share/man/man4/geom.4
/stable/11/sys/conf/NOTES
/stable/11/sys/geom/geom_aes.c
geom_aes: Provide some deprecation notices

This is a direct commit to stable/11, due to having already been removed in
head.
00:12:03 - r332519
(4 days 12 hours ago)
by kevans
Affects: 
(9 files)
/stable/11/share/man/man4/*
/stable/11/sys/conf/NOTES
/stable/11/sys/geom/*
MFC r322318-r322319

r322318:
Mark geom classes as deprecated.

geom_bsd, geom_mbr and geom_sunlabel have been obsolete since Marcel
Moolenaar's geom_part was in FreeBSD 7. They haven't been in GENERIC
since FreeBSD 8. Add warning when used.

geom_vol_ffs has been obsolete since ufs support to geom_label was
committed in FreeBSD 5. It hasn't been in GENERIC since FreeBSD 5.
Add warning when used.

geom_fox has been obsolete since gmultipath was committed in FreeBSD 7.
(no warning added, since this is a very obscure class).

These will all be removed in FreeBSD 12.

r322319:
Also provide a warning for geom_fox.
2018 - 04 - 15   (5 days ago)
21:46:08 - r332518
(4 days 15 hours ago)
by ian
Affects:  /head/usr.sbin/daemon/daemon.8
/head/usr.sbin/daemon/daemon.c
Add an option to daemon(8) to specify a delay between restarts of a
supervised program. The existing -r option has a hard-coded delay of one
second. This change adds a -R option which takes a delay in seconds. This
can be used to prevent log spam and rapid restarts, similar to init(8)'s
behavior of adding a delay between rapid restarts when it's supervising a
program.
20:29:37 - r332517
(4 days 16 hours ago)
by grehan
Affects: 
(2 files)
/stable/11/usr.sbin/bhyvectl/bhyvectl.c
MFC r330764
  Add CR2 get/set support.
20:20:08 - r332516
(4 days 16 hours ago)
by grehan
Affects: 
(2 files)
/stable/11/sys/amd64/vmm/vmm_instruction_emul.c
MFC r325261
  Emulate the "OR reg, r/m" instruction (opcode 0BH).

  This is needed for the HDA emulation with FreeBSD guests.
19:23:37 - r332515
(4 days 17 hours ago)
by np
Affects:  /head/usr.sbin/cxgbetool/cxgbetool.8
Fix typo in cxgbetool.8.
15:23:47 - r332514
(4 days 21 hours ago)
by brooks
Affects:  /head/ObsoleteFiles.inc
Manpages are .gz files.

Reported by: trasz
15:22:28 - r332513
(4 days 21 hours ago)
by kp
Affects: 
(18 files)
/stable/11/share/man/man9/pfil.9
/stable/11/sys/*
MFC r331436:

netpfil: Introduce PFIL_FWD flag

Forwarded packets passed through PFIL_OUT, which made it difficult for
firewalls to figure out if they were forwarding or producing packets. This in
turn is an issue for pf for IPv6 fragment handling: it needs to call
ip6_output() or ip6_forward() to handle the fragments. Figuring out which was
difficult (and until now, incorrect).
Having pfil distinguish the two removes an ugly piece of code from pf.

Introduce a new variant of the netpfil callbacks with a flags variable, which
has PFIL_FWD set for forwarded packets. This allows pf to reliably work out if
a packet is forwarded.
15:06:07 - r332512
(4 days 22 hours ago)
by brooks
Affects:  /head/sys/conf/NOTES
Remove device cm which was removed in r332490.
08:44:26 - r332511
(5 days 4 hours ago)
by ed
Affects:  /head/usr.sbin/syslogd/syslogd.8
Use proper alphabetic sorting of options.
08:34:16 - r332510
(5 days 4 hours ago)
by ed
Affects: 
(4 files)
/head/usr.bin/wall/*
/head/usr.sbin/syslogd/*
Add RFC 5424 syslog message output to syslogd.

- Move all of the code responsible for transmitting log messages into a
  separate function, fprintlog_write().
- Instead of manually modifying a list of iovecs, add a structure
  iovlist with some helper functions.
- Alter the F_FORW (UDP message forwarding) case to also use iovecs like
  the other cases. Use sendmsg() instead of sendto().
- In the case of F_FORW, truncate the message to a size dependent on the
  address family (AF_INET, AF_INET6), as proposed by RFC 5426.
- Move all traditional message formatting into fprintlog_bsd(). Get rid
  of some of the string copying and snprintf()'ing. Simply emit more
  iovecs to get the job done.
- Increase ttymsg()'s limit of 7 iovecs to 32. Add a definition for this
  limit, so it can be reused by iovlist.
- Add fprintlog_rfc5424() to emit RFC 5424 formatted log entries.
- Add a "-O" command line option to enable RFC 5424 formatting. It would
  have been nicer if we supported "-o rfc5424", just like on NetBSD.
  Unfortunately, the "-o" flag is already used for a different purpose
  on FreeBSD.
- Don't truncate hostnames in the RFC 5424 case, as suggested by that
  specific RFC.

For people interested in using this, this feature can be enabled by
adding the following line to /etc/rc.conf:

  syslogd_flags="-s -O rfc5424"

Differential Revision: https://reviews.freebsd.org/D15011
2018 - 04 - 14   (6 days ago)
22:14:18 - r332509
(5 days 14 hours ago)
by imp
Affects:  /head/sys/i386/i386/db_disasm.c
Make first a 'bool' instead of a 'boolean_t'.

'bool' is preferred to 'boolean_t'. We only get the boolean_t
definition by header pollution (though the same is true for
bool). Since we use both, switch entirely to bool.

Note: We still have TRUE/FALSE instead of true/false in heavy use in
the rest of the file. These are with ints of various flavors, so
that's appropriate, even though we should eventually migrate to bool
and true/false (though the tables they are in are nicely packed with
short and wouldn't be so nicely packed with bool, another reason
to leave it alone for now).
21:54:22 - r332508
(5 days 15 hours ago)
by eadler
Affects:  /head/contrib/amd/FREEBSD-upgrade
/head/contrib/amd/amd/amd.8
amd: correct formatting of 'SEE ALSO'
20:49:38 - r332507
(5 days 16 hours ago)
by gonzo
Affects:  /stable/11/sys/modules/Makefile
Fix mis-merge of r329507 in r331501

sus/modules/Makefile part of r329507 just removed ffec
while r331501 also added conditional clause for bcm283x_clkman
and bcm283x_pwm. Since they're part of another revision,
remove mi-merged chunk
19:07:56 - r332506
(5 days 18 hours ago)
by np
Affects: 
(13 files)
/head/sys/dev/cxgbe/*
/head/usr.sbin/cxgbetool/*
cxgbe(4): Add support for Connection Offload Policy (aka COP).

COP allows fine-grained control on whether to offload a TCP connection
using t4_tom, and what settings to apply to a connection selected for
offload. t4_tom must still be loaded and IFCAP_TOE must still be
enabled for full TCP offload to take place on an interface. The
difference is that IFCAP_TOE used to be the only knob and would enable
TOE for all new connections on the inteface, but now the driver will
also consult the COP, if any, before offloading to the hardware TOE.

A policy is a plain text file with any number of rules, one per line.
Each rule has a "match" part consisting of a socket-type (L = listen,
A = active open, P = passive open, D = don't care) and a pcap-filter(7)
expression, and a "settings" part that specifies whether to offload the
connection or not and the parameters to use if so. The general format
of a rule is: [socket-type] expr => settings

Example. See cxgbetool(8) for more information.
[L] ip && port http => offload
[L] port 443 => !offload
[L] port ssh => offload
[P] src net 192.168/16 && dst port ssh => offload !nagle !timestamp cong newreno
[P] dst port ssh => offload !nagle ecn cong tahoe
[P] dst port http => offload
[A] dst port 443 => offload tls
[A] dst net 192.168/16 => offload !timestamp cong highspeed

The driver processes the rules for each new listen, active open, or
passive open and stops at the first match. There is an implicit rule at
the end of every policy that prohibits offload when no rule in the
policy matches:
[D] all => !offload

This is a reworked and expanded version of a patch submitted by
Krishnamraju Eraparaju @ Chelsio.

Sponsored by: Chelsio Communications
17:41:54 - r332505
(5 days 19 hours ago)
by kib
Affects: 
(4 files)
/stable/11/sys/amd64/amd64/pmap.c
/stable/11/sys/vm/vm_page.c
/stable/11/sys/vm/vm_page.h
MFC r332182:
Handle Skylake-X errata SKZ63.
17:33:16 - r332504
(5 days 19 hours ago)
by kib
Affects:  /head/sys/amd64/amd64/pmap.c
Set PG_G global mapping bit on the trampoline ptes.

Trampoline mappings are better treated as global since they are valid
in all address spaces, even for PTI. pmap_invalidate_range() must work
on global mappings for pti since kernel_pmap invalidations are really
same as for non-PTI.

Reviewed by: alc, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential revision: https://reviews.freebsd.org/D15052
14:57:32 - r332503
(5 days 22 hours ago)
by dim
Affects: 
(21 files)
/head/contrib/llvm/*
/head/lib/clang/*
Revert r332501 for now, as it can cause build failures on i386.
Reported upstream as <https://bugs.llvm.org/show_bug.cgi?id=37133>.

Reported by: emaste, ci.freebsd.org
PR: 225330
12:52:34 - r332502
(6 days ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/sys/ioccom.h
MFC r331077 (brooks): Add _IOC_NEWLEN() and _IOC_NEWTYPE() macros.

These macros take an existing ioctl(2) command and replace the length
with the specified length or length of the specified type respectively.
These can be used to define commands for 32-bit compatibility with fewer
opportunities for cut-and-paste errors then a whole new definition.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
12:07:05 - r332501
(6 days 1 hour ago)
by dim
Affects: 
(21 files)
/head/contrib/llvm/*
/head/lib/clang/*
Pull in r325446 from upstream clang trunk (by me):

  [X86] Add 'sahf' CPU feature to frontend

  Summary:
  Make clang accept `-msahf` (and `-mno-sahf`) flags to activate the
  `+sahf` feature for the backend, for bug 36028 (Incorrect use of
  pushf/popf enables/disables interrupts on amd64 kernels). This was
  originally submitted in bug 36037 by Jonathan Looney
  <jonlooney@gmail.com>.

  As described there, GCC also uses `-msahf` for this feature, and the
  backend already recognizes the `+sahf` feature. All that is needed is
  to teach clang to pass this on to the backend.

  The mapping of feature support onto CPUs may not be complete; rather,
  it was chosen to match LLVM's idea of which CPUs support this feature
  (see lib/Target/X86/X86.td).

  I also updated the affected test case (CodeGen/attr-target-x86.c) to
  match the emitted output.

  Reviewers: craig.topper, coby, efriedma, rsmith

  Reviewed By: craig.topper

  Subscribers: emaste, cfe-commits

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

Pull in r328944 from upstream llvm trunk (by Chandler Carruth):

  [x86] Expose more of the condition conversion routines in the public
  API for X86's instruction information. I've now got a second patch
  under review that needs these same APIs. This bit is nicely
  orthogonal and obvious, so landing it. NFC.

Pull in r329414 from upstream llvm trunk (by Craig Topper):

  [X86] Merge itineraries for CLC, CMC, and STC.

  These are very simple flag setting instructions that appear to only
  be a single uop. They're unlikely to need this separation.

Pull in r329657 from upstream llvm trunk (by Chandler Carruth):

  [x86] Introduce a pass to begin more systematically fixing PR36028
  and similar issues.

  The key idea is to lower COPY nodes populating EFLAGS by scanning the
  uses of EFLAGS and introducing dedicated code to preserve the
  necessary state in a GPR. In the vast majority of cases, these uses
  are cmovCC and jCC instructions. For such cases, we can very easily
  save and restore the necessary information by simply inserting a
  setCC into a GPR where the original flags are live, and then testing
  that GPR directly to feed the cmov or conditional branch.

  However, things are a bit more tricky if arithmetic is using the
  flags. This patch handles the vast majority of cases that seem to
  come up in practice: adc, adcx, adox, rcl, and rcr; all without
  taking advantage of partially preserved EFLAGS as LLVM doesn't
  currently model that at all.

  There are a large number of operations that techinaclly observe
  EFLAGS currently but shouldn't in this case -- they typically are
  using DF. Currently, they will not be handled by this approach.
  However, I have never seen this issue come up in practice. It is
  already pretty rare to have these patterns come up in practical code
  with LLVM. I had to resort to writing MIR tests to cover most of the
  logic in this pass already. I suspect even with its current amount
  of coverage of arithmetic users of EFLAGS it will be a significant
  improvement over the current use of pushf/popf. It will also produce
  substantially faster code in most of the common patterns.

  This patch also removes all of the old lowering for EFLAGS copies,
  and the hack that forced us to use a frame pointer when EFLAGS copies
  were found anywhere in a function so that the dynamic stack
  adjustment wasn't a problem. None of this is needed as we now lower
  all of these copies directly in MI and without require stack
  adjustments.

  Lots of thanks to Reid who came up with several aspects of this
  approach, and Craig who helped me work out a couple of things
  tripping me up while working on this.

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

Pull in r329673 from upstream llvm trunk (by Chandler Carruth):

  [x86] Model the direction flag (DF) separately from the rest of
  EFLAGS.

  This cleans up a number of operations that only claimed te use EFLAGS
  due to using DF. But no instructions which we think of us setting
  EFLAGS actually modify DF (other than things like popf) and so this
  needlessly creates uses of EFLAGS that aren't really there.

  In fact, DF is so restrictive it is pretty easy to model. Only STD,
  CLD, and the whole-flags writes (WRFLAGS and POPF) need to model
  this.

  I've also somewhat cleaned up some of the flag management instruction
  definitions to be in the correct .td file.

  Adding this extra register also uncovered a failure to use the
  correct datatype to hold X86 registers, and I've corrected that as
  necessary here.

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

Together, these should ensure clang does not use pushf/popf sequences to
save and restore flags, avoiding problems with unrelated flags (such as
the interrupt flag) being restored unexpectedly.

Requested by: jtl
PR: 225330
MFC after: 1 week
08:05:42 - r332500
(6 days 5 hours ago)
by eadler
Affects:  /head/sys/conf/NOTES
sys: remove 'cm' from notes

Followup to r332490

MFC After: never
PR: 182297
04:35:10 - r332499
(6 days 8 hours ago)
by cem
Affects:  /head/bin/expr/expr.y
expr(1): Fix overflow detection when operand is INTMAX_MIN

PR: 227329
Submitted by: Tobias Stoeckmann <tobias AT stoeckmann.org>
03:15:05 - r332498
(6 days 9 hours ago)
by cem
Affects:  /head/sys/x86/cpufreq/est.c
cpufreq: Remove error-prone table terminators in favor of automatic sizing

PR: 227388
Reported by: Vladimir Machulsky <xdelta AT meta.ua>
Sponsored by: Dell EMC Isilon
00:20:47 - r332497
(6 days 12 hours ago)
by kp
Affects: 
(2 files)
/stable/10/sys/netpfil/pf/pf_ioctl.c
MFC r332142:

pf: Improve ioctl validation

Ensure that multiplications for memory allocations cannot overflow, and
that we'll not try to allocate M_WAITOK for potentially overly large
allocations.
00:12:16 - r332496
(6 days 12 hours ago)
by kp
Affects: 
(2 files)
/stable/11/sys/netpfil/pf/pf_ioctl.c
MFC r332142:

pf: Improve ioctl validation

Ensure that multiplications for memory allocations cannot overflow, and
that we'll not try to allocate M_WAITOK for potentially overly large
allocations.

 


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 34 ms, 321 revisions printed. Current time is 2018-04-20 13:11:17. All times are in UTC/GMT.