Skip to contentSkip to conversation

arm64: Use __pa_symbol for empty_zero_page

PATCH New Geert Uytterhoeven 3 participants 3 messages Jan 24, 2017 – Jan 25, 2017 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Use __pa_symbol for empty_zero_page

If CONFIG_DEBUG_VIRTUAL=y and CONFIG_ARM64_SW_TTBR0_PAN=y:

    virt_to_phys used for non-linear address: ffffff8008cc0000 (empty_zero_page+0x0/0x1000)
    WARNING: CPU: 0 PID: 0 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60
    ...
    [<ffffff800809abb4>] __virt_to_phys+0x28/0x60
    [<ffffff8008a02600>] setup_arch+0x46c/0x4d4
Fixes 2077be6783b5936c ("arm64: Use __pa_symbol for kernel symbols")
---
 arch/arm64/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/setup.c +1 -1
index 669fc9ff728b227f..b5222094ab52db6f 100644
@@ -298,7 +298,7 @@ void __init setup_arch(char **cmdline_p)
 	 * faults in case uaccess_enable() is inadvertently called by the init
 	 * thread.
 	 */
-	init_task.thread_info.ttbr0 = virt_to_phys(empty_zero_page);
+	init_task.thread_info.ttbr0 = __pa_symbol(empty_zero_page);
 #endif
 
 #ifdef CONFIG_VT
Signature · 1 line
1.9.1
reviewer
#1 lore raw

PATCH 1/1 arm64: Use __pa_symbol for empty_zero_page

Quoted 10 lines · Geert Uytterhoeven

If CONFIG_DEBUG_VIRTUAL=y and CONFIG_ARM64_SW_TTBR0_PAN=y:

    virt_to_phys used for non-linear address: ffffff8008cc0000 (empty_zero_page+0x0/0x1000)
    WARNING: CPU: 0 PID: 0 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60
    ...
    [<ffffff800809abb4>] __virt_to_phys+0x28/0x60
    [<ffffff8008a02600>] setup_arch+0x46c/0x4d4
Fixes 2077be6783b5936c ("arm64: Use __pa_symbol for kernel symbols")

Mark.

Quoted 20 lines
---
 arch/arm64/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/setup.c +1 -1
index 669fc9ff728b227f..b5222094ab52db6f 100644
@@ -298,7 +298,7 @@ void __init setup_arch(char **cmdline_p)
 	 * faults in case uaccess_enable() is inadvertently called by the init
 	 * thread.
 	 */
-	init_task.thread_info.ttbr0 = virt_to_phys(empty_zero_page);
+	init_task.thread_info.ttbr0 = __pa_symbol(empty_zero_page);
 #endif
 
 #ifdef CONFIG_VT
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/1 arm64: Use __pa_symbol for empty_zero_page

In reply to Geert Uytterhoeven
Quoted 20 lines · Geert Uytterhoeven

If CONFIG_DEBUG_VIRTUAL=y and CONFIG_ARM64_SW_TTBR0_PAN=y:

    virt_to_phys used for non-linear address: ffffff8008cc0000 (empty_zero_page+0x0/0x1000)
    WARNING: CPU: 0 PID: 0 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60
    ...
    [<ffffff800809abb4>] __virt_to_phys+0x28/0x60
    [<ffffff8008a02600>] setup_arch+0x46c/0x4d4
Fixes 2077be6783b5936c ("arm64: Use __pa_symbol for kernel symbols")
---
 arch/arm64/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/setup.c +0 -0
index 669fc9ff728b227f..b5222094ab52db6f 100644

arch/arm64/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 304

Quoted 8 lines
arch/arm64/kernel/setup.c +1 -1
@@ -298,7 +298,7 @@ void __init setup_arch(char **cmdline_p)
 	 * faults in case uaccess_enable() is inadvertently called by the init
 	 * thread.
 	 */
-	init_task.thread_info.ttbr0 = virt_to_phys(empty_zero_page);
+	init_task.thread_info.ttbr0 = __pa_symbol(empty_zero_page);
 #endif
 
 #ifdef CONFIG_VT

(thought I sent this yesterday but SMTP was not set correctly)