diff options
| author | Naoya Horiguchi <[email protected]> | 2021-09-02 21:57:07 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-09-03 16:58:14 +0000 |
| commit | 01c8d337d195ed105cabab95bc4dcb9e145bf5ea (patch) | |
| tree | 570950393dc1cb657872db03a686210417ccef31 /mm/sparse.c | |
| parent | mm: sparse: remove __section_nr() function (diff) | |
| download | kernel-01c8d337d195ed105cabab95bc4dcb9e145bf5ea.tar.gz kernel-01c8d337d195ed105cabab95bc4dcb9e145bf5ea.zip | |
mm/sparse: set SECTION_NID_SHIFT to 6
Currently SECTION_NID_SHIFT is set to 3, which is incorrect because bit 3
and 4 can be overlapped by sub-field for early NID, and can be
unexpectedly set on NUMA systems. There are a few non-critical issues
related to this:
- Having SECTION_TAINT_ZONE_DEVICE set for wrong sections forces
pfn_to_online_page() through the slow path, but doesn't actually break
the kernel.
- A kdump generation tool like makedumpfile uses this field to calculate
the physical address to read. So wrong bits can make the tool access to
wrong address and fail to create kdump. This can be avoided by the
tool, so it's not critical.
To fix it, set SECTION_NID_SHIFT to 6 which is the minimum number of
available bits of section flag field.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 1f90a3477df3 ("mm: teach pfn_to_online_page() about ZONE_DEVICE section collisions")
Signed-off-by: Naoya Horiguchi <[email protected]>
Reported-by: Kazuhito Hagio <[email protected]>
Suggested-by: Dan Williams <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Wang Wensheng <[email protected]>
Cc: Rui Xiang <[email protected]>
Cc: Kazu <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'mm/sparse.c')
0 files changed, 0 insertions, 0 deletions
