Skip to contentSkip to conversation

Please pull abiv2 branch

GIT PULL Anton Blanchard 4 participants 5 messages Apr 23, 2014 – Apr 29, 2014

lore
Share & tools
lore
#0 lore raw

Hi Ben,

Here are the ABIv2 patches rebased against 3.15-rc2.

The main changes since the last posting:

powerpc: Don't build assembly files with ABIv2
Added so each patch in the series builds and we don't have any bisect issues.

selftests/powerpc: Update for ABIv2
Fixes build issues with the copyloop tests.

Anton
--

The following changes since commit a798c10faf62a505d24e5f6213fbaf904a39623f:

Linux 3.15-rc2 (2014-04-20 11:08:50 -0700)

are available in the git repository at:

git://github.com/antonblanchard/linux.git abiv2

for you to fetch changes up to cec4b7eaf09d330e94e8e94133d360e6f1855974:

selftests/powerpc: Update for ABIv2 (2014-04-23 11:41:07 +1000)

----------------------------------------------------------------
Anton Blanchard (30):
powerpc: Don't build assembly files with ABIv2
powerpc: No need to use dot symbols when branching to a function
powerpc: Remove superflous function descriptors in assembly only code
powerpc: Don't use a function descriptor for system call table
powerpc: Remove some unnecessary uses of _GLOBAL() and _STATIC()
powerpc: Remove _INIT_GLOBAL(), _STATIC() and _INIT_STATIC()
powerpc: Remove dot symbol usage in exception macros
powerpc: Create DOTSYM to wrap dot symbol usage
powerpc: Remove function descriptors and dot symbols on new ABI
powerpc: ABIv2 function calls must place target address in r12
powerpc: Ignore .TOC. relocations
powerpc: Add ABIv2 support to ppc_function_entry
powerpc: Use ppc_function_entry instead of open coding it
powerpc: Fix branch patching code for ABIv2
powerpc: Fix kernel thread creation on ABIv2
powerpc: Fix ABIv2 issues with stack offsets in assembly code powerpc/tm: Use STK_PARAM
powerpc/tm: Fix GOT save offset for ABIv2
powerpc/tracing: TRACE_WITH_FRAME_BUFFER creates invalid stack frames
powerpc: Fix SMP issues with ppc64le ABIv2
powerpc: Fix ABIv2 issue with dereference_function_descriptor
powerpc: Add _GLOBAL_TOC for ABIv2 assembly functions exported to modules
powerpc: ftrace_caller, _mcount is exported to modules so needs _GLOBAL_TOC() powerpc/kprobes: Fix ABIv2 issues with kprobe_lookup_name powerpc/modules: Create is_module_trampoline()
powerpc/modules: Create module_trampoline_target() powerpc/ftrace: Use module loader helpers to parse trampolines powerpc/ftrace: Fix ABIv2 issues with __ftrace_make_call
powerpc: Build little endian ppc64 kernel with ABIv2 selftests/powerpc: Update for ABIv2

Rusty Russell (11):
powerpc: make module stub code endian independent
powerpc: modules implement R_PPC64_TOCSAVE relocation.
powerpc: EXPORT_SYMBOL(.TOC.)
powerpc: module: handle MODVERSION for .TOC.
powerpc: Fix up TOC. for modules.
powerpc: Handle new ELFv2 module relocations
powerpc: modules: comment about de-dotifying symbols when using the ELFv2 ABI.
powerpc: modules: change r2 save/restore offset for ELFv2 ABI.
powerpc: modules: use r12 for stub jump address.
powerpc: modules: skip r2 setup for ELFv2
powerpc: modules: implement stubs for ELFv2 ABI.

Ulrich Weigand (1):
powerpc: Fix unsafe accesses to parameter area in ELFv2

 arch/powerpc/Makefile                              |  11 +-
 arch/powerpc/boot/util.S                           |   4 +-
 arch/powerpc/include/asm/code-patching.h           |  40 ++-
 arch/powerpc/include/asm/context_tracking.h        |   4 +-
 arch/powerpc/include/asm/exception-64e.h           |   6 +-
 arch/powerpc/include/asm/exception-64s.h           |   2 +-
 arch/powerpc/include/asm/ftrace.h                  |   2 +
 arch/powerpc/include/asm/irqflags.h                |   8 +-
 arch/powerpc/include/asm/kprobes.h                 |   5 +-
 arch/powerpc/include/asm/linkage.h                 |   2 +
 arch/powerpc/include/asm/module.h                  |   4 +
 arch/powerpc/include/asm/ppc_asm.h                 |  72 +++---
 arch/powerpc/include/asm/sections.h                |   2 +
 arch/powerpc/include/asm/systbl.h                  |   6 +-
 arch/powerpc/include/uapi/asm/elf.h                |  10 +-
 arch/powerpc/kernel/cpu_setup_fsl_booke.S          |  28 +--
 arch/powerpc/kernel/entry_64.S                     | 117 +++++----
 arch/powerpc/kernel/exceptions-64e.S               | 140 +++++------
 arch/powerpc/kernel/exceptions-64s.S               | 206 +++++++--------
 arch/powerpc/kernel/ftrace.c                       | 137 +++-------
 arch/powerpc/kernel/head_64.S                      | 117 ++++-----
 arch/powerpc/kernel/idle_book3e.S                  |   2 +-
 arch/powerpc/kernel/idle_power4.S                  |   2 +-
 arch/powerpc/kernel/idle_power7.S                  |   4 +-
 arch/powerpc/kernel/misc_64.S                      |  46 +++-
 arch/powerpc/kernel/module_64.c                    | 279 +++++++++++++++++----
 arch/powerpc/kernel/process.c                      |  17 +-
 arch/powerpc/kernel/prom_init_check.sh             |   2 +-
 arch/powerpc/kernel/setup_64.c                     |   2 +-
 arch/powerpc/kernel/systbl.S                       |  18 +-
 arch/powerpc/kernel/tm.S                           |  13 +-
 arch/powerpc/kvm/book3s_hv_interrupts.S            |   2 +-
 arch/powerpc/kvm/book3s_hv_rmhandlers.S            |  34 +--
 arch/powerpc/lib/copypage_64.S                     |   2 +-
 arch/powerpc/lib/copypage_power7.S                 |  12 +-
 arch/powerpc/lib/copyuser_64.S                     |   2 +-
 arch/powerpc/lib/copyuser_power7.S                 |  32 +--
 arch/powerpc/lib/hweight_64.S                      |   8 +-
 arch/powerpc/lib/mem_64.S                          |   4 +-
 arch/powerpc/lib/memcpy_64.S                       |  10 +-
 arch/powerpc/lib/memcpy_power7.S                   |  26 +-
 arch/powerpc/mm/hash_low_64.S                      |  44 ++--
 arch/powerpc/mm/hash_utils_64.c                    |  36 ++-
 arch/powerpc/mm/slb.c                              |  12 +-
 arch/powerpc/mm/slb_low.S                          |  12 +-
 arch/powerpc/platforms/85xx/smp.c                  |   3 +-
 arch/powerpc/platforms/cell/smp.c                  |   5 +-
 arch/powerpc/platforms/pasemi/powersave.S          |   2 +-
 arch/powerpc/platforms/powernv/opal-takeover.S     |   2 +
 arch/powerpc/platforms/powernv/opal-wrappers.S     |   4 +-
 arch/powerpc/platforms/powernv/smp.c               |   5 +-
 arch/powerpc/platforms/pseries/hvCall.S            |   4 +-
 arch/powerpc/platforms/pseries/smp.c               |   5 +-
 arch/powerpc/platforms/wsp/scom_smp.c              |   3 +-
 .../selftests/powerpc/copyloops/asm/ppc_asm.h      |   5 +-
 55 files changed, 902 insertions(+), 680 deletions(-)
#1 lore raw
Quoted 1 line · Anton Blanchard

Here are the ABIv2 patches rebased against 3.15-rc2.

After recompiling 3.15-rc2 with the ABIv2 patches, I see the following line in Modules.symvers:

    0x00000000 TOC. vmlinux EXPORT_SYMBOL

Kernel will not load modules because TOC. has no CRC. Is this expected ? Shouldn't TOC. have a CRC ?

Philippe

#2 lore raw
Quoted 2 lines · Philippe Bergheaud

Kernel will not load modules because TOC. has no CRC. Is this expected ? Shouldn't TOC. have a CRC ?

TOC. is really .TOC. (The kernel build process strips off a leading dot from symbol names.) .TOC. is a special symbol giving the toc base, so no, it shouldn't have a CRC.

Signature · 2 lines
Alan Modra
Australia Development Lab, IBM
#3 lore raw
In reply to Philippe Bergheaud
Quoted 10 lines · Philippe Bergheaud
Quoted 1 line · Anton Blanchard

Here are the ABIv2 patches rebased against 3.15-rc2.

After recompiling 3.15-rc2 with the ABIv2 patches, I see the following line in Modules.symvers:

     0x00000000 TOC. vmlinux EXPORT_SYMBOL

Kernel will not load modules because TOC. has no CRC. Is this expected ? Shouldn't TOC. have a CRC ?

What happens when you try to load a module? It should work...

Cheers,
Rusty.

#4 lore raw
Quoted 9 lines · Rusty Russell
Quoted 7 lines · Philippe Bergheaud
Quoted 1 line · Anton Blanchard

Here are the ABIv2 patches rebased against 3.15-rc2.

After recompiling 3.15-rc2 with the ABIv2 patches, I see the following line in Modules.symvers:

Quoted 7 lines
Quoted 4 lines
    0x00000000 TOC. vmlinux EXPORT_SYMBOL

Kernel will not load modules because TOC. has no CRC. Is this expected ? Shouldn't TOC. have a CRC ?

What happens when you try to load a module? It should work...

My mistake, sorry: kernel 3.15-rc2 crashes at boot, in the SLES12 Beta5 environment that I am using, before any module load attempt.

The problem happens with the SLES12 kernel of the day 3.12.17, plus the backported ABIv2 patch set. Boot fails with:
kernel: ibmveth: no symbol version for TOC.
kernel: ibmveth: Unknown symbol TOC. (err -22)
kernel: scsi_mod: no symbol version for TOC.
kernel: scsi_mod: Unknown symbol TOC. (err -22)

In the rescue shell, repeating a plain modprobe fails again:

    :/# modprobe scsi_mod
    modprobe: ERROR: could not insert 'scsi_mod': Invalid argument

And finally, modprobe succeeds with --force:

    :/# modprobe --force scsi_mod
    scsi_mod: module has bad taint, not creating trace events

Philippe