mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ptrace, seccomp: add support for retrieving seccomp metadata
With the new SECCOMP_FILTER_FLAG_LOG, we need to be able to extract these flags for checkpoint restore, since they describe the state of a filter. So, let's add PTRACE_SECCOMP_GET_METADATA, similar to ..._GET_FILTER, which returns the metadata of the nth filter (right now, just the flags). Hopefully this will be future proof, and new per-filter metadata can be added to this struct. Signed-off-by: Tycho Andersen <[email protected]> CC: Kees Cook <[email protected]> CC: Andy Lutomirski <[email protected]> CC: Oleg Nesterov <[email protected]> Signed-off-by: Kees Cook <[email protected]>
This commit is contained in:
parent
f06eae831f
commit
26500475ac
4 changed files with 51 additions and 0 deletions
|
|
@ -1092,6 +1092,10 @@ int ptrace_request(struct task_struct *child, long request,
|
|||
ret = seccomp_get_filter(child, addr, datavp);
|
||||
break;
|
||||
|
||||
case PTRACE_SECCOMP_GET_METADATA:
|
||||
ret = seccomp_get_metadata(child, addr, datavp);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue