aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strlcpy-src.c
diff options
context:
space:
mode:
authorAlexander Graf <[email protected]>2023-12-07 23:56:54 +0000
committerGreg Kroah-Hartman <[email protected]>2023-12-15 17:23:00 +0100
commit2678fd2fe9ee2c569e9cb6b17e786bc8f0753538 (patch)
tree39376d0d83d700190d27c1f48b3103edf4b96807 /lib/test_fortify/write_overflow-strlcpy-src.c
parent5133bee62f0ea5d4c316d503cc0040cac5637601 (diff)
initramfs: Expose retained initrd as sysfs file
When the kernel command line option "retain_initrd" is set, we do not free the initrd memory. However, we also don't expose it to anyone for consumption. That leaves us in a weird situation where the only user of this feature is ppc64 and arm64 specific kexec tooling. To make it more generally useful, this patch adds a kobject to the firmware object that contains the initrd context when "retain_initrd" is set. That way, we can access the initrd any time after boot from user space and for example hand it into kexec as --initrd parameter if we want to reboot the same initrd. Or inspect it directly locally. With this patch applied, there is a new /sys/firmware/initrd file when the kernel was booted with an initrd and "retain_initrd" command line option is set. Signed-off-by: Alexander Graf <[email protected]> Tested-by: Bagas Sanjaya <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions