trasz [Wed, 20 Jun 2018 19:16:51 +0000 (19:16 +0000)]
Improve wording.
MFC after: 2 weeks
emaste [Wed, 20 Jun 2018 18:43:17 +0000 (18:43 +0000)]
usr.bin/ar: use standard 2-Clause FreeBSD license
Many licenses on ar files contained small variations from the standard
FreeBSD license text. To avoid license proliferation switch to the usual
2-clause FreeBSD license after obtaining permission from all copyright
holders.
Approved by: jkoshy, kaiw, kientzle
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D14561
bdrewery [Wed, 20 Jun 2018 17:20:39 +0000 (17:20 +0000)]
Reduce exec and fstat overhead for non-build targets.
This is mostly targetting 'make showconfig' and 'make test-system-*' for
the benefit of makeman and universe-one-clang work.
Sponsored by: Dell EMC
bdrewery [Wed, 20 Jun 2018 16:15:03 +0000 (16:15 +0000)]
Regenerate for SYSTEM_LINKER
bdrewery [Wed, 20 Jun 2018 16:10:14 +0000 (16:10 +0000)]
Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible.
This works similar to WITH_SYSTEM_COMPILER added in r300354. It only
supports lld via WITH_LLD_BOOTSTRAP.
When both SYSTEM_COMPILER and SYSTEM_LINKER logic passes then libclang
will not build in cross-tools. If either check fails though then
libclang is built.
The .info is reworked to notify when libclang will be built since if
either clang or lld needs to be rebuilt, but not the other, the
notification can lead to confusion on why "clang is building".
-fuse-ld= is not used with this method so some combinations of compiler
and linker are expected to fail.
A new 'make test-system-linker' target is added to see the logic results.
Makefile.inc1:
CROSS_BINUTILS_PREFIX support had to be moved higher up so that XLD
could be set and MK_LLD_BOOTSTRAP disabled before checking SYSTEM_LINKER
logic as done with SYSTEM_COMPILER. This also required moving where
bsd.linker.mk was read since XLD needs to be set before parsing it. This
creates a situation where src.opts.mk can not test LINKER_FEATURES or
add LLD_BOOTSTAP to BROKEN_OPTIONS.
Reviewed by: emaste (earlier version)
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D15894
bdrewery [Wed, 20 Jun 2018 16:10:10 +0000 (16:10 +0000)]
Fix sources needed for lld.
lld always needs these DWARF sources, as well as other default and extra
tools. XDL seems to be the best fit list.
Remove MK_LLD_IS_LD check from SRCS_MIW which is now reduced to just a
few files for llvm-objdump.
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D15915
bdrewery [Wed, 20 Jun 2018 16:10:07 +0000 (16:10 +0000)]
Rework WITHOUT_LLD/TOOLCHAIN fix from r327892 for cross-tools.
MK_LLD is for the installed lld while MK_LLD_BOOTSTRAP is for the build
tool. For WITH_SYSTEM_LINKER it is necesarry to separate the logic of
these two. When building libllvm TOOLS_PREFIX will be defined and
MK_LLD_BOOTSTRAP should be checked instead.
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D15837
bdrewery [Wed, 20 Jun 2018 16:10:02 +0000 (16:10 +0000)]
Rework how the ld link is handled in WORLDTMP from r322811.
LLD_BOOTSTRAP (build) is independent of LLD_IS_LD (installed) so they
should not be based on each other.
This is related to upcoming WITH_SYSTEM_LINKER work.
Reviewed by: emaste
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D15836
manu [Wed, 20 Jun 2018 16:07:35 +0000 (16:07 +0000)]
Add pmap_mapdev_attr for arm64
This is needed for efifb.
arm and ricv pmap (the two arch with arm64 that uses subr_devmap) have very
different implementation so for now only add this for arm64.
Tested with efifb on Pine64 with a few other patches.
Reviewed by: cognet
Differential Revision: https://reviews.freebsd.org/D15294
manu [Wed, 20 Jun 2018 15:27:09 +0000 (15:27 +0000)]
if_rk_dwc: Disable setting delays for now
The values for tx/rx delays differs accross the different DTS.
Mainline Linux set it to 0x24/0x18
Mostly-Vendor u-boot (the one maintained and developped) to 0x18/0x18
Mostly-Vendor linux (the one maintained and developped) to 0x26/0x11
By experience only 0x18/0x18 works so until the issue is resolved rely on
the bootloader settings.
manu [Wed, 20 Jun 2018 14:46:07 +0000 (14:46 +0000)]
rk_gpio: Read the correct register for gpio read
Reported by: jmcneill
manu [Wed, 20 Jun 2018 14:45:26 +0000 (14:45 +0000)]
if_rk_dwc: Fix delays handling
The property are named {t,r}x_delay and not {t,r}-delay.
The upper bits of the register are a mask of which bits is allowed
to be written, set it otherwise we write nothing.
OF_getencprop returns <0 = for an error.
Pointy Hat: myself
Reported by: jmcneill (delay and mask bits)
jhibbits [Wed, 20 Jun 2018 13:30:35 +0000 (13:30 +0000)]
Attach dev.cpu nodes on powerpc SMT cores, using only the first found thread
Summary: In order to use cpufreq(4), a dev.cpu attachment must be created. If
the IBM property is found denoting SMT, attach only to the first thread setup,
so that a cpufreq device can bind.
Reviewed by: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15921
bz [Wed, 20 Jun 2018 11:42:06 +0000 (11:42 +0000)]
Instead of using hand-rolled loops where not needed switch them
to FOREACH_PROC_IN_SYSTEM() to have a single pattern to look for.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D15916
andrew [Wed, 20 Jun 2018 11:13:10 +0000 (11:13 +0000)]
Move the SYSINIT to allow userspace access to the ARM generic timer later
in the boot. It doesn't need to be early, so move it to the SI_ORDER_ANY
stage of SI_SUB_SMP.
Sponsored by: DARPA, AFRL
andrew [Wed, 20 Jun 2018 10:57:29 +0000 (10:57 +0000)]
Move the SMCCC SYSINIT later in the boot so the psci driver has attached.
Sponsored by: DARPA, AFRL
andrew [Wed, 20 Jun 2018 10:02:50 +0000 (10:02 +0000)]
Fix the SMCCC signatures, they are all 32-bit calls. This fixes SMCCC
version detection.
Sponsored by: DARPA, AFRL
bz [Wed, 20 Jun 2018 08:34:29 +0000 (08:34 +0000)]
Sometimes it is helpful to get the path for a vnode.
Implement a ddb function walking the namecache to do this.
Reviewed by: jhb, mjg
Inspired by: gdb macro from jhb (old version)
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D14898
stevek [Wed, 20 Jun 2018 06:54:38 +0000 (06:54 +0000)]
Fix build breakage in veriexec for 32-bit architectures.
fsid_t and ino_t are 64-bit entities, use uintmax_t typecast to ensure we
can print it on 32-bit or 64-bit architectures by using the %ju format for
prints.
Obtained from: Juniper Networks, Inc.
kevans [Wed, 20 Jun 2018 03:31:19 +0000 (03:31 +0000)]
sort(1): Fix -m when only implicit stdin is used for input
Observe:
printf "a\nb\nc\n" > /tmp/foo
# Next command results in no output
cat /tmp/foo | sort -m
# Next command results in proper output
cat /tmp/foo | sort -m -
# Also works:
sort -m /tmp/foo
Some const'ification was done to simplify the actual solution of adding "-"
explicitly to the file list if we didn't have any file arguments left over.
PR: 190099
MFC after: 1 week
kevans [Wed, 20 Jun 2018 03:10:49 +0000 (03:10 +0000)]
sort(1): Add bits to allow easy checking against NetBSD tests
I'm looking at sort(1) failures, for better or worse.
stevek [Wed, 20 Jun 2018 01:08:54 +0000 (01:08 +0000)]
This application (veriexecctl) handles reading a fingerprints file
containing paths, fingerprints, and optional option flags which in turn
get pushed into the MAC/veriexec meta-data store via the veriexec device.
The format of the fingerprints file is as follows:
path type fingerprint options
The type of fingerprint supported depends on what MAC/veriexec fingerprint
modules have been loaded into the system. The veriexecctl application is
able to determine which ones are available by consulting the
security.mac.veriexec.algorithms sysctl.
The following options are currently supported in MAC/veriexec and by the
veriexecctl application:
indirect
If this option is set then the executable cannot be invoked directly, it
can only be used as an interpreter in shell scripts.
file
Indicates that the fingerprint is associated with a file, not an
executable. Files have their fingerprints verified during open(2) and are
automatically made read only. This option may be used to verify shared
libraries have not been tampered with.
no_ptrace
If this option is set then the executable cannot be traced with the
ptrace(2) process tracing and debugging call.
trusted
If this option is set then the executable is allowed to write to the
mem(4) devices. By default, when verified execution is enforced, no
process is allowed to write to the mem(4) devices.
The options are not case sensitive.
Reviewed by: jtl, wblock
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8575
stevek [Wed, 20 Jun 2018 00:55:18 +0000 (00:55 +0000)]
This library allows for user space applications to check file descriptors
or paths to see if they can be verified by MAC/veriexec.
Reviewed by: jtl, wblock
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8562
stevek [Wed, 20 Jun 2018 00:48:46 +0000 (00:48 +0000)]
Device for user space to interface with MAC/veriexec.
The veriexec device features the following ioctl commands:
VERIEXEC_ACTIVE
Activate veriexec functionality
VERIEXEC_DEBUG_ON
Enable debugging mode and increment or set the debug level
VERIEXEC_DEBUG_OFF
Disable debugging mode
VERIEXEC_ENFORCE
Enforce veriexec fingerprinting (and acitvate if not already)
VERIEXEC_GETSTATE
Get current veriexec state
VERIEXEC_LOCK
Lock changes to veriexec meta-data store
VERIEXEC_LOAD
Load veriexec fingerprint if secure level is not raised (and passes the
checks for VERIEXEC_SIGNED_LOAD)
VERIEXEC_SIGNED_LOAD
Load veriexec fingerprints from loader that supports signed manifest
(and thus we can be more lenient about secure level being raised.)
Fingerprints can be loaded if the meta-data store is not locked. Also
securelevel must not have been raised or some fingerprints must have
already been loaded, otherwise it would be dangerous to allow loading.
(Note: this assumes that the fingerprints in the meta-data store at
least cover the fingerprint loader.)
Reviewed by: jtl
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8561
stevek [Wed, 20 Jun 2018 00:41:30 +0000 (00:41 +0000)]
MAC/veriexec implements a verified execution environment using the MAC
framework.
The code is organized into a few distinct pieces:
* The meta-data store (in veriexec_metadata.c) which maps a file system
identifier, file identifier, and generation key tuple to veriexec
meta-data record.
* Fingerprint management (in veriexec_fingerprint.c) which deals with
calculating the cryptographic hash for a file and verifying it. It also
manages the loadable fingerprint modules.
* MAC policy implementation (in mac_veriexec.c) which implements the
following MAC methods:
mpo_init
Initializes the veriexec state, meta-data store, fingerprint modules,
and registers mount and unmount EVENTHANDLERs
mpo_syscall
Implements the following per-policy system calls:
MAC_VERIEXEC_CHECK_FD_SYSCALL
Check a file descriptor to see if the referenced file has a valid
fingerprint.
MAC_VERIEXEC_CHECK_PATH_SYSCALL
Check a path to see if the referenced file has a valid fingerprint.
mpo_kld_check_load
Check if loading a kld is allowed. This checks if the referenced vnode
has a valid fingerprint.
mpo_mount_destroy_label
Clears the veriexec slot data in a mount point label.
mpo_mount_init_label
Initializes the veriexec slot data in a mount point label.
The file system identifier is saved in the veriexec slot data.
mpo_priv_check
Check if a process is allowed to write to /dev/kmem and /dev/mem
devices.
If a process is flagged as trusted, it is allowed to write.
mpo_proc_check_debug
Check if a process is allowed to be debugged. If a process is not
flagged with VERIEXEC_NOTRACE, then debugging is allowed.
mpo_vnode_check_exec
Check is an exectuable is allowed to run. If veriexec is not enforcing
or the executable has a valid fingerprint, then it is allowed to run.
NOTE: veriexec will complain about mismatched fingerprints if it is
active, regardless of the state of the enforcement.
mpo_vnode_check_open
Check is a file is allowed to be opened. If verification was not
requested, veriexec is not enforcing, or the file has a valid
fingerprint, then veriexec will allow the file to be opened.
mpo_vnode_copy_label
Copies the veriexec slot data from one label to another.
mpo_vnode_destroy_label
Clears the veriexec slot data in a vnode label.
mpo_vnode_init_label
Initializes the veriexec slot data in a vnode label.
The fingerprint status for the file is stored in the veriexec slot data.
* Some sysctls, under security.mac.veriexec, for setting debug level,
fetching the current state in a human-readable form, and dumping the
fingerprint database are implemented.
* The MAC policy implementation source file also contains some utility
functions.
* A set of fingerprint modules for the following cryptographic hash
algorithms:
RIPEMD-160, SHA1, SHA2-256, SHA2-384, SHA2-512
* Loadable module builds for MAC/veriexec and fingerprint modules.
WARNING: Using veriexec with NFS (or other network-based) file systems is
not recommended as one cannot guarantee the integrity of the files
served, nor the uniqueness of file system identifiers which are
used as key in the meta-data store.
Reviewed by: ian, jtl
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8554
allanjude [Wed, 20 Jun 2018 00:14:54 +0000 (00:14 +0000)]
Revert r335276
This was causing issues for people booting.
I will likely bring this back as an optional feature, similar to
boot0sio, like gptboot-serial or something.
PR: 221526
Reported by: O. Hartmann <ohartmann@walstatt.org>, Thomas Laus <lausts@acm.org>
oshogbo [Wed, 20 Jun 2018 00:13:09 +0000 (00:13 +0000)]
Use capsicum helpers to cache NLS data.
bdrewery [Tue, 19 Jun 2018 23:57:12 +0000 (23:57 +0000)]
TARGET_TRIPLE is needed much earlier now for CROSS_BINUTILS_PREFIX check.
This was missed in r335394 since the check became exists(/usr/local) in
my testing.
X-MFC-With: r335394
MFC after: 2 weeks
Sponsored by: Dell EMC
oshogbo [Tue, 19 Jun 2018 23:43:14 +0000 (23:43 +0000)]
Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.
No functional change intended.
bdrewery [Tue, 19 Jun 2018 23:40:42 +0000 (23:40 +0000)]
Fix detection for binutils bootstrap package.
The path was changed recently in the port to be the full target triple.
MFC after: 2 weeks
Sponsored by: Dell EMC
bdrewery [Tue, 19 Jun 2018 23:40:39 +0000 (23:40 +0000)]
Let CROSS_BINUTILS_PREFIX work without a trailing slash.
Reported by: jhb
MFC after: 2 weeks
Sponsored by: Dell EMC
bdrewery [Tue, 19 Jun 2018 23:40:36 +0000 (23:40 +0000)]
SYSTEM_COMPILER: Should use X_ vars for comparing wanted version.
It is XCC used during the build of target binaries that replaces the
bootstrap compiler.
Also slightly tweak style.
MFC after: 2 weeks
Sponsored by: Dell EMC
bdrewery [Tue, 19 Jun 2018 23:39:55 +0000 (23:39 +0000)]
Fix X_COMPILER_* and X_LINKER_* not being passed to installworld environment.
This could lead to 'sh: head: not found' warnings which were a symptom
of running 'ld --version' during installworld. This was only happening
with XCC or XLD set. It is intended that cc and ld do not run during
installworld. The metadata for these are already stored in
compiler-metadata.mk added in r316794.
This also removes redundant CROSSENV additions that were for
WITH_SYSTEM_COMPILER, WITHOUT_CROSS_COMPILER, and WITHOUT_TOOLCHAIN
which all don't have a cc or ld in their PATH during install.
Reported by: Mark Millard
MFC after: 2 weeks
Sponsored by: Dell EMC
eadler [Tue, 19 Jun 2018 23:30:55 +0000 (23:30 +0000)]
top(1): fix top -mio
oshogbo [Tue, 19 Jun 2018 22:19:42 +0000 (22:19 +0000)]
Fix typo.
imp [Tue, 19 Jun 2018 21:58:04 +0000 (21:58 +0000)]
Fix typo noticed by pstef@.
emaste [Tue, 19 Jun 2018 21:26:23 +0000 (21:26 +0000)]
linuxulator: handle V3 capget/capset
Linux 2.6.26 introduced 64-bit capability sets. Extend our stub
implementation to handle both 32- and 64-bit. (We still report no
capabilities in capget, and disallow any in capset.)
Reviewed by: chuck
Sponsored by: Turing Robotic Industries Inc.
Differential Revision: https://reviews.freebsd.org/D15887
sbruno [Tue, 19 Jun 2018 21:07:25 +0000 (21:07 +0000)]
MK_EFI - Add uefisign and friends to this knob and ensure that we don't
try to build them if MK_OPENSSL is unset.
Reviewed by: emaste imp kevans
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15211
kibab [Tue, 19 Jun 2018 20:02:03 +0000 (20:02 +0000)]
Fix setting RCA for MMC cards
Unlike SD cards, that publish RCA in response to CMD3,
MMC cards expect the host to set RCA itself.
Since we don't support multiple MMC cards on the bus,
just assign a static RCA of 2 to the attached MMC card.
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D13063
feld [Tue, 19 Jun 2018 19:27:37 +0000 (19:27 +0000)]
Document the new ${name}_env_file feature
Approved by: bcr
MFH: 3 days
Differential Revision: https://reviews.freebsd.org/D15578
lwhsu [Tue, 19 Jun 2018 18:43:02 +0000 (18:43 +0000)]
Really fix the style.
Approved by: oshogbo
Sponsored by: The FreeBSD Foundation
asomers [Tue, 19 Jun 2018 18:32:06 +0000 (18:32 +0000)]
top(1): Fix Coverity warning
Don't call strerror on negative errnos
Reported by: Coverity
CID: 976708
Reviewed by: eadler
Differential Revision: https://reviews.freebsd.org/D15909
lwhsu [Tue, 19 Jun 2018 18:25:43 +0000 (18:25 +0000)]
style(9) fix, I was also going to silence gcc.
Approved by: emaste, oshogbo
Sponsored by: The FreeBSD Foundation
sbruno [Tue, 19 Jun 2018 18:09:15 +0000 (18:09 +0000)]
Set prev to NULL so its garaunteed to have a value of some kind and
gcc doesn't explode. Feel free to fix this correctly or whatever for
gcc builds.
This *should* quiesce tinderbox after r335347 for the gcc builds.
asomers [Tue, 19 Jun 2018 17:41:46 +0000 (17:41 +0000)]
audit(4): add tests for sendmsg, recvmsg, shutdown, and sendfile
Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15895
emaste [Tue, 19 Jun 2018 17:30:11 +0000 (17:30 +0000)]
usr.bin/ar: remove incorrect SPDX tags
Three ar files have a non-standard variation of the BSD license, so
remove their SPDX tags.
Sponsored by: The FreeBSD Foundation
emaste [Tue, 19 Jun 2018 17:28:05 +0000 (17:28 +0000)]
usr.bin/ar: use standard 2-Clause FreeBSD license
Many licenses on ar files contained small variations from the standard
FreeBSD license text. To avoid license proliferation switch to the usual
standard 2-clause FreeBSD license for those files where I have obtained
permission from all of the listed copyright holders.
Approved by: jkoshy, kaiw
Differential Revision: https://reviews.freebsd.org/D14561
asomers [Tue, 19 Jun 2018 16:55:39 +0000 (16:55 +0000)]
audit(4): add tests for utimes(2) and friends, mprotect, and undelete
Includes utimes(2), futimes(2), lutimes(2), futimesat(2), mprotect(2), and
undelete(2). undelete, for now, is tested only in failure mode.
Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15893
andrew [Tue, 19 Jun 2018 16:14:23 +0000 (16:14 +0000)]
Move common GIC interrupt numbers to the common header. These are the same
across the GICv2 and GICv3 drivers so we only need a single copy of them.
Sponsored by: Turing Robotic Industries
sbruno [Tue, 19 Jun 2018 15:55:21 +0000 (15:55 +0000)]
Remove "diff" line indicator. Next to see if this code works or not.
Submitted by: mmacy
Sponsored by: Limelight Networks
kevans [Tue, 19 Jun 2018 15:05:31 +0000 (15:05 +0000)]
lualoader: Correct kernel_options handling
`kernel_options` were being passed as flags to load, rather than to the
kernel being loaded. This is the kernel_options counterpart to r335009.
br [Tue, 19 Jun 2018 14:46:59 +0000 (14:46 +0000)]
o Implement unw_getcontext()
o Restore floating-point registers in jumpto()
These are required to native cross build GCC and GDB
(both do require libc++ and libunwind).
These are not tested.
Sponsored by: DARPA, AFRL
br [Tue, 19 Jun 2018 13:28:02 +0000 (13:28 +0000)]
Don't use TARGET_ARCH in this file, use MACHINE_ARCH instead.
TARGET_ARCH is not defined when building ports/packages.
Sponsored by: DARPA, AFRL
pi [Tue, 19 Jun 2018 12:16:19 +0000 (12:16 +0000)]
share/misc/organization.dot: updates
- add krion, philip to postmaster@
- remove trhodes from donations@, email bounces
Approved by: remko
kibab [Tue, 19 Jun 2018 11:28:50 +0000 (11:28 +0000)]
Don't try to turn power down MMC bus if it is already down
Regulator framework doens't like turning off already turned off
regulators, so we get panic on AllWinner boards.
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D15890
kibab [Tue, 19 Jun 2018 11:25:40 +0000 (11:25 +0000)]
Correctly define rawscr so initializing it doesn't result in overwriting memory.
We need 8 bytes of storage for rawscr.
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D15889
kibab [Tue, 19 Jun 2018 11:23:48 +0000 (11:23 +0000)]
Set MMC_DATA_MULTI flag when doing multi-block transfers
Lower layers (MMC / SDHCI controller drivers) may make certain decisions
based on the presence of this flag. The fact that sdhci.c doesn't
look at this flag is another problem that should be fixed separately.
Found when adding MMCCAM support to AllWinner MMC controller driver
where the presence of this flag actually matters.
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D15888
rrs [Tue, 19 Jun 2018 11:20:28 +0000 (11:20 +0000)]
Make sure that the t_peakrate_thr is not compiled in
by default until NF can upstream it.
Reviewed by: and suggested lstewart
Sponsored by: Netflix Inc.
ae [Tue, 19 Jun 2018 10:34:45 +0000 (10:34 +0000)]
Move BPFIF_* macro definitions into .c file, where struct bpf_if is
declared.
They are only used in this file and there is no need to export them via
bpfdesc.h.
rrs [Tue, 19 Jun 2018 05:28:14 +0000 (05:28 +0000)]
Move the tp set back to where it was before
we started playing with the VNET sets. This
way we have verified the INP settings before
we go to the trouble of de-referencing it.
Reviewed by: and suggested by lstewart
Sponsored by: Netflix Inc.
eadler [Tue, 19 Jun 2018 05:01:07 +0000 (05:01 +0000)]
top(1): correct assertion
eadler [Tue, 19 Jun 2018 04:18:23 +0000 (04:18 +0000)]
top(1): correct header in UP mode
Fix an oversight from r334869 which made the same change, but only for
SMP systems. This avoids a segfault while D15801 is being reviewed.
Reviewed by: kevans
erj [Tue, 19 Jun 2018 03:11:09 +0000 (03:11 +0000)]
ixl(4): Remove ixlvc.c from files.amd64
ixlvc.c is only used by the VF driver (ixlv), and that driver currently doesn't work.
It will be re-added once the VF driver is finished being ported to iflib.
mmacy [Tue, 19 Jun 2018 02:48:53 +0000 (02:48 +0000)]
remove ixl iwarp and ixlv from the build until they are in a working state
mmacy [Tue, 19 Jun 2018 01:54:00 +0000 (01:54 +0000)]
convert inpcbinfo hash and info rwlocks to epoch + mutex
- Convert inpcbinfo info & hash locks to epoch for read and mutex for write
- Garbage collect code that handled INP_INFO_TRY_RLOCK failures as
INP_INFO_RLOCK which can no longer fail
When running 64 netperfs sending minimal sized packets on a 2x8x2 reduces
unhalted core cycles samples in rwlock rlock/runlock in udp_send from 51% to
3%.
Overall packet throughput rate limited by CPU affinity and NIC driver design
choices.
On the receiver unhalted core cycles samples in in_pcblookup_hash went from
13% to to 1.6%
Tested by LLNW and pho@
Reviewed by: jtl
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15686
cy [Tue, 19 Jun 2018 01:33:03 +0000 (01:33 +0000)]
Fix amq -i timestamp segmentation violation.
MFC after: 1 week
asomers [Tue, 19 Jun 2018 01:32:33 +0000 (01:32 +0000)]
audit(4): add tests for ioctl(2)
Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15872
bdrewery [Tue, 19 Jun 2018 01:00:27 +0000 (01:00 +0000)]
Don't bootstrap lld if an external linker is used.
Sponsored by: Dell EMC
np [Tue, 19 Jun 2018 00:50:27 +0000 (00:50 +0000)]
cxgbe(4): Some mailbox commands require access to the Tx pipeline and
can time out if it's backed up due to a non-stop deluge of PAUSE frames
from a misbehaving peer. Detect this situation and toggle MPS TxEn
to allow forward progress.
MFC after: 2 weeks
Sponsored by: Chelsio Communications
avos [Tue, 19 Jun 2018 00:38:28 +0000 (00:38 +0000)]
rtwn(4): decode some bit fields + merge duplicate code.
Add macros for R12A_RXDMA_PRO register (descriptions were seen in the
RTL8822B vendor driver) and merge 2 r21au_init_burstlen() copies.
No functional change intended.
imp [Tue, 19 Jun 2018 00:27:30 +0000 (00:27 +0000)]
Add my script for coping with git-svn and the need to rebase
changes for different branches. It's a bit rough right now,
but should be good enough for most people to try to use. It's
definitely 'tools' tree quality.
imp [Mon, 18 Jun 2018 23:16:47 +0000 (23:16 +0000)]
Switch to creating UEFI ESPs using loader.efi instead of boot1.efi.
Cope for the fact that laoder.efi, not being boot1, doesn't read
/boot.config by setting boot_serial and force the serial console.
Also add sysctl so we can display the boot method.
Provide a variable, do_boot1_efi, if you want to use boot1 for
testing. But since it's transient, it's just a variable and not
available on the command line.
oshogbo [Mon, 18 Jun 2018 23:00:15 +0000 (23:00 +0000)]
libnv: add note about nvlist_pack and nvlist_unpack
Fix small typo as well.
Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org>
oshogbo [Mon, 18 Jun 2018 22:57:32 +0000 (22:57 +0000)]
libnv: Add nvlist_append_*_array() family of functions.
The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions
allows to dynamically extend array stored in the nvlist.
Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org>
mmacy [Mon, 18 Jun 2018 22:27:29 +0000 (22:27 +0000)]
remove epoch_test from default build
oshogbo [Mon, 18 Jun 2018 22:22:06 +0000 (22:22 +0000)]
libnv: add regression test for r335344.
oshogbo [Mon, 18 Jun 2018 22:21:28 +0000 (22:21 +0000)]
libnv: clean parent in nvlist_array when removing it.
When we are removing element form the nvlist we should also clean parent,
because the array is not a part of the nvlist anymore.
Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org>
oshogbo [Mon, 18 Jun 2018 21:26:58 +0000 (21:26 +0000)]
libnv: Remove nvlist argument from cnvlist_{take,free}_* functions.
All information which are need for those operations is already stored in
the cookie.
We decided not to bump libnv version because this API is not used yet in the
base system.
Reviewed by: pjd
oshogbo [Mon, 18 Jun 2018 21:23:40 +0000 (21:23 +0000)]
libnv: add const to cookies arguments
Pointed out by: pjd@
oshogbo [Mon, 18 Jun 2018 21:18:20 +0000 (21:18 +0000)]
libnv: change name of cookie from cookiep to cookie.
The name was inconsistent with rest of the library.
No functional change intended.
Pointed out by: pjd@
erj [Mon, 18 Jun 2018 20:32:53 +0000 (20:32 +0000)]
ixl(4): Update version number to 2.0.0-k
And update copyrights to current year.
MFC after: 1 month
Sponsored by: Intel Corporation
erj [Mon, 18 Jun 2018 20:12:54 +0000 (20:12 +0000)]
ixl(4): Update to use iflib
Update the driver to use iflib in order to bring performance,
maintainability, and (hopefully) stability benefits to the driver.
The driver currently isn't completely ported; features that are missing:
- VF driver (ixlv)
- SR-IOV host support
- RDMA support
The plan is to have these re-added to the driver before the next FreeBSD release.
Reviewed by: gallatin@
Contributions by: gallatin@, mmacy@, krzysztof.galazka@intel.com
Tested by: jeffrey.e.pieper@intel.com
MFC after: 1 month
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D15577
imp [Mon, 18 Jun 2018 19:53:11 +0000 (19:53 +0000)]
Remove stray debugging line.
Noticed by: ian@
imp [Mon, 18 Jun 2018 19:40:21 +0000 (19:40 +0000)]
Remove now-empty geli directory
emaste [Mon, 18 Jun 2018 19:34:34 +0000 (19:34 +0000)]
Introduce arm64 linuxulator stubs
This provides stub implementations of arm64 Linux vdso and machdep,
ptrace, and futex sufficient for executing an arm64 Linux 'hello world'
binary.
Reviewed by: andrew
Sponsored by: Turing Robotic Industries
Differential Revision: https://reviews.freebsd.org/D15832
emaste [Mon, 18 Jun 2018 18:43:45 +0000 (18:43 +0000)]
linuxulator: add debugging for invalid capget/capset version
Sponsored by: Turing Robotic Industries Inc.
tuexen [Mon, 18 Jun 2018 18:35:29 +0000 (18:35 +0000)]
The IP, TCP, and UDP provider report IP addresses as strings.
In some cases, the required information is not available and the
UDP provider reported an empty string in this case and the IP
and TCP provider reported a NULL pointer.
This patch changes the value provided in this case to the string
"<unknown>". This make the behaviour consistent and in-line with
the behaviour of Solaris.
Reviewed by: markj@, dteske@, gnn@
Differential Revision: https://reviews.freebsd.org/D15855
emaste [Mon, 18 Jun 2018 18:10:11 +0000 (18:10 +0000)]
Regen arm64 linuxulator sysent files after r335323
emaste [Mon, 18 Jun 2018 18:08:19 +0000 (18:08 +0000)]
arm64 linuxulator: add dup syscall entry
Missed in r333027
Sponsored by: Turing Robotic Industries Inc.
erj [Mon, 18 Jun 2018 17:27:43 +0000 (17:27 +0000)]
iflib: Style fixes
MFC after: 1 week
imp [Mon, 18 Jun 2018 16:24:42 +0000 (16:24 +0000)]
stand: move libgeliboot into libsa.
Reduce by 1 the number of crazy libraries we need in stand by moving
geli into libsa (where architecturally it belonged all along). This
just moves things around without any code changes.
asomers [Mon, 18 Jun 2018 15:37:43 +0000 (15:37 +0000)]
audit(4): Add tests for {get/set}auid, {get/set}audit, {get/set}audit_addr
Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15871
asomers [Mon, 18 Jun 2018 15:27:31 +0000 (15:27 +0000)]
audit(4): add tests for send, recv, sendto, and recvfrom
Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15869
asomers [Mon, 18 Jun 2018 15:07:10 +0000 (15:07 +0000)]
audit(4): add tests for extattr_set_file and friends
Includes extattr_{set_file, _set_fd, _set_link, _delete_file, _delete_fd,
_delete_link}
Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15867
rrs [Mon, 18 Jun 2018 14:10:12 +0000 (14:10 +0000)]
Move to using the inp->vnet pointer has suggested by lstewart.
This is far better since the hpts system is using the inp
as its basis anyway. Unfortunately his comments came late.
Sponsored by: Netflix Inc.
trasz [Mon, 18 Jun 2018 13:49:44 +0000 (13:49 +0000)]
Improve spelling and capitalize "Kerberos".
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
emaste [Mon, 18 Jun 2018 13:26:45 +0000 (13:26 +0000)]
linsysfs: depend on linux_common module on arm64, as on amd64
Sponsored by: Turing Robotic Industries
ed [Mon, 18 Jun 2018 06:01:28 +0000 (06:01 +0000)]
Fix bad logic in iovlist_truncate().
To conform to RFC 5426, this function is intended to truncate messages
if they exceed the message size limits. Unfortunately, the amount of
space was computed the wrong way around, causing messages to be
truncated entirely.
Reported by: Michael Grimm on stable@
MFC after: 3 days
eadler [Mon, 18 Jun 2018 04:58:48 +0000 (04:58 +0000)]
libcapsicum: adding missing man page links
eadler [Mon, 18 Jun 2018 04:54:09 +0000 (04:54 +0000)]
dc: make use of caph_enter
We already use caph library so this makes sense.