From nobody Mon May 23 22:11:41 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 EC8131B350A5; Mon, 23 May 2022 22:11:42 +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 4L6Wl2277hz4pJR; Mon, 23 May 2022 22:11:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653343902; 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=oHFdlcgeJWwdMTY0nST0Jx8XgTBFfRdwpCM13dkaY3E=; b=If0embITz9YHfYeZKAf96mtRldDr65zIgA3Y/1fi2VevLTQT7MSwm8PNMMMBcXP1VVtvei 6WAE8kIGdbM5vaqJ/i0GAeA4IJ0xZ/zwQbDXZPavK9cu0VxwO9mcL/Q+kyvcOUjPT1gPJV NIAj7584sA6mVIK2kIr35/PQHSNkhAsMUBi/M7O1SclES1JTY03PiMwtL5LJEBMx/OQsC5 AIT8a79e8gSL9//KZkjlTZwKy7cWI9mrgWdGpARiBXK7G4tNG2iu3JOjdcaGac4yLPC8Jz 7mI1QsSy6JVetjf2VgZuYY2Iy1Rlaexmr+bdxbBaClrBItL1faxkzi8mzkO90A== 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 58EE317CFE; Mon, 23 May 2022 22:11:41 +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 24NMBfNi094693; Mon, 23 May 2022 22:11:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24NMBf1B094692; Mon, 23 May 2022 22:11:41 GMT (envelope-from git) Date: Mon, 23 May 2022 22:11:41 GMT Message-Id: <202205232211.24NMBf1B094692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Justin Hibbits Subject: git: 9171b8068b92 - stable/13 - cpuset: Fix the KASAN and KMSAN builds 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: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9171b8068b929fd3c87f6e903c401571f75971d3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653343902; 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=oHFdlcgeJWwdMTY0nST0Jx8XgTBFfRdwpCM13dkaY3E=; b=Ep6hltRrlYKe9WFag+h35wdhfchrpZ0Xexsf9gGVhWzfyxxoH9sNCQr1Ny2d+/J8/qeNul 4juOZb63CM0mr1cNBPVv16CYiTpspLACu1wTHEh5lVo5AJWu2IamJRAMF8jWYDrUnhXmgC elbqcyVKA3UfY32wSNrYspqbzuMqkiqfKchAvbrhzjJEczudhTC4uLYOQz3awQHaLA+i3U ydgS0pEh0x2RgQ2TPH8eJvGWmeTDmn9jpmHbICRwT/M8fkYaxODmK14qOsdZUbZD+N5K+R uLz8zTk8UBSMiT0lDtjVgmYgvgAVHsGNOzeUf+Xk81IqA+OqYJsbh0GE7Li37Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653343902; a=rsa-sha256; cv=none; b=IHTwIJ+37PovAMfQkfGxQoISsZRyDYGI4NPcWQ7fQWQ8pP/7EAb60JI4Up68on0tqnr9Io cDR6XwKfLuBr51KJ8uaTSRMF8uod2bojiVCsUbwIclxgfQFJ+gamY8WrjVZr4/cwpPXCcE d2d5MoX9axcyONkEnJ43nl2ztB7O8SOulRWRUMFUSOoN9fopof4LHCNkMeFp5PSkoprEn0 rUgXtqsuPTuKH1zTW2AQvSzMn4rtto384qgyr0TJcti8DJUpAUpoYlQoti2QH3pMU2twcV uHZGlghXizY4CgrsluvRCmwj0sP2dfiydBPC5cpGo9F1O0an3IbJEYHLjcCvJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=9171b8068b929fd3c87f6e903c401571f75971d3 commit 9171b8068b929fd3c87f6e903c401571f75971d3 Author: Mark Johnston AuthorDate: 2022-05-20 14:11:31 +0000 Commit: Justin Hibbits CommitDate: 2022-05-23 22:11:22 +0000 cpuset: Fix the KASAN and KMSAN builds Rename the "copyin" and "copyout" fields of struct cpuset_copy_cb to something less generic, since sanitizers define interceptors for copyin() and copyout() using #define. Reported by: syzbot+2db5d644097fc698fb6f@syzkaller.appspotmail.com Fixes: 47a57144af25 ("cpuset: Byte swap cpuset for compat32 on big endian architectures") Sponsored by: The FreeBSD Foundation (cherry picked from commit 4a3e51335e86cee02569c04b9f1e95ca9abcb170) --- sys/compat/freebsd32/freebsd32_misc.c | 4 ++-- sys/compat/linux/linux_misc.c | 4 ++-- sys/kern/kern_cpuset.c | 10 +++++----- sys/sys/cpuset.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index af5d91d59fbc..d213cf8a26a5 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3303,8 +3303,8 @@ copyout32_set(const void *k, void *u, size_t size) } static const struct cpuset_copy_cb cpuset_copy32_cb = { - .copyin = copyin32_set, - .copyout = copyout32_set + .cpuset_copyin = copyin32_set, + .cpuset_copyout = copyout32_set }; int diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index e45a72ecebb7..98be575b7b6c 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -2173,8 +2173,8 @@ linux_sched_getparam(struct thread *td, } static const struct cpuset_copy_cb copy_set = { - .copyin = copyin, - .copyout = copyout + .cpuset_copyin = copyin, + .cpuset_copyout = copyout }; /* diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 9c81dd7a7874..97e09557f08f 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -1742,8 +1742,8 @@ cpuset_check_capabilities(struct thread *td, cpulevel_t level, cpuwhich_t which, } static const struct cpuset_copy_cb copy_set = { - .copyin = copyin, - .copyout = copyout + .cpuset_copyin = copyin, + .cpuset_copyout = copyout }; #ifndef _SYS_SYSPROTO_H_ @@ -1979,7 +1979,7 @@ kern_cpuset_getaffinity(struct thread *td, cpulevel_t level, cpuwhich_t which, if (p) PROC_UNLOCK(p); if (error == 0) - error = cb->copyout(mask, maskp, size); + error = cb->cpuset_copyout(mask, maskp, size); out: free(mask, M_TEMP); return (error); @@ -2229,7 +2229,7 @@ kern_cpuset_getdomain(struct thread *td, cpulevel_t level, cpuwhich_t which, } DOMAINSET_COPY(&outset.ds_mask, mask); if (error == 0) - error = cb->copyout(mask, maskp, domainsetsize); + error = cb->cpuset_copyout(mask, maskp, domainsetsize); if (error == 0) if (suword32(policyp, outset.ds_policy) != 0) error = EFAULT; @@ -2280,7 +2280,7 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t level, cpuwhich_t which, return (error); memset(&domain, 0, sizeof(domain)); mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO); - error = cb->copyin(maskp, mask, domainsetsize); + error = cb->cpuset_copyin(maskp, mask, domainsetsize); if (error) goto out; /* diff --git a/sys/sys/cpuset.h b/sys/sys/cpuset.h index 4f55cdc27103..5df5cff6497b 100644 --- a/sys/sys/cpuset.h +++ b/sys/sys/cpuset.h @@ -159,8 +159,8 @@ struct thread; * ABIs, like compat32. */ struct cpuset_copy_cb { - int (*copyin)(const void *, void *, size_t); - int (*copyout)(const void *, void *, size_t); + int (*cpuset_copyin)(const void *, void *, size_t); + int (*cpuset_copyout)(const void *, void *, size_t); }; struct cpuset *cpuset_thread0(void);