summaryrefslogtreecommitdiff
path: root/lib/raid/raid6/powerpc/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2026-06-25 08:34:46 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-06-30 23:58:19 +0900
commit206b25c09080cc20fd4c2bea12d59df4b7ba2121 (patch)
treebc70dbb7591e71bf459751e440dfe6568d22f5f0 /lib/raid/raid6/powerpc/git@git.tavy.me:linux.git
parentcda1fbfc5313bb90daa271d45eea4a8d317a8544 (diff)
tracing: eprobe: read the complete FILTER_PTR_STRING pointer
For a char * element in an event, the FILTER_PTR_STRING filter type is used. When the event occurs, a pointer is stored in the ringbuffer. If an eprobe references such a char * element of a "base event", the stored pointer is truncated when it's read from the ringbuffer. $ cd /sys/kernel/tracing $ echo 'e rcu.rcu_utilization $s:x64 $s:string' > dynamic_events $ echo 1 > tracing_on $ echo 1 > events/eprobes/enable $ sleep 1 $ echo 0 > events/eprobes/enable $ cat trace <idle>-0 ...: (rcu.rcu_utilization) arg1=0x4f arg2=(fault) <idle>-0 ...: (rcu.rcu_utilization) arg1=0x2 arg2=(fault) The problem is in get_event_field val = (unsigned long)(*(char *)addr); addr points to the position in the ringbuffer where the pointer was stored. The assignment reads only the lowest byte of the pointer. Fix the cast to read the whole pointer. The output of the test above is now <idle>-0 ... arg1=0xffffffff81c7d3f3 arg2="Start scheduler-tick" <idle>-0 ... arg1=0xffffffff81c57340 arg2="End scheduler-tick" Link: https://lore.kernel.org/all/20260620145339.3234726-1-martin@kaiser.cx/ Fixes: f04dec93466a ("tracing/eprobes: Fix reading of string fields") Signed-off-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'lib/raid/raid6/powerpc/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions