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:   Fri, 28 Jul 2023 14:57:03 +0200
From:   Andrew Jones <ajones@...tanamicro.com>
To:     Jisheng Zhang <jszhang@...nel.org>
Cc:     Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] riscv: vdso.lds.S: merge .data section into .rodata
 section

On Thu, Jul 27, 2023 at 01:30:23AM +0800, Jisheng Zhang wrote:
> The .data section doesn't need to be separate from .rodata section,
> they are both readonly.
> 
> Signed-off-by: Jisheng Zhang <jszhang@...nel.org>
> ---
>  arch/riscv/kernel/vdso/vdso.lds.S | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/riscv/kernel/vdso/vdso.lds.S b/arch/riscv/kernel/vdso/vdso.lds.S
> index d43fd7c7dd11..671aa21769bc 100644
> --- a/arch/riscv/kernel/vdso/vdso.lds.S
> +++ b/arch/riscv/kernel/vdso/vdso.lds.S
> @@ -29,7 +29,13 @@ SECTIONS
>  	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
>  	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
>  
> -	.rodata		: { *(.rodata .rodata.* .gnu.linkonce.r.*) }
> +	.rodata		: {
> +		*(.rodata .rodata.* .gnu.linkonce.r.*)
> +		*(.got.plt) *(.got)
> +		*(.data .data.* .gnu.linkonce.d.*)
> +		*(.dynbss)
> +		*(.bss .bss.* .gnu.linkonce.b.*)

Looking at other architectures, it appears the last three lines of
sections could be discarded, but I don't know enough about this to
state they should be.

Thanks,
drew


> +	}
>  
>  	/*
>  	 * This linker script is used both with -r and with -shared.
> @@ -44,13 +50,6 @@ SECTIONS
>  	.alternative : {
>  		*(.alternative)
>  	}
> -
> -	.data		: {
> -		*(.got.plt) *(.got)
> -		*(.data .data.* .gnu.linkonce.d.*)
> -		*(.dynbss)
> -		*(.bss .bss.* .gnu.linkonce.b.*)
> -	}
>  }
>  
>  /*
> -- 
> 2.40.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ