tracing: probeevent: Fix probe argument parser and handler
Subsystems (2)
Masami Hiramatsu
maintainerv2 cover tracing: probeevent: Fix probe argument parser and handler
Hi,
Here is the 2nd version of series to fix several bugs in probe event argument parser and handler routines.
In this version I just added Fixes tags so that it makes clear which release should be fixed.
Recently I got 2 issues reported by Andreas, see
https://www.mail-archive.com/[email protected]/msg1899098.html
One issue is already fixed by Andreas (Thanks!) but $comm handling issue still exists on uprobe event. [1/3] fixes it.
And I found other issues around that, [2/3] is just a trivial cleanup, [3/3] fixes $comm type issue which occurs not only uprobe events but also on kprobe events. Anyway, after this series applied, $comm must be "string" type and not be an array.
Thank you,
---
Masami Hiramatsu (3):
tracing: uprobes: Re-enable $comm support for uprobe events
tracing: probeevent: Do not accumulate on ret variable
tracing: probeevent: Fix to make the type of $comm string
kernel/trace/trace_probe.c | 13 +++++++------ kernel/trace/trace_probe_tmpl.h | 2 +- kernel/trace/trace_uprobe.c | 15 +++++++++++++-- 3 files changed, 21 insertions(+), 9 deletions(-)
--
Masami Hiramatsu (Linaro) <[email protected]>
Masami Hiramatsu
maintainerPATCH v2 1/3 tracing: uprobes: Re-enable $comm support for uprobe events
Since commit 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code") dropped the $comm support from uprobe events, this re-enables it.
For $comm support, uses strlcpy() instead of strncpy_from_user() to copy current task's comm. Because it is in the kernel space, strncpy_from_user() always fails to copy the comm. This also uses strlen() instead of strnlen_user() to measure the length of the comm.
--- kernel/trace/trace_uprobe.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
kernel/trace/trace_uprobe.c +13 -2
@@ -156,7 +156,10 @@ fetch_store_string(unsigned long addr, void *dest, void *base)if (unlikely (!maxlen))return -ENOMEM ; - ret =strncpy_from_user (dst, src, maxlen); +if (addr == (unsigned long )current->comm) + ret =strlcpy (dst, current->comm, maxlen); +else + ret =strncpy_from_user (dst, src, maxlen);if (ret >=0 ) {if (ret == maxlen) dst[ret -1 ] ='\0' ;
@@ -180,7 +183,12 @@ fetch_store_strlen(unsigned long addr)int len;void __user *vaddr = (void __force __user *) addr; - len =strnlen_user (vaddr,MAX_STRING_SIZE ); +if (addr == (unsigned long )current->comm) { + len =strlen (current->comm); +if (len) + len++; + }else + len =strnlen_user (vaddr,MAX_STRING_SIZE );return (len >MAX_STRING_SIZE ) ?0 : len; }
@@ -220,6 +228,9 @@ process_fetch_insn(struct fetch_insn *code, struct pt_regs *regs, void *dest,case FETCH_OP_IMM : val = code->immediate;break ; +case FETCH_OP_COMM : + val = (unsigned long )current->comm; +break ;case FETCH_OP_FOFFS : val =translate_user_vaddr (code->immediate);break ;
Steven Rostedt
maintainerRe: [PATCH v2 1/3] tracing: uprobes: Re-enable $comm support for uprobe events
Quoted 23 lines · On Fri, 18 Jan 2019 13:44:25 +0900 Masami Hiramatsu <[email protected]> wrote:
Since commit
533059281ee5("tracing: probeevent: Introduce new argument fetching code") dropped the $comm support from uprobe events, this re-enables it.For $comm support, uses
strlcpy()instead ofstrncpy_from_user()to copy current task's comm. Because it is in the kernel space,strncpy_from_user()always fails to copy the comm. This also usesstrlen()instead ofstrnlen_user()to measure the length of the comm.Fixes 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")Signed-off-by Masami Hiramatsu <[email protected]>Reported-by Andreas Ziegler <[email protected]>Acked-by Andreas Ziegler <[email protected]>--- kernel/trace/trace_uprobe.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)kernel/trace/trace_uprobe.c +0
-0
kernel/trace/trace_uprobe.c fetch_store_string(unsigned long addr, void *dest, void *base) · line 160
Quoted 6 lines
kernel/trace/trace_uprobe.c +2
-1@@ -156,7 +156,10 @@ fetch_store_string(unsigned long addr, void *dest, void *base)if (unlikely (!maxlen))return -ENOMEM ; - ret =strncpy_from_user (dst, src, maxlen); +if (addr == (unsigned long )current->comm) + ret =strlcpy (dst, current->comm, maxlen);
As user space (although only root) defines the size of the event being stored, and we could trick addr to be current->comm (although difficult), we could possibly leak data if maxlen is > TASK_COMM_LEN. I would feel better if we tested maxlen against TASK_COMM_LEN in this case.
if (maxlen > TASK_COMM_LEN) maxlen = TASK_COMM_LEN;
Or if we don't think it can happen, add a WARN_ON(maxlen > TASK_COMM_LEN).
-- Steve
Quoted 29 lines
kernel/trace/trace_uprobe.c +11
-1+else + ret =strncpy_from_user (dst, src, maxlen);if (ret >=0 ) {if (ret == maxlen) dst[ret -1 ] ='\0' ;@@ -180,7 +183,12 @@ fetch_store_strlen(unsigned long addr)int len;void __user *vaddr = (void __force __user *) addr; - len =strnlen_user (vaddr,MAX_STRING_SIZE ); +if (addr == (unsigned long )current->comm) { + len =strlen (current->comm); +if (len) + len++; + }else + len =strnlen_user (vaddr,MAX_STRING_SIZE );return (len >MAX_STRING_SIZE ) ?0 : len; }@@ -220,6 +228,9 @@ process_fetch_insn(struct fetch_insn *code, struct pt_regs *regs, void *dest,case FETCH_OP_IMM : val = code->immediate;break ; +case FETCH_OP_COMM : + val = (unsigned long )current->comm; +break ;case FETCH_OP_FOFFS : val =translate_user_vaddr (code->immediate);break ;
Masami Hiramatsu
maintainerRe: [PATCH v2 1/3] tracing: uprobes: Re-enable $comm support for uprobe events
Quoted 39 lines · On Wed, 23 Jan 2019 03:40:05 -0500 Steven Rostedt <[email protected]> wrote:
Quoted 23 lines · On Fri, 18 Jan 2019 13:44:25 +0900 Masami Hiramatsu <[email protected]> wrote:
Since commit
533059281ee5("tracing: probeevent: Introduce new argument fetching code") dropped the $comm support from uprobe events, this re-enables it.For $comm support, uses
strlcpy()instead ofstrncpy_from_user()to copy current task's comm. Because it is in the kernel space,strncpy_from_user()always fails to copy the comm. This also usesstrlen()instead ofstrnlen_user()to measure the length of the comm.Fixes 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")Signed-off-by Masami Hiramatsu <[email protected]>Reported-by Andreas Ziegler <[email protected]>Acked-by Andreas Ziegler <[email protected]>--- kernel/trace/trace_uprobe.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)kernel/trace/trace_uprobe.c +0
-0kernel/trace/trace_uprobe.c fetch_store_string(unsigned long addr, void *dest, void *base) · line 160
Quoted 6 lines
kernel/trace/trace_uprobe.c +2
-1@@ -156,7 +156,10 @@ fetch_store_string(unsigned long addr, void *dest, void *base)if (unlikely (!maxlen))return -ENOMEM ; - ret =strncpy_from_user (dst, src, maxlen); +if (addr == (unsigned long )current->comm) + ret =strlcpy (dst, current->comm, maxlen);As user space (although only root) defines the size of the event being stored, and we could trick addr to be
current->comm(although difficult), we could possibly leak data if maxlen is >TASK_COMM_LEN. I would feel better if we tested maxlen againstTASK_COMM_LENin this case.
Quoted 5 lines
if (maxlen > TASK_COMM_LEN) maxlen = TASK_COMM_LEN;Or if we don't think it can happen, add a
WARN_ON(maxlen > TASK_COMM_LEN).
Hmm, I thought current->comm is null terminated, isn't it? Anyway, if user can specify current->comm, he must be able to specify current->comm + TASK_COMM_LEN too by kprobe_events. Moreover, it can leak any data in kernel...
And also, maxlen is calculated by fetch_store_strlen, right before this has been called.
I rather concern the case that if we have shorter size of maxlen than current->comm. Would we better show "(fault)" or tail-cut name ? (of course this is very difficult to happen, since the length is already checked.)
Thank you,
Quoted 34 lines
-- Steve
Quoted 29 lines
kernel/trace/trace_uprobe.c +11
-1+else + ret =strncpy_from_user (dst, src, maxlen);if (ret >=0 ) {if (ret == maxlen) dst[ret -1 ] ='\0' ;@@ -180,7 +183,12 @@ fetch_store_strlen(unsigned long addr)int len;void __user *vaddr = (void __force __user *) addr; - len =strnlen_user (vaddr,MAX_STRING_SIZE ); +if (addr == (unsigned long )current->comm) { + len =strlen (current->comm); +if (len) + len++; + }else + len =strnlen_user (vaddr,MAX_STRING_SIZE );return (len >MAX_STRING_SIZE ) ?0 : len; }@@ -220,6 +228,9 @@ process_fetch_insn(struct fetch_insn *code, struct pt_regs *regs, void *dest,case FETCH_OP_IMM : val = code->immediate;break ; +case FETCH_OP_COMM : + val = (unsigned long )current->comm; +break ;case FETCH_OP_FOFFS : val =translate_user_vaddr (code->immediate);break ;
Signature · 1 line
Masami Hiramatsu <[email protected]>
Steven Rostedt
maintainerRe: [PATCH v2 1/3] tracing: uprobes: Re-enable $comm support for uprobe events
Quoted 21 lines · On Thu, 24 Jan 2019 10:43:22 +0900 Masami Hiramatsu <[email protected]> wrote:
Quoted 21 lines
Quoted 8 lines
kernel/trace/trace_uprobe.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)kernel/trace/trace_uprobe.c +0
-0kernel/trace/trace_uprobe.c fetch_store_string(unsigned long addr, void *dest, void *base) · line 160
Quoted 6 lines
kernel/trace/trace_uprobe.c +2
-1@@ -156,7 +156,10 @@ fetch_store_string(unsigned long addr, void *dest, void *base)if (unlikely (!maxlen))return -ENOMEM ; - ret =strncpy_from_user (dst, src, maxlen); +if (addr == (unsigned long )current->comm) + ret =strlcpy (dst, current->comm, maxlen);As user space (although only root) defines the size of the event being stored, and we could trick addr to be
current->comm(although difficult), we could possibly leak data if maxlen is >TASK_COMM_LEN. I would feel better if we tested maxlen againstTASK_COMM_LENin this case.
Quoted 7 lines
Quoted 5 lines
if (maxlen > TASK_COMM_LEN) maxlen = TASK_COMM_LEN;Or if we don't think it can happen, add a
WARN_ON(maxlen > TASK_COMM_LEN).Hmm, I thought
current->commis null terminated, isn't it?
Yes it is. I was thinking it was a memcpy (I blame conference fatigue ;-)
Quoted 3 lines
Anyway, if user can specify
current->comm, he must be able to specifycurrent->comm+TASK_COMM_LENtoo bykprobe_events. Moreover, it can leak any data in kernel...
But this is for uprobes, which I why I was concerned.
Quoted 8 lines
And also, maxlen is calculated by
fetch_store_strlen, right before this has been called.I rather concern the case that if we have shorter size of maxlen than
current->comm. Would we better show "(fault)" or tail-cut name ? (of course this is very difficult to happen, since the length is already checked.)
Actually, it would still be OK, as strlcpy does guarantee to be nul terminated as long as it's greater than zero.
Hmm, strlcpy doesn't pad the rest if what is written is shorter than what is allocated. Could that leak data?
-- Steve
Masami Hiramatsu
maintainerRe: [PATCH v2 1/3] tracing: uprobes: Re-enable $comm support for uprobe events
Quoted 32 lines · On Wed, 23 Jan 2019 21:09:56 -0500 Steven Rostedt <[email protected]> wrote:
Quoted 21 lines · On Thu, 24 Jan 2019 10:43:22 +0900 Masami Hiramatsu <[email protected]> wrote:
Quoted 21 lines
Quoted 8 lines
kernel/trace/trace_uprobe.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)kernel/trace/trace_uprobe.c +0
-0kernel/trace/trace_uprobe.c fetch_store_string(unsigned long addr, void *dest, void *base) · line 160
Quoted 6 lines
kernel/trace/trace_uprobe.c +2
-1@@ -156,7 +156,10 @@ fetch_store_string(unsigned long addr, void *dest, void *base)if (unlikely (!maxlen))return -ENOMEM ; - ret =strncpy_from_user (dst, src, maxlen); +if (addr == (unsigned long )current->comm) + ret =strlcpy (dst, current->comm, maxlen);As user space (although only root) defines the size of the event being stored, and we could trick addr to be
current->comm(although difficult), we could possibly leak data if maxlen is >TASK_COMM_LEN. I would feel better if we tested maxlen againstTASK_COMM_LENin this case.Quoted 7 lines
Quoted 5 lines
if (maxlen > TASK_COMM_LEN) maxlen = TASK_COMM_LEN;Or if we don't think it can happen, add a
WARN_ON(maxlen > TASK_COMM_LEN).Hmm, I thought
current->commis null terminated, isn't it?
Quoted 7 lines
Yes it is. I was thinking it was a memcpy (I blame conference fatigue ;-)
Quoted 3 lines
Anyway, if user can specify
current->comm, he must be able to specifycurrent->comm+TASK_COMM_LENtoo bykprobe_events. Moreover, it can leak any data in kernel...But this is for uprobes, which I why I was concerned.
OK, what we will leak by this, is the address of current->comm to root user for a specific application running instance.
Since they can try to write a data on a register and trace it like "+0(%ax):string" and if rax register has hit the current->comm, uprobe event will record comm, but other case, it will show "(fault)". So they can trial and error on that (but leaking just a temporary task instance address).
If you concern this, I can change it to store a special fixed value, like (unsigned long)-EINVAL, instead of current->comm address. :-)
Quoted 10 lines
Quoted 7 lines
And also, maxlen is calculated by
fetch_store_strlen, right before this has been called.I rather concern the case that if we have shorter size of maxlen than
current->comm. Would we better show "(fault)" or tail-cut name ? (of course this is very difficult to happen, since the length is already checked.)Actually, it would still be OK, as strlcpy does guarantee to be nul terminated as long as it's greater than zero.
Ah, I meant that we can record a shorter name, like "shutdown" -> "sh".
Quoted 2 lines
Hmm, strlcpy doesn't pad the rest if what is written is shorter than what is allocated. Could that leak data?
Even though, there should be a data that had been recorded on the ring buffer.
Thank you,
Signature · 1 line
Masami Hiramatsu <[email protected]>
Steven Rostedt
maintainerRe: [PATCH v2 1/3] tracing: uprobes: Re-enable $comm support for uprobe events
In reply to Masami Hiramatsukernel/trace/trace_uprobe.c fetch_store_strlen(unsigned long addr) · line 189
Quoted 9 lines · On Fri, 18 Jan 2019 13:44:25 +0900 Masami Hiramatsu <[email protected]> wrote:
kernel/trace/trace_uprobe.c +4
-1@@ -180,7 +183,12 @@ fetch_store_strlen(unsigned long addr)int len;void __user *vaddr = (void __force __user *) addr; - len =strnlen_user (vaddr,MAX_STRING_SIZE ); +if (addr == (unsigned long )current->comm) { + len =strlen (current->comm); +if (len) + len++;
Why only add 1 if len is non zero? Why not always do it.
One thing, len should always be greater than 0, and the other is that this makes it inconsistent with the NULL case of reading the address in userspace.
-- Steve
Quoted 4 lines
kernel/trace/trace_uprobe.c +2
-0+ }else + len =strnlen_user (vaddr,MAX_STRING_SIZE );return (len >MAX_STRING_SIZE ) ?0 : len;
Masami Hiramatsu
maintainerRe: [PATCH v2 1/3] tracing: uprobes: Re-enable $comm support for uprobe events
Quoted 15 lines · On Wed, 6 Feb 2019 15:52:43 -0500 Steven Rostedt <[email protected]> wrote:
kernel/trace/trace_uprobe.c fetch_store_strlen(unsigned long addr) · line 189
Quoted 9 lines · On Fri, 18 Jan 2019 13:44:25 +0900 Masami Hiramatsu <[email protected]> wrote:
kernel/trace/trace_uprobe.c +4
-1@@ -180,7 +183,12 @@ fetch_store_strlen(unsigned long addr)int len;void __user *vaddr = (void __force __user *) addr; - len =strnlen_user (vaddr,MAX_STRING_SIZE ); +if (addr == (unsigned long )current->comm) { + len =strlen (current->comm); +if (len) + len++;Why only add 1 if len is non zero? Why not always do it.
Quoted 3 lines
One thing, len should always be greater than 0, and the other is that this makes it inconsistent with the NULL case of reading the address in userspace.
Agreed, it should not 0, so it should be;
len = strlen(current->comm) + 1;
Thank you!
Quoted 8 lines
-- Steve
Quoted 4 lines
kernel/trace/trace_uprobe.c +2
-0+ }else + len =strnlen_user (vaddr,MAX_STRING_SIZE );return (len >MAX_STRING_SIZE ) ?0 : len;
Signature · 1 line
Masami Hiramatsu <[email protected]>
Masami Hiramatsu
maintainerPATCH v2 2/3 tracing: probeevent: Do not accumulate on ret variable
In reply to Masami HiramatsuDo not accumulate strlen result on "ret" local variable, because it is accumulated on "total" local variable for array case.
--- kernel/trace/trace_probe_tmpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace_probe_tmpl.h +1 -1
@@ -88,7 +88,7 @@ process_fetch_insn_bottom(struct fetch_insn *code, unsigned long val,/* 3rd stage: store value to buffer */ if (unlikely (!dest)) {if (code->op ==FETCH_OP_ST_STRING ) { - ret +=fetch_store_strlen (val + code->offset); + ret =fetch_store_strlen (val + code->offset); code++; goto array; }else
Masami Hiramatsu
maintainerPATCH v2 3/3 tracing: probeevent: Fix to make the type of $comm string
In reply to Masami HiramatsuFix to make the type of $comm "string".
If we set the other type to $comm argument, it shows meaningless value or wrong data. Currently probe events allow us to set string array type (e.g. ":string[2]"), or other digit types like x8 on $comm. But since clearly $comm is just a string data, it should not be fetched by other types including array.
--- kernel/trace/trace_probe.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
kernel/trace/trace_probe.c +7 -6
@@ -405,13 +405,14 @@ static int traceprobe_parse_probe_arg_body(char *arg, ssize_t *size,return -E2BIG ; } } -/* -* The default type of $comm should be "string", and it can't be -* dereferenced. -*/ -if (!t &&strcmp (arg,"$comm" ) ==0 ) + +/* Since $comm can not be dereferred, we can find $comm by strcmp */ +if (strcmp (arg,"$comm" ) ==0 ) { +/* The type of $comm must be "string", and not an array. */ +if (parg->count || (t &&strcmp (t,"string" ))) +return -EINVAL ; parg->type =find_fetch_type ("string" ); -else + }else parg->type =find_fetch_type (t);if (!parg->type) {pr_info ("Unsupported type: %s\n" , t);
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v2 3/3] tracing: probeevent: Fix to make the type of $comm string
Hi,
Quoted 61 lines · Sasha Levin
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag, fixing commit:
35abb67de744tracing: exposecurrent->commto [ku]probe events.The bot has tested the following trees: v4.20.3, v4.19.16, v4.14.94, v4.9.151.
v4.20.3: Build OK!
v4.19.16: Failed to apply! Possible dependencies:
40b53b771806("tracing: probeevent: Add array type support")533059281ee5("tracing: probeevent: Introduce new argument fetching code")56de76305279("tracing: probeevent: Cleanup print argument functions")60c2e0cebfd0("tracing: probeevent: Add symbol type")eeb07b061500("tracing: probeevent: Cleanup argument field definition")f451bc89d835("tracing: probeevent: Unify fetch type tables")v4.14.94: Failed to apply! Possible dependencies:
40b53b771806("tracing: probeevent: Add array type support")45408c4f9250("tracing: kprobes: Prohibit probing on notrace function")4bebdc7a85aa("bpf: add helperbpf_perf_prog_read_value")
533059281ee5("tracing: probeevent: Introduce new argument fetching code")60c2e0cebfd0("tracing: probeevent: Add symbol type")
908432ca84fc("bpf: add helperbpf_perf_event_read_valuefor perf event array map")97562633bcba("bpf: perf event change needed for subsequent bpf helpers")9802d86585db("bpf: add abpf_override_functionhelper")
b4da3340eae2("tracing/kprobe: bpf: Check error injectable event is on function entry")cd86d1fd2102("bpf: Adding helper functionbpf_getsockops")
dd0bb688eaa2("bpf: add abpf_override_functionhelper")
de8f3a83b0a0("bpf: add meta pointer for direct access")
f3edacbd697f("bpf: Revertbpf_overrid_function()helper changes.")f451bc89d835("tracing: probeevent: Unify fetch type tables")v4.9.151: Failed to apply! Possible dependencies:
17bedab27231("bpf: xdp: Allow head adjustment in XDP prog")1d9995771fcb("s390: update defconfigs")
23a4e389bdc7("nfp: create separate define for max number of vectors")40b53b771806("tracing: probeevent: Add array type support")45408c4f9250("tracing: kprobes: Prohibit probing on notrace function")533059281ee5("tracing: probeevent: Introduce new argument fetching code")60c2e0cebfd0("tracing: probeevent: Add symbol type")
67f8b1dcb9ee("net/mlx4_en: Refactor the XDP forwarding rings scheme")68453c7a8973("nfp: centralize runtime reconfiguration logic")6b0b7551428e("perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS")7ff5c83a1deb("nfp: simplifynfp_net_poll()")
9802d86585db("bpf: add abpf_override_functionhelper")
a4b562bb8ebd("nfp: use unsigned int for vector/ring counts")b4da3340eae2("tracing/kprobe: bpf: Check error injectable event is on function entry")cbeaf7aa733a("nfp: bring back support for different ring counts")ccc109b8ed24("net/mlx4_en: AddTX_XDPfor CQ types")
dd0bb688eaa2("bpf: add abpf_override_functionhelper")
e390b55d5aef("bpf: makebpf_xdp_adjust_headsupport mandatory")ecd63a0217d5("nfp: add XDP support in the driver")
f18f97ac43d7("tracing/kprobes: Add a helper method to return number of probe hits")f3edacbd697f("bpf: Revertbpf_overrid_function()helper changes.")f451bc89d835("tracing: probeevent: Unify fetch type tables")
Quoted 1 line
How should we proceed with this patch?
I think this should be a case of backporting, which probably needs
- removal of the 'parg->count ||' part from the if statement (and the ', and not an array.' part of the comment above it).
- addition of the old 'ftbl' parameter to find_fetch_type()
for all kernels up to v4.19.16.
While at it, 'deferred' in the newly added comment should probably be 'dereferenced' to match the deleted comment.
Masami, do you want to fix this up and prepare backported patches for the stable kernels?
Thanks,
Andreas
Masami Hiramatsu
maintainerRe: [PATCH v2 3/3] tracing: probeevent: Fix to make the type of $comm string
Quoted 65 lines · On Tue, 22 Jan 2019 19:53:56 +0100 Andreas Ziegler <[email protected]>…
Hi,
Quoted 61 lines · Sasha Levin
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag, fixing commit:
35abb67de744tracing: exposecurrent->commto [ku]probe events.The bot has tested the following trees: v4.20.3, v4.19.16, v4.14.94, v4.9.151.
v4.20.3: Build OK!
v4.19.16: Failed to apply! Possible dependencies:
40b53b771806("tracing: probeevent: Add array type support")533059281ee5("tracing: probeevent: Introduce new argument fetching code")56de76305279("tracing: probeevent: Cleanup print argument functions")60c2e0cebfd0("tracing: probeevent: Add symbol type")eeb07b061500("tracing: probeevent: Cleanup argument field definition")f451bc89d835("tracing: probeevent: Unify fetch type tables")v4.14.94: Failed to apply! Possible dependencies:
40b53b771806("tracing: probeevent: Add array type support")45408c4f9250("tracing: kprobes: Prohibit probing on notrace function")4bebdc7a85aa("bpf: add helperbpf_perf_prog_read_value")
533059281ee5("tracing: probeevent: Introduce new argument fetching code")60c2e0cebfd0("tracing: probeevent: Add symbol type")
908432ca84fc("bpf: add helperbpf_perf_event_read_valuefor perf event array map")97562633bcba("bpf: perf event change needed for subsequent bpf helpers")9802d86585db("bpf: add abpf_override_functionhelper")
b4da3340eae2("tracing/kprobe: bpf: Check error injectable event is on function entry")cd86d1fd2102("bpf: Adding helper functionbpf_getsockops")
dd0bb688eaa2("bpf: add abpf_override_functionhelper")
de8f3a83b0a0("bpf: add meta pointer for direct access")
f3edacbd697f("bpf: Revertbpf_overrid_function()helper changes.")f451bc89d835("tracing: probeevent: Unify fetch type tables")v4.9.151: Failed to apply! Possible dependencies:
17bedab27231("bpf: xdp: Allow head adjustment in XDP prog")1d9995771fcb("s390: update defconfigs")
23a4e389bdc7("nfp: create separate define for max number of vectors")40b53b771806("tracing: probeevent: Add array type support")45408c4f9250("tracing: kprobes: Prohibit probing on notrace function")533059281ee5("tracing: probeevent: Introduce new argument fetching code")60c2e0cebfd0("tracing: probeevent: Add symbol type")
67f8b1dcb9ee("net/mlx4_en: Refactor the XDP forwarding rings scheme")68453c7a8973("nfp: centralize runtime reconfiguration logic")6b0b7551428e("perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS")7ff5c83a1deb("nfp: simplifynfp_net_poll()")
9802d86585db("bpf: add abpf_override_functionhelper")
a4b562bb8ebd("nfp: use unsigned int for vector/ring counts")b4da3340eae2("tracing/kprobe: bpf: Check error injectable event is on function entry")cbeaf7aa733a("nfp: bring back support for different ring counts")ccc109b8ed24("net/mlx4_en: AddTX_XDPfor CQ types")
dd0bb688eaa2("bpf: add abpf_override_functionhelper")
e390b55d5aef("bpf: makebpf_xdp_adjust_headsupport mandatory")ecd63a0217d5("nfp: add XDP support in the driver")
f18f97ac43d7("tracing/kprobes: Add a helper method to return number of probe hits")f3edacbd697f("bpf: Revertbpf_overrid_function()helper changes.")f451bc89d835("tracing: probeevent: Unify fetch type tables")Quoted 1 line
How should we proceed with this patch?
Quoted 8 lines
I think this should be a case of backporting, which probably needs
- removal of the '
parg->count||' part from the if statement (and the ', and not an array.' part of the comment above it).
- addition of the old 'ftbl' parameter tofind_fetch_type()for all kernels up to v4.19.16.
Right, that was expected when I was writing the code...
Quoted 3 lines
While at it, 'deferred' in the newly added comment should probably be 'dereferenced' to match the deleted comment.
ah, sorry it was my typo.
Quoted 3 lines
Masami, do you want to fix this up and prepare backported patches for the stable kernels?
Of course :)
Thank you!
Quoted 5 lines
Thanks,
Andreas
Signature · 1 line
Masami Hiramatsu <[email protected]>