From owner-svn-src-all@freebsd.org Sat Oct 24 14:23:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B010E44AD81; Sat, 24 Oct 2020 14:23:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJNcx49sgz4c1H; Sat, 24 Oct 2020 14:23:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7312519E17; Sat, 24 Oct 2020 14:23:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09OENjWY025832; Sat, 24 Oct 2020 14:23:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09OENj4b025830; Sat, 24 Oct 2020 14:23:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010241423.09OENj4b025830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 24 Oct 2020 14:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367000 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 367000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Oct 2020 14:23:45 -0000 Author: trasz Date: Sat Oct 24 14:23:44 2020 New Revision: 367000 URL: https://svnweb.freebsd.org/changeset/base/367000 Log: Further improve prctl(2) debug. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26916 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 Sat Oct 24 13:31:40 2020 (r366999) +++ head/sys/compat/linux/linux_misc.c Sat Oct 24 14:23:44 2020 (r367000) @@ -1949,6 +1949,10 @@ linux_prctl(struct thread *td, struct linux_prctl_args (void *)(register_t)args->arg2, sizeof(pdeath_signal))); break; + case LINUX_PR_SET_DUMPABLE: + linux_msg(td, "unsupported prctl PR_SET_DUMPABLE"); + error = EINVAL; + break; case LINUX_PR_GET_KEEPCAPS: /* * Indicate that we always clear the effective and @@ -2006,6 +2010,14 @@ linux_prctl(struct thread *td, struct linux_prctl_args /* * Same as returned by Linux without CONFIG_SECCOMP enabled. */ + error = EINVAL; + break; + case LINUX_PR_SET_NO_NEW_PRIVS: + linux_msg(td, "unsupported prctl PR_SET_NO_NEW_PRIVS"); + error = EINVAL; + break; + case LINUX_PR_SET_PTRACER: + linux_msg(td, "unsupported prctl PR_SET_PTRACER"); error = EINVAL; break; default: Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Sat Oct 24 13:31:40 2020 (r366999) +++ head/sys/compat/linux/linux_misc.h Sat Oct 24 14:23:44 2020 (r367000) @@ -50,12 +50,15 @@ * Second arg is a ptr to return the * signal. */ +#define LINUX_PR_SET_DUMPABLE 4 #define LINUX_PR_GET_KEEPCAPS 7 /* Get drop capabilities on setuid */ #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_PR_SET_NO_NEW_PRIVS 38 +#define LINUX_PR_SET_PTRACER 1499557217 #define LINUX_MAX_COMM_LEN 16 /* Maximum length of the process name. */