criu/pie
Tycho Andersen 221af18ea0 seccomp: add support for SECCOMP_MODE_FILTER
This commit adds basic support for dumping and restoring seccomp filters
via the new ptrace interface. There are two current known limitations with
this approach:

1. This approach doesn't support restoring tasks who first do a seccomp()
   and then a setuid(); the test elaborates on this and I don't think it is
   tough to do, but it is not done yet.

2. Filters are compared via memcmp(), so two tasks which have the same
   parent task and install identical (via memory) filters will have those
   filters considered to be the "same". Since we force all tasks to have
   the same creds (including seccomp filters) right now, this isn't a
   problem.

The approach used here is very similar to the cgroup approach: the actual
filters are stored in a seccomp.img, and each task has an id that points to
the part of the filter tree it needs to restore. This keeps us from dumping
the same filter multiple times, since filters are inherited on fork.

v2:
 * remove unused seccomp_filters field from struct rst_info
 * rework memory layout for passing filters to restorer blob
 * add a sanity check when finding inherited filters

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-11-17 10:51:20 +03:00
..
piegen Append newline when using pr_err() 2015-10-09 18:28:00 +03:00
log-simple.c pie: Support %p printing 2015-11-05 15:34:48 +03:00
Makefile Build pie objects separately 2015-10-14 15:53:07 +03:00
parasite-vdso.c vdso: Rework vdso processing files 2015-09-10 14:07:22 +03:00
parasite.c vdso: Rework vdso processing files 2015-09-10 14:07:22 +03:00
pie-reloc.lds.S.in ppc64: pie -- Move the TOC in its own section 2015-06-08 23:53:29 +03:00
pie-relocs.c pie: piegen -- Slightly rework the building procedure 2015-06-08 23:53:27 +03:00
pie-relocs.h Use run-time page_size() in pie_size() 2015-07-28 13:38:20 +03:00
pie.lds.S.in arch/ppc64: Add PowerPC 64 LE support 2015-04-30 09:57:49 +03:00
restorer.c seccomp: add support for SECCOMP_MODE_FILTER 2015-11-17 10:51:20 +03:00
util-fd.c util-fd: Use standard BUG_ON instead of hand-made 2015-03-04 17:50:06 +03:00
util-vdso.c pie: Give VDSO symbol table local scope 2015-10-05 13:21:16 +03:00
util.c criu: Drop redundant newline from pr_perror 2014-08-22 19:22:39 +04:00