aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorPratyush Yadav <pratyush@kernel.org>2025-08-26 14:38:16 +0200
committerAndrew Morton <akpm@linux-foundation.org>2025-09-13 16:55:18 -0700
commite76e09bdf9f7d58ccc62d416a4b90700000f145a (patch)
treea293ea28084ed5645e65610d82cfd2d85da51708 /mm/page_alloc.c
parentkmem/tracing: add kmem name to kmem_cache_alloc tracepoint (diff)
downloadlinux-e76e09bdf9f7d58ccc62d416a4b90700000f145a.tar.gz
linux-e76e09bdf9f7d58ccc62d416a4b90700000f145a.zip
kho: make sure kho_scratch argument is fully consumed
When specifying fixed sized scratch areas, the parser only parses the three scratch sizes and ignores the rest of the argument. This means the argument can have any bogus trailing characters. For example, "kho_scratch=256M,512M,512Mfoobar" results in successful parsing: [ 0.000000] KHO: scratch areas: lowmem: 256MiB global: 512MiB pernode: 512MiB It is generally a good idea to parse arguments as strictly as possible. In addition, if bogus trailing characters are allowed in the kho_scratch argument, it is possible that some people might end up using them and later extensions to the argument format will cause unexpected breakages. Make sure the argument is fully consumed after all three scratch sizes are parsed. With this change, the bogus argument "kho_scratch=256M,512M,512Mfoobar" results in: [ 0.000000] Malformed early option 'kho_scratch' Link: https://lkml.kernel.org/r/20250826123817.64681-1-pratyush@kernel.org Signed-off-by: Pratyush Yadav <pratyush@kernel.org> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Cc: Alexander Graf <graf@amazon.com> Cc: Baoquan He <bhe@redhat.com> Cc: Changyuan Lyu <changyuanl@google.com> Cc: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
0 files changed, 0 insertions, 0 deletions