Files
linux/lib
Suren Baghdasaryan e269b5d291 alloc_tag: fix module allocation tags populated area calculation
vm_module_tags_populate() calculation of the populated area assumes that
area starts at a page boundary and therefore when new pages are allocation,
the end of the area is page-aligned as well. If the start of the area is
not page-aligned then allocating a page and incrementing the end of the
area by PAGE_SIZE leads to an area at the end but within the area boundary
which is not populated. Accessing this are will lead to a kernel panic.
Fix the calculation by down-aligning the start of the area and using that
as the location allocated pages are mapped to.

[[email protected]: fix vm_module_tags_populate's KASAN poisoning logic]
  Link: https://lkml.kernel.org/r/[email protected]
[[email protected]: fix panic when CONFIG_KASAN enabled and CONFIG_KASAN_VMALLOC not enabled]
  Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 0f9b685626 ("alloc_tag: populate memory for module tags as needed")
Signed-off-by: Suren Baghdasaryan <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-lkp/[email protected]
Acked-by: Yu Zhao <[email protected]>
Tested-by: Adrian Huang <[email protected]> 
Cc: David Wang <[email protected]>
Cc: Kent Overstreet <[email protected]>
Cc: Mike Rapoport (Microsoft) <[email protected]>
Cc: Pasha Tatashin <[email protected]>
Cc: Sourav Panda <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2024-12-18 19:04:46 -08:00
..
…
…
…
…
2024-07-12 16:39:53 -07:00
2024-02-01 13:06:40 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-04-25 21:07:05 -07:00
…
…
…
2023-10-16 12:44:06 -04:00
…
2024-10-14 16:33:24 -05:00
…
2023-10-16 12:44:06 -04:00
…
…
…
…
2024-07-04 23:43:10 -07:00
2024-02-15 12:17:28 -05:00
…
…
2024-06-10 11:14:52 +01:00
…
…
2024-11-30 22:41:35 -05:00