* [PATCH 0/3] x86/entry: Fixlets after the big entry series
@ 2015-10-13 0:32 Andy Lutomirski
2015-10-13 0:32 ` [PATCH 1/3] selftests/x86: Style fixes for unwind_vdso Andy Lutomirski
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Andy Lutomirski @ 2015-10-13 0:32 UTC (permalink / raw)
To: x86, linux-kernel
Cc: Brian Gerst, Denys Vlasenko, Linus Torvalds, Borislav Petkov,
Andy Lutomirski
Patch 1 fixes some style problems that Borislav noticed. Patch 2
deletes unused macros at Ingo's request. Patch 3 fixes the UML
build. (I haven't confirmed that UML *works*, but that should be
easy to check.)
Andy Lutomirski (3):
selftests/x86: Style fixes for unwind_vdso
x86/asm: Remove the xyz_cfi macros from dwarf2.h
um: Fix build after x86 syscall changes
arch/x86/include/asm/dwarf2.h | 93 -------------------------------
arch/x86/um/asm/syscall.h | 4 ++
tools/testing/selftests/x86/unwind_vdso.c | 6 +-
3 files changed, 8 insertions(+), 95 deletions(-)
--
2.4.3
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] selftests/x86: Style fixes for unwind_vdso 2015-10-13 0:32 [PATCH 0/3] x86/entry: Fixlets after the big entry series Andy Lutomirski @ 2015-10-13 0:32 ` Andy Lutomirski 2015-10-14 15:29 ` [tip:x86/asm] selftests/x86: Style fixes for the 'unwind_vdso' test tip-bot for Andy Lutomirski 2015-10-13 0:32 ` [PATCH 2/3] x86/asm: Remove the xyz_cfi macros from dwarf2.h Andy Lutomirski 2015-10-13 0:32 ` [PATCH 3/3] um: Fix build after x86 syscall changes Andy Lutomirski 2 siblings, 1 reply; 7+ messages in thread From: Andy Lutomirski @ 2015-10-13 0:32 UTC (permalink / raw) To: x86, linux-kernel Cc: Brian Gerst, Denys Vlasenko, Linus Torvalds, Borislav Petkov, Andy Lutomirski checkpatch is really quite bad for user code like this, but it caught two legit style issues. Reported-by: Borislav Petkov <bp@suse.de> Signed-off-by: Andy Lutomirski <luto@kernel.org> --- tools/testing/selftests/x86/unwind_vdso.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/x86/unwind_vdso.c b/tools/testing/selftests/x86/unwind_vdso.c index 5992ff24ab83..00a26a82fa98 100644 --- a/tools/testing/selftests/x86/unwind_vdso.c +++ b/tools/testing/selftests/x86/unwind_vdso.c @@ -134,7 +134,7 @@ _Unwind_Reason_Code trace_fn(struct _Unwind_Context * ctx, void *opaque) static void sigtrap(int sig, siginfo_t *info, void *ctx_void) { - ucontext_t *ctx = (ucontext_t*)ctx_void; + ucontext_t *ctx = (ucontext_t *)ctx_void; struct unwind_state state; unsigned long ip = ctx->uc_mcontext.gregs[REG_EIP]; @@ -192,7 +192,9 @@ int main() * affected by libc/19006 (https://sourceware.org/PR19006). */ printf("[WARN]\tsyscall(2) didn't enter AT_SYSINFO\n"); - } if (get_eflags() & X86_EFLAGS_TF) { + } + + if (get_eflags() & X86_EFLAGS_TF) { printf("[FAIL]\tTF is still set\n"); nerrs++; } -- 2.4.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [tip:x86/asm] selftests/x86: Style fixes for the 'unwind_vdso' test 2015-10-13 0:32 ` [PATCH 1/3] selftests/x86: Style fixes for unwind_vdso Andy Lutomirski @ 2015-10-14 15:29 ` tip-bot for Andy Lutomirski 0 siblings, 0 replies; 7+ messages in thread From: tip-bot for Andy Lutomirski @ 2015-10-14 15:29 UTC (permalink / raw) To: linux-tip-commits Cc: bp, linux-kernel, torvalds, hpa, mingo, peterz, luto, dvlasenk, tglx, bp, brgerst Commit-ID: 893a3ec27e1dae62a904f78d53244001979748a6 Gitweb: http://git.kernel.org/tip/893a3ec27e1dae62a904f78d53244001979748a6 Author: Andy Lutomirski <luto@kernel.org> AuthorDate: Mon, 12 Oct 2015 17:32:12 -0700 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Wed, 14 Oct 2015 16:56:28 +0200 selftests/x86: Style fixes for the 'unwind_vdso' test Checkpatch is really quite bad for user code like this, but it caught two legit style issues. Reported-by: Borislav Petkov <bp@suse.de> Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/3335040bdd40d2bca4b1a28a3f8b165361c801b7.1444696194.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> --- tools/testing/selftests/x86/unwind_vdso.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/x86/unwind_vdso.c b/tools/testing/selftests/x86/unwind_vdso.c index 5992ff2..00a26a8 100644 --- a/tools/testing/selftests/x86/unwind_vdso.c +++ b/tools/testing/selftests/x86/unwind_vdso.c @@ -134,7 +134,7 @@ _Unwind_Reason_Code trace_fn(struct _Unwind_Context * ctx, void *opaque) static void sigtrap(int sig, siginfo_t *info, void *ctx_void) { - ucontext_t *ctx = (ucontext_t*)ctx_void; + ucontext_t *ctx = (ucontext_t *)ctx_void; struct unwind_state state; unsigned long ip = ctx->uc_mcontext.gregs[REG_EIP]; @@ -192,7 +192,9 @@ int main() * affected by libc/19006 (https://sourceware.org/PR19006). */ printf("[WARN]\tsyscall(2) didn't enter AT_SYSINFO\n"); - } if (get_eflags() & X86_EFLAGS_TF) { + } + + if (get_eflags() & X86_EFLAGS_TF) { printf("[FAIL]\tTF is still set\n"); nerrs++; } ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] x86/asm: Remove the xyz_cfi macros from dwarf2.h 2015-10-13 0:32 [PATCH 0/3] x86/entry: Fixlets after the big entry series Andy Lutomirski 2015-10-13 0:32 ` [PATCH 1/3] selftests/x86: Style fixes for unwind_vdso Andy Lutomirski @ 2015-10-13 0:32 ` Andy Lutomirski 2015-10-14 15:29 ` [tip:x86/asm] " tip-bot for Andy Lutomirski 2015-10-13 0:32 ` [PATCH 3/3] um: Fix build after x86 syscall changes Andy Lutomirski 2 siblings, 1 reply; 7+ messages in thread From: Andy Lutomirski @ 2015-10-13 0:32 UTC (permalink / raw) To: x86, linux-kernel Cc: Brian Gerst, Denys Vlasenko, Linus Torvalds, Borislav Petkov, Andy Lutomirski They are currently unused, and I don't think that anyone was ever particularly happy with them. They had the unfortunate property that they made it easy to CFI-annotate things without thinking about them -- when pushing, do you want to just update the CFA offset, or do you also want to update the saved location of the register being pushed? Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andy Lutomirski <luto@kernel.org> --- arch/x86/include/asm/dwarf2.h | 93 ------------------------------------------- 1 file changed, 93 deletions(-) diff --git a/arch/x86/include/asm/dwarf2.h b/arch/x86/include/asm/dwarf2.h index 09133ba032b3..b7a1ab865d68 100644 --- a/arch/x86/include/asm/dwarf2.h +++ b/arch/x86/include/asm/dwarf2.h @@ -81,97 +81,4 @@ #endif -/* - * An attempt to make CFI annotations more or less - * correct and shorter. It is implied that you know - * what you're doing if you use them. - */ -#ifdef __ASSEMBLY__ -#ifdef CONFIG_X86_64 - .macro pushq_cfi reg - pushq \reg - CFI_ADJUST_CFA_OFFSET 8 - .endm - - .macro pushq_cfi_reg reg - pushq %\reg - CFI_ADJUST_CFA_OFFSET 8 - CFI_REL_OFFSET \reg, 0 - .endm - - .macro popq_cfi reg - popq \reg - CFI_ADJUST_CFA_OFFSET -8 - .endm - - .macro popq_cfi_reg reg - popq %\reg - CFI_ADJUST_CFA_OFFSET -8 - CFI_RESTORE \reg - .endm - - .macro pushfq_cfi - pushfq - CFI_ADJUST_CFA_OFFSET 8 - .endm - - .macro popfq_cfi - popfq - CFI_ADJUST_CFA_OFFSET -8 - .endm - - .macro movq_cfi reg offset=0 - movq %\reg, \offset(%rsp) - CFI_REL_OFFSET \reg, \offset - .endm - - .macro movq_cfi_restore offset reg - movq \offset(%rsp), %\reg - CFI_RESTORE \reg - .endm -#else /*!CONFIG_X86_64*/ - .macro pushl_cfi reg - pushl \reg - CFI_ADJUST_CFA_OFFSET 4 - .endm - - .macro pushl_cfi_reg reg - pushl %\reg - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET \reg, 0 - .endm - - .macro popl_cfi reg - popl \reg - CFI_ADJUST_CFA_OFFSET -4 - .endm - - .macro popl_cfi_reg reg - popl %\reg - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE \reg - .endm - - .macro pushfl_cfi - pushfl - CFI_ADJUST_CFA_OFFSET 4 - .endm - - .macro popfl_cfi - popfl - CFI_ADJUST_CFA_OFFSET -4 - .endm - - .macro movl_cfi reg offset=0 - movl %\reg, \offset(%esp) - CFI_REL_OFFSET \reg, \offset - .endm - - .macro movl_cfi_restore offset reg - movl \offset(%esp), %\reg - CFI_RESTORE \reg - .endm -#endif /*!CONFIG_X86_64*/ -#endif /*__ASSEMBLY__*/ - #endif /* _ASM_X86_DWARF2_H */ -- 2.4.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [tip:x86/asm] x86/asm: Remove the xyz_cfi macros from dwarf2.h 2015-10-13 0:32 ` [PATCH 2/3] x86/asm: Remove the xyz_cfi macros from dwarf2.h Andy Lutomirski @ 2015-10-14 15:29 ` tip-bot for Andy Lutomirski 0 siblings, 0 replies; 7+ messages in thread From: tip-bot for Andy Lutomirski @ 2015-10-14 15:29 UTC (permalink / raw) To: linux-tip-commits Cc: torvalds, dvlasenk, hpa, bp, tglx, peterz, linux-kernel, luto, mingo, brgerst Commit-ID: af22aa7c766d50712b9afeca53e9e4208ce6284c Gitweb: http://git.kernel.org/tip/af22aa7c766d50712b9afeca53e9e4208ce6284c Author: Andy Lutomirski <luto@kernel.org> AuthorDate: Mon, 12 Oct 2015 17:32:13 -0700 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Wed, 14 Oct 2015 16:56:28 +0200 x86/asm: Remove the xyz_cfi macros from dwarf2.h They are currently unused, and I don't think that anyone was ever particularly happy with them. They had the unfortunate property that they made it easy to CFI-annotate things without thinking about them -- when pushing, do you want to just update the CFA offset, or do you also want to update the saved location of the register being pushed? Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1447bfbd10bb268b4593b32534ecefa1f4df287e.1444696194.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> --- arch/x86/include/asm/dwarf2.h | 93 ------------------------------------------- 1 file changed, 93 deletions(-) diff --git a/arch/x86/include/asm/dwarf2.h b/arch/x86/include/asm/dwarf2.h index 09133ba..b7a1ab8 100644 --- a/arch/x86/include/asm/dwarf2.h +++ b/arch/x86/include/asm/dwarf2.h @@ -81,97 +81,4 @@ #endif -/* - * An attempt to make CFI annotations more or less - * correct and shorter. It is implied that you know - * what you're doing if you use them. - */ -#ifdef __ASSEMBLY__ -#ifdef CONFIG_X86_64 - .macro pushq_cfi reg - pushq \reg - CFI_ADJUST_CFA_OFFSET 8 - .endm - - .macro pushq_cfi_reg reg - pushq %\reg - CFI_ADJUST_CFA_OFFSET 8 - CFI_REL_OFFSET \reg, 0 - .endm - - .macro popq_cfi reg - popq \reg - CFI_ADJUST_CFA_OFFSET -8 - .endm - - .macro popq_cfi_reg reg - popq %\reg - CFI_ADJUST_CFA_OFFSET -8 - CFI_RESTORE \reg - .endm - - .macro pushfq_cfi - pushfq - CFI_ADJUST_CFA_OFFSET 8 - .endm - - .macro popfq_cfi - popfq - CFI_ADJUST_CFA_OFFSET -8 - .endm - - .macro movq_cfi reg offset=0 - movq %\reg, \offset(%rsp) - CFI_REL_OFFSET \reg, \offset - .endm - - .macro movq_cfi_restore offset reg - movq \offset(%rsp), %\reg - CFI_RESTORE \reg - .endm -#else /*!CONFIG_X86_64*/ - .macro pushl_cfi reg - pushl \reg - CFI_ADJUST_CFA_OFFSET 4 - .endm - - .macro pushl_cfi_reg reg - pushl %\reg - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET \reg, 0 - .endm - - .macro popl_cfi reg - popl \reg - CFI_ADJUST_CFA_OFFSET -4 - .endm - - .macro popl_cfi_reg reg - popl %\reg - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE \reg - .endm - - .macro pushfl_cfi - pushfl - CFI_ADJUST_CFA_OFFSET 4 - .endm - - .macro popfl_cfi - popfl - CFI_ADJUST_CFA_OFFSET -4 - .endm - - .macro movl_cfi reg offset=0 - movl %\reg, \offset(%esp) - CFI_REL_OFFSET \reg, \offset - .endm - - .macro movl_cfi_restore offset reg - movl \offset(%esp), %\reg - CFI_RESTORE \reg - .endm -#endif /*!CONFIG_X86_64*/ -#endif /*__ASSEMBLY__*/ - #endif /* _ASM_X86_DWARF2_H */ ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] um: Fix build after x86 syscall changes 2015-10-13 0:32 [PATCH 0/3] x86/entry: Fixlets after the big entry series Andy Lutomirski 2015-10-13 0:32 ` [PATCH 1/3] selftests/x86: Style fixes for unwind_vdso Andy Lutomirski 2015-10-13 0:32 ` [PATCH 2/3] x86/asm: Remove the xyz_cfi macros from dwarf2.h Andy Lutomirski @ 2015-10-13 0:32 ` Andy Lutomirski 2015-10-14 15:30 ` [tip:x86/asm] um/x86: " tip-bot for Andy Lutomirski 2 siblings, 1 reply; 7+ messages in thread From: Andy Lutomirski @ 2015-10-13 0:32 UTC (permalink / raw) To: x86, linux-kernel Cc: Brian Gerst, Denys Vlasenko, Linus Torvalds, Borislav Petkov, Andy Lutomirski I didn't realize that um didn't include x86's asm/syscall.h. Re-add a missing typedef. Reported-by: Richard Weinberger <richard@nod.at> Fixes: 034042cc1e28 ("x86/entry/syscalls: Move syscall table declarations into asm/syscalls.h") Signed-off-by: Andy Lutomirski <luto@kernel.org> --- arch/x86/um/asm/syscall.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/um/asm/syscall.h b/arch/x86/um/asm/syscall.h index 9fe77b7b5a0e..81d6562ce01d 100644 --- a/arch/x86/um/asm/syscall.h +++ b/arch/x86/um/asm/syscall.h @@ -3,6 +3,10 @@ #include <uapi/linux/audit.h> +typedef asmlinkage long (*sys_call_ptr_t)(unsigned long, unsigned long, + unsigned long, unsigned long, + unsigned long, unsigned long); + static inline int syscall_get_arch(void) { #ifdef CONFIG_X86_32 -- 2.4.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [tip:x86/asm] um/x86: Fix build after x86 syscall changes 2015-10-13 0:32 ` [PATCH 3/3] um: Fix build after x86 syscall changes Andy Lutomirski @ 2015-10-14 15:30 ` tip-bot for Andy Lutomirski 0 siblings, 0 replies; 7+ messages in thread From: tip-bot for Andy Lutomirski @ 2015-10-14 15:30 UTC (permalink / raw) To: linux-tip-commits Cc: torvalds, dvlasenk, bp, luto, peterz, linux-kernel, brgerst, hpa, tglx, mingo, richard Commit-ID: 612bece654ff6cd43160e201985be826e96b8bcb Gitweb: http://git.kernel.org/tip/612bece654ff6cd43160e201985be826e96b8bcb Author: Andy Lutomirski <luto@kernel.org> AuthorDate: Mon, 12 Oct 2015 17:32:14 -0700 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Wed, 14 Oct 2015 16:56:28 +0200 um/x86: Fix build after x86 syscall changes I didn't realize that um didn't include x86's asm/syscall.h. Re-add a missing typedef. Reported-by: Richard Weinberger <richard@nod.at> Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: 034042cc1e28 ("x86/entry/syscalls: Move syscall table declarations into asm/syscalls.h") Link: http://lkml.kernel.org/r/8d15b9a88f4fd49e3342757e0a34624ee5ce9220.1444696194.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> --- arch/x86/um/asm/syscall.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/um/asm/syscall.h b/arch/x86/um/asm/syscall.h index 9fe77b7..81d6562 100644 --- a/arch/x86/um/asm/syscall.h +++ b/arch/x86/um/asm/syscall.h @@ -3,6 +3,10 @@ #include <uapi/linux/audit.h> +typedef asmlinkage long (*sys_call_ptr_t)(unsigned long, unsigned long, + unsigned long, unsigned long, + unsigned long, unsigned long); + static inline int syscall_get_arch(void) { #ifdef CONFIG_X86_32 ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-14 15:31 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-13 0:32 [PATCH 0/3] x86/entry: Fixlets after the big entry series Andy Lutomirski 2015-10-13 0:32 ` [PATCH 1/3] selftests/x86: Style fixes for unwind_vdso Andy Lutomirski 2015-10-14 15:29 ` [tip:x86/asm] selftests/x86: Style fixes for the 'unwind_vdso' test tip-bot for Andy Lutomirski 2015-10-13 0:32 ` [PATCH 2/3] x86/asm: Remove the xyz_cfi macros from dwarf2.h Andy Lutomirski 2015-10-14 15:29 ` [tip:x86/asm] " tip-bot for Andy Lutomirski 2015-10-13 0:32 ` [PATCH 3/3] um: Fix build after x86 syscall changes Andy Lutomirski 2015-10-14 15:30 ` [tip:x86/asm] um/x86: " tip-bot for Andy Lutomirski
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.