Skip to contentSkip to conversation

arm64: vdso: remove two .altinstructions related symbols

PATCH Applied Jisheng Zhang 3 participants 4 messages Jul 26, 2023 – Jul 27, 2023 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: vdso: remove two .altinstructions related symbols

The two symbols __alt_instructions and __alt_instructions_end are not used, remove them.

---
 arch/arm64/kernel/vdso/vdso.lds.S | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/kernel/vdso/vdso.lds.S +0 -2
index 6028f1fe2d1c..45354f2ddf70 100644
@@ -50,9 +50,7 @@ SECTIONS
 
 	. = ALIGN(4);
 	.altinstructions : {
-		__alt_instructions = .;
 		*(.altinstructions)
-		__alt_instructions_end = .;
 	}
 
 	.dynamic	: { *(.dynamic) }		:text	:dynamic
Signature · 1 line
2.40.1
maintainer
#1 lore raw
Quoted 13 lines · Jisheng Zhang

The two symbols __alt_instructions and __alt_instructions_end are not used, remove them.

---
 arch/arm64/kernel/vdso/vdso.lds.S | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/kernel/vdso/vdso.lds.S +0 -0
index 6028f1fe2d1c..45354f2ddf70 100644

arch/arm64/kernel/vdso/vdso.lds.S SECTIONS · line 54

Quoted 7 lines
arch/arm64/kernel/vdso/vdso.lds.S +0 -2
@@ -50,9 +50,7 @@ SECTIONS
 
 	. = ALIGN(4);
 	.altinstructions : {
-		__alt_instructions = .;
 		*(.altinstructions)
-		__alt_instructions_end = .;
 	}

If we don't need the symbols, then why do we need this section at all?

Will

#2 lore raw

Hi,

Quoted 15 lines · Will Deacon
Quoted 14 lines · Jisheng Zhang

The two symbols __alt_instructions and __alt_instructions_end are not used, remove them.

---
 arch/arm64/kernel/vdso/vdso.lds.S | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/kernel/vdso/vdso.lds.S +0 -0
index 6028f1fe2d1c..45354f2ddf70 100644
@@ -50,9 +50,7 @@ SECTIONS
 
Quoted 8 lines

arch/arm64/kernel/vdso/vdso.lds.S SECTIONS · line 54

Quoted 6 lines
arch/arm64/kernel/vdso/vdso.lds.S +0 -2
 	. = ALIGN(4);
 	.altinstructions : {
-		__alt_instructions = .;
 		*(.altinstructions)
-		__alt_instructions_end = .;
 	}

If we don't need the symbols, then why do we need this section at all?

Looks like it was a copy/paste from my commit 4e3bca8f7cdd ("arm64: alternative: patch alternatives in the vDSO"). The VDSO patching code searches for a section named '.altinstructions' by
reading the VDSO as an ELF file, and doesn't use the __alt_instructions / __alt_instructions_end symbols. The kernel patching code uses the
__alt_instructions symbol (from the vmlinux.ld.S linker script).

So it's safe to remove these, but the section itself needs to stay.

Thanks,
Joey

maintainer Applied
#3 lore raw
In reply to Jisheng Zhang
Quoted 4 lines · Jisheng Zhang

The two symbols __alt_instructions and __alt_instructions_end are not used, remove them.

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: vdso: remove two .altinstructions related symbols

      https://git.kernel.org/arm64/c/a96a7a7ddf95

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev