Skip to contentSkip to conversation

x86/boot: Drop stale comment about zeroing the stack

PATCH In review Andrew Cooper 3 participants 5 messages Sep 16, 2024 – Sep 23, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/boot: Drop stale comment about zeroing the stack

This used to be true, but was altered by commit 37786b23b027 ("x86/cet: Remove writeable mapping of the BSPs shadow stack") which moved cpu0_stack into .init.bss.stack_aligned.

Fixes 37786b23b027 ("x86/cet: Remove writeable mapping of the BSPs shadow stack")

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Frediano Ziglio <[email protected]>

---
 xen/arch/x86/boot/head.S | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
xen/arch/x86/boot/head.S +1 -5
index 12bbb97f33d4..cfc5a7b47d29 100644
@@ -652,11 +652,7 @@ trampoline_setup:
         cmpb    $0, sym_esi(efi_platform)
         jnz     1f
 
-        /*
-         * Initialise the BSS.
-         *
-         * !!! WARNING - also zeroes the current stack !!!
-         */
+        /* Initialise the BSS. */
         lea     sym_esi(__bss_start), %edi
         lea     sym_esi(__bss_end), %ecx
         sub     %edi,%ecx

base-commit: a8bf14f6f331d4f428010b4277b67c33f561ed19

Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw
Quoted 33 lines · Andrew Cooper

This used to be true, but was altered by commit 37786b23b027 ("x86/cet: Remove writeable mapping of the BSPs shadow stack") which moved cpu0_stack into .init.bss.stack_aligned.

Fixes 37786b23b027 ("x86/cet: Remove writeable mapping of the BSPs shadow stack")

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Frediano Ziglio <[email protected]>

---
 xen/arch/x86/boot/head.S | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
xen/arch/x86/boot/head.S +1 -5
index 12bbb97f33d4..cfc5a7b47d29 100644
@@ -652,11 +652,7 @@ trampoline_setup:
         cmpb    $0, sym_esi(efi_platform)
         jnz     1f
 
-        /*
-         * Initialise the BSS.
-         *
-         * !!! WARNING - also zeroes the current stack !!!
-         */
+        /* Initialise the BSS. */
         lea     sym_esi(__bss_start), %edi
         lea     sym_esi(__bss_end), %ecx
         sub     %edi,%ecx
Quoted 1 line

base-commit: a8bf14f6f331d4f428010b4277b67c33f561ed19

Nice to know!

Frediano

#2 lore raw
Quoted 34 lines · Frediano Ziglio
Quoted 32 lines · Andrew Cooper

This used to be true, but was altered by commit 37786b23b027 ("x86/cet: Remove writeable mapping of the BSPs shadow stack") which moved cpu0_stack into .init.bss.stack_aligned.

Fixes 37786b23b027 ("x86/cet: Remove writeable mapping of the BSPs shadow stack")

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Frediano Ziglio <[email protected]>

---
 xen/arch/x86/boot/head.S | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
xen/arch/x86/boot/head.S +1 -5
index 12bbb97f33d4..cfc5a7b47d29 100644
@@ -652,11 +652,7 @@ trampoline_setup:
         cmpb    $0, sym_esi(efi_platform)
         jnz     1f
 
-        /*
-         * Initialise the BSS.
-         *
-         * !!! WARNING - also zeroes the current stack !!!
-         */
+        /* Initialise the BSS. */
         lea     sym_esi(__bss_start), %edi
         lea     sym_esi(__bss_end), %ecx
         sub     %edi,%ecx
Quoted 2 lines
Quoted 1 line

base-commit: a8bf14f6f331d4f428010b4277b67c33f561ed19

Nice to know!

Indeed, and it certainly helps one of your rearranging patches.

Quoted 1 line

Thanks.

~Andrew

Acked-by
#3 lore raw
In reply to Frediano Ziglio
Quoted 9 lines · Frediano Ziglio
Quoted 7 lines · Andrew Cooper

This used to be true, but was altered by commit 37786b23b027 ("x86/cet: Remove writeable mapping of the BSPs shadow stack") which moved cpu0_stack into .init.bss.stack_aligned.

Fixes 37786b23b027 ("x86/cet: Remove writeable mapping of the BSPs shadow stack")
Quoted 16 lines
Quoted 16 lines
xen/arch/x86/boot/head.S +1 -5
@@ -652,11 +652,7 @@ trampoline_setup:
         cmpb    $0, sym_esi(efi_platform)
         jnz     1f
 
-        /*
-         * Initialise the BSS.
-         *
-         * !!! WARNING - also zeroes the current stack !!!
-         */
+        /* Initialise the BSS. */
         lea     sym_esi(__bss_start), %edi
         lea     sym_esi(__bss_end), %ecx
         sub     %edi,%ecx
Quoted 5 lines
Quoted 1 line

base-commit: a8bf14f6f331d4f428010b4277b67c33f561ed19

Nice to know!

Frediano, just FYI on the formal aspects here (which we don't always follow to the letter, but still): If you had offered Reviewed-by:, Andrew would have been fine to commit with just that. You can't just ack anything you're not maintainer for (or really: you can, but formally it has no meaning).

Jan

#4 lore raw
Quoted 1 line · Jan Beulich

...

Quoted 9 lines
Quoted 2 lines

Frediano, just FYI on the formal aspects here (which we don't always follow to the letter, but still): If you had offered Reviewed-by:, Andrew would have been fine to commit with just that. You can't just ack anything you're not maintainer for (or really: you can, but formally it has no meaning).

Jan

It makes sense, thanks

Frediano