Skip to contentSkip to conversation

x86: mm: refer to the intended config STRICT_DEVMEM in a comment

PATCH Superseded Lukas Bulwahn 1 participant 1 message Dec 22, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: mm: refer to the intended config STRICT_DEVMEM in a comment

Commit a4866aa81251 ("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.

---
 arch/x86/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/init.c +1 -1
index 4ba024d5b63a..64ac8a5e928a 100644
@@ -847,7 +847,7 @@ int devmem_is_allowed(unsigned long pagenr)
 
 	/*
 	 * This must follow RAM test, since System RAM is considered a
-	 * restricted resource under CONFIG_STRICT_IOMEM.
+	 * restricted resource under CONFIG_STRICT_DEVMEM.
 	 */
 	if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) {
 		/* Low 1MB bypasses iomem restrictions. */
Signature · 1 line
2.17.1