#
7c43148a |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Rem
stand: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0 |
|
#
de776da3 |
| 11-Jul-2020 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: implement GELI writes
Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247482
This patch is based on initial work from allanjude.
PR: 247482 Obtained from: https://reviews.freebsd.o
loader: implement GELI writes
Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247482
This patch is based on initial work from allanjude.
PR: 247482 Obtained from: https://reviews.freebsd.org/D10236 Differential Revision: https://reviews.freebsd.org/D25605
show more ...
|
Revision tags: release/11.4.0 |
|
#
42e08952 |
| 22-Dec-2019 |
Ian Lepore <ian@FreeBSD.org> |
In gptboot, don't assume a partition number is a single digit, 1-9. GPT partitions can have 128 partitions, so parse contiguous digits and then validate that the number is between 1-128 inclusive.
In gptboot, don't assume a partition number is a single digit, 1-9. GPT partitions can have 128 partitions, so parse contiguous digits and then validate that the number is between 1-128 inclusive.
I'm not sure 128 is a hard limit in the GPT standard, but it's the common number in use, and it's a better upper limit than 9.
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
de357a73 |
| 05-Jun-2019 |
Warner Losh <imp@FreeBSD.org> |
Eliminate unused uuid parameters from gptread and gptread_table. We only need it for the gptfind() function, where it's used.
|
#
67350cb5 |
| 09-Dec-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340918 through r341763.
|
Revision tags: release/12.0.0 |
|
#
7297dc44 |
| 04-Dec-2018 |
Ian Lepore <ian@FreeBSD.org> |
Fix args cross-threading between gptboot(8) and loader(8) with zfs support.
When loader(8) is built with zfs support enabled, it assumes that any extarg data present is a zfs_boot_args struct, but i
Fix args cross-threading between gptboot(8) and loader(8) with zfs support.
When loader(8) is built with zfs support enabled, it assumes that any extarg data present is a zfs_boot_args struct, but if the first-stage loader was gptboot(8) the extarg data is actually a geli_boot_args struct. Luckily, zfsboot(8) and gptzfsboot(8) have always passed KARGS_FLAGS_ZFS along with KARGS_FLAGS_EXTARG, so we can use KARGS_FLAGS_ZFS to decide whether the extarg data is a zfs_boot_args struct.
To avoid similar problems in the future, gptboot(8) now passes a new KARGS_FLAGS_GELI to indicate that extarg data is geli_boot_args. In loader(8), if the neither KARGS_FLAGS_ZFS nor KARGS_FLAGS_GELI is set but extarg data is present (which will be the case for gptboot compiled before this change), we now check for the known size of the geli_boot_args struct passed by the older versions of gptboot as a way of confirming what type of extarg data is present.
In a semi-related tidying up, since loader's main() has already decided what type of extarg data is present and set the global 'zargs' var accordingly, don't repeat the check in extract_currdev, just check whether zargs is NULL or not.
X-MFC after: a few days, along with prior related changes.
show more ...
|
#
df108aaf |
| 03-Dec-2018 |
Ian Lepore <ian@FreeBSD.org> |
Eliminate duplicated code and struct member definitions in the handoff of args data between gptboot/zfsboot and loader(8).
Despite what seems like a lot of changes here, there are no actual changes
Eliminate duplicated code and struct member definitions in the handoff of args data between gptboot/zfsboot and loader(8).
Despite what seems like a lot of changes here, there are no actual changes in behavior, or in the data layout in the structures involved. This is just eliminating identical code pasted into multiple locations.
In detail, the changes are...
- Move struct zfs_boot_args definition from libsa/zfs/libzfs.h to i386/common/bootargs.h because it is specific to x86 booting and the handoff between zfsboot and loader, and has no relation to the zfs library code in general.
- The geli_boot_args and zfs_boot_args structs both contain an identical set of member variables containing geli information. Extract this out to a new geli_boot_data struct, and embed it in the arg-passing structs.
- Provide new routines geli_import_boot_data() and geli_export_boot_data() that can be shared between gptboot, zfsboot, and loader instead of pasting identical code into several different .c files.
- Remove some checks for a NULL pointer that can never be true because the pointer being tested was set using pointer math (kargs + 1) and that can never result in NULL in this code.
show more ...
|
#
b92c2c90 |
| 28-Nov-2018 |
Ian Lepore <ian@FreeBSD.org> |
Add comments describing the bootargs handoff between loader(8) and gptboot or zfsboot, when loader(8) is the BTX loader. No functional changes.
|
#
52c0ec14 |
| 27-Nov-2018 |
Ian Lepore <ian@FreeBSD.org> |
Restore the ability to override the disk unit/partition at the boot: prompt in gptboot.
When arch-independent geli support was added, a new static 'gdsk' struct was added, but there was still a stat
Restore the ability to override the disk unit/partition at the boot: prompt in gptboot.
When arch-independent geli support was added, a new static 'gdsk' struct was added, but there was still a static 'dsk' struct, and when you typed in an alternate disk/partition, the string was parsed into that struct, which was then never used for anything. Now the string gets parsed into gdsk.dsk, the struct that's actually used.
X-MFC after: 3 days
show more ...
|
#
14b841d4 |
| 11-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
MFH @ r337607, in preparation for boarding
|
#
f9c0a512 |
| 10-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337286 through r337585.
|
#
4e6c8e6d |
| 09-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
isoboot, gptboot: Fix WITHOUT_LOADER_GELI (gptboot) and isoboot in general
gptboot was broken when r316078 added the LOADER_GELI_SUPPORT #ifdef to not pass geliargs via __exec. KARGS_FLAGS_EXTARG m
isoboot, gptboot: Fix WITHOUT_LOADER_GELI (gptboot) and isoboot in general
gptboot was broken when r316078 added the LOADER_GELI_SUPPORT #ifdef to not pass geliargs via __exec. KARGS_FLAGS_EXTARG must not be used if we're not going to pass an additional argument to __exec.
PR: 228151 Submitted by: guyyur@gmail.com MFC after: 1 week
show more ...
|
#
94966221 |
| 13-Jul-2018 |
Ian Lepore <ian@FreeBSD.org> |
Fix glitched indentation (and rewrap as needed due to deeper indent). No functional changes.
Reported by: rpokala@
|
#
c1418270 |
| 13-Jul-2018 |
Ian Lepore <ian@FreeBSD.org> |
Extend loader(8) geli support to all architectures and all disk-like devices.
This moves the bulk of the geli support from lib386/biosdisk.c into a new geli/gelidev.c which implements a devsw-type d
Extend loader(8) geli support to all architectures and all disk-like devices.
This moves the bulk of the geli support from lib386/biosdisk.c into a new geli/gelidev.c which implements a devsw-type device whose dv_strategy() function handles geli decryption. Support for all arches comes from moving the taste-and-attach code to the devopen() function in libsa.
After opening any DEVT_DISK device, devopen() calls the new function geli_probe_and_attach(), which will "attach" the geli code to the open_file struct by creating a geli_devdesc instance to replace the disk_devdesc instance in the open_file. That routes all IO for the device through the geli code.
A new public geli_add_key() function is added, to allow arch/vendor-specific code to add keys obtained from custom hardware or other sources.
With these changes, geli support will be compiled into all variations of loader(8) on all arches because the default is WITH_LOADER_GELI.
Relnotes: yes Sponsored by: Microchip Technology Inc Differential Revision: https://reviews.freebsd.org/D15743
show more ...
|
Revision tags: release/11.2.0 |
|
#
ec82884e |
| 20-Jun-2018 |
Allan Jude <allanjude@FreeBSD.org> |
Revert r335276
This was causing issues for people booting. I will likely bring this back as an optional feature, similar to boot0sio, like gptboot-serial or something.
PR: 221526 Reported by: O. H
Revert r335276
This was causing issues for people booting. I will likely bring this back as an optional feature, similar to boot0sio, like gptboot-serial or something.
PR: 221526 Reported by: O. Hartmann <ohartmann@walstatt.org>, Thomas Laus <lausts@acm.org>
show more ...
|
#
6fee3bb8 |
| 17-Jun-2018 |
Allan Jude <allanjude@FreeBSD.org> |
gptboot, zfsboot, gptzfsboot: Enable the video and serial consoles early
Normally the serial console is not enabled until /boot.config is read and we know how the serial console should be configured
gptboot, zfsboot, gptzfsboot: Enable the video and serial consoles early
Normally the serial console is not enabled until /boot.config is read and we know how the serial console should be configured. Initialize the consoles early in 'dual' mode (serial & keyboard) with a default serial rate of 115200. Then serial is re-initialized once the disk is decrypted and the /boot.config file can be read.
This allows the GELIBoot passphrase to be provided via the serial console.
PR: 221526 Requested by: many Reviewed by: imp Sponsored by: Klara Systems Differential Revision: https://reviews.freebsd.org/D15862
show more ...
|
#
288013f5 |
| 05-Apr-2018 |
Benno Rice <benno@FreeBSD.org> |
Various style(9) fixes.
Reviewed by: strip --strip-debug -o - gptboot.o | md5 Sponsored by: iXsystems, Inc.
|
#
8e48426c |
| 05-Apr-2018 |
Benno Rice <benno@FreeBSD.org> |
Use consistent whitespace.
Reviewed by: strip --strip-debug -o - gptboot.o | md5 Sponsored by: iXsystems, Inc.
|
#
47940d85 |
| 26-Jan-2018 |
Warner Losh <imp@FreeBSD.org> |
Tag unreachable places as such. I left the while (1); in place since in this context we want to busy wait to stop.
Suggested by: pfg@
|
#
86bb84d5 |
| 26-Jan-2018 |
Warner Losh <imp@FreeBSD.org> |
Split panic routine
Split panic routine so that the 'Hit Any Key to continue' behavior can be overriden.
Sponsored by: Netflix
|
#
65628439 |
| 16-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Remove the 'mini libstand in libstand' that util.[ch] provided. These weren't needed, and their existance interfered with things in subtle ways. One of these subtle ways was that malloc could be diff
Remove the 'mini libstand in libstand' that util.[ch] provided. These weren't needed, and their existance interfered with things in subtle ways. One of these subtle ways was that malloc could be different based on what files were included when (even within the same .c file, it turns out). Move to a single malloc implementation as well by adding the calls to setheap() to gptboot.c and zfsboot.c. Once upon a time, these boot loaders strove to not use libstand. However, with the proliferation of features, that striving is too hard for too little gain and lead to stupid mistakes.
This fixes the GELI-enabled (but not even using) boot environment. The geli routines were calling libstand malloc but zfsboot.c and gptboot.c were using the mini libstand malloc, so this failed when we tried to probe for GELI partitions. Subtle changes in build order when moving to self-contained stand build in r326593 toggled what it used from one type to another due to odd nesting of the zfs implementation code that differed subtly between zfsloader and zfsboot.
Sponsored by: Netflix
show more ...
|
#
1227a4f4 |
| 02-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Fix all warnings related to geli and ZFS support on x86.
Default WARNS to 0 still, since there's still some warnings on other architectures.
Sponsored by: Netflix Differential Revision: https://rev
Fix all warnings related to geli and ZFS support on x86.
Default WARNS to 0 still, since there's still some warnings on other architectures.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13301
show more ...
|
#
55b1c6e7 |
| 15-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325663 through r325841.
|