#
780f2892 |
| 20-Nov-2024 |
Warner Losh <imp@FreeBSD.org> |
stand: drop inttypes.h from safe list
Nothing uses it anymore, so drop it from the 'safe' list. Also, move stand/efi/loader/main.c to using machine/_inttypes.h which is all it really needs.
Sponsor
stand: drop inttypes.h from safe list
Nothing uses it anymore, so drop it from the 'safe' list. Also, move stand/efi/loader/main.c to using machine/_inttypes.h which is all it really needs.
Sponsored by: Netflix
show more ...
|
#
17be774e |
| 20-Nov-2024 |
Warner Losh <imp@FreeBSD.org> |
stand: unistd.h is no longer safe
unistd.h includes too much extra stuff for the boot loader. This creates a fair amount of namespace pollution and it's best to just make it an alias for stand.h lik
stand: unistd.h is no longer safe
unistd.h includes too much extra stuff for the boot loader. This creates a fair amount of namespace pollution and it's best to just make it an alias for stand.h like the other include files already are.
Sponsored by: Netflix
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0, release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
e7a629c8 |
| 08-Mar-2022 |
Kyle Evans <kevans@FreeBSD.org> |
libmd, kern, stand: consolidate md5 implementations (NFC)
Reduce the number of md5c.c between the three of these from two to one by just reaching into the kernel build for both userland builds. The
libmd, kern, stand: consolidate md5 implementations (NFC)
Reduce the number of md5c.c between the three of these from two to one by just reaching into the kernel build for both userland builds. The precedent for this already exists for sha2 in both cases.
_libmd_ symbol privatization bits have been moved to sys/md5.h and md5.h remains to #include <sys/md5.h> for compatibility.
This stops exporting MD5Pad() in the process because the kernel stopped exporting it in 502a35d60f4c. soversion is bumped accordingly.
This also renames the libc version of stack_protector.c; it previously only worked by coincidence because .PATH ordering worked out such that we got the right one, but this is not the case anymore. Remove the landmine.
PR: 280784 (exp-run) Reviewed by: allanjude, delphij Differential Revision: https://reviews.freebsd.org/D34497
show more ...
|
#
17cccb6f |
| 22-Sep-2024 |
Warner Losh <imp@FreeBSD.org> |
libsa: Fix a comment to be less vague
Be more specific about where this is used.
Sponsored by: Netflix
|
#
925f1573 |
| 18-Sep-2024 |
Colin Percival <cperciva@FreeBSD.org> |
loader: Make pkcs5v2 unconditionally available
This was previously only available if GELI support was included, but I want to use it for processing entropy from EFI
Reviewed by: imp MFC after: 1 we
loader: Make pkcs5v2 unconditionally available
This was previously only available if GELI support was included, but I want to use it for processing entropy from EFI
Reviewed by: imp MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46634
show more ...
|
#
41c233de |
| 13-Jul-2024 |
Kyle Evans <kevans@FreeBSD.org> |
Prepare some build fixes in advance of more _FORTIFY_SOURCE
ZFS' libspl needs to be made aware that we have strlcat(3) and strlcpy(3) to avoid some more complicated declaration duplication, so go ah
Prepare some build fixes in advance of more _FORTIFY_SOURCE
ZFS' libspl needs to be made aware that we have strlcat(3) and strlcpy(3) to avoid some more complicated declaration duplication, so go ahead and define these HAVE_ macros now.
libprocstat has to define `_KERNEL` and include kernel headers in order to get what it wants, but this results in sys/cdefs.h being included too late and we pick up the build breaking version of the __RENAME definition. Just explicitly include sys/cdefs.h earlier rather than disabling _FORTIFY_SOURCE. The zfs/ subdir only builds an object that holds some structures and sizes, so just disable _FORTIFY_SOURCE there entirely rather than trying to move #define _KERNEL into the file..
While we're here, make sure that we disable _FORTIFY_SOURCE in the bootloader because we don't have the symbol renaming support today to do it as cleanly as we'd like. ssp/ssp.h needs to be pulled into the libsa environment so that other bits can understand that ssp is disabled in the consistent __SSP_FORTIFY_LEVEL way that we try to do.
Reviewed by: allanjude (previous version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45676
show more ...
|
#
fd577b59 |
| 01-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
libsa: Move hash functions up a level
This should have no functional change. Move compiling the sha256, sha512 and md5 hash functions up into libsa to allow them to be used elsewhere in the boot loa
libsa: Move hash functions up a level
This should have no functional change. Move compiling the sha256, sha512 and md5 hash functions up into libsa to allow them to be used elsewhere in the boot loader when geli isn't configured. Since libsa is a .a, these won't wind up in any boot loader that doesn't reference them, so should be a nop.
Sponsored by: Netflix
show more ...
|
#
7c8b126c |
| 01-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
libsa: Move include file creation to the end of the Makefile
The include file symblic links, etc are out of place where they are. Move them to the end of the file. No functional change intended.
Sp
libsa: Move include file creation to the end of the Makefile
The include file symblic links, etc are out of place where they are. Move them to the end of the file. No functional change intended.
Sponsored by: Netflix
show more ...
|
#
1631382c |
| 08-Dec-2023 |
Kyle Evans <kevans@FreeBSD.org> |
loader: provide a features table for binary compatibility advertisement
liblua now provides a loader.has_feature() function to probe the loader binary for features advertised. name => desc mappings
loader: provide a features table for binary compatibility advertisement
liblua now provides a loader.has_feature() function to probe the loader binary for features advertised. name => desc mappings are provided in loader.features to get a list of all of the features loader *can* support. core.hasFeature is provided as a shim to loader.has_feature so that individual consumers don't need to think about the logic of the loader module not providing has_feature; we know that means the feature isn't enabled.
The first consumer of this will be EARLY_ACPI to advertise that the loader binary probes for ACPI presence before the interpreter has started, so that we know whether we can trust the presence of acpi.rsdp as relatively authoritative. In general, it's intended to be used to avoid breaking new scripts on older loaders within reason.
This will be used in lua as `core.hasFeature("EARLY_ACPI")`, while the C bits of loader will `feature_enable(FEATURE_EARLY_ACPI)`.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42695
show more ...
|
#
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
#
d1ea5017 |
| 13-Jan-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Separate base and cli parts of nvstore
zfs lives in libsa. However, it depends on nvstore (and other things) that are in common. Fix part of this layering violation by splitting nvstore into
stand: Separate base and cli parts of nvstore
zfs lives in libsa. However, it depends on nvstore (and other things) that are in common. Fix part of this layering violation by splitting nvstore into a libsa piece (which is the base implementation) and keeping a much smaller common piece (to implement the nvstore command). This just leaves zfs' knowledge of device names that's specific to common and its calling platform specific init code to resolve. Add a nvstore.h file for these two parts to communicate private things and move the public nvstore api from bootstrap.h to stand.h.
Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D38043
show more ...
|
#
97e14306 |
| 07-Jan-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Add inttype.h
libunwind files need inttype.h. It's safe so add it to the safe list.
Sponsored by: Netflix Reviewed by: jrtc27, kevans Differential Revision: https://reviews.freebsd.org/D37
stand: Add inttype.h
libunwind files need inttype.h. It's safe so add it to the safe list.
Sponsored by: Netflix Reviewed by: jrtc27, kevans Differential Revision: https://reviews.freebsd.org/D37947
show more ...
|
#
6b574b3b |
| 06-Dec-2022 |
Warner Losh <imp@FreeBSD.org> |
stand/zlib: Document the upstream issue behind NO_DEPRECATED_NON_PROTOTYPE
The zlib project has issue https://github.com/madler/zlib/issues/633 to document its continued use of old K&R-style functio
stand/zlib: Document the upstream issue behind NO_DEPRECATED_NON_PROTOTYPE
The zlib project has issue https://github.com/madler/zlib/issues/633 to document its continued use of old K&R-style function definitions.
Suggested by: delphij@ Sponsored by: Netflix
show more ...
|
#
983a1802 |
| 30-Nov-2022 |
Warner Losh <imp@FreeBSD.org> |
stand/zlib: Zlib still uses K&R function definitions
So add ${NO_WDEPRECATED_NON_PROTOTYPE} to the CFLAGS of those files. This can be removed when we import a zlib that's free of this anachronism.
stand/zlib: Zlib still uses K&R function definitions
So add ${NO_WDEPRECATED_NON_PROTOTYPE} to the CFLAGS of those files. This can be removed when we import a zlib that's free of this anachronism.
Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D37516
show more ...
|
#
14821130 |
| 12-Aug-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Compile out the extensive superblock diagnostic messages for BIOS loader
The BIOS loader operates in a very constrained environment. The messages for the super block integrity tests take up a
stand: Compile out the extensive superblock diagnostic messages for BIOS loader
The BIOS loader operates in a very constrained environment. The messages for the super block integrity tests take up about 12k of space. Compile them out for the BIOS loader, while leaving it intact for all other loaders that aren't space constrained. These aren't used in the 'super tiny' *boot* programs, so no adjustment is needed there.
We reply on the fact that (a) i386 doesn't support 32-bit UEFI booting and (b) LIBSA_CPUARCH is "i386" when building on both i386 and when we're building the 32-bit libsa32 library.
This saves about 12k of space for this constrained envrionment and will take a bit of the pressure off some machines where the loader has grown too big for their BIOS (see comments in i386/loader/Makefile for details).
Sponsored by: Netflix Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D36175
show more ...
|
#
0b3a4a58 |
| 11-Aug-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Use devformat instead of disk_devfmt
Use devformat instead of disk_devfmt. This allows us to avoid knowing the details of the device that's underneath us. Remove disk.h include and the -I${LD
stand: Use devformat instead of disk_devfmt
Use devformat instead of disk_devfmt. This allows us to avoid knowing the details of the device that's underneath us. Remove disk.h include and the -I${LDRSRC} from the build of ufs.c since they are no longer needed.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D35922
show more ...
|
#
ec9f3e77 |
| 11-Aug-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Use devformat rather than disk_devfmt
Fix layering violation and use devformat to get the string representation of the device to see if we're mounted yet or not. Remove added include to picku
stand: Use devformat rather than disk_devfmt
Fix layering violation and use devformat to get the string representation of the device to see if we're mounted yet or not. Remove added include to pickup disk.h.
Sponsored by: Netflix Reviewed by: tsoome (prior version) Differential Revision: https://reviews.freebsd.org/D35919
show more ...
|
#
60cb4f9a |
| 26-Jul-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: tftp.c doesn't need bootinfo.h
tftp.c includes bootinfo.h, but doesn't need it. Remove it, and remove the -Istand/common from CFALGS since that's the only reason we had it.
Sponsored by: Ne
stand: tftp.c doesn't need bootinfo.h
tftp.c includes bootinfo.h, but doesn't need it. Remove it, and remove the -Istand/common from CFALGS since that's the only reason we had it.
Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D35928
show more ...
|
#
d1fb0e1d |
| 22-Jul-2022 |
John Baldwin <jhb@FreeBSD.org> |
stand libsa: Restore include path to LDRSRC for disk.h for filesystems.
In theory they shouldn't need anything outside of libsa, but disk.h and bootstrap.h are currently required. Future work wil ad
stand libsa: Restore include path to LDRSRC for disk.h for filesystems.
In theory they shouldn't need anything outside of libsa, but disk.h and bootstrap.h are currently required. Future work wil address this issue.
This fixes the build with MK_LOADER_ZFS=no. ZFS's Makefile.inc adds these flags globally to CFLAGS when it should not. This masked the problem because the tools/boot/universe.sh didn't build MK_LOADER_ZFS=no as part of its regressions. Future work will also fix this.
Obtained from: CheriBSD Fixes: 84bf2bbbecc3 stand: constrain zlib/gzip CFLAGS better Sponsored by: DARPA Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D35860
show more ...
|
#
37dabb06 |
| 08-Jul-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Add comment about CFLAGS pollution
Add a note that veriexec / bearssl builds will pollute the CFLAGS in a way that's somewhat hard to fix, so I'm just noting it for now.
Sponsored by: Netfl
stand: Add comment about CFLAGS pollution
Add a note that veriexec / bearssl builds will pollute the CFLAGS in a way that's somewhat hard to fix, so I'm just noting it for now.
Sponsored by: Netflix
show more ...
|
#
84bf2bbb |
| 08-Jul-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: constrain zlib/gzip CFLAGS better
Define ZLIB_CFLAGS and use it only for the sources that are in ZLIB or that include it.
Sponsored by: Netflix
|
#
59a4cfe0 |
| 08-Jul-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Confine BZIP defines to bzip files
Sponsored by: Netflix
|
#
70b5c4ff |
| 30-Apr-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Install libsa.3
Turns out there is a libsa.3. It's a bit out of date, but we reference it in a number of places so we should install it. We need to do the DO32 dance because this Makefile is
stand: Install libsa.3
Turns out there is a libsa.3. It's a bit out of date, but we reference it in a number of places so we should install it. We need to do the DO32 dance because this Makefile is included twice and we don't want it installing twice.
Sponsored by: Netflix
show more ...
|
#
9633c3d8 |
| 17-Mar-2022 |
Toomas Soome <tsoome@FreeBSD.org> |
WITHOUT_BOOT build option appears to include stand, failing on libsa
building libsa needs to use -I${LDRSRC} for some files.
PR: 260083 Submitted by: Ivan Rozhuk MFC: 1 day
|
#
c25d9aff |
| 10-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: Add preload operation to fs_ops
When we load an ELF file (kernel or module) we do seek(2) a lot to parse/load the different sections of the ELF file. Protocol like TFTP suffers a lot from th
loader: Add preload operation to fs_ops
When we load an ELF file (kernel or module) we do seek(2) a lot to parse/load the different sections of the ELF file. Protocol like TFTP suffers a lot from this as there is no resume or a way to start the tranfer from a specified offset in the file. fs_preload is added to help those protocol. Call preload just after opening the ELF file that we need to load so the underlying method can cache the hole file and then read/lseek operations are faster.
Reviewed by: imp MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33409
show more ...
|