aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <[email protected]>2012-05-31 16:26:44 -0700
committerLinus Torvalds <[email protected]>2012-05-31 17:49:32 -0700
commitd97b46a64674a267bc41c9e16132ee2a98c3347d (patch)
tree316f77d212c84aef226684eb05d5d33f40743ac9 /tools/perf/util/scripting-engines/trace-event-python.c
parent818411616baf46ceba0cff6f05af3a9b294734f7 (diff)
syscalls, x86: add __NR_kcmp syscall
While doing the checkpoint-restore in the user space one need to determine whether various kernel objects (like mm_struct-s of file_struct-s) are shared between tasks and restore this state. The 2nd step can be solved by using appropriate CLONE_ flags and the unshare syscall, while there's currently no ways for solving the 1st one. One of the ways for checking whether two tasks share e.g. mm_struct is to provide some mm_struct ID of a task to its proc file, but showing such info considered to be not that good for security reasons. Thus after some debates we end up in conclusion that using that named 'comparison' syscall might be the best candidate. So here is it -- __NR_kcmp. It takes up to 5 arguments - the pids of the two tasks (which characteristics should be compared), the comparison type and (in case of comparison of files) two file descriptors. Lookups for pids are done in the caller's PID namespace only. At moment only x86 is supported and tested. [[email protected]: fix up selftests, warnings] [[email protected]: include errno.h] [[email protected]: tweak comment text] Signed-off-by: Cyrill Gorcunov <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Andrey Vagin <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Glauber Costa <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Matt Helsley <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Vasiliy Kulikov <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: [email protected] Cc: Michal Marek <[email protected]> Cc: Frederic Weisbecker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions