linux-stable/init
John Sperbeck 8434f9aa6b init: open output files from cpio unpacking with O_LARGEFILE
If a member of a cpio archive for an initrd or initrams is larger than
2Gb, we'll eventually fail to write to that file when we get to that
limit, unless O_LARGEFILE is set.

The problem can be seen with this recipe, assuming that BLK_DEV_RAM
is not configured:

cd /tmp
dd if=/dev/zero of=BIGFILE bs=1048576 count=2200
echo BIGFILE | cpio -o -H newc -R root:root > initrd.img
kexec -l /boot/vmlinuz-$(uname -r) --initrd=initrd.img --reuse-cmdline
kexec -e

The console will show 'Initramfs unpacking failed: write error'.  With
the patch, the error is gone.

Link: https://lkml.kernel.org/r/20240323152934.3307391-1-jsperbeck@google.com
Signed-off-by: John Sperbeck <jsperbeck@google.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-05 11:21:30 -07:00
..
.gitignore
Kconfig RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
Makefile
build-version
calibrate.c
do_mounts.c init: flush async file closing 2024-02-08 18:41:03 +01:00
do_mounts.h init: flush async file closing 2024-02-08 18:41:03 +01:00
do_mounts_initrd.c
do_mounts_rd.c
init_task.c rcu-tasks: Initialize data to eliminate RCU-tasks/do_exit() deadlocks 2024-02-25 14:21:43 -08:00
initramfs.c init: open output files from cpio unpacking with O_LARGEFILE 2024-04-05 11:21:30 -07:00
main.c - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
noinitramfs.c
version-timestamp.c
version.c