From nobody Fri Jun 17 19:41:32 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 F2E1A85DF86; Fri, 17 Jun 2022 19:41:33 +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 4LPqDF2BFNz3jRy; Fri, 17 Jun 2022 19:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494893; 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=TMgdhGBBzjWFko/ZIlY9b9kKWwUeAggQRHA/811ShmI=; b=IcLrX+4G9/oM2P4EM1nKSFC+XqL/W8xK0si4zJsOyYIFm7fwa2n/t7RvT8Pxo4UGI5Ja0R Yn70PMvg5sM0omZe8G6nsuQCcDGYVQ2YKwTzgoWzGz70moesQko7KoNEiIwzxZzMx3+Jcz pHcYS7xcS3VP/zQrVX89DxRbCDxokMezoSpIJVY8kR/TCa1rnprJZRhE6mdaw1djsIFf3J 8Iojj2QaI2XsynCe5Wtd7JrnWZIaRNivnm2aAPREa4XcVQn+FRG2B37mBRJvhG8FSMQESN rGGG6Dbixj1dHt9sMYzBPfkXoT/bLI0QgY0wTFdo9BEj+cezGnGb6X6KIFncXg== 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 15AD325CA8; Fri, 17 Jun 2022 19:41: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 25HJfWsJ030611; Fri, 17 Jun 2022 19:41:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJfWSf030610; Fri, 17 Jun 2022 19:41:32 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:41:32 GMT Message-Id: <202206171941.25HJfWSf030610@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: 7c61d8e49410 - stable/13 - linux(4): Prefer sizeof(object) vs sizeof(type) 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: 7c61d8e49410041482ae15bf92c3a9c1cf2ca763 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494893; 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=TMgdhGBBzjWFko/ZIlY9b9kKWwUeAggQRHA/811ShmI=; b=DO4wFCejR22e5I6SEwCVH0n6PkmSrb2mE2FFik21KPDFzlluRRnmt05XJbnPZkT2p81jV4 ep7I4GViXPRif3cTX1lhy0Jhq1gaA1OhxGaYVuyN+oNNMS5em5aYYJQaZSdTDJ6c4brehs 521//E+7zVROqSA+DhcVEA5CdmK8bbhS+PK5dSgqHVfnp9jw6MBL7UmWuNGqKAai/JQ/37 gFphBhIXc0rC0nr5EhAD0NSIdQz6gWRPQDK4toC3qsR072EY1GDBnroI9fuOuY5UxxbbCg 6ORJzQnEKuHm5vBSKwpWNzaCPJyvZ/MY/lwCXRFR89GO2TWs2KGoZsUIXjN/Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494893; a=rsa-sha256; cv=none; b=BHCzsWa4uchfQVJFBYVveigFAl1gFxpPUcCOgUe4yoN4zjm7aTt/DD4xC0Yza2ToCNj9c0 aoMa15BqNYxbDN6PaCd6aM3DBOpAUbmQcOOTqGuVR5bNfAdALsXSR9iwnC4b5IwkeyZWhL csh4pP2ESpqKkr16lQDxVO59DrNpvCYNB0Ca5Hd3390PJovFxJPG7MYYM03wUEdZ/otpUd kV+xtL9xJqDXtjXtEdeMvHyQYqErpFUrZ4TEOBUrjyla3mmGzzvDjpYZQb4NP+ksx1Bail vt741Ddik59IWilkHLaCbilSL5xoXWMqOTm+Q/9VXIKDRB98dqXy3e8u82F3Ug== 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=7c61d8e49410041482ae15bf92c3a9c1cf2ca763 commit 7c61d8e49410041482ae15bf92c3a9c1cf2ca763 Author: Dmitry Chagin AuthorDate: 2022-05-30 17:03:14 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:35:40 +0000 linux(4): Prefer sizeof(object) vs sizeof(type) MFC after: 2 weeks (cherry picked from commit 2722e515ac8d0232cd80e5e8848715e27d222902) --- sys/compat/linux/linux_signal.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 7dab6b6775ee..bb20c6211e9b 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -201,7 +201,7 @@ linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap) LINUX_CTR2(sigaltstack, "%p, %p", uap->uss, uap->uoss); if (uap->uss != NULL) { - error = copyin(uap->uss, &lss, sizeof(l_stack_t)); + error = copyin(uap->uss, &lss, sizeof(lss)); if (error != 0) return (error); @@ -215,7 +215,7 @@ linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap) lss.ss_sp = PTROUT(oss.ss_sp); lss.ss_size = oss.ss_size; lss.ss_flags = bsd_to_linux_sigaltstack(oss.ss_flags); - error = copyout(&lss, uap->uoss, sizeof(l_stack_t)); + error = copyout(&lss, uap->uoss, sizeof(lss)); } return (error); @@ -249,7 +249,7 @@ linux_rt_sigaction(struct thread *td, struct linux_rt_sigaction_args *args) return (EINVAL); if (args->act != NULL) { - error = copyin(args->act, &nsa, sizeof(l_sigaction_t)); + error = copyin(args->act, &nsa, sizeof(nsa)); if (error != 0) return (error); } @@ -259,7 +259,7 @@ linux_rt_sigaction(struct thread *td, struct linux_rt_sigaction_args *args) args->oact ? &osa : NULL); if (args->oact != NULL && error == 0) - error = copyout(&osa, args->oact, sizeof(l_sigaction_t)); + error = copyout(&osa, args->oact, sizeof(osa)); return (error); } @@ -303,7 +303,7 @@ linux_sigprocmask(struct thread *td, struct linux_sigprocmask_args *args) int error; if (args->mask != NULL) { - error = copyin(args->mask, &mask, sizeof(l_osigset_t)); + error = copyin(args->mask, &mask, sizeof(mask)); if (error != 0) return (error); LINUX_SIGEMPTYSET(lset); @@ -317,7 +317,7 @@ linux_sigprocmask(struct thread *td, struct linux_sigprocmask_args *args) if (args->omask != NULL && error == 0) { mask = oset.__mask; - error = copyout(&mask, args->omask, sizeof(l_osigset_t)); + error = copyout(&mask, args->omask, sizeof(mask)); } return (error); @@ -340,7 +340,7 @@ linux_rt_sigprocmask(struct thread *td, struct linux_rt_sigprocmask_args *args) args->omask ? &oset : NULL); if (args->omask != NULL && error == 0) - error = copyout(&oset, args->omask, sizeof(l_sigset_t)); + error = copyout(&oset, args->omask, sizeof(oset)); return (error); } @@ -924,7 +924,7 @@ linux_copyin_sigset(l_sigset_t *lset, l_size_t sigsetsize, sigset_t *set, if (sigsetsize != sizeof(l_sigset_t)) return (EINVAL); if (lset != NULL) { - error = copyin(lset, &lmask, sizeof(l_sigset_t)); + error = copyin(lset, &lmask, sizeof(lmask)); if (error != 0) return (error); linux_to_bsd_sigset(&lmask, set);