Commit Graph

249169 Commits

Author SHA1 Message Date
Baptiste Daroussin
fdf46c24f0 Revert r359294 per manu's request
It breaks etcupdate

Reported by:	cy
2020-03-25 08:35:55 +00:00
Emmanuel Vadot
483955de74 libpmc: Always add the full include path for libpmcstat
Previously it was only added for aarch64, amd64 and i386
2020-03-25 02:28:47 +00:00
Emmanuel Vadot
77f0f1df8b pkgbase: Stop threating rc files as config files
rc scripts arent configuration files so use FILES instead of CONFS.
While here put rc scripts into related package (sendmail in the FreeBSD-sendmail
package, wpa_supplicant in the FreeBSD-wpa etc ...)

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D24177
2020-03-25 01:36:23 +00:00
Emmanuel Vadot
970d1bbf71 Re-apply r359267 now that tools are using the proper include path
Original commit message:
bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB

f we're building an internal lib do not bother including bsd.incs.mk so we
will not install the headers.
This also "solves" a problem with pkgbase where a libXXX-development package
is created and due to how packages are created we add a dependency to a
libXXX package that doesn't exists.
2020-03-25 01:35:13 +00:00
Emmanuel Vadot
ee55186dfd pmc: Add include path for libpmcstat as it is an internallib
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D24173
2020-03-25 01:32:16 +00:00
Emmanuel Vadot
e055e3367e wlandebug: Add include path for libifconfig as it is a internallib
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D24172
2020-03-25 01:31:26 +00:00
Mitchell Horne
52de22cae7 Makefile.inc1: override MACHINE for native-xtools
For the final step of the native-xtools target, "everything" is built
with TARGET and TARGET_ARCH set to the architecture we wish to
cross-build for. However, CROSSENV overwrites the values of MACHINE and
MACHINE_ARCH, setting them to be identical to TARGET and TARGET_ARCH.
For native-xtools this is undesirable since we are building binaries to
run on the host architecture, that can cross compile for the target
architecture.

When building native-xtools for RISC-V, this issue manifests as an invalid
argument for "-march". The compiler is invoked with the target triple of the
host architecture, but the CFLAGS inherited from bsd.cpu.mk are that of the
target architecture.

Reviewed by:	imp, bdrewery
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D23838
2020-03-24 23:25:54 +00:00
Michael Tuexen
7522682e5e Only call panic when building with INVARIANTS.
MFC after:		1 week
2020-03-24 23:04:07 +00:00
Michael Tuexen
a412576e36 Another cleanup of the timer code. Also be more pedantic about the
parameters of the timer start and stop routines. Several inconsistencies
have been fixed in earlier commits. Now they will be catched when running
an INVARIANTS system.

MFC after:	1 week
2020-03-24 22:44:36 +00:00
Ed Maste
f1af40b54b Makefile.inc1: remove old (2018) stale dependency hacks
We handle a number of stale dependency issues on an ad-hoc basis, in
order to support ongoing NO_CLEAN builds.  These hacks do not need to
be maintained indefinitely; now remove those for issues that are more
than a year old.

Sponsored by:	The FreeBSD Foundation
2020-03-24 21:37:34 +00:00
Justin Hibbits
77cb3b49b7 ichwd: Add Atom C3000 watchdog ID.
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc
2020-03-24 21:28:48 +00:00
Warner Losh
56c995d658 exec{l,v}{e,p} arrived in 7th Edition research Unix to support the Bourne Shell
which introduced environment variables. Document that here. Verified by
consulting the TUHS archive.
2020-03-24 19:33:21 +00:00
Conrad Meyer
704101dd3d Fix PNP matching for iflib NIC drivers
The previous descriptor string specified that all fields were significant for
match.  However, the only significant fields for in-tree drivers are
vendor:devid, and the fictitious zero values constructed by PVID() did not
match real subvendor, subdevice, revision, and/or class values, resulting in no
automatic probe.

If a future iflib driver needs to match on other criteria, the descriptor
string can be updated accordingly.  (E.g., "V32" and ~0 for unspecified values
in PVID().)

Reported by:	mav
Sponsored by:	Dell EMC Isilon
2020-03-24 19:20:10 +00:00
Sergio Carlavilla Delgado
cdb51c125a Correct path in EXAMPLES ypldap.conf.5
PR:		244743
Submitted by:	alex@i.org.ua
Patch by:	alex@i.org.ua
Approved by:	bcr@(mentor), 0mp
MFC after:	1 day
Differential Revision:	https://reviews.freebsd.org/D24144
2020-03-24 19:12:28 +00:00
Mark Johnston
8db2e8fd16 Remove the secondary_stacks array in arm64 and riscv kernels.
Instead, dynamically allocate a page for the boot stack of each AP when
starting them up, like we do on x86.  This shrinks the bss by
MAXCPU*KSTACK_PAGES pages, which corresponds to 4MB on arm64 and 256KB
on riscv.

Duplicate the logic used on x86 to free the bootstacks, by using a
sysinit to wait for each AP to switch to a thread before freeing its
stack.

While here, mark some static MD variables as such.

Reviewed by:	kib
MFC after:	1 month
Sponsored by:	Juniper Networks, Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D24158
2020-03-24 18:43:23 +00:00
Justin Hibbits
d681bc9e64 ismt: Fix ISMT_DESC_ADDR_RW macro, slave addresses are already left-shifted
Reverts r293369.  The macro was orginally correct, since our SMBus
framework, unlike i2c, already requires addresses to be 8-bit, LSB-cleared.

MFC after:	3 days
Sponsored by:	Juniper Networks, Inc
2020-03-24 18:35:33 +00:00
Mark Johnston
4c8f64714a newsyslog: Add fallthrough comments to appease Coverity.
CID:		1008165, 1008166, 1008167
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2020-03-24 18:17:10 +00:00
Mark Johnston
13d1902439 Add regression tests for newsyslog.conf's p flag.
While here do a bit of cleanup:
- declare local variables as such,
- make tmpdir_create() clean up logfile directories, to handle a
  previously interrupt test run more gracefully.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2020-03-24 18:16:56 +00:00
Mark Johnston
faff7ddb00 newsyslog: Fix stack corruption when initializing a zipwork structure.
This happens when compressing a previously uncompressed already-rotated
file, as happens when handling the 'p' flag in newsyslog.conf.  The file
name is stored in a flexible array member, so these structures cannot be
stack allocated.

Also make sure that we call change_attrs() and do_zipwork() in dry-run
mode; they handle this properly, contrary to the commit log message for
r327451.

CID:		1008168
Github PR:	https://github.com/freebsd/freebsd/pull/427
MFC after:	2 weeks
Submitted by:	Radek Brich (original version)
2020-03-24 18:16:36 +00:00
John Baldwin
ff4c0e6f83 Disable rarely used architecture variants in make universe by default.
If EXTRA_TARGETS is defined, build all supported architecture
variants.  By default, build architecture variants needed to provide
code coverage or that are commonly used.

Use this to disable building of all the hard-float and little-endian
MIPS architecture variants along with n32 by default.

Reviewed by:	rpokala
Discussed with:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D24178
2020-03-24 18:16:02 +00:00
Ed Maste
ed6611cc8c iflib: simplify MPASS assertion
Submitted by:	andrew
2020-03-24 17:54:34 +00:00
Ed Maste
68af0153a7 iflib: split compound assertion
ThunderX cluster systems are panicking on boot with a failed assertion
MPASS(gtask != NULL && gtask->gt_taskqueue != NULL).  Split the
assertion so that it's clear which part is failing.
2020-03-24 17:25:56 +00:00
Konstantin Belousov
8cf8c2f65a kern_copy_file_range(): check the file type.
The syscall can only operate on valid vnode types.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
2020-03-24 17:16:52 +00:00
Andrey V. Elsukov
db1102f213 Use IP_FW_NAT44_DESTROY opcode for IP_FW3 socket option to destroy
NAT instance.

The NAT44 group of opcodes for IP_FW3 socket option is modern way
to control NAT instances and this method can be used in future to
switch from numeric to named NAT instances, like was done for ipfw
tables.
The IP_FW_NAT_DEL opcode is the last remnant of old ipfw_ctl control
plane that doesn't support versioned operations. This interface will
be retired soon.

Reviewed by:	melifaro
MFC after:	10 days
Sponsored by:	Yandex LLC
2020-03-24 12:27:02 +00:00
Emmanuel Vadot
8daefe0081 auditdistd: Remove useless linking with libl 2020-03-24 07:08:39 +00:00
Emmanuel Vadot
118eb647f9 rescue: Remove useless linking with libl 2020-03-24 07:08:02 +00:00
Emmanuel Vadot
7dc05244c5 Revert r359267.
This is not the correct solution and I should have done a clean buildworld.
2020-03-24 01:29:18 +00:00
Emmanuel Vadot
1c93dede42 bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB
If we're building an internal lib do not bother including bsd.incs.mk so we
will not install the headers.
This also "solves" a problem with pkgbase where a libXXX-development package
is created and due to how packages are created we add a dependency to a
libXXX package that doesn't exists.

Reported by:	pizzamig
Reviewed by:	pizzamig bapt emaste
Differential Revision:	https://reviews.freebsd.org/D24166
2020-03-24 01:09:04 +00:00
Emmanuel Vadot
9d7c39d873 pkgbase: Move telnetd and ftpd pam file to the utilities package
Both programs are in this package so put the pam.d file in there too.

Reported by:	emaste
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D24161
2020-03-24 01:08:06 +00:00
Emmanuel Vadot
c016c89196 pkgbase: Move device.hints from the runtime to the bootloader package
Also mark it as config file so if a user changes this file pkg will attempt
to merge the new file upon an update.
device.hints is neither related to runtime or loader but it make more sense
to have it in loader in case some user delete /boot/ and wants to recreate it,
now only two packages are required FreeBSD-bootloader and the kernel package.
While here change where we override the package for files installed in /boot,
this allow us to keep other tags (such as config).

Reported by:	pizzamig
Reviewed by:	bapt pizzamig emaste
Differential Revision:	https://reviews.freebsd.org/D24159
2020-03-24 01:07:01 +00:00
Conrad Meyer
2596eb8847 arm: Fix atomic long APIs to correct 'u_long' signedness
As defined in atomic(9) and implemented on other architectures, the
atomic(9) functions all act on unsigned pointers and types.  Prior to this
revision, arm implemented some atomic(9) 'long' sized routines with correct
unsigned type, but others were incorrectly signed.

Reviewed by:	tinderbox
Sponsored by:	Dell EMC Isilon
2020-03-23 23:00:13 +00:00
John Baldwin
47172feb8d Use the newer EINTEGRITY error when authentication fails.
GELI used to fail with EINVAL when a read request spanned a disk
sector whose contents did not match the sector's authentication tag.
The recently-added EINTEGRITY more closely matches to the error in
this case.

Reviewed by:	cem, mckusick
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D24131
2020-03-23 21:26:32 +00:00
Brooks Davis
e2d6edeb99 Improve LIBADD/_DP_* for kyua libraries.
This fixes build with ld.bfd as the linker (e.g. on powerpc).

This corrects a bug in D24103.

Sponsored by:	DARPA
2020-03-23 21:21:38 +00:00
Brooks Davis
e0fcf26335 Bump for kyua import.
Reported by:	cy
Sponsored by:	DARPA
2020-03-23 19:28:24 +00:00
Brooks Davis
b0d29bc47d Import the kyua test framework.
Having kyua in the base system will simplify automated testing in CI and
eliminates bootstrapping issues on new platforms.

The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT.

Reviewed by:	emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24103
2020-03-23 19:01:23 +00:00
Brooks Davis
c697fb7f7c Add liblutok a lightweight C++ API for lua.
It is added an INTERNALLIB and not installed.  It will be used by kyua.

This is a preparatory commit for D24103.

Reviewed by:	emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
2020-03-23 18:26:23 +00:00
Ed Maste
1fc78b7e60 arch.7: remove Default Tool Chain footnote about xtoolchain
MIPS was the last arch to use external toolchain by default but uses
in-tree Clang and lld as of r359233, and now no table entries reference
the footnote.
2020-03-23 18:17:56 +00:00
Ed Maste
ce0d5fb489 arch.7: update Default Tool Chain intro text
All FreeBSD archs now use an in-tree toolchain - Clang and ELF Tool
Chain everywhere, and lld everywhere but 32-bit PowerPC (which still
uses ld.bfd).  No archs use external toolchain by default.

Sponsored by:	The FreeBSD Foundation
2020-03-23 18:14:04 +00:00
Alex Richardson
0a20523dda Fix newvers.sh on macOS 10.15
It appears that the macOS /bin/sh echo now defaults to -e and therefore the
`#define VERSTR` included newline characters instead of \n. This caused compiler
errors due to unterminated strings. Fix by using printf instead of echo.
A less fragile solution might be to bootstrap the in-tree /bin/sh but that
requires more changes.

Reviewed By:	brooks
Differential Revision: https://reviews.freebsd.org/D24136
2020-03-23 17:51:44 +00:00
Alex Richardson
647d4c51df Update arch.7 .Dd for r359233
Suggested by:	lwhsu
2020-03-23 17:51:39 +00:00
Edward Tomasz Napierala
868983b032 Add STANDARDS and HISTORY to getcontext(3), makecontext(3), and ucontext(3).
Obtained from:	NetBSD
MFC after:	2 weeks
Sponsored by:	DARPA
2020-03-23 17:38:20 +00:00
Brooks Davis
d41872f999 Add the tests user, an unprivileged user from the default kyua config.
This is a preparatory commit for D24103.

Reviewed by:	emaste
Obtained from:	CheriBSD
MFC after:	3 days
Sponsored by:	DARPA
2020-03-23 17:11:27 +00:00
Warner Losh
00c101b17d Document when execl and execp entered unix.
For this, things are complicated. The first mention in the manual was in the 4th
edition manual (as an add on to exec(II)).  The 2nd and 3rd editions didn't have
these in the manual (either as a separate page, or as an add-on to exec(II)). We
don't have good 1st, 2nd or 3rd edition distributions to look in. However,
there's a tape labeled 'last1120c' that we do have. This tape contains the last
version of the V2 edition of the C compiler on it (just after C got struct). On
this tape there was a libc.sa archive that contains source for execl and
execp. This source is sufficiently different from the V5 sources (which are the
next ones we have sources for) and have a slightly different calling convention
than later sources, suggesting that the early date for the last1120c tape is
correct (in that era, the epoch changed every year, leading to a one or two year
ambiguity on when the files could have been modified) and it should be though of
as V2. Since this was also a time of compiler development, and the calling
convetions are known to be under evolution, and since the rest of the sources in
libc.sa are consistent, that's further evidence that V2 is likely. Finally, 2nd
edition was the last version to fully support the 11/20 because it lacked many
basic features and bell labs moved off it to the 11/45 as soon as they could
afford to buy one, around this time era. The unix manuals make it sound like V3
might have supported the 11/20, but the same intro could also be read to mean it
didn't, at all, and that V3 was the first rewrite for the 11/45 ahead of the
rewrite in C that came with V4.

Taken together, the evidence leans most heavily to V2 (90% IMHO), and slightly
to V3 (8%) or possibly V4 (2%). I've not put all this in the man page, but have
left it here in case someone notices in the future that V4 is the first manual
page for it.
2020-03-23 16:02:01 +00:00
Mateusz Piotrowski
69b77fc027 Start sentences from new lines
Also, bump date after 359244.
2020-03-23 15:39:42 +00:00
Alexander V. Chernikov
7119cdc225 Make ICMP redirect processing depend on routing daemon.
Submitted by:	 lutz at donnerhacke.de
Reviewed by:	melifaro,rgrimes
Differential Revision:	https://reviews.freebsd.org/D23329
2020-03-23 15:27:10 +00:00
Kyle Evans
2ce22b06c0 bsdbox: remove useless linking against libl
All is good without it; just remove it.

Requested by:	bapt
2020-03-23 14:53:55 +00:00
Baptiste Daroussin
4ce887ccc8 Remove useless linking to libl 2020-03-23 14:44:23 +00:00
Baptiste Daroussin
1b6c9c3f43 Remove the link to libl which only contains a stub function
on yywrap, if the flex is told yywrap is not in use, then this linkage becomes
unnecessary
2020-03-23 14:37:00 +00:00
Baptiste Daroussin
e47b5c3de7 Remove unneeded dependency on libl 2020-03-23 14:33:29 +00:00
Baptiste Daroussin
e2328be509 Revove useless linking to yacc 2020-03-23 14:11:49 +00:00