lkml.org 
[lkml]   [2022]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] Allow to kexec with initramfs larger than 2G
Date
Currently, the largest initramfs that is supported by kexec_file_load()
syscall is 2G.

This is because kernel_read_file() returns int, and is limited to
INT_MAX or 2G.

On the other hand, there are kexec based boot loaders (i.e. u-root),
that may need to boot netboot images that might be larger than 2G.

The first patch changes the return type from int to ssize_t in
kernel_read_file* functions.

The second patch increases the maximum initramfs file size to 4G.

Tested: verified that can kexec_file_load() works with 4G initramfs
on x86_64.

Pasha Tatashin (2):
fs/kernel_read_file: Allow to read files up-to ssize_t
kexec_file: Increase maximum file size to 4G

fs/kernel_read_file.c | 38 ++++++++++++++++----------------
include/linux/kernel_read_file.h | 32 +++++++++++++--------------
include/linux/limits.h | 1 +
kernel/kexec_file.c | 10 ++++++---
4 files changed, 43 insertions(+), 38 deletions(-)

--
2.36.1.124.g0e6072fb45-goog

\
 
 \ /
  Last update: 2022-05-27 04:57    [W:0.093 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site