Date: Fri, 23 Oct 2020 12:00:31 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366967 - head/sys/compat/linux Message-ID: <202010231200.09NC0Vkh033245@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Fri Oct 23 12:00:30 2020 New Revision: 366967 URL: https://svnweb.freebsd.org/changeset/base/366967 Log: Improve prctl(2) debug. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26899 Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_misc.h Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Fri Oct 23 11:57:55 2020 (r366966) +++ head/sys/compat/linux/linux_misc.c Fri Oct 23 12:00:30 2020 (r366967) @@ -2001,7 +2001,15 @@ linux_prctl(struct thread *td, struct linux_prctl_args error = copyout(comm, (void *)(register_t)args->arg2, strlen(comm) + 1); break; + case LINUX_PR_GET_SECCOMP: + case LINUX_PR_SET_SECCOMP: + /* + * Same as returned by Linux without CONFIG_SECCOMP enabled. + */ + error = EINVAL; + break; default: + linux_msg(td, "unsupported prctl option %d", args->option); error = EINVAL; break; } Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Fri Oct 23 11:57:55 2020 (r366966) +++ head/sys/compat/linux/linux_misc.h Fri Oct 23 12:00:30 2020 (r366967) @@ -54,6 +54,8 @@ #define LINUX_PR_SET_KEEPCAPS 8 /* Set drop capabilities on setuid */ #define LINUX_PR_SET_NAME 15 /* Set process name. */ #define LINUX_PR_GET_NAME 16 /* Get process name. */ +#define LINUX_PR_GET_SECCOMP 21 +#define LINUX_PR_SET_SECCOMP 22 #define LINUX_MAX_COMM_LEN 16 /* Maximum length of the process name. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010231200.09NC0Vkh033245>