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]
Message-Id: <D2PWX8QDYFXB.B2LUK0XGNIYF@gmail.com>
Date: Mon, 15 Jul 2024 16:52:26 +1000
From: "Nicholas Piggin" <npiggin@...il.com>
To: "Naveen N Rao" <naveen@...nel.org>, <linuxppc-dev@...ts.ozlabs.org>,
 <linux-trace-kernel@...r.kernel.org>, <bpf@...r.kernel.org>,
 <linux-kbuild@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Cc: "Michael Ellerman" <mpe@...erman.id.au>, "Christophe Leroy"
 <christophe.leroy@...roup.eu>, "Steven Rostedt" <rostedt@...dmis.org>,
 "Masami Hiramatsu" <mhiramat@...nel.org>, "Mark Rutland"
 <mark.rutland@....com>, "Alexei Starovoitov" <ast@...nel.org>, "Daniel
 Borkmann" <daniel@...earbox.net>, "Andrii Nakryiko" <andrii@...nel.org>,
 "Masahiro Yamada" <masahiroy@...nel.org>, "Hari Bathini"
 <hbathini@...ux.ibm.com>, "Mahesh Salgaonkar" <mahesh@...ux.ibm.com>,
 "Vishal Chourasia" <vishalc@...ux.ibm.com>
Subject: Re: [RFC PATCH v4 08/17] powerpc/ftrace: Move ftrace stub used for
 init text before _einittext

On Sun Jul 14, 2024 at 6:27 PM AEST, Naveen N Rao wrote:
> Move the ftrace stub used to cover inittext before _einittext so that it
> is within kernel text, as seen through core_kernel_text(). This is
> required for a subsequent change to ftrace.

Hmm, is there a reason it was outside einittext anyway?

Does it do anything else? Other than symbols, on some 32-bit platforms
it looks like it could change some of the initial mapping/pinning. Maybe
they jut get lucky and always map it before the change anyway?

It looks like the right thing to do even without the subsequent ftrace
change though.

Thanks,
Nick

>
> Signed-off-by: Naveen N Rao <naveen@...nel.org>
> ---
>  arch/powerpc/kernel/vmlinux.lds.S | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
> index f420df7888a7..0aef9959f2cd 100644
> --- a/arch/powerpc/kernel/vmlinux.lds.S
> +++ b/arch/powerpc/kernel/vmlinux.lds.S
> @@ -267,14 +267,13 @@ SECTIONS
>  	.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
>  		_sinittext = .;
>  		INIT_TEXT
> -
> +		*(.tramp.ftrace.init);
>  		/*
>  		 *.init.text might be RO so we must ensure this section ends on
>  		 * a page boundary.
>  		 */
>  		. = ALIGN(PAGE_SIZE);
>  		_einittext = .;
> -		*(.tramp.ftrace.init);
>  	} :text
>  
>  	/* .exit.text is discarded at runtime, not link time,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ