linux-yocto/fs/pstore
Kees Cook 7ef54a11c1 pstore: Change kmsg_bytes storage size to u32
[ Upstream commit 5674609535bafa834ab014d90d9bbe8e89223a0b ]

The types around kmsg_bytes were inconsistent. The global was unsigned
long, the argument to pstore_set_kmsg_bytes() was int, and the filesystem
option was u32. Given other internal limits, there's not much sense
in making a single pstore record larger than INT_MAX and it can't be
negative, so use u32 everywhere. Additionally, use READ/WRITE_ONCE and a
local variable in pstore_dump() to avoid kmsg_bytes changing during a
dump.

Link: https://lore.kernel.org/r/20250206191655.work.798-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:42:11 +02:00
..
blk.c pstore/blk: trivial typo fixes 2025-02-08 09:51:42 +01:00
ftrace.c
inode.c pstore: Change kmsg_bytes storage size to u32 2025-06-04 14:42:11 +02:00
internal.h pstore: Change kmsg_bytes storage size to u32 2025-06-04 14:42:11 +02:00
Kconfig
Makefile
platform.c pstore: Change kmsg_bytes storage size to u32 2025-06-04 14:42:11 +02:00
pmsg.c
ram_core.c
ram_internal.h
ram.c pstore/ram: Fix crash when setting number of cpus to an odd number 2024-02-05 20:14:16 +00:00
zone.c pstore/zone: Add a null pointer check to the psz_kmsg_read 2024-04-13 13:07:31 +02:00