lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 17 Apr 2021 14:56:41 +1000
From:   Greg Ungerer <gerg@...ux-m68k.org>
To:     Damien Le Moal <damien.lemoal@....com>, uclinux-dev@...inux.org,
        Palmer Dabbelt <palmer@...belt.com>,
        linux-riscv@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org, Anup Patel <anup.patel@....com>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v4 2/2] riscv: Disable data start offset in flat binaries


On 17/4/21 11:10 am, Damien Le Moal wrote:
> uclibc/gcc combined with elf2flt riscv linker file fully resolve the
> PC relative __global_pointer$ value at compile time and do not generate
> a relocation entry to set a correct value of the gp register at runtime.
> As a result, if the flatbin loader offsets the start of the data
> section, the relative position change between the text and data sections
> compared to the compile time positions results in an incorrect gp value
> being used. This causes flatbin executables to crash.
> 
> Avoid this problem by enabling CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET
> automatically when CONFIG_RISCV is enabled and CONFIG_MMU is disabled.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@....com>
> Acked-by: Palmer Dabbelt <palmerdabbelt@...gle.com>

Acked-by: Greg Ungerer <gerg@...ux-m68k.org>

Palmer do you want me to take this via my tree with 1/2 in the series,
or are you going to pick it up?

Regards
Greg


> ---
>   arch/riscv/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 4515a10c5d22..add528eb9235 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -33,6 +33,7 @@ config RISCV
>   	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
>   	select ARCH_WANT_FRAME_POINTERS
>   	select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
> +	select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
>   	select CLONE_BACKWARDS
>   	select CLINT_TIMER if !MMU
>   	select COMMON_CLK
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ