Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243332

[tip:x86/asm] x86/vdso: Replace hex int80 CFI annotations with GAS directives

From tip-bot for Andy Lutomirski <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:x86/asm] x86/vdso: Replace hex int80 CFI annotations with GAS directives
Date 2015-10-09 15:10 +0200
Message-ID <qhFAS-30e-21@gated-at.bofh.it> (permalink)
References <qgoLN-7cw-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Commit-ID:  29c0ce9508458ed31a9db2ed425f64c0d6d3ddfb
Gitweb:     http://git.kernel.org/tip/29c0ce9508458ed31a9db2ed425f64c0d6d3ddfb
Author:     Andy Lutomirski <luto@kernel.org>
AuthorDate: Mon, 5 Oct 2015 17:47:59 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 9 Oct 2015 09:41:06 +0200

x86/vdso: Replace hex int80 CFI annotations with GAS directives

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>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/ae3ff4ff5278b4bfc1e1dab368823469866d4b71.1444091584.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@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 b15b7c0..b52cbfb 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/36] x86: Rewrite all syscall entries except native 64-bit Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
  [PATCH v2 04/36] selftests/x86: Add a test for syscall restart and arg modification Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    [tip:x86/asm] selftests/x86:   Add a test for ptrace syscall restart and arg modification tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-07 18:20 +0200
  [PATCH v2 20/36] x86/entry: Add do_syscall_32, a C function to do 32-bit syscalls Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    [tip:x86/asm] x86/entry: Add do_syscall_32(),   a C function to do 32-bit syscalls tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-09 15:20 +0200
  [PATCH v2 13/36] x86/vdso/32: Save extra registers in the INT80 vsyscall path Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    [tip:x86/asm] x86/vdso/32:   Save extra registers in the INT80 vsyscall path tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-09 15:10 +0200
  [PATCH v2 11/36] x86/vdso: Replace hex int80 CFI annotations with gas directives Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    [tip:x86/asm] x86/vdso:   Replace hex int80 CFI annotations with GAS directives tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-09 15:10 +0200
  [PATCH v2 02/36] x86/uaccess: __chk_range_not_ok is unlikely to return true Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    Re: [PATCH v2 02/36] x86/uaccess: __chk_range_not_ok is unlikely to  return true Borislav Petkov <bp@alien8.de> - 2015-10-07 13:00 +0200
      Re: [PATCH v2 02/36] x86/uaccess: __chk_range_not_ok is unlikely to  return true Ingo Molnar <mingo@kernel.org> - 2015-10-07 18:30 +0200
    [tip:x86/asm] x86/uaccess: Add unlikely() to __chk_range_not_ok()   failure paths tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-07 18:20 +0200
  [PATCH v2 06/36] x86/entry: Move lockdep_sys_exit to prepare_exit_to_usermode Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    [tip:x86/asm] x86/entry, locking/lockdep: Move lockdep_sys_exit()   to prepare_exit_to_usermode() tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-07 18:20 +0200
      Re: [tip:x86/asm] x86/entry, locking/lockdep: Move  lockdep_sys_exit() to prepare_exit_to_usermode() Peter Zijlstra <peterz@infradead.org> - 2015-10-08 11:00 +0200
        Re: [tip:x86/asm] x86/entry, locking/lockdep: Move lockdep_sys_exit()  to prepare_exit_to_usermode() Andy Lutomirski <luto@amacapital.net> - 2015-10-09 21:40 +0200
  [PATCH v2 16/36] x86/entry/64/compat: Remove most of the fast system call machinery Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    [tip:x86/asm] x86/entry/64/compat:   Remove most of the fast system call machinery tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-09 15:20 +0200
  [PATCH v2 22/36] x86/entry: Add C code for fast system call entries Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    Re: [PATCH v2 22/36] x86/entry: Add C code for fast system call entries Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-06 10:30 +0200
      Re: [PATCH v2 22/36] x86/entry: Add C code for fast system call entries Andy Lutomirski <luto@amacapital.net> - 2015-10-06 20:30 +0200
    Re: [PATCH v2 22/36] x86/entry: Add C code for fast system call entries Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-06 10:30 +0200
    [tip:x86/asm] x86/entry: Add C code for fast system call entries tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-09 15:20 +0200
  [PATCH v2 30/36] x86/entry: Make irqs_disabled checks in exit code depend on lockdep Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    [tip:x86/asm] x86/entry:   Make irqs_disabled checks in exit code depend on lockdep tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-09 15:20 +0200
  [PATCH v2 15/36] x86/entry/64/compat: Remove audit optimizations Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    [tip:x86/asm] x86/entry/64/compat: Remove audit optimizations tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-09 15:20 +0200
  [PATCH v2 32/36] x86/entry: Micro-optimize compat fast syscall arg fetch Andy Lutomirski <luto@kernel.org> - 2015-10-06 03:00 +0200
    Re: [PATCH v2 32/36] x86/entry: Micro-optimize compat fast syscall  arg fetch Ingo Molnar <mingo@kernel.org> - 2015-10-09 09:40 +0200
      Re: [PATCH v2 32/36] x86/entry: Micro-optimize compat fast syscall  arg fetch Andy Lutomirski <luto@amacapital.net> - 2015-10-09 21:30 +0200
        Re: [PATCH v2 32/36] x86/entry: Micro-optimize compat fast syscall  arg fetch Ingo Molnar <mingo@kernel.org> - 2015-10-10 11:10 +0200
    [tip:x86/asm] x86/entry:   Micro-optimize compat fast syscall arg fetch tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2015-10-09 15:20 +0200
  Re: [PATCH v2 00/36] x86: Rewrite all syscall entries except native 64-bit Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-06 10:40 +0200
    Re: [PATCH v2 00/36] x86: Rewrite all syscall entries except native  64-bit Ingo Molnar <mingo@kernel.org> - 2015-10-06 11:00 +0200
    Re: [PATCH v2 00/36] x86: Rewrite all syscall entries except native 64-bit Andy Lutomirski <luto@amacapital.net> - 2015-10-06 20:30 +0200
  Re: [PATCH v2 00/36] x86: Rewrite all syscall entries except native  64-bit Ingo Molnar <mingo@kernel.org> - 2015-10-09 15:10 +0200
    Re: [PATCH v2 00/36] x86: Rewrite all syscall entries except native 64-bit Richard Weinberger <richard.weinberger@gmail.com> - 2015-10-12 20:40 +0200
      Re: [PATCH v2 00/36] x86: Rewrite all syscall entries except native 64-bit Andy Lutomirski <luto@amacapital.net> - 2015-10-12 20:50 +0200
        Re: [PATCH v2 00/36] x86: Rewrite all syscall entries except native  64-bit Richard Weinberger <richard@nod.at> - 2015-10-12 23:10 +0200

csiph-web