android_kernel_motorola_sm6375/security/tomoyo
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tetsuo Handa c67efabddc tomoyo: don't emit warning in tomoyo_write_control()
[ Upstream commit 3df7546fc03b8f004eee0b9e3256369f7d096685 ]

syzbot is reporting too large allocation warning at tomoyo_write_control(),
for one can write a very very long line without new line character. To fix
this warning, I use __GFP_NOWARN rather than checking for KMALLOC_MAX_SIZE,
for practically a valid line should be always shorter than 32KB where the
"too small to fail" memory-allocation rule applies.

One might try to write a valid line that is longer than 32KB, but such
request will likely fail with -ENOMEM. Therefore, I feel that separately
returning -EINVAL when a line is longer than KMALLOC_MAX_SIZE is redundant.
There is no need to distinguish over-32KB and over-KMALLOC_MAX_SIZE.

Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=7536f77535e5210a5c76
Reported-by: Leo Stone <[email protected]>
Closes: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Tetsuo Handa <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2025-03-13 12:43:03 +01:00
..
policy
.gitignore
audit.c
common.c tomoyo: don't emit warning in tomoyo_write_control() 2025-03-13 12:43:03 +01:00
common.h
condition.c
domain.c tomoyo: fallback to realpath if symlink's pathname does not exist 2024-11-08 16:20:41 +01:00
environ.c
file.c
gc.c
group.c
Kconfig
load_policy.c TOMOYO: fix __setup handlers return values 2022-04-15 14:18:13 +02:00
Makefile tomoyo: fix broken dependency on *.conf.default 2023-02-06 07:52:35 +01:00
memory.c
mount.c
network.c
realpath.c
securityfs_if.c
tomoyo.c lsm: new security_file_ioctl_compat() hook 2024-02-23 08:25:15 +01:00
util.c