aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorYuxiao Zhang <[email protected]>2023-06-27 13:25:41 -0700
committerKees Cook <[email protected]>2023-08-17 15:18:24 -0700
commit104fd0b5e948157f8e8ac88a20b46ba8641d4e95 (patch)
treedd88e938e7515d17ef837a470b750599818143b8 /lib/test_fortify/write_overflow-strncpy-src.c
parentfe8c3623ab06603eb760444a032d426542212021 (diff)
pstore: Support record sizes larger than kmalloc() limit
Currently pstore record buffers are allocated using kmalloc() which has a maximum size based on page size. If a large "pmsg-size" module parameter is specified, pmsg will fail to copy the contents since memdup_user() is limited to kmalloc() allocation sizes. Since we don't need physically contiguous memory for any of the pstore record buffers, use kvzalloc() to avoid such limitations in the core of pstore and in the ram backend, and explicitly read from userspace using vmemdup_user(). This also means that any other backends that want to (or do already) support larger record sizes will Just Work now. Signed-off-by: Yuxiao Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Kees Cook <[email protected]> Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions