aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf
diff options
context:
space:
mode:
authorAndreas Ziegler <[email protected]>2019-02-06 20:00:13 +0100
committerSteven Rostedt (VMware) <[email protected]>2019-02-11 15:58:30 -0500
commitf6675872db57305fa957021efc788f9983ed3b67 (patch)
tree5d7e97877a3ebf080f2bff24d16003b3b5ac203d /tools/testing/selftests/bpf
parent0722069a5374b904ec1a67f91249f90e1cfae259 (diff)
tracing: probeevent: Correctly update remaining space in dynamic area
Commit 9178412ddf5a ("tracing: probeevent: Return consumed bytes of dynamic area") improved the string fetching mechanism by returning the number of required bytes after copying the argument to the dynamic area. However, this return value is now only used to increment the pointer inside the dynamic area but misses updating the 'maxlen' variable which indicates the remaining space in the dynamic area. This means that fetch_store_string() always reads the *total* size of the dynamic area from the data_loc pointer instead of the *remaining* size (and passes it along to strncpy_from_{user,unsafe}) even if we're already about to copy data into the middle of the dynamic area. Link: http://lkml.kernel.org/r/[email protected] Cc: Ingo Molnar <[email protected]> Cc: [email protected] Fixes: 9178412ddf5a ("tracing: probeevent: Return consumed bytes of dynamic area") Acked-by: Masami Hiramatsu <[email protected]> Signed-off-by: Andreas Ziegler <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf')
0 files changed, 0 insertions, 0 deletions