Commit Graph

235015 Commits

Author SHA1 Message Date
Eitan Adler
514e2dbfa6 devd: use static where possible 2018-07-29 08:43:05 +00:00
Eitan Adler
ec9eb99714 truncate: delintify 2018-07-29 07:51:42 +00:00
Eitan Adler
c517ae76c1 truncate: use better type for 'round' 2018-07-29 07:51:40 +00:00
Don Lewis
c13b53f6fb Fix a variable name typo in r336845 that prevented the rc.d scripts
from being installed in the correct directory.

Resurrect a few rc.d scripts that were prematurely deleted from the
Makefile by r336845.

Reviewed by:	brd
2018-07-29 05:42:07 +00:00
Brad Davis
d2b68ebeaf Fix a typo that prevented some rc scripts from being installed.
Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16495
2018-07-29 03:20:05 +00:00
Will Andrews
16702050ac beinstall: perform pre-installworld steps.
Since all post-installkernel steps are assumed to operate in the updated
installation, it's necessary to chroot all of the followup steps in the new
boot environment.  Set up and mount the source and object directories at the
same paths inside the BE root, and clean up to the extent changes were made.
This commit fixes upgrading using beinstall past the new ntpd user change.

Improve testability of changes to this script while I'm here.

Reported by:	rpokala (earlier patch)
2018-07-29 01:44:26 +00:00
Don Lewis
290d906084 Fix the long term ULE load balancer so that it actually works. The
initial call to sched_balance() during startup is meant to initialize
balance_ticks, but does not actually do that since smp_started is
still zero at that time.  Since balance_ticks does not get set,
there are no further calls to sched_balance().  Fix this by setting
balance_ticks in sched_initticks() since we know the value of
balance_interval at that time, and eliminate the useless startup
call to sched_balance().  We don't need to randomize the intial
value of balance_ticks.

Since there is now only one call to sched_balance(), we can hoist
the tests at the top of this function out to the caller and avoid
the overhead of the function call when running a SMP kernel on UP
hardware.

PR:		223914
Reviewed by:	kib
MFC after:	2 weeks
2018-07-29 00:30:06 +00:00
Martin Matuska
f1951fd745 MFV r336851:
Update vendor/libarchive/dist to git 2c8c83b9731ff822fad6cc8c670ea5519c366a14

Important vendor changes:
  PR #993: Chdir to -C directory for metalog processing
  OSS-Fuzz #4969: Check size of the extended time field in zip archives
  PR #973: Record informational compression level in gzip header

MFC after:	1 week
2018-07-29 00:12:16 +00:00
Conrad Meyer
522867c218 wpa_supplicant.8: Remove removed option
Our base version of wpa_supplicant does not support the -u option, so remove
it.

PR:		230102
Submitted by:	D Green <dfrg AT xsmail.com>
2018-07-28 23:59:36 +00:00
Conrad Meyer
337bd62722 exec.3: Add BUGS section and document non-FreeBSD portability
Requested by:	kib (in part)
2018-07-28 23:55:18 +00:00
Martin Matuska
0b7a6fc00b Update vendor/libarchive/dist to git 2c8c83b9731ff822fad6cc8c670ea5519c366a14
Important vendor changes:
  PR #993: Chdir to -C directory for metalog processing
  OSS-Fuzz #4969: Check size of the extended time field in zip archives
  PR #973: Record informational compression level in gzip header
2018-07-28 23:47:22 +00:00
Brad Davis
4f1521406b Move nscd.conf from etc/ to usr.sbin/nscd/
Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16490
2018-07-28 23:29:36 +00:00
Brad Davis
76ec4952ff Switch these to CONFS as well so they work with etcupdate/mergemaster.
Approved by:	will (mentor)
2018-07-28 23:02:10 +00:00
Emmanuel Vadot
4b99ca8e4c release: arm: Add a GENERIC sdcard image
This produce a generic sdcard image using armv7 GENERIC kernel that
just need some u-boot (or none if the board have u-boot or a SPI flash
for example).

Reviewed by:	imp, gjb
Differential Revision:	https://reviews.freebsd.org/D16410
2018-07-28 20:45:36 +00:00
Brad Davis
df89e31712 Opps, I missed moving a couple of files in r336845.
Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16466
2018-07-28 20:41:33 +00:00
Brad Davis
1135e97b7c Move rc startup scripts from etc/ to sbin/init/
This keeps most startup scripts as CONFS per discussion on src-committers from
back during BSDCan.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16466
2018-07-28 20:36:23 +00:00
Emmanuel Vadot
c59a544e09 UPDATING: Add note about efifb support and serial output 2018-07-28 20:33:08 +00:00
Brad Davis
d26b89d9b6 Whitespace only change, no functional change intended.
The padding makes it much easier to read, but occasionally means that commits
like this one have to be done to follow up.  I intentionally kept this
separate from r336841 to try and make things easier to follow later on.

Approved by:	bapt (mentor)
2018-07-28 20:31:03 +00:00
Brad Davis
c696b89541 Fix `make distribute' installing some configs which means CONFS was broken
with etcupdate and mergemaster.

Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D16478
2018-07-28 20:26:25 +00:00
Brad Davis
a0a1ffcb16 Move etc/shells to lib/libc/gen with getusershell(3).
Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16467
2018-07-28 20:21:23 +00:00
Rick Macklem
a3e709cd33 Modify the NFSv4.1 server so that it allows ReclaimComplete as done by ESXi 6.7.
I believe that a ReclaimComplete with rca_one_fs == TRUE is only
to be used after a file system has been transferred to a different
file server.  However, RFC5661 is somewhat vague w.r.t. this and
the ESXi 6.7 client does both a ReclaimComplete with rca_one_fs == TRUE
and one with ReclaimComplete with rca_one_fs == FALSE.
Therefore, just ignore the rca_one_fs == TRUE operation and return
NFS_OK without doing anything instead of replying NFS4ERR_NOTSUPP.
This allows the ESXi 6.7 NFSv4.1 client to do a mount.
After discussion on the NFSv4 IETF working group mailing list, doing this
along with setting a flag to note that a ReclaimComplete with rca_one_fs TRUE
was an appropriate way to handle this.
The flag that indicates that a ReclaimComplete with rca_one_fs == TRUE was
done may be used to disable replies of NFS4ERR_GRACE for non-reclaim
state operations in a future commit.

This patch along with r332790, r334492 and r336357 allow ESXi 6.7 NFSv4.1 mounts
work ok. ESX 6.5 NFSv4.1 mounts do not work well, due to what I believe are
violations of RFC-5661 and should not be used.

Reported by:	andreas.nagy@frequentis.com
Tested by:	andreas.nagy@frequentis.com, daniel@ftml.net (earlier version)
MFC after:	2 weeks
Relnotes:	yes
2018-07-28 20:21:04 +00:00
Alan Somers
80d3469a3f Disable -Wcast-align in libbsm and libauditd
Along with some pending upstream changes, this will allow raising the WARNS
level.

Reviewed by:	cem, aniketp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D16486
2018-07-28 20:04:39 +00:00
Warner Losh
e78f6dd79f Be more conservative about setting hw.uart.console
Note when we've found a 8250 PNP node. Only try to set hw.uart.console
if we see one (otherwise ignore serial hints). The 8250 is the only
one known to have I/O ports, so limit the guessing to when we've
positively seen one.  And limit this to x86 since that's the only
platform where we have I/O ports. Otherwise, we'd set the serial port
to something crazy for the platform and fall off the cliff early in
boot.

Differential Revision:  https://reviews.freebsd.org/D16463
2018-07-28 19:44:20 +00:00
Conrad Meyer
858178a142 Remove insecure ciphers from GCE sshd configuration
They were added for unclear reasons in r277263.  The current OpenSSH
defaults (7.5+) are reasonable, and do not include the insecure rc4 cipher:

                   chacha20-poly1305@openssh.com,
                   aes128-ctr,aes192-ctr,aes256-ctr,
                   aes128-gcm@openssh.com,aes256-gcm@openssh.com,
                   aes128-cbc,aes192-cbc,aes256-cbc

I think I recall there being a reason for a specific list of ciphers on GCE
at the time, but I do not recall what it was, and cannot find any
current GCE documentation of such a list.

So, just revert the explicit configuration and use sane openssh defaults.

PR:		230092
Submitted by:	Gustavo Scalet <gustavo.scalet AT collabora.com>
MFC after:	3 days
Security:	yes
2018-07-28 19:35:49 +00:00
Conrad Meyer
bbc5c8ee32 Clean up execl*(3) manual page prototype formatting
Rendering of execle was missing a comma between the NULL argument and envp.

For unclear reasons, POSIX' definition of these routines comments out the
mandatory trailing NULL argument.  That seems unnecessary and probably
(reasonably) confuses mdoc.

For unclear reasons, POSIX' definition of these routines spells NULL as
"(char *)0."  This is needlessly unclear.  One guess might be that POSIX
targets more exotic computer architectures than FreeBSD does.  Fortunately,
there is no such problem on any reasonable platform for FreeBSD to support.
Spell NULL as NULL.

The comma was probably removed in r117204 while the comment and creative
spelling of NULL were added in r116537 (both 15 years ago).
2018-07-28 19:08:00 +00:00
Andrew Turner
cb5ce014d4 Use the cp15 functions to read cp15 registers rather than using assembly
functions. The former are static inline functions so will compile to a
single instruction.
2018-07-28 17:21:34 +00:00
Andrew Turner
59c9a22424 Remove an unneeded cpu_ident() prototype. 2018-07-28 16:56:46 +00:00
Marius Strobl
c98027b2bc Implement atomic_swap_{32,64,int,long,ptr}(9). 2018-07-28 15:42:57 +00:00
Andrew Turner
a0e00905f0 Remove some write only global values from the arm cpufunc code. 2018-07-28 12:53:10 +00:00
Andrew Turner
836108c21e Remove an unused function from the arm ELF trampoline. It tries to find
properties about the CPU caches, however we never use these values.
2018-07-28 12:52:03 +00:00
Andrew Turner
5b50a73ffb Only build the cache handling code we need when building the arm ELF
trampoline.
2018-07-28 12:50:09 +00:00
Andrew Turner
90e9f8828e Make the arm cpu setup functions static. Any other place that needs these
functions will use the function pointer we create for them.
2018-07-28 12:20:42 +00:00
Andrew Turner
f3157bf07d Remove an unneeded check for CPU_XSCALE_81342 2018-07-28 12:16:57 +00:00
Andrew Turner
0faf121391 Remove old CPU_ values from the arm cpufunc code. These have been removed. 2018-07-28 12:00:32 +00:00
Andrew Turner
96690e0dc4 Remove the old CPU_ values from the arm kernel trampoline. These options
are gone so we can remove them from the code.
2018-07-28 11:58:43 +00:00
Andrew Turner
e57edd3580 Remove now the cow unused CPU_ARM9 and CPU_FA526 options. These are for
ARMv4 CPUs that are no longer supported.
2018-07-28 11:00:45 +00:00
Andrew Turner
560a8e6ccc The RT1310 is an ARM926EJ-S, fix the config to mark it as such. 2018-07-28 10:48:41 +00:00
Andrew Turner
15bff09749 Only support INTRNG in the SMP code on arm. We already require INTRNG on
anything that could be multicore on arm.
2018-07-28 07:54:21 +00:00
Andrew Turner
e4c66ddabd Remove IPI_IRQ_START and IPI_IRQ_END from the arm kernel config files.
These are unneeded with INTRNG.
2018-07-28 06:46:10 +00:00
Alan Cox
737e25f7eb To date, mlockall(MCL_FUTURE) has had the unfortunate side effect of
blocking vm map entry and object coalescing for the calling process.
However, there is no reason that mlockall(MCL_FUTURE) should block
such coalescing.  This change enables it.

Reviewed by:	kib, markj
Tested by:	pho
MFC after:	6 weeks
Differential Revision:	https://reviews.freebsd.org/D16413
2018-07-28 04:06:33 +00:00
David Bright
4faa0dc193 Fix compilation error on some arches after r336761 & r336781.
Another cast for printing an intmax_t was needed in a kqueue test for
some arches.

Pointy-hat:	me (twice)
MFC after:	1 week
X-MFC-with:	r336761, r336781
Sponsored by:	Dell EMC
2018-07-28 02:53:36 +00:00
Conrad Meyer
2f4a276414 MFV r336800: libarchive: Cherry-pick upstream 2c8c83b9
Relevant vendor changes:
  Fix issue #948: out-of-bounds read in lha_read_data_none()

admbugs:	877
MFC after:	3 days
Security:	CVE-2017-14503
2018-07-28 00:59:59 +00:00
Conrad Meyer
032a8914c1 libarchive: Cherry-pick upstream 2c8c83b9
Relevant vendor changes:
  Fix issue #948: out-of-bounds read in lha_read_data_none()

admbugs:	877
Security:	CVE-2017-14503
2018-07-28 00:55:57 +00:00
Eitan Adler
fc3bfe916e tools/build/beinstall.sh: Use some slightly better shell syntax; reduce duplication
This is is a first pass at improving the be installer.

Reviewed By: will
Differential Revision: https://reviews.freebsd.org/D16081
2018-07-28 00:33:40 +00:00
Rick Macklem
076e3c1072 Update nfsd.8 for support of IPv6 addresses for hosts in the "-p" option.
r336795 adds support for handling of IPv6 addresses returned by getaddrinfo(3)
for DS hostnames. This updates the man page for this change.

This is a content change.
2018-07-27 23:38:31 +00:00
Warner Losh
6db50e1df0 Remove npe.4. It was removed as part of the xscale removal. 2018-07-27 23:28:35 +00:00
Rick Macklem
35f38de3c9 Add support for IPv6 addresses to the pNFS "-p" option.
This patch adds code to handle IPv6 addresses returned by getaddrinfo()
for the host entries in the "-p" command line argument.
If the IPv6 address is a link local address, only use it if it is the
only address for the host. This is done since there is no way to know
if the NFSv4.1 pNFS client is in the same scope zone as the MDS.
inet_ntop() is used for the IPv6 address translation, since the client
will have no use for the scope zone suffix and inet_ntop() does not
put this in the address string.

Discussed with:	bu7cher@yandex.ru
2018-07-27 23:10:28 +00:00
Brad Davis
29c3c889cb Avoid a install(1) crash by not using -C when the source is /dev/null
Approved by:	allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D16476
2018-07-27 22:46:42 +00:00
Warner Losh
08fa847abf Use % for printf, not a dollar sign 2018-07-27 22:35:07 +00:00
Warner Losh
0f0d65df7b Style nits noted by rpokala 2018-07-27 22:31:38 +00:00