diff options
| author | Pasha Tatashin <[email protected]> | 2022-05-27 02:55:35 +0000 |
|---|---|---|
| committer | akpm <[email protected]> | 2022-06-17 02:58:21 +0000 |
| commit | f4da7afe07523ff8930c4466b09a15db18508cd4 (patch) | |
| tree | 43935c8bf06b673b322197fb93d646db481cc996 /lib/error-inject.c | |
| parent | fs/kernel_read_file: allow to read files up-to ssize_t (diff) | |
| download | kernel-f4da7afe07523ff8930c4466b09a15db18508cd4.tar.gz kernel-f4da7afe07523ff8930c4466b09a15db18508cd4.zip | |
kexec_file: increase maximum file size to 4G
In some case initrd can be large. For example, it could be a netboot
image loaded by u-root, that is kexec'ing into it.
The maximum size of initrd is arbitrary set to 2G. Also, the limit is not
very obvious because it is hidden behind a generic INT_MAX macro.
Theoretically, we could make it LONG_MAX, but it is safer to keep it sane,
and just increase it to 4G.
Increase the size to 4G, and make it obvious by having a new macro that
specifies the maximum file size supported by kexec_file_load() syscall:
KEXEC_FILE_SIZE_MAX.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Pasha Tatashin <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Greg Thelen <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Baoquan He <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/error-inject.c')
0 files changed, 0 insertions, 0 deletions
