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: <D2PYY2N7SOGR.1KKNYAQTUWL89@gmail.com>
Date: Mon, 15 Jul 2024 18:27:33 +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 13/17] powerpc64/ftrace: Support .text larger
 than 32MB with out-of-line stubs

On Sun Jul 14, 2024 at 6:27 PM AEST, Naveen N Rao wrote:
> We are restricted to a .text size of ~32MB when using out-of-line
> function profile sequence. Allow this to be extended up to the previous
> limit of ~64MB by reserving space in the middle of .text.
>
> A new config option CONFIG_PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE is
> introduced to specify the number of function stubs that are reserved in
> .text. On boot, ftrace utilizes stubs from this area first before using
> the stub area at the end of .text.

[snip]

> diff --git a/arch/powerpc/kernel/trace/ftrace_entry.S b/arch/powerpc/kernel/trace/ftrace_entry.S
> index 71f6a63cd861..86dbaa87532a 100644
> --- a/arch/powerpc/kernel/trace/ftrace_entry.S
> +++ b/arch/powerpc/kernel/trace/ftrace_entry.S
> @@ -374,6 +374,14 @@ _GLOBAL(return_to_handler)
>  	blr
>  #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
>  
> +#ifdef CONFIG_PPC_FTRACE_OUT_OF_LINE
> +SYM_DATA(ftrace_ool_stub_text_count, .long CONFIG_PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE)
> +
> +SYM_CODE_START(ftrace_ool_stub_text)
> +	.space CONFIG_PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE * FTRACE_OOL_STUB_SIZE
> +SYM_CODE_END(ftrace_ool_stub_text)
> +#endif
> +
>  .pushsection ".tramp.ftrace.text","aw",@progbits;
>  .globl ftrace_tramp_text
>  ftrace_tramp_text:

How are you ensuring these new stubs get to the middle of kernel text? I
guess you just put it in regular .text and hope the linker puts it
in a good place?

Thanks,
Nick

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ