From nobody Mon Dec 1 22:04:01 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99DF62737EE for ; Fri, 28 Nov 2025 03:35:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764300929; cv=none; b=B3QTuBgwIkBRoYV0OyfdeYxoZ2P4vsSw2VLswmreAyR+i1Hzv3r1g48YUt3m7jDg+YOy04uws3MsJoUIjWpScWUuHGT5bZ16ZdPNqSwxd+PmmjLntij4fukOXMtEmvklg+HEWVp/CY/LdCCto+2HlyFhlDkgbEcYIBJuNPmdpbs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764300929; c=relaxed/simple; bh=FC4PooiPCUwHAHZJMCs7URoHHXBrWF+CtvrrcRExlL8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=fQR2z8qjbe5mN9o/XMWstzkJMjdE6sLH17Gj9kQWYx4LZxoiiLz2NGjz+V6onfHLRfcvEUbx0HNPsRaLN18CkLtZT/C1PLOsT6Ddq6GArYj8Xcmi7l+e/UMxnJFTvWUXqBzSYwOByqkfAzvvo7rPu/TcMYmoaQNy7B4ufa4PGZI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CDoMD5u2; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CDoMD5u2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764300926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2zYq5Xg8QPu70UaOO3h6mVKhUd8xeQ64UlU5KTsxCNk=; b=CDoMD5u2zCWYWbGfwsyUwhUAdyxMNJgoF7tFkb0El537++50u9L8rYUPnHI9DpMJwY93+n dXKLxvLGhJXViilDvTE/75HcnO/beaZVIZu349a6Ej5jkCqL7R0OC5mh8B0AKUcVPe2NDK 0/3+IR8sEdg+fV0Cs1Sy+aOPbPJaqNw= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-PSk638q6NMCqBHAkPGt0ZA-1; Thu, 27 Nov 2025 22:35:19 -0500 X-MC-Unique: PSk638q6NMCqBHAkPGt0ZA-1 X-Mimecast-MFC-AGG-ID: PSk638q6NMCqBHAkPGt0ZA_1764300917 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E833A195606F; Fri, 28 Nov 2025 03:35:16 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.7]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3A4DE19560B0; Fri, 28 Nov 2025 03:35:08 +0000 (UTC) From: Baoquan He To: linux-mm@kvack.org Cc: ryabinin.a.a@gmail.com, andreyknvl@gmail.com, glider@google.com, dvyukov@google.com, vincenzo.frascino@arm.com, akpm@linux-foundation.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, elver@google.com, sj@kernel.org, lorenzo.stoakes@oracle.com, snovitoll@gmail.com, christophe.leroy@csgroup.eu, Baoquan He Subject: [PATCH v4 12/12] mm/kasan: make kasan=on|off take effect for all three modes Date: Fri, 28 Nov 2025 11:33:20 +0800 Message-ID: <20251128033320.1349620-13-bhe@redhat.com> In-Reply-To: <20251128033320.1349620-1-bhe@redhat.com> References: <20251128033320.1349620-1-bhe@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Content-Type: text/plain; charset="utf-8" Now everything is ready, set kasan=3Doff can disable kasan for all three modes. Signed-off-by: Baoquan He --- include/linux/kasan-enabled.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/kasan-enabled.h b/include/linux/kasan-enabled.h index b05ec6329fbe..b33c92cc6bd8 100644 --- a/include/linux/kasan-enabled.h +++ b/include/linux/kasan-enabled.h @@ -4,6 +4,7 @@ =20 #include =20 +#ifdef CONFIG_KASAN extern bool kasan_arg_disabled; =20 /* @@ -12,7 +13,6 @@ extern bool kasan_arg_disabled; */ DECLARE_STATIC_KEY_FALSE(kasan_flag_enabled); =20 -#if defined(CONFIG_ARCH_DEFER_KASAN) || defined(CONFIG_KASAN_HW_TAGS) /* * Runtime control for shadow memory initialization or HW_TAGS mode. * Uses static key for architectures that need deferred KASAN or HW_TAGS. @@ -30,7 +30,7 @@ static inline void kasan_enable(void) /* For architectures that can enable KASAN early, use compile-time check. = */ static __always_inline bool kasan_enabled(void) { - return IS_ENABLED(CONFIG_KASAN); + return false; } =20 static inline void kasan_enable(void) {} --=20 2.41.0