libnetbsd: import the `__nothing` macro
This macro is widely used in new NetBSD tests. Please see the comment
next to the imported macro for more details on its use.
Obtained from: NetBSD (c26cc77b3a0b2)
MFC after: 1 week
t_create.sh: use `ATF_TESTS_SH_SED` & remove local mods
This particular change replaces all local modifications to the test
script like so:
- Use `ATF_TESTS_SH_SED_test` with a sed(1) statement in the Makefile,
instead of the equivalent local modifications.
- Remove the need for expecting the output of newfs_msdos to be empty.
There isn't much to gain from deviating from the upstream NetBSD test--it's
just another local modification that would need to be carried forward. If
it's worth testing this FreeBSD-specific behavior, it should be in a
FreeBSD-specific test.
This makes moving new modifications to the script easier moving forward.
MFC after: 1 week
HBSD: ASLR: Use VMFS_NO_SPACE to map the stack
We want the stack to land where we calculated it based on the
precalculated delta. While VMFS_ANY_SPACE still gets the job done, it is
the wrong flag in this case. By using VMFS_NO_SPACE, we make the process
of mapping the stack a quicker operation.
However, the risk of a failed mapping increases since vm_map_find(9)
will fail if the requested virtual address is already allocated. The
risk of this is small since we're dealing with a fresh address space.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
MFC-to: 15-STABLE
MFC-to: 14-STABLE
(cherry picked from commit 1e761a51dc553a84f88f13e1231a6688a3fcd50d)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
(cherry picked from commit 15de57e616f7af3ea5fc02e9834515851cee3014)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
HBSD: Disable WITNESS' checking of vnode locks
FreeBSD relatively recently changed how vnode locking works in the
kernel. There are a few places that still need to be updated.
HardenedBSD's use of filesystem extended attributes seems to trip
WITNESS vnode lock checking when ZFS is used. This causes a kernel
panic, which is more likely to be triggered during a package build.
So, for now, let's disable the vnode lock checks. I plan to revisit this
when I have more available time.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
(cherry picked from commit 103903e6b27e557c93aa52e8cfbdcb103fb78f47)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
(cherry picked from commit 1676d6ab9a023e8feac2e345349a1ddbd74d024d)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
HBSD: TPE: Ensure user-owned vnodes are unwritable
Neither the executable nor the directory containing it should be
writable if it's not owned by root (0).
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
MFC-to: 15-STABLE
MFC-to: 14-STABLE
(cherry picked from commit ffe9d2caea1bbab424281f5d784a551152e97d56)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
(cherry picked from commit 1d02b772d171d403e9d264916034c8806aca1d8a)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
Revert "stand: compile ia32 EFI loader with -malign-double"
The loader shares types with various libraries that don't compile with
this flag. Revert for now.
Reported by: jrtc27
emulators/wine: Set 32-bit lib path for WoW
This avoids failures like
wine: could not load ntdll.so: Shared object "libhwloc.so.15" not found,
required by "ntdll.so"
PR: 293179
Submitted by: Zane C. Bowers-Hadley <vvelox at vvelox.net>
Reviewed by: Alexander Vereeken <Alexander88207 at protonmail.com>
misc/usd: Move to graphics/openusd
Rename to match upstream naming and moved to a more appropriate category
PR: 292497
Approved by: yuri (maintainer, timeout 1 month)
stand: compile ia32 EFI loader with -malign-double
The UEFI spec says:
> Structures are aligned on boundaries equal to the largest internal
> datum of the structure and internal data are implicitly padded to
> achieve natural alignment.
By default, structs containing members of type "long long" have 4 byte
alignment on i386. This caused some EFI structures to be subtly wrong.
Fix this by compiling the ia32 EFI loader with -malign-double, which
bumps the alignment up to 8 if such members are present.
MFC after: 3 days