lkml.org 
[lkml]   [2023]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/4] arm64/process: Make loading of 32bit processes depend on aarch32_enabled()
    Date
    Major aspect of Aarch32 emulation is the ability to load 32bit
    processes.
    That's currently decided (among others) by compat_elf_check_arch().

    Make the macro use aarch32_enabled() to decide if Aarch32 compat is
    enabled before loading a 32bit process.

    Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
    ---
    arch/arm64/kernel/process.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
    index 657ea273c0f9..96832f1ec3ee 100644
    --- a/arch/arm64/kernel/process.c
    +++ b/arch/arm64/kernel/process.c
    @@ -601,7 +601,7 @@ unsigned long arch_align_stack(unsigned long sp)
    #ifdef CONFIG_COMPAT
    int compat_elf_check_arch(const struct elf32_hdr *hdr)
    {
    - if (!system_supports_32bit_el0())
    + if (!system_supports_32bit_el0() || !aarch32_enabled())
    return false;

    if ((hdr)->e_machine != EM_ARM)
    --
    2.35.3
    \
     
     \ /
      Last update: 2023-10-18 13:14    [W:2.108 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site