From nobody Mon Feb 07 19:52:40 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 6F0D619BAECA; Mon, 7 Feb 2022 19:52:41 +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 4Jsxd45m9cz3pDk; Mon, 7 Feb 2022 19:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644263561; 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=gilZdbTmiMXqyw9NUR4cjZIunS5CmYkRz3DICGNVIDE=; b=JZfBJjxdKbbY/wADQ/2flZ/Kc+At5sjsjzJiJW3aF3CzfbyUIQ112WgE+L1OEtZAuZshwW JXgnyC7DEDRHNtKYe6XQxRiq2PcfdsMZqXPVmmEZHjhteEdkepwYv3W+q+w28flTIKOW6/ v5uGJCrkQ3QgZl9Xf614M/ZUmHsFrVYZEUNqKEJ26fZhXgP5F8sZrhhGzRhDBdh49AbgF3 G5W1dU1rNT2wwYh2W15dr4j98DZK0OOTpCxQQ6c1tmue+TW3irlIZEM55erVagEPP8HQVV bv8Ea046+nv5rru8hSNqbxSNOJ7EwTpjtCbLs84WWrzzK7VLxQFHloT9i96HXw== 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 707073D27; Mon, 7 Feb 2022 19:52:40 +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 217Jqe76069273; Mon, 7 Feb 2022 19:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 217JqelO069272; Mon, 7 Feb 2022 19:52:40 GMT (envelope-from git) Date: Mon, 7 Feb 2022 19:52:40 GMT Message-Id: <202202071952.217JqelO069272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 949e3959669f - main - Trim duplicate code for copying in iovecs for PT_[GS]ETREGSET. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 949e3959669f0ca6697ab0d5e8e0b8194de23f81 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644263561; 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=gilZdbTmiMXqyw9NUR4cjZIunS5CmYkRz3DICGNVIDE=; b=rBgHaVFYe1rUSQaidpHojssUmefPJWYbxqHlTeQUNgOU5qSchY3rEs35EQMGQc47pMea/e hedJBzh/rjOwTMxGbyHGEVD+bwUbzWIZRaVAg4uDN0ty4VW0SZVqw9BCuZfYfvRNSc3735 O3C0EsasSsocI7ktFCQsBgSEQmBKXxJrlMRUQrAn9gYev6b09EQ9igFTtPqkz+pz3lwDCy 8MDkOFAr95UxFmlILbjXmPPVZtjsGdu2txsl157UcTPJgbpglw8B2gQSa2mi/3HPYE5BR3 tvCh2XO9Tap0nHMhZobt8w+bIrMt5ZSlVQO8D81e2IBHCxrflFHUSI4dskc+MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644263561; a=rsa-sha256; cv=none; b=lU61HITcHchCCSJI5mt7qL1uR/31UdVJ62npJzEKrCkdVt7i5e5tU50y+ZodwnRuc7ysna epW8zOYx1ISO/nGakjoEuvq8k7AC1OAbGqfwHEiLkucKETuILBE9bU3cnnec8/8sKlB03p uNtSXDygqS/wrl9RKAD65aeujkCCHNVYHGI1zn8OStG7AAZjW9Nw77ZXbRe6hl8AQRIRlY fJzRGeX5oQ7vBvaYCktuKqDCSjgt8LkCdT5hzRGV0BcXQeFu3UKnfWEfTI1Cyj754Lgjr4 o5t9Dbmzfa/oI7WyIh8NS6k7XbUYf67zSCv488ds17O6GbTyJWTRH45s9FrqKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=949e3959669f0ca6697ab0d5e8e0b8194de23f81 commit 949e3959669f0ca6697ab0d5e8e0b8194de23f81 Author: John Baldwin AuthorDate: 2022-02-07 19:49:29 +0000 Commit: John Baldwin CommitDate: 2022-02-07 19:49:29 +0000 Trim duplicate code for copying in iovecs for PT_[GS]ETREGSET. Reviewed by: andrew, emaste Differential Revision: https://reviews.freebsd.org/D34177 --- 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 790f2597b75f..01337ea51c50 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1026,15 +1026,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 fc4cd897fcba..582bff962f1a 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -627,10 +627,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: