Re: [PATCH RFC 0/4] static key support for error injection functions

2024-06-02 Thread Vlastimil Babka
On 6/2/24 10:47 PM, David Rientjes wrote: > On Fri, 31 May 2024, Vlastimil Babka wrote: > >> Patches 3 and 4 implement the static keys for the two mm fault injection >> sites in slab and page allocators. For a quick demonstration I've run a >> VM and the simple test from [1] that stresses the

Re: [PATCH RFC 0/4] static key support for error injection functions

2024-06-02 Thread David Rientjes
On Fri, 31 May 2024, Vlastimil Babka wrote: > Patches 3 and 4 implement the static keys for the two mm fault injection > sites in slab and page allocators. For a quick demonstration I've run a > VM and the simple test from [1] that stresses the slab allocator and got > this time before the

Re: [PATCH RFC 3/4] mm, slab: add static key for should_failslab()

2024-06-02 Thread Alexei Starovoitov
On Sat, Jun 1, 2024 at 1:57 PM Vlastimil Babka wrote: > > On 5/31/24 6:43 PM, Alexei Starovoitov wrote: > > On Fri, May 31, 2024 at 2:33 AM Vlastimil Babka wrote: > >> might_alloc(flags); > >> > >> - if (unlikely(should_failslab(s, flags))) > >> - return NULL; > >> +

Re: [PATCH RFC 2/4] error-injection: support static keys around injectable functions

2024-06-02 Thread Google
On Fri, 31 May 2024 11:33:33 +0200 Vlastimil Babka wrote: > Error injectable functions cannot be inlined and since some are called > from hot paths, this incurrs overhead even if no error injection is > enabled for them. > > To remove this overhead when disabled, allow the callsites of error >

Re: [PATCH RFC 0/4] static key support for error injection functions

2024-06-02 Thread Wei Yang
On Fri, May 31, 2024 at 11:33:31AM +0200, Vlastimil Babka wrote: >Incomplete, help needed from ftrace/kprobe and bpf folks. > >As previously mentioned by myself [1] and others [2] the functions >designed for error injection can bring visible overhead in fastpaths >such as slab or page allocation,

Re: [PATCH RFC 3/4] mm, slab: add static key for should_failslab()

2024-06-01 Thread Vlastimil Babka
On 5/31/24 6:43 PM, Alexei Starovoitov wrote: > On Fri, May 31, 2024 at 2:33 AM Vlastimil Babka wrote: >> might_alloc(flags); >> >> - if (unlikely(should_failslab(s, flags))) >> - return NULL; >> + if (static_branch_unlikely(_failslab_active)) { >> +

Re: [PATCH RFC 0/4] static key support for error injection functions

2024-06-01 Thread Vlastimil Babka
On 6/1/24 1:39 AM, Roman Gushchin wrote: > On Fri, May 31, 2024 at 11:33:31AM +0200, Vlastimil Babka wrote: >> Incomplete, help needed from ftrace/kprobe and bpf folks. >> >> As previously mentioned by myself [1] and others [2] the functions >> designed for error injection can bring visible

Re: [PATCH RFC 0/4] static key support for error injection functions

2024-06-01 Thread Vlastimil Babka
On 5/31/24 5:31 PM, Mark Rutland wrote: > Hi, > > On Fri, May 31, 2024 at 11:33:31AM +0200, Vlastimil Babka wrote: >> Incomplete, help needed from ftrace/kprobe and bpf folks. > >> - the generic error injection using kretprobes with >> override_function_with_return is handled in patch 2. The

Re: [PATCH RFC 4/4] mm, page_alloc: add static key for should_fail_alloc_page()

2024-05-31 Thread Roman Gushchin
On Fri, May 31, 2024 at 11:33:35AM +0200, Vlastimil Babka wrote: > Similarly to should_failslab(), remove the overhead of calling the > noinline function should_fail_alloc_page() with a static key that guards > the allocation hotpath callsite and is controlled by the fault and error > injection

Re: [PATCH RFC 3/4] mm, slab: add static key for should_failslab()

2024-05-31 Thread Roman Gushchin
On Fri, May 31, 2024 at 11:33:34AM +0200, Vlastimil Babka wrote: > Since commit 4f6923fbb352 ("mm: make should_failslab always available for > fault injection") should_failslab() is unconditionally a noinline > function. This adds visible overhead to the slab allocation hotpath, > even if the

Re: [PATCH RFC 0/4] static key support for error injection functions

2024-05-31 Thread Roman Gushchin
On Fri, May 31, 2024 at 11:33:31AM +0200, Vlastimil Babka wrote: > Incomplete, help needed from ftrace/kprobe and bpf folks. > > As previously mentioned by myself [1] and others [2] the functions > designed for error injection can bring visible overhead in fastpaths > such as slab or page

Re: [PATCH RFC 3/4] mm, slab: add static key for should_failslab()

2024-05-31 Thread Yosry Ahmed
On Fri, May 31, 2024 at 9:44 AM Alexei Starovoitov wrote: > > On Fri, May 31, 2024 at 2:33 AM Vlastimil Babka wrote: > > > > Since commit 4f6923fbb352 ("mm: make should_failslab always available for > > fault injection") should_failslab() is unconditionally a noinline > > function. This adds

Re: [PATCH RFC 3/4] mm, slab: add static key for should_failslab()

2024-05-31 Thread Alexei Starovoitov
On Fri, May 31, 2024 at 2:33 AM Vlastimil Babka wrote: > > Since commit 4f6923fbb352 ("mm: make should_failslab always available for > fault injection") should_failslab() is unconditionally a noinline > function. This adds visible overhead to the slab allocation hotpath, > even if the function is

Re: [PATCH RFC 0/4] static key support for error injection functions

2024-05-31 Thread Mark Rutland
Hi, On Fri, May 31, 2024 at 11:33:31AM +0200, Vlastimil Babka wrote: > Incomplete, help needed from ftrace/kprobe and bpf folks. > - the generic error injection using kretprobes with > override_function_with_return is handled in patch 2. The > ALLOW_ERROR_INJECTION() annotation is extended

[PATCH RFC 4/4] mm, page_alloc: add static key for should_fail_alloc_page()

2024-05-31 Thread Vlastimil Babka
Similarly to should_failslab(), remove the overhead of calling the noinline function should_fail_alloc_page() with a static key that guards the allocation hotpath callsite and is controlled by the fault and error injection frameworks. Signed-off-by: Vlastimil Babka --- mm/fail_page_alloc.c | 3

[PATCH RFC 0/4] static key support for error injection functions

2024-05-31 Thread Vlastimil Babka
Incomplete, help needed from ftrace/kprobe and bpf folks. As previously mentioned by myself [1] and others [2] the functions designed for error injection can bring visible overhead in fastpaths such as slab or page allocation, because even if nothing hooks into them at a given moment, they are

[PATCH RFC 2/4] error-injection: support static keys around injectable functions

2024-05-31 Thread Vlastimil Babka
Error injectable functions cannot be inlined and since some are called from hot paths, this incurrs overhead even if no error injection is enabled for them. To remove this overhead when disabled, allow the callsites of error injectable functions to put the calls behind a static key, which the

[PATCH RFC 3/4] mm, slab: add static key for should_failslab()

2024-05-31 Thread Vlastimil Babka
Since commit 4f6923fbb352 ("mm: make should_failslab always available for fault injection") should_failslab() is unconditionally a noinline function. This adds visible overhead to the slab allocation hotpath, even if the function is empty. With CONFIG_FAILSLAB=y there's additional overhead when

[PATCH RFC 1/4] fault-inject: add support for static keys around fault injection sites

2024-05-31 Thread Vlastimil Babka
Some fault injection sites are placed in hotpaths and incur overhead even if not enabled, due to one or more function calls leading up to should_fail_ex() that returns false due to attr->probability == 0. This overhead can be eliminated if the outermost call into the checks is guarded with a

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-29 Thread Luca Weiss
On Samstag, 25. Mai 2024 18:47:08 MESZ Krzysztof Kozlowski wrote: > On 24/05/2024 19:55, Luca Weiss wrote: > > On Donnerstag, 23. Mai 2024 08:19:11 MESZ Krzysztof Kozlowski wrote: > >> On 23/05/2024 08:16, Luca Weiss wrote: > >>> On Donnerstag, 23. Mai 2024 08:02:13 MESZ Krzysztof Kozlowski wrote:

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-25 Thread Krzysztof Kozlowski
On 24/05/2024 19:55, Luca Weiss wrote: > On Donnerstag, 23. Mai 2024 08:19:11 MESZ Krzysztof Kozlowski wrote: >> On 23/05/2024 08:16, Luca Weiss wrote: >>> On Donnerstag, 23. Mai 2024 08:02:13 MESZ Krzysztof Kozlowski wrote: On 22/05/2024 19:34, Luca Weiss wrote: > On Mittwoch, 22. Mai

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-24 Thread Luca Weiss
On Donnerstag, 23. Mai 2024 08:19:11 MESZ Krzysztof Kozlowski wrote: > On 23/05/2024 08:16, Luca Weiss wrote: > > On Donnerstag, 23. Mai 2024 08:02:13 MESZ Krzysztof Kozlowski wrote: > >> On 22/05/2024 19:34, Luca Weiss wrote: > >>> On Mittwoch, 22. Mai 2024 08:49:43 MESZ Krzysztof Kozlowski

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-23 Thread Krzysztof Kozlowski
On 23/05/2024 08:16, Luca Weiss wrote: > On Donnerstag, 23. Mai 2024 08:02:13 MESZ Krzysztof Kozlowski wrote: >> On 22/05/2024 19:34, Luca Weiss wrote: >>> On Mittwoch, 22. Mai 2024 08:49:43 MESZ Krzysztof Kozlowski wrote: On 21/05/2024 22:35, Luca Weiss wrote: > On Dienstag, 21. Mai 2024

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-23 Thread Luca Weiss
On Donnerstag, 23. Mai 2024 08:02:13 MESZ Krzysztof Kozlowski wrote: > On 22/05/2024 19:34, Luca Weiss wrote: > > On Mittwoch, 22. Mai 2024 08:49:43 MESZ Krzysztof Kozlowski wrote: > >> On 21/05/2024 22:35, Luca Weiss wrote: > >>> On Dienstag, 21. Mai 2024 10:58:07 MESZ Krzysztof Kozlowski wrote:

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-23 Thread Krzysztof Kozlowski
On 22/05/2024 19:34, Luca Weiss wrote: > On Mittwoch, 22. Mai 2024 08:49:43 MESZ Krzysztof Kozlowski wrote: >> On 21/05/2024 22:35, Luca Weiss wrote: >>> On Dienstag, 21. Mai 2024 10:58:07 MESZ Krzysztof Kozlowski wrote: On 20/05/2024 17:11, Luca Weiss wrote: > Hi Krzysztof > >

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-22 Thread Luca Weiss
On Mittwoch, 22. Mai 2024 08:49:43 MESZ Krzysztof Kozlowski wrote: > On 21/05/2024 22:35, Luca Weiss wrote: > > On Dienstag, 21. Mai 2024 10:58:07 MESZ Krzysztof Kozlowski wrote: > >> On 20/05/2024 17:11, Luca Weiss wrote: > >>> Hi Krzysztof > >>> > >>> Ack, sounds good. > >>> > >>> Maybe also

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-22 Thread Krzysztof Kozlowski
On 21/05/2024 22:35, Luca Weiss wrote: > On Dienstag, 21. Mai 2024 10:58:07 MESZ Krzysztof Kozlowski wrote: >> On 20/05/2024 17:11, Luca Weiss wrote: >>> Hi Krzysztof >>> >>> Ack, sounds good. >>> >>> Maybe also from you, any opinion between these two binding styles? >>> >>> So first using index

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-21 Thread Luca Weiss
On Dienstag, 21. Mai 2024 10:58:07 MESZ Krzysztof Kozlowski wrote: > On 20/05/2024 17:11, Luca Weiss wrote: > > Hi Krzysztof > > > > Ack, sounds good. > > > > Maybe also from you, any opinion between these two binding styles? > > > > So first using index of mboxes for the numbering, where for

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-21 Thread Krzysztof Kozlowski
On 20/05/2024 17:11, Luca Weiss wrote: > Hi Krzysztof > > Ack, sounds good. > > Maybe also from you, any opinion between these two binding styles? > > So first using index of mboxes for the numbering, where for the known > usages the first element (and sometimes the 3rd - ipc-2) are empty <>. >

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-20 Thread Luca Weiss
On Montag, 20. Mai 2024 08:46:39 MESZ Krzysztof Kozlowski wrote: > On 15/05/2024 17:06, Luca Weiss wrote: > > Hi Rob, > > > > Any feedback on the below topic? > > Can be explained in description, like > mboxes: > description: Each entry corresponds to one remote processor > maxItems: 5 Hi

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-20 Thread Krzysztof Kozlowski
On 15/05/2024 17:06, Luca Weiss wrote: > Hi Rob, > > Any feedback on the below topic? Can be explained in description, like mboxes: description: Each entry corresponds to one remote processor maxItems: 5 Best regards, Krzysztof

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-05-15 Thread Luca Weiss
Hi Rob, Any feedback on the below topic? Regards Luca On Donnerstag, 25. April 2024 20:54:40 MESZ Luca Weiss wrote: > On Donnerstag, 25. April 2024 18:17:15 MESZ Rob Herring wrote: > > On Wed, Apr 24, 2024 at 07:21:51PM +0200, Luca Weiss wrote: > > > The qcom,ipc-N properties are essentially

Re: [PATCH RFC] rethook: inline arch_rethook_trampoline_callback() in assembly code

2024-04-29 Thread Andrii Nakryiko
On Wed, Apr 24, 2024 at 5:02 PM Andrii Nakryiko wrote: > > At the lowest level, rethook-based kretprobes on x86-64 architecture go > through arch_rethoook_trampoline() function, manually written in > assembly, which calls into a simple arch_rethook_trampoline_callback() > function, written in C,

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-04-25 Thread Luca Weiss
On Donnerstag, 25. April 2024 18:17:15 MESZ Rob Herring wrote: > On Wed, Apr 24, 2024 at 07:21:51PM +0200, Luca Weiss wrote: > > The qcom,ipc-N properties are essentially providing a reference to a > > mailbox, so allow using the mboxes property to do the same in a more > > structured way. > >

Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-04-25 Thread Rob Herring
On Wed, Apr 24, 2024 at 07:21:51PM +0200, Luca Weiss wrote: > The qcom,ipc-N properties are essentially providing a reference to a > mailbox, so allow using the mboxes property to do the same in a more > structured way. Can we mark qcom,ipc-N as deprecated then? > Since multiple SMSM hosts are

[PATCH RFC] rethook: inline arch_rethook_trampoline_callback() in assembly code

2024-04-24 Thread Andrii Nakryiko
At the lowest level, rethook-based kretprobes on x86-64 architecture go through arch_rethoook_trampoline() function, manually written in assembly, which calls into a simple arch_rethook_trampoline_callback() function, written in C, and only doing a few straightforward field assignments, before

Re: [PATCH RFC 2/2] soc: qcom: smsm: Support using mailbox interface

2024-04-24 Thread Konrad Dybcio
On 4/24/24 19:21, Luca Weiss wrote: Add support for using the mbox interface instead of manually writing to the syscon. With this change the driver will attempt to get the mailbox first, and if that fails it will fall back to the existing way of using qcom,ipc-* properties and converting to

[PATCH RFC 2/2] soc: qcom: smsm: Support using mailbox interface

2024-04-24 Thread Luca Weiss
Add support for using the mbox interface instead of manually writing to the syscon. With this change the driver will attempt to get the mailbox first, and if that fails it will fall back to the existing way of using qcom,ipc-* properties and converting to syscon. Signed-off-by: Luca Weiss ---

[PATCH RFC 0/2] Support mailbox interface in qcom,smsm driver

2024-04-24 Thread Luca Weiss
Take a shot at converting the last driver that requires direct "qcom,ipc*" syscon references in devicetree by allowing the smsm driver to use the mailbox interface to achieve the same effect. I'm not very happy about how the devicetree change looks in the end. Perhaps it's better to use

[PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-04-24 Thread Luca Weiss
The qcom,ipc-N properties are essentially providing a reference to a mailbox, so allow using the mboxes property to do the same in a more structured way. Since multiple SMSM hosts are supported, we need to be able to provide the correct mailbox for each host. The old qcom,ipc-N properties map to

Re: [PATCH RFC ftrace] Asynchronous grace period for register_ftrace_direct()

2024-04-03 Thread Paul E. McKenney
On Wed, Apr 03, 2024 at 03:29:12PM -0400, Steven Rostedt wrote: > On Wed, 3 Apr 2024 11:53:14 -0700 > "Paul E. McKenney" wrote: > > > @@ -5366,6 +5366,13 @@ static void remove_direct_functions_hash(struct > > ftrace_hash *hash, unsigned long > > } > > } > > > > +static void

Re: [PATCH RFC ftrace] Asynchronous grace period for register_ftrace_direct()

2024-04-03 Thread Steven Rostedt
On Wed, 3 Apr 2024 11:53:14 -0700 "Paul E. McKenney" wrote: > @@ -5366,6 +5366,13 @@ static void remove_direct_functions_hash(struct > ftrace_hash *hash, unsigned long > } > } > > +static void register_ftrace_direct_cb(struct rcu_head *rhp) > +{ > + struct ftrace_hash *fhp =

[PATCH RFC ftrace] Asynchronous grace period for register_ftrace_direct()

2024-04-03 Thread Paul E. McKenney
Note that the immediate pressure for this patch should be relieved by the NAPI patch series [1], but this sort of problem could easily arise again. So would this change make sense? When running heavy test workloads with KASAN enabled, RCU Tasks grace periods can extend for many tens of seconds,

[PATCH RFC 04/10] mm: page_frag: add '_va' suffix to page_frag API

2024-03-28 Thread Yunsheng Lin
Currently most of the API for page_frag API is returning 'virtual address' as output or expecting 'virtual address' as input, in order to differentiate the API handling between 'virtual address' and 'struct page', add '_va' suffix to the corresponding API mirroring the page_pool_alloc_va() API of

Re: [PATCH RFC ftrace] Chose RCU Tasks based on TASKS_RCU rather than PREEMPTION

2024-03-01 Thread Paul E. McKenney
On Fri, Mar 01, 2024 at 03:30:01PM -0500, Steven Rostedt wrote: > On Fri, 1 Mar 2024 12:25:10 -0800 > "Paul E. McKenney" wrote: > > > > That would work for me. If there are no objections, I will make this > > > change. > > > > But I did check the latency of synchronize_rcu_tasks_rude()

Re: [PATCH RFC ftrace] Chose RCU Tasks based on TASKS_RCU rather than PREEMPTION

2024-03-01 Thread Steven Rostedt
On Fri, 1 Mar 2024 12:25:10 -0800 "Paul E. McKenney" wrote: > > That would work for me. If there are no objections, I will make this > > change. > > But I did check the latency of synchronize_rcu_tasks_rude() (about 100ms) > and synchronize_rcu() (about 20ms). This is on a

Re: [PATCH RFC ftrace] Chose RCU Tasks based on TASKS_RCU rather than PREEMPTION

2024-03-01 Thread Paul E. McKenney
On Wed, Feb 28, 2024 at 01:16:04PM -0800, Paul E. McKenney wrote: > On Wed, Feb 28, 2024 at 03:22:36PM -0500, Steven Rostedt wrote: > > On Wed, 28 Feb 2024 11:38:29 -0800 > > "Paul E. McKenney" wrote: > > > > > The advent of CONFIG_PREEMPT_AUTO, AKA lazy preemption, will mean that > > > even

Re: [PATCH RFC ftrace] Chose RCU Tasks based on TASKS_RCU rather than PREEMPTION

2024-02-28 Thread Paul E. McKenney
On Wed, Feb 28, 2024 at 03:22:36PM -0500, Steven Rostedt wrote: > On Wed, 28 Feb 2024 11:38:29 -0800 > "Paul E. McKenney" wrote: > > > The advent of CONFIG_PREEMPT_AUTO, AKA lazy preemption, will mean that > > even kernels built with CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY > > might see

Re: [PATCH RFC ftrace] Chose RCU Tasks based on TASKS_RCU rather than PREEMPTION

2024-02-28 Thread Steven Rostedt
On Wed, 28 Feb 2024 11:38:29 -0800 "Paul E. McKenney" wrote: > The advent of CONFIG_PREEMPT_AUTO, AKA lazy preemption, will mean that > even kernels built with CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY > might see the occasional preemption, and that this preemption just might > happen

[PATCH RFC ftrace] Chose RCU Tasks based on TASKS_RCU rather than PREEMPTION

2024-02-28 Thread Paul E. McKenney
The advent of CONFIG_PREEMPT_AUTO, AKA lazy preemption, will mean that even kernels built with CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY might see the occasional preemption, and that this preemption just might happen within a trampoline. Therefore, update ftrace_shutdown() to invoke

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-21 Thread Masahiro Yamada
On Wed, Feb 21, 2024 at 6:01 PM John Garry wrote: > > On 08/02/2024 10:08, John Garry wrote: > > On 05/02/2024 23:10, Masahiro Yamada wrote: > I think what you can contribute are: > > - Explore the UTS_RELEASE users, and check if you can get rid of it. > >>> Unfortunately I

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-21 Thread John Garry
On 08/02/2024 10:08, John Garry wrote: On 05/02/2024 23:10, Masahiro Yamada wrote: I think what you can contribute are:    - Explore the UTS_RELEASE users, and check if you can get rid of it. Unfortunately I expect resistance for this. I also expect places like FW loader it is necessary. And

Re: [PATCH RFC 1/5] tracing/probes: Fix to search structure fields correctly

2024-02-17 Thread Google
Let me pick this patch because this is a real bugfix. On Wed, 14 Feb 2024 22:22:23 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Fix to search a field from the structure which has anonymous union > correctly. > Since the reference `type` pointer was updated in

[PATCH RFC 5/5] tracing/probes: Support $argN in return probe (kprobe and fprobe)

2024-02-14 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Support accessing $argN in the return probe events. This will help users to record entry data in function return (exit) event for simplfing the function entry/exit information in one event, and record the result values (e.g. allocated object/initialized object) at

[PATCH RFC 4/5] tracing/probes: cleanup: Set trace_probe::nr_args at trace_probe_init

2024-02-14 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Instead of incrementing the trace_probe::nr_args, init it at trace_probe_init(). This is a cleanup, so the behavior is not changed. Signed-off-by: Masami Hiramatsu (Google) --- kernel/trace/trace_eprobe.c |2 +- kernel/trace/trace_probe.c | 10 ++

[PATCH RFC 3/5] tracing/probes: Cleanup probe argument parser

2024-02-14 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Cleanup traceprobe_parse_probe_arg_body() to split out the type parser and post-processing part of fetch_insn. This makes no functional change. Signed-off-by: Masami Hiramatsu (Google) --- kernel/trace/trace_probe.c | 230

[PATCH RFC 2/5] tracing/fprobe-event: cleanup: Fix a wrong comment in fprobe event

2024-02-14 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Despite the fprobe event, "Kretprobe" was commented. So fix it. Signed-off-by: Masami Hiramatsu (Google) --- kernel/trace/trace_fprobe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_fprobe.c

[PATCH RFC 1/5] tracing/probes: Fix to search structure fields correctly

2024-02-14 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Fix to search a field from the structure which has anonymous union correctly. Since the reference `type` pointer was updated in the loop, the search loop suddenly aborted where it hits an anonymous union. Thus it can not find the field after the anonymous union.

[PATCH RFC 0/5] tracing/probes: Support function parameter access from return probe

2024-02-14 Thread Masami Hiramatsu (Google)
Hi, Here is a series of patches to support accessing function entry data from function *return* probes (including kretprobe and fprobe-exit event). This allows us to access the results of some functions, which returns the error code and its results are passed via function parameter, such as an

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-08 Thread John Garry
On 05/02/2024 23:10, Masahiro Yamada wrote: I think what you can contribute are: - Explore the UTS_RELEASE users, and check if you can get rid of it. Unfortunately I expect resistance for this. I also expect places like FW loader it is necessary. And when this is used in sysfs, people will

Re: [PATCH RFC 0/2] Add GPU support to MSM8953 SoC

2024-02-06 Thread Bjorn Andersson
On Thu, 25 Jan 2024 22:56:24 +0100, Luca Weiss wrote: > Add the GPU IOMMU and GPU nodes to the msm8953 dtsi so GPU can work. > > First of all, functionally this series looks fine, tested on > sdm632-fairphone-fp3. > > Secondly and the reason this is marked RFC for now is basically just dt >

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-05 Thread Masahiro Yamada
On Mon, Feb 5, 2024 at 5:25 PM John Garry wrote: > > On 02/02/2024 15:01, Masahiro Yamada wrote: > >> -- > >> 2.35.3 > > > > As you see, several drivers store UTS_RELEASE in their driver data, > > and even print it in debug print. > > > > > > I do not see why it is useful. > > I would tend to

Re: [PATCH RFC v3 22/35] arm64: mte: Enable tag storage if CMA areas have been activated

2024-02-05 Thread Alexandru Elisei
Hi Evgenii, On Fri, Feb 02, 2024 at 02:30:00PM -0800, Evgenii Stepanov wrote: > On Thu, Jan 25, 2024 at 8:44 AM Alexandru Elisei > wrote: > > > > Before enabling MTE tag storage management, make sure that the CMA areas > > have been successfully activated. If a CMA area fails activation, the

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-05 Thread John Garry
On 02/02/2024 15:01, Masahiro Yamada wrote: -- 2.35.3 As you see, several drivers store UTS_RELEASE in their driver data, and even print it in debug print. I do not see why it is useful. I would tend to agree, and mentioned that earlier. As you discussed in 3/4, if UTS_RELEASE is

Re: [PATCH RFC v3 28/35] arm64: mte: swap: Handle tag restoring when missing tag storage

2024-02-02 Thread Peter Collingbourne
On Fri, Feb 2, 2024 at 6:56 AM Alexandru Elisei wrote: > > Hi Peter, > > On Thu, Feb 01, 2024 at 08:02:40PM -0800, Peter Collingbourne wrote: > > On Thu, Jan 25, 2024 at 8:45 AM Alexandru Elisei > > wrote: > > > > > > Linux restores tags when a page is swapped in and there are tags > > >

Re: [PATCH RFC v3 28/35] arm64: mte: swap: Handle tag restoring when missing tag storage

2024-02-02 Thread Evgenii Stepanov
On Fri, Feb 2, 2024 at 6:56 AM Alexandru Elisei wrote: > > Hi Peter, > > On Thu, Feb 01, 2024 at 08:02:40PM -0800, Peter Collingbourne wrote: > > On Thu, Jan 25, 2024 at 8:45 AM Alexandru Elisei > > wrote: > > > > > > Linux restores tags when a page is swapped in and there are tags > > >

Re: [PATCH RFC v3 22/35] arm64: mte: Enable tag storage if CMA areas have been activated

2024-02-02 Thread Evgenii Stepanov
On Thu, Jan 25, 2024 at 8:44 AM Alexandru Elisei wrote: > > Before enabling MTE tag storage management, make sure that the CMA areas > have been successfully activated. If a CMA area fails activation, the pages > are kept as reserved. Reserved pages are never used by the page allocator. > > If

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-02 Thread Jakub Kicinski
On Sat, 3 Feb 2024 00:01:26 +0900 Masahiro Yamada wrote: > I do not see why it is useful. > As you discussed in 3/4, if UTS_RELEASE is unneeded, > it is better to get rid of it. To be clear - the discussion on 3/4 was about the fact that netdev already prints UTS_RELEASE into the version member

Re: [PATCH RFC 0/4] Introduce uts_release

2024-02-02 Thread Masahiro Yamada
On Wed, Jan 31, 2024 at 7:49 PM John Garry wrote: > > When hacking it is a waste of time and compute energy that we need to > rebuild much kernel code just for changing the head git commit, like this: > > > touch include/generated/utsrelease.h > > time make -j3 > mkdir -p

Re: [PATCH RFC v3 28/35] arm64: mte: swap: Handle tag restoring when missing tag storage

2024-02-02 Thread Alexandru Elisei
Hi Peter, On Thu, Feb 01, 2024 at 08:02:40PM -0800, Peter Collingbourne wrote: > On Thu, Jan 25, 2024 at 8:45 AM Alexandru Elisei > wrote: > > > > Linux restores tags when a page is swapped in and there are tags associated > > with the swap entry which the new page will replace. The saved tags

Re: [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU

2024-02-02 Thread Konrad Dybcio
On 27.01.2024 18:32, Luca Weiss wrote: > On Freitag, 26. Jänner 2024 00:50:43 CET Konrad Dybcio wrote: >> On 1/25/24 22:56, Luca Weiss wrote: >>> From: Vladimir Lypak >>> >>> Add the GPU node for the Adreno 506 found on this family of SoCs. The >>> clock speeds are a bit different per SoC

Re: [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU

2024-02-02 Thread Konrad Dybcio
On 27.01.2024 18:24, Luca Weiss wrote: > On Freitag, 26. Jänner 2024 00:49:55 CET Konrad Dybcio wrote: >> On 1/25/24 23:24, Dmitry Baryshkov wrote: >>> On 25/01/2024 23:56, Luca Weiss wrote: From: Vladimir Lypak Add the IOMMU used for the GPU on MSM8953. Signed-off-by:

Re: [PATCH RFC v3 28/35] arm64: mte: swap: Handle tag restoring when missing tag storage

2024-02-01 Thread Peter Collingbourne
On Thu, Jan 25, 2024 at 8:45 AM Alexandru Elisei wrote: > > Linux restores tags when a page is swapped in and there are tags associated > with the swap entry which the new page will replace. The saved tags are > restored even if the page will not be mapped as tagged, to protect against > cases

Re: [PATCH RFC v3 31/35] khugepaged: arm64: Don't collapse MTE enabled VMAs

2024-02-01 Thread Alexandru Elisei
On Thu, Feb 01, 2024 at 01:42:08PM +0530, Anshuman Khandual wrote: > > > On 1/25/24 22:12, Alexandru Elisei wrote: > > copy_user_highpage() will do memory allocation if there are saved tags for > > the destination page, and the page is missing tag storage. > > > > After commit a349d72fd9ef

Re: [PATCH RFC v3 30/35] arm64: mte: ptrace: Handle pages with missing tag storage

2024-02-01 Thread Alexandru Elisei
Hi, On Thu, Feb 01, 2024 at 02:51:39PM +0530, Anshuman Khandual wrote: > > > On 1/25/24 22:12, Alexandru Elisei wrote: > > A page can end up mapped in a MTE enabled VMA without the corresponding tag > > storage block reserved. Tag accesses made by ptrace in this case can lead > > to the wrong

Re: [PATCH RFC v3 13/35] mm: memory: Introduce fault-on-access mechanism for pages

2024-02-01 Thread Alexandru Elisei
Hi, On Thu, Feb 01, 2024 at 11:22:13AM +0530, Anshuman Khandual wrote: > On 1/25/24 22:12, Alexandru Elisei wrote: > > Introduce a mechanism that allows an architecture to trigger a page fault, > > and add the infrastructure to handle that fault accordingly. To use make> > > use of this, an arch

Re: [PATCH RFC v3 12/35] mm: Call arch_swap_prepare_to_restore() before arch_swap_restore()

2024-02-01 Thread Alexandru Elisei
Hi, On Thu, Feb 01, 2024 at 09:00:23AM +0530, Anshuman Khandual wrote: > > > On 1/25/24 22:12, Alexandru Elisei wrote: > > arm64 uses arch_swap_restore() to restore saved tags before the page is > > swapped in and it's called in atomic context (with the ptl lock held). > > > > Introduce

Re: [PATCH RFC 3/4] net: ethtool: Use uts_release

2024-02-01 Thread John Garry
On 01/02/2024 16:09, Jakub Kicinski wrote: On Thu, 1 Feb 2024 14:20:23 +0100 Jiri Pirko wrote: BTW, I assume that changes like this are also ok: 8<- net: team: Don't bother filling in ethtool driver version Yup, just to be clear - you can send this independently from the

Re: [PATCH RFC 3/4] net: ethtool: Use uts_release

2024-02-01 Thread Jakub Kicinski
On Thu, 1 Feb 2024 14:20:23 +0100 Jiri Pirko wrote: > >BTW, I assume that changes like this are also ok: > > > >8<- > > > > net: team: Don't bother filling in ethtool driver version Yup, just to be clear - you can send this independently from the series, tag is as [PATCH

Re: [PATCH RFC 3/4] net: ethtool: Use uts_release

2024-02-01 Thread Jiri Pirko
Thu, Feb 01, 2024 at 01:57:16PM CET, john.g.ga...@oracle.com wrote: >On 31/01/2024 19:24, Jakub Kicinski wrote: >> On Wed, 31 Jan 2024 10:48:50 + John Garry wrote: >> > Instead of using UTS_RELEASE, use uts_release, which means that we don't >> > need to rebuild the code just for the git head

Re: [PATCH RFC 3/4] net: ethtool: Use uts_release

2024-02-01 Thread John Garry
On 31/01/2024 19:24, Jakub Kicinski wrote: On Wed, 31 Jan 2024 10:48:50 + John Garry wrote: Instead of using UTS_RELEASE, use uts_release, which means that we don't need to rebuild the code just for the git head commit changing. Signed-off-by: John Garry Yes, please! Acked-by: Jakub

Re: [PATCH RFC v3 30/35] arm64: mte: ptrace: Handle pages with missing tag storage

2024-02-01 Thread Anshuman Khandual
On 1/25/24 22:12, Alexandru Elisei wrote: > A page can end up mapped in a MTE enabled VMA without the corresponding tag > storage block reserved. Tag accesses made by ptrace in this case can lead > to the wrong tags being read or memory corruption for the process that is > using the tag storage

Re: [PATCH RFC v3 31/35] khugepaged: arm64: Don't collapse MTE enabled VMAs

2024-02-01 Thread Anshuman Khandual
On 1/25/24 22:12, Alexandru Elisei wrote: > copy_user_highpage() will do memory allocation if there are saved tags for > the destination page, and the page is missing tag storage. > > After commit a349d72fd9ef ("mm/pgtable: add rcu_read_lock() and > rcu_read_unlock()s"), collapse_huge_page()

Re: [PATCH RFC v3 13/35] mm: memory: Introduce fault-on-access mechanism for pages

2024-01-31 Thread Anshuman Khandual
On 1/25/24 22:12, Alexandru Elisei wrote: > Introduce a mechanism that allows an architecture to trigger a page fault, > and add the infrastructure to handle that fault accordingly. To use make> use > of this, an arch is expected to mark the table entry as PAGE_NONE (which > will cause a fault

Re: [PATCH RFC v3 12/35] mm: Call arch_swap_prepare_to_restore() before arch_swap_restore()

2024-01-31 Thread Anshuman Khandual
On 1/25/24 22:12, Alexandru Elisei wrote: > arm64 uses arch_swap_restore() to restore saved tags before the page is > swapped in and it's called in atomic context (with the ptl lock held). > > Introduce arch_swap_prepare_to_restore() that will allow an architecture to > perform extra work

Re: [PATCH RFC 0/4] Introduce uts_release

2024-01-31 Thread Greg KH
On Wed, Jan 31, 2024 at 05:16:09PM +, John Garry wrote: > On 31/01/2024 16:22, Greg KH wrote: > > > before: > > > real0m53.591s > > > user1m1.842s > > > sys 0m9.161s > > > > > > after: > > > real0m37.481s > > > user0m46.461s > > > sys 0m7.199s > > > > > > Sending as

Re: [PATCH RFC 2/4] tracing: Use uts_release

2024-01-31 Thread Steven Rostedt
On Wed, 31 Jan 2024 10:48:49 + John Garry wrote: > Instead of using UTS_RELEASE, use uts_release, which means that we don't > need to rebuild the code just for the git head commit changing. > > Signed-off-by: John Garry Acked-by: Steven Rostedt (Google) -- Steve > --- >

Re: [PATCH RFC 3/4] net: ethtool: Use uts_release

2024-01-31 Thread Jakub Kicinski
On Wed, 31 Jan 2024 10:48:50 + John Garry wrote: > Instead of using UTS_RELEASE, use uts_release, which means that we don't > need to rebuild the code just for the git head commit changing. > > Signed-off-by: John Garry Yes, please! Acked-by: Jakub Kicinski

Re: [PATCH RFC 0/4] Introduce uts_release

2024-01-31 Thread John Garry
On 31/01/2024 16:22, Greg KH wrote: before: real0m53.591s user1m1.842s sys 0m9.161s after: real0m37.481s user0m46.461s sys 0m7.199s Sending as an RFC as I need to test more of the conversions and I would like to also convert more UTS_RELEASE users to prove this is

Re: [PATCH RFC 0/4] Introduce uts_release

2024-01-31 Thread Greg KH
On Wed, Jan 31, 2024 at 10:48:47AM +, John Garry wrote: > When hacking it is a waste of time and compute energy that we need to > rebuild much kernel code just for changing the head git commit, like this: > > > touch include/generated/utsrelease.h > > time make -j3 > mkdir -p

Re: [PATCH RFC v3 08/35] mm: cma: Introduce cma_alloc_range()

2024-01-31 Thread Alexandru Elisei
Hi, On Wed, Jan 31, 2024 at 11:54:17AM +0530, Anshuman Khandual wrote: > > > On 1/30/24 17:05, Alexandru Elisei wrote: > > Hi, > > > > On Tue, Jan 30, 2024 at 10:50:00AM +0530, Anshuman Khandual wrote: > >> > >> On 1/25/24 22:12, Alexandru Elisei wrote: > >>> Today, cma_alloc() is used to

Re: [PATCH RFC v3 09/35] mm: cma: Introduce cma_remove_mem()

2024-01-31 Thread Alexandru Elisei
Hi, On Wed, Jan 31, 2024 at 06:49:34PM +0530, Anshuman Khandual wrote: > On 1/30/24 17:03, Alexandru Elisei wrote: > > Hi, > > > > I really appreciate the feedback you have given me so far. I believe the > > commit message isn't clear enough and there has been a confusion. > > > > A CMA user

Re: [PATCH RFC v3 06/35] mm: cma: Make CMA_ALLOC_SUCCESS/FAIL count the number of pages

2024-01-31 Thread Alexandru Elisei
Hi, On Wed, Jan 31, 2024 at 10:10:05AM +0530, Anshuman Khandual wrote: > > > On 1/30/24 17:28, Alexandru Elisei wrote: > > Hi, > > > > On Tue, Jan 30, 2024 at 10:22:11AM +0530, Anshuman Khandual wrote: > >> > >> On 1/29/24 17:21, Alexandru Elisei wrote: > >>> Hi, > >>> > >>> On Mon, Jan 29,

Re: [PATCH RFC v3 09/35] mm: cma: Introduce cma_remove_mem()

2024-01-31 Thread Anshuman Khandual
On 1/30/24 17:03, Alexandru Elisei wrote: > Hi, > > I really appreciate the feedback you have given me so far. I believe the > commit message isn't clear enough and there has been a confusion. > > A CMA user adds a CMA area to the cma_areas array with > cma_declare_contiguous_nid() or

Re: [PATCH RFC v3 11/35] mm: Allow an arch to hook into folio allocation when VMA is known

2024-01-31 Thread Alexandru Elisei
Hi, On Wed, Jan 31, 2024 at 12:23:51PM +0530, Anshuman Khandual wrote: > > > On 1/30/24 17:04, Alexandru Elisei wrote: > > Hi, > > > > On Tue, Jan 30, 2024 at 03:25:20PM +0530, Anshuman Khandual wrote: > >> > >> On 1/25/24 22:12, Alexandru Elisei wrote: > >>> arm64 uses VM_HIGH_ARCH_0 and

[PATCH RFC 1/4] init: Add uts_release

2024-01-31 Thread John Garry
Add a char [] for UTS_RELEASE so that we don't need to rebuild code which references UTS_RELEASE. Signed-off-by: John Garry --- include/linux/utsname.h | 1 + init/version.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/linux/utsname.h b/include/linux/utsname.h index

[PATCH RFC 0/4] Introduce uts_release

2024-01-31 Thread John Garry
When hacking it is a waste of time and compute energy that we need to rebuild much kernel code just for changing the head git commit, like this: > touch include/generated/utsrelease.h > time make -j3 mkdir -p /home/john/mnt_sda4/john/kernel-dev2/tools/objtool && make

[PATCH RFC 4/4] firmware_loader: Use uts_release

2024-01-31 Thread John Garry
Instead of using UTS_RELEASE, use uts_release, which means that we don't need to rebuild the code just for the git head commit changing. Since UTS_RELEASE was used for fw_path and this points to const data, append uts_release dynamically to an intermediate string. Signed-off-by: John Garry ---

[PATCH RFC 3/4] net: ethtool: Use uts_release

2024-01-31 Thread John Garry
Instead of using UTS_RELEASE, use uts_release, which means that we don't need to rebuild the code just for the git head commit changing. Signed-off-by: John Garry --- net/ethtool/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ethtool/ioctl.c

[PATCH RFC 2/4] tracing: Use uts_release

2024-01-31 Thread John Garry
Instead of using UTS_RELEASE, use uts_release, which means that we don't need to rebuild the code just for the git head commit changing. Signed-off-by: John Garry --- kernel/trace/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace.c

  1   2   3   4   5   6   7   8   9   10   >