From owner-dev-commits-src-main@freebsd.org Fri Jul 23 14:49:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9A90673916; Fri, 23 Jul 2021 14:49:59 +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 4GWXKg4zPgz51V1; Fri, 23 Jul 2021 14:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5F98A26CEF; Fri, 23 Jul 2021 14:49:59 +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 16NEnxYQ015456; Fri, 23 Jul 2021 14:49:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16NEnxbD015455; Fri, 23 Jul 2021 14:49:59 GMT (envelope-from git) Date: Fri, 23 Jul 2021 14:49:59 GMT Message-Id: <202107231449.16NEnxbD015455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4e8e26a00471 - main - redzone: Raise a compile error if KASAN is configured MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e8e26a00471f1a5e7a2af322265c45b1529c5b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2021 14:50:01 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4e8e26a00471f1a5e7a2af322265c45b1529c5b8 commit 4e8e26a00471f1a5e7a2af322265c45b1529c5b8 Author: Mark Johnston AuthorDate: 2021-07-23 14:30:29 +0000 Commit: Mark Johnston CommitDate: 2021-07-23 14:47:13 +0000 redzone: Raise a compile error if KASAN is configured redzone(9) does some munging of the allocation to insert redzones before and after a valid memory buffer, but KASAN does not know about this and will raise false positives if both are configured. Until this is fixed, do not allow both to be configured. Note that KASAN provides similar checking on its own but currently does not force the creation of redzones for all UMA allocations; this should be addressed as well. Sponsored by: The FreeBSD Foundation --- sys/vm/redzone.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/vm/redzone.c b/sys/vm/redzone.c index affaa5008a22..88e36c41b928 100644 --- a/sys/vm/redzone.c +++ b/sys/vm/redzone.c @@ -37,6 +37,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef KASAN +#error KASAN and DEBUG_REDZONE cannot be configured together +#endif + static SYSCTL_NODE(_vm, OID_AUTO, redzone, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "RedZone data"); static u_long redzone_extra_mem = 0;