lkml.org 
[lkml]   [2009]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/8] x86: mark altinstr-related sections in vDSO as broken
Date
There are several reasons why this does not work for the vDSO.

1. The alt_instr records are not processed by anybody.

The .altinstruction sections end up in the vDSO binary, which
is then incorporated verbatim inside a completely different
section, so it is not seen by the main kernel.

There is no code to interpret them during vDSO setup either.

2. The pointers in the alt_instr records are wrong.

They point to the instructions and replacements at the prelinked
addresses, but that's neither where the vDSO blob is located at
startup, nor where it is copied to by the vDSO setup.

The .altinstr_replacement section is not broken per se, but it is
useless dead code without the accompanying .alt_instr section.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
arch/x86/vdso/vdso-layout.lds.S | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/x86/vdso/vdso-layout.lds.S b/arch/x86/vdso/vdso-layout.lds.S
index 23da4a1..2f0830f 100644
--- a/arch/x86/vdso/vdso-layout.lds.S
+++ b/arch/x86/vdso/vdso-layout.lds.S
@@ -54,13 +54,6 @@ SECTIONS
*(.bss* .gnu.linkonce.b.*)
}

- .altinstructions : {
- *(.altinstructions)
- }
- .altinstr_replacement : {
- *(.altinstr_replacement)
- }
-
/*
* Align the actual code well away from the non-instruction data.
* This is the best thing for the I-cache.
@@ -78,6 +71,11 @@ SECTIONS
* if they get used by accident.
*/
.broken : {
+ /* The vDSO setup code does not handle alternative
+ * instructions.
+ */
+ *(.altinstructions)
+ *(.altinstr_replacement)
}
}

--
1.6.0.2


\
 
 \ /
  Last update: 2009-06-12 15:29    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site