public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Sathvika Vasireddy <sv@linux•ibm.com>
To: linux-kbuild@vger•kernel.org, linuxppc-dev@lists•ozlabs.org
Cc: nathan@kernel•org, masahiroy@kernel•org, kees@kernel•org,
	naveen@kernel•org, jpoimboe@kernel•org, peterz@infradead•org,
	npiggin@gmail•com, maddy@linux•ibm.com,
	segher@kernel•crashing.org, christophe.leroy@csgroup•eu,
	mingo@kernel•org, mpe@ellerman•id.au, mahesh@linux•ibm.com,
	sv@linux•ibm.com
Subject: [RFC PATCH v2 0/3] objtool: Fixup alternate feature relative addresses
Date: Mon, 29 Sep 2025 13:34:53 +0530	[thread overview]
Message-ID: <20250929080456.26538-1-sv@linux.ibm.com> (raw)

This patch series implements build-time fixup of alternate feature
relative addresses for powerpc.

Previously, Nicholas Piggin proposed a build-time solution using a
custom PowerPC tool [1], which provided the foundation for this approach.
The current implementation leverages objtool's existing ELF parsing
infrastructure to do the same.

This patchset applies atop powerpc/merge branch.

Links and History:
[1] Original PowerPC tool approach:
    http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170521010130.13552-1-npiggin@gmail.com/
[2] Initial RFC v1:
    https://lore.kernel.org/linuxppc-dev/20240422092206.147078-1-sv@linux.ibm.com/T/#t
[3] PowerPC instruction decoder borrowed from:
    https://lore.kernel.org/linuxppc-dev/bfa8364da047d8610a09458a1cd924a0566aedbb.1736955567.git.christophe.leroy@csgroup.eu/#Z31tools:objtool:arch:powerpc:decode.c

Testing:
Build and Boot tested on ppc64le, ppc64be, and ppc32be configs.

Changes in V2:
- Added implementation support for ppc64 LE, BE, ppc32 BE.

Sathvika Vasireddy (3):
  objtool/powerpc: Enhance objtool to fixup alternate feature relative
    addresses
  kbuild: Add objtool integration for PowerPC feature fixups
  powerpc: Enable build-time feature fixup processing by default

 Makefile                                  |   7 +
 arch/Kconfig                              |   3 +
 arch/powerpc/Kconfig                      |   3 +
 arch/powerpc/Makefile                     |   5 +
 arch/powerpc/include/asm/feature-fixups.h |   2 +-
 arch/powerpc/kernel/vmlinux.lds.S         |   8 +-
 arch/powerpc/lib/feature-fixups.c         |  12 -
 scripts/Makefile.lib                      |   5 +-
 scripts/Makefile.vmlinux                  |  13 +-
 tools/objtool/arch/powerpc/decode.c       |  15 +-
 tools/objtool/arch/powerpc/special.c      | 436 ++++++++++++++++++++++
 tools/objtool/builtin-check.c             |   2 +
 tools/objtool/check.c                     |  48 ++-
 tools/objtool/elf.c                       |   4 +
 tools/objtool/include/objtool/builtin.h   |   1 +
 tools/objtool/include/objtool/special.h   |  56 +++
 16 files changed, 593 insertions(+), 27 deletions(-)

-- 
2.43.0



             reply	other threads:[~2025-09-29  8:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-29  8:04 Sathvika Vasireddy [this message]
2025-09-29  8:04 ` [RFC PATCH v2 1/3] objtool/powerpc: Enhance objtool to fixup alternate feature relative addresses Sathvika Vasireddy
2025-09-29 10:49   ` Peter Zijlstra
2025-09-29 16:59     ` Sathvika Vasireddy
2025-09-29  8:04 ` [RFC PATCH v2 2/3] kbuild: Add objtool integration for PowerPC feature fixups Sathvika Vasireddy
2025-10-04 19:43   ` Nicolas Schier
2025-10-13  1:07     ` Sathvika Vasireddy
2025-09-29  8:04 ` [RFC PATCH v2 3/3] powerpc: Enable build-time feature fixup processing by default Sathvika Vasireddy

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=20250929080456.26538-1-sv@linux.ibm.com \
    --to=sv@linux$(echo .)ibm.com \
    --cc=christophe.leroy@csgroup$(echo .)eu \
    --cc=jpoimboe@kernel$(echo .)org \
    --cc=kees@kernel$(echo .)org \
    --cc=linux-kbuild@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=maddy@linux$(echo .)ibm.com \
    --cc=mahesh@linux$(echo .)ibm.com \
    --cc=masahiroy@kernel$(echo .)org \
    --cc=mingo@kernel$(echo .)org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=nathan@kernel$(echo .)org \
    --cc=naveen@kernel$(echo .)org \
    --cc=npiggin@gmail$(echo .)com \
    --cc=peterz@infradead$(echo .)org \
    --cc=segher@kernel$(echo .)crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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