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 - 02 - 25   (today)
04:24:51 - r314247
( 4 minutes ago)
by mav
Affects:  /head/sys/cam/ctl/scsi_ctl.c
Axe out some forever disabled questionable functionality.

This code is complicated enough even in its base shape.

MFC after: 2 weeks
04:04:11 - r314246
( 24 minutes ago)
by mav
Affects:  /head/sys/cam/ctl/scsi_ctl.c
Improve CAM target frontend reference counting.

Before this change it was possible to trigger some use-after-free panics
by disabling LUNs/ports under heavy load.

MFC after: 2 weeks
03:44:51 - r314245
( 44 minutes ago)
by ngie
Affects:  /head/tools/build/mk/OptionalObsoleteFiles.inc
Fill MK_LIBTHR as far as lib/libthr is concerned

There are other areas of the tree that will need to be evaluated for sanity
if they're supposed to be conditionally compiled out of the build/install,
like libzpool

MFC after: 1 month
Relnotes: yes (this might break someone's system if have the knob set)
Sponsored by: Dell EMC Isilon
03:35:26 - r314244
( 53 minutes ago)
by ngie
Affects:  /head/tools/build/mk/OptionalObsoleteFiles.inc
Remove MK_OBJC block

It is no longer represented via src.conf(5)

MFC after: 3 days
Sponsored by: Dell EMC Isilon
03:34:22 - r314243
( 54 minutes ago)
by jpaetzel
Affects: 
(9 files)
/vendor-sys/illumos/dist/uts/common/fs/zfs/*
6676 Race between unique_insert() and unique_remove() causes ZFS fsid change

illumos/illumos-gate@40510e8eba18690b9a9843b26393725eeb0f1dac
https://github.com/illumos/illumos-gate/commit/40510e8eba18690b9a9843b26393725eeb0f1dac

https://www.illumos.org/issues/6676

  The fsid of zfs filesystems might change after reboot or remount. The problem
seems to
  be caused by a race between unique_insert() and unique_remove(). The
unique_remove()
  is called from dsl_dataset_evict() which is now an asynchronous thread. In a
case the
  dsl_dataset_evict() thread is very slow and calls unique_remove() too late we
will end
  up with changed fsid on zfs mount.

  This problem is very likely caused by #5056.

  Steps to Reproduce
  Note: I'm able to reproduce this always on a single core (virtual) machine.
On multicore
  machines it is not so easy to reproduce.

# uname -a
SunOS openindiana 5.11 illumos-633aa80 i86pc i386 i86pc Solaris
# zfs create rpool/TEST
# FS=$(echo ::fsinfo | mdb -k | grep TEST | awk '{print $1}')
# echo $FS::print vfs_t vfs_fsid | mdb -k
vfs_fsid = {
  vfs_fsid.val = [ 0x54d7028a, 0x70311508 ]
}
# zfs umount rpool/TEST
# zfs mount rpool/TEST
# FS=$(echo ::fsinfo | mdb -k | grep TEST | awk '{print $1}')
# echo $FS::print vfs_t vfs_fsid | mdb -k
vfs_fsid = {
  vfs_fsid.val = [ 0xd9454e49, 0x6b36d08 ]
}
#

  Impact
  The persistent fsid (filesystem id) is essential for proper NFS functionality.
  If the fsid of a filesystem changes on remount (or after reboot) the NFS
  clients might not be able to automatically recover from such event and the
  manual remount of the NFS filesystems on every NFS client might be needed.

Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Dan Vatca <dan.vatca@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
03:33:09 - r314242
( 55 minutes ago)
by ngie
Affects:  /head/tools/build/mk/OptionalObsoleteFiles.inc
Remove MK_CRYPT stub

It doesn't directly control what gets installed today; it indirectly
pulls other knobs (like MK_KERBEROS, etc).

MFC after: 1 weeks
Sponsored by: Dell EMC Isilon
03:28:49 - r314241
(1 hour ago)
by ngie
Affects:  /head/tools/build/mk/OptionalObsoleteFiles.inc
Fill in MK_RESCUE by finding paths in ${DESTDIR}/rescue and adding
them to OLD_FILES/OLD_DIRS, as necessary.

MFC after: 1 month
Sponsored by: Dell EMC Isilon
03:23:11 - r314240
(1 hour 5 minutes ago)
by ngie
Affects:  /head/rescue/rescue/Makefile
/head/tools/build/mk/OptionalObsoleteFiles.inc
Conditionally compile certain programs into rescue(8) if requested

MK_CCD - ccdconfig
MK_ROUTED - routed, rtquery

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
03:11:08 - r314239
(1 hour 17 minutes ago)
by ngie
Affects:  /head/rescue/rescue/Makefile
Add shutdown/poweroff support to rescue(8)

shutdown is a safer way to power off than reboot (in general), because of
the added shutdown process that it executes via /etc/rc.shutdown . It was
odd that it was missing from rescue(8) since reboot and friends were
added in past commits.

While here, alias poweroff to shutdown for parity with sbin/shutdown/Makefile

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
01:53:45 - r314238
(2 hours 35 minutes ago)
by mav
Affects: 
(2 files)
/stable/10/sys/cam/ctl/ctl_tpc.c
MFC r313910: Change XCOPY memory allocations.

Before this change XCOPY code could allocate memory in chunks up to 16-32MB
(VMware does XCOPY in 4MB chunks by default), that could be difficult for
VM subsystem to do due to KVA fragmentation, that sometimes created huge
allocation delays, blocking any I/O for respective LU for that time.

This change limits allocations down to TPC_MAX_IO_SIZE, which is 1MB now.
1MB is also not a cookie, but ZFS also can do that for large blocks, so
it should be less dramatic. As drawback this increases CPU overhead, but
it still look acceptable comparing to time consumed by ZFS read/write.
01:52:07 - r314237
(2 hours 36 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cam/ctl/ctl_tpc.c
MFC r313910: Change XCOPY memory allocations.

Before this change XCOPY code could allocate memory in chunks up to 16-32MB
(VMware does XCOPY in 4MB chunks by default), that could be difficult for
VM subsystem to do due to KVA fragmentation, that sometimes created huge
allocation delays, blocking any I/O for respective LU for that time.

This change limits allocations down to TPC_MAX_IO_SIZE, which is 1MB now.
1MB is also not a cookie, but ZFS also can do that for large blocks, so
it should be less dramatic. As drawback this increases CPU overhead, but
it still look acceptable comparing to time consumed by ZFS read/write.
00:42:44 - r314236
(3 hours 46 minutes ago)
by ngie
Affects: 
(2 files)
/stable/10/Makefile.inc1
MFC r313924,r313925:

r313924:

Quote path to doxygen/kyua in test(1) -x check

This is a basic stopgap against ${LOCALBASE} containing spaces in it

r313925:

Include ${LOCALBASE}/bin in $PATH when running "make checkworld"

Some of the tests in devel/atf // devel/kyua rely on the tools being in $PATH,
which means that the tests fail when run via "make checkworld" because $PATH
is restricted to exclude directory elements like "${LOCALBASE}/bin".
00:42:17 - r314235
(3 hours 46 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/Makefile.inc1
MFC r313924,r313925:

r313924:

Quote path to doxygen/kyua in test(1) -x check

This is a basic stopgap against ${LOCALBASE} containing spaces in it

r313925:

Include ${LOCALBASE}/bin in $PATH when running "make checkworld"

Some of the tests in devel/atf // devel/kyua rely on the tools being in $PATH,
which means that the tests fail when run via "make checkworld" because $PATH
is restricted to exclude directory elements like "${LOCALBASE}/bin".
00:40:50 - r314234
(3 hours 48 minutes ago)
by avos
Affects:  /head/sys/dev/iwn/if_iwn.c
/head/sys/dev/iwn/if_iwnvar.h
iwn: some initialization / RF switch state change fixes.

- Check return code from initialization path; otherwise, vap state
may be wrong after an error.
- Do not try to run iwn_stop() / iwn_init() multiple times.
- Merge iwn_radio_on/off() and move RFKILL bit check into the task.
- Try to handle possible RF switch state change in S3 state (PR 181694).

PR: 181694
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D9797
00:12:29 - r314233
(4 hours 16 minutes ago)
by ngie
Affects:  /head/usr.sbin/syslogd/syslogd.c
Parameterize out the length of struct filed->f_lasttime as `MAXDATELEN`

This removes the hardcoded value for the field (16) and the equivalent
hardcoded lengths in logmsg(..).

This change is being done to help stage future work to add RFC5424/RFC5434
support to syslogd(8).

Obtained from: Isilon OneFS (dcd33d13da) (as part of a larger change)
Submitted by: John Bauman <john.bauman@isilon.com>
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
00:09:26 - r314232
(4 hours 19 minutes ago)
by imp
Affects:  /head/usr.sbin/efivar/efivar.c
Exit when we can't print a variable.

Exit after printing a message on stderr when we can't get a
message. This is slightly different than linux, but keeps shell
scripts from thinking the value of the variable is the error message
and so is a net win.

Sponsored by: Netflix
00:09:21 - r314231
(4 hours 19 minutes ago)
by imp
Affects:  /head/lib/libefivar/efivar.c
Don't convert ENOENT to nothing for individual lookup, just for the
iterative get_next interface. This prevents efivar(3) from printing 4k
of 0's when a variable isn't set.

Sponsored by: Netflix
00:09:16 - r314230
(4 hours 19 minutes ago)
by imp
Affects:  /head/sbin/nvmecontrol/logpage.c
/head/sbin/nvmecontrol/nvmecontrol.8
/head/sbin/nvmecontrol/nvmecontrol.h
Make nvmecontrol logpage -p help list known pages.

Make -p help and -v help list all the pages we know about.
Add -v to usage.
Update the man page.

Sponsored by: Netflix
00:09:12 - r314229
(4 hours 19 minutes ago)
by imp
Affects:  /head/sbin/nvmecontrol/nvmecontrol.c
Exit with usage if argv[1] is NULL in dispatch. This fixes core dumps
when a command has subcommands, but the user doesn't give the
parameters on the command line.

Sponsored by: Netflix
00:09:02 - r314228
(4 hours 19 minutes ago)
by imp
Affects:  /head/sbin/nvmecontrol/logpage.c
Fix typos in output.

Sponsored by: Netflix
2017 - 02 - 24   (yesterday)
21:38:41 - r314227
(6 hours 50 minutes ago)
by pfg
Affects: 
(2 files)
/stable/10/sys/fs/ext2fs/ext2_htree.c
MFC r313897:
ext2fs: Remove unused assignment.

The value is re-assigned a few lines later without being read.

Found by: Clang static analyzer
21:35:59 - r314226
(6 hours 52 minutes ago)
by ngie
Affects:  /head/usr.sbin/syslogd/Makefile
Use SRCTOP instead of .CURDIR relative paths with ".."

This simplifies pathing in make/displayed output

MFC after: 1 week
Sponsored by: Dell EMC Isilon
21:35:53 - r314225
(6 hours 53 minutes ago)
by pfg
Affects: 
(2 files)
/stable/11/sys/fs/ext2fs/ext2_htree.c
MFC r313897:
ext2fs: Remove unused assignment.

The value is re-assigned a few lines later without being read.

Found by: Clang static analyzer
21:22:13 - r314224
(7 hours 6 minutes ago)
by pfg
Affects: 
(7 files)
/stable/10/sys/dev/hpt27xx/*
/stable/10/sys/dev/hptnr/*
/stable/10/sys/dev/hptrr/*
MFC r313554:
Clean redundant MIN/MAX declarations in some HighPoint drivers.

The hpt27xx(4), hptnr(4), and hptrr(4) drivers declare MIN() and MAX()
internally which match the macros from sys/param.h.

MIN() is not used, MAX is only used once and can be replaced with the
max() version in libkern.h which operates on u_ints.

MFC after: 2 weeks
21:20:48 - r314223
(7 hours 8 minutes ago)
by pfg
Affects: 
(7 files)
/stable/11/sys/dev/hpt27xx/*
/stable/11/sys/dev/hptnr/*
/stable/11/sys/dev/hptrr/*
MFC r313554:
Clean redundant MIN/MAX declarations in some HighPoint drivers.

The hpt27xx(4), hptnr(4), and hptrr(4) drivers declare MIN() and MAX()
internally which match the macros from sys/param.h.

MIN() is not used, MAX is only used once and can be replaced with the
max() version in libkern.h which operates on u_ints.

MFC after: 2 weeks
21:19:40 - r314222
(7 hours 9 minutes ago)
by avos
Affects: 
(4 files)
/stable/11/sys/dev/iwi/if_iwi.c
/stable/11/sys/dev/ral/rt2661.c
/stable/11/sys/dev/usb/wlan/if_zyd.c
MFC r313906:
iwi, ral, zyd: fix possible use-after-free.
20:51:39 - r314221
(7 hours 37 minutes ago)
by ken
Affects: 
(8 files)
/stable/10/sbin/camcontrol/*
MFC r313893

  ------------------------------------------------------------------------
  r313893 | ken | 2017-02-17 13:04:22 -0700 (Fri, 17 Feb 2017) | 48 lines

  Add task attribute support to camcontrol(8).

  Users can use the new generic argument, -Q task_attr, to specify a task
  attribute (simple, ordered, head of queue, aca) for the commands issued.
  The the default is simple, which works with all SCSI devices that support
  tagged queueing.

  This will mostly be useful for debugging target behavior in certain
  situations.

  You can try it out by compiling CTL with CTL_IO_DELAY turned on (in
  sys/cam/ctl/ctl_io.h) and then do something like this with one of the CTL
  LUNs:

  ctladm delay 0:0 -l done -t 10
  camcontrol tur da34 -v

  And at then before the 10 second timer is up, in another terminal:

  camcontrol inquiry da34 -Q ordered -v

  The Inquiry should complete just after the TUR completes. Ordinarily
  it would complete first because of the delay injection, but because the
  task attribute is set to ordered in this case, CTL holds it up until the
  previous command has completed.

  sbin/camcontrol/camcontrol.c:
  Add the new generic argument, -Q, which allows the user to specify
  a SCSI task attribute. The user can specify task attributes by
  name or numerically.

  Add a new task_attr arguments to SCSI sub-functions.

  sbin/camcontrol/attrib.c,
  sbin/camcontrol/camcontrol.h,
  sbin/camcontrol/fwdownload.c,
  sbin/camcontrol/modeedit.c,
  sbin/camcontrol/persist.c,
  sbin/camcontrol/timestamp.c,
  sbin/camcontrol/zone.c:
  Add the new task_attr argument to SCSI sub-functions.

  sbin/camcontrol/camcontrol.8:
  Document the new -Q option, and add an example.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
20:47:56 - r314220
(7 hours 41 minutes ago)
by ken
Affects: 
(10 files)
/stable/11/sbin/camcontrol/*
MFC r313893

  ------------------------------------------------------------------------
  r313893 | ken | 2017-02-17 13:04:22 -0700 (Fri, 17 Feb 2017) | 48 lines

  Add task attribute support to camcontrol(8).

  Users can use the new generic argument, -Q task_attr, to specify a task
  attribute (simple, ordered, head of queue, aca) for the commands issued.
  The the default is simple, which works with all SCSI devices that support
  tagged queueing.

  This will mostly be useful for debugging target behavior in certain
  situations.

  You can try it out by compiling CTL with CTL_IO_DELAY turned on (in
  sys/cam/ctl/ctl_io.h) and then do something like this with one of the CTL
  LUNs:

  ctladm delay 0:0 -l done -t 10
  camcontrol tur da34 -v

  And at then before the 10 second timer is up, in another terminal:

  camcontrol inquiry da34 -Q ordered -v

  The Inquiry should complete just after the TUR completes. Ordinarily
  it would complete first because of the delay injection, but because the
  task attribute is set to ordered in this case, CTL holds it up until the
  previous command has completed.

  sbin/camcontrol/camcontrol.c:
  Add the new generic argument, -Q, which allows the user to specify
  a SCSI task attribute. The user can specify task attributes by
  name or numerically.

  Add a new task_attr arguments to SCSI sub-functions.

  sbin/camcontrol/attrib.c,
  sbin/camcontrol/camcontrol.h,
  sbin/camcontrol/fwdownload.c,
  sbin/camcontrol/modeedit.c,
  sbin/camcontrol/persist.c,
  sbin/camcontrol/timestamp.c,
  sbin/camcontrol/zone.c:
  Add the new task_attr argument to SCSI sub-functions.

  sbin/camcontrol/camcontrol.8:
  Document the new -Q option, and add an example.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
20:04:02 - r314219
(8 hours 24 minutes ago)
by mmokhi
Affects: 
(6 files)
/head/sys/amd64/*
/head/sys/compat/linux/linux_file.c
/head/sys/i386/linux/linux_dummy.c
Add linux_preadv() and linux_pwritev() syscalls to Linuxulator.

Reviewed by: dchagin
Approved by: dchagin, trasz (src committers)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9722
19:47:27 - r314218
(8 hours 41 minutes ago)
by dchagin
Affects: 
(5 files)
/head/sys/amd64/*
/head/sys/compat/linux/linux_file.c
/head/sys/i386/linux/linux_dummy.c
Revert r314217. Commit is not match that I have approved.
19:22:17 - r314217
(9 hours 6 minutes ago)
by mmokhi
Affects: 
(5 files)
/head/sys/amd64/*
/head/sys/compat/linux/linux_file.c
/head/sys/i386/linux/linux_dummy.c
Add linux_preadv() and linux_pwritev() syscalls to Linuxulator.

Reviewed by: dchagin
Approved by: dchagin, trasz (src committers)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9722
18:56:00 - r314216
(9 hours 32 minutes ago)
by jtl
Affects:  /head/sys/x86/x86/mp_x86.c
We have seen several cases recently where we appear to get a double-fault:
We have an original panic. Then, instead of writing the core to the dump
device, the kernel has a second panic: "smp_targeted_tlb_shootdown:
interrupts disabled". This change is an attempt to fix that second panic.

When the other CPUs are stopped, we can't notify them of the TLB shootdown,
so we skip that operation. However, when the CPUs come back up, we
invalidate the TLB to ensure they correctly observe any changes to the
page mappings.

Reviewed by: kib
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D9786
17:36:55 - r314215
(10 hours 52 minutes ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/string.h
Implement more string functions in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies
17:03:14 - r314214
(11 hours 25 minutes ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/device.h
Prototype device structure to ensure LinuxKPI header file can be
included standalone.

MFC after: 1 week
Sponsored by: Mellanox Technologies
16:52:57 - r314213
(11 hours 36 minutes ago)
by allanjude
Affects:  /head/sys/boot/geli/pwgets.c
Remove control+r handling from geliboot's pwgets()

pwgets() is based on ngets() from libstand, which includes a feature
that is not wanted in a very of the function designed for password
handling.

Pressing control+r echos out the entered string

This commit removes that feature from pwgets()

PR: 217298
Reported by: ehaupt
Reviewed by: kristof, tsoome, ehaupt
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D9782
16:37:35 - r314212
(11 hours 51 minutes ago)
by br
Affects:  /head/sys/dev/uart/uart_dev_snps.c
Use correct macro for Synopsys UART driver declaration.
16:11:55 - r314211
(12 hours 17 minutes ago)
by kib
Affects: 
(4 files)
/head/sys/*
Remove cpu_deepest_sleep variable.

On Core2 and older Intel CPUs, where TSC stops in C2, system does not
allow C2 entrance if timecounter hardware is TSC. This is done by
tc_windup() which tests for TC_FLAGS_C2STOP flag of the new
timecounter and increases cpu_disable_c2_sleep if flag is set. Right
now init_TSC_tc() only sets the flag if cpu_deepest_sleep >= 2, but
TSC is initialized too early for this variable to be set by
acpi_cpu.c.

There is no reason to require that ACPI reported C2 and deeper states
to set TC_FLAGS_C2STOP, so remove cpu_deepest_sleep test from
init_TSC_tc() condition. And since this is the only use of the
variable, remove it at all.

Reported and submitted by: Jia-Shiun Li <jiashiun@gmail.com>
Suggested by: jhb
MFC after: 2 weeks
16:02:01 - r314210
(12 hours 26 minutes ago)
by kib
Affects: 
(23 files)
/stable/11/sys/conf/*
/stable/11/sys/i386/*
/stable/11/sys/x86/*
MFC r313154:
For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE
and device npx.
15:17:43 - r314209
(13 hours 11 minutes ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm_fw.c
/head/sys/dev/iwm/if_iwm_fw.h
[iwm] add if_iwm_fw.c.
14:48:17 - r314208
(13 hours 40 minutes ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
Respecting r314204 tighten ATIO cleanup requirements.

Every ATIO must complete with either successfully sent status or XPT_ABORT.

MFC after: 2 weeks
14:40:15 - r314207
(13 hours 48 minutes ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/srcu.h
Implement srcu_dereference() macro in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies
14:37:55 - r314206
(13 hours 51 minutes ago)
by vangyzen
Affects:  /head/include/semaphore.h
Guard sem_clockwait_np() declaration with __BSD_VISIBLE

This is a POSIX header file, so keep the namespace clean.

Reported by: kib
MFC after: 13 days
X-MFC with: r314179
Sponsored by: Dell EMC
14:23:46 - r314205
(14 hours 5 minutes ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/bitops.h
Implement BIT_ULL() macro in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies
12:12:30 - r314204
(16 hours 16 minutes ago)
by mav
Affects:  /head/sys/cam/ctl/scsi_ctl.c
Explicitly abort ATIO if CTIO sending status has failed.

This helps SIM to free related resources in questionable cases.

MFC after: 2 weeks
12:11:17 - r314203
(16 hours 17 minutes ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
Fix missing xpt_done() for ATIO/INOT on missing LUN.

MFC after: 2 weeks
11:34:00 - r314202
(16 hours 54 minutes ago)
by kib
Affects: 
(2 files)
/stable/10/sys/kern/vfs_vnops.c
MFC r313496:
Increase a chance of devfs_close() calling d_close cdevsw method.
11:30:28 - r314201
(16 hours 58 minutes ago)
by kib
Affects: 
(2 files)
/stable/10/sys/fs/nfsclient/nfs_clvfsops.c
MFC r313800:
Do not access memory past the buffer end.
Do not accept and silently truncate too long hostname.
11:25:32 - r314200
(17 hours 3 minutes ago)
by mav
Affects:  /head/sys/cam/ctl/scsi_ctl.c
We can't access periph after ctlfe_free_ccb().

MFC after: 2 weeks
11:07:49 - r314199
(17 hours 21 minutes ago)
by kib
Affects: 
(2 files)
/stable/10/libexec/rtld-elf/rtld.c
MFC r313494:
Handle protected symbols in rtld.
10:20:13 - r314198
(18 hours 8 minutes ago)
by royger
Affects: 
(3 files)
/stable/11/sys/amd64/amd64/amd64_mem.c
/stable/11/sys/i386/i386/i686_mem.c
MFC r313871

x86: fix MTRR initialization if EARLY_AP_STARTUP is used

Sponsored by: Citrix Systems R&D
09:30:51 - r314197
(18 hours 58 minutes ago)
by kib
Affects: 
(2 files)
/stable/10/sys/sys/elf_generic.h
MFC r313493:
Define ELF_ST_VISIBILITY().
09:16:21 - r314196
(19 hours 12 minutes ago)
by mav
Affects:  /head/sys/cam/ctl/scsi_ctl.c
Unify ATIO/INOT CCBs requeuing.

MFC after: 2 weeks
08:09:16 - r314195
(20 hours 19 minutes ago)
by kib
Affects:  /head/sys/vm/vm_fault.c
Properly handle possible underflow in vm_fault_prefault().

In vm_fault_prefault(), if backward count causes underflow in
calculation of
  starta = addra - backward * PAGE_SIZE;
then starta must be clipped to entry->start, instead of zero.
Clipping to zero allowed mapping outside of the map entries address
ranges, in particular, map at zero.

Submitted by: Yanko Yankulov <yanko.yankulov@gmail.com>
Reviewed by: alc
MFC after: 1 week
07:53:56 - r314194
(20 hours 35 minutes ago)
by avg
Affects: 
(6 files)
/head/sys/cddl/*
/head/sys/conf/files
/head/sys/modules/zfs/Makefile
zfs: clean up unused files and definitions

MFC after: 1 month
X-MFC after: r314048
07:47:50 - r314193
(20 hours 41 minutes ago)
by mav
Affects:  /head/sys/cam/ctl/scsi_ctl.c
Some code cleanup.

MFC after: 2 weeks
07:07:58 - r314192
(21 hours 20 minutes ago)
by adrian
Affects: 
(6 files)
/head/sys/conf/files
/head/sys/dev/iwm/*
/head/sys/modules/iwm/Makefile
[iwm] Add support for Firmware paging, needed for newer 8000C firmware.

* Uses the IWM_FW_PAGING_BLOCK_CMD firmware command to tell the firmware
  what memory ranges to use for paging.

Obtained from: dragonflybsd.git 8a5b199964f8e7bdb00039f0b48817a01b402f18
06:49:31 - r314191
(21 hours 39 minutes ago)
by ngie
Affects:  /head/lib/libcam/scsi_cmdparse.c
Fix up r314189

The conditional in do_buff_decode(..) after the while loop was accidentally
inverted. Only increment the pointer for fmt if it's not NUL.

MFC after: 2 weeks
X-MFC with: r314189
Reported by: pstef
Sponsored by: Dell EMC Isilon
06:28:58 - r314190
(21 hours 59 minutes ago)
by ngie
Affects:  /head/lib/libcam/scsi_cmdparse.c
Fix some minor style nits: put parentheses around return values

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
06:24:39 - r314189
(22 hours 4 minutes ago)
by ngie
Affects:  /head/lib/libcam/scsi_cmdparse.c
Fix up NULL/'\0' uses and fix 2 derefs after NULL

MFC after: 2 weeks
Reported by: Coverity
CID: 1018898, 1018899
Differential Revision: https://reviews.freebsd.org/D6142
Sponsored by: Dell EMC Isilon
01:39:12 - r314188
(1 day 2 hours ago)
by imp
Affects:  /head/sys/kern/kern_pmc.c
Cast values to (int) before comparing them to the range of the
enum. This ensures they are in range w/o the warnings.
01:39:08 - r314187
(1 day 2 hours ago)
by imp
Affects:  /head/sys/kern/kern_mutex.c
KDTRACE_HOOKS isn't guaranteed to be defined. Change to check to see
if it is defined or not rather than if it is non-zero.

Sponsored by: Netflix, Inc
2017 - 02 - 23   (2 days ago)
23:48:44 - r314186
(1 day 4 hours ago)
by pfg
Affects:  /head/sys/arm/at91/at91sam9260.c
at91: double assignment.

Found with: coccinelle (da.cocci)
Suggested by: cognet
22:46:01 - r314185
(1 day 5 hours ago)
by mjg
Affects:  /head/sys/kern/kern_mutex.c
mtx: microoptimize lockstat handling in spin mutexes and thread lock

While here make the code compilablle on kernels with LOCK_PROFILING but without
KDTRACE_HOOKS.
22:10:37 - r314184
(1 day 6 hours ago)
by avg
Affects: 
(8 files)
/stable/10/lib/libmd/*
MFC r282774: Unbreak MIPS build following r282726 (MFCed in r314144)
22:08:35 - r314183
(1 day 6 hours ago)
by avg
Affects:  /head/share/man/man4/Makefile
add jedec_ts.4 to the list of manual pages

Reported by: rpokala
MFC after: 3 days
21:54:16 - r314182
(1 day 6 hours ago)
by avg
Affects:  /stable/10/lib/libmd/sha256.h
/stable/10/lib/libmd/sha256c.c
fixup r314143, MFC of r285366 didn't remove files that it should have
20:49:17 - r314181
(1 day 7 hours ago)
by adrian
Affects:  /head/sbin/ifconfig/ifieee80211.c
[ifconfig] handle illegal WPS frames

Some APs broadcast WPS IE frames with totally broken data. Ifconfig's
printwpsie()
loops through WPS frames printing the attributes out; if the frame's data is
bad,
printwpsie() can end up looking at out-of-bounds addresses causing ifconfig to
bus error.

Thanks to Takashi Inoue at Nihon U for his efforts in debugging this.

PR: bin/217312
Submitted by: fbsd@opal.com
MFC after: 1 week
20:41:55 - r314180
(1 day 7 hours ago)
by brooks
Affects:  /head/sys/mips/conf/BERI_DE4_BASE
/head/sys/mips/conf/BERI_DE4_SDROOT
/head/sys/mips/conf/BERI_SIM_BASE
Fix and shorten BERI kernel builds during universe.

Stop building BERI_DE4_BASE and BERI_SIM_BASE, they aren't particularly
valid as they don't have a root dev. Do build BERI_DE4_SDROOT which
does so devices get coverage.

Remove ident from BERI_DE4_BASE for the reasons above which will cause
it to fail to build. BERI_SIM_BASE was already this way and broke
universe.[0]

Reported by: rpokala
Sponsored by: DARPA, AFRL
19:36:38 - r314179
(1 day 8 hours ago)
by vangyzen
Affects: 
(10 files)
/head/*
Add sem_clockwait_np()

This function allows the caller to specify the reference clock
and choose between absolute and relative mode. In relative mode,
the remaining time can be returned.

The API is similar to clock_nanosleep(3). Thanks to Ed Schouten
for that suggestion.

While I'm here, reduce the sleep time in the semaphore "child"
test to greatly reduce its runtime. Also add a reasonable timeout.

Reviewed by: ed (userland)
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D9656
19:32:25 - r314178
(1 day 8 hours ago)
by dim
Affects: 
(34 files)
/projects/clang400-import/*
Merge ^/head r314129 through r314177.
19:25:29 - r314177
(1 day 9 hours ago)
by dim
Affects: 
(18 files)
/projects/clang400-import/contrib/*
/projects/clang400-import/lib/clang/include/*
Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r296002, and update build glue.
19:21:47 - r314176
(1 day 9 hours ago)
by np
Affects: 
(7 files)
/head/contrib/ofed/libcxgb4/src/*
Add support for RDMA from userspace with T6 cards.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications
19:14:16 - r314175
(1 day 9 hours ago)
by dim
Affects:  /vendor/lldb/lldb-release_40-r296002
Tag lldb release_40 branch r296002.
19:14:12 - r314174
(1 day 9 hours ago)
by dim
Affects:  /vendor/lld/lld-release_40-r296002
Tag lld release_40 branch r296002.
19:14:08 - r314173
(1 day 9 hours ago)
by dim
Affects:  /vendor/libc++/libc++-release_40-r296002
Tag libc++ release_40 branch r296002.
19:14:05 - r314172
(1 day 9 hours ago)
by dim
Affects:  /vendor/compiler-rt/compiler-rt-release_40-r296002
Tag compiler-rt release_40 branch r296002.
19:14:00 - r314171
(1 day 9 hours ago)
by dim
Affects:  /vendor/clang/clang-release_40-r296002
Tag clang release_40 branch r296002.
19:13:57 - r314170
(1 day 9 hours ago)
by dim
Affects: 
(5 files)
/vendor/clang/dist/lib/*
/vendor/clang/dist/test/*
Vendor import of clang release_40 branch r296002:
https://llvm.org/svn/llvm-project/cfe/branches/release_40@296002
19:13:51 - r314169
(1 day 9 hours ago)
by dim
Affects:  /vendor/llvm/llvm-release_40-r296002
Tag llvm release_40 branch r296002.
19:13:48 - r314168
(1 day 9 hours ago)
by dim
Affects:  /vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp
/vendor/llvm/dist/test/CodeGen/ARM/alias_store.ll
Vendor import of llvm release_40 branch r296002:
https://llvm.org/svn/llvm-project/llvm/branches/release_40@296002
19:02:40 - r314167
(1 day 9 hours ago)
by np
Affects:  /head/sys/dev/cxgbe/iw_cxgbe/device.c
/head/sys/dev/cxgbe/iw_cxgbe/mem.c
/head/sys/dev/cxgbe/iw_cxgbe/provider.c
cxgbe/iw_cxgbe: Minor changes for T6.

Submitted by: Krishnamraju Eraparaju at Chelsio
Sponsored by: Chelsio Communications
19:02:31 - r314166
(1 day 9 hours ago)
by dim
Affects:  /vendor/lldb/lldb-release_40-r295910
Tag lldb release_40 branch r295910.
19:02:27 - r314165
(1 day 9 hours ago)
by dim
Affects:  /vendor/lld/lld-release_40-r295910
Tag lld release_40 branch r295910.
19:02:23 - r314164
(1 day 9 hours ago)
by dim
Affects:  /vendor/libc++/libc++-release_40-r295910
Tag libc++ release_40 branch r295910.
19:02:20 - r314163
(1 day 9 hours ago)
by dim
Affects:  /vendor/compiler-rt/compiler-rt-release_40-r295910
Tag compiler-rt release_40 branch r295910.
19:02:15 - r314162
(1 day 9 hours ago)
by dim
Affects:  /vendor/clang/clang-release_40-r295910
Tag clang release_40 branch r295910.
19:02:12 - r314161
(1 day 9 hours ago)
by dim
Affects: 
(4 files)
/vendor/clang/dist/*
Vendor import of clang release_40 branch r295910:
https://llvm.org/svn/llvm-project/cfe/branches/release_40@295910
19:02:07 - r314160
(1 day 9 hours ago)
by dim
Affects:  /vendor/llvm/llvm-release_40-r295910
Tag llvm release_40 branch r295910.
19:02:03 - r314159
(1 day 9 hours ago)
by dim
Affects: 
(10 files)
/vendor/llvm/dist/docs/ReleaseNotes.rst
/vendor/llvm/dist/lib/*
/vendor/llvm/dist/test/*
Vendor import of llvm release_40 branch r295910:
https://llvm.org/svn/llvm-project/llvm/branches/release_40@295910
18:56:31 - r314158
(1 day 9 hours ago)
by pfg
Affects:  /head/sys/dev/vxge/vxge.c
vxge(4): Yet another (minor) mismatch.

VXGE_DEFAULT_TTI_RTIMER_VAL and VXGE_DEFAULT_RTI_RTIMER_VAL have value
zero but nevertheless we should use the right value on each.

Pointed by: jhb
X-MFC with: r314145
18:54:33 - r314157
(1 day 9 hours ago)
by avg
Affects: 
(7 files)
/stable/10/lib/libmd/*
MFC r282736: Unbreak build following rev. 282726 (MFC-ed as r314144)
18:15:04 - r314156
(1 day 10 hours ago)
by pfg
Affects:  /head/sys/dev/rt/if_rt.c
rt_attach(): double assignment.

Found with: coccinelle (da.cocci)
18:14:36 - r314155
(1 day 10 hours ago)
by tuexen
Affects:  /head/sys/netinet/tcp_output.c
TCP window updates are only sent if the window can be increased by at
least 2 * MSS. However, if the receive buffer size is small, this might
be impossible. Add back a criterion to send a TCP window update if
the window can be increased by at least half of the receive buffer size.
This condition was removed in r242252. This patch simply brings it back.
PR: 211003
Reviewed by: gnn
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D9475
17:56:24 - r314154
(1 day 10 hours ago)
by markj
Affects:  /head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
Fix memory leaks in error cases in libdtrace.

Submitted by: Tom Rix <trix@juniper.net>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9705
17:54:17 - r314153
(1 day 10 hours ago)
by markj
Affects:  /head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c
Fix a memory leak in an error case in libctf.

Submitted by: Tom Rix <trix@juniper.net>
MFC after: 1 week
17:46:38 - r314152
(1 day 10 hours ago)
by jkim
Affects:  /head/lib/libcompiler_rt/Makefile
Remove an assembler flag, which is redundant since r309124. The upstream
took care of it by introducing a macro NO_EXEC_STACK_DIRECTIVE.

http://llvm.org/viewvc/llvm-project?rev=273500&view=rev

Reviewed by: dim
17:44:06 - r314151
(1 day 10 hours ago)
by ngie
Affects:  /head/sys/modules/iwm/Makefile
Unbreak if_iwm.ko after r314076

Add if_iwm_7000.c/if_iwm_8000.c to SRCS to match similar additions made
to sys/conf/files after refactoring done in the commit noted.

PR: 217308
Pointyhat to: adrian
Submitted by: Andreas Nilsson <andrnils@gmail.com>
Reported by: Jakob Alvermark <jakob@alvermark.net>, Juan Ramómon Molina Menor
<listjm@club.fr>
Sponsored by: Dell EMC Isilon
16:54:30 - r314150
(1 day 11 hours ago)
by asomers
Affects:  /head/sys/dev/xen/netback/netback_unit_tests.c
Fix the xnb(4) unit tests

One test was inadvertently expecting a bug in the kernel's sscanf
implementation circa 2012. I don't know when that bug got fixed.

Reported by: royger
Reviewed by: royger
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9766
16:42:48 - r314149
(1 day 11 hours ago)
by nyan
Affects:  /head/etc/devd.conf
The ct driver was removed by r312910.
16:31:04 - r314148
(1 day 11 hours ago)
by asomers
Affects:  /head/sys/dev/xen/netback/netback.c
/head/sys/dev/xen/netback/netback_unit_tests.c
Misc Coverity fixes in xnb(4)

Most of these are null pointer dereferences or missing error checks in the
unit tests. One is a missing error check in xnb_attach_failed. None can
cause real problems in running systems.

Reported by: Coverity
CIDs: 1092469 1092468 1092467 2092466 1092465 1092512 1092511 1092510
CIDs: 1092510 1092509 1092508 1092507
Reviewed by: royger
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9234
16:18:57 - r314147
(1 day 12 hours ago)
by pfg
Affects:  /head/sys/dev/bktr/bktr_core.c
bktr(4): double assignment.

First assignment is obviously overwritten by the next line.
Leave newest assignment: it was introduced in r29233.

Found with: coccinelle (da.cocci)
16:15:42 - r314146
(1 day 12 hours ago)
by avg
Affects: 
(5 files)
/stable/10/sys/modules/*
MFC r263219: add sha256c.c to the various modules that included sha2.c...
16:10:15 - r314145
(1 day 12 hours ago)
by pfg
Affects:  /head/sys/dev/vxge/vxge.c
/head/sys/dev/vxge/vxgehal/vxgehal-config.c
dev/vxe: double assignments.

Fix some suspicious code, likely caused by excessive copy-pasting.

Found with: coccinelle (da.cocci)
MFC after: 2 weeks
16:07:45 - r314144
(1 day 12 hours ago)
by avg
Affects: 
(15 files)
/stable/10/lib/libmd/*
MFC r282726: Ensure libmd symbols do not clash with libcrypto

Add a prefix to all symbols in libmd to avoid incompatibilites
with same-named, but not binary compatible, symbols from libcrypto.

Also introduce Weak aliases to avoid the need to rebuild dependent
binaries and a major version bump.

PR: 199119
16:05:11 - r314143
(1 day 12 hours ago)
by avg
Affects: 
(8 files)
/stable/10/lib/*
/stable/10/sys/*
MFC r263215,r263218,r285366: replace the kernel sha256 code

r263215 copy these files from lib/libmd in preperation for moving these
files into the kernel...

r263218 replace the kernel's version w/ cperciva's implementation...

r285366 Complete the move that was started w/ r263218..

Note that the last change is out of order with r282726 that I am going
to merge as well.

Many thanks to cperciva for the more efficient code and to jmg for
integrating it into the kernel.
15:30:21 - r314142
(1 day 12 hours ago)
by pfg
Affects:  /head/sys/dev/ce/ceddk.c
dev/ce: double assignment.

The code is not operational right now so just comment away an obviously
useless assignment. Fix some typos while here.

Found with: coccinelle (da.cocci)
15:10:46 - r314141
(1 day 13 hours ago)
by pfg
Affects:  /head/usr.sbin/rtadvd/config.c
rtadvd(8): double assignment.

Remove doubtful initialization since the value will be overwritten
immediately afterwards.

Found with: coccinelle (da.cocci)
15:05:01 - r314140
(1 day 13 hours ago)
by pfg
Affects:  /head/usr.sbin/camdd/camdd.c
camdd(8): double assignment.

Why do a calculation twice when you can do it just once.

Found with: coccinelle (da.cocci)
14:39:51 - r314139
(1 day 13 hours ago)
by emaste
Affects:  /head/usr.bin/vi/catalog/Makefile
make vi message catalogues build independent of locale

r275234 addressed sort automatically converting 8-bit locales to UTF-8
by using "LANG=C sort", but LC_ALL overrides LANG if set, so the issue
may still be present depending on the user's environment. Use LC_ALL=C
instead.

Reported by: tests.reproducible-builds.org
Reviewed by: bapt
MFC after: 1 week
Sponsored by: The Linux Foundation / Core Infrastructure Initiative
Differential Revision: https://reviews.freebsd.org/D9765
13:14:28 - r314138
(1 day 15 hours ago)
by royger
Affects:  /head/sys/dev/xen/gntdev/gntdev.c
xen/gndev: use UOFF_TO_IDX instead of OFF_TO_IDX

The Xen grant table device treats the mmap offset parameter as an unsigned
type, and as so it must use the newly introduced UOFF_TO_IDX.

Sponsored by: Citrix Systems R&D
MFC after: 2 weeks
X-MFC-with: r313690
09:55:55 - r314137
(1 day 18 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/fs/nfsclient/nfs_clvfsops.c
MFC r313800:
Do not access memory past the buffer end.
Do not accept and silently truncate too long hostname.
09:53:54 - r314136
(1 day 18 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/bitops.h
Implement __test_and_clear_bit() and __test_and_set_bit() in the LinuxKPI.

The clang compiler will optimise these functions down to three AMD64
instructions if the bit argument is a constant during compilation.

MFC after: 1 week
Sponsored by: Mellanox Technologies
09:52:22 - r314135
(1 day 18 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/fs/nfsclient/nfs_clvfsops.c
MFC r313799:
Do not allocate char[MNAMELEN] on stack in nfsclient.
09:41:32 - r314134
(1 day 18 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/kern/vfs_vnops.c
/stable/11/sys/sys/file.h
MFC r313495:
Do not establish advisory locks when doing open(O_EXLOCK) or open(O_SHLOCK)
for files which do not have DTYPE_VNODE type.

MFC r313549:
Fix r313495.
09:30:37 - r314133
(1 day 18 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/kern/vfs_vnops.c
MFC r313496:
Increase a chance of devfs_close() calling d_close cdevsw method.
08:17:42 - r314132
(1 day 20 hours ago)
by dchagin
Affects:  /head/sys/compat/linux/linux_misc.h
Right clock defines specified in linux_timer.h.
Get rid of spirious clock defines from linux_misc.h.

MFC after: 1 week
07:48:58 - r314131
(1 day 20 hours ago)
by np
Affects:  /head/sys/ofed/drivers/infiniband/core/uverbs_main.c
Avoid NULL dereference in a couple of sysctl handlers in ibcore.
iw_cxgbe sets ib_device->dma_device to NULL (since r311880).

Reviewed by: hselasky@
Sponsored by: Chelsio Communications
07:45:58 - r314130
(1 day 20 hours ago)
by dim
Affects: 
(516 files)
/projects/clang400-import/*
Merge ^/head r313896 through r314128.
07:42:49 - r314129
(1 day 20 hours ago)
by kib
Affects: 
(2 files)
/stable/11/bin/ls/print.c
MFC r313798:
Use uintmax_t to print st_nlink.
07:39:01 - r314128
(1 day 20 hours ago)
by kib
Affects: 
(2 files)
/stable/11/libexec/rtld-elf/rtld.c
MFC r313494:
Handle protected symbols in rtld.
07:28:29 - r314127
(1 day 21 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/sys/elf_generic.h
MFC r313493:
Define ELF_ST_VISIBILITY().
07:12:18 - r314126
(1 day 21 hours ago)
by delphij
Affects:  /releng/10.3/UPDATING
/releng/10.3/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c
/releng/10.3/sys/conf/newvers.sh
Fix OpenSSL RC4_MD5 cipher vulnerability.

Approved by: so
07:11:48 - r314125
(1 day 21 hours ago)
by delphij
Affects: 
(481 files)
/releng/11.0/*
Fix multiple vulnerabilities of OpenSSL. [SA-17:02]

Fix system hang when booting when PCI-express HotPlug is enabled.
[EN-17:01]

Fix NIS master updates are not pushed to NIS slave. [EN-17:02]

Fix compatibility with Hyper-V/storage after KB3172614 or
KB3179574. [EN-17:03]

Make makewhatis output reproducible. [EN-17:04]

Approved by: so
07:07:21 - r314124
(1 day 21 hours ago)
by dexuan
Affects: 
(2 files)
/stable/10/sys/dev/hyperv/netvsc/if_hn.c
MFC r312689, r312690

Approved by: sephe (mentor)

r312689
  hyperv/hn: add a sysctl name for the VF interface

  This makes it easier for the userland script to find the releated
  VF interface.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9101

r312690
  hyperv/hn: add devctl_notify for VF_UP/DOWN events

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9102
07:04:17 - r314123
(1 day 21 hours ago)
by dexuan
Affects: 
(6 files)
/stable/10/sys/dev/hyperv/netvsc/*
MFC: r312688

Approved by: sephe (mentor)

r312688
  hyperv/hn: add the support for VF drivers (SR-IOV)

  Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and
  a VF NIC to work together (both NICs have the same MAC address), mainly to
  support seamless live migration.

  When the VF device becomes UP (or DOWN), the synthetic NIC driver needs
  to switch the data path from the synthetic NIC to the VF (or the opposite).

  Note: multicast/broadcast packets are still received through the synthetic
  NIC and we need to inject the packets through the VF interface (if the VF is
  UP), even if the synthetic NIC is DOWN (so we need to force the rxfilter
  to be NDIS_PACKET_TYPE_PROMISCUOUS, when the VF is UP).

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8964
06:57:19 - r314122
(1 day 21 hours ago)
by dexuan
Affects:  /stable/10/sys/net/if.c
/stable/10/sys/net/if_var.h
MFC: r312687, r312916

Approved by: sephe (mentor)

r312687
  ifnet: introduce event handlers for ifup/ifdown events

  Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and
  a VF NIC to work together, mainly to support seamless live migration.

  When the VF device becomes UP (or DOWN), the synthetic NIC driver needs
  to switch the data path from the synthetic NIC to the VF (or the opposite).

  So the synthetic NIC driver needs to know when a VF device is becoming
  UP or DOWN and hence the patch is made.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8963

r312916
  ifnet: move the new ifnet_event EVENTHANDLER_DECLARE to net/if_var.h

  Thank glebius for pointing this out:
  "The network stuff shall not be added to sys/eventhandler.h"

  Reviewed by: David_A_Bright_DELL.com, sephe, glebius
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9345
06:49:46 - r314121
(1 day 21 hours ago)
by dexuan
Affects: 
(3 files)
/stable/10/sys/dev/hyperv/netvsc/if_hn.c
/stable/10/sys/dev/hyperv/netvsc/if_hnvar.h
MFC: r312685, r312686

Approved by: sephe (mentor)

r312685
  hyperv/hn: remember the channel pointer in struct hn_rx_ring

  This will be used by the coming NIC SR-IOV patch.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8909

r312686
  hyperv/hn: remove the MTU and IFF_DRV_RUNNING checking in hn_rxpkt()

  It's unnecessary because the upper nework stack does the same checking.

  In the case of Hyper-V SR-IOV, we need to remove the checking because
  1) multicast/broadcast packets are still received through the synthetic
  NIC and we need to inject the packets through the VF interface;
  2) we must inject the packets even if the synthetic NIC is down, or has
  a different MTU from the VF device.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8962
05:40:59 - r314120
(1 day 22 hours ago)
by lidl
Affects:  /head/contrib/blacklist/bin/blacklistd.c
Reset failed login count to zero when removing a blocked address

The blacklistd daemon keeps records of failed login attempts for
each address:port that is flagged as a failed login. When a
successful login occurs for that address:port combination,
the record's last update time is set to zero, to indicate no current
failed login attempts.

Reset the failed login count to zero, so that at the next failed
login attempt, the counting will restart properly at zero. Without
this reset to zero, the first failed login after a successful login
will cause the address to be blocked immediately.

When debugging is turned on, output more information about database
state before and after the database updates have occured.

A similar patch has already been upstreamed to NetBSD.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
05:33:20 - r314119
(1 day 22 hours ago)
by manu
Affects:  /head/sys/dev/extres/clk/clk_div.c
Do not check divider length if we have a div table.

Reviewed by: mmel
04:26:17 - r314118
(2 days ago)
by badger
Affects:  /head/tests/sys/kern/ptrace_test.c
Actually fix buildworlds other than i386/amd64/sparc64 after r313992

Disable offending test for platforms without a userspace visible
breakpoint().

Reported by: rpokala
Approved by: vangyzen (mentor)
02:28:08 - r314117
(2 days 2 hours ago)
by emaste
Affects: 
(7 files)
/head/usr.sbin/makefs/cd9660.c
/head/usr.sbin/makefs/cd9660.h
/head/usr.sbin/makefs/cd9660/*
makefs: eliminate global cd9660 structure

For diff reduction with NetBSD

NetBSD file versions:
cd9660.c 1.39
cd9660.h 1.19
cd9660/cd9660_debug.c 1.12
cd9660/cd9660_eltorito.c 1.20
cd9660/cd9660_write.c 1.16
cd9660/iso9660_rrip.c 1.12
cd9660/iso9660_rrip.h 1.6

Reviewed by: ngie
Obtained from: NetBSD
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9627
01:18:47 - r314116
(2 days 3 hours ago)
by jtl
Affects:  /head/sys/kern/subr_terminal.c
Fix a panic during boot caused by inadequate locking of some vt(4) driver
data structures.

vt_change_font() calls vtbuf_grow() to change some vt driver data
structures. It uses TF_MUTE to prevent the console from trying to use those
data structures while it changes them.

During the early stage of the boot process, the vt driver's tc_done routine
uses those data structures; however, it is currently called outside the
TF_MUTE check.

Move the tc_done routine inside the locked TF_MUTE check.

PR: 217282
Reviewed by: ed, ray
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D9709
00:02:49 - r314115
(2 days 4 hours ago)
by jhb
Affects:  /head/libexec/rtld-elf/mips/reloc.c
Fully handle the special encoding of GOT[1] on mips64.

The MIPS ABI does not require the second GOT entry to be reserved for use
by the runtime linker as on other architectures. Instead, static linkers
use a special value in the second GOT entry to indicate if the entry is
reserved. This value is supposed to consist of an address with the MSB
set and the rest of the bits all zero which is an invalid user address.

However, the old binutils currently in the tree uses the 32-bit mask value
(2^31) on 64-bit MIPS instead of 2^63. This was fixed in upstream
binutils in 2008 to use 2^63 on 64-bit MIPS.

The first part of this change changes the runtime check in init_pltgot()
to check for both values (2^31 and 2^63) when deciding whether to store
the current object pointer in GOT[1] which fixes dynamic N64 binaries
compiled with modern binutils.

However, the initial version of this fix exposed another related bug in
that _rtld_relocate_nonplt_self() was only checking for the new value
(2^63) in GOT[1] and incorrectly treated GOT[1] as a local GOT entry
(and did not relocate the final local GOT entry). To handle this, fix
all of the places that check for GOT[1]'s status to use the same macro
that checks for both values on N64.

Reviewed by: kan, imp
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D9708
2017 - 02 - 22   (3 days ago)
23:58:54 - r314114
(2 days 4 hours ago)
by jhb
Affects:  /head/sys/boot/mips/beri/boot2/Makefile
Use LDFLAGS with CC instead of _LDFLAGS.

This is a followup to r311458. _LDFLAGS is for use with LD, whereas
LDFLAGS is for use with CC.
23:57:22 - r314113
(2 days 4 hours ago)
by asomers
Affects:  /head/tests/sys/netinet/fibs_test.sh
Remove tests/sys/netinet/fibs_tests's dependency on net/socat

Instead of bridging two tap interfaces with socat, just use an epair pair.

MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
22:00:50 - r314112
(2 days 6 hours ago)
by tsoome
Affects:  /head/sys/boot/zfs/zfsimpl.c
/head/sys/cddl/boot/zfs/zfsimpl.h
loader: update symlink support in zfs reader

As the current zfs file system is providing symlink via system attributes, need
to update the code accordingly.

Note, as the zfsboot code does not free the memory at this time, the
object list will put some stress on the boot2 heap, eventually we should
address the issue.

Reviewed by: allanjude, smh
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9706
21:50:37 - r314111
(2 days 6 hours ago)
by lidl
Affects:  /head/contrib/blacklist/libexec/blacklistd-helper
Improve ipfw rule creation for blacklist-helper script

When blocking an address, the blacklist-helper script
needs to do the following things for the ipfw packet
filter:

 - create a table to hold the addresses to be blocked,
  so lookups can be done quickly, and place the address
  to be blocked in that table
 - create rule that does the lookup in the table and
  blocks the packet

The ipfw system allows multiple rules to be inserted for
a given rule number. There only needs to be one rule
to do the lookup per port. Modify the script to probe
for the existence of the rule before attempting to create
it, so only one rule is inserted, rather than one rule per
blocked address.

PR: 214980
Reported by: azhegalov (at) gmail.com
Reviewed by: emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9681
20:47:25 - r314110
(2 days 7 hours ago)
by imp
Affects: 
(5 files)
/head/etc/devd.conf
/head/share/man/man4/*
Remove more stray EISA refernces: ahb was removed. Remove the cross
reference and replace, where appropiate, with ahd.4.
20:24:09 - r314109
(2 days 8 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/scatterlist.h
Convert magic values into macros in the LinuxKPI scatterlist
implementation.

Suggested by: cem @
MFC after: 1 week
Sponsored by: Mellanox Technologies
20:11:21 - r314108
(2 days 8 hours ago)
by dchagin
Affects:  /stable/11
Record mergeinfo for r313284, r313285, r313684, r313912 missied in r314107.
19:57:59 - r314107
(2 days 8 hours ago)
by dchagin
Affects: 
(23 files)
/stable/11/sys/amd64/*
/stable/11/sys/compat/linux/*
/stable/11/sys/i386/linux/*
MFC r313284:

  Update syscall.master to 4.10-rc6. Also fix comments, a typo,
  and wrong numbering for a few unimplemented syscalls.

  For 32-bit Linuxulator, socketcall() syscall was historically
  the entry point for the sockets API. Starting in Linux 4.3, direct
  syscalls are provided for the sockets API. Enable it.

  The initial version of patch was provided by trasz@ and extended by me.

MFC r313285:

  Regen after r313284.

MFC r313684:

  Fix r313284.

  Members of the syscall argument structures are padded to a word size. So,
  for COMPAT_LINUX32 we should convert user supplied system call arguments
  which is 32-bit in that case to the array of register_t.

MFC r313912:

  Finish r313684.

  Convert linux_recv(), linux_send() and linux_accept() system call arguments
  to the register_t type too.
19:39:54 - r314106
(2 days 8 hours ago)
by hselasky
Affects: 
(4 files)
/head/sys/compat/linuxkpi/common/*
/head/sys/conf/files
/head/sys/modules/linuxkpi/Makefile
Optimise unmapped LinuxKPI page allocations.

When allocating unmapped pages, take advantage of the direct map on
AMD64 to get the virtual address corresponding to a page. Else all
pages allocated must be mapped because sometimes the virtual address
of a page is requested.

Move all page allocation and deallocation code into an own C-file.

Add support for GFP_DMA32, GFP_KERNEL, GFP_ATOMIC and __GFP_ZERO
allocation flags.

Make a clear separation between mapped and unmapped allocations.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
19:31:02 - r314105
(2 days 8 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/scatterlist.h
Improve LinuxKPI scatter list support.

The i915kms driver in Linux 4.9 reimplement parts of the scatter list
functions with regards to performance. In other words there is not so
much room for changing structure layouts and functionality if the
i915kms should be built AS-IS. This patch aligns the scatter list
support to what is expected by the i915kms driver. Remove some
comments not needed while at it.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
18:44:57 - r314104
(2 days 9 hours ago)
by dim
Affects:  /head/lib/libcxxrt/Version.map
Surround any unmangled C++ names in libcxxrt's version map with 'extern
"C++"', otherwise ld refuses to make the symbols global in the final
library. This causes the __int128-related symbols to go missing when
the library is stripped during installation.

Helpful hints: emaste
MFC after: 2 weeks
X-MFC-With: r314061
17:57:24 - r314103
(2 days 10 hours ago)
by marius
Affects: 
(2 files)
/stable/10/sys/dev/e1000/if_em.c
MFC: r311979

Reset the EIAC register to include the LINK status bit and restore
link up/down notifications.
17:57:19 - r314102
(2 days 10 hours ago)
by marius
Affects: 
(2 files)
/stable/11/sys/dev/e1000/if_em.c
MFC: r311979

Reset the EIAC register to include the LINK status bit and restore
link up/down notifications.
17:20:18 - r314101
(2 days 11 hours ago)
by avg
Affects:  /head/sys/sys/cdefs.h
don't use C99 static array indices with older GCC versions

For example, the FreeBSD GCC (4.2.1) has a spotty support for that
feature. If the static keyword is used with an unnamed array parameter
in a function declaration, then the compilation fails with:
error: static or type qualifiers in abstract declarator

The feature does work if the parameter is named.
So, the restriction introduced in this commit can be removed when all
affected function prototypes have the workaround.

MFC after: 1 week
Sponsored by: Panzura
17:13:00 - r314100
(2 days 11 hours ago)
by avg
Affects:  /head/sys/sys/cdefs.h
fix a typo in __STDC_VERSION__ in __min_size requirements

MFC after: 1 week
Sponsored by: Panzura
16:37:45 - r314099
(2 days 11 hours ago)
by bapt
Affects:  /head/usr.bin/lam/lam.c
Better fix for r314098

The actual issue was the fact that if - was used then some restriction were
already set to stdin when we were applying caph_limit_stdio which was failing
due to the fact the fd was the fd was already restricted to lower rights.

Restricting stdio before actually opening the files prevent trying to raise the
right and fixes the issue.

And this allows to keep failing the program if restriction failed

Approved by: allanjude
Differential Revision: https://reviews.freebsd.org/D9723
15:30:57 - r314098
(2 days 12 hours ago)
by allanjude
Affects:  /head/usr.bin/lam/lam.c
lam(1): Failing to restrict stdin/stdout/stderr should not be fatal

When fed from a pipe, lam(1) would sometimes fail:
lam: unable to limit stdio: Capabilities insufficient

fixed regression in portsnap(8) introduced in r313938

This broke portsnap(8), the app that the capsicumization of lam(1) was
meant to secure.

# portsnap fetch update
Looking up portsnap.FreeBSD.org mirrors... 6 mirrors found.
Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Updating from Tue Feb 21 16:05:39 MSK 2017 to Tue Feb 21 16:59:30 MSK 2017.
Fetching 5 metadata patches.lam: unable to limit stdio: Capabilities
insufficient
 done.
Applying metadata patches... done.
Fetching 5 metadata files... lam: unable to limit stdio: Capabilities
insufficient
/usr/sbin/portsnap: cannot open
8c94d2c3f8fcea20eb1fd82021566c99c63a010e6b3702ee11e7a491795bcfb8.gz: No such
file or directory
metadata is corrupt.

Reported by: Vladimir Zakharov <zakharov.vv@gmail.com>, Ben Woods
<woodsb02@gmail.com>
10:21:39 - r314097
(2 days 18 hours ago)
by marius
Affects: 
(10 files)
/head/sys/*
- Allow different slicers for different flash types to be registered
  with geom_flashmap(4) and teach it about MMC for slicing enhanced
  user data area partitions. The FDT slicer still is the default for
  CFI, NAND and SPI flash on FDT-enabled platforms.
- In addition to a device_t, also pass the name of the GEOM provider
  in question to the slicers as a single device may provide more than
  provider.
- Build a geom_flashmap.ko.
- Use MODULE_VERSION() so other modules can depend on geom_flashmap(4).
- Remove redundant/superfluous GEOM routines that either do nothing
  or provide/just call default GEOM (slice) functionality.
- Trim/adjust includes

Submitted by: jhibbits (RouterBoard bits)
Reviewed by: jhibbits
09:39:15 - r314096
(2 days 18 hours ago)
by bapt
Affects: 
(57 files)
/vendor/mdocml/1.4.1/*
Tag import of mandoc 1.4.1
09:33:50 - r314095
(2 days 18 hours ago)
by bapt
Affects:  /vendor/mdocml/dist/LICENSE
/vendor/mdocml/dist/NEWS
Import mandoc 1.14.1
09:22:17 - r314094
(2 days 19 hours ago)
by royger
Affects:  /head/sys/dev/xen/timer/timer.c
xen/timer: mark the Xen PV timer as not safe for suspension

Note that the timer itself fully supports suspension, but due to the lack of
ordering during the resume process FreeBSD cannot guarantee that the timer is
resumed before any device attempts to use it.

Submitted by: Liuyingdong <liuyingdong@huawei.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D9639
08:49:52 - r314093
(2 days 19 hours ago)
by royger
Affects: 
(2 files)
/stable/11/sys/dev/bxe/bxe.c
MFC r313771

bxe: enable usage with NetXtreme II BCM57840 2x20GbE chip

Sponsored by: Citrix Systems R&D
08:37:51 - r314092
(2 days 19 hours ago)
by dexuan
Affects: 
(2 files)
/stable/11/sys/dev/hyperv/netvsc/if_hn.c
MFC 312689, 312690

Approved by: sephe (mentor)

r312689
  hyperv/hn: add a sysctl name for the VF interface

  This makes it easier for the userland script to find the releated
  VF interface.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9101

r312690
  hyperv/hn: add devctl_notify for VF_UP/DOWN events

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9102
08:26:51 - r314091
(2 days 20 hours ago)
by dexuan
Affects: 
(6 files)
/stable/11/sys/dev/hyperv/netvsc/*
MFC 312688

Approved by: sephe (mentor)

r312688
  hyperv/hn: add the support for VF drivers (SR-IOV)

  Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and
  a VF NIC to work together (both NICs have the same MAC address), mainly to
  support seamless live migration.

  When the VF device becomes UP (or DOWN), the synthetic NIC driver needs
  to switch the data path from the synthetic NIC to the VF (or the opposite).

  Note: multicast/broadcast packets are still received through the synthetic
  NIC and we need to inject the packets through the VF interface (if the VF is
  UP), even if the synthetic NIC is DOWN (so we need to force the rxfilter
  to be NDIS_PACKET_TYPE_PROMISCUOUS, when the VF is UP).

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8964
08:02:24 - r314090
(2 days 20 hours ago)
by dexuan
Affects:  /stable/11/sys/net/if.c
/stable/11/sys/net/if_var.h
MFC: 312687, 312916

Approved by: sephe (mentor)

r312687
  ifnet: introduce event handlers for ifup/ifdown events

  Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and
  a VF NIC to work together, mainly to support seamless live migration.

  When the VF device becomes UP (or DOWN), the synthetic NIC driver needs
  to switch the data path from the synthetic NIC to the VF (or the opposite).

  So the synthetic NIC driver needs to know when a VF device is becoming
  UP or DOWN and hence the patch is made.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8963

r312916
  ifnet: move the new ifnet_event EVENTHANDLER_DECLARE to net/if_var.h

  Thank glebius for pointing this out:
  "The network stuff shall not be added to sys/eventhandler.h"

  Reviewed by: David_A_Bright_DELL.com, sephe, glebius
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9345
07:42:28 - r314089
(2 days 20 hours ago)
by dexuan
Affects:  /stable/11/sys/net/if.c
/stable/11/sys/net/if_var.h
revert the MFC r314085

Sorry, I generated a wrong commit log for r314085 due to a copy&pasate mistake.
Let me revert it and I'll redo the MFC.
07:12:20 - r314088
(2 days 21 hours ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
Slightly polish isp_dump_atpd().

MFC after: 2 weeks
07:07:05 - r314087
(2 days 21 hours ago)
by kib
Affects:  /head/sys/x86/x86/x86_mem.c
More fixes for regression in r313898 on i386.
Use long long constants where needed.

Reported and tested by: kargl
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
06:43:49 - r314086
(2 days 21 hours ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
/head/sys/dev/isp/isp_freebsd.h
/head/sys/dev/isp/isp_target.c
Fix multiple problems around LUN disable under load.

 - Move private data about ATIOs/INOTs from per-LUN to per-channel data.
This allows active commands to continue operation after LUN destruction.
This also simplifies lookup of the data by tag in some situations.
 - Unify three restart_queue processing implementations.
 - Complete all ATIOs from restart_queue on LUN disable.
 - Delete ATIO private data when command completed or aborted, not depending
on the ATIO being requeued, that was ugly hack and could never happen. CAM
should always call ether XPT_CONT_TARGET_IO with status or XPT_ABORT.
 - Implement XPT_ABORT for queued ATIOs/INOTs to allow CAM do graceful
shutdown, not depending on LUN disable, as it is done in ahd(4)/targ(4).
 - Unify isp_endcmd() arguments to make it more usable in generic code.
 - Remove never really used LUN state reference counter.

MFC after: 2 weeks
06:26:50 - r314085
(2 days 22 hours ago)
by dexuan
Affects:  /stable/11/sys/net/if.c
/stable/11/sys/net/if_var.h
MFC: 312687, 312688

Approved by: sephe (mentor)

r312687
  ifnet: introduce event handlers for ifup/ifdown events

  Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and
  a VF NIC to work together, mainly to support seamless live migration.

  When the VF device becomes UP (or DOWN), the synthetic NIC driver needs
  to switch the data path from the synthetic NIC to the VF (or the opposite).

  So the synthetic NIC driver needs to know when a VF device is becoming
  UP or DOWN and hence the patch is made.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8963

r312688
  hyperv/hn: add the support for VF drivers (SR-IOV)

  Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and
  a VF NIC to work together (both NICs have the same MAC address), mainly to
  support seamless live migration.

  When the VF device becomes UP (or DOWN), the synthetic NIC driver needs
  to switch the data path from the synthetic NIC to the VF (or the opposite).

  Note: multicast/broadcast packets are still received through the synthetic
  NIC and we need to inject the packets through the VF interface (if the VF is
  UP), even if the synthetic NIC is DOWN (so we need to force the rxfilter
  to be NDIS_PACKET_TYPE_PROMISCUOUS, when the VF is UP).

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8964
06:12:33 - r314084
(2 days 22 hours ago)
by dexuan
Affects: 
(2 files)
/stable/11/sys/dev/hyperv/netvsc/if_hn.c
MFC: 312686

Approved by: sephe (mentor)

r312686
  hyperv/hn: remove the MTU and IFF_DRV_RUNNING checking in hn_rxpkt()

  It's unnecessary because the upper nework stack does the same checking.

  In the case of Hyper-V SR-IOV, we need to remove the checking because
  1) multicast/broadcast packets are still received through the synthetic
  NIC and we need to inject the packets through the VF interface;
  2) we must inject the packets even if the synthetic NIC is down, or has
  a different MTU from the VF device.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8962
06:06:58 - r314083
(2 days 22 hours ago)
by dexuan
Affects: 
(3 files)
/stable/11/sys/dev/hyperv/netvsc/if_hn.c
/stable/11/sys/dev/hyperv/netvsc/if_hnvar.h
MFC: 312685

Approved by: sephe(mentor)

r312685
  hyperv/hn: remember the channel pointer in struct hn_rx_ring

  This will be used by the coming NIC SR-IOV patch.

  Reviewed by: sephe
  Approved by: sephe (mentor)
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8909
05:11:24 - r314082
(2 days 23 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
/head/sys/dev/iwm/if_iwm_util.c
/head/sys/dev/iwm/if_iwm_util.h
[iwm] Move iwm_dma_contig_alloc/_free functions to if_iwm_util.c.

Obtained from: dragonflybsd.git 83a1185edeede081051a6c00417d4c5a8f5988eb
04:53:33 - r314081
(2 days 23 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm_7000.c
[iwm] Switch 7265D and 3165 devices to 7265D firmware.

Obtained from: dragonflybsd.git 0cb0a810cb4e04b30937cb4260e779f717a86492
04:51:37 - r314080
(2 days 23 hours ago)
by adrian
Affects:  /head/share/man/man4/iwmfw.4
add 7265D firmware mention in the iwmfw manpage.
04:50:52 - r314079
(2 days 23 hours ago)
by adrian
Affects: 
(3 files)
/head/sys/modules/iwmfw/Makefile
/head/sys/modules/iwmfw/iwm7265Dfw/Makefile
[iwmfw] add 7265D firmware.
04:44:08 - r314078
(2 days 23 hours ago)
by adrian
Affects:  /head/sys/conf/files
add 7265D firmware.
04:42:02 - r314077
(2 days 23 hours ago)
by adrian
Affects:  /head/sys/contrib/dev/iwm/iwm-7265D-17.fw.uu
Add 7265D firmware.
04:35:53 - r314076
(2 days 23 hours ago)
by adrian
Affects: 
(7 files)
/head/sys/conf/files
/head/sys/dev/iwm/*
[iwm] Move struct iwm_cfg chipset configs to if_iwm_7000.c and _8000.c

* This is more similar to how code/definitions are distributed in
  Linux's iwlwifi.

* This should make recognizing new chipset variants, and adding additional
  flags from the Linux iwlwifi code easier, without blowing up if_iwm.c

Obtained from: dragonflybsd.git 27d11320e707d2c41424efc1983762f6799941d6
04:35:07 - r314075
(2 days 23 hours ago)
by badger
Affects:  /head/tests/sys/kern/ptrace_test.c
Fix world build for archs where __builtin_debugtrap() does not work.

The offending code was introduced in r313992.

Reported by: rpokala
Approved by: kib (mentor)
04:28:10 - r314074
(3 days ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
[iwm] Simplify device id matching code a bit.

* Just add the struct iwm_cfg pointers to the iwm_devices array, to get
  rid of the large switch clause.

Obtained from: dragonflybsd.git 35f0e6c86c1654323d6b19f7a077f4ab8ac85868
04:27:07 - r314073
(3 days ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
[iwm] Remove OpenBSD-specific comment. Beautify pci cfg space accesses.

Obtained from: dragonflybsd.git 710fdd011c30a1bd9f53b87c843fb8907c4a6cfd
04:15:39 - r314072
(3 days ago)
by lidl
Affects: 
(2 files)
/stable/11/crypto/openssh/auth.c
MFC r313965:

Only notify blacklistd for successful logins in auth.c

Before this change, every pass through auth.c resulted in a
call to blacklist_notify().

In a normal remote login, there would be a failed login flagged for
the printing of the "xxx login:" prompt, before the remote user
could enter a password.

If the user successfully entered a good password, then a good login
would be flagged, and everything would be OK.

If the user entered an incorrect password, there would be another
failed login flagged in auth1.c (or auth2.c) for the actual bad
password attempt. Finally, when sshd got around to issuing the
second "xxx login:" prompt, there would be yet another failed login
notice sent to blacklistd.

So, if there was a 3 bad logins limit set (the default), the system
would actually block the address after the first bad password attempt.

Reported by: Rick Adams
Reviewed by: des
Sponsored by: The FreeBSD Foundation
03:49:46 - r314071
(3 days ago)
by ian
Affects:  /head/sys/arm/ti/ti_sdhci.c
Revert to this driver's historic behavior: assume an sd card is writable
if the fdt data doesn't provide a gpio pin for reading the write protect
switch and also doesn't contain a "wp-disable" property.

In r311735 the long-bitrotted code in this driver for using the non-
standard fdt "mmchs-wp-gpio-pin" property was replaced with new common
support code for handling write-protect and card-detect gpio pins. The
old code never found a property with that name, and the logic was to
assume that no gpio pin meant that the card was not write protected.

The new common code behaves differently. If there is no fdt data saying
what to do about sensing write protect, the value in the standard SDHCI
PRESENT_STATE register is used. On this hardware, if there is no signal
for write protect muxed into the sd controller then that bit in the
register indicates write protect.

The real problem here is the fdt data, which should contain "wp-disable"
properties for eMMC and micro-sd slots where write protect is not even
an option in the hardware, but we are not in control of that data, it
comes from linux. So we have to make the same flawed assumption in our
driver that the corresponding linux driver has: no info means no protect.

Reported by: several users on the arm@ list
Pointy hat: me, for not testing enough before committing r311735
02:51:30 - r314070
(3 days 1 hour ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
[iwm] Fix typo in commit a7697ea01c11fd493aec52260a02f31df680eb91.

* The sc->sc_uc.uc_error_event_table value is now at sc->error_event_table,
  and not sc->umac_error_event_table.

Obtained from: dragonflybsd.git 612855b1a8c321ec9ba34f63edf913e7ecff8363
02:49:57 - r314069
(3 days 1 hour ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
/head/sys/dev/iwm/if_iwmvar.h
[iwm] Get rid of unneeded IWM_FWDMASEGSZ and IWM_FWMAXSIZE constants

* We only need IWM_FH_MEM_TB_MAX_LENGTH bytes for the fw_dma memory.

Obtained from: dragonflybsd.git f414b8da30816705e32573cc58097cacac34f161
02:35:59 - r314068
(3 days 1 hour ago)
by pfg
Affects: 
(18 files)
/head/sys/*
sys: Replace zero with NULL for pointers.

Found with: devel/coccinelle
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D9694
02:24:42 - r314067
(3 days 2 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
[iwm] With the previous commits, this DELAY no longer seems to be needed.

Obtained from: dragonflybsd.git 516272d3d02c821ace16a91cfdeb28540ac74ecc
02:23:14 - r314066
(3 days 2 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
/head/sys/dev/iwm/if_iwmreg.h
/head/sys/dev/iwm/if_iwmvar.h
[iwm] Sync IWM_MVM_ALIVE waiting and start_fw handling with iwlwifi.

* Use the notification wait API, like it's done in the Linux iwlwifi code,
  to wait for the IWM_MVM_ALIVE notification.

* This also should fix some firmware load interrupt issues, and errors
  in the nic lock using.

Tested:

* (adrian) Intel 7260, STA mode

Obtained from: dragonflybsd.git a7697ea01c11fd493aec52260a02f31df680eb91
02:18:04 - r314065
(3 days 2 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
/head/sys/dev/iwm/if_iwmvar.h
[iwm] Synchronize firmware loading code with Linux iwlwifi.

* While there, rename some functions to match the names and functionality
  of the similarly named functions in Linux iwlwifi.

Obtained from: dragonflybsd.git e98ee77a816bfd8b4912047b93dfb2c560788f24
01:07:04 - r314064
(3 days 3 hours ago)
by ian
Affects:  /head/sys/arm/ti/ti_sdhci.c
Remove a variable that has been unused since r311735 (it should have been
removed as part of those changes).
00:50:36 - r314063
(3 days 3 hours ago)
by markj
Affects: 
(2 files)
/stable/11/sys/kern/subr_witness.c
MFC r313261:
Make witness_warn() always print to the console.
2017 - 02 - 21   (4 days ago)
23:32:27 - r314062
(3 days 4 hours ago)
by davidcs
Affects:  /head/sys/dev/qlxgbe/ql_os.c
add bus_dmamap_unload in ql_free_dmabuf()

MFC after:5 days
21:48:45 - r314061
(3 days 6 hours ago)
by dim
Affects:  /head/lib/libcxxrt/Version.map
Add __int128-related symbols to libcxxrt's version map. Put these into
the same CXXABI verions as recent libstdc++.

Note that __int128 types are only available on arches where long long is
128 bit wide.

Noticed by: harti
MFC after: 2 weeks
21:21:58 - r314060
(3 days 7 hours ago)
by ian
Affects:  /head/sys/dev/sdhci/sdhci_fdt_gpio.c
Fix typos in bootverbose printfs... display the write-protect pin info,
not the card-detect pin info.
21:11:58 - r314059
(3 days 7 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
zfs: move zio_taskq_basedc under SYSDC

That knob is useless without SDC (or alike) scheduling class support.
That is, it's unused on FreeBSD.

MFC after: 4 days
21:09:21 - r314058
(3 days 7 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
zfs: lower priority of zio_write_issue threads by four

The difference of one was insignificant because zio_write_issue threads
ended up on the same run queues as other zio threads.
See sys/priority.h and sys/runq.h for more details.

Add a comment describing FreeBSD priority considerations and restore
the illumos variant of the code for comparison.

Obtained from: Panzura
MFC after: 2 weeks
Sponsored by: Panzura
21:06:12 - r314057
(3 days 7 hours ago)
by markj
Affects:  /head/sys/amd64/amd64/pmap.c
ddb show pte: use pmap of kdb_thread

show pte from the pmap of the process of the current DDB thread, instead
of necessarily the PCPU pmap.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: kib
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9645
21:01:01 - r314056
(3 days 7 hours ago)
by asomers
Affects:  /head/share/doc/pjdfstest/README
/head/tests/sys/pjdfstest/tests/conf
Improve pjdfstest run instructions

In the Kyua era, it's no longer necessary to set PJDFSTEST_TEST_PATH. Just
use TMPDIR instead.

Reviewed by: ngie
MFC after: 3 weeks
Relnotes: yes
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9340
19:51:41 - r314055
(3 days 8 hours ago)
by vangyzen
Affects:  /head/lib/libc/sys/kenv.2
Make several improvements and corrections in the kenv(2) man page

MFC after: 3 days
Sponsored by: Dell EMC
18:59:17 - r314054
(3 days 9 hours ago)
by emaste
Affects: 
(8 files)
/head/sys/conf/*
/head/sys/modules/*
Exclude -flto when building *genassym.o

The build process generates *assym.h using nm from *genassym.o (which is
in turn created from *genassym.c).

When compiling with link-time optimization (LTO) using -flto, .o files
are LLVM bitcode, not ELF objects. This is not usable by genassym.sh,
so remove -flto from those ${CC} invocations.

Submitted by: George Rimar
Reviewed by: dim
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9659
18:56:06 - r314053
(3 days 9 hours ago)
by imp
Affects:  /head/sys/kern/vfs_default.c
Make the code match the comments: If we have ANY buf's that failed
then return EAGAIN. The current code just returns that if the LAST buf
failed.

Reviewed by: kib@, trasz@
Differential Revision: https://reviews.freebsd.org/D9677
18:49:51 - r314052
(3 days 9 hours ago)
by imp
Affects:  /head/sys/sys/bufobj.h
Document what the different flags mean for locking.
18:49:30 - r314051
(3 days 9 hours ago)
by imp
Affects:  /head/Makefile.inc1
Document why cat is a bootstrap tool.
18:04:21 - r314050
(3 days 10 hours ago)
by hselasky
Affects: 
(8 files)
/head/sys/compat/linuxkpi/common/*
/head/sys/conf/files
/head/sys/modules/linuxkpi/Makefile
Replace dummy implementation of RCU in the LinuxKPI with one based on
the in-kernel concurrency kit's ck_epoch API. Factor RCU hlist_xxx()
functions into own rculist.h header file.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
17:54:38 - r314049
(3 days 10 hours ago)
by avg
Affects:  /head/UPDATING
add UPDATING entry for r314048, re-work of .zfs code
17:47:08 - r314048
(3 days 10 hours ago)
by avg
Affects: 
(6 files)
/head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
reimplement zfsctl (.zfs) support

The current code is written on top of GFS, a library with the generic
support for writing filesystems, which was ported from illumos.
Because of significant differences between illumos VFS and FreeBSD
VFS models, both the GFS and zfsctl code were heavily modified to
work on FreeBSD. Nonetheless, they still contain quite a few ugly
hacks and bugs.

This is a reimplementation of the zfsctl code where the VFS-specific
bits are written from scratch and only the code that interacts with
the rest of ZFS is reused.

Some highlights.

We use two types of nodes, static and on-demand. The static nodes
are used for permanent directories like .zfs, .zfs/snapshot, etc. The
on-demand nodes are used for ephemeral directories that act as snapshot
mount points.
Initially only static nodes are created. Their vnodes are instantiated
when they are looked up. The on-demand nodes and vnodes are instantiated
as needed and the nodes are destroyed as soon as the corresponding
vnodes are reclaimed.
We also try very hard to ensure that uncovered snapshot vnodes do not
linger. They are supposed to become inactive as soon as they are
uncovered and we try to recycle them immediately.
When a filesystem is unmounted all snapshots under .zfs are unmounted
first, then all vnodes are flushed and finally the static .zfs nodes
are destroyed.

There are some changes outside of zfsctl code too.
z_ctldir is never used directly (as it is an opaque pointer),
zfsctl_root() has to be used instead. The function returns a locked
vnode now, so it accepts a lock flags parameter. The function can
also fail now, e.g. during force unmounting, whereas previously it
was infallible.
zfsctl_root_lookup() is retired, instead of it VOP_LOOKUP() on the .zfs
vnode (obtained with zfsctl_root) is used.

Some ideas are picked from an independent work by will.

Reviewed by: asomers, smh
MFC after: 1 month
Relnotes: maybe
Differential Revision: https://reviews.freebsd.org/D7421
17:34:27 - r314047
(3 days 10 hours ago)
by brooks
Affects: 
(6 files)
/head/sys/mips/conf/*
Rename BERI_TEMPLATE to std.BERI to be more like other configs.

Sponsored by: DARPA, AFRL
15:57:01 - r314046
(3 days 12 hours ago)
by trasz
Affects:  /head/sys/compat/linux/linux_stats.c
Get rid of foo_sys() in linuxulator code. It was commented out, and it
would be useless anyway - there is no point in pretending to have block
devices; our "block" devices are in fact character ones, and can only
be accessed as such.

Discussed with: dchagin
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
14:31:58 - r314045
(3 days 13 hours ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
Remove duplicate INOT allocation.

For some reason isp_handle_platform_notify_fc() allocated INOT just
before calling isp_handle_platform_target_tmf(), which also allocates
INOT. It seems to be a braino introduced in r196008.

MFC after: 2 weeks
14:22:14 - r314044
(3 days 14 hours ago)
by hselasky
Affects:  /head/sys/compat/linuxkpi/common/include/linux/spinlock.h
Streamline the LinuxKPI spinlock wrappers.

1) Add better spinlock debug names when WITNESS_ALL is defined.

2) Make sure that the calling thread gets bound to the current CPU
while a spinlock is locked. Some Linux kernel code depends on that the
CPU ID doesn't change while a spinlock is locked.

3) Add support for using LinuxKPI spinlocks during a panic().

MFC after: 1 week
Sponsored by: Mellanox Technologies
13:23:53 - r314043
(3 days 15 hours ago)
by hselasky
Affects: 
(5 files)
/head/sys/compat/linuxkpi/common/*
/head/sys/conf/files
/head/sys/modules/linuxkpi/Makefile
Add support for LinuxKPI tasklets.

Tasklets are implemented using a taskqueue and a small statemachine on
top. The additional statemachine is required to ensure all LinuxKPI
tasklets get serialized. FreeBSD taskqueues do not guarantee
serialisation of its tasks, except when there is only one worker
thread configured.

MFC after: 1 week
Sponsored by: Mellanox Technologies
12:51:45 - r314042
(3 days 15 hours ago)
by garga
Affects: 
(3 files)
/stable/11/sbin/fsck_ffs/fsck_ffs.8
/stable/11/sbin/fsck_ffs/main.c
MFC r313745:

* Add missing parameters to usage()
* Add missing parameters to manpage synopsis
* Add missing description of -d flag
* Sort flags descriptions

Reviewed by: allanjude, kib
Approved by: allanjude
MFC after: 1 week
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D9152
12:45:56 - r314041
(3 days 15 hours ago)
by garga
Affects: 
(2 files)
/stable/11/usr.sbin/ndp/ndp.c
MFC r313737:

Fix style(9)

Reviewed by: allanjude, vangyzen
Approved by: allanjude
MFC after: 1 week
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D9510
12:43:02 - r314040
(3 days 15 hours ago)
by hselasky
Affects: 
(22 files)
/head/sys/*
Make the LinuxKPI task struct persistent accross system calls.

A set of helper functions have been added to manage the life of the
LinuxKPI task struct. When an external system call or task is invoked,
a check is made to create the task struct by demand. A thread
destructor callback is registered to free the task struct when a
thread exits to avoid memory leaks.

This change lays the ground for emulating the Linux kernel more
closely which is a dependency by the code using the LinuxKPI APIs.

Add new dedicated td_lkpi_task field has been added to struct thread
instead of abusing td_retval[1].

Fix some header file inclusions to make LINT kernel build properly
after this change.

Bump the __FreeBSD_version to force a rebuild of all kernel modules.

MFC after: 1 week
Sponsored by: Mellanox Technologies
12:37:59 - r314039
(3 days 15 hours ago)
by garga
Affects:  /head/usr.bin/sockstat/sockstat.c
Fix style(9)

Reviewed by: ngie, tuexen, vangyzen, allanjude
Approved by: allanjude
MFC after: 1 week
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D9588
12:29:07 - r314038
(3 days 15 hours ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
/head/sys/dev/isp/isp_freebsd.h
Remove ancient __FreeBSD_version checks.

MFC after: 2 weeks
12:24:31 - r314037
(3 days 16 hours ago)
by avg
Affects:  /head/sys/dev/jedec_ts/jedec_ts.c
jedec_ts: fix slave address check

The mask should cover all bits that can not vary.

MFC after: 3 days
09:37:33 - r314036
(3 days 18 hours ago)
by robak
Affects:  /head/usr.sbin/bsdinstall/scripts/hardening
Enable bsdinstall hardening options by default.

As discussed previously, in order to introduce new OS hardening
defaults, we've added them to bsdinstall in 'off by default' mode.
It has been there for a while, so the next step is to change them
to 'on by defaul' mode, so that in future we could simply enable
them in base OS.

Reviewed by: brd
Approved by: adrian
Differential Revision: https://reviews.freebsd.org/D9641
09:33:21 - r314035
(3 days 18 hours ago)
by avg
Affects:  /head/sys/x86/x86/mca.c
mca: change type of last_intr to time_t for consinstency

time_uptime is time_t

MFC after: 1 day
X-MFC with: r313752
09:29:46 - r314034
(3 days 18 hours ago)
by avg
Affects: 
(4 files)
/stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c
/stable/10/sys/rpc/svc.c
/stable/10/sys/rpc/svc.h
MFC r313735: add svcpool_close to handle killed nfsd threads

PR: 204340
Reported by: Panzura
Reviewed by: rmacklem
Approved by: rmacklem
09:29:11 - r314033
(3 days 18 hours ago)
by avg
Affects: 
(4 files)
/stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c
/stable/11/sys/rpc/svc.c
/stable/11/sys/rpc/svc.h
MFC r313735: add svcpool_close to handle killed nfsd threads

PR: 204340
Reported by: Panzura
Approved by: rmacklem
Obtained from: rmacklem
09:13:38 - r314032
(3 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r313687: remove l2_padding_needed statistic from zfs arc
09:13:34 - r314031
(3 days 19 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r313687: remove l2_padding_needed statistic from zfs arc
08:57:28 - r314030
(3 days 19 hours ago)
by avg
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
MFC r313686: check remaining space in zfs implementations of vptocnp

PR: 216939
08:57:27 - r314029
(3 days 19 hours ago)
by avg
Affects: 
(3 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
MFC r313686: check remaining space in zfs implementations of vptocnp

PR: 216939
07:02:51 - r314028
(3 days 21 hours ago)
by ngie
Affects: 
(9 files)
/stable/10/lib/libnetbsd/*
Revert r314020

The test build I ran unfortunately didn't catch the fact that the sha384.h
compat header is missing on ^/stable/10 due to some code not being MFCed
06:10:11 - r314027
(3 days 22 hours ago)
by mav
Affects:  /head/sys/cam/ctl/scsi_ctl.c
Do not blindly free completed ATIOs/INOTs on invalidation.

When LUN is disabled, SIM starts returning queued ATIOs/INOTs. But at the
same time there can be some ATIOs/INOTs still carrying real new requests.
If we free those, SIM may leak some resources, forever expecting for any
response from us. So try to be careful, separating ATIOs/INOTs carrying
requests which still must be processed, from ATIOs/INOTs completed with
errors which can be freed.

MFC after: 2 weeks
05:13:16 - r314026
(3 days 23 hours ago)
by mav
Affects: 
(2 files)
/stable/10/sys/cam/ctl/ctl_backend_ramdisk.c
MFC r313736: Fix panic on shutdown of ramdisk LU with zero capacity.
05:12:42 - r314025
(3 days 23 hours ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cam/ctl/ctl_backend_ramdisk.c
MFC r313736: Fix panic on shutdown of ramdisk LU with zero capacity.
05:08:07 - r314024
(3 days 23 hours ago)
by jhibbits
Affects:  /head/sys/powerpc/booke/pmap.c
Correct the return value for pmap_change_attr()

pmap_change_attr() returns an error code, not a paddr. This function is
currently unused for powerpc.

MFC after: 2 weeks
03:50:57 - r314023
(4 days ago)
by ngie
Affects: 
(2 files)
/stable/10/lib/msun/tests/fmaxmin_test.c
MFC r312213,r313713:

r312213:

Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check
of the clang version

This works around breakage on ^/stable/10 when running installworld from
a ^/stable/10 host where the test wouldn't be compiled on the first
go-around and would be missing when make installworld is run.

PR: 208703

r313713:

Handle clang 4.x+ with the compile-time exception added in r312213

It also fails the assertions noted in bug 208703

PR: 208703
PR: 217084
03:49:52 - r314022
(4 days ago)
by ngie
Affects: 
(2 files)
/stable/11/lib/msun/tests/fmaxmin_test.c
MFC r313713:

Handle clang 4.x+ with the compile-time exception added in r312213

It also fails the assertions noted in bug 208703

PR: 208703
PR: 217084
03:46:43 - r314021
(4 days ago)
by ngie
Affects: 
(9 files)
/stable/11/lib/libnetbsd/*
MFC r313404:

Improve libnetbsd compatibility with NetBSD

This change is being made to diff reduce/reduce duplication in
contrib/netbsd-tests and to facilitate further porting of software from
NetBSD

Add the following headers:
- sys/event.h:
-- sys/types.h is required for kqueue on FreeBSD, but not NetBSD.
- sys/types.h:
-- NBBY is defined in sys/param.h on FreeBSD, not sys/types.h like on NetBSD.
  Pull in sys/param.h to have parity with NetBSD.
- sys/wait.h:
-- Define wrusage as __wrusage for parity with NetBSD typedef.
- glob.h
-- Define __gl_stat_t as "struct stat" for parity with NetBSD typedef.
- pthread.h:
-- Pull in pthread_np.h for _np functions defined separately on FreeBSD.

Improve compatibility with NetBSD in the following headers:

- sha1.h:
-- define SHA1_CTX as SHA_CTX
-- define SHA1Final as SHA1_Final
- sha2.h:
-- #include sha384 to pick up all of the SHA 384 bit macros and definitions.
- util.h:
-- Add sys/types.h to util.h to pollute the header for types used in
  flags_to_string and string_to_flags (u_long) as NetBSD doesn't require them
  for the functions.
03:46:37 - r314020
(4 days ago)
by ngie
Affects: 
(9 files)
/stable/10/lib/libnetbsd/*
MFC r313404:

Improve libnetbsd compatibility with NetBSD

This change is being made to diff reduce/reduce duplication in
contrib/netbsd-tests and to facilitate further porting of software from
NetBSD

Add the following headers:
- sys/event.h:
-- sys/types.h is required for kqueue on FreeBSD, but not NetBSD.
- sys/types.h:
-- NBBY is defined in sys/param.h on FreeBSD, not sys/types.h like on NetBSD.
  Pull in sys/param.h to have parity with NetBSD.
- sys/wait.h:
-- Define wrusage as __wrusage for parity with NetBSD typedef.
- glob.h
-- Define __gl_stat_t as "struct stat" for parity with NetBSD typedef.
- pthread.h:
-- Pull in pthread_np.h for _np functions defined separately on FreeBSD.

Improve compatibility with NetBSD in the following headers:

- sha1.h:
-- define SHA1_CTX as SHA_CTX
-- define SHA1Final as SHA1_Final
- sha2.h:
-- #include sha384 to pick up all of the SHA 384 bit macros and definitions.
- util.h:
-- Add sys/types.h to util.h to pollute the header for types used in
  flags_to_string and string_to_flags (u_long) as NetBSD doesn't require them
  for the functions.
03:27:59 - r314019
(4 days 1 hour ago)
by sephe
Affects: 
(5 files)
/stable/10/share/man/man4/alc.4
/stable/10/sys/dev/alc/*
/stable/10/sys/dev/pci/pci.c
MFC 312250

  alc: Add Killer E2500 support

  Reviewed by: jhb, yongari
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9058
03:14:05 - r314018
(4 days 1 hour ago)
by sephe
Affects: 
(6 files)
/stable/10/sys/dev/hyperv/include/hyperv.h
/stable/10/sys/dev/hyperv/utilities/vmbus_timesync.c
/stable/10/sys/dev/hyperv/vmbus/*
MFC 311743

  hyperv: Add method to read 64bit Hyper-V specific time value.

  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9057
03:00:33 - r314017
(4 days 1 hour ago)
by sephe
Affects: 
(2 files)
/stable/10/sys/net/if.c
MFC 311475

  if: Defer the if_up until the ifnet.if_ioctl is called.

  This ensures the interface is initialized by the interface driver
  before it can be used by the rest of the system.

  Reviewed by: jhb, karels, gnn
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8905
02:38:14 - r314016
(4 days 1 hour ago)
by ngie
Affects: 
(2 files)
/stable/10/usr.bin/bsdcat/Makefile
MFC r313652:

Use SRCTOP instead of .CURDIR relative paths with ".."

This simplifies pathing in make/displayed output
02:35:16 - r314015
(4 days 1 hour ago)
by ngie
Affects: 
(2 files)
/stable/11/usr.bin/bsdcat/Makefile
MFC r313652:

Use SRCTOP instead of .CURDIR relative paths with ".."

This simplifies pathing in make/displayed output
02:34:59 - r314014
(4 days 1 hour ago)
by ngie
Affects: 
(2 files)
/stable/10/usr.bin/awk/Makefile
MFC r313654:

Use SRCTOP to refer to awk source in contrib/awk and remove unnecessary AWKSRC
prefix
for maketab.c

The former simplifies pathing in make/displayed output, whereas the latter was
just
unnecessarily superfluous since .PATH referenced the path to maketab.c earlier
on in
the Makefile.
02:33:41 - r314013
(4 days 1 hour ago)
by ngie
Affects: 
(13 files)
/stable/10/usr.bin/svn/*
MFC r313679:

Use SRCTOP/OBJTOP relative paths where possible; use :H manipulation in lieu
of ../ elsewhere

This simplifies pathing in make/displayed output
02:33:28 - r314012
(4 days 1 hour ago)
by ngie
Affects: 
(2 files)
/stable/11/usr.bin/awk/Makefile
MFC r313654:

Use SRCTOP to refer to awk source in contrib/awk and remove unnecessary AWKSRC
prefix
for maketab.c

The former simplifies pathing in make/displayed output, whereas the latter was
just
unnecessarily superfluous since .PATH referenced the path to maketab.c earlier
on in
the Makefile.
02:30:26 - r314011
(4 days 1 hour ago)
by ngie
Affects: 
(13 files)
/stable/11/usr.bin/svn/*
MFC r313679:

Use SRCTOP/OBJTOP relative paths where possible; use :H manipulation in lieu
of ../ elsewhere

This simplifies pathing in make/displayed output
02:26:57 - r314010
(4 days 2 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/gnu/usr.bin/gdb/Makefile.inc
MFC r313650:

Use SRCTOP/OBJTOP and simplify output using :H instead of "../" for directory
entries

This simplifies pathing in make/displayed output
02:24:45 - r314009
(4 days 2 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/usr.bin/atm/sscop/Makefile
MFC r313653:

Use SRCTOP instead of .CURDIR relative paths with ".."

This simplifies pathing in make/displayed output
02:24:31 - r314008
(4 days 2 hours ago)
by ngie
Affects: 
(2 files)
/stable/10/usr.bin/atm/sscop/Makefile
MFC r313653:

Use SRCTOP instead of .CURDIR relative paths with ".."

This simplifies pathing in make/displayed output
02:23:57 - r314007
(4 days 2 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/usr.bin/bluetooth/Makefile.inc
MFC r313656:

Use SRCTOP to define .include with usr.bin/Makefile.inc
02:23:27 - r314006
(4 days 2 hours ago)
by ngie
Affects: 
(2 files)
/stable/10/usr.bin/bluetooth/Makefile.inc
MFC r313656:

Use SRCTOP to define .include with usr.bin/Makefile.inc
02:19:19 - r314005
(4 days 2 hours ago)
by sephe
Affects: 
(5 files)
/stable/11/share/man/man4/alc.4
/stable/11/sys/dev/alc/*
/stable/11/sys/dev/pci/pci.c
MFC 312250

  alc: Add Killer E2500 support

  Reviewed by: jhb, yongari
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9058
02:18:45 - r314004
(4 days 2 hours ago)
by ngie
Affects: 
(3 files)
/stable/10/contrib/netbsd-tests/usr.bin/sed/t_sed.sh
/stable/10/usr.bin/sed/tests/Makefile
MFC r312520:

Integrate contrib/netbsd-tests/usr.bin/sed/t_sed.sh into the FreeBSD test
suite as usr.bin/sed/sed_test

Don't expect :emptybackref to fail -- it succeeds on FreeBSD

Expect :preserve_leading_ws_ia to fail -- it fails on ^/stable/10, but not on
^/stable/11 or ^/head
02:15:58 - r314003
(4 days 2 hours ago)
by sephe
Affects: 
(6 files)
/stable/11/sys/dev/hyperv/include/hyperv.h
/stable/11/sys/dev/hyperv/utilities/vmbus_timesync.c
/stable/11/sys/dev/hyperv/vmbus/*
MFC 311743

  hyperv: Add method to read 64bit Hyper-V specific time value.

  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D9057
02:10:02 - r314002
(4 days 2 hours ago)
by sephe
Affects: 
(2 files)
/stable/11/sys/net/if.c
MFC 311475

  if: Defer the if_up until the ifnet.if_ioctl is called.

  This ensures the interface is initialized by the interface driver
  before it can be used by the rest of the system.

  Reviewed by: jhb, karels, gnn
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D8905
01:11:18 - r314001
(4 days 3 hours ago)
by bdrewery
Affects:  /head/usr.bin/timeout/timeout.1
Make it more clear that -k sends SIGKILL, not the -s signal.

MFC after: 1 week
2017 - 02 - 20   (5 days ago)
23:48:50 - r314000
(4 days 4 hours ago)
by oshogbo
Affects:  /head/contrib/traceroute/traceroute.c
/head/usr.sbin/traceroute/Makefile
Capsicumize traceroute.

PR: 193973
Submitted by: Mikhail <mp39590@gmail.com>
Reviewed by: pjd, bapt, emaste, AllanJude
Differential Revision: https://reviews.freebsd.org/D9303
20:37:25 - r313999
(4 days 7 hours ago)
by jhb
Affects:  /head/sys/kern/makesyscalls.sh
Consolidate statements to initialize files.

Previously, the first lines of various generated files from system call
tables were generated in two sections. Some of the initialization was
done in BEGIN, and the rest was done when the first line was encountered.
The main reason for this split before r313564 was that most of the
initialization done in the second section depended on the $FreeBSD$ tag
extracted from the system call table. Now that the $FreeBSD$ tag is no
longer used, consolidate all of the file initialization in the BEGIN
section.

This change was tested by confirming that the content of generated files
did not change.
20:16:11 - r313998
(4 days 8 hours ago)
by ken
Affects: 
(2 files)
/stable/10/sys/cam/ctl/ctl.c
MFC 313895:

  ------------------------------------------------------------------------
  r313895 | ken | 2017-02-17 13:15:27 -0700 (Fri, 17 Feb 2017) | 9 lines

  Make ctl(4) build with CTL_IO_DELAY defined.

  sys/cam/ctl/ctl.c:
  In ctl_datamove(), inside CTL_IO_DELAY, add a lun variable and fill
  it in before trying to dereference it.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
20:12:02 - r313997
(4 days 8 hours ago)
by ken
Affects: 
(2 files)
/stable/11/sys/cam/ctl/ctl.c
MFC 313895:

  ------------------------------------------------------------------------
  r313895 | ken | 2017-02-17 13:15:27 -0700 (Fri, 17 Feb 2017) | 9 lines

  Make ctl(4) build with CTL_IO_DELAY defined.

  sys/cam/ctl/ctl.c:
  In ctl_datamove(), inside CTL_IO_DELAY, add a lun variable and fill
  it in before trying to dereference it.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
19:08:36 - r313996
(4 days 9 hours ago)
by mjg
Affects:  /head/sys/kern/kern_mutex.c
/head/sys/sys/mutex.h
mtx: fix spin mutexes interaction with failed fcmpset

While doing so move recursion support down to the fallback routine.
17:33:25 - r313995
(4 days 10 hours ago)
by trasz
Affects:  /head/sys/compat/linprocfs/linprocfs.c
Add /proc/self/mounts to linprocfs; some linux binaries need it.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
16:18:33 - r313994
(4 days 12 hours ago)
by trasz
Affects:  /head/sys/fs/devfs/devfs_vnops.c
Simplify devfs_fsync() by removing it. This might also be a minor
optimization, as vn_isdisk() needs to lock a global mutex.

Reviewed by: imp
Tested by: pho
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9628
16:13:40 - r313993
(4 days 12 hours ago)
by trasz
Affects:  /head/sys/amd64/linux/linux_machdep.c
Reimplement linux_arch_prctl() as a wrapper around sysarch(2).
This also adds support for LINUX_ARCH_SET_GS.

Reviewed by: dchagin
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9372
15:53:16 - r313992
(4 days 12 hours ago)
by badger
Affects: 
(8 files)
/head/sys/kern/*
/head/sys/sys/signalvar.h
/head/tests/sys/kern/*
Defer ptracestop() signals that cannot be delivered immediately

When a thread is stopped in ptracestop(), the ptrace(2) user may request
a signal be delivered upon resumption of the thread. Heretofore, those signals
were discarded unless ptracestop()'s caller was issignal(). Fix this by
modifying ptracestop() to queue up signals requested by the ptrace user that
will be delivered when possible. Take special care when the signal is SIGKILL
(usually generated from a PT_KILL request); no new stop events should be
triggered after a PT_KILL.

Add a number of tests for the new functionality. Several tests were authored
by jhb.

PR: 212607
Reviewed by: kib
Approved by: kib (mentor)
MFC after: 2 weeks
Sponsored by: Dell EMC
In collaboration with: jhb
Differential Revision: https://reviews.freebsd.org/D9260
10:51:46 - r313991
(4 days 17 hours ago)
by kib
Affects: 
(2 files)
/stable/10/sys/vm/vm_mmap.c
MFC r313693:
Remove MPSAFE and ARGUSED annotations, ANSI-fy syscall handlers.
10:49:04 - r313990
(4 days 17 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/vm/vm_mmap.c
MFC r313693:
Remove MPSAFE and ARGUSED annotations, ANSI-fy syscall handlers.
10:44:24 - r313989
(4 days 17 hours ago)
by kib
Affects: 
(4 files)
/stable/11/sys/arm/include/counter.h
/stable/11/sys/arm64/include/counter.h
/stable/11/sys/kern/subr_sfbuf.c
MFC r313345:
Update arm and arm64 counters MD bits.

MFC r313394 (by manu):
subr_sfbus.c need sys/proc.h for struct thread definition.
08:10:41 - r313988
(4 days 20 hours ago)
by sgalabov
Affects:  /head/sys/dev/etherswitch/mtkswitch/mtkswitch_rt3050.c
etherswitch: Fix RT305x vlan group operation

Fix an issue which prevents proper operation (addition/removal of members)
of RT305x vlan groups.

Tested by: yamori813@yahoo.co.jp

Submitted by: yamori813@yahoo.co.jp (initial version)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D9607
08:04:06 - r313987
(4 days 20 hours ago)
by adrian
Affects:  /head/tools/tools/net80211/wlanstats/main.c
[wlanstats] We actually /do/ support per-STA stats!
04:04:59 - r313986
(5 days ago)
by adrian
Affects:  /head/sys/net80211/ieee80211_hostap.c
[net80211] validate VHT IEs.
04:02:50 - r313985
(5 days ago)
by adrian
Affects:  /head/sys/net80211/ieee80211_output.c
[net80211] teach the probe response routine to add VHT IEs as appropriate.
04:02:29 - r313984
(5 days ago)
by adrian
Affects:  /head/sys/net80211/ieee80211_hostap.c
[net80211] fix up VHT IE comparison typo

Whilst here, add a comment that I need to validate VHT IEs.
03:45:41 - r313983
(5 days ago)
by adrian
Affects:  /head/sys/net80211/ieee80211_hostap.c
[net80211] fix NULL pointer dereference in VHT operation in hostap mode.

The vht IEs are NULL at this point, so we shouldn't upgrade a node to VHT.
I'll fix the upgrade after this!

Tested:

* ath10k, hostap mode
03:43:12 - r313982
(5 days ago)
by pfg
Affects: 
(48 files)
/head/sys/dev/*
sys/dev: Replace zero with NULL for pointers.

Makes things easier to read, plus architectures may set NULL to something
different than zero.

Found with: devel/coccinelle
MFC after: 3 weeks
03:33:59 - r313981
(5 days ago)
by pfg
Affects: 
(43 files)
/stable/11/lib/libedit/*
MFC r312997, r313002:
Re-import libedit 2016-02-27 and update libedit with changes from NetBSD's
2016-03-21.

Obtained from: NetBSD
03:26:19 - r313980
(5 days 1 hour ago)
by pfg
Affects: 
(9 files)
/stable/11/contrib/openresolv/*
/stable/11/sbin/resolvconf/Makefile
MFC r312992:
MFV r312970, 313160:
openresolv: update to version 3.9.0.

It is now possible to drop the _WITH_ARG vars thanks to a change to the
pdns_recursor upstreamed by Guy Yur.
03:12:46 - r313979
(5 days 1 hour ago)
by adrian
Affects:  /head/sbin/ifconfig/ifbridge.c
[ifconfig] fix a memory leak!

Submitted by: Tom Rix <trix@juniper.net>
Differential Revision: https://reviews.freebsd.org/D9675
03:10:56 - r313978
(5 days 1 hour ago)
by adrian
Affects:  /head/sbin/ifconfig/ifieee80211.c
[ifconfig] fix a memory leak.

Submitted by: Tom Rix <trix@juniper.net>
Differential Revision: https://reviews.freebsd.org/D9654
02:08:08 - r313977
(5 days 2 hours ago)
by adrian
Affects: 
(6 files)
/head/sbin/ifconfig/ifieee80211.c
/head/sys/dev/*
/head/sys/net80211/*
[net80211] RX parameter shuffle in net80211 in preparation for 4x4 NICs and
160MHz channels.

* Migrate the rx_params stuff out from ieee80211_freebsd.h where it doesn't
belong -
  this isn't freebsd specific anymore.

* Don't use a hard-coded number of chains in the ioctl header; now we can
shuffle
  MAX_CHAINS around so it can be used in the right spot.

* Extend the signal/noisefloor levels in the mimo stats struct to userland to
include
  the signal and noisefloor levels for each 20MHz slice of a 160MHz channel.

* Bump the number of EVM pilots in preparation for 4x4 and 160MHz channels.

Tested:

* ath(4), STA mode
* iwn(4), STA mode
* local ath10k port, STA mode

TODO:

* 11ax chips will come with 5GHz 8x8 hardware for lots of MU-MIMO - I'll
re-bump it
  at that point.

Note:

* This breaks the driver and ifconfig ABI; please recompile the kernel,
  ifconfig and wpa_supplicant/hostapd.
01:45:12 - r313976
(5 days 2 hours ago)
by ngie
Affects:  /head/ObsoleteFiles.inc
/head/etc/mtree/BSD.tests.dist
Remove lib/libpam tests after they were removed from the source tree in r313975

X-MFC with: r313975
Sponsored by: Dell EMC Isilon
00:56:46 - r313975
(5 days 3 hours ago)
by des
Affects: 
(152 files)
/head/contrib/openpam/*
/head/lib/libpam/libpam/*
Upgrade to OpenPAM Radula.
00:14:31 - r313974
(5 days 4 hours ago)
by bapt
Affects:  /head/lib/libfetch/common.c
/head/lib/libfetch/fetch.c
/head/lib/libfetch/fetch.h
Add a file descriptor in struct url for netrc

When using libfetch in an application that drops privileges when fetching
like pkg(8) then user complain because the application does not read anymore
${HOME}/.netrc. Now a caller can prepare a fd to the said file and manually
assign it to the structure.

It is also a first step to allow to capsicumize libfetch applications

Reviewed by: allanjude, des
Approved by: des
Differential Revision: https://reviews.freebsd.org/D9678
2017 - 02 - 19   (6 days ago)
22:00:11 - r313973
(5 days 6 hours ago)
by ngie
Affects:  /head/tests/sys/geom/eli/pbkdf2/Makefile
A forced commit to note other portion of the Makefile change accidentally
committed in r313972

The code committed in r313962 implicitly relies on python 2.x to generate
testvect.h . There are a handful of issues with this approach:

- python is not an explicit build dependency for FreeBSD
- python 2.x is deprecated and will be removed sometime in the future
  (potentially before 11.x's EOL), and the script does not function with
  python 3.5 (it uses deprecated idioms and incompatible function calls).
- python(1) (by default) lives in /usr/local/bin (${LOCALBASE}/bin) and
  gentestvect.py is a dependency of testvect.h (prior to r313972) which
  means that if the mtime of the generator script was newer than the
  mtime of the test vector, it could cause a spurious build failure in
  build time or at install time.

A better solution using C/C++ should be devised.

Discussed with: allanjude
MFC after: 2 weeks
X-MFC with: r313962, r313972
Sponsored by: Dell EMC Isilon
21:19:44 - r313972
(5 days 7 hours ago)
by ngie
Affects:  /head/tests/sys/geom/eli/pbkdf2/Makefile
Unbreak the build when "make obj" is executed beforehand

Using relative paths imply working directory (in this case .OBJDIR), whereas the
sources live in the .CURDIR-relative path.

MFC after: 2 weeks
X-MFC with: r313962
Pointyhat to: allanjude
Sponsored by: Dell EMC Isilon
21:10:34 - r313971
(5 days 7 hours ago)
by pfg
Affects: 
(2 files)
/stable/10/include/stdlib.h
MFC r313819:
Remove outdated claim.

Despite wishful thinking the removal of these old functions hasn't
happened yet.
21:08:10 - r313970
(5 days 7 hours ago)
by pfg
Affects: 
(2 files)
/stable/11/include/stdlib.h
MFC r313819:
Remove outdated claim.

Despite wishful thinking the removal of these old functions hasn't
happened yet.
21:02:05 - r313969
(5 days 7 hours ago)
by des
Affects:  /vendor/openpam/RADULA
Tag OpenPAM Radula.
21:00:46 - r313968
(5 days 7 hours ago)
by des
Affects: 
(157 files)
/vendor/openpam/dist/*
Vendor import of OpenPAM Radula.
20:51:04 - r313967
(5 days 7 hours ago)
by kib
Affects:  /head/sys/fs/devfs/devfs_vnops.c
/head/sys/kern/vfs_vnops.c
Apply noexec mount option for mmap(PROT_EXEC).

Right now the noexec mount option disallows image activators to try
execve the files on the mount point. Also, after r127187, noexec
also limits max_prot map entries permissions for mappings of files
from such mounts, but not the actual mapping permissions.

As result, the API behaviour is inconsistent. The files from noexec
mount can be mapped with PROT_EXEC, but if mprotect(2) drops execution
permission, it cannot be re-enabled later. Make this consistent
logically and aligned with behaviour of other systems, by disallowing
PROT_EXEC for mmap(2).

Note that this change only ensures aligned results from mmap(2) and
mprotect(2), it does not prevent actual code execution from files
coming from noexec mount. Such files can always be read into
anonymous executable memory and executed from there.

Reported by: shamaz.mazum@gmail.com
PR: 217062
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
20:40:07 - r313966
(5 days 7 hours ago)
by kib
Affects:  /head/sys/arm/arm/pmap-v6.c
MFamd64 r313933: microoptimize pmap_protect_pte1().

Noted by: alc
Tested by: mmel
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
20:35:39 - r313965
(5 days 7 hours ago)
by lidl
Affects:  /head/crypto/openssh/auth.c
Only notify blacklistd for successful logins in auth.c

Reported by: Rick Adams
Reviewed by: des
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
19:56:12 - r313964
(5 days 8 hours ago)
by jhibbits
Affects:  /head/sys/conf/files.powerpc
/head/sys/powerpc/mikrotik/rb_led.c
Add a driver for the RouterBoard RB800 User LED

This may work on other RouterBoard PPC platforms, but I don't have any to test
with.
19:46:47 - r313963
(5 days 8 hours ago)
by mav
Affects:  /head/share/man/man4/ctl.4
Document r313854 (kern.cam.ctl.iscsi.maxtags).

MFC after: 12 days
19:30:31 - r313962
(5 days 8 hours ago)
by allanjude
Affects: 
(13 files)
/head/etc/mtree/BSD.tests.dist
/head/sys/*
/head/tests/sys/geom/*
improve PBKDF2 performance

The PBKDF2 in sys/geom/eli/pkcs5v2.c is around half the speed it could be

GELI's PBKDF2 uses a simple benchmark to determine a number of iterations
that will takes approximately 2 seconds. The security provided is actually
half what is expected, because an attacker could use the optimized
algorithm to brute force the key in half the expected time.

With this change, all newly generated GELI keys will be approximately 2x
as strong. Previously generated keys will talk half as long to calculate,
resulting in faster mounting of encrypted volumes. Users may choose to
rekey, to generate a new key with the larger default number of iterations
using the geli(8) setkey command.

Security of existing data is not compromised, as ~1 second per brute force
attempt is still a very high threshold.

PR: 202365
Original Research: https://jbp.io/2015/08/11/pbkdf2-performance-matters/
Submitted by: Joe Pixton <jpixton@gmail.com> (Original Version), jmg (Later
Version)
Reviewed by: ed, pjd, delphij
Approved by: secteam, pjd (maintainer)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8236
18:16:47 - r313961
(5 days 10 hours ago)
by bapt
Affects:  /head/share/misc/pci_vendors
Update pci_vendors to 2017.02.15

MFC after: 3 days
18:00:57 - r313960
(5 days 10 hours ago)
by alc
Affects:  /head/sys/amd64/amd64/pmap.c
In pmap_enter(), set the PG_MANAGED flag on the new PTE in one place,
rather two places, and do so before the pmap lock is acquired.

Submitted by: Yufeng Zhou <yz70@rice.edu>
Reviewed by: kib
MFC after: 1 week
17:47:43 - r313959
(5 days 10 hours ago)
by trasz
Affects: 
(11 files)
/head/share/man/man4/*
/head/sys/*
Add USB Mass Storage CTL frontend. This makes it possible
for USB OTG-capable hardware to implement device side of USB
Mass Storage, ie pretend it's a flash drive. It's configured
in the same way as other CTL frontends, using ctladm(8)
or ctld(8). Differently from usfs(4), all the configuration
can be done without rebuilding the kernel.

Testing and review is welcome. Right now I'm still moving,
and I don't have access to my test environment, so I'm somewhat
reluctant to making larger changes to this code; on the other
hand I don't want to let it sit on Phab until my testing setup
is back, because I want to get it into 11.1-RELEASE.

Reviewed by: emaste (cursory), wblock (man page)
MFC after: 2 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8787
17:46:37 - r313958
(5 days 10 hours ago)
by bapt
Affects: 
(57 files)
/head/contrib/mdocml/*
Import mandoc 1.4.1rc2
17:42:05 - r313957
(5 days 10 hours ago)
by bapt
Affects: 
(57 files)
/vendor/mdocml/1.4.1rc2/*
Tag import of mandoc 1.4.1rc2
17:41:20 - r313956
(5 days 10 hours ago)
by bapt
Affects: 
(56 files)
/vendor/mdocml/dist/*
Import mandoc 1.4.1rc2
17:40:24 - r313955
(5 days 10 hours ago)
by emaste
Affects:  /head/usr.bin/grep/grep.1
bsdgrep: document ignored option -u

MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if
running on an UNIX system." The option has no effect on systems that
do not use CRLF line endings.

PR: 171200
Submitted by: deeptech71@gmail.com, Anders Jensen-Waud
MFC after: 1 month
17:38:17 - r313954
(5 days 10 hours ago)
by imp
Affects:  /head/sys/dev/nvme/nvme_sim.c
Remove obsolete comment after prior rev.
17:37:16 - r313953
(5 days 10 hours ago)
by bapt
Affects: 
(10 files)
/head/contrib/libucl/*
Import libucl 20170219

MFC after: 3 days
17:35:14 - r313952
(5 days 10 hours ago)
by bapt
Affects: 
(2 files)
/stable/11/usr.bin/timeout/timeout.1
MFC r313867, r313869-r313870

r313867:
Add history and Authors section in the manpage

Submitted by: dteske
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D9419

r313869:
Also add vsevolod@ in the authors

r313870:
Use full name for the month

Reported by: brueffer
17:32:21 - r313951
(5 days 10 hours ago)
by bapt
Affects: 
(10 files)
/vendor/libucl/20170219/*
Tag import of libucl 20170219
17:31:53 - r313950
(5 days 10 hours ago)
by bapt
Affects: 
(9 files)
/vendor/libucl/dist/*
Import libucl snapshot 20170219
17:27:58 - r313949
(5 days 11 hours ago)
by mav
Affects: 
(14 files)
/head/sys/cam/scsi/scsi_low.c
/head/sys/dev/*
Remove dead mentions of CAM target mode APIs from drivers.

This makes grepping kernel for target mode implementation much easier.
17:23:27 - r313948
(5 days 11 hours ago)
by emaste
Affects:  /head/usr.bin/grep/file.c
bsdgrep: fix EOF handling with --mmap

Rework part of the loop in grep_fgetln to return the rest of the line
and ensure that we still advance the buffer by the length of the rest
of the line.

PR: 165471
Submitted by: Kyle Evans <kevans91@ksu.edu>
MFC after: 1 month
17:17:06 - r313947
(5 days 11 hours ago)
by trasz
Affects:  /head/sys/compat/linux/linux_mmap.c
There are some Linux binaries that expect the system to obey the "addr"
parameter to mmap(2), even if MAP_FIXED is not explicitly specified.
Android ART is one example. Implement bug compatibility for this case
in linuxulator.

Reviewed by: dchagin@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9373
16:59:00 - r313946
(5 days 11 hours ago)
by trasz
Affects:  /head/sbin/savecore/savecore.c
Make savecore(8) output nicer by specifying the maximum field width
instead of minimum one (precision instead of width).

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
16:40:03 - r313945
(5 days 11 hours ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
Remove broken remnants of obsolete INOT API.

MFC after: 2 weeks
16:28:46 - r313944
(5 days 12 hours ago)
by mjg
Affects:  /head/sys/kern/kern_mutex.c
/head/sys/kern/kern_rwlock.c
/head/sys/kern/kern_sx.c
locks: make trylock routines check for 'unowned' value

Since fcmpset can fail without lock contention e.g. on arm, it was possible
to get spurious failures when the caller was expecting the primitive to succeed.

Reported by: mmel
16:08:58 - r313943
(5 days 12 hours ago)
by trasz
Affects:  /head/sbin/mdconfig/mdconfig.c
Make mdconfig(8) not segfault when the kernel returns garbage data.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
14:53:59 - r313942
(5 days 13 hours ago)
by dim
Affects:  /projects/clang400-import/lib/libc++/Makefile
Belatedly add variant.cpp to libc++. This completes the support for the
upcoming C++17 std::variant template.
13:15:33 - r313941
(5 days 15 hours ago)
by hselasky
Affects:  /head/sys/kern/kern_proc.c
Make sure the thread constructor and destructor eventhandlers are
called for all threads belonging to a procedure. Currently the first
thread in a procedure is kept around as an optimisation step and is
never freed. Because the first thread in a procedure is never freed
nor allocated, its destructor and constructor callbacks are never
called which means per thread structures allocated by dtrace and the
Linux emulation layers for example, might be present for threads which
don't need these structures.

This patch adds a thread construction and destruction call for the
first thread in a procedure.

Tested: dtrace, linux emulation
Reviewed by: kib @
MFC after: 1 week
Sponsored by: Mellanox Technologies
07:38:11 - r313940
(5 days 20 hours ago)
by dchagin
Affects: 
(4 files)
/head/sys/amd64/*
/head/sys/compat/linux/linux_signal.c
/head/sys/i386/linux/linux_dummy.c
Implement rt_tgsigqueueinfo system call used by glibc for pthread_sigqueue(3).

MFC after: 2 week
06:14:33 - r313939
(5 days 22 hours ago)
by kib
Affects:  /head/sys/i386/i386/pmap.c
MFamd64 r313933: microoptimize pmap_protect_pde().

Noted by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
06:02:41 - r313938
(5 days 22 hours ago)
by allanjude
Affects:  /head/usr.bin/lam/lam.c
Capsicum-ize lam(1)

lam(1) is used in portsnap(8), so lock it down

Reviewed by: emaste, cem, jonathan
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D8076
05:29:06 - r313937
(5 days 22 hours ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
Missed addition to r313936.

CTIO waitq present only in ISP_TARGET_MODE.

MFC after: 2 weeks
05:07:02 - r313936
(5 days 23 hours ago)
by mav
Affects:  /head/sys/dev/isp/isp_freebsd.c
/head/sys/dev/isp/isp_freebsd.h
Move CTIO waitq from per-LUN to per-channel.

All resources lack of which may put CTIO into the queue are either
per-channel or potentially per-queue, but none of them are per-LUN.

This is a first step to fix live LUN disabling. Before this change
any CTIOs held in a queue in time of disabling were just leaked.

MFC after: 2 weeks
05:06:29 - r313935
(5 days 23 hours ago)
by sbruno
Affects:  /head/sys/dev/e1000/if_em.c
Restore PBA setup for igb(4) class devices.

Do no write to PBA register on igb(4) devices unless we need
to make adjustments for the 82575 and jumbo frames.

Remove redundant LPE/~LPE assignments.

Move e1000_lv_jumbo_workaround_ich8lan() invokcation into a block
so that its not executed in the igb case.

Move em(4) class assignments of RCTL values to its own code block.

Adjust a few direct accesses of ifp->mtu to use accessor functions.

PR: 216734
Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
03:57:41 - r313934
(6 days ago)
by kib
Affects:  /head/sys/x86/x86/x86_mem.c
Fix regression in r313898 on i386.

Use large enough type for calculation of mtrr physmask. Typical
cpu_maxphyaddr is 36 or larger.

Reported and tested by: sbruno
Sponsored by: The FreeBSD Foundation
MFC after: 13 days
03:33:20 - r313933
(6 days ago)
by kib
Affects:  /head/sys/amd64/amd64/pmap.c
Microoptimize amd64/pmap.c pmap_protect_pde().

For the loop that dirties vm_pages in case superpage was written to,
check the complete condition before the loop.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
03:17:11 - r313932
(6 days 1 hour ago)
by kib
Affects: 
(2 files)
/stable/10/sys/fs/devfs/devfs_devs.c
MFC r313797:
Minor style fixes.
03:11:14 - r313931
(6 days 1 hour ago)
by kib
Affects: 
(2 files)
/stable/11/sys/fs/devfs/devfs_devs.c
MFC r313797:
Minor style fixes.
02:03:09 - r313930
(6 days 2 hours ago)
by jah
Affects: 
(8 files)
/head/sys/*
Bring back r313037, with fixes for mips:

Implement get_pcpu() for amd64/sparc64/mips/powerpc, and use it to
replace pcpu_find(curcpu) in MI code.

Reviewed by: andreast, kan, lidl
Tested by: lidl(mips, sparc64), andreast(powerpc)
Differential Revision: https://reviews.freebsd.org/D9587

 


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

Page generated in 23 ms, 318 revisions printed. Current time is 2017-02-25 04:28:57. All times are in UTC/GMT.