Re: [PATCH v2 0/2] arm64: modules: Reject loading of malformed modules

Ard Biesheuvel
2025-09-29T16:11:12Z

On Mon, 22 Sept 2025 at 15:04, Adrian Barnaś <abarnas@google.com> wrote:
>
> 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
>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>