Commit Graph

234118 Commits

Author SHA1 Message Date
John Baldwin
104f6a2dcd Fix GCC 4.2.1 to honor --sysroot for includes.
- Change the C++ directory entries to honor --sysroot if it is set.
- Don't define CROSS_INCLUDE_DIR for the cross compiler.  Instead, set
  TARGET_SYSTEM_ROOT to point to WORLDTMP and always define
  STANDARD_INCLUDE_DIR.
- Change STANDARD_INCLUDE_DIR and the C++ include directories to just
  start with "/usr" always.  The compiler will prepend the sysroot when
  doing cross-builds.  GCC_INCLUDE_DIR (which contains headers that ship
  with the compiler such as intrinsincs rather than OS-supplied headers)
  remains hardcoded to look in TOOLS_PREFIX.

Reviewed by:	bdrewery (older version)
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D15127
2018-06-27 18:14:33 +00:00
John Baldwin
7cdb6a8305 Don't hardcode the TOOLS_PREFIX for the startfiles directories.
GCC 4.2 prefixes these directories with --sysroot meaning that during
buildworld they have a double sysroot.

Reviewed by:	bdrewery
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D14780
2018-06-27 18:11:47 +00:00
Glen Barber
06d4e451d4 Add FreeBSD 11.2.
Sponsored by:	The FreeBSD Foundation
2018-06-27 17:40:29 +00:00
Bryan Drewery
bf64e87984 Regenerate 2018-06-27 17:18:12 +00:00
Bryan Drewery
a596558607 Push users towards LLVM_TARGET_ALL.
MFC after:	1 week
2018-06-27 17:13:36 +00:00
Bryan Drewery
01f124b46f tinderbox: Only build clang/lld once if needed.
Need to handle LLD_BOOTSTRAP separately (for archs like i386).
This would be much better off with an off-by-default option like
SHARED_TOOLCHAIN that universe force-enabled.  Then a normal buildworld
would store the toolchain there if enabled and otherwise in WORLDTMP
with only the 1 arch selected.

MFC after:	3 weeks
Sponsored by:	Dell EMC
2018-06-27 16:58:10 +00:00
Bryan Drewery
90eb413a33 CCACHE_BUILD: Don't try using ccache for compile-linking .c files.
Without -c ccache just executes the real compiler.

MFC after:	2 weeks
Sponsored by:	Dell EMC
2018-06-27 16:58:07 +00:00
Bryan Drewery
759aa20d7b CCACHE_BUILD: Avoid ccache when looking up compiler metadata.
MFC after:	2 weeks
Sponsored by:	Dell EMC
2018-06-27 16:58:03 +00:00
Bryan Drewery
581672388f tinderbox: Give details about kernel builds.
This is a bit noisy now but it was silent before leading to
wondering if it was doing anything.

MFC after:	1 week
Suggested by:	rpokala
Sponsored by:	Dell EMC
2018-06-27 16:57:59 +00:00
Bryan Drewery
eed6d55d26 Clang: Only build needed target for bootstrap compiler.
This will disable the new LLVM_TARGET_ALL option which will only
enable the required target.

This only impacts the bootstrap compiler in WORLDTMP, not the target compiler
that will be installed.

MFC after:	2 weeks
Reviewed by:	sbruno, dim (earlier version)
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D16021
2018-06-27 16:57:56 +00:00
Bryan Drewery
631e709f2b Add LLVM_TARGET_ALL option.
LLVM_TARGET_* will auto be set based on LLVM_TARGET_ALL and MK_CLANG.

If LLVM_TARGET_ALL is disabled, during a cross-build, then SYSTEM_COMPILER
and SYSTEM_LINKER are auto disabled.

This option should be used by users rather than the per-arch LLVM_TARGET
options as it is simpler to maintain for them should the supported
target list change.

MFC after:	2 weeks
Reviewed by:	sbruno, dim
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D16020
2018-06-27 16:57:51 +00:00
Bryan Drewery
100fafebbf Use dependent options to auto enable _SUPPORT and CLANG_FULL options.
MFC after:	1 week
Reviewed by:	sbruno, dim
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D16018
2018-06-27 16:57:47 +00:00
Bryan Drewery
f272627fcd Rework check for libclang_rt to see if the needed library exists.
Currently libclang_rt is not provided for cross-building and as such
is not connected to cross-tools.  For building clang once in universe
it is likely that libclang_rt won't exist for the universe toolchain
but even if it did it would not support anything but the native arch.
So explicitly check for support before enabling h_raw.

MFC after:	1 week
Reviewed by:	dim
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D16012
2018-06-27 16:56:46 +00:00
Alan Somers
5641c23fa7 audit(4): fix Coverity issues
Fix several incorrect buffer size arguments and a file descriptor leak.

Submitted by:	aniketp
Reported by:	Coverity
CID:		1393489 1393501 1393509 1393510 1393514 1393515 1393516
CID:		1393517 1393518 1393519
MFC after:	2 weeks
X-MFC-With:	335284
X-MFC-With:	335318
X-MFC-With:	335320
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D16000
2018-06-27 15:28:09 +00:00
Ed Maste
e8a1ec3e05 Split kern_break from sys_break and use it in linuxulator
Previously the linuxulator's linux_brk invoked the FreeBSD sys_break
syscall implementation directly.  Instead, move the bulk of the existing
implementation to kern_break, and call that from both sys_break and
linux_brk.

This also addresses a minor bug in linux_brk in that we now return the
actual (rounded up) break address, rather than the requested value.

Reviewed by:	brooks (earlier version)
Sponsored by:	Turing Robotic Industries
Differential Revision:	https://reviews.freebsd.org/D16019
2018-06-27 14:45:13 +00:00
Navdeep Parhar
d207040226 cxgbe/cxgbei: Fix harmful typo in the iSCSI offload driver.
Reported by:	gcc8 (via mmacy@)
MFC after:	3 days
Sponsored by:	Chelsio Communications
2018-06-27 14:29:13 +00:00
Hans Petter Selasky
b774480cd6 Improve the kernel's USB descriptor reading function.
Some USB devices does not allow a partial descriptor readout.

Found by:	bz@
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2018-06-27 12:08:12 +00:00
Xin LI
48f3bd63b9 Revert Makefile@335696 that sneaked into the commit.
X-MFC with:	335696
MFC after:	2 weeks
2018-06-27 06:50:24 +00:00
Xin LI
6f0f107256 Detect exFAT filesystems and abort if found and tighten BPB sanity
check.

Obtained from:	Android https://android-review.googlesource.com/61827
MFC after:	2 weeks
2018-06-27 06:49:20 +00:00
Warner Losh
bc6cb3f6b4 Remove devctl_safe_quote since it's now unused.
Sponsored by: Netflix
Differential Review: https://reviews.freebsd.org/D16026
2018-06-27 04:11:19 +00:00
Warner Losh
d21a52ae1b pccard: recode to use devctl_safe_quote_sb instead of devctl_safe_quote.
Sponsored by: Netflix
Differential Review: https://reviews.freebsd.org/D16026
2018-06-27 04:11:14 +00:00
Warner Losh
349fcda430 Fix devctl generation for core files.
We have a problem with vn_fullpath_global when the file exists. Work
around it by printing the full path if the core file name starts with /,
or current working directory followed by the filename if not.

Sponsored by: Netflix
Differential Review: https://reviews.freebsd.org/D16026
2018-06-27 04:11:09 +00:00
Warner Losh
ab531b8825 Create new devctl_safe_quote_sb to copy a source string into a struct
sbuf to make it safe. Callers are expected to add the " " around it,
if needed.

Sponsored by: Netflix
Differential Review: https://reviews.freebsd.org/D16026
2018-06-27 04:10:48 +00:00
Martin Wilke
ff6197771a - Added myself to committers-src.dot
Approved by:	araujo (mentor)
Differential Revision:	https://reviews.freebsd.org/D16030
2018-06-27 03:50:11 +00:00
Daichi GOTO
612e0030b6 top(1): increased the maximum length of command shown by "-a"
Reviewed by:	eadler
Approved by:	gnn (mentor)
Differential Revision:	https://reviews.freebsd.org/D16006
2018-06-27 02:55:30 +00:00
Navdeep Parhar
af8854fdc1 cxgbe(4): Do not leak the filters in the hashfilter table on module
unload.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-06-27 01:51:17 +00:00
Eitan Adler
48c7315619 powerd: correct ifdef check for ppc
Reviewed by:	jhibbits
2018-06-27 01:28:09 +00:00
Stephen J. Kiernan
e18e638423 Partial revert of r335399 and r335400:
Unhook the MAC/veriexec, fingerprint handlers, and veriexec modules from
the kernel modules Makefile.

Reviewed by:	sjg
2018-06-26 23:28:03 +00:00
Stephen J. Kiernan
a2b8acf563 Revert r335402
While useful as an example, veriexecctl, as it is, has very little practical
use, since there is nothing ensuring the integrity of the manifest of hashes.
A more appropriate set of utilities will replace it.
2018-06-26 23:19:55 +00:00
Navdeep Parhar
2293e22112 cxgbetool(8): Reject invalid VLAN values.
Submitted by:	Krishnamraju Eraparaju @ Chelsio
MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-06-26 21:56:06 +00:00
Alan Somers
c907f24ead audit(4): add tests for the process-control audit class
Tested syscalls include rfork(2), chdir(2), fchdir(2), chroot(2),
getresuid(2), getresgid(2), setpriority(2), setgroups(2), setpgrp(2),
setrlimit(2), setlogin(2), mlock(2), munlock(2), minherit(2), rtprio(2),
profil(2), ktrace(2), ptrace(2), fork(2), umask(2), setuid(2), setgid(2),
seteuid(2), and setegid(2).  The last six are only tested in the success
case, either because they're infalliable or a failure is difficult to cause
on-demand.

Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15966
2018-06-26 20:26:57 +00:00
Mariusz Zaborski
00e9473388 [libcasper] Use explicit_bzero instead of memset to clear pwd struct
Submitted by:	David Carlier <devnexen@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D16015
2018-06-26 19:57:47 +00:00
Alan Somers
3d3d017834 audit(4): add tests for pipe, posix_openpt, shm_open, and shm_unlink
Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15963
2018-06-26 19:26:07 +00:00
Ed Maste
408ab1bd65 Correct linprocfs/linsysfs arch check in r335672
Pointy hat to:	emaste
2018-06-26 19:13:49 +00:00
Oleksandr Tymoshenko
964219664d Fix file(1) dumpdate reporting for dump(8) files
Magic file for dump(8) had this dump and previous dump dates reversed.
Fix order for all three flavours of the dump(8) format.
This fix was committed to upstream repo as magic/Magdir/dump,v 1.17
and will be merged during next vendor import.

PR:		223155
MFC after:	2 weeks
2018-06-26 18:53:52 +00:00
Alan Cox
89ea39a727 Update the physical page selection strategy used by vm_page_import() so
that it does not cause rapid fragmentation of the free physical memory.

Reviewed by:	jeff, markj (an earlier version)
Differential Revision:	https://reviews.freebsd.org/D15976
2018-06-26 18:29:56 +00:00
Ben Woods
217df2da08 geli attach multiple providers
Allow attaching of multiple geli providers at once if they use same
passphrase and keyfiles.

This is helpful when the providers being attached are not used for boot,
and therefore the existing code to first try the cached password when
tasting the providers during boot does not apply.

Multiple providers with the same passphrase and keyfiles can be attached
at the same time during system start-up by adding the following to
rc.conf:
  geli_groups="storage backup"
  geli_storage_flags="-k /etc/geli/storage.keys"
  geli_storage_devices="ada0 ada1"
  geli_backup_flags="-j /etc/geli/backup.passfile -k /etc/geli/backup.keys"
  geli_backup_devices="ada2 ada3"

Reviewed by:	wblock, delphij, jilles
Approved by:	sobomax (src), bcr (doc)
Differential Revision:	https://reviews.freebsd.org/D12644
2018-06-26 18:07:16 +00:00
Ed Maste
96fa53869c Build linprocfs and linsysfs also on arm64
Sponsored by:	Turing Robotic Industries
2018-06-26 16:50:41 +00:00
Conrad Meyer
5c0ce48153 atomic.9: Add missing MLINK for testandclear, thread_fence routines
Missed in r299912, r326982.

X-MFC-With:	r299912, r326982
Sponsored by:	Dell EMC Isilon
2018-06-26 16:20:19 +00:00
Hans Petter Selasky
dfd30b26a9 Improve the userspace USB string reading function in LibUSB.
Some USB devices does not allow a partial descriptor readout.

Found by:		bz @
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2018-06-26 16:00:16 +00:00
Roger Pau Monné
8518997526 xen: obtain vCPU ID from CPUID
The Xen vCPU ID can be fetched from the cpuid instead of inferring it
from the ACPI ID.

Sponsored by: Citrix Systems R&D
2018-06-26 15:00:54 +00:00
Roger Pau Monné
1ad78dd631 xen: limit the number of hypercall pages to 1
The interface already guarantees that the number of hypercall pages is
always going to be 1, see the comment in interface/arch-x86/cpuid.h

Sponsored by: Citrix Systems R&D
2018-06-26 14:39:27 +00:00
Glen Barber
197b832fbc Use the 'Updating from Source' Handbook section in UPDATING.
PR:		229345 (related)
Sponsored by:	The FreeBSD Foundation
2018-06-26 14:30:33 +00:00
Roger Pau Monné
d9b664fd45 xen-netback: fix LOR
lock order reversal: (sleepable after non-sleepable)
 1st 0xfffffe00357ff538 xnb_softc (xen netback softc lock) @ /usr/src/sys/dev/xen/netback/netback.c:1069
 2nd 0xffffffff81fdccb0 intrsrc (intrsrc) @ /usr/src/sys/x86/x86/intr_machdep.c:224

There's no need to hold the lock since the cleaning of the interrupt
cannot happen in parallel due to the XNBF_IN_SHUTDOWN flag being set.
Note that the locking in netback needs some improvement or
clarification.

While there also remove a double newline.

Sponsored by:   Citrix Systems R&D
2018-06-26 14:07:11 +00:00
Mark Johnston
76e944b7a5 Add missing MLINK.
MFC after:	3 days
2018-06-26 09:30:14 +00:00
Xin LI
f7a300540f Fix division by zero when reading boot block by postponing division
until it is necessary and after we validated bytes per sector is non-
zero.

Obtained from:	Android https://android-review.googlesource.com/c/platform/external/fsck_msdos/+/36362
MFC after:	2 weeks
2018-06-26 06:18:59 +00:00
Kyle Evans
67fc3f5608 config(8): part of patch disappeared, don't close ifp at the end 2018-06-26 04:06:49 +00:00
Kyle Evans
6ffdd5ef2f config(8): Flip the order of concatenation for hints and env
As previously noted, kernel's processing of these means that the first
appearance of a hint/variable wins. Flipping the order of concatenation
means that later variables override earlier variables, as expected when one
does:

hints x
hints y

Where perhaps x is:

hint.aw_sid.0.disable=1

and y is:

hint.aw_sid.0.disable=0

The expectation would be that a later appearing variable would override an
earlier appearing variable, such as with `device`/`nodevice`, device.hints,
and other similarly structured data files.
2018-06-26 04:02:25 +00:00
Kyle Evans
4edfa9085a config(8): Make 'env' files consistent with other file-accepting options
Previously, only one 'env' file could be specified. Later 'env' directives
would overwrite earlier 'env' directives. This is inconsistent with every
other file-accepting directives which process files in order, including
hints.

A caveat applies to both hints and env that isn't mentioned: they're
concatenated in the order of appearance, so they're not actually applied in
the way one might think by supplying:

hints x
hints y

Hints in x will take precedence over same-name hints in y due to how
the kernel processes them, stopping at the first line that matches the hint
we're searching for. Future work will flip the order of concatenation so
that later files may still properly override earlier files.

In practice, this likely doesn't matter at all due to the nature of the
beast.
2018-06-26 03:56:10 +00:00
Kyle Evans
1aae236569 config(8): Set envmode if we accept an envvar
X-MFC-With:	r335642
2018-06-26 02:05:45 +00:00