Merge remote-tracking branch 'internal/freebsd/current/main' into hardened/current/master

Conflicts:
	share/mk/src.opts.mk (unresolved)
This commit is contained in:
Shawn Webb 2024-02-23 23:23:43 +00:00
commit f8f5fc96a5
No known key found for this signature in database
220 changed files with 1078 additions and 454 deletions

View File

@ -42,6 +42,9 @@ test_jail_conf='%%test_jail_name%% {
init()
{
if ! which -s jail; then
atf_skip "This test requires jail"
fi
echo "${test_jail_conf}" | \
sed -e "s/%%test_jail_name%%/${test_jail_name}/" > "./jail.conf"
jail -f "./jail.conf" -c ${test_jail_name}
@ -78,6 +81,9 @@ basic_body()
}
basic_cleanup()
{
if ! which -s jail; then
atf_skip "This test requires jail"
fi
recycle
}

View File

@ -137,6 +137,7 @@ SRCS+= \
siglist.c \
signal.c \
sigsetops.c \
sleep.c \
srand48.c \
statvfs.c \
stringlist.c \
@ -160,6 +161,7 @@ SRCS+= \
ulimit.c \
uname.c \
unvis-compat.c \
usleep.c \
utime.c \
utxdb.c \
valloc.c \

View File

@ -56,7 +56,7 @@ __sleep(unsigned int seconds)
time_to_sleep.tv_sec = seconds;
time_to_sleep.tv_nsec = 0;
if (((int (*)(const struct timespec *, struct timespec *))
__libsys_interposing[INTERPOS_nanosleep])(
(*__libsys_interposing_slot(INTERPOS_nanosleep)))(
&time_to_sleep, &time_remaining) != -1)
return (0);
if (errno != EINTR)

View File

@ -46,7 +46,8 @@ __usleep(useconds_t useconds)
time_to_sleep.tv_nsec = (useconds % 1000000) * 1000;
time_to_sleep.tv_sec = useconds / 1000000;
return (((int (*)(const struct timespec *, struct timespec *))
__libsys_interposing[INTERPOS_nanosleep])(&time_to_sleep, NULL));
(*__libsys_interposing_slot(INTERPOS_nanosleep)))(&time_to_sleep,
NULL));
}
__weak_reference(__usleep, usleep);

View File

@ -43,6 +43,7 @@ CFLAGS+= -ftls-model=initial-exec
# Link with static libcompiler_rt.a.
#
LDFLAGS+= -nodefaultlibs
LDFLAGS+= -Wl,-Bsymbolic
LIBADD+= compiler_rt
.if ${MK_SSP} != "no" && \

View File

@ -40,7 +40,7 @@ SRCS+= \
SRCS+= getdents.c lstat.c mknod.c stat.c
SRCS+= creat.c
SRCS+= lockf.c sleep.c usleep.c wait.c wait3.c waitpid.c waitid.c
SRCS+= lockf.c wait.c wait3.c waitpid.c waitid.c
SRCS+= recv.c recvmmsg.c send.c sendmmsg.c
NOASM+= sched_getcpu.o

View File

@ -218,7 +218,7 @@ CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat lzcat
CRUNCH_PROGS_usr.bin+= zstd
CRUNCH_ALIAS_zstd= unzstd zstdcat zstdmt
CRUNCH_LIBS+= ${LDADD_zstd}
CRUNCH_LIBS+= -lprivatezstd
CRUNCH_PROGS_usr.bin+= fetch
CRUNCH_LIBS+= -lfetch

View File

@ -692,6 +692,7 @@ MLINKS+=ipfirewall.4 ipaccounting.4 \
MLINKS+=ipheth.4 if_ipheth.4
MLINKS+=ipw.4 if_ipw.4
MLINKS+=iwi.4 if_iwi.4
MLINKS+=iwlwifi.4 if_iwlwifi.4
MLINKS+=iwm.4 if_iwm.4
MLINKS+=iwn.4 if_iwn.4
MLINKS+=ixgbe.4 ix.4

View File

@ -316,6 +316,7 @@ __DEFAULT_NO_OPTIONS+=LLDB
.if ${__T:Mpowerpc*} || ${__T} == "i386"
BROKEN_OPTIONS+=EFI
.endif
<<<<<<< HEAD
.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "aarch64"
__DEFAULT_YES_OPTIONS+=PIE
@ -351,6 +352,12 @@ __DEFAULT_NO_OPTIONS+=CFI
__DEFAULT_NO_OPTIONS+=CLANG_EXTRAS
.endif
=======
# Bad coupling for libsecure stuff with bearssl and efi, so broken on EFI
.if ${__T:Mpowerpc*}
BROKEN_OPTIONS+=BEARSSL # bearssl brings in secure efi stuff xxx
.endif
>>>>>>> internal/freebsd/current/main
# OFW is only for powerpc, exclude others
.if ${__T:Mpowerpc*} == ""
BROKEN_OPTIONS+=LOADER_OFW

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* Loading modules, booting the system
*/

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>

View File

@ -29,7 +29,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*-
* This module implements a "raw device" interface suitable for
* use by the stand-alone I/O library NFS code. This interface

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/disk.h>
#include <sys/queue.h>
#include <stand.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* Simple commandline interpreter, toplevel and misc.
*

View File

@ -14,7 +14,6 @@
* Routine for doing backslash elimination.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>
#include "bootstrap.h"

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include "bootstrap.h"

View File

@ -14,7 +14,6 @@
* The meat of the simple parser.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>
#include "bootstrap.h"

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* Simple commandline interpreter, toplevel and misc.
*/

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* Machine-independent ISA PnP enumerator implementing a subset of the
* ISA PnP specification.

View File

@ -1,5 +1,5 @@
#include <sys/cdefs.h>
/* This file is in the public domain */
#define __ELF_WORD_SIZE 32
#define _MACHINE_ELF_WANT_32BIT
#include "load_elf.c"

View File

@ -1,5 +1,5 @@
#include <sys/cdefs.h>
/* This file is in the public domain */
#define __ELF_WORD_SIZE 32
#define _MACHINE_ELF_WANT_32BIT
#include "load_elf_obj.c"

View File

@ -1,4 +1,4 @@
#include <sys/cdefs.h>
#define __ELF_WORD_SIZE 64
/* This file is in the public domain */
#define __ELF_WORD_SIZE 64
#include "load_elf.c"

View File

@ -1,4 +1,4 @@
#include <sys/cdefs.h>
#define __ELF_WORD_SIZE 64
/* This file is in the public domain */
#define __ELF_WORD_SIZE 64
#include "load_elf_obj.c"

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <sys/endian.h>

View File

@ -26,7 +26,6 @@
* from: FreeBSD: src/sys/boot/sparc64/loader/metadata.c,v 1.6
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <sys/linker.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <string.h>
#include <stand.h>
#include <bootstrap.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* file/module function dispatcher, support, etc.
*/

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <sys/diskmbr.h>

View File

@ -3,7 +3,6 @@
*
*/
#include <sys/cdefs.h>
/*
* "Plug and Play" functionality.
*

View File

@ -1,4 +1,2 @@
#include <sys/cdefs.h>
#define __ELF_WORD_SIZE 32
#include "reloc_elf.c"

View File

@ -1,4 +1,2 @@
#include <sys/cdefs.h>
#define __ELF_WORD_SIZE 64
#include "reloc_elf.c"

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <stdarg.h>
#include <machine/_inttypes.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* MD bootstrap main() and assorted miscellaneous
* commands.

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <efilib.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>
#include <sys/disklabel.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <efilib.h>
#include <efichar.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/errno.h>
#include <bootstrap.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <efi.h>
#include <efichar.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/disk.h>
#include <sys/param.h>
#include <sys/time.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>
#include <efi.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <efilib.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <efilib.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <eficonsctl.h>
#include <efilib.h>

View File

@ -38,7 +38,6 @@
*
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <efilib.h>

View File

@ -28,7 +28,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <efilib.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <efilib.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <efi.h>
#include <efilib.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#define __ELF_WORD_SIZE 64
#include <sys/param.h>
#include <sys/exec.h>

View File

@ -34,8 +34,6 @@
* https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/linker.h>

View File

@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>
#include <sys/param.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LOADER_FDT_SUPPORT)
#include <sys/param.h>
#include <fdt_platform.h>

View File

@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>
#include <sys/param.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <bootstrap.h>
#include <efi.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <bootstrap.h>
#include <efi.h>
#include <eficonsctl.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <bootstrap.h>
#include <sys/endian.h>
#include <sys/param.h>

View File

@ -27,7 +27,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/disk.h>

View File

@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <libfdt.h>
#include <fdt.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include "libi386.h"

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <machine/stdarg.h>
#include <bootstrap.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* BIOS disk device handling.
*

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* Obtain memory configuration information from the BIOS
*/

View File

@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* PnP enumerator using the PCI BIOS.
*/

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* PnP BIOS enumerator.
*/

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* Obtain memory configuration information from the BIOS
*/

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <sys/reboot.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <sys/reboot.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <sys/reboot.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <bootstrap.h>
#include <machine/cpufunc.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>
#include "bootstrap.h"

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#define __ELF_WORD_SIZE 64
#include <sys/param.h>
#include <sys/exec.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* MD primitives supporting placement of module data
*

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* i386-specific module functionality.
*

View File

@ -35,7 +35,6 @@
* OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <bootstrap.h>

View File

@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/* read into destination in flat addr space */
#include <stand.h>

View File

@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <errno.h>
#include <stdbool.h>

View File

@ -35,7 +35,6 @@
* OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <bootstrap.h>

View File

@ -24,12 +24,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Id: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp
* From: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <stand.h>
#include <bootstrap.h>
#include <btxv86.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <btxv86.h>
#include "bootstrap.h"

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <machine/psl.h>

View File

@ -24,10 +24,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Id: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp
* From: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <bootstrap.h>

View File

@ -31,7 +31,6 @@
* read in to temporary space and relocate on exec, when btx is stopped.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <sys/linker.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <bootstrap.h>
#include "libi386/libi386.h"

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* MD bootstrap main() and assorted miscellaneous
* commands.

View File

@ -13,7 +13,6 @@
* purpose.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <string.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#define __ELF_WORD_SIZE 64
#include <sys/param.h>
#include <sys/exec.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#define __ELF_WORD_SIZE 64
#include <sys/param.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include "bootstrap.h"

View File

@ -305,7 +305,6 @@ hostdisk_strategy(void *devdata, int flag, daddr_t dblk, size_t size,
struct devdesc *desc = devdata;
daddr_t pos;
int n;
int64_t off;
uint64_t res;
uint32_t posl, posh;
@ -313,12 +312,14 @@ hostdisk_strategy(void *devdata, int flag, daddr_t dblk, size_t size,
posl = pos & 0xffffffffu;
posh = (pos >> 32) & 0xffffffffu;
if ((off = host_llseek(desc->d_unit, posh, posl, &res, 0)) < 0) {
printf("Seek error on fd %d to %ju (dblk %ju) returns %jd\n",
desc->d_unit, (uintmax_t)pos, (uintmax_t)dblk, (intmax_t)off);
if (host_llseek(desc->d_unit, posh, posl, &res, 0) < 0)
return (EIO);
}
n = host_read(desc->d_unit, buf, size);
if (flag & F_READ)
n = host_read(desc->d_unit, buf, size);
else if (flag & F_WRITE)
n = host_write(desc->d_unit, buf, size);
else
return (EINVAL);
if (n < 0)
return (EIO);
@ -339,7 +340,7 @@ hostdisk_open(struct open_file *f, ...)
va_end(vl);
fn = dev2hd(desc)->hd_dev;
desc->d_unit = host_open(fn, O_RDONLY, 0);
desc->d_unit = host_open(fn, O_RDWR, 0);
if (desc->d_unit <= 0) {
printf("hostdisk_open: couldn't open %s: %d\n", fn, errno);
return (ENOENT);

View File

@ -23,7 +23,6 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include <sys/param.h>
#include <sys/boot.h>

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#define _WANT_KERNEL_ERRNO 1
#include <errno.h>

View File

@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <lua.h>
#include "lauxlib.h"

View File

@ -25,7 +25,6 @@
*
*/
#include <sys/cdefs.h>
#include "lstd.h"
#include "math.h"

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include "bootstrap.h"

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* MD primitives supporting placement of module data
*

View File

@ -23,7 +23,6 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* Disk I/O routines using Open Firmware
*/

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* ofw-specific module functionality.
*

View File

@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <stand.h>
#include "openfirm.h"

Some files were not shown because too many files have changed in this diff Show More