Skip to content

Commit c09327d

Browse files
bulwahnkees
authored andcommitted
x86: mm: refer to the intended config STRICT_DEVMEM in a comment
Commit a4866aa ("mm: Tighten x86 /dev/mem with zeroing reads") adds a comment to the function devmem_is_allowed() referring to a non-existing config STRICT_IOMEM, whereas the comment very likely intended to refer to the config STRICT_DEVMEM, as the commit adds some behavior for the config STRICT_DEVMEM. Most of the initial analysis was actually done by Dave Hansen in the email thread below (see Link). Refer to the intended and existing config STRICT_DEVMEM. Link: https://lore.kernel.org/r/[email protected]/ Suggested-by: Dave Hansen <[email protected]> Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 231af47 commit c09327d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ int devmem_is_allowed(unsigned long pagenr)
846846

847847
/*
848848
* This must follow RAM test, since System RAM is considered a
849-
* restricted resource under CONFIG_STRICT_IOMEM.
849+
* restricted resource under CONFIG_STRICT_DEVMEM.
850850
*/
851851
if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) {
852852
/* Low 1MB bypasses iomem restrictions. */

0 commit comments

Comments
 (0)