linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] modversions: Fix CRC mangling under CONFIG_RELOCATABLE=y
@ 2017-01-17 19:26 Ard Biesheuvel
  2017-01-17 19:26 ` [PATCH v4 1/3] powerpc/reloc32: fix corrupted modversion CRCs Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Ard Biesheuvel @ 2017-01-17 19:26 UTC (permalink / raw)
  To: linux-kernel, mpe, jeyu
  Cc: rusty, suzuki.poulose, will.deacon, akpm, benh, paulus, arnd,
	torvalds, viro, linuxppc-dev, Ard Biesheuvel

This series is a followup to the single patch 'modversions: treat symbol
CRCs as 32 bit quantities on 64 bit archs', of which three versions have
been sent out so far [0][1][2]

Given the recent issues regarding modversions, I have added some more
people to cc this time.

As pointed out by Michael, GNU ld behaves a bit differently between arm64
and PowerPC64, and where the former gets rid of all runtime relocations
related to CRCs, the latter is not as easily convinced.

Patch #1 fixes the issue where CRCs are corrupted by the runtime relocation
routines for 32-bit PowerPC, for which the original fix was effectively
reverted by commit 0e0ed6406e61 ("powerpc/modules: Module CRC relocation fix
causes perf issues")

Patch #2 adds handling of R_PPC64_ADDR32 relocations against the NULL .dynsym
symbol entry to the PPC64 runtime relocation routines, so it is prepared to
deal with CRCs being emitted as 32-bit quantities.

Patch #3 is the original patch from the v1 and v2 submissions.

Changes since v3:
- rebased onto v4.10-rc
- add Suzuki's ack to patch #1
- update patch #2 to work around the binutils-powerpc behavior to only
  account for R_PPC64_RELATIVE relocations in the RELACOUNT entry in
  .dynamic

Changes since v2:
- added #1 and #2
- updated #3 to deal with CRC entries being emitted from assembler
- added Rusty's ack (#3)

Branch can be found here:
https://git.kernel.org/cgit/linux/kernel/git/ardb/linux.git/log/?h=kcrctab-reloc

[0] http://marc.info/?l=linux-kernel&m=147652300207369&w=2
[1] http://marc.info/?l=linux-kernel&m=147695629614409&w=2
[2] http://marc.info/?l=linux-kernel&m=147758564705776&w=2

Ard Biesheuvel (3):
  powerpc/reloc32: fix corrupted modversion CRCs
  powerpc/reloc64: add support for 32-bit CRC pseudo-symbols
  modversions: treat symbol CRCs as 32 bit quantities on 64 bit archs

 arch/powerpc/include/asm/module.h |  4 --
 arch/powerpc/kernel/module_64.c   |  8 ---
 arch/powerpc/kernel/reloc_32.S    | 36 ++++++++++--
 arch/powerpc/kernel/reloc_64.S    | 60 ++++++++++++--------
 arch/powerpc/kernel/vmlinux.lds.S |  1 +
 arch/powerpc/relocs_check.sh      |  5 +-
 include/asm-generic/export.h      |  7 +--
 include/linux/export.h            |  8 +++
 include/linux/module.h            | 14 ++---
 kernel/module.c                   | 47 ++++++---------
 10 files changed, 105 insertions(+), 85 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-01-20 12:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 19:26 [PATCH v4 0/3] modversions: Fix CRC mangling under CONFIG_RELOCATABLE=y Ard Biesheuvel
2017-01-17 19:26 ` [PATCH v4 1/3] powerpc/reloc32: fix corrupted modversion CRCs Ard Biesheuvel
2017-01-17 19:26 ` [PATCH v4 2/3] powerpc/reloc64: add support for 32-bit CRC pseudo-symbols Ard Biesheuvel
2017-01-18 15:30   ` Ard Biesheuvel
2017-01-17 19:26 ` [PATCH v4 3/3] modversions: treat symbol CRCs as 32 bit quantities on 64 bit archs Ard Biesheuvel
2017-01-17 23:47   ` Linus Torvalds
2017-01-18 11:37     ` Ard Biesheuvel
2017-01-18 13:52       ` Ard Biesheuvel
2017-01-18 18:27         ` Linus Torvalds
2017-01-18 18:35           ` Linus Torvalds
2017-01-18 22:37             ` Ard Biesheuvel
2017-01-19  0:15               ` Linus Torvalds
2017-01-19  9:22                 ` Ard Biesheuvel
2017-01-19 17:24                   ` Linus Torvalds
2017-01-20 12:21                     ` Ard Biesheuvel
2017-01-19 17:01         ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).