Skip to contentSkip to conversation

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

PATCH RESEND Applied Lukas Bulwahn 3 participants 3 messages Jul 7, 2022 – Jul 8, 2022

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

PATCH RESEND 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.

---
v1: https://lore.kernel.org/all/[email protected]/

 arch/x86/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/init.c +1 -1
index d8cfce221275..5d747a1923cb 100644
@@ -846,7 +846,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
merge bot Applied
#1 lore raw

[tip: x86/cleanups] x86/mm: Refer to the intended config STRICT_DEVMEM in a comment

The following commit has been merged into the x86/cleanups branch of tip:

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     9de76f41ea2188f2784f48352f9278819d249afc
Gitweb:        https://git.kernel.org/tip/9de76f41ea2188f2784f48352f9278819d249afc
Author:        Lukas Bulwahn <[email protected]>
AuthorDate:    Thu, 07 Jul 2022 13:54:42 +02:00
Committer:     Dave Hansen <[email protected]>
CommitterDate: Thu, 07 Jul 2022 09:51:36 -07:00

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 d8cfce2..5d747a1 100644
@@ -846,7 +846,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. */
Applied
#2 lore raw
In reply to Lukas Bulwahn
Quoted 10 lines · Lukas Bulwahn

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).

[...]

Applied to for-next/hardening, thanks!

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

      https://git.kernel.org/kees/c/c09327d5673e
Signature · 1 line
Kees Cook