public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: modules: Reject loading of malformed modules
@ 2025-09-22 13:04 Adrian Barnaś
  2025-09-22 13:04 ` [PATCH v2 1/2] arch: arm64: Fail module loading if dynamic SCS patching fails Adrian Barnaś
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Adrian Barnaś @ 2025-09-22 13:04 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: Adrian Barnaś, Catalin Marinas, Will Deacon, Ard Biesheuvel,
	Dylan Hatch, Mark Rutland

Hi all,

Here is version two of the patches I previously posted here:

  v1: https://lore.kernel.org/all/20250919122321.946462-1-abarnas@google.com/

Changes:
  * Renamed the parameter `is_module` to `skip_dry_run` in scs_patch()
  * Moved comments to module_finalize() and improve justification
  * Instead of rejecting all modules with callback, reject those with cb
    pointing outside core kernel text
  * Replace -EPERM to -ENOEXEC when rejecting modules with incorrect cb
  * Fix missing return in apply_alternatives_module() placeholder

Best regards
Adrian

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Dylan Hatch <dylanbhatch@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>

Adrian Barnaś (2):
  arch: arm64: Fail module loading if dynamic SCS patching fails
  arch: arm64: Reject modules with internal alternative callbacks

 arch/arm64/include/asm/alternative.h |  7 +++++--
 arch/arm64/include/asm/scs.h         |  2 +-
 arch/arm64/kernel/alternative.c      | 19 ++++++++++++-------
 arch/arm64/kernel/module.c           | 21 +++++++++++++++++----
 arch/arm64/kernel/pi/map_kernel.c    |  2 +-
 arch/arm64/kernel/pi/patch-scs.c     | 10 ++++++----
 arch/arm64/kernel/pi/pi.h            |  2 +-
 7 files changed, 43 insertions(+), 20 deletions(-)

-- 
2.51.0.534.gc79095c0ca-goog



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

end of thread, other threads:[~2025-11-07 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 13:04 [PATCH v2 0/2] arm64: modules: Reject loading of malformed modules Adrian Barnaś
2025-09-22 13:04 ` [PATCH v2 1/2] arch: arm64: Fail module loading if dynamic SCS patching fails Adrian Barnaś
2025-09-22 13:04 ` [PATCH v2 2/2] arch: arm64: Reject modules with internal alternative callbacks Adrian Barnaś
2025-11-07  9:57   ` Mark Rutland
2025-09-29 16:10 ` [PATCH v2 0/2] arm64: modules: Reject loading of malformed modules Ard Biesheuvel
2025-11-07 15:53 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox