|
From: Julian S. <se...@so...> - 2020-01-22 09:46:45
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=685247b67a6104b71131de6ae6b2e455786a83ad commit 685247b67a6104b71131de6ae6b2e455786a83ad Author: Julian Seward <js...@ac...> Date: Wed Jan 22 10:45:40 2020 +0100 Bug 416464 - Handle ioctl PR_CAPBSET_READ/DROP. Patch from Stefan Bruens (ste...@rw...). Diff: --- coregrind/m_syswrap/syswrap-linux.c | 6 +++++ include/vki/vki-linux.h | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index d04a081..bc09628 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -1524,6 +1524,12 @@ PRE(sys_prctl) PRE_REG_READ2(int, "prctl", int, option, int, mode); } break; + case VKI_PR_CAPBSET_READ: + PRE_REG_READ2(int, "prctl", int, option, int, capability); + break; + case VKI_PR_CAPBSET_DROP: + PRE_REG_READ2(int, "prctl", int, option, int, capability); + break; default: PRE_REG_READ5(long, "prctl", int, option, unsigned long, arg2, unsigned long, arg3, diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 91600db..8b40b26 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -2607,8 +2607,53 @@ struct vki_vt_consize { #define VKI_PR_SET_SECCOMP 22 +#define VKI_PR_CAPBSET_READ 23 +#define VKI_PR_CAPBSET_DROP 24 + +#define VKI_PR_GET_TSC 25 +#define VKI_PR_SET_TSC 26 + +#define VKI_PR_GET_SECUREBITS 27 +#define VKI_PR_SET_SECUREBITS 28 + +#define VKI_PR_SET_TIMERSLACK 29 +#define VKI_PR_GET_TIMERSLACK 30 + +#define VKI_PR_TASK_PERF_EVENTS_DISABLE 31 +#define VKI_PR_TASK_PERF_EVENTS_ENABLE 32 + +#define VKI_PR_MCE_KILL 33 +#define VKI_PR_MCE_KILL_GET 34 + #define VKI_PR_SET_PTRACER 0x59616d61 +#define VKI_PR_SET_CHILD_SUBREAPER 36 +#define VKI_PR_GET_CHILD_SUBREAPER 37 + +#define VKI_PR_SET_NO_NEW_PRIVS 38 +#define VKI_PR_GET_NO_NEW_PRIVS 39 + +#define VKI_PR_GET_TID_ADDRESS 40 + +#define VKI_PR_SET_THP_DISABLE 41 +#define VKI_PR_GET_THP_DISABLE 42 + +#define VKI_PR_MPX_ENABLE_MANAGEMENT 43 +#define VKI_PR_MPX_DISABLE_MANAGEMENT 44 + +#define VKI_PR_SET_FP_MODE 45 +#define VKI_PR_GET_FP_MODE 46 + +#define VKI_PR_CAP_AMBIENT 47 + +#define VKI_PR_SVE_SET_VL 50 +#define VKI_PR_SVE_GET_VL 51 +#define VKI_PR_GET_SPECULATION_CTRL 52 +#define VKI_PR_SET_SPECULATION_CTRL 53 +#define VKI_PR_PAC_RESET_KEYS 54 +#define VKI_PR_SET_TAGGED_ADDR_CTRL 55 +#define VKI_PR_GET_TAGGED_ADDR_CTRL 56 + //---------------------------------------------------------------------- // From linux-2.6.19/include/linux/usbdevice_fs.h //---------------------------------------------------------------------- |