mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Cc: 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>,
	x86@kernel.org, live-patching@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v8 15/21] x86/asm/crypto: Move jump_table to .rodata section
Date: Tue, 28 Jul 2015 09:47:06 -0500	[thread overview]
Message-ID: <17b083aaa48c258c21204ffc05d3d9f4bf6cffcd.1438093915.git.jpoimboe@redhat.com> (raw)
In-Reply-To: <cover.1438093915.git.jpoimboe@redhat.com>

stackvalidate reports the following warning:

  stackvalidate: arch/x86/crypto/crc32c-pcl-intel-asm_64.o: crc_pcl()+0x11dd: can't decode instruction

It gets confused when trying to decode jump_table data.  Move jump_table
to the .rodata section which is a more appropriate home for read-only
data.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
index 225be06..dc05f01 100644
--- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
+++ b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
@@ -170,8 +170,8 @@ continue_block:
 	## branch into array
 	lea	jump_table(%rip), bufp
 	movzxw  (bufp, %rax, 2), len
-	offset=crc_array-jump_table
-	lea     offset(bufp, len, 1), bufp
+	lea	crc_array(%rip), bufp
+	lea     (bufp, len, 1), bufp
 	jmp     *bufp
 
 	################################################################
@@ -310,7 +310,9 @@ do_return:
 	popq    %rdi
 	popq    %rbx
         ret
+ENDPROC(crc_pcl)
 
+.section	.rodata, "a", %progbits
         ################################################################
         ## jump table        Table is 129 entries x 2 bytes each
         ################################################################
@@ -324,13 +326,11 @@ JMPTBL_ENTRY %i
 	i=i+1
 .endr
 
-ENDPROC(crc_pcl)
 
 	################################################################
 	## PCLMULQDQ tables
 	## Table is 128 entries x 2 words (8 bytes) each
 	################################################################
-.section	.rotata, "a", %progbits
 .align 8
 K_table:
 	.long 0x493c7d27, 0x00000001
-- 
2.1.0


  parent reply	other threads:[~2015-07-28 14:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 14:46 [PATCH v8 00/21] Compile-time stack validation Josh Poimboeuf
2015-07-28 14:46 ` [PATCH v8 01/21] x86/asm: Frame pointer macro cleanup Josh Poimboeuf
2015-07-28 14:46 ` [PATCH v8 02/21] x86/asm: Add C versions of FRAME and ENDFRAME macros Josh Poimboeuf
2015-07-28 14:46 ` [PATCH v8 03/21] x86/stackvalidate: Compile-time stack validation Josh Poimboeuf
2015-07-28 14:46 ` [PATCH v8 04/21] x86/stackvalidate: Add file and directory ignores Josh Poimboeuf
2015-07-28 14:46 ` [PATCH v8 05/21] x86/stackvalidate: Add ignore macros Josh Poimboeuf
2015-07-28 14:46 ` [PATCH v8 06/21] x86/xen: Add stack frame dependency to hypercall inline asm calls Josh Poimboeuf
2015-07-28 14:46 ` [PATCH v8 07/21] x86/paravirt: Add stack frame dependency to PVOP " Josh Poimboeuf
2015-07-28 14:46 ` [PATCH v8 08/21] x86/paravirt: Fix frame pointer usage in PV_CALLEE_SAVE_REGS_THUNK Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 09/21] x86/paravirt: Align paravirt thunk functions at 16-byte boundaries Josh Poimboeuf
2015-07-28 15:23   ` Andy Lutomirski
2015-07-28 15:28     ` Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 10/21] x86/amd: Set ELF function type for vide() Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 11/21] x86/reboot: Add ljmp instructions to stackvalidate whitelist Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 12/21] x86/xen: Add xen_cpuid() and xen_setup_gdt() to stackvalidate whitelists Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 13/21] x86/asm/crypto: Fix frame pointer usage in aesni-intel_asm.S Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 14/21] x86/asm/crypto: Move .Lbswap_mask data to .rodata section Josh Poimboeuf
2015-07-28 14:47 ` Josh Poimboeuf [this message]
2015-07-28 14:47 ` [PATCH v8 16/21] x86/asm/crypto: Fix frame pointer usage in clmul_ghash_mul/update() Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 17/21] x86/asm/entry: Fix frame pointer usage in thunk functions Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 18/21] x86/asm/acpi: Fix frame pointer usage in do_suspend_lowlevel() Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 19/21] x86/asm: Fix frame pointer usage in rwsem functions Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 20/21] x86/asm/efi: Fix frame pointer usage in efi_call() Josh Poimboeuf
2015-07-28 14:47 ` [PATCH v8 21/21] x86/asm/power: Fix frame pointer usage in hibernate_asm_64.S Josh Poimboeuf
2015-08-06  8:07 ` [PATCH v8 00/21] Compile-time stack validation Ingo Molnar
2015-08-06 16:06   ` Josh Poimboeuf
2015-08-06 17:23   ` Josh Poimboeuf
2015-08-06 17:46     ` Josh Poimboeuf

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=17b083aaa48c258c21204ffc05d3d9f4bf6cffcd.1438093915.git.jpoimboe@redhat.com \
    --to=jpoimboe@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=bernd@petrovitsch.priv.at \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmarek@suse.cz \
    --cc=namhyung@gmail.com \
    --cc=palves@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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®