* [PATCH] powerpc/vdso: Mark the vDSO code read-only after init
@ 2024-12-14 11:09 Christophe Leroy
2025-01-01 9:08 ` Madhavan Srinivasan
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2024-12-14 11:09 UTC (permalink / raw)
To: Michael Ellerman, Nicholas Piggin, Naveen N Rao, Madhavan Srinivasan
Cc: Christophe Leroy, linux-kernel, linuxppc-dev
VDSO text is fixed-up during init so it can't be const,
but it can be read-only after init.
Do the same as x86 in commit 018ef8dcf3de ("x86/vdso: Mark the vDSO
code read-only after init") and arm in commit 11bf9b865898 ("ARM/vdso:
Mark the vDSO code read-only after init"), move it into
ro_after_init section.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/kernel/vdso32_wrapper.S | 2 +-
arch/powerpc/kernel/vdso64_wrapper.S | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/vdso32_wrapper.S b/arch/powerpc/kernel/vdso32_wrapper.S
index 10f92f265d51..20bca3548b44 100644
--- a/arch/powerpc/kernel/vdso32_wrapper.S
+++ b/arch/powerpc/kernel/vdso32_wrapper.S
@@ -2,7 +2,7 @@
#include <linux/linkage.h>
#include <asm/page.h>
- __PAGE_ALIGNED_DATA
+ .section ".data..ro_after_init", "aw"
.globl vdso32_start, vdso32_end
.balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vdso64_wrapper.S b/arch/powerpc/kernel/vdso64_wrapper.S
index 839d1a61411d..1912936fa227 100644
--- a/arch/powerpc/kernel/vdso64_wrapper.S
+++ b/arch/powerpc/kernel/vdso64_wrapper.S
@@ -2,7 +2,7 @@
#include <linux/linkage.h>
#include <asm/page.h>
- __PAGE_ALIGNED_DATA
+ .section ".data..ro_after_init", "aw"
.globl vdso64_start, vdso64_end
.balign PAGE_SIZE
--
2.47.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/vdso: Mark the vDSO code read-only after init
2024-12-14 11:09 [PATCH] powerpc/vdso: Mark the vDSO code read-only after init Christophe Leroy
@ 2025-01-01 9:08 ` Madhavan Srinivasan
0 siblings, 0 replies; 2+ messages in thread
From: Madhavan Srinivasan @ 2025-01-01 9:08 UTC (permalink / raw)
To: Michael Ellerman, Nicholas Piggin, Naveen N Rao, Christophe Leroy
Cc: linux-kernel, linuxppc-dev
On Sat, 14 Dec 2024 12:09:31 +0100, Christophe Leroy wrote:
> VDSO text is fixed-up during init so it can't be const,
> but it can be read-only after init.
>
> Do the same as x86 in commit 018ef8dcf3de ("x86/vdso: Mark the vDSO
> code read-only after init") and arm in commit 11bf9b865898 ("ARM/vdso:
> Mark the vDSO code read-only after init"), move it into
> ro_after_init section.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/vdso: Mark the vDSO code read-only after init
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=9fa9712644e04c4fd4de7e2d999edde3c9316823
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-01 9:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-14 11:09 [PATCH] powerpc/vdso: Mark the vDSO code read-only after init Christophe Leroy
2025-01-01 9:08 ` Madhavan Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®