]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFV r314910: 7843 get_clones_stat() is suboptimal for lots of clones
Andriy Gapon [Wed, 8 Mar 2017 13:48:26 +0000 (13:48 +0000)]
MFV r314910: 7843 get_clones_stat() is suboptimal for lots of clones

illumos/illumos-gate@c5bde7273ef861a8dc54cfb9abe48d56062177da
https://github.com/illumos/illumos-gate/commit/c5bde7273ef861a8dc54cfb9abe48d56062177da

https://www.illumos.org/issues/7843
  get_clones_stat() could be very slow if a snapshot has many (thousands) clones.
  Clone names are added to an nvlist that's created with NV_UNIQUE_NAME.
  So, each time a new name is appended to the list, the whole list is searched
  linearly to see if that name is not already in the list. That results in the
  quadratic complexity.
  That should be easy to fix as we know in advance that we should not get any
  duplicate names, so we can drop NV_UNIQUE_NAME when creating the list.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <avg@FreeBSD.org>

MFC after: 1 week
Sponsored by: ClusterHQ

7 years ago7843 get_clones_stat() is suboptimal for lots of clones
Andriy Gapon [Wed, 8 Mar 2017 13:39:22 +0000 (13:39 +0000)]
7843 get_clones_stat() is suboptimal for lots of clones

illumos/illumos-gate@c5bde7273ef861a8dc54cfb9abe48d56062177da
https://github.com/illumos/illumos-gate/commit/c5bde7273ef861a8dc54cfb9abe48d56062177da

https://www.illumos.org/issues/7843
  get_clones_stat() could be very slow if a snapshot has many (thousands) clones.
  Clone names are added to an nvlist that's created with NV_UNIQUE_NAME.
  So, each time a new name is appended to the list, the whole list is searched
  linearly to see if that name is not already in the list. That results in the
  quadratic complexity.
  That should be easy to fix as we know in advance that we should not get any
  duplicate names, so we can drop NV_UNIQUE_NAME when creating the list.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <avg@FreeBSD.org>

7 years agoWhen chunking large DIOCGDELETE, do it on stripe edge.
Alexander Motin [Wed, 8 Mar 2017 12:18:58 +0000 (12:18 +0000)]
When chunking large DIOCGDELETE, do it on stripe edge.

MFC after: 2 weeks

7 years agoUnbreak ARMv6 world.
Michal Meloun [Wed, 8 Mar 2017 11:40:27 +0000 (11:40 +0000)]
Unbreak ARMv6 world.

The new compiler_rt library imported with clang 4.0.0 have several fatal
issues (non-functional __udivsi3 for example) with ARM specific instrict
functions. As temporary workaround, until upstream solve these problems,
disable all thumb[1][2] related feature.

7 years agoAdd initial support for UNMAP granularity.
Alexander Motin [Wed, 8 Mar 2017 11:24:33 +0000 (11:24 +0000)]
Add initial support for UNMAP granularity.

Report UNMAP granularity as stripesize/-offset if we have no other values
to report there.

Add new quirk DA_Q_STRICT_UNMAP for cases when target is too critical to
misaligned UNMAP request, reporting errors instead of being suboptimal.
Setting this quirk makes da periph to forcefully align all UNMAP requests
to avoid those errors by the cost of some odd ranges not being UNMAP'ed.
This makes UNMAP usable within VMware 6.x VMs, just now 100% efficient.

MFC after: 2 weeks

7 years agoCleanup the LinuxKPI slab implementation.
Hans Petter Selasky [Wed, 8 Mar 2017 11:09:27 +0000 (11:09 +0000)]
Cleanup the LinuxKPI slab implementation.

Put large functions into linux_slab.c instead of declaring them static
inline.

Add support for more memory allocation wrappers like kmalloc_array()
and __vmalloc().

Make sure either the M_WAITOK or the M_NOWAIT flag is set and mask
away unused memory allocation flags before calling FreeBSD's malloc()
routine.

Move kmalloc_node() definition to slab.h where it belongs.

Implement support for the SLAB_DESTROY_BY_RCU feature when creating a
kmem_cache which basically means kmem_cache memory is freed using
call_rcu().

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoImplement eth_zero_addr() in the LinuxKPI.
Hans Petter Selasky [Wed, 8 Mar 2017 09:53:20 +0000 (09:53 +0000)]
Implement eth_zero_addr() in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoRemove reference to GNU info hier(7)
Baptiste Daroussin [Wed, 8 Mar 2017 08:57:35 +0000 (08:57 +0000)]
Remove reference to GNU info hier(7)
we have removed texinfo in FreeBSD 11.0

7 years agotexinfo is gone in r276551 remove the related directories
Baptiste Daroussin [Wed, 8 Mar 2017 08:52:15 +0000 (08:52 +0000)]
texinfo is gone in r276551 remove the related directories

Reported by: jbeich

7 years agoUse LDFLAGS rather than CFLAGS when linking.
Brooks Davis [Wed, 8 Mar 2017 08:25:26 +0000 (08:25 +0000)]
Use LDFLAGS rather than CFLAGS when linking.

Reviewed by: kan
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9882

7 years agoRemove now unneded cast.
Andrey V. Elsukov [Wed, 8 Mar 2017 08:09:41 +0000 (08:09 +0000)]
Remove now unneded cast.

7 years agoMatch JETSON-TK1 FreeBSD specific DTS stub with r314854.
Michal Meloun [Wed, 8 Mar 2017 07:23:15 +0000 (07:23 +0000)]
Match JETSON-TK1 FreeBSD specific DTS stub with r314854.

7 years agoRemove extraneous arguments and options, which don't make sense for
Cy Schubert [Wed, 8 Mar 2017 07:02:39 +0000 (07:02 +0000)]
Remove extraneous arguments and options, which don't make sense for
a file documented in volume 5.

MFC after: 3 days

7 years agoOnly install 900.tcpwrap if MK_INETD != "no" and MK_TCP_WRAPPERS != "no"
Enji Cooper [Wed, 8 Mar 2017 06:12:16 +0000 (06:12 +0000)]
Only install 900.tcpwrap if MK_INETD != "no" and MK_TCP_WRAPPERS != "no"

It relies on output from inetd that is triggered by MK_TCP_WRAPPERS=yes.

We need to check for both knobs being set -- otherwise the script doesn't
have much value.

PR: 217577
Submitted by: Sergey <kpect@protonmail.com> (MK_TCP_WRAPPERS piece)
MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix a couple of typos and reword some sentences in bsd.README.
John Baldwin [Wed, 8 Mar 2017 05:49:58 +0000 (05:49 +0000)]
Fix a couple of typos and reword some sentences in bsd.README.

Reviewed by: bdrewery
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9922

7 years agousr.bin/fortune: convert to OBJTOP/SRCTOP idioms
Enji Cooper [Wed, 8 Mar 2017 05:31:54 +0000 (05:31 +0000)]
usr.bin/fortune: convert to OBJTOP/SRCTOP idioms

- Use OBJTOP/SRCTOP-relative paths when looking for include files and
  strfile.
- Add FORTUNES_OBJ and FORTUNES_SRC to abbreviate usr.bin/fortune
  pathing.

This is being done to simplify make output/idioms.

MFC after: 1 week
Reviewed by: bdrewery
Sponsored by: Dell EMC Isilon
Differential Revision: D9916

7 years agoFix install due to incorrect placement of pwait dir in r314886.
Cy Schubert [Wed, 8 Mar 2017 05:27:04 +0000 (05:27 +0000)]
Fix install due to incorrect placement of pwait dir in r314886.

Reported by: Shawn Webb <shawn.webb@hardenedbsd.org>
MFC after: 2 weeks
X-MFC with: r314886

7 years agoloader.efi: finally fix the off-by-one bug in efi_verify_staging_size()
Dexuan Cui [Wed, 8 Mar 2017 02:50:29 +0000 (02:50 +0000)]
loader.efi: finally fix the off-by-one bug in efi_verify_staging_size()

r314828(loader.efi: fix an off-by-one bug in efi_verify_staging_size())
doesn't really fix the bug and this patch adds the missing part.

It's a shame that I didn't make everything correct at the very beginning...

MFC after: 2 weeks
Sponsored by: Microsoft

7 years agoCopy needed include files from EDK2. This is a minimal set gleened
Warner Losh [Wed, 8 Mar 2017 02:47:59 +0000 (02:47 +0000)]
Copy needed include files from EDK2. This is a minimal set gleened
from the .depend files after the build:
cp -r ../vendor/edk2/MdePkg/Include sys/contrib/edk2
cd lib/libefivar
make
pushd `make -V .OBJDIR`
cat .depend*.o | grep sys/contrib | cut -d' ' -f 3 |
sort -u | sed -e 's=/full/path/sys/contrib/edk2/==' > /tmp/xxx
popd
cd ../../sys/contrib/edk2
rm -rf Include
for i in `cat /tmp/xxx`; do
svn cp svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/$i $i
done
svn cp svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/MdePkg.dec .

The original EDK2 repo is ~265MB, the MdePkg is ~23MB, all
MdePkg/Includes is ~7MB and this minimal set is ~1.3MB.

Sponsored by: Netflix

7 years agoAvoid dereferencing unintialized elements in the error path.
Warner Losh [Tue, 7 Mar 2017 23:06:41 +0000 (23:06 +0000)]
Avoid dereferencing unintialized elements in the error path.

Some drives sometimes have errors for things like setting the number
of queue entries in the submission queue. The error paths taken for
these drives ensure a panic dereferencing uninialized data.

Sponsored by: Netflix

7 years agocwd10 takes the low 32-bits and cwd11 takes the upper 32-bits of the
Warner Losh [Tue, 7 Mar 2017 23:02:59 +0000 (23:02 +0000)]
cwd10 takes the low 32-bits and cwd11 takes the upper 32-bits of the
lba. Rather than do a cast to uint64_t, which clang warns might be
unaligned, do the stores 32-bits at a time.

Sponsored by: Netflix

7 years agoAdd and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges
Marius Strobl [Tue, 7 Mar 2017 22:42:44 +0000 (22:42 +0000)]
Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges
as kernel drivers and their dependency onto mmc(4); this allows for
incrementing the mmc(4) module version but also for entire omission
of these bridge declarations for mmccam(4) in a single place, i. e.
in dev/mmc/bridge.h.

7 years agopwait: Add a -t flag to specify a timeout before exiting, and tests.
Bryan Drewery [Tue, 7 Mar 2017 22:16:55 +0000 (22:16 +0000)]
pwait: Add a -t flag to specify a timeout before exiting, and tests.

The exit status will be 124, as the timeout(1) utility uses.

Reviewed by: jilles
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9697

7 years agoFix booting with >4GB RAM on PowerMac G5 hardware
Justin Hibbits [Tue, 7 Mar 2017 22:11:57 +0000 (22:11 +0000)]
Fix booting with >4GB RAM on PowerMac G5 hardware

===
From Nathan Whitehorn:

Open Firmware runs in virtual mode on the Powermac G5. This runs inside the
kernel page table, which preserves all address translations made by OF before
the kernel starts; as a result, the kernel address space is a strict superset of
OF's.

Where this explodes is if OF uses an unmapped SLB entry. The SLB fault handler
runs in real mode and refers to the PCPU pointer in SPRG0, which blows up the
kernel. Having a value of SPRG0 that works for the kernel is less fatal than
preserving OF's value in this case.

===

The result of this is seemingly random panics from NULL dereferences, or hangs
immediately upon boot.  By not restoring SPRG0 for Open Firmware entry the
kernel PCPU pointer is preserved and SLB faults are successful, resulting in a
stable kernel.

PR: 205458
Reported by: several (over bugzilla, lists, IRC)
Reviewed by: andreast
Tested by: many (various forms)
MFC after: 2 weeks

7 years agoMake multi-namespace nvme drives more robust.
Warner Losh [Tue, 7 Mar 2017 21:47:54 +0000 (21:47 +0000)]
Make multi-namespace nvme drives more robust.

Fix assumptions about name spaces in NVME driver. First, it assumes
cdata.nn is the number of configured devices. However, it is the
number of supported name spaces. Second, it assumes that there will
never be more than 16 name spaces supported, but a certain drive I'm
testing reports 1024. It assumes that name spaces are a tightly packed
namespace, but the standard seems to indicate otherwise. Finally, it
assumes that an error would be generated when quearying an
unconfigured namespace. Instead, it succeeds but the identify data is
all zeros.

Fix these by limiting the number of name spaces we probe to 16. Remove
aborting when we find one in error. When the size of the name space is
zero, ignore it.

This is admittedly a bandaide. The long term fix will be to
participate in the enumeration and name space change protocols
definfed in the NVNe standard.

Sponsored by: Netflix

7 years agoufsread: Use appropriate UFS_MAXNAMLEN constant
Conrad Meyer [Tue, 7 Mar 2017 21:40:01 +0000 (21:40 +0000)]
ufsread: Use appropriate UFS_MAXNAMLEN constant

A follow-up to r313475.

Submitted by: Gaurav Gangalwar <Gaurav.Gangalwar at emc.com>
Sponsored by: Dell EMC Isilon

7 years agoBring in snapshot of the MdePkg from Tianocore's EDK2 project at git
Warner Losh [Tue, 7 Mar 2017 20:53:26 +0000 (20:53 +0000)]
Bring in snapshot of the MdePkg from Tianocore's EDK2 project at git
hash 7babb4372e6a34cbbc54249b25056272a5a9924c From 2017-Mar-03.

EDK2 is Intel's BSD Licensed UEFI implementation. We'll be bringing in
various routines from there rather than reimplementing them from
scratch for libefivar and the EFI boot loader.

The upstream repo has ^M ending on everything (sometimes multiple
times!), so the following script was run prior to import so changes we
have to do don't first include changing every line:

% find . -type f | xargs -n 1 sed -I.BAK -e `printf "s/\r//g"`
% find . -name \*.BAK | xargs rm

Also, only the MdePkg was brought in (it's 17MB, while the entire repo
is 250MB). It's almost completely certain nothing else will be used,
but if it is, it can be brough in along side MdePkg in the future.

Obtained from: https://github.com/tianocore/edk2.git

7 years agoAdd support for constant pointer constructs to READ_ONCE() in the
Hans Petter Selasky [Tue, 7 Mar 2017 20:24:34 +0000 (20:24 +0000)]
Add support for constant pointer constructs to READ_ONCE() in the
LinuxKPI. When the type of the argument is constant the temporary
variable cannot be assigned after the barrier. Instead assign the
temporary variable by initialization.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agolpr(1): small bounds check with reallocarray(3).
Pedro F. Giffuni [Tue, 7 Mar 2017 19:30:22 +0000 (19:30 +0000)]
lpr(1): small bounds check with reallocarray(3).

While here plug a memory leak upon error and postpose a multiplication
until after reallocation has succeded.

Hinted partially by: OpenBSD
Reviewed by: gad
MFC after: 2 weeks

7 years agom_mbuftouio() doesn't modify the mbuf.
Gleb Smirnoff [Tue, 7 Mar 2017 19:00:50 +0000 (19:00 +0000)]
m_mbuftouio() doesn't modify the mbuf.

7 years agoCatch up with Clang 4.0.0.
Jung-uk Kim [Tue, 7 Mar 2017 19:00:27 +0000 (19:00 +0000)]
Catch up with Clang 4.0.0.

7 years agoAdd bsd.man.mk references for MAN under bsd.lib.mk and bsd.prog.mk
Enji Cooper [Tue, 7 Mar 2017 17:53:53 +0000 (17:53 +0000)]
Add bsd.man.mk references for MAN under bsd.lib.mk and bsd.prog.mk

The latter set of manpages directly consume bsd.man.mk, so the bsd.man.mk
behavior should be the source of truth for underlying behavior, whereas
the other manpage fragment descriptions should document how they tweak
the variable behavior, if at all (bsd.prog.mk does tweak the default
value, as noted in its description)

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix LINKS example in bsd.prog.mk
Enji Cooper [Tue, 7 Mar 2017 17:42:23 +0000 (17:42 +0000)]
Fix LINKS example in bsd.prog.mk

LINKS appends DESTDIR -- don't suggest double-append in example.

MFC after: 1 week
Reported by: rgrimes (D9918)
Sponsored by: Dell EMC Isilon

7 years agoAdd mechanism to unload CAM periph drivers.
Alexander Motin [Tue, 7 Mar 2017 17:41:08 +0000 (17:41 +0000)]
Add mechanism to unload CAM periph drivers.

For now it allows to unload CTL kernel module if there are no target-capable
SIMs in CAM.  As next step full teardown of CAM targets can be implemented.

7 years agoAlphabetically sort variables
Enji Cooper [Tue, 7 Mar 2017 17:38:52 +0000 (17:38 +0000)]
Alphabetically sort variables

The only content change is minor rewording around CLEANDIRS/CLEANFILES to
accomodate sorting order.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoLinux semop system call return EINVAL in case when the invalid nsops
Dmitry Chagin [Tue, 7 Mar 2017 17:12:22 +0000 (17:12 +0000)]
Linux semop system call return EINVAL in case when the invalid nsops
or semid values specified.

MFC after: 1 month

7 years agoLinux kernel does not export to the user space ipc_perm.mode values
Dmitry Chagin [Tue, 7 Mar 2017 17:09:12 +0000 (17:09 +0000)]
Linux kernel does not export to the user space ipc_perm.mode values
other than S_IRWXUGO (0777).

MFC after: 1 month

7 years agoReduce code duplication between MD Linux code by moving SYSV IPC 64-bit
Dmitry Chagin [Tue, 7 Mar 2017 17:07:16 +0000 (17:07 +0000)]
Reduce code duplication between MD Linux code by moving SYSV IPC 64-bit
related struct definitions out into the MI path.

Invert the native ipc structs to the Linux ipc structs convesion logic.
Since 64-bit variant of ipc structs has more precision convert native ipc
structs to the 64-bit Linux ipc structs and then truncate 64-bit values
into the non 64-bit if needed. Unlike Linux, return EOVERFLOW if the
values do not fit.

Fix SYSV IPC for 64-bit Linuxulator which never sets IPC_64 bit.

MFC after: 1 month

7 years agoBump __FreeBSD_version for removal of pcap-int.h.
Xin LI [Tue, 7 Mar 2017 16:09:37 +0000 (16:09 +0000)]
Bump __FreeBSD_version for removal of pcap-int.h.

PR: 217221

7 years agofirewire/sbp: try to improve locking, plus a few style nits
Andriy Gapon [Tue, 7 Mar 2017 16:07:52 +0000 (16:07 +0000)]
firewire/sbp: try to improve locking, plus a few style nits

This change tries to fix the most obvious locking problems.

sbp_cam_scan_lun() is never called with the sbp lock held, so the lock
needs to be acquired internally (if it's needed at all).
Without this change a kernel with INVARIANTS panics when a firewire disk
is connected:
  panic: mutex sbp not owned at /usr/src/sys/dev/firewire/sbp.c:967
  KDB: stack backtrace:
  db_trace_self_wrapper() at 0xffffffff80420bbb = db_trace_self_wrapper+0x2b/frame 0xfffffe0504df0930
  kdb_backtrace() at 0xffffffff80670359 = kdb_backtrace+0x39/frame 0xfffffe0504df09e0
  vpanic() at 0xffffffff8063986c = vpanic+0x14c/frame 0xfffffe0504df0a20
  panic() at 0xffffffff806395b3 = panic+0x43/frame 0xfffffe0504df0a80
  __mtx_assert() at 0xffffffff8061c40d = __mtx_assert+0xed/frame 0xfffffe0504df0ac0
  sbp_cam_scan_lun() at 0xffffffff80474667 = sbp_cam_scan_lun+0x37/frame 0xfffffe0504df0af0
  xpt_done_process() at 0xffffffff802aacfa = xpt_done_process+0x2da/frame 0xfffffe0504df0b30
  xpt_done_td() at 0xffffffff802ac2e5 = xpt_done_td+0xd5/frame 0xfffffe0504df0b80
  fork_exit() at 0xffffffff805ff72f = fork_exit+0xdf/frame 0xfffffe0504df0bf0
  fork_trampoline() at 0xffffffff8082483e = fork_trampoline+0xe/frame
  0xfffffe0504df0bf0
  --- trap 0, rip = 0, rsp = 0, rbp = 0 ---

Also, I tried to reduce the scope of the sbp lock to avoid holding it
while doing bus_dma allocations.

The code badly needs some re-engineering.  SBP really should implement
a CAM transport, so that it avoids control flow inversion when re-scanning
the bus.  Also, the sbp lock seems to be too coarse.

Additionally, the commit includes some changes not related to locking.

- sbp_cam_scan_lun: restore CAM_DEV_QFREEZE before re-queueing the ccb
  because xpt_setup_ccb resets ccb_h.flags
- sbp_post_busreset: call xpt_release_simq only if it's actually frozen
- don't place private SIMQ_FREEZED flag (sic, "freezed") into sim->flags,
  use sbp->flags for that
- some style fixes and control flow enhancements

Reviewed by: sbruno
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9898

7 years agoStop installing pcap-int.h, which is the internal interface for libpcap.
Xin LI [Tue, 7 Mar 2017 16:06:53 +0000 (16:06 +0000)]
Stop installing pcap-int.h, which is the internal interface for libpcap.

Reference: https://github.com/the-tcpdump-group/libpcap/issues/560
PR: 217221

7 years agoqlxgbe: add GCC_MS_EXTENSIONS to CFLAGS to make old base GCC happy
Andriy Gapon [Tue, 7 Mar 2017 15:43:49 +0000 (15:43 +0000)]
qlxgbe: add GCC_MS_EXTENSIONS to CFLAGS to make old base GCC happy

The module uses unnamed structure and union fields and base GCC in
stable/10 doesn't like it.
I think that that is a C11 feature, so it is courteous of more modern
compilers to not complain about it when compiling in C99 mode.

Approved by: davidcs
MFC after: 5 days

7 years agoImplement time_is_after_eq_jiffies() function in the LinuxKPI.
Hans Petter Selasky [Tue, 7 Mar 2017 15:37:51 +0000 (15:37 +0000)]
Implement time_is_after_eq_jiffies() function in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoFix implementation of the DECLARE_RWSEM() macro in the LinuxKPI.
Hans Petter Selasky [Tue, 7 Mar 2017 15:34:49 +0000 (15:34 +0000)]
Fix implementation of the DECLARE_RWSEM() macro in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoMake sure jiffies value is cast to an integer in the LinuxKPI before
Hans Petter Selasky [Tue, 7 Mar 2017 15:33:38 +0000 (15:33 +0000)]
Make sure jiffies value is cast to an integer in the LinuxKPI before
doing millisecond conversion. Under FreeBSD jiffies are 32-bit.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoUpdate our Allwinner DTS to latest DTS changes in Linux 4.10
Emmanuel Vadot [Tue, 7 Mar 2017 13:59:30 +0000 (13:59 +0000)]
Update our Allwinner DTS to latest DTS changes in Linux 4.10

7 years agoUpdate our device tree files to a Linux 4.10
Emmanuel Vadot [Tue, 7 Mar 2017 13:56:49 +0000 (13:56 +0000)]
Update our device tree files to a Linux 4.10

7 years agoUse grouptaskqueue for tasklets in the LinuxKPI.
Hans Petter Selasky [Tue, 7 Mar 2017 13:51:14 +0000 (13:51 +0000)]
Use grouptaskqueue for tasklets in the LinuxKPI.

This avoids creating own per-CPU threads and also ensures the tasklet
execution happens on the same CPU core invoking the tasklet.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agodon't stop in issignal() if P_SINGLE_EXIT is set
Eric Badger [Tue, 7 Mar 2017 13:41:01 +0000 (13:41 +0000)]
don't stop in issignal() if P_SINGLE_EXIT is set

Suppose a traced process is stopped in ptracestop() due to receipt of a
SIGSTOP signal, and is awaiting orders from the tracing process on how
to handle the signal. Before sending any such orders, the tracing
process exits. This should kill the traced process. But suppose a second
thread handles the SIGKILL and proceeds to exit1(), calling
thread_single(). The first thread will now awaken and will have a chance
to check once more if it should go to sleep due to the SIGSTOP.  It must
not sleep after P_SINGLE_EXIT has been set; this would prevent the
SIGKILL from taking effect, leaving a stopped orphan behind after the
tracing process dies.

Also add new tests for this condition.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D9890

7 years agoWhen selecting brand based on old Elf branding, prefer the brand which
Konstantin Belousov [Tue, 7 Mar 2017 13:38:25 +0000 (13:38 +0000)]
When selecting brand based on old Elf branding, prefer the brand which
interpreter exactly matches the one requested by the activated image.

This change applies r295277, which did the same for note branding, to
the old brand selection, with the same reasoning of fixing compat32
interpreter substitution.

PR: 211837
Reported by: kenji@kens.fm
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoRequire whole brand string matching for old Elf branding.
Konstantin Belousov [Tue, 7 Mar 2017 13:37:35 +0000 (13:37 +0000)]
Require whole brand string matching for old Elf branding.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoConsistently use vm_ooffset_t type for the vm object offset in
Konstantin Belousov [Tue, 7 Mar 2017 13:36:43 +0000 (13:36 +0000)]
Consistently use vm_ooffset_t type for the vm object offset in
elf_load_section.

The values passed currently as vm_offset_t are phdr.p_offset, which
have the native Elf word size.  Since elf_load_section interprets them
as the file offset, use vm object offset type.

Noted and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoUpdate to Linux 4.10
Emmanuel Vadot [Tue, 7 Mar 2017 12:41:06 +0000 (12:41 +0000)]
Update to Linux 4.10

7 years agoLinuxKPI workqueue cleanup.
Hans Petter Selasky [Tue, 7 Mar 2017 12:09:14 +0000 (12:09 +0000)]
LinuxKPI workqueue cleanup.

This change makes the workqueue implementation behave more like in
Linux, both functionality wise and structure wise.

All workqueue code has been moved to linux_work.c

Add an atomic based statemachine to the work_struct to ensure proper
operation. Prior to this change struct_work was directly mapped to a
FreeBSD task. When a taskqueue has multiple threads the same task may
end up being executed on more than one worker thread simultaneously.
This might cause problems with code coming from Linux, which expects
serial behaviour, similar to Linux tasklets.

Move all global workqueue function names into the linux_xxx domain to
avoid symbol name clashes in the future.

Implement a few more workqueue related functions and macros.

Create two multithreaded taskqueues for the LinuxKPI during module
load, one for time-consuming callbacks and one for non-time consuming
callbacks.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoxen/netfront: fix inbound packet flags for checksum offload
Roger Pau Monné [Tue, 7 Mar 2017 09:18:52 +0000 (09:18 +0000)]
xen/netfront: fix inbound packet flags for checksum offload

Currently netfront is setting the flags of inbound packets with the checksum
not present (offloaded) to (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID |
CSUM_PSEUDO_HDR). According to the mbuf(9) man page this is not the correct
combination of flags, it should instead be (CSUM_DATA_VALID |
CSUM_PSEUDO_HDR).

Reviewed by: Wei Liu <wei.liu2@citrix.com>
MFC after: 2 weeks
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D9831

7 years agoxenstore: fix suspension when using the xenstore device
Roger Pau Monné [Tue, 7 Mar 2017 09:17:48 +0000 (09:17 +0000)]
xenstore: fix suspension when using the xenstore device

Lock the xenstore request mutex when suspending user-space processes, in order
to prevent any process from holding this lock when going into suspension, or
else the xenstore suspend process is going to deadlock.

Submitted by: Liuyingdong <liuyingdong@huawei.com>
Reviewed by: royger
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D9638

7 years agoxen: add support for canceled suspend
Roger Pau Monné [Tue, 7 Mar 2017 09:16:51 +0000 (09:16 +0000)]
xen: add support for canceled suspend

When running on Xen, it's possible that a suspend request to the hypervisor
fails (return from HYPERVISOR_suspend different than 0). This means that the
suspend hasn't succeed, and the resume procedure needs to properly handle this
case.

First of all, when such situation happens there's no need to reset the vector
callback, hypercall page, shared info, event channels or grant table, because
it's state is preserved. Also, the PV drivers don't need to be reset to the
initial state, since the connection with the backed has not been interrupted.

Submitted by: Liuyingdong <liuyingdong@huawei.com>
Reviewed by: royger
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D9635

7 years agoiwn: deduplicate (RXON + txpower + broadcast node) command sequence.
Andriy Voskoboinyk [Tue, 7 Mar 2017 07:49:25 +0000 (07:49 +0000)]
iwn: deduplicate (RXON + txpower + broadcast node) command sequence.

Was previously applied to wpi(4) as a part of r278366.

Tested with Intel 6205, STA / MONITOR modes.

7 years agoFix the KASSERT check from r314813.
Hiren Panchasara [Tue, 7 Mar 2017 06:46:38 +0000 (06:46 +0000)]
Fix the KASSERT check from r314813.
len being 0 is valid.

Submitted by: ngie
Reported by: ngie (via jenkins test run)
Sponsored by: Limelight Networks

7 years agoThe relative symlink fix causes downstream issues for
Rodney W. Grimes [Tue, 7 Mar 2017 06:11:36 +0000 (06:11 +0000)]
The relative symlink fix causes downstream issues for
EMC DELL Isilon so revert the relative symlink fix
pending a better solution.

Reported by: ngie
Approved by: greham (mentor) Implicit as reverting
MFC after: 1 week

7 years agoConvert absolute links to relative links.
Rodney W. Grimes [Tue, 7 Mar 2017 05:10:38 +0000 (05:10 +0000)]
Convert absolute links to relative links.
Style.Makefile(9) has been ignored to produce minimal diffs.

Approved by: grehan (mentor)
MFC after: 1 week

7 years agops(1): Fix -w + UNLIMITED handling
Conrad Meyer [Tue, 7 Mar 2017 04:51:35 +0000 (04:51 +0000)]
ps(1): Fix -w + UNLIMITED handling

A follow-up fix for r314685.

Because the -w flag is parsed after ps(1) infers termwidth from COLUMNS and
stdout, and UNLIMITED happens to be the zero value, the single -w flag in
combination with a non-terminal stdout or COLUMNS=0 could result in output
truncated at 131 characters.  (Despite the output being unlimited without
-w.)

Obviously, adding more -w shouldn't truncate output lines.

The committed patch is from bdrewery@, and I've reviewed and tested it.

Submitted by: bdrewery@
Reported by: bdrewery@
Sponsored by: Dell EMC Isilon

7 years agoDon't rely on dependency in Makefile.inc1 for strfile; make datfiles depend on strfile
Enji Cooper [Tue, 7 Mar 2017 04:33:17 +0000 (04:33 +0000)]
Don't rely on dependency in Makefile.inc1 for strfile; make datfiles depend on strfile

In most cases strfile is built as part of build-tools, but in the event that someone
cd'ed to the directory, tried to build from scratch, and had MK_GAMES=no previously,
the build would fail in .../datfiles , trying to find strfile .

Mark this directory tree "SUBDIR_PARALLEL" safe to help facilitate this, instead of
shuffling around the SUBDIR entries (all of the other Makefiles will build standalone).

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agomergemaster: fix description of -p
Enji Cooper [Tue, 7 Mar 2017 04:13:22 +0000 (04:13 +0000)]
mergemaster: fix description of -p

-p only handles updating /etc/master.passwd and /etc/group . No more,
no less.

Also, mergemaster (and no other portions of the vanilla FreeBSD build
process) should be messing with __MAKECONF or SRCCONF as part of the
installworld or distribution process. Don't insinuate that mergemaster
does that as it's a false claim.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoloader.efi: fix an off-by-one bug in efi_verify_staging_size()
Dexuan Cui [Tue, 7 Mar 2017 03:35:50 +0000 (03:35 +0000)]
loader.efi: fix an off-by-one bug in efi_verify_staging_size()

Also remove the warning message: it may not be unusual to see
the memory range containing 2MB is not of EfiConventionalMemory.

MFC after: 2 weeks2 weeks
Sponsored by: Microsoft

7 years agoClang in base now supports -mlongcall, so remove this hack
Justin Hibbits [Tue, 7 Mar 2017 02:17:38 +0000 (02:17 +0000)]
Clang in base now supports -mlongcall, so remove this hack

PR: 215947
MFC after: 2 weeks

7 years agoFix typo in comment.
Simon J. Gerraty [Tue, 7 Mar 2017 01:42:30 +0000 (01:42 +0000)]
Fix typo in comment.

7 years agocxgbe/iw_cxgbe: Abort connection if there is an error during c4iw_modify_qp.
Navdeep Parhar [Tue, 7 Mar 2017 01:13:26 +0000 (01:13 +0000)]
cxgbe/iw_cxgbe: Abort connection if there is an error during c4iw_modify_qp.

Submitted by: KrishnamRaju ErapaRaju @ Chelsio
MFC after: 3 days
Sponsored by: Chelsio Communications

7 years agoWe've found a recurring problem where some userland process would be
Hiren Panchasara [Tue, 7 Mar 2017 00:20:01 +0000 (00:20 +0000)]
We've found a recurring problem where some userland process would be
stuck spinning at 100% cpu around sbcut_internal(). Inside
sbflush_internal(), sb_ccc reached to about 4GB and before passing it
to sbcut_internal(), we type-cast it from uint to int making it -ve.

The root cause of sockbuf growing this large is unknown. Correct fix
is also not clear but based on mailing list discussions, adding
KASSERTs to panic instead of looping endlessly.

Reviewed by: glebius
Sponsored by: Limelight Networks

7 years agoIntroduce the concept of IPsec security policies scope.
Andrey V. Elsukov [Tue, 7 Mar 2017 00:13:53 +0000 (00:13 +0000)]
Introduce the concept of IPsec security policies scope.

Currently are defined three scopes: global, ifnet, and pcb.
Generic security policies that IKE daemon can add via PF_KEY interface
or an administrator creates with setkey(8) utility have GLOBAL scope.
Such policies can be applied by the kernel to outgoing packets and checked
agains inbound packets after IPsec processing.
Security policies created by if_ipsec(4) interfaces have IFNET scope.
Such policies are applied to packets that are passed through if_ipsec(4)
interface.
And security policies created by application using setsockopt()
IP_IPSEC_POLICY option have PCB scope. Such policies are applied to
packets related to specific socket. Currently there is no way to list
PCB policies via setkey(8) utility.

Modify setkey(8) and libipsec(3) to be able distinguish the scope of
security policies in the `setkey -DP` listing. Add two optional flags:
'-t' to list only policies related to virtual *tunneling* interfaces,
i.e. policies with IFNET scope, and '-g' to list only policies with GLOBAL
scope. By default policies from all scopes are listed.

To implement this PF_KEY's sadb_x_policy structure was modified.
sadb_x_policy_reserved field is used to pass the policy scope from the
kernel to userland. SADB_SPDDUMP message extended to support filtering
by scope: sadb_msg_satype field is used to specify bit mask of requested
scopes.

For IFNET policies the sadb_x_policy_priority field of struct sadb_x_policy
is used to pass if_ipsec's interface if_index to the userland. For GLOBAL
policies sadb_x_policy_priority is used only to manage order of security
policies in the SPDB. For IFNET policies it is not used, so it can be used
to keep if_index.

After this change the output of `setkey -DP` now looks like:
# setkey -DPt
0.0.0.0/0[any] 0.0.0.0/0[any] any
in ipsec
esp/tunnel/87.250.242.144-87.250.242.145/unique:145
spid=7 seq=3 pid=58025 scope=ifnet ifname=ipsec0
refcnt=1
# setkey -DPg
::/0 ::/0 icmp6 135,0
out none
spid=5 seq=1 pid=872 scope=global
refcnt=1

No objection from: #network
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D9805

7 years agoo Another round fixes for mmc(4), mmcsd(4) and sdhci(4) regarding
Marius Strobl [Mon, 6 Mar 2017 23:47:59 +0000 (23:47 +0000)]
o Another round fixes for mmc(4), mmcsd(4) and sdhci(4) regarding
  comments, marking unused parameters as such, style(9), whitespace,
  etc.
o In the mmc(4) bridges and sdhci(4) (bus) front-ends:
  - Remove redundant assignments of the default bus_generic_print_child
    device method (I've whipped these out of the tree as part of r227843
    once, but they keep coming back ...),
  - use DEVMETHOD_END,
  - use NULL instead of 0 for pointers.
o Trim/adjust includes.

7 years agopf: Fix a crash in low-memory situations
Kristof Provost [Mon, 6 Mar 2017 23:41:23 +0000 (23:41 +0000)]
pf: Fix a crash in low-memory situations

If the call to pf_state_key_clone() in pf_get_translation() fails (i.e. there's
no more memory for it) it frees skp. This is wrong, because skp is a
pf_state_key **, so we need to free *skp, as is done later in the function.
Getting it wrong means we try to free a stack variable of the calling
pf_test_rule() function, and we panic.

7 years agoUpdate dirdeps/meta bits from latest bmake.
Simon J. Gerraty [Mon, 6 Mar 2017 23:13:25 +0000 (23:13 +0000)]
Update dirdeps/meta bits from latest bmake.

7 years agoMerge bmake-20170301
Simon J. Gerraty [Mon, 6 Mar 2017 23:02:33 +0000 (23:02 +0000)]
Merge bmake-20170301

7 years agoMove ATF_TC_WITHOUT_HEAD(getgrent) near the testcase it annotates
Enji Cooper [Mon, 6 Mar 2017 22:46:49 +0000 (22:46 +0000)]
Move ATF_TC_WITHOUT_HEAD(getgrent) near the testcase it annotates

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix compilation of r314784 on 32 bit.
Gleb Smirnoff [Mon, 6 Mar 2017 22:32:56 +0000 (22:32 +0000)]
Fix compilation of r314784 on 32 bit.

7 years agoRemove *-api(3) manpages removed in ATF 0.21
Enji Cooper [Mon, 6 Mar 2017 22:18:14 +0000 (22:18 +0000)]
Remove *-api(3) manpages removed in ATF 0.21

I overlooked the fact that these manpages had been removed upstream
and replaced with their non *-api(3) equivalents. Follow upstream's
lead and remove the unused manpages.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix issues noted by igor/manlint
Enji Cooper [Mon, 6 Mar 2017 22:08:47 +0000 (22:08 +0000)]
Fix issues noted by igor/manlint

- Fix typos [1]:
-- manged -> managed
-- specifiying -> specifying
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after: 1 week
Reported by: igor [1], manlint [2]
Sponsored by: Dell EMC Isilon

7 years agoFix typos
Enji Cooper [Mon, 6 Mar 2017 21:50:35 +0000 (21:50 +0000)]
Fix typos

- specifiying -> specifying
- manged -> managed

Bump .Dd for the change

MFC after: 1 week
Reported by: igor
Sponsored by: Dell EMC Isilon

7 years agoFix atf-c-api(3) manpage issues
Enji Cooper [Mon, 6 Mar 2017 21:45:25 +0000 (21:45 +0000)]
Fix atf-c-api(3) manpage issues

- Fix typo (specifiying -> specifying).
- Remove surrounding ellipses in i.e. section and add a comma before
  and after the i.e. reference.

Bump .Dd for the change

MFC after: 1 week
Reported by: igor
Sponsored by: Dell EMC Isilon

7 years agoFix igor/manlint issues with atf-c(3)
Enji Cooper [Mon, 6 Mar 2017 21:43:47 +0000 (21:43 +0000)]
Fix igor/manlint issues with atf-c(3)

- Remove surrounding ellipses in i.e. section and add a comma before
  and after the i.e. reference [1].
- Fix typo (specifiying -> specifying) [1].
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after: 1 week
Reported by: igor [1], manlint [2]
Sponsored by: Dell EMC Isilon

7 years agoFix issues with atf-check(1) found by igor and refer to atf-check(1)
Enji Cooper [Mon, 6 Mar 2017 21:39:57 +0000 (21:39 +0000)]
Fix issues with atf-check(1) found by igor and refer to atf-check(1)

- Fix typo (specifiying -> specifying)
- Add atf-check(1) to SEE ALSO section for completeness. It's mentioned
  above, but by convention the SEE ALSO section should list all relevant
  references to other tools and APIs.

Bump .Dd for the change

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix manlint issues with atf-check(1)
Enji Cooper [Mon, 6 Mar 2017 21:35:33 +0000 (21:35 +0000)]
Fix manlint issues with atf-check(1)

- Use `.Bf Em`/`.Ef` instead of prefixing lines with `.Em`. The forms
  are equivalent with traditional roff, but unnecessarily verbose. The
  former form applies the .Em macro to the enclosed block.
- Move EXIT_STATUS section down so the section complies with section
  ordering specified by mdoc(7) and enforced by manlint(1).

Bump .Dd for the change

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix out-of-order sections in atf-sh(1)
Enji Cooper [Mon, 6 Mar 2017 21:30:06 +0000 (21:30 +0000)]
Fix out-of-order sections in atf-sh(1)

- `.Op` must be used in the SYNOPSIS section, not the NAME section.
- Move ATF_SHELL environment variable description up to first
  ENVIRONMENT section. Garbage collect the duplicate ENVIRONMENT
  section.

Bump .Dd for the change

MFC after: 1 week
Reported by: manlint
Sponsored by: Dell EMC Isilon

7 years agoFix grammar warning noted by igor
Enji Cooper [Mon, 6 Mar 2017 21:26:45 +0000 (21:26 +0000)]
Fix grammar warning noted by igor

Remove surrounding ellipses in e.g. section and add a comma before and after
the e.g. reference.

MFC after: 1 week
Reported by: igor
Sponsored by: Dell EMC Isilon

7 years agoFix atf-sh(3) manpage issues
Enji Cooper [Mon, 6 Mar 2017 21:24:55 +0000 (21:24 +0000)]
Fix atf-sh(3) manpage issues

- Fix spelling errors (specifiying -> specifying) [1]
- Escape '.' at start of lines using & to tell the roff processor
  that the line isn't meant to be treated as a command [2].

Bump .Dd for the change

MFC after: 1 week
Reported by: igor [1], manlint [2]
Sponsored by: Dell EMC Isilon

7 years agoReapply r287232 from upstream llvm trunk (by Daniil Fukalov):
Dimitry Andric [Mon, 6 Mar 2017 21:14:20 +0000 (21:14 +0000)]
Reapply r287232 from upstream llvm trunk (by Daniil Fukalov):

  [SCEV] limit recursion depth of CompareSCEVComplexity

  Summary:
  CompareSCEVComplexity goes too deep (50+ on a quite a big unrolled
  loop) and runs almost infinite time.

  Added cache of "equal" SCEV pairs to earlier cutoff of further
  estimation. Recursion depth limit was also introduced as a parameter.

  Reviewers: sanjoy

  Subscribers: mzolotukhin, tstellarAMD, llvm-commits

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

Pull in r296992 from upstream llvm trunk (by Sanjoy Das):

  [SCEV] Decrease the recursion threshold for CompareValueComplexity

  Fixes PR32142.

  r287232 accidentally increased the recursion threshold for
  CompareValueComplexity from 2 to 32.  This change reverses that
  change by introducing a separate flag for CompareValueComplexity's
  threshold.

The latter revision fixes the excessive compile times for skein_block.c.

7 years agoFix bootstrapping libmd on older systems after r314709.
Bryan Drewery [Mon, 6 Mar 2017 21:06:55 +0000 (21:06 +0000)]
Fix bootstrapping libmd on older systems after r314709.

This follows another fix to bootstrap libmd after r313404.  The
MD5FileChunk prototype is needed to build libmd, but it is
only reliably in the src tree's sys/md5.h header.  Rather than
polluting the legacy build with this header for the entire build,
just symlink it in here for now as is done in the elftoolchain
build.  Libmd is already referencing other src tree headers by
its used of CFLAGS+= ${SRCTOP}/sys/crypto/sha2.  This, and
other uses of CFLAGS+= ${SRCTOP}/sys..., may later change to
be in the legacy mechanism.

Reported by: bde, ian, sjg
Tested by: ian

7 years agoFix ATF_TP_ADD_TCS example in atf-c-api(3)
Enji Cooper [Mon, 6 Mar 2017 20:54:21 +0000 (20:54 +0000)]
Fix ATF_TP_ADD_TCS example in atf-c-api(3)

ATF_TP_ADD_TC should use `tp` as the second argument, not `tcs`, as
ATF_TP_ADD_TCS uses `tp` as its first argument.

Bump .Dd for the change.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoAdded comments for why nmtree/libmd are bootstrapped.
Bryan Drewery [Mon, 6 Mar 2017 20:32:17 +0000 (20:32 +0000)]
Added comments for why nmtree/libmd are bootstrapped.

7 years agoImport bmake-20170301
Simon J. Gerraty [Mon, 6 Mar 2017 19:54:54 +0000 (19:54 +0000)]
Import bmake-20170301

7 years agoImport mpr(4) driver P12 to P14 diff from vendor site.
Alexander Motin [Mon, 6 Mar 2017 19:39:31 +0000 (19:39 +0000)]
Import mpr(4) driver P12 to P14 diff from vendor site.

This is mostly a version bump to stay in version number sync with firmware.
The only change there was cosmetic:  Display degraded speed message upon
receiving Active Cable Exception Event with DEGRADED reason code.

Discussed with: slm@
MFC after: 1 week

7 years agoFix some trivial manlint warnings
Enji Cooper [Mon, 6 Mar 2017 19:33:15 +0000 (19:33 +0000)]
Fix some trivial manlint warnings

Sentences should begin on new lines, per manlint.

Bump .Dd for the change

MFC after: 1 month
Reviewed by: bcr
Reported by: make manlint
Sponsored by: Dell EMC Isilon

7 years agoIn panic() print current timestamp, which matches timestamp in the dump
Gleb Smirnoff [Mon, 6 Mar 2017 19:14:08 +0000 (19:14 +0000)]
In panic() print current timestamp, which matches timestamp in the dump
header.  This will help to correlate console server logs with dump files,
no matter how precise is clock on a console server appliance, and how
buggy the appliance is.

7 years agoRegenerated Linuxulator syscall tables for r314782
Mahdi Mokhtari [Mon, 6 Mar 2017 18:20:37 +0000 (18:20 +0000)]
Regenerated Linuxulator syscall tables for r314782

Approved by: dchagin
MFC after: 1 month

7 years agoAdd UNIMPLEMENTED() placeholder macro for
Mahdi Mokhtari [Mon, 6 Mar 2017 18:11:38 +0000 (18:11 +0000)]
Add UNIMPLEMENTED() placeholder macro for
the syscalls that are not implemented in Linux kernel itself.
Cleanup DUMMY() macros.

Reviewed by: dchagin, trasz
Approved by: dchagin
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9804

7 years agolibpam: extra bounds checking through reallocarray(3).
Pedro F. Giffuni [Mon, 6 Mar 2017 15:45:46 +0000 (15:45 +0000)]
libpam: extra bounds checking through reallocarray(3).

Reviewed by: des
MFC after: 1 week

7 years agoRevert r314777: wrong log, the change was to libpam.
Pedro F. Giffuni [Mon, 6 Mar 2017 15:42:03 +0000 (15:42 +0000)]
Revert r314777: wrong log, the change was to libpam.

7 years agolibfetch: extra bounds checking through reallocarray(3).
Pedro F. Giffuni [Mon, 6 Mar 2017 15:38:03 +0000 (15:38 +0000)]
libfetch: extra bounds checking through reallocarray(3).

Reviewed by: des
MFC after: 1 week

7 years agolibfetch: extra bounds checking through reallocarray(3).
Pedro F. Giffuni [Mon, 6 Mar 2017 15:37:34 +0000 (15:37 +0000)]
libfetch: extra bounds checking through reallocarray(3).

Reviewed by: des
MFC after: 1 week