Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1230391
| Path | csiph.com!au2pb.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v13 16/23] x86/asm/crypto: Create stack frames in clmul_ghash_mul/update() |
| Date | Tue, 22 Sep 2015 18:00:04 +0200 |
| Message-ID | <qby96-1o7-65@gated-at.bofh.it> (permalink) |
| References | <qbxZn-1c3-5@gated-at.bofh.it> |
| X-Original-To | Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, x86@kernel.org |
| X-Scanned-By | MIMEDefang 2.68 on 10.5.11.26 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 64 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Michal Marek <mmarek@suse.cz>, Peter Zijlstra <peterz@infradead.org>, Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>, Linus Torvalds <torvalds@linux-foundation.org>, Andi Kleen <andi@firstfloor.org>, Pedro Alves <palves@redhat.com>, Namhyung Kim <namhyung@gmail.com>, Bernd Petrovitsch <bernd@petrovitsch.priv.at>, Chris J Arges <chris.j.arges@canonical.com>, Andrew Morton <akpm@linux-foundation.org>, Herbert Xu <herbert@gondor.apana.org.au>, "David S. Miller" <davem@davemloft.net> |
| X-Original-Date | Tue, 22 Sep 2015 10:47:07 -0500 |
| X-Original-Message-ID | <813aa225f0fa97ba3510821a17e61c43724c087a.1442935712.git.jpoimboe@redhat.com> |
| X-Original-References | <cover.1442935712.git.jpoimboe@redhat.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1230391 |
Show key headers only | View raw
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 v13 00/23] Compile-time stack metadata validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 17:50 +0200
[PATCH v13 20/23] x86/asm/efi: Create a stack frame in efi_call() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 17:50 +0200
[PATCH v13 22/23] x86/uaccess: Add stack frame output operand in get_user inline asm Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 17:50 +0200
[PATCH v13 21/23] x86/asm/power: Create stack frames in hibernate_asm_64.S Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 17:50 +0200
[PATCH v13 01/23] tools: Fix formatting of the "make -C tools" help message Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 17:50 +0200
[PATCH v13 06/23] x86/stacktool: Add ignore macros Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 18/23] x86/asm/acpi: Create a stack frame in do_suspend_lowlevel() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 05/23] x86/stacktool: Add file and directory ignores Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 17/23] x86/asm/entry: Create stack frames in thunk functions Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 10/23] x86/amd: Set ELF function type for vide() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 08/23] x86/paravirt: Add stack frame dependency to PVOP inline asm calls Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 16/23] x86/asm/crypto: Create stack frames in clmul_ghash_mul/update() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 13/23] x86/asm/crypto: Create stack frames in aesni-intel_asm.S Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
Re: [PATCH v13 13/23] x86/asm/crypto: Create stack frames in aesni-intel_asm.S minipli@ld-linux.so - 2015-10-01 08:30 +0200
Re: [PATCH v13 13/23] x86/asm/crypto: Create stack frames in aesni-intel_asm.S Josh Poimboeuf <jpoimboe@redhat.com> - 2015-10-01 15:40 +0200
Re: [PATCH v13 13/23] x86/asm/crypto: Create stack frames in aesni-intel_asm.S Mathias Krause <minipli@ld-linux.so> - 2015-10-01 19:40 +0200
Re: [PATCH v13 13/23] x86/asm/crypto: Create stack frames in aesni-intel_asm.S Josh Poimboeuf <jpoimboe@redhat.com> - 2015-10-01 20:00 +0200
[PATCH v13 09/23] x86/paravirt: Create a stack frame in PV_CALLEE_SAVE_REGS_THUNK Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 14/23] x86/asm/crypto: Move .Lbswap_mask data to .rodata section Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 15/23] x86/asm/crypto: Move jump_table to .rodata section Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:00 +0200
[PATCH v13 12/23] x86/xen: Add xen_cpuid() and xen_setup_gdt() to stacktool whitelists Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:10 +0200
[PATCH v13 02/23] x86/asm: Frame pointer macro cleanup Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:10 +0200
[PATCH v13 07/23] x86/xen: Add stack frame dependency to hypercall inline asm calls Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:10 +0200
[PATCH v13 11/23] x86/reboot: Add ljmp instructions to stacktool whitelist Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:10 +0200
[PATCH v13 03/23] x86/asm: Add C versions of frame pointer macros Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-22 18:10 +0200
Re: [PATCH v13 04/23] x86/stacktool: Compile-time stack metadata validation Jiri Slaby <jslaby@suse.cz> - 2015-09-23 13:40 +0200
Re: [PATCH v13 04/23] x86/stacktool: Compile-time stack metadata validation Jiri Slaby <jslaby@suse.cz> - 2015-09-23 13:50 +0200
Re: [PATCH v13.1 04/23] x86/stacktool: Compile-time stack metadata validation Chris J Arges <chris.j.arges@canonical.com> - 2015-10-01 17:00 +0200
Re: [PATCH v13.1 04/23] x86/stacktool: Compile-time stack metadata validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-10-01 17:30 +0200
Re: [PATCH v13.1 04/23] x86/stacktool: Compile-time stack metadata validation Chris J Arges <chris.j.arges@canonical.com> - 2015-10-01 17:40 +0200
Re: [PATCH v13 00/23] Compile-time stack metadata validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-28 15:50 +0200
csiph-web