From: Andy Lutomirski <luto@kernel.org>
To: x86@kernel.org, linux-kernel@vger.kernel.org
Cc: Brian Gerst <brgerst@gmail.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Borislav Petkov <bp@alien8.de>, Andy Lutomirski <luto@kernel.org>
Subject: [RFC 10/30] x86/vdso: Replace hex int80 CFI annotations with gas directives
Date: Tue, 1 Sep 2015 15:41:10 -0700 [thread overview]
Message-ID: <3f0d54f4a1ec568a3cd320dbf0a2fece985dcb09.1441146105.git.luto@kernel.org> (raw)
In-Reply-To: <cover.1441146105.git.luto@kernel.org>
In-Reply-To: <cover.1441146105.git.luto@kernel.org>
Maintaining the current CFI annotations written in R'lyehian is
difficult for most of us. Translate them to something a little
closer to English.
This will remove the CFI data for kernels built with extremely old
versions of binutils. I think this is a fair tradeoff for the
ability for mortals to edit the asm.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
arch/x86/entry/vdso/vdso32/system_call.S | 48 ++++++--------------------------
1 file changed, 8 insertions(+), 40 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso32/system_call.S b/arch/x86/entry/vdso/vdso32/system_call.S
index b15b7c01aedb..b52cbfbe119e 100644
--- a/arch/x86/entry/vdso/vdso32/system_call.S
+++ b/arch/x86/entry/vdso/vdso32/system_call.S
@@ -1,6 +1,10 @@
/*
* Code for the vDSO. This version uses the old int $0x80 method.
- *
+*/
+
+#include <asm/dwarf2.h>
+
+/*
* First get the common code for the sigreturn entry points.
* This must come first.
*/
@@ -11,46 +15,10 @@
.type __kernel_vsyscall,@function
ALIGN
__kernel_vsyscall:
-.LSTART_vsyscall:
+ CFI_STARTPROC
int $0x80
ret
-.LEND_vsyscall:
- .size __kernel_vsyscall,.-.LSTART_vsyscall
- .previous
-
- .section .eh_frame,"a",@progbits
-.LSTARTFRAMEDLSI:
- .long .LENDCIEDLSI-.LSTARTCIEDLSI
-.LSTARTCIEDLSI:
- .long 0 /* CIE ID */
- .byte 1 /* Version number */
- .string "zR" /* NUL-terminated augmentation string */
- .uleb128 1 /* Code alignment factor */
- .sleb128 -4 /* Data alignment factor */
- .byte 8 /* Return address register column */
- .uleb128 1 /* Augmentation value length */
- .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
- .byte 0x0c /* DW_CFA_def_cfa */
- .uleb128 4
- .uleb128 4
- .byte 0x88 /* DW_CFA_offset, column 0x8 */
- .uleb128 1
- .align 4
-.LENDCIEDLSI:
- .long .LENDFDEDLSI-.LSTARTFDEDLSI /* Length FDE */
-.LSTARTFDEDLSI:
- .long .LSTARTFDEDLSI-.LSTARTFRAMEDLSI /* CIE pointer */
- .long .LSTART_vsyscall-. /* PC-relative start address */
- .long .LEND_vsyscall-.LSTART_vsyscall
- .uleb128 0
- .align 4
-.LENDFDEDLSI:
- .previous
+ CFI_ENDPROC
- /*
- * Pad out the segment to match the size of the sysenter.S version.
- */
-VDSO32_vsyscall_eh_frame_size = 0x40
- .section .data,"aw",@progbits
- .space VDSO32_vsyscall_eh_frame_size-(.LENDFDEDLSI-.LSTARTFRAMEDLSI), 0
+ .size __kernel_vsyscall,.-__kernel_vsyscall
.previous
--
2.4.3
next prev parent reply other threads:[~2015-09-01 22:50 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 22:41 [RFC 00/30] x86: Rewrite all syscall entries except native 64-bit Andy Lutomirski
2015-09-01 22:41 ` [RFC 01/30] selftests/x86: Add a test for vDSO unwinding Andy Lutomirski
2015-09-01 22:41 ` [RFC 02/30] selftests/x86: Add a test for syscall restart and arg modification Andy Lutomirski
2015-09-01 22:41 ` [RFC 03/30] x86/entry/64/compat: Fix SYSENTER's NT flag before user memory access Andy Lutomirski
2015-09-01 22:41 ` [RFC 04/30] x86/entry: Move lockdep_sys_exit to prepare_exit_to_usermode Andy Lutomirski
2015-09-01 22:41 ` [RFC 05/30] x86/entry/64/compat: After SYSENTER, move STI after the NT fixup Andy Lutomirski
2015-09-01 22:41 ` [RFC 06/30] x86/sched/64: Don't save flags on context switch (reinstated) Andy Lutomirski
2015-09-24 17:11 ` Andy Lutomirski
2015-09-25 12:21 ` [tip:x86/asm] x86/sched/64: Don't save flags on context switch ( reinstated) tip-bot for Andy Lutomirski
2015-09-01 22:41 ` [RFC 07/30] x86/vdso: Remove runtime 32-bit vDSO selection Andy Lutomirski
2015-09-01 22:41 ` [RFC 08/30] x86/asm: Re-add manual CFI infrastructure Andy Lutomirski
2015-09-01 22:41 ` [RFC 09/30] x86/vdso: Define BUILD_VDSO while building and emit .eh_frame in asm Andy Lutomirski
2015-09-01 22:41 ` Andy Lutomirski [this message]
2015-09-01 22:41 ` [RFC 11/30] x86/vdso/32: Save extra registers in the INT80 vsyscall path Andy Lutomirski
2015-09-01 22:41 ` [RFC 12/30] x86/entry/64/compat: Disable SYSENTER and SYSCALL32 entries Andy Lutomirski
2015-09-01 22:41 ` [RFC 13/30] x86/entry/64/compat: Remove audit optimizations Andy Lutomirski
2015-09-01 22:41 ` [RFC 14/30] x86/entry/64/compat: Remove most of the fast system call machinery Andy Lutomirski
2015-09-01 22:41 ` [RFC 15/30] x86/entry/64/compat: Set up full pt_regs for all compat syscalls Andy Lutomirski
2015-09-01 22:41 ` [RFC 16/30] x86/entry/syscalls: Move syscall table declarations into asm/syscalls.h Andy Lutomirski
2015-09-01 22:41 ` [RFC 17/30] x86/syscalls: Give sys_call_ptr_t a useful type Andy Lutomirski
2015-09-01 22:41 ` [RFC 18/30] x86/entry: Add do_syscall_32, a C function to do 32-bit syscalls Andy Lutomirski
2015-09-01 22:41 ` [RFC 19/30] x86/entry/64/compat: Migrate the body of the syscall entry to C Andy Lutomirski
2015-09-01 22:41 ` [RFC 20/30] x86/entry: Add C code for fast system call entries Andy Lutomirski
2015-09-01 22:41 ` [RFC 21/30] x86/vdso/compat: Wire up SYSENTER and SYSCSALL for compat userspace Andy Lutomirski
2015-09-01 22:41 ` [RFC 22/30] x86/entry/compat: Implement opportunistic SYSRETL for compat syscalls Andy Lutomirski
2015-09-01 22:41 ` [RFC 23/30] x86/entry/32: Open-code return tracking from fork and kthreads Andy Lutomirski
2015-09-01 22:41 ` [RFC 24/30] x86/entry/32: Switch INT80 to the new C syscall path Andy Lutomirski
2015-09-03 16:45 ` Brian Gerst
2015-09-03 17:22 ` Andy Lutomirski
2015-09-01 22:41 ` [RFC 25/30] x86/entry/32: Re-implement SYSENTER using the new C path Andy Lutomirski
2015-09-01 22:41 ` [RFC 26/30] x86/asm: Remove thread_info.sysenter_return Andy Lutomirski
2015-09-01 22:41 ` [RFC 27/30] x86/entry: Remove unnecessary IRQ twiddling in fast 32-bit syscalls Andy Lutomirski
2015-09-01 22:41 ` [RFC 28/30] x86/entry: Make irqs_disabled checks in exit code depend on lockdep Andy Lutomirski
2015-09-01 22:41 ` [RFC 29/30] x86/entry: Force inlining of 32-bit syscall code Andy Lutomirski
2015-09-01 22:41 ` [RFC 30/30] x86/entry: Micro-optimize compat fast syscall arg fetch Andy Lutomirski
2015-09-03 5:23 ` [RFC 00/30] x86: Rewrite all syscall entries except native 64-bit Brian Gerst
2015-09-03 17:18 ` Andy Lutomirski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f0d54f4a1ec568a3cd320dbf0a2fece985dcb09.1441146105.git.luto@kernel.org \
--to=luto@kernel.org \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®