Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221448
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v12 16/21] x86/asm/crypto: Create stack frames in clmul_ghash_mul/update() |
| Date | 2015-09-09 15:40 +0200 |
| Message-ID | <q6NLs-4vi-3@gated-at.bofh.it> (permalink) |
| References | <q6NBL-4jS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
clmul_ghash_mul() and clmul_ghash_update() are callable non-leaf functions which don't honor CONFIG_FRAME_POINTER, which can result in bad stack traces. Create stack frames for them when CONFIG_FRAME_POINTER is enabled. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "David S. Miller" <davem@davemloft.net> --- arch/x86/crypto/ghash-clmulni-intel_asm.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/crypto/ghash-clmulni-intel_asm.S b/arch/x86/crypto/ghash-clmulni-intel_asm.S index 5d1e007..eed55c8 100644 --- a/arch/x86/crypto/ghash-clmulni-intel_asm.S +++ b/arch/x86/crypto/ghash-clmulni-intel_asm.S @@ -18,6 +18,7 @@ #include <linux/linkage.h> #include <asm/inst.h> +#include <asm/frame.h> .data @@ -94,6 +95,7 @@ ENDPROC(__clmul_gf128mul_ble) /* void clmul_ghash_mul(char *dst, const u128 *shash) */ ENTRY(clmul_ghash_mul) + FRAME_BEGIN movups (%rdi), DATA movups (%rsi), SHASH movaps .Lbswap_mask, BSWAP @@ -101,6 +103,7 @@ ENTRY(clmul_ghash_mul) call __clmul_gf128mul_ble PSHUFB_XMM BSWAP DATA movups DATA, (%rdi) + FRAME_END ret ENDPROC(clmul_ghash_mul) @@ -109,6 +112,7 @@ ENDPROC(clmul_ghash_mul) * const u128 *shash); */ ENTRY(clmul_ghash_update) + FRAME_BEGIN cmp $16, %rdx jb .Lupdate_just_ret # check length movaps .Lbswap_mask, BSWAP @@ -128,5 +132,6 @@ ENTRY(clmul_ghash_update) PSHUFB_XMM BSWAP DATA movups DATA, (%rdi) .Lupdate_just_ret: + FRAME_END ret ENDPROC(clmul_ghash_update) -- 2.4.3 -- 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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v12 00/21] Compile-time stack metadata validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:30 +0200
[PATCH v12 16/21] x86/asm/crypto: Create stack frames in clmul_ghash_mul/update() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 21/21] x86/asm/power: Create stack frames in hibernate_asm_64.S Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 15/21] x86/asm/crypto: Move jump_table to .rodata section Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 17/21] x86/asm/entry: Create stack frames in thunk functions Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 05/21] x86/stacktool: Add file and directory ignores Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 19/21] x86/asm: Create stack frames in rwsem functions Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 18/21] x86/asm/acpi: Create a stack frame in do_suspend_lowlevel() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 20/21] x86/asm/efi: Create a stack frame in efi_call() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
Re: [PATCH v12 00/21] Compile-time stack metadata validation Chris J Arges <chris.j.arges@canonical.com> - 2015-09-15 19:00 +0200
Re: [PATCH v12 00/21] Compile-time stack metadata validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-15 20:20 +0200
[PATCH 3/3] kprobes/x86: stacktool: ignore kretprobe_trampoline_holder Chris J Arges <chris.j.arges@canonical.com> - 2015-09-18 00:20 +0200
Re: [PATCH 3/3] kprobes/x86: stacktool: ignore kretprobe_trampoline_holder Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-18 16:10 +0200
[PATCH 2/3] x86/stacktool: Ignore head_$(BITS) files. Chris J Arges <chris.j.arges@canonical.com> - 2015-09-18 00:20 +0200
Re: [PATCH 2/3] x86/stacktool: Ignore head_$(BITS) files. Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-18 16:00 +0200
[PATCH 1/3] x86/uaccess: Add stack frame output operand in get_user inline asm Chris J Arges <chris.j.arges@canonical.com> - 2015-09-18 00:20 +0200
Re: [PATCH 1/3] x86/uaccess: Add stack frame output operand in get_user inline asm Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-18 16:00 +0200
[PATCH 0/3] A few stacktool warning fixes. Chris J Arges <chris.j.arges@canonical.com> - 2015-09-18 00:20 +0200
csiph-web