summaryrefslogtreecommitdiffstats
path: root/Documentation/trace
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-07-03 16:40:28 +0900
committerSteven Rostedt <rostedt@goodmis.org>2014-01-02 16:17:44 -0500
commitdcad1a204f72624796ae83359403898d10393b9c (patch)
tree801d8e11c1e2ffef8c8de48980a01a08a5ddd194 /Documentation/trace
parenta4734145a4771ffa0cd5ef283a5cfd03b30bedf3 (diff)
downloadop-kernel-dev-dcad1a204f72624796ae83359403898d10393b9c.zip
op-kernel-dev-dcad1a204f72624796ae83359403898d10393b9c.tar.gz
tracing/uprobes: Fetch args before reserving a ring buffer
Fetching from user space should be done in a non-atomic context. So use a per-cpu buffer and copy its content to the ring buffer atomically. Note that we can migrate during accessing user memory thus use a per-cpu mutex to protect concurrent accesses. This is needed since we'll be able to fetch args from an user memory which can be swapped out. Before that uprobes could fetch args from registers only which saved in a kernel space. While at it, use __get_data_size() and store_trace_args() to reduce code duplication. And add struct uprobe_cpu_buffer and its helpers as suggested by Oleg. Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: zhangwei(Jovi) <jovi.zhangwei@huawei.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'Documentation/trace')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud