Commit Graph

228448 Commits

Author SHA1 Message Date
Eitan Adler
9ae26a5cb9 arc lint: Explain linting explain
shell scripts in scripts don't need
to be chmod +x to work. In fact most are not.
Of the tests I found from a simple search:
65 are chmod +x
84 are chmod -x

simply disable the check for test shell scripts.
2017-12-09 08:21:29 +00:00
Warner Losh
a2aa66719e Indent multiple device path entries correctly.
Sponsored by: Netflix
2017-12-09 07:44:00 +00:00
Warner Losh
1127aea3e7 Remove vestiges of -d and -p commands.
Fix two core dumps when optional data isn't specified.

Sponsored by: Netflix
2017-12-09 07:43:55 +00:00
Warner Losh
a3e6c4a6fc Forgotten in 326725
Release Notes: Yes
2017-12-09 06:57:19 +00:00
Warner Losh
1285bcc833 Import Netflix's efibootmgr to help manage UEFI boot variables
efibootmgr manages the UEFI BootXXXX variables that implement the UEFI
Boot Manager protocol defined in the UEFI standards. It is modeled
after the Linux program of the same name with a mostly compatible set
of command line options. Since there's a fair amount of OS specifioc
code due to differeing names and methods of doing things, the
compatibility isn't 100%.

Basic functionality is implemented, though the more advanced next boot
functionality that's been defined elsewhere is unimplemented.

Submitted by: Matt Williams (with unix / efi path xlate by me)
Sponsored by: Netflix
2017-12-09 06:52:20 +00:00
Warner Losh
3a89a7558c Add two dates derived from looking at archival source tarballs in the
TUHS collection for 7th Edition and V32.
2017-12-09 05:05:25 +00:00
Warner Losh
29374678a6 This path belongs in ficl/Makefile, not the common defines for users
of ficl.

Sponsored by: Netflix
2017-12-08 22:19:41 +00:00
Ed Schouten
6c093deeda Remove basename_r(3).
Now that the POSIX working group is going to require that basename(3)
and dirname(3) are thread-safe in future revisions of the standard,
there is even less of a need to provide basename_r(3). Remove this
function to prevent people from writing code that only builds on
FreeBSD and Bionic.

Removing this function seems to break exactly one port: sbruno@'s
qemu-user-static. I will send him a pull request on GitHub in a bit.
__FreeBSD_version will not be bumped, as any value from 2017 can be used
to test for the presence of a thread-safe basename(3)/dirname(3).

PR:		https://bugs.freebsd.org/224016
2017-12-08 22:06:18 +00:00
Warner Losh
cbde6ac324 Don't automatically create objdir here. We're just after the
TMPPATH. We'll make the paths later.

Sponsored by: Netflix
2017-12-08 21:59:50 +00:00
Warner Losh
7052e3fb73 Remove local here. It was a cut and paste error.
Sponsored by: Netflix
2017-12-08 21:59:42 +00:00
Hans Petter Selasky
656371d7c1 Correctly define the unordered_map namespace in ofed/libibnetdisc .
This should fix ofed/libibnetdisc compilation with C-compilers
different from clang and GCC v4.2.1.

Submitted by:	kib
Sponsored by:	Mellanox Technologies
2017-12-08 21:01:09 +00:00
Warner Losh
f0408ed054 boot1.c needs EFI_ZFS_BOOT too, so add it globally. Otherwise we'll
not be able to actually read ZFS partitions.

Submitted by: kevans@
2017-12-08 19:57:26 +00:00
Warner Losh
ac20456c39 Build WITHOUT_FORTH too, at least for amd64 and i386
Sponsored by: Netflix
2017-12-08 19:57:21 +00:00
Warner Losh
fb5af39a82 Create interp class.
Create an interp class. Use it to separate out the different types of
interpreters: forth and simple with function pointers rather than
via #ifdefs.

Obtained from: lua boot loader project
    (via https://bsdimp@github.com/bsdimp/freebsd.git lua-bootloader)
Sponsored by: Netflix
2017-12-08 19:57:16 +00:00
Warner Losh
bd04a914bc Const poison a couple of interfaces.
Obtained from: lua boot project
Sponsored by: Netflix
2017-12-08 19:57:11 +00:00
Warner Losh
c5095910a0 Put the files we're copying over into a few variables and add them to
CLEANDIRS and CLEANFILES so make clean removes any divots.

Sponsored by: Netflix
2017-12-08 19:57:06 +00:00
Warner Losh
6856cf6893 Provide implementations for iscntrl, ispunct and isgraph.
Sponsored by: Netflix
2017-12-08 19:57:02 +00:00
Warner Losh
c008ab0879 Remove _KERNEL hack now that errno.h does the right thing when
_STANDALONE is defined.

Sponsored By: Netflix
2017-12-08 19:56:57 +00:00
Warner Losh
49cb01302c Add partial support signal.h functioanlity. Pull in machine/signal.h
to define sig_atomic_t.

Sponsored by: Netflix
2017-12-08 19:56:35 +00:00
Stephen Hurd
04993890dc Free mbuf chain when m_dup fails
Fix memory leak where mbuf chain wasn't free()d if iflib_ether_pad()
has a failure in m_dup().

Reported by:	"Ryan Stone" <rysto32@gmail.com>
Sponsored by:	Limelight Networks
2017-12-08 19:50:06 +00:00
Mark Johnston
97cb52fa9a Actually add the -x setenv test Makefile, missed in r326499.
X-MFC with:	r326499
2017-12-08 19:26:25 +00:00
Stephen Hurd
a15fbbb8fe Handle read-only mbufs in iflib ether pad function
If ethernet padding is enabled, and a read-only mbuf is passed,
it would modify the mbuf using m_append(). Instead, call m_dup() and
append to the new packet.

Reported by:	Pyun YongHyeon
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D13414
2017-12-08 18:43:31 +00:00
Pedro F. Giffuni
824ce2def5 SPDX: more ISC-related files. 2017-12-08 17:52:53 +00:00
Alan Somers
90de1ffbdb at(1): annotate some intended switch-case fallthroughs
Reported by:	Coverity
CID:		1008191
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2017-12-08 17:15:20 +00:00
Pedro F. Giffuni
6e778a7efd SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
Andrew Turner
fb006e46e7 Set the io width when using an ACPI uart. Previously it would only ever be
set when finding the uart from the device tree.

Sponsored by:	DARPA, AFRL
2017-12-08 10:05:23 +00:00
Justin Hibbits
94a9d7c3b9 Remove PTE VA mappings for tracked pages in 64-bit mode
This was done in 32-bit mode, but not duplicated when 64-bit mode was
brought in.  Without this, stale mappings can be left, leading to odd
crashes when the wrong VA is checked in XX_PhysToVirt() (dpaa(4)).
2017-12-08 03:49:53 +00:00
Nathan Whitehorn
52f39da1f8 Support mounted boot partitions in the installer. This allows the platform
layer, for example, to specify that the EFI boot partition should be
mounted at /efi and formatted normally with newfs_msdos rather than
splatted to from /boot/boot1.efifat.

This commit adds only the API for this; actual platform use will come later.
2017-12-08 00:57:13 +00:00
Gleb Smirnoff
66492fea49 Separate out send buffer autoscaling code into function, so that
alternative TCP stacks may reuse it instead of pasting.

Obtained from:	Netflix
2017-12-07 22:36:58 +00:00
Michael Tuexen
9f0abda051 Retire SCTP_WITH_NO_CSUM option.
This option was used in the early days to allow performance measurements
extrapolating the use of SCTP checksum offloading. Since this feature
is now available, get rid of this option.
This also un-breaks the LINT kernel. Thanks to markj@ for making me
aware of the problem.
2017-12-07 22:19:08 +00:00
Mark Johnston
2dbeaed483 Avoid setting -Wno-tentative-definition-incomplete-type with gcc.
No version of gcc that I've tried accepts this flag.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D13415
2017-12-07 22:11:23 +00:00
Dimitry Andric
95708dbcae Remove an unused incude from lib/msun/bsdsrc/b_log.c.
Submitted by:	Steve Kargl
MFC after:	3 days
2017-12-07 20:41:23 +00:00
Dimitry Andric
dfd6ede5f9 Remove the sentence in math(3) about some long double math functions not
being available.

Submitted by:	Steve Kargl
MFC after:	3 days
2017-12-07 20:38:37 +00:00
Eugene Grosbein
1b8ea9beff geom_raid (RAID5): do not lose bp->bio_error, keep it in pbp->bio_error
and return it by passing to g_raid_iodone()

Approved by:	mav (mentor)
MFC after:	3 days
2017-12-07 20:09:17 +00:00
Glen Barber
496a68519f Fix the reldoc target in release/Makefile following doc commit r51264.
Sponsored by:	The FreeBSD Foundation
2017-12-07 20:00:19 +00:00
Conrad Meyer
556127b650 mlx4: Remove redundant declarations to fix GCC build
These were made redundant in r325841.

Reviewed by:	hselasky
MFC after:	1 week (hselasky will MFC)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D13401
2017-12-07 19:57:51 +00:00
Bjoern A. Zeeb
78e3e2a455 Use correct field in the description for the lock after r319722.
Reviewed by:	glebius
Sponsored by:	iXsystems, Inc.
2017-12-07 19:40:46 +00:00
Mark Johnston
952a29c04b Fix the UMA reclaim worker after r326347.
atomic_set_*() sets a bit in the target memory location, so
atomic_set_int(&uma_reclaim_needed, 0) does not do what it looks like
it does.

PR:		224080
Reviewed by:	jeff, kib
Differential Revision:	https://reviews.freebsd.org/D13412
2017-12-07 19:38:09 +00:00
Jung-uk Kim
c4ad4dffb3 Merge OpenSSL 1.0.2n. 2017-12-07 18:02:57 +00:00
Jung-uk Kim
4f94f84d84 Import OpenSSL 1.0.2n. 2017-12-07 17:37:15 +00:00
Bryan Drewery
8f2246242e Look for libraries in OBJDIR when building outside of buildworld.
This allows build testing more easily without establishing a sysroot
or installing the files.

Sponsored by:	Dell EMC
2017-12-07 16:37:19 +00:00
Mark Johnston
3e4f07fc77 Ensure that "out" is initialized in all error paths.
Reported by:	gcc
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D13402
2017-12-07 15:16:17 +00:00
Konstantin Belousov
b6721e4a5c Fix livelock in ufsdirhash_create().
When more than one thread enters ufsdirhash_create() for the same
directory and the inode dirhash is instantiated, but the dirhash' hash
is not, all of them lock the dirhash shared and then try to upgrade.
Since there are several threads owning the lock shared, upgrade fails
and the same attempt is repeated, ad infinitum.

To break the lockstep, lock the dirhash in exclusive mode after the
failed try-upgrade.

Reported and tested by:	pho
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2017-12-07 09:05:34 +00:00
Bruce Evans
fb3cc1c37d Move instantiation of msgbufp from 9 MD files to subr_prf.c.
This variable should be pure MI except possibly for reading it in MD
dump routines.  Its initialization was pure MD in 4.4BSD, but FreeBSD
changed this in r36441 in 1998.  There were many imperfections in
r36441.  This commit fixes only a small one, to simplify fixing the
others 1 arch at a time.  (r47678 added support for
special/early/multiple message buffer initialization which I want in
a more general form, but this was too fragile to use because hacking
on the msgbufp global corrupted it, and was only used for 5 hours in
-current...)
2017-12-07 07:55:38 +00:00
Eugene Grosbein
01a51aba38 Fix use-after-free that sometimes results in a garbage returned
instead of right error code after requests to SINGLE/CONCAT volumes, f.e:

# dd if=/dev/raid/r0 bs=512 of=/dev/null
dd: /dev/raid/r0: Unknown error: -559038242

Reviewed by:	avg (mentor), mav (mentor)
MFC after:	3 days
2017-12-07 05:55:18 +00:00
Bryan Venteicher
f53d97231b Use consistent name for the vxlan VNI parameter name and provide shorthand
Submitted by:	hrs
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D2868
2017-12-07 04:55:31 +00:00
Alan Somers
0d119bab38 dc(1): fix modulo operations with fractional inputs
Our dc(1) has never correctly calculated remainders with fractional inputs.
Both bmod and bdivmod seem to have copy/pasted code from bdiv, which results
in the remainder having the wrong output scale.

PR:		162495
Reported by:	anonymous
Reviewed by:	pfg
Differential Revision:	https://reviews.freebsd.org/D13390
2017-12-07 02:08:55 +00:00
Benjamin Kaduk
f3aff7c91b Fix mandoc -Tlint warnings in bin/
Many style-level issues are still reported.

Submitted by:	Yuri Pankov <yuripv@gmx.com>
Reviewed by:	jilles (previous revision)
Differential Revision:	https://reviews.freebsd.org/D13334
2017-12-07 01:57:27 +00:00
Benjamin Kaduk
9e6e05e43f Note that old sys/event.h required manual sys/types.h inclusion
ed fixed this in r313704 but older versions are still affected.
2017-12-07 01:50:17 +00:00
Bryan Drewery
50a93bedbd Disconnect OFED after r326169 broke all DIRDEPS support for it. 2017-12-07 01:49:35 +00:00