Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3949425pxb; Mon, 4 Oct 2021 13:25:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF6Jwj545GWQX7MORrp01CW4G2bYE+sfQyqKJFDXS1a8C9H3yt9ABlsC/4O7fPTU3RiHeq X-Received: by 2002:a17:902:9b95:b0:13e:c43:2b57 with SMTP id y21-20020a1709029b9500b0013e0c432b57mr1552149plp.42.1633379133605; Mon, 04 Oct 2021 13:25:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633379133; cv=none; d=google.com; s=arc-20160816; b=DJeD0in+6JF3JmFFYnevdkBsmduD4+9YNlZw+h2peIYEgvI9AWwr2HmTB6jK/4L9XD tD/x/we8h4NFOJLoEO5kj6wU8Ie0tDxBhDdfx5smWnq1NPni59xKzgDNS7qovh7Rtkh2 1evPOIGmF/WkbbS52Hw1+pz57935T/ItA6y4MejAJCMFywN3pwSmBaQLBUtapy6kf0Wu OyYPsC7qff0TkO43++Coe34E6SDb91J/NxFSbG0L8nXTyTKAIbEffXV9QwTMGS+pBpVN D8DxocY65zs4rX2UbNJHez35vC24slcyq6hYMoTZaMcQuYyfobotoFKrXNIA4hoydP5S /iXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p5k4ALexTj9g4e127V2bgFL6uE06q5OoKbG6aIcca6o=; b=g6XnJuYgR+68kaZmNxBZ+CeroteMHV+9MVm0AdH/22DqVLdsYWL3EEfXPSAu2q2Jlm ecwam45XGRxuQeU1E7hdDY+1xK96JwsTXiWaDa4G0+zNiTBrC9EtAk0TepMLVxtbKnec B8bo3wOcdExmROR/hujP8mhlMYWQ7PW7i79hObll97nV5x0GCjI1JCulZK7i3yR0dD7p y/eSB5vFSy+2HTcjxiNUjy4wWM7vt9rmNArK7VrfBLJCGndz83g8DTv8PH6sFLpvaX7v /8GcLrzyfm3LBX5aMhOwuxfLnO6p0aOHE+EsMwvjc1lA2ZsUsdIV+YiUN9eedsIeZUBO 9SbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vLveilkk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j5si18267103pjg.71.2021.10.04.13.25.21; Mon, 04 Oct 2021 13:25:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vLveilkk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237465AbhJDNaY (ORCPT + 99 others); Mon, 4 Oct 2021 09:30:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:43478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237446AbhJDN2a (ORCPT ); Mon, 4 Oct 2021 09:28:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0289D6137D; Mon, 4 Oct 2021 13:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353166; bh=gstO0AvIrv/0Q9NjnFGBELz0a+QCjMDzz7lAhmlf72o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vLveilkk2AFtyZrn1ICRYpDCXYuNdn3SVC1g7qvBdR1zVjzbhYvnFGBzw/Renb9a0 N3dOhbcfVgj3tQIOE9lmlUUcRFH9fkhIYasWh9s2GPGPO7Gng1kIlpWF7P03CkPLVQ FclmskWVzDVuRjegDu+NukPHhIfGhMgPu6CKNVQE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marco Elver , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Aleksandr Nogikh , Taras Madan , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.14 021/172] kasan: fix Kconfig check of CC_HAS_WORKING_NOSANITIZE_ADDRESS Date: Mon, 4 Oct 2021 14:51:11 +0200 Message-Id: <20211004125045.642797519@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marco Elver [ Upstream commit fa360beac4b62d54879a88b182afef4b369c9700 ] In the main KASAN config option CC_HAS_WORKING_NOSANITIZE_ADDRESS is checked for instrumentation-based modes. However, if HAVE_ARCH_KASAN_HW_TAGS is true all modes may still be selected. To fix, also make the software modes depend on CC_HAS_WORKING_NOSANITIZE_ADDRESS. Link: https://lkml.kernel.org/r/20210910084240.1215803-1-elver@google.com Fixes: 6a63a63ff1ac ("kasan: introduce CONFIG_KASAN_HW_TAGS") Signed-off-by: Marco Elver Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Aleksandr Nogikh Cc: Taras Madan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- lib/Kconfig.kasan | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan index 1e2d10f86011..cdc842d090db 100644 --- a/lib/Kconfig.kasan +++ b/lib/Kconfig.kasan @@ -66,6 +66,7 @@ choice config KASAN_GENERIC bool "Generic mode" depends on HAVE_ARCH_KASAN && CC_HAS_KASAN_GENERIC + depends on CC_HAS_WORKING_NOSANITIZE_ADDRESS select SLUB_DEBUG if SLUB select CONSTRUCTORS help @@ -86,6 +87,7 @@ config KASAN_GENERIC config KASAN_SW_TAGS bool "Software tag-based mode" depends on HAVE_ARCH_KASAN_SW_TAGS && CC_HAS_KASAN_SW_TAGS + depends on CC_HAS_WORKING_NOSANITIZE_ADDRESS select SLUB_DEBUG if SLUB select CONSTRUCTORS help -- 2.33.0