From nobody Thu May 12 22:56:33 2022 X-Original-To: dev-commits-src-branches@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 6555D1AE4C2C; Thu, 12 May 2022 22:56:34 +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 4KznFs5d9kz3GDt; Thu, 12 May 2022 22:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652396194; 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=j5ws8CvgRempuJ3VrvZjy4ktZN4m1mBIMajTpy+0JiA=; b=AubBA7uVO7EL2reUeNdB5m8qe7aZW5RJWIIt/hPXygDWui0yJ/iQiJ2Q6ArXm0LhcZtVfe LZKd4q7pRzUjNGEXa69P2C+JWPiFPaQXpDDBEu5wAkwYQ6cSHRZI3OJuxLXrgZT+23rkLw 5jiurzrAdL9NLUADl1TumyMLvjU84fc7TjY/cyq1qTrKEf8y5httA/vlhyqlotsOs4dthS O4nyFQ1jSGfVm8E0IGt7yG0BK1TJARNyUWwVmU/Uc7JAAmnnKpFmeCSVYT1Bw3jpgUYLoS Nt1K5koNbSkoSjJiPMzsI8BUz1N225knf+1tNnaCWGdfV6SLraJeg3bITQqiJQ== 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 75774172F5; Thu, 12 May 2022 22:56:33 +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 24CMuXxx020642; Thu, 12 May 2022 22:56:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24CMuX1K020641; Thu, 12 May 2022 22:56:33 GMT (envelope-from git) Date: Thu, 12 May 2022 22:56:33 GMT Message-Id: <202205122256.24CMuX1K020641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bbfd21cdab7a - stable/13 - Trim duplicate code for copying in iovecs for PT_[GS]ETREGSET. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bbfd21cdab7ae7b6747c41d3745dfa72362468f6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652396194; 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=j5ws8CvgRempuJ3VrvZjy4ktZN4m1mBIMajTpy+0JiA=; b=WA7r3snxPcD1KXHjnVkMkOoJs4SZVgyu2j21lOEIOTKOx2rAHrlKKAK37fL5Lrg+hHzQt8 /AqNkkjgrJk7jRv28iX6Fs2hAs4wzBRjaYSxtOWJ8P/1+B+n6SnR21KBbdqo0KuKBvHUzI LFT+7687NMGMVdThsCrqccvA05epRt8cNP7MHmyEz+z9i6iJR5TJbcXmCl1l15jxhnautV yW8b86kmboJcgWALfXBVeugUAKOTbUTFF+2hmmNgO7E88le1BEVaQjq327cBNVRCB06lVR OybsC3HU9p40fk7mYPc1DNU37PacNCHIpw9ofZMzAgJWebss8o5+h0g0fTJo3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652396194; a=rsa-sha256; cv=none; b=My3fZSqWD0NpV7hzpkuN169AnWZfz/ciMp6ze+sC3BsseG9tidUtvp/JrxzDFyU/NJNL+H db4blU5f/CNcsxyaGYLh+UUoqZ7q3jlIRf9uYX5L8pSGUDGj1LWM1xrStOeczI0OzglaKv lK+2/uezvZGgnLr9GUfrDYTE9T72iz2cqWbK797Kf6t2ojCws96U22G6Kb94Wl+A9eEwl1 MxA8wi4hlrsaRERJuRUfUM6TcB9vsaAFdgAqbnj+my82GWJYNsgMNfxIbTkqWqq2PwcChJ 6Tg9sTP9JFAfePSUYxJVgsee/0Q2JnVMcrVuvUShlA6BTl/Fp5T/wYQjVoPEKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bbfd21cdab7ae7b6747c41d3745dfa72362468f6 commit bbfd21cdab7ae7b6747c41d3745dfa72362468f6 Author: John Baldwin AuthorDate: 2022-02-07 19:49:29 +0000 Commit: John Baldwin CommitDate: 2022-05-12 22:12:59 +0000 Trim duplicate code for copying in iovecs for PT_[GS]ETREGSET. Reviewed by: andrew, emaste Differential Revision: https://reviews.freebsd.org/D34177 (cherry picked from commit 949e3959669f0ca6697ab0d5e8e0b8194de23f81) --- sys/compat/freebsd32/freebsd32_misc.c | 9 +-------- sys/kern/sys_process.c | 4 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 7c82aebb55c3..177a7bf05ee4 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -986,15 +986,8 @@ freebsd32_ptrace(struct thread *td, struct freebsd32_ptrace_args *uap) case PT_SETDBREGS: error = copyin(uap->addr, &r.dbreg, sizeof(r.dbreg)); break; - case PT_SETREGSET: - error = copyin(uap->addr, &r32.vec, sizeof(r32.vec)); - if (error != 0) - break; - - r.vec.iov_len = r32.vec.iov_len; - r.vec.iov_base = PTRIN(r32.vec.iov_base); - break; case PT_GETREGSET: + case PT_SETREGSET: error = copyin(uap->addr, &r32.vec, sizeof(r32.vec)); if (error != 0) break; diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index fa2617356e30..2876283ce388 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -626,10 +626,8 @@ sys_ptrace(struct thread *td, struct ptrace_args *uap) case PT_GETDBREGS: bzero(&r.dbreg, sizeof(r.dbreg)); break; - case PT_SETREGSET: - error = copyin(uap->addr, &r.vec, sizeof(r.vec)); - break; case PT_GETREGSET: + case PT_SETREGSET: error = copyin(uap->addr, &r.vec, sizeof(r.vec)); break; case PT_SETREGS: