Add support for setns syscall
commit60a7ebedc0b53e2cdcea112635a285d8136b68a8
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 15 Nov 2019 09:37:53 +0000 (15 10:37 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 28 Apr 2020 15:36:20 +0000 (28 17:36 +0200)
tree31ae2ff56c4f09394393fbfb1a87114c5336d265
parent0788b1cf7b3e300d6a68dc228f5beeacb1b58a52
Add support for setns syscall

I've tested this on amd64 and arm but I'm enabling it on all
arches since the syscall should work identically on all of them.

This was requested by users for a long time (almost 5 years) and
in fact, some programs (like libvirt) use namespaces and fork off
to enter other namespaces. Lack of implementation means valgrind
can't be used with these programs (or their configuration must be
changed to not use namespaces, which defeats the purpose).

Without knowing it, I've converged to same patch as mentioned in
bugs below.

https://bugs.kde.org/show_bug.cgi?id=343099
https://bugs.kde.org/show_bug.cgi?id=368923
https://bugs.kde.org/show_bug.cgi?id=369031

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
12 files changed:
NEWS
coregrind/m_syswrap/priv_syswrap-linux.h
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-arm-linux.c
coregrind/m_syswrap/syswrap-arm64-linux.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/m_syswrap/syswrap-mips32-linux.c
coregrind/m_syswrap/syswrap-mips64-linux.c
coregrind/m_syswrap/syswrap-nanomips-linux.c
coregrind/m_syswrap/syswrap-s390x-linux.c
coregrind/m_syswrap/syswrap-x86-linux.c
include/vki/vki-scnums-mips32-linux.h