On Wed, Feb 2, 2022 at 3:52 PM Christoph Hellwig wrote:
>
> On Tue, Feb 01, 2022 at 11:05:39PM +0800, guo...@kernel.org wrote:
> > +bool compat_elf_check_arch(Elf32_Ehdr *hdr)
> > +{
> > + if (compat_mode_support && (hdr->e_machine == EM_RISCV))
> > + return true;
> > + else
>
On Tue, Feb 01, 2022 at 11:05:39PM +0800, guo...@kernel.org wrote:
> +bool compat_elf_check_arch(Elf32_Ehdr *hdr)
> +{
> + if (compat_mode_support && (hdr->e_machine == EM_RISCV))
> + return true;
> + else
> + return false;
> +}
This can be simplified to:
r
On Tue, Feb 1, 2022 at 11:07 PM wrote:
>
> From: Guo Ren
>
> Detect hardware COMPAT (32bit U-mode) capability in rv64. If not
> support COMPAT mode in hw, compat_elf_check_arch would return
> false by compat_binfmt_elf.c
>
> Signed-off-by: Guo Ren
> Signed-off-by: Guo Ren
> Cc: Arnd Bergmann
>
From: Guo Ren
Detect hardware COMPAT (32bit U-mode) capability in rv64. If not
support COMPAT mode in hw, compat_elf_check_arch would return
false by compat_binfmt_elf.c
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
Cc: Christoph Hellwig
---
arch/riscv/include/asm/elf.h |