2022-06-15 16:50:58

by Pavel Tikhomirov

[permalink] [raw]
Subject: [PATCH v2 0/2] Introduce CABA helper process tree

Please see "Add CABA tree to task_struct" for deeper explanation, and
"tests: Add CABA selftest" for a small test and an actual case for which
we might need CABA.

Probably the original problem of restoring process tree with complex
sessions can be resolved by allowing sessions copying, like we do for
process group, but I'm not sure if that would be too secure to do it,
and if there would not be another similar resource in future.

We can use CABA not only for CRIU for restoring processes, in normal
life when processes detach CABA will help to understand from which place
in process tree they were originally started from sshd/crond or
something else.

Hope my idea is not completely insane =)

CC: Eric Biederman <[email protected]>
CC: Kees Cook <[email protected]>
CC: Alexander Viro <[email protected]>
CC: Ingo Molnar <[email protected]>
CC: Peter Zijlstra <[email protected]>
CC: Juri Lelli <[email protected]>
CC: Vincent Guittot <[email protected]>
CC: Dietmar Eggemann <[email protected]>
CC: Steven Rostedt <[email protected]>
CC: Ben Segall <[email protected]>
CC: Mel Gorman <[email protected]>
CC: Daniel Bristot de Oliveira <[email protected]>
CC: Valentin Schneider <[email protected]>
CC: Andrew Morton <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

Pavel Tikhomirov (2):
Add CABA tree to task_struct
tests: Add CABA selftest

arch/ia64/kernel/mca.c | 3 +
fs/exec.c | 1 +
fs/proc/array.c | 20 +
include/linux/sched.h | 7 +
init/init_task.c | 3 +
kernel/exit.c | 50 ++-
kernel/fork.c | 4 +
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/caba/.gitignore | 1 +
tools/testing/selftests/caba/Makefile | 7 +
tools/testing/selftests/caba/caba_test.c | 501 +++++++++++++++++++++++
tools/testing/selftests/caba/config | 1 +
12 files changed, 593 insertions(+), 6 deletions(-)
create mode 100644 tools/testing/selftests/caba/.gitignore
create mode 100644 tools/testing/selftests/caba/Makefile
create mode 100644 tools/testing/selftests/caba/caba_test.c
create mode 100644 tools/testing/selftests/caba/config

--
2.35.3