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.

2017 - 10 - 18   (today)
00:41:23 - r324713
(2 hours 55 minutes ago)
by rlibby
Affects:  /head/sys/fs/ext2fs/ext2_extern.h
ext2: delete redundant decl of ext2_fserr

Fix gcc build after r324706.

Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D12709
00:33:20 - r324712
(3 hours 3 minutes ago)
by jonathan
Affects:  /head/share/mk/bsd.lib.mk
/head/share/mk/bsd.prog.mk
Improve computation of {BC,LL}OBJS.

Now that OBJS has grown an OBJS_SRCS_FILTER variable, use this variable
in the computation of BCOBJS and LLOBJS too. Also move BCOBJS and LLOBJS
computation to be next to the OBJS computation: this should both make
the parallel structure clearer and serve to remind people changing OBJS
that parallel changes are required in BCOBJS and LLOBJS.

A side effect of this change is that BCOBJS and LLOBJS will be available
even when LLVM_LINK has not been defined, but that seems like a positive
change: there's no reason we can't ask "what bitcode files would you
generate" just because we can't link those files together into a
complete bitcode representation of a binary or library.

Reviewed by: sjg
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12701
00:30:15 - r324711
(3 hours 6 minutes ago)
by jonathan
Affects:  /head/share/mk/bsd.prog.mk
Improve logic of CLEANFILES+=${PROG_FULL}.{bc,ll}.

The build rule describing how to create ${PROG_FULL}.{bc,ll} is only
dependent on LLVM_LINK being defined, not on MK_DEBUG_FILES being "yes".
Move the addition of ${PROG_FULL}.{bc,ll} out of the conditional block
under `.if ${MK_DEBUG_FILES} != "no"` and up next to where the build
rules for ${PROG_FULL}.{bc,ll} are defined.

Reviewed by: emaste
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12703
00:18:03 - r324710
(3 hours 18 minutes ago)
by brooks
Affects: 
(10 files)
/head/ObsoleteFiles.inc
/head/share/man/man9/*
/head/sys/*
Remove mbpool(9) now that it has no consumers.

mbpool existed to support NICs with memory interfaces and all remaining
comsumers were removed earlier this year with NATM.

Reviewed by: jhb
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10513
2017 - 10 - 17   (yesterday)
23:38:27 - r324709
(3 hours 57 minutes ago)
by imp
Affects: 
(9 files)
/head/sys/boot/efi/boot1/*
/head/sys/boot/efi/libefi/*
/head/sys/boot/efi/loader/*
Revert "Unify boot1 with loader" change r324646

Back out the unification commit to boot1. There's some issues on the
arm and arm64 platforms that need to be addressed with code
changes. There's also a discussion on arch@ about the future of
boot1.efi vs just using loader.efi that needs to play out. So take a
pause on these changes until the arm issues can be fixed and it's
clear boot1.efi will survive into FreeBSD 12.

OK'd by: Eric@meatspace
21:20:07 - r324708
(6 hours 16 minutes ago)
by gordon
Affects:  /releng/11.1/UPDATING
Correct copy-paste. 11.1 is p2, not p13.

X-Pointy-Hat-To: gordon
Approved by: so
21:13:26 - r324707
(6 hours 23 minutes ago)
by emaste
Affects:  /head/sys/tools/embed_mfs.sh
embed_mfs: add error handling, usage

Ensure that we are called with two arguments, and that the output file
is writable. Also, if we cannot find the mfs section report the output
file name rather than "kernel", as this script may be used with other
than kernels.

Sponsored by: The FreeBSD Foundation
20:45:44 - r324706
(6 hours 50 minutes ago)
by fsu
Affects: 
(14 files)
/head/sys/fs/ext2fs/*
Add inital extents read-write support.

Approved by: pfg (mentor)
MFC after: 6 months
RelNotes: Yes

Differential Revision: https://reviews.freebsd.org/D12087
20:37:31 - r324705
(6 hours 58 minutes ago)
by rlibby
Affects:  /head/sys/dev/cxgbe/tom/t4_cpl_io.c
/head/sys/dev/cxgbe/tom/t4_ddp.c
cxgbe: delete now-redundant vnet decls

r324539 gathered some vnet decls into netinet/tcp_var.h, so that they
are now redundant in dev/cxgbe/tom/{t4_cpl_io.c,t4_ddp.c}. This triggers
gcc -Wredundant-decls.

Reviewed by: np
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12674
19:41:45 - r324704
(7 hours 54 minutes ago)
by markj
Affects:  /head/sys/kern/vfs_subr.c
Fix a racy VI_DOOMED check in MNT_VNODE_FOREACH_ALL().

MNT_VNODE_FOREACH_ALL() is supposed to avoid returning doomed vnodes,
but the VI_DOOMED check it used was done without the vnode interlock
held, so it could race with a concurrent vgone().

Submitted by: Don Morris <don.morris@isilon.com>
Reviewed by: kib, mckusick
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12704
19:11:29 - r324703
(8 hours 24 minutes ago)
by emaste
Affects:  /head/sys/boot/loader.mk
loader.mk: clean md.o even if MD_IMAGE_SIZE not defined

We don't normally provide special handling for optionally-included src
files, but md.o depends on both md.c and the value of ${MD_IMAGE_SIZE}.
Previously if one built with MD_IMAGE_SIZE, executed "make clean", and
then built with a different MD_IMAGE_SIZE md.o would not be rebuilt.

Reported by: Zakary Nafziger
Sponsored by: The FreeBSD Foundation
19:11:19 - r324702
(8 hours 25 minutes ago)
by imp
Affects:  /head/sys/boot/uboot/lib/Makefile
We need to include disk.o in libuboot.a when we're building with
support for disk access.

Sponsored by: Netflix
19:01:01 - r324701
(8 hours 35 minutes ago)
by bdrewery
Affects:  /head/tests/sys/kern/ptrace_test.c
Add a test for r324671 along with some other masked tests.

MFC after: 1 week
Sponsored by: Dell EMC Isilon
18:00:01 - r324700
(9 hours 36 minutes ago)
by emaste
Affects:  /head/sys/boot/common/md.c
loader: initialize dv_cleanup in md.c to eliminate clang warning

Submitted by: Zakary Nafziger <worldofzak@gmail.com>
Sponsored by: The FreeBSD Foundation
17:57:18 - r324699
(9 hours 39 minutes ago)
by gordon
Affects: 
(15 files)
/releng/11.1/UPDATING
/releng/11.1/contrib/wpa/*
/releng/11.1/sys/conf/newvers.sh
Fix WPA2 protocol vulnerability. [SA-17:07]

Approved by: so
17:56:03 - r324698
(9 hours 40 minutes ago)
by gordon
Affects: 
(15 files)
/releng/11.0/UPDATING
/releng/11.0/contrib/wpa/*
/releng/11.0/sys/conf/newvers.sh
Fix WPA2 protocol vulnerability. [SA-17:07]

Approved by: so
17:30:18 - r324697
(10 hours 6 minutes ago)
by gordon
Affects: 
(14 files)
/stable/11/contrib/wpa/src/*
/stable/11/contrib/wpa/wpa_supplicant/*
MFC r324696: Update wpa_supplicant/hostapd for 2017-01 vulnerability release.

hostapd: Avoid key reinstallation in FT handshake
Prevent reinstallation of an already in-use group key
Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases
Fix TK configuration to the driver in EAPOL-Key 3/4 retry case
Prevent installation of an all-zero TK
Fix PTK rekeying to generate a new ANonce
TDLS: Reject TPK-TK reconfiguration
WNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use
WNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been used
WNM: Ignore WNM-Sleep Mode Response without pending request
FT: Do not allow multiple Reassociation Response frames
TDLS: Ignore incoming TDLS Setup Response retries

Submitted by: jhb
Obtained from: https://w1.fi/security/2017-01/ (against later version)
Security: FreeBSD-SA-17:07
Security: CERT VU#228519
Security: CVE-2017-13077
Security: CVE-2017-13078
Security: CVE-2017-13079
Security: CVE-2017-13080
Security: CVE-2017-13081
Security: CVE-2017-13082
Security: CVE-2017-13086
Security: CVE-2017-13087
Security: CVE-2017-13088
17:22:36 - r324696
(10 hours 13 minutes ago)
by gordon
Affects: 
(13 files)
/head/contrib/wpa/src/*
/head/contrib/wpa/wpa_supplicant/*
Update wpa_supplicant/hostapd for 2017-01 vulnerability release.

hostapd: Avoid key reinstallation in FT handshake
Prevent reinstallation of an already in-use group key
Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases
Fix TK configuration to the driver in EAPOL-Key 3/4 retry case
Prevent installation of an all-zero TK
Fix PTK rekeying to generate a new ANonce
TDLS: Reject TPK-TK reconfiguration
WNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use
WNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been used
WNM: Ignore WNM-Sleep Mode Response without pending request
FT: Do not allow multiple Reassociation Response frames
TDLS: Ignore incoming TDLS Setup Response retries

Submitted by: jhb
Obtained from: https://w1.fi/security/2017-01/ (against later version)
Security: FreeBSD-SA-17:07
Security: CERT VU#228519
Security: CVE-2017-13077
Security: CVE-2017-13078
Security: CVE-2017-13079
Security: CVE-2017-13080
Security: CVE-2017-13081
Security: CVE-2017-13082
Security: CVE-2017-13086
Security: CVE-2017-13087
Security: CVE-2017-13088
Differential Revision: https://reviews.freebsd.org/D12693
16:29:50 - r324695
(11 hours 6 minutes ago)
by jonathan
Affects:  /head/share/mk/bsd.lib.mk
Add LLVM IR libraries to CLEANFILES.

We previously taught the build system how to create files like libfoo.bc,
but neglected to teach it about cleaning such files up. Rectify this now.

MFC after: 1 week
Sponsored by: DARPA, AFRL
16:03:59 - r324694
(11 hours 32 minutes ago)
by avg
Affects:  /head/sys/dev/iscsi/iscsi.c
never retry oustanding requests when terminating iscsi session

CAM_REQ_ABORTED sounds natural for aborting outstanding requests when
tearing down a session, but that status actually causes eligible
requests to be tried again. That's completely useless, so let's use
CAM_DEV_NOT_THERE instead. Perhaps there is a better status, but this
should be good enough. The change should affect only the session
termination.

Tested by: Ben RUBSON <ben.rubson@gmail.com>
Reviewed by: mav, trasz
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12653
15:53:22 - r324693
(11 hours 43 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/usr.bin/su/su.c
MFC r324497:

Mute gcc warning about p not being possibly initialized

I'm running into this warning on a tinderbox run with gcc 4.2.1 with mips and
powerpc.
15:53:19 - r324692
(11 hours 43 minutes ago)
by ngie
Affects: 
(2 files)
/stable/10/usr.bin/su/su.c
MFC r324497:

Mute gcc warning about p not being possibly initialized

I'm running into this warning on a tinderbox run with gcc 4.2.1 with mips and
powerpc.
15:52:02 - r324691
(11 hours 44 minutes ago)
by ngie
Affects: 
(3 files)
/stable/11/sbin/growfs/tests/legacy_test.pl
/stable/11/tests/sys/geom/class/eli/resize_test.sh
MFC r324478:

Check the exit code from fsck_ffs instead of relying on MODIFIED being in the
output

^/head@r323923 changed when MODIFIED is printed at exit. It's better to follow
the
documented way of determining whether or not a filesystem is clean per
fsck_ffs, i.e.,
ensure that the exit code is either 0 or 7.

The pass/fail determination is brittle prior to this commit, and ^/head@r323923
made
the issue apparent -- thus this needs to be fixed independent of ^/head@r323923.

PR: 222780
MFC with: r323923
15:49:36 - r324690
(11 hours 46 minutes ago)
by ngie
Affects: 
(3 files)
/stable/10/sbin/growfs/tests/legacy_test.pl
/stable/10/tests/sys/geom/class/eli/resize_test.sh
MFC r324478:

Check the exit code from fsck_ffs instead of relying on MODIFIED being in the
output

^/head@r323923 changed when MODIFIED is printed at exit. It's better to follow
the
documented way of determining whether or not a filesystem is clean per
fsck_ffs, i.e.,
ensure that the exit code is either 0 or 7.

The pass/fail determination is brittle prior to this commit, and ^/head@r323923
made
the issue apparent -- thus this needs to be fixed independent of ^/head@r323923.

PR: 222780
MFC with: r323923
15:39:38 - r324689
(11 hours 56 minutes ago)
by avg
Affects:  /head/sys/dev/iscsi/iscsi.c
iscsi: do not hold the global lock while tearing down a session

It should be sufficient to hold the lock just for removing the session
from the session list. Everything else should be covered by the session
specific lock.

On top of that, at present we can get a deadlock caused by waiting on
the CAM SIM reference count while holding the global lock. A specific
scenario involving ZFS is this:
- concurrent termination of two sessions, S1 and S2
- session S1 completed all I/Os and sleeps in CAM waiting for device
  close by ZFS;
- session S2 is also dead now, but can not forcefully complete
  outstanding requests by calling iscsi_session_cleanup() from
  iscsi_maintenance_thread_terminate(), since it can't get the same
  global sc_lock;
- as soon as there are unfinished requests, ZFS can not do
  spa_config_enter() as writer, and so can not close the device for
  session S1;
- deadlock.

Reported by: Ben RUBSON <ben.rubson@gmail.com>
Tested by: Ben RUBSON <ben.rubson@gmail.com>
Reviewed by: mav, trasz
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12652
14:37:12 - r324688
(12 hours 59 minutes ago)
by maxim
Affects:  /head/share/misc/bsd-family-tree
DragonFly 5.0.0 release added.
12:45:51 - r324687
(14 hours 50 minutes ago)
by jhb
Affects: 
(10 files)
/stable/11/sys/*
MFC 323579,323585: Add AT_HWCAP and AT_EHDRFLAGS on all platforms.

To preserve KBI on stable/11, a new SV_HWCAP flag is added which
indicates if the sv_hwcap field is present and valid to avoid examining
the field in old modules. Only sysentvec's which wish to use sv_hwcap
need to set the flag in stable/11.

323579:
Add AT_HWCAP and AT_EHDRFLAGS on all platforms.

A new 'u_long *sv_hwcap' field is added to 'struct sysentvec'. A
process ABI can set this field to point to a value holding a mask of
architecture-specific CPU feature flags. If an ABI does not wish to
supply AT_HWCAP to processes the field can be left as NULL.

The support code for AT_EHDRFLAGS was already present on all systems,
just the #define was not present. This is a step towards unifying the
AT_* constants across platforms.

323585:
Add AT_EHDRFLAGS and AT_HWCAP on amd64.

x86 has two separate (but identical) list of AT_* constants and the
earlier commit to add AT_HWCAP only updated the i386 list.
12:42:17 - r324686
(14 hours 54 minutes ago)
by tuexen
Affects: 
(2 files)
/stable/11/sys/netinet/tcp_usrreq.c
MFC r322648:

Ensure inp_vflag is consistently set for TCP endpoints.

Make sure that the flags INP_IPV4 and INP_IPV6 are consistently set
for inpcbs used for TCP sockets, no matter if the setting is derived
from the net.inet6.ip6.v6only sysctl or the IPV6_V6ONLY socket option.
For UDP this was already done right.

PR: 221385
11:20:32 - r324685
(16 hours 15 minutes ago)
by hselasky
Affects: 
(25 files)
/stable/10/sys/dev/*
/stable/10/sys/ofed/*
MFC r289568, r300676, r300677, r300719, r300720 and r300721:
Implement LinuxKPI module parameters as SYSCTLs.

The bool module parameter is no longer supported, because there is no
equivalent in FreeBSD 10-stable. These are converted into "int" type.

There are two macros available which control the behaviour of the
LinuxKPI module parameters:

- LINUXKPI_PARAM_PARENT allows the consumer to set the SYSCTL parent
where the modules parameters will be created.

- LINUXKPI_PARAM_PREFIX defines a parameter name prefix, which is
  added to all created module parameters.

The LinuxKPI module parameters also have a permissions value.
If any write bits are set we are allowed to modify the module
parameter runtime. Reflect this when creating the static SYSCTL
nodes.

The module_param_call() function is no longer supported.

Sponsored by: Mellanox Technologies
02:53:42 - r324684
(1 day ago)
by emaste
Affects:  /head/lib/libstand
Remove lib/libstand again, accidentally readded in r324683
02:51:45 - r324683
(1 day ago)
by emaste
Affects:  /head/lib/libc/sys/write.2
/head/lib/libstand
write.2: correct maximum nbytes size for EINVAL error

In FreeBSD 11 and later debug.iosize_max_clamp defaults to 0, and the
maximum nbytes count for write(2) is SSIZE_MAX. Update the man page to
document this, and mention the sysctl that can be set to obtain the
previous behaviour.

PR: 196666
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
01:15:55 - r324682
(1 day 2 hours ago)
by cy
Affects:  /head/etc/periodic/daily/480.leapfile-ntpd
Style. Replace 8 spaces with a tab.

MFC after: 2 weeks (with prior commit to this file)
01:15:13 - r324681
(1 day 2 hours ago)
by cy
Affects:  /head/etc/defaults/periodic.conf
/head/etc/periodic/daily/480.leapfile-ntpd
Provide an option to run the anticongestion ntpd leapfile fetch in
the background.

Original patch submitted by feld@. I added the "optional" bit.

Submitted by: feld (original patch)
MFC after: 2 weeks
01:12:17 - r324680
(1 day 2 hours ago)
by rlibby
Affects:  /head/sys/gdb/gdb_main.c
gdb kernel server: fixup Search:memory style

This is a NFC patch to move around the Search:memory implementation so
that it doesn't exceed the standard column width and doesn't take so
much vertical space in gdb_trap.

Submitted by: Daniel O'Connor <darius@dons.net.au>
Reviewed by: cem, jhb
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12684
00:25:44 - r324679
(1 day 3 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/share/man/man9/sysctl.9
MFC r324509: sysctl.9: document CTLFLAG_CAPRD and CTLFLAG_CAPWR

Reported by: Shawn Webb
Sponsored by: The FreeBSD Foundation
2017 - 10 - 16   (2 days ago)
23:43:18 - r324678
(1 day 3 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
Change the pNFS server to use the taskqueue code (common with the client)
to do concurrent I/O operations to the mirrored DSs, instead of using
kproc_create()/kproc_exit() for every RPC.
23:40:24 - r324677
(1 day 3 hours ago)
by rmacklem
Affects: 
(381 files)
/projects/pnfs-planb-server/sys/*
Merge in a current kernel from head.
23:28:12 - r324676
(1 day 4 hours ago)
by rmacklem
Affects:  /head/sys/fs/nfs/nfs_commonport.c
/head/sys/fs/nfsclient/nfs_clrpcops.c
Use taskqueue(9) to do writes/commits to mirrored DSs concurrently.

When the NFSv4.1 pNFS client is using a Flexible File Layout specifying
mirrored Data Servers, it must do the writes and commits to all mirrors.
This patch modifies the client to use a taskqueue to perform these writes
and commits concurrently.
The number of threads can't be changed for taskqueue(9), so it is set
to 4 * mp_ncpus by default, but this can be overridden by setting the
sysctl vfs.nfs.pnfsiothreads.

Differential Revision: https://reviews.freebsd.org/D12632
21:55:31 - r324675
(1 day 5 hours ago)
by mckusick
Affects: 
(2 files)
/stable/10/sbin/fsck_ffs/main.c
MFC of 324456.

Do not report filesystem as modified if only timestamp updated in superblock.
21:53:29 - r324674
(1 day 5 hours ago)
by mckusick
Affects: 
(2 files)
/stable/11/sbin/fsck_ffs/main.c
MFC of 324456.

Do not report filesystem as modified if only timestamp updated in superblock.
21:46:11 - r324673
(1 day 5 hours ago)
by avos
Affects:  /head/sys/kern/uipc_mbuf.c
mbuf(9): unbreak m_fragment()

- Fix it by replacing m_cat() with m_prev->m_next = m_new
(m_cat() will try to append data - as a result, there will be no
fragmentation).
- Move some constants out of the loop.

Was previously tested with D4077.

Differential Revision: https://reviews.freebsd.org/D4090
21:21:31 - r324672
(1 day 6 hours ago)
by avos
Affects:  /head/sys/net/if_clone.c
ifnet(9): split ifc_alloc_unit() (should simplify code flow)

Allocate smallest unit number from pool via ifc_alloc_unit_next()
and exact unit number (if available) via ifc_alloc_unit_specific().

While here, address possible deadlock (mentioned in PR).

PR: 217401
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D12551
20:21:51 - r324671
(1 day 7 hours ago)
by kib
Affects:  /head/sys/kern/kern_sig.c
Re-evaluate thread' signal mask after ptracestop().

The stop drops process lock, which allows the signal mask to be
changed and our selected signal might become blocked, i.e. should be
returned to the process queue instead of delivery.

Also, for the existing check of the process no longer having an
attached debugger, we should not loose the signal, but requeue it.

Reported and tested by: bdrewery
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
20:15:19 - r324670
(1 day 7 hours ago)
by kib
Affects:  /head/sys/kern/kern_sig.c
Improve assertion that an ignored or blocked signal is not delivered.

Split two conditions into separate asserts. Print additional details,
like the signal number and action value.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
20:11:29 - r324669
(1 day 7 hours ago)
by kib
Affects:  /head/sys/kern/kern_sig.c
Style.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
20:06:24 - r324668
(1 day 7 hours ago)
by bdrewery
Affects:  /head/tests/sys/kern/ptrace_test.c
This child is expected to exit on SIGTRAP, don't leave a core behind.

MFC after: 1 week
Sponsored by: Dell EMC Isilon
17:21:52 - r324667
(1 day 10 hours ago)
by romain
Affects:  /head/lib/libgeom/Makefile
/head/lib/libgeom/libgeom.3
Add a quick description of the geom_getxml(3), geom_xml2tree(3),
geom_gettree(3) and geom_deletetree(3) functions provided by libgeom and are
not documented in libgeom(3).

Reviewed by: mav, bjk, allanjude
Approved by: allanjude
Differential Revision: https://reviews.freebsd.org/D12679
16:14:50 - r324666
(1 day 11 hours ago)
by mjoras
Affects:  /head/sys/kern/subr_unit.c
Properly reset the fields in clean_unrhdr.

In r324542 I neglected to reset the first and last fields of struct
unrhdr. This causes a tmpfs to fail the unr(9) consistency checks with
DIAGNOSTIC on. Fix this by resetting the fields by calling init_unrhdr.
While here, change a loop to use TAILQ_FOREACH_SAFE since it is more
readable and equally fast.

Reported by: David Wolfskill <david@catwhisker.org>
Approved by: rstone (mentor)
Sponsored by: Dell EMC Isilon
15:16:24 - r324665
(1 day 12 hours ago)
by kib
Affects:  /head/sys/amd64/amd64/pmap.c
/head/sys/amd64/include/pmap.h
Fix the pv_chunks pc_lru tailq handling in reclaim_pv_chunk().

For processing, reclaim_pv_chunk() removes the pv_chunk from the lru
list, which makes pc_lru linkage invalid. Then the pmap lock is
released, which allows for other thread to free the last pv entry
allocated from the chunk and call free_pv_chunk(), which tries to
modify the invalid linkage.

Similarly, the chunk is inserted into the private tailq new_tail
temporary. Again, free_pv_chunk() might be run and corrupt the
linkage for the new_tail after the pmap lock is dropped.

This is a consequence of r299788 elimination of pvh_global_lock, which
allowed for reclaim to run in parallel with other pmap calls which
free pv chunks.

As a fix, do not remove the chunk from pc_lru queue, use a marker to
remember the position in the queue iteration. We can safely operate
on the chunks after the chunk's pmap is locked, we fetched the chunk
after the marker, and we checked that chunk pmap is same as we have
locked, because chunk removal from pc_lru requires both pv_chunk_mutex
and the pmap mutex owned.

Note that the fix lost an optimization which was present in the
previous algorithm. Namely, new_tail requeueing rotated the pv chunks
list so that reclaim didn't scan the same pv chunks that couldn't be
freed (because they contained a wired and/or superpage mapping) on
every invocation. An additional change is planned which would improve
this.

Reported and tested by: pho
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
15:05:32 - r324664
(1 day 12 hours ago)
by kp
Affects:  /head/tests/sys/netpfil/pf/forward.sh
/head/tests/sys/netpfil/pf/pass_block.sh
/head/tests/sys/netpfil/pf/set_tos.sh
pf tests: Use pft_set_rules everywhere

We now have a utility function to set pf rules in the jail. Use it
whenever we need to set the pf rules in the test jail.
15:03:45 - r324663
(1 day 12 hours ago)
by kp
Affects:  /head/tests/sys/netpfil/pf/forward.sh
/head/tests/sys/netpfil/pf/pft_ping.py
/head/tests/sys/netpfil/pf/utils.subr
pf tests: Basic IPv6 forwarding tests

Pass/block packets in the forwarding path with pf.

Introduce the pft_set_rules() helper function, because we need to
remember to flush states between individual tests. If not we can get
packets passing despite rules blocking them because they match states
created in a previous test.

Extend pft_ping.py to be able to send IPv6 echo requests.
15:01:49 - r324662
(1 day 12 hours ago)
by kp
Affects:  /head/tests/sys/netpfil/pf/Makefile
/head/tests/sys/netpfil/pf/pft_ping.py
/head/tests/sys/netpfil/pf/set_tos.sh
pf: test set-tos

Introduce tests for the set-tos feature of pf. Teach pft_ping.py to send
and verify ToS flags.
12:54:53 - r324661
(1 day 14 hours ago)
by mav
Affects:  /head/sys/dev/sound/pci/hda/hdac.c
/head/sys/dev/sound/pci/hda/hdac.h
Add Creative vendor ID.

MFC after: 1 week
12:53:54 - r324660
(1 day 14 hours ago)
by mmel
Affects: 
(6 files)
/head/lib/libc/arm/gen/*
/head/sys/arm/arm/*
/head/sys/arm/include/*
Save VFP state in getcontext(3) on ARM.
This is a last followup of r315974, which fixes userland part
of VFP save/restore problems described in PR 217611.

PR: 217611
MFC after: 2 weeks
12:32:57 - r324659
(1 day 15 hours ago)
by mav
Affects:  /head/share/man/man4/bridge.4
Update details of interface capabilities changed by bridge(4).

PR: 221122
MFC after: 1 week
07:15:50 - r324658
(1 day 20 hours ago)
by avos
Affects:  /head/usr.sbin/wlandebug/wlandebug.c
wlandebug(8): add a sanity check.
07:01:27 - r324657
(1 day 20 hours ago)
by avos
Affects:  /head/usr.sbin/wlandebug/Makefile
/head/usr.sbin/wlandebug/wlandebug.c
wlandebug(8): obtain original interface name via ifconfig_get_orig_name()
06:54:26 - r324656
(1 day 20 hours ago)
by avos
Affects:  /head/lib/libifconfig/libifconfig.c
/head/lib/libifconfig/libifconfig.h
libifconfig: allow to get original interface name via ifconfig_get_orig_name()

Uses the same method as in tools/tools/ifinfo/ifinfo.c
(via net.link.generic sysctl).

Tested with modified wlandebug(8).

Differential Revision: https://reviews.freebsd.org/D12554
04:46:28 - r324655
(1 day 22 hours ago)
by delphij
Affects:  /head/lib/libstand
Remove the libstand directory which is now empty.
03:59:58 - r324654
(1 day 23 hours ago)
by imp
Affects:  /head/sys/boot/libsa/Makefile
Explicitly inlcude SYSDIR in the include path -- need machine path too?
03:59:52 - r324653
(1 day 23 hours ago)
by imp
Affects: 
(17 files)
/head/sys/boot/*
LOADER_foo_SUPPORTED
03:59:44 - r324652
(1 day 23 hours ago)
by imp
Affects: 
(16 files)
/head/sys/boot/*
Move all the ficl common code into ficl.mk

There's a number of copies of basically identical code to enable
building forth in /boot/loader. Move it all into ficl.mk.
03:59:38 - r324651
(1 day 23 hours ago)
by imp
Affects: 
(4 files)
/head/sys/boot/*
create defs.mk for common definitions
03:59:33 - r324650
(1 day 23 hours ago)
by imp
Affects:  /head/sys/boot/ficl.mk
tweak style
03:59:28 - r324649
(1 day 23 hours ago)
by imp
Affects: 
(14 files)
/head/sys/boot/*
Move common/Makefile.inc to sys/boot/loader.mk.

Makefile.inc has a specific meaning in the tree, and
common/Makefile.inc doesn't quite fit into that. Rename it to
loader.mk and it will be a place to collect common things to all
/boot/loader programs there.

Sponsored by: Netflix
03:59:22 - r324648
(1 day 23 hours ago)
by imp
Affects: 
(5 files)
/head/sys/boot/*
Rename top level Makefile.ficl to ficl.mk.
03:59:17 - r324647
(1 day 23 hours ago)
by imp
Affects: 
(8 files)
/head/sys/boot/Makefile
/head/sys/boot/common/*
/head/sys/boot/man/*
Move orphaned man pages into new man directory from common. This helps
keep cleaer that common is just for the MI files for /boot/loader
programs.

Sponsored by: Netflix
03:59:11 - r324646
(1 day 23 hours ago)
by imp
Affects: 
(9 files)
/head/sys/boot/efi/boot1/*
/head/sys/boot/efi/libefi/*
/head/sys/boot/efi/loader/*
Unify boot1 with loader

Refactor boot1 to use the same I/O code as /boot/loader uses. Refactor
to use the common efi_main.c.

Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D10447
2017 - 10 - 15   (3 days ago)
23:54:04 - r324645
(2 days 3 hours ago)
by imp
Affects:  /head/sys/cam/ata/ata_da.c
/head/sys/cam/scsi/scsi_da.c
Zero out the ccb's alloated on the stack for the dump routines to more
closely match a ccb returned from xpt_get_ccb().

Sponsored by: Netflix
23:53:55 - r324644
(2 days 3 hours ago)
by imp
Affects:  /head/sys/cam/nvme/nvme_da.c
/head/sys/dev/nvme/nvme.h
Closer examination shows that nvme and CAM both normally zero-fill
allocations (for req and ccb, which ultimately contain the
nvme_cmd). As such, we can micro-optimize these routines. Add a
comment to this effect, and bzero the ccb used to make the requests
for the nda dump rotuine so it more closely matches a ccb allocated
with xpt_get_ccb().

Sponsored by: Netflix
22:45:25 - r324643
(2 days 4 hours ago)
by brooks
Affects: 
(3 files)
/stable/10/sys/conf/kern.pre.mk
/stable/10/sys/conf/kmod.mk
MFC r321256:

Include ARCH_FLAGS in CFLAGS when building modules.

Without this change, modules will match the default compiler
configuration which may not be the same as the kernel values.

Reviewed by: imp
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11633
22:43:56 - r324642
(2 days 4 hours ago)
by brooks
Affects: 
(3 files)
/stable/11/sys/conf/kern.pre.mk
/stable/11/sys/conf/kmod.mk
MFC r321256:

Include ARCH_FLAGS in CFLAGS when building modules.

Without this change, modules will match the default compiler
configuration which may not be the same as the kernel values.

Reviewed by: imp
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11633
22:39:31 - r324641
(2 days 4 hours ago)
by brooks
Affects: 
(2 files)
/stable/10/sys/kern/kern_proc.c
MFC r320999:

Add 32-bit compat for kinfo_proc's ki_tdaddr.

This appears to have been an oversight in r213536.

Reviewed by: markj
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11521
22:34:12 - r324640
(2 days 5 hours ago)
by brooks
Affects: 
(2 files)
/stable/11/sys/kern/kern_proc.c
MFC r320999:

Add 32-bit compat for kinfo_proc's ki_tdaddr.

This appears to have been an oversight in r213536.

Reviewed by: markj
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11521
22:22:27 - r324639
(2 days 5 hours ago)
by rmacklem
Affects:  /head/sys/fs/nfsserver/nfs_nfsdserv.c
/head/sys/fs/nfsserver/nfs_nfsdstate.c
Fix the client IP address reported by nfsdumpstate for 64bit arch and NFSv4.1.

The client IP address was not being reported for some NFSv4 mounts by
nfsdumpstate. Upon investigation, two problems were found for mounts
using IPv4. One was that the code (originally written and tested on i386)
assumed that a "u_long" was a "uint32_t" and would exactly store an
IPv4 host address. Not correct for 64bit arches.
Also, for NFSv4.1 mounts, the field was not being filled in. This was
basically correct, because NFSv4.1 does not use a callback address.
However, it meant that nfsdumpstate could not report the client IP addr.
This patch should fix both of these issues.
For IPv6, the address will still not be reported. The original NFSv4 RFC
only specified IPv4 callback addresses. I think this has changed and, if so,
a future commit to fix reporting of IPv6 addresses will be needed.

Reported by: manu
PR: 223036
MFC after: 2 weeks
19:33:30 - r324638
(2 days 8 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_input.c
Fix the handling of parital and too short chunks.

Ensure that the current behaviour is consistent: stop processing
of the chunk, but finish the processing of the previous chunks.

This behaviour might be changed in a later commit to ABORT the
assoication due to a protocol violation, but changing this
is a separate issue.

MFC after: 3 days
19:28:14 - r324637
(2 days 8 hours ago)
by tijl
Affects:  /head/sys/compat/linsysfs/linsysfs.c
Add information needed by Linux libdrm 2.4.74 (shipped with CentOS 7.4).

Create a config file for PCI devices that exposes their configuration
space. Only fields needed by libdrm are filled in (vendor, device,
revision, subvendor and subdevice).

Link /sys/class/drm/card%d/device to the PCI device directory.
19:21:15 - r324636
(2 days 8 hours ago)
by tijl
Affects:  /head/sys/compat/linsysfs/linsysfs.c
Set DEVNAME to dri/card%d. This works with both in-tree drm and drm-next
and is also the value used on Linux.

Tested by: Greg V <greg@unrelenting.technology>
18:53:21 - r324635
(2 days 8 hours ago)
by tijl
Affects:  /head/sys/kern/vfs_lookup.c
When a Linux program tries to access a /path the kernel tries
/compat/linux/path before /path. Stop following symbolic links when
looking up /compat/linux/path so dead symbolic links aren't ignored.
This allows syscalls like readlink(2) and lstat(2) to work on such links.
And open(2) will return an error now instead of trying /path.
16:19:09 - r324634
(2 days 11 hours ago)
by imp
Affects:  /head/sys/dev/nvme/nvme_sim.c
Use nvme_ctrlr_poll instead of nvme_ctrlr_intx_handler since it is
more general and doesn't try to access registers that may be undefined
when the card is in MSIX mode.

This change, along with r324630, r324631, r324632, makes nda crash
dumps work again. Previously, they only worked on CPU 0 when the stack
garbage was just so.

Sponsored by: Netflix
Suggested by: scottl@ (who provided earlier version of the patch)
16:18:08 - r324633
(2 days 11 hours ago)
by imp
Affects:  /head/sys/dev/nvme/nvme_ctrlr.c
/head/sys/dev/nvme/nvme_private.h
Create general polling function for the nvme controller. Use it when
we're doing the various pin-based interrupt modes. Adjust
nvme_ctrlr_intx_handler to use nvme_ctrlr_poll.

Sponsored by: Netflix
Suggested by: scottl@
16:18:03 - r324632
(2 days 11 hours ago)
by imp
Affects:  /head/sys/cam/nvme/nvme_da.c
Be nicer on the dump stack by allocating only a ccb_nvmeio rather than
a full ccb. This saves a few hundre bytes, which might be important
during a crash dump...

Sponsored by: Netflix
Suggested by: scottl@
16:17:59 - r324631
(2 days 11 hours ago)
by imp
Affects:  /head/sys/dev/nvme/nvme.h
Explicitly set reserved fields and 'fuse' to 0. This prevents us from
acidentally sending bogus values in these fields, which some drives
may reject with an error or worse (undefined behavior).

This is especially needed for the ndadump routine which allocates the
cmd from stack garbage....

Sponsored by: Netflix
16:17:55 - r324630
(2 days 11 hours ago)
by imp
Affects:  /head/sys/cam/nvme/nvme_da.c
Update comment to reflect actual default timeout.

Sponsored by: Netflix
16:08:22 - r324629
(2 days 11 hours ago)
by tijl
Affects:  /head/sys/compat/linux/linux_util.c
Add special handling for current in-tree drm devices, like r323692 added
for drm-next.
16:03:45 - r324628
(2 days 11 hours ago)
by tijl
Affects:  /head/sys/compat/linux/linux_util.c
Use sizeof instead of strlen on string constants. The compiler doesn't
optimise the strlen calls away with -ffreestanding.
14:03:53 - r324627
(2 days 13 hours ago)
by fsu
Affects: 
(4 files)
/stable/11/sys/fs/ext2fs/*
MFC r324064:
Add check to avoid raw inode iblocks fields overflow in case of huge_file
feature.
Use the Linux logic for now.

Approved by: pfg (mentor)
Differential Revision: https://reviews.freebsd.org/D12131
11:46:11 - r324626
(2 days 15 hours ago)
by trasz
Affects: 
(7 files)
/head/sys/dev/usb/template/*
Replace some magic numbers in usb_template(4) code with #defines.
There should be no functional changes.

Reviewed by: hselasky
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12670
11:28:41 - r324625
(2 days 16 hours ago)
by jilles
Affects:  /head/etc/rc.subr
rc.subr: Remove test that is always true.

The code above always sets _pidcmd to a non-empty value.
10:59:31 - r324624
(2 days 16 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/dev/smbus/smb.c
MFC r324156:
Improve smb(4) devfs interactions.
08:03:14 - r324623
(2 days 19 hours ago)
by bapt
Affects:  /head/usr.sbin/ctld/uclparse.c
Fix ctld segfaulting when using ucl conf file format and having duplicated
lun or target

Submitted by: Nikita Kozlov <nikita.kozlov at blade-group.com>
MFC after: 3 days
Sponsored by: blade
Differential Revision: https://reviews.freebsd.org/D12646
02:40:13 - r324622
(3 days ago)
by cy
Affects:  /head/include/stddef.h
Sync (make same) the offsetof macro definition in include/ with the
definition of the same in sys/sys/. The problem was discovered while
working on implementing a new C11 gets_s() for libc. (The new gets_s()
requires rsize_t found in include/stddef.h.) The solution to sync the two
definitions was suggested by ed@ while discussing D12667.

Suggested by: ed
MFC after: 2 weeks
2017 - 10 - 14   (4 days ago)
23:25:44 - r324621
(3 days 4 hours ago)
by rlibby
Affects:  /head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
mlx4: use enum constants instead of const vars for case exprs

Follow up from r324201 to fix compilation with gcc, which complains
about non-ICE case expressions.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D12675
19:02:52 - r324620
(3 days 8 hours ago)
by fsu
Affects:  /head/sys/fs/fuse/fuse_ipc.c
/head/sys/fs/fuse/fuse_vnops.c
Add extended attributes support to fuse kernel module.

Author: kem
Reviewed by: cem, pfg (mentor)
Approved by: pfg (mentor)
MFC after: 2 weeks

Differential Revision: https://reviews.freebsd.org/D12485
18:38:36 - r324619
(3 days 8 hours ago)
by brooks
Affects: 
(18 files)
/head/usr.bin/procstat/*
Switch procstat from subcommand flags to verbs

- Use an enumerated value instead of separate flags for commands
- Look for a verb if no command flag is set
- Lookup the "xocontainer" value based on the command
- Document the new command verbs in the man-page

Submitted by: kdrakehp@zoho.com
Differential Revision: https://reviews.freebsd.org/D10916
17:51:25 - r324618
(3 days 9 hours ago)
by markj
Affects: 
(2 files)
/stable/11/sys/kern/uipc_shm.c
MFC r324146:
Have uiomove_object_page() keep accessed pages in the active queue.
16:49:39 - r324617
(3 days 10 hours ago)
by brooks
Affects: 
(2 files)
/stable/10/lib/libc/gen/tls.c
MFC r324243:

Remove an unneeded and incorrect memset().

On Variant I TLS architectures (aarch64, arm, mips, powerpc, and riscv)
the __libc_allocate_tls function allocates thread local storage memory
with calloc(). It then copies initialization data over the portions with
non-zero initial values. Before this change it would then pointlessly
zero the already zeroed remainder of the storage. Unfortunately the
calculation was wrong and it would zero TLS_TCB_SIZE (2*sizeof(void *))
additional bytes.

In practice, this overflow only matters if the TLS segment is sized such
that calloc() allocates less than TLS_TCB_SIZE extra memory. Even
then, the likely result will be zeroing part of the next bucket. This
coupled with the impact being confined to Tier II platforms means there
will be no security advisory for this issue.

Reviewed by: kib, dfr
Discussed with: security-officer (delphij)
Found by: CHERI
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12547
16:23:25 - r324616
(3 days 11 hours ago)
by brooks
Affects: 
(2 files)
/stable/11/lib/libc/gen/tls.c
MFC r324243:

Remove an unneeded and incorrect memset().

On Variant I TLS architectures (aarch64, arm, mips, powerpc, and riscv)
the __libc_allocate_tls function allocates thread local storage memory
with calloc(). It then copies initialization data over the portions with
non-zero initial values. Before this change it would then pointlessly
zero the already zeroed remainder of the storage. Unfortunately the
calculation was wrong and it would zero TLS_TCB_SIZE (2*sizeof(void *))
additional bytes.

In practice, this overflow only matters if the TLS segment is sized such
that calloc() allocates less than TLS_TCB_SIZE extra memory. Even
then, the likely result will be zeroing part of the next bucket. This
coupled with the impact being confined to Tier II platforms means there
will be no security advisory for this issue.

Reviewed by: kib, dfr
Discussed with: security-officer (delphij)
Found by: CHERI
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12547
10:02:59 - r324615
(3 days 17 hours ago)
by tuexen
Affects: 
(6 files)
/head/sys/netinet/*
Code cleanup, not functional change.

This avoids taking a pointer of a packed structure which allows simpler
compilation of the userland stack.

MFC after: 1 week
04:27:58 - r324614
(3 days 23 hours ago)
by mjg
Affects:  /head/sys/sys/vmmeter.h
Fix wrong v_free_count annotation - (f) instead of (a)

Reported by: alc
00:47:30 - r324613
(4 days 2 hours ago)
by mjg
Affects:  /head/sys/kern/kern_mutex.c
mtx: fix up owner_mtx after r324609

Now that MTX_UNOWNED is 0 the test was alwayas false.
2017 - 10 - 13   (5 days ago)
22:40:57 - r324612
(4 days 4 hours ago)
by jhb
Affects: 
(4 files)
/stable/10/sys/ufs/ffs/ffs_softdep.c
/stable/11/sys/ufs/ffs/ffs_softdep.c
MFC 324039: Don't defer wakeup()s for completed journal workitems.

Normally wakeups() are performed for completed softupdates work items
in workitem_free() before the underlying memory is free()'d.
complete_jseg() was clearing the "wakeup needed" flag in work items to
defer the wakeup until the end of each loop iteration. However, this
resulted in the item being free'd before it's address was used with
wakeup(). As a result, another part of the kernel could allocate this
memory from malloc() and use it as a wait channel for a different
"event" with a different lock. This triggered an assertion failure
when the lock passed to sleepq_add() did not match the existing lock
associated with the sleep queue. Fix this by removing the code to
defer the wakeup in complete_jseg() allowing the wakeup to occur
slightly earlier in workitem_free() before free() is called.
21:58:44 - r324611
(4 days 5 hours ago)
by jhb
Affects: 
(4 files)
/stable/10/sys/kern/vfs_cache.c
/stable/11/sys/kern/vfs_cache.c
MFC 324073: Use UMA_ALIGNOF() for name cache UMA zones.

This fixes kernel crashes due to misaligned accesses to the 64-bit
time_t embedded in struct namecache_ts in MIPS n32 kernels.
21:54:34 - r324610
(4 days 5 hours ago)
by mjg
Affects:  /head/sys/sys/vmmeter.h
/head/sys/vm/vm_page.c
/head/sys/vm/vm_phys.h
Reduce traffic on vm_cnt.v_free_count

The variable is modified with the highly contended page free queue lock.
It unnecessarily shares a cacheline with purely read-only fields and is
re-read after the lock is dropped in the page allocation code making the
hold time longer.

Pad the variable just like the others and store the value as found with
the lock held instead of re-reading.

Provides a modest 1%-ish speed up in concurrent page faults.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D12665
20:31:56 - r324609
(4 days 7 hours ago)
by mjg
Affects:  /head/sys/sys/mutex.h
mtx: change MTX_UNOWNED from 4 to 0

The value is spread all over the kernel and zeroing a register is
cheaper/shorter than setting it up to an arbitrary value.

Reduces amd64 GENERIC-NODEBUG .text size by 0.4%.

MFC after: 1 week
20:29:35 - r324608
(4 days 7 hours ago)
by kp
Affects:  /head/etc/devd/usb.conf
Regenerate usb.conf
19:41:35 - r324607
(4 days 7 hours ago)
by kp
Affects:  /head/sys/dev/usb/serial/u3g.c
/head/sys/dev/usb/usbdevs
Support the D-Link DWM-222 LTE Dongle

Submitted by: Daniel Hänschke <jailedemon@googlemail.com>
19:27:33 - r324606
(4 days 8 hours ago)
by markj
Affects:  /head/sys/compat/linuxkpi/common/src/linux_schedule.c
Make the PHOLD in linux_wait_event_common() unconditional.

After some in-progress work is committed, this would otherwise be the only
instance of #if(n)def NO_SWAPPING in the tree. Moreover, the requisite
opt_vm.h include was missing, so the PHOLD/PRELE calls were always being
compiled in anyway.

MFC after: 1 week
18:30:32 - r324605
(4 days 9 hours ago)
by emaste
Affects:  /head/targets/pseudo/userland/gnu/Makefile.depend
clean up remnants of removed GPL software

send-pr r267486
texinfo r276551
ranlib r286332
sdiff r298823
rcs r307351
diff r317209
18:23:08 - r324604
(4 days 9 hours ago)
by emaste
Affects:  /head/targets/pseudo/userland/gnu/Makefile.depend
Remove additional groff leftovers (r319664)
17:15:17 - r324603
(4 days 10 hours ago)
by emaste
Affects:  /head/ObsoleteFiles.inc
ObsoleteFiles.inc: correct year on libstand removal
17:11:08 - r324602
(4 days 10 hours ago)
by jhb
Affects: 
(4 files)
/stable/10/sys/vm/uma.h
/stable/11/sys/vm/uma.h
MFC 324072: Add UMA_ALIGNOF().

This is a wrapper around _Alignof() that sets the alignment for a zone
to the alignment required by a given type. This allows the compiler to
determine the proper alignment rather than having the programmer try to
guess.
16:31:50 - r324601
(4 days 11 hours ago)
by alc
Affects:  /head/sys/kern/kern_sendfile.c
Address two problems with sendfile(..., SF_NOCACHE) and apply one
"optimization". First, sendfile(..., SF_NOCACHE) frees pages without
checking whether those pages are mapped. This can leave the system
with mappings to free or repurposed pages. Second, a page can be
busied between the time of the current busy test and acquiring the
object lock. Essentially, the test performed before the object lock
is acquired can only be regarded as an optimization to short-circuit
further work on the page. It cannot, however, be relied upon to prove
that it is safe to free the page. Third, when sendfile(..., SF_NOCACHE)
was originally implemented, vm_page_deactivate_noreuse() did not yet
exist. Use vm_page_deactivate_noreuse() instead of vm_page_deactivate(),
because it comes closer to freeing the page.

In collaboration with: glebius
Discussed with: gallatin, kib, markj
X-MFC after: r324448
16:23:05 - r324600
(4 days 11 hours ago)
by kib
Affects:  /head/sys/vm/swap_pager.c
Evaluate the real size of the sblk_zone.

Submitted by: ota@j.email.ne.jp
PR: 221356
Reviewed by: alc, markj
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D12660
15:16:57 - r324599
(4 days 12 hours ago)
by gjb
Affects: 
(10 files)
/head/release/arm/*
Increase the arm/armv6 and arm/armv7 images from 2.5GB to 3GB,
since the RPI2 (at least) does not fit in 2.5GB.

While here, add a missing BOARDNAME to RPI2.conf.

Sponsored by: The FreeBSD Foundation
15:02:29 - r324598
(4 days 12 hours ago)
by br
Affects:  /head/sys/dev/hwpmc/hwpmc_core.c
/head/sys/dev/hwpmc/hwpmc_intel.c
/head/sys/dev/hwpmc/pmc_events.h
o Support for Kabylake CPU PMCs (fall down to PMC_CPU_INTEL_SKYLAKE).
o Fix bugs in events descriptions for Skylake, Skylake Xeon and Haswell.

Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12654
14:14:46 - r324597
(4 days 13 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/src/linux_compat.c
Don't call selrecord() outside the select system call in the LinuxKPI, because
then td->td_sel is NULL and this will result in a segfault inside selrecord().
This happens when only using kqueue() to poll for read and write events.
If select() and kqueue() is mixed there won't be a segfault.

Reported by: Johannes Lundberg
MFC after: 1 week
Sponsored by: Mellanox Technologies
13:56:44 - r324596
(4 days 13 hours ago)
by markj
Affects: 
(3 files)
/stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c
/stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c
MFC r324373:
Avoid adding an extra "0x" prefix before pointer formats.
13:53:19 - r324595
(4 days 13 hours ago)
by emaste
Affects:  /head/sys/vm/vm_kern.c
ANSIfy vm_kern.c

PR: 222673
Submitted by: ota@j.email.ne.jp
MFC after: 1 week
13:47:55 - r324594
(4 days 13 hours ago)
by emaste
Affects:  /head/usr.bin/truss/main.c
truss: mention 'H' in usage

r295930 introduced the 'H' option to display thread IDs, but did not add
the option to usage().

PR: 222837
Submitted by: Oliver Kiddle <okiddle@yahoo.co.uk>
MFC after: 1 week
11:11:53 - r324593
(4 days 16 hours ago)
by ae
Affects:  /head/sys/netpfil/ipfw/ip_fw2.c
Fix regression in handling O_FORWARD_IP opcode after r279948.

To properly handle 'fwd tablearg,port' opcode, copy sin_port value from
sockaddr_in structure stored in the opcode into corresponding hopstore
field.

PR: 222953
MFC after: 1 week
11:01:33 - r324592
(4 days 16 hours ago)
by ae
Affects:  /head/sbin/ipfw/tables.c
Return 'errno' value from the table_do_modify_record(), it is expected
by table_modify_record().

This makes quiet operations with tables really quiet.

PR: 222953
MFC after: 1 week
09:42:05 - r324591
(4 days 17 hours ago)
by avg
Affects:  /head/sys/kern/vfs_mount.c
remove process and jail directory machinations from dounmount

The manipulations done by mountcheckdirs() are not that useful during
the unmount, they can bring about unexpected security consequences.

Thic change effectively reverts the change in r73241.

The change also allows to simplify the handling of rootvnode global
variable.

Discussed with: mckusick, mjg, kib
Reviewed by: trasz
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D12366
09:21:41 - r324590
(4 days 18 hours ago)
by avg
Affects:  /head/usr.sbin/i2c/i2c.8
/head/usr.sbin/i2c/i2c.c
i2c(8): clean up and clarify read operation

The code went to a lot of trouble to issue either a start+stop condition
or a repeated start condition only to follow it with a stop condition
and a read(2) call that issues a new start condition.
So, fix the read in I2C_MODE_REPEATED_START mode by using I2CREAD ioctl
within the running transaction. This obviously requires that the slave
address has the read bit set which was not required before.

Another problem was with width parameter of zero and
I2C_MODE_REPEATED_START mode. In that case we issued a repeated start
without any preceding start.

While here, remove the redundant (unused) argument to I2CSTOP throughout
the program.
Also, clarify the meaning of -w option, especially "-w 0", in the manual
page.

Reviewed by: no one
Differential Revision: https://reviews.freebsd.org/D12331
09:14:05 - r324589
(4 days 18 hours ago)
by avg
Affects: 
(3 files)
/stable/10/sys/geom/mirror/g_mirror.c
/stable/10/sys/geom/mirror/g_mirror.h
MFC r323612: gmirror: treat ENXIO as disk disconnect, not media error
09:13:08 - r324588
(4 days 18 hours ago)
by avg
Affects: 
(3 files)
/stable/11/sys/geom/mirror/g_mirror.c
/stable/11/sys/geom/mirror/g_mirror.h
MFC r323612: gmirror: treat ENXIO as disk disconnect, not media error
09:11:24 - r324587
(4 days 18 hours ago)
by avg
Affects: 
(2 files)
/stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
MFC r323528: MFV r323527: 5815 libzpool's panic function doesn't set global
panicstr
09:10:37 - r324586
(4 days 18 hours ago)
by avg
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
MFC r323528: MFV r323527: 5815 libzpool's panic function doesn't set global
panicstr
09:07:58 - r324585
(4 days 18 hours ago)
by avg
Affects: 
(2 files)
/stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
MFC r323525: MFV r323523: 8331 zfs_unshare returns wrong error code for smb
unshare failure
09:06:57 - r324584
(4 days 18 hours ago)
by avg
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
MFC r323525: MFV r323523: 8331 zfs_unshare returns wrong error code for smb
unshare failure
09:05:32 - r324583
(4 days 18 hours ago)
by avg
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
MFC r323524: MFV r316932: 6280 libzfs: unshare_one() could fail with
EZFS_SHARENFSFAILED
09:05:20 - r324582
(4 days 18 hours ago)
by avg
Affects: 
(2 files)
/stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
MFC r323524: MFV r316932: 6280 libzfs: unshare_one() could fail with
EZFS_SHARENFSFAILED
07:50:44 - r324581
(4 days 19 hours ago)
by bapt
Affects: 
(8 files)
/stable/11/contrib/mdocml/*
MFC: r324362

Import mandoc 1.14.3
06:49:07 - r324580
(4 days 20 hours ago)
by adrian
Affects:  /head/sys/net80211/ieee80211_input.h
[net80211] don't try to follow a NULL rxs pointer down the sink.

It's smelly, and we already checked earlier whether we needed to.
05:14:54 - r324579
(4 days 22 hours ago)
by sephe
Affects: 
(2 files)
/stable/11/sys/dev/hyperv/netvsc/if_hn.c
MFC 324517

  hyperv/hn: Enable transparent VF by default.

  Sponsored by: Microsoft
05:09:56 - r324578
(4 days 22 hours ago)
by sephe
Affects: 
(6 files)
/stable/11/sys/dev/hyperv/netvsc/*
MFC 324489,324516

324489
  hyperv/hn: Workaround erroneous hash type observed on WS2016.

  Background:
  - UDP 4-tuple hash type is unconditionally enabled in Hyper-V on WS2016,
  which is _not_ affected by NDIS_OBJTYPE_RSS_PARAMS.
  - Non-fragment UDP/IPv4 datagrams' hash type is delivered to VM as
  TCP_IPV4.

  Currently this erroneous behavior only applies to WS2016/Windows10.

  Force l3/l4 protocol check, if the RXed packet's hash type is TCP_IPV4,
  and the Hyper-V is running on WS2016/Windows10. If the RXed packet is
  UDP datagram, adjust mbuf hash type to UDP_IPV4.

  Sponsored by: Microsoft

324516
  hyperv/hn: Workaround erroneous hash type observed on WS2016 for VF.

  The background was described in r324489.

  Sponsored by: Microsoft
05:02:39 - r324577
(4 days 22 hours ago)
by sephe
Affects: 
(3 files)
/stable/11/sys/dev/hyperv/include/hyperv.h
/stable/11/sys/dev/hyperv/vmbus/hyperv.c
MFC 324488

  hyperv/vmbus: Expose Hyper-V major version.

  Sponsored by: Microsoft
04:55:54 - r324576
(4 days 22 hours ago)
by sephe
Affects: 
(2 files)
/stable/11/sys/dev/hyperv/vmbus/vmbus.c
MFC 324487

  hyperv/vmbus: Add tunable to pin/unpin event tasks.

  Event tasks are pinned to their respective CPU by default, in the same
  fashion as they were.

  Unpin the event tasks by setting hw.vmbus.pin_evttask to 0, if certain
  CPUs serve special purpose.

  Sponsored by: Microsoft
02:29:43 - r324575
(5 days 1 hour ago)
by sephe
Affects: 
(2 files)
/stable/10/sys/dev/hyperv/netvsc/if_hn.c
MFC 324517

  hyperv/hn: Enable transparent VF by default.

  Sponsored by: Microsoft
02:26:39 - r324574
(5 days 1 hour ago)
by sephe
Affects: 
(6 files)
/stable/10/sys/dev/hyperv/netvsc/*
MFC 324489,324516

324489
  hyperv/hn: Workaround erroneous hash type observed on WS2016.

  Background:
  - UDP 4-tuple hash type is unconditionally enabled in Hyper-V on WS2016,
  which is _not_ affected by NDIS_OBJTYPE_RSS_PARAMS.
  - Non-fragment UDP/IPv4 datagrams' hash type is delivered to VM as
  TCP_IPV4.

  Currently this erroneous behavior only applies to WS2016/Windows10.

  Force l3/l4 protocol check, if the RXed packet's hash type is TCP_IPV4,
  and the Hyper-V is running on WS2016/Windows10. If the RXed packet is
  UDP datagram, adjust mbuf hash type to UDP_IPV4.

  Sponsored by: Microsoft

324516
  hyperv/hn: Workaround erroneous hash type observed on WS2016 for VF.

  The background was described in r324489.

  Sponsored by: Microsoft
02:16:35 - r324573
(5 days 1 hour ago)
by sephe
Affects: 
(3 files)
/stable/10/sys/dev/hyperv/include/hyperv.h
/stable/10/sys/dev/hyperv/vmbus/hyperv.c
MFC 324488

  hyperv/vmbus: Expose Hyper-V major version.

  Sponsored by: Microsoft
02:01:03 - r324572
(5 days 1 hour ago)
by sephe
Affects: 
(2 files)
/stable/10/sys/dev/hyperv/vmbus/vmbus.c
MFC 324487

  hyperv/vmbus: Add tunable to pin/unpin event tasks.

  Event tasks are pinned to their respective CPU by default, in the same
  fashion as they were.

  Unpin the event tasks by setting hw.vmbus.pin_evttask to 0, if certain
  CPUs serve special purpose.

  Sponsored by: Microsoft
2017 - 10 - 12   (6 days ago)
21:58:51 - r324571
(5 days 5 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath.c
[ath] Begin using the replacement EDCA functions.

As part of ath10k and other chipset support, the EDCA stuff has to be moved
to potentially be per-VAP. For hardware that doesn't support it (ie,
everything that we currently support) it can just fetch the "current"
global EDCA parameters for the NIC.

This is one of those parameters that is linked to the currently active
channel context / VAP in Linux mac80211 parlance.

Tested:

* ath(4), STA and AP modes
21:56:58 - r324570
(5 days 5 hours ago)
by adrian
Affects:  /head/sys/net80211/ieee80211_input.h
/head/sys/net80211/ieee80211_ioctl.h
[net80211] begin handling multiple hardware decap'ed A-MSDU in the RX path.

The duplicate detection code currently expects A-MSDU frames to be encaped -
they're decap'ed /after/ duplicate detection.

However for ath10k (and iwm hardware later on) the firmware supports
doing A-MSDU decap in hardware - which shows up as multiple frames with
the same sequence number and IV.

This is the first part of decap handling - if we see a stretch of A-MSDU
frames from the driver with the MORE bit set, then don't treat them
as duplicates.

This isn't 100% complete as crypto sequence number handling and "A-MSDU in
A-MPDU" needs handling, but it's a start.

This should be a glorified no-op for everyone. Please tell me if it isn't.
21:26:52 - r324569
(5 days 6 hours ago)
by glebius
Affects:  /head/sys/dev/dpaa/if_dtsec_rm.c
Fix build after r324446.
21:25:11 - r324568
(5 days 6 hours ago)
by asomers
Affects:  /head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
Optimize zpool_read_all_labels with AIO

Read all labels in parallel instead of sequentially

MFC after: 3 weeks
X-MFC-With: 322854
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12495
20:31:10 - r324567
(5 days 7 hours ago)
by gjb
Affects:  /head/release/release.sh
Add arm/armv7 checks to env_check().

Sponsored by: The FreeBSD Foundation
19:58:21 - r324566
(5 days 7 hours ago)
by bdrewery
Affects:  /head/tests/sys/kern/ptrace_test.c
Fix shadowed variable hidden by WARNS changing to 3 in r313006.

Sponsored by: Dell EMC Isilon
MFC after: 1 week
18:31:28 - r324565
(5 days 9 hours ago)
by emaste
Affects:  /head/sys/compat/freebsd32/freebsd32_sysent.c
regen freebsd32_sysent.c after r324564 (freebsd32_posix_fallocate)
18:30:54 - r324564
(5 days 9 hours ago)
by emaste
Affects:  /head/sys/compat/freebsd32/capabilities.conf
allow posix_fallocate in 32-bit compat capability mode

Reported by: kib
MFC after: 2 weeks
MFC with: r324560
Sponsored by: The FreeBSD Foundation
18:00:29 - r324563
(5 days 9 hours ago)
by manu
Affects:  /head/sys/arm/allwinner/a10_ehci.c
a10_ehci: Remove the passby code

It doesn't seems to be needed anymore and this make ehci working again
on the Pine64.
Thanks to jmcneill@ for the help.

Tested on: Pine64 (A64), OrangePi One (H3), BananapiM2 (A31s)
15:53:54 - r324562
(5 days 11 hours ago)
by bz
Affects:  /head/sys/arm/arm/disassem.c
Add rev16 instruction to the disassembler.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D12645
15:48:37 - r324561
(5 days 11 hours ago)
by emaste
Affects:  /head/sys/kern/init_sysent.c
regen init_sysent.c r324560
15:45:53 - r324560
(5 days 11 hours ago)
by emaste
Affects:  /head/lib/libc/sys/posix_fallocate.2
/head/sys/kern/capabilities.conf
/head/sys/kern/vfs_syscalls.c
allow posix_fallocate in capability mode

posix_fallocate is logically equivalent to writing zero blocks to the
desired file size and there is no reason to prevent calling it in
capability mode. posix_fallocate already checked for the CAP_WRITE
right, so we merely need to list it in capabilities.conf.

Reviewed by: allanjude
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12640
15:16:27 - r324559
(5 days 12 hours ago)
by imp
Affects: 
(4 files)
/head/sys/boot/common/*
/head/sys/boot/libsa/*
Move panic back into libsa. It's documented in libstand(3) to belong
there.

Sponsored by: Netflix
15:16:22 - r324558
(5 days 12 hours ago)
by imp
Affects: 
(5 files)
/head/sys/boot/*
Define prototype for exit and ensure references

Define a prototype for exit in stand.h. Provide a reference to exit in
a few conf.c files to ensure that its definition gets pulled in early.
Since exit() is a MD routine, it isn't defined in libsa. However,
libsa tends to be listed last and will soon have panic() in it which
calls exit(). The reference to exit early ensures that the MD exit is
available to satisfy linking for static libraries.
15:16:16 - r324557
(5 days 12 hours ago)
by imp
Affects:  /head/sys/boot/efi/include/efilib.h
/head/sys/boot/efi/loader/arch/i386/exec.c
/head/sys/boot/efi/loader/efi_main.c
Rename exit to efi_exit to avoid clashing with libsa exit definition

Rename exit to efi_exit. It doesn't have the proper signature and
conflicts with standard definition. Provide the standard definition as
well.

Sponsored by: Netflix
14:57:05 - r324556
(5 days 12 hours ago)
by imp
Affects: 
(6 files)
/head/sys/boot/*
Move ufsread.c

Move ufsread.c from sys/boot/common (which used to be all the common
files for /boot/loader, but grew to be all the common files for
sys/boot, but that's now sys/boot/libsa's job) to sys/boot/libsa.

Sponsored by: Netflix
14:57:00 - r324555
(5 days 12 hours ago)
by imp
Affects:  /head/sys/boot/i386/zfsboot/Makefile
Honor CFLAGS modifications in Makefile.inc by using += here. There's
no hyper-small space constraints, so there's no reason to tightly
control it.

Sponsored by: Netflix
14:56:54 - r324554
(5 days 12 hours ago)
by imp
Affects: 
(17 files)
/head/sys/boot/*
Move crc32.c, util.c and gpt.c over to libsa.

Sponsored by: Netflix
14:56:48 - r324553
(5 days 12 hours ago)
by imp
Affects: 
(10 files)
/head/sys/boot/*
Rename libstand.a to libsa.a and libstand32.a to libsa32.a

Sponsored by: Netflix
14:56:42 - r324552
(5 days 12 hours ago)
by imp
Affects: 
(5 files)
/head/sys/boot/Makefile.inc
/head/sys/boot/userboot/*
Kill the userboot copy of libstand.

It's not needed (it's now identical to libsa, and seems to have been
for some time).

Sponsored by: Netflix
14:56:28 - r324551
(5 days 12 hours ago)
by imp
Affects: 
(171 files)
/head/lib/libstand/*
/head/sys/boot/*
Move lib/libstand to sys/boot/libsa

Move the sources to sys/boot. Make adjustments related to the
move. Kill LIBSTAND_SRC since it's no longer needed.

Sponsored by: Netflix
14:53:25 - r324550
(5 days 12 hours ago)
by imp
Affects:  /head/lib/libstand/bootparam.h
/head/lib/libstand/tftp.h
Add $FreeBSD$ to ancient sources that it's missing from.

Sponsored by: Netflix
14:32:45 - r324549
(5 days 13 hours ago)
by bz
Affects:  /head/sys/arm/conf/GENERIC
Previously there was a VIRT kernel to which I had added these options.
With that gone they need to go into GENERIC now.

Makes FreeBSD/arm usable on gem5 by default.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D12566
14:08:55 - r324548
(5 days 13 hours ago)
by n_hibma
Affects: 
(2 files)
/stable/11/sys/dev/smc/if_smc.c
MFC 324088:

  Make smc compile with DEVICE_POLLING set.

  smc_poll had the wrong prototype.

Reviewed by: benno
13:59:23 - r324547
(5 days 13 hours ago)
by mjg
Affects:  /head/usr.bin/xinstall/xinstall.c
xinstall: plug an infinite loop in directory creation

If stat continues to fail with ENOENT and mkdir with EEXIST the code wont
finish. In particular this can show up when the target path follows through
a symlink to a non-existent directory.

Reported by: ae
MFC after: 1 week
08:27:57 - r324546
(5 days 19 hours ago)
by hselasky
Affects: 
(4 files)
/stable/11/lib/libcuse/cuse.3
/stable/11/sys/fs/cuse/cuse.c
/stable/11/sys/fs/cuse/cuse_defs.h
MFC r324320:
Add support for new cuse(3) error code, CUSE_ERR_NO_DEVICE.
This error code is useful when emulating Linux input event
devices from userspace.

PR: 218626
Submitted by: jan.kokemueller@gmail.com
Sponsored by: Mellanox Technologies

 


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

Page generated in 16 ms, 168 revisions printed. Current time is 2017-10-18 03:36:26. All times are in UTC/GMT.