From nobody Fri Jun 17 19:41:24 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9B2F885DB6E; Fri, 17 Jun 2022 19:41:26 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LPqD56Pm8z3jGH; Fri, 17 Jun 2022 19:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dg+JILdpFWGkcncax9PmfLxK0vgOHuwIvZ5LHEPdHl0=; b=Bv+pv4T9e3n9HGxpqXeiY7sPnUbrhXVruQgv2wlcXEv71PseTRdKwoHu1mERHk20a9oQb/ dR690rPVpIqh6xKf2lye8P0xK6EBKHnZjA54EP65X6S7tsrSsr/Nn2X0VMJPgbIZxWrHan 0gm0LGZqhMgqoFrrGAgwJyBSFrQLP+zMa9k/jmtr5T8OoBNxglHQN7G8rC6ggh1w45NJR5 0rtkoIUQsjpGPSF8LMsuEDTz3gEjgvB4EAcKz4QHM/f+4JskGyFJ2AHeNqJQ+39dJqriqt Em6JRVDvu3sptDb+G57CKv8giujGVBwa2CVgK9PB0YD+qUAZCDuvlCYTeOBtuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F076325E03; Fri, 17 Jun 2022 19:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25HJfO6d030437; Fri, 17 Jun 2022 19:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJfOEC030436; Fri, 17 Jun 2022 19:41:24 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:41:24 GMT Message-Id: <202206171941.25HJfOEC030436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 0f23fc29f90f - stable/13 - linux(4): Avoid direct manipulation of td_sigmask List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0f23fc29f90f6ce49975f2576b149ce9e1e35784 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dg+JILdpFWGkcncax9PmfLxK0vgOHuwIvZ5LHEPdHl0=; b=f/YHH18H+a8gHkzbbhINNtpr+k/0q8JKR3w5jQHbWONdKtznmGi+2foNRo2iPDwkCcliB9 KIstgw6IaSKBWyKAN8jaG+MwfoDvmYVsHoJsT0fy3pdr782UZNFJNa64X7B1tABGxjJYRD P8KOb5hH3HCWJAJ2ZNc6HcjWYqRRAaOvH9KpBbZCTyL+z9s/DfgIiZdJv9bufbDFugpmyt Ov88bw4MylnlqO9SLh7psgsHTR8mMapu/YM72AgR8fUPicxznewdZTIRf0gBU7ayCYQfmi RuJ4TWD4XgPdsqXVsj+IvhUHTRt7S6tZiBKBaVApfrPtdrSJHut9Mj+vHULE5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494886; a=rsa-sha256; cv=none; b=RXn4H32lv2wVwNGtvipMVCp1zzmeZa8JiR8Xcc+get6p+9xUOj8Kc8S/q+GmAsIygWCGnh sXoQNfyyxXljc0BuEWW1s8qrwdHfIycfwxcJhVQNI1d4LHDdDGmzdijcriHhkbkhiVNK1X UH0xANJrox29r6RhVPbRLTLCa4z8RIcNufcwu2cCoHdPDJu/nStpAKt7RtREu47IIECdJe W/hd5KHXFOlF4AqT6wWqqcarLVVpKu0DrY6b58L+eyCvY1vaMexpj2QEigi0AWg6I3tli4 q+w4AvwchmsDQ6zWPucuzc6MVRbVK6SqGA0p7pBL/3DZox4Gf133RMg+LSyLug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=0f23fc29f90f6ce49975f2576b149ce9e1e35784 commit 0f23fc29f90f6ce49975f2576b149ce9e1e35784 Author: Dmitry Chagin AuthorDate: 2022-05-30 16:48:20 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:35:37 +0000 linux(4): Avoid direct manipulation of td_sigmask Use kern_sigprocmask() instead of direct manipulation of td_sigmask to reschedule newly blocked signals. MFC after: 2 weeks (cherry picked from commit 2ab9b59faafb68402dbebc285b424cfb06b59cf3) --- sys/amd64/linux/linux_sysvec.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 329a0a2567c0..83aa646fee20 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -465,6 +465,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) struct l_sigcontext *context; struct trapframe *regs; unsigned long rflags; + sigset_t bmask; int error; ksiginfo_t ksi; @@ -513,11 +514,8 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) return (EINVAL); } - PROC_LOCK(p); - linux_to_bsd_sigset(&uc.uc_sigmask, &td->td_sigmask); - SIG_CANTMASK(td->td_sigmask); - signotify(td); - PROC_UNLOCK(p); + linux_to_bsd_sigset(&uc.uc_sigmask, &bmask); + kern_sigprocmask(td, SIG_SETMASK, &bmask, NULL, 0); regs->tf_rdi = context->sc_rdi; regs->tf_rsi = context->sc_rsi;