Message ID | 59e75426241dbb5611277758c8d4d6f5f9298dac.1615215441.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=G0Ss=IG=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B629C433E0 for <linux-arm-kernel@archiver.kernel.org>; Mon, 8 Mar 2021 15:00:04 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EFA9C6521D for <linux-arm-kernel@archiver.kernel.org>; Mon, 8 Mar 2021 15:00:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFA9C6521D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:From:Subject:Mime-Version:Message-Id:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=xSUlSi9l4SUpRStY30N+snXjS0VQ7xAo0+H7iAHp7x0=; b=j8Ly8fIqP0Lpg9QcRKnH5b0jUx 6uIkQhTYbhbkfAySDBVRcKNAQFL6GcQCf27nrjr6722fiOE4a3VVMPtgrzjeExbk79cVUdcL5la/9 +4I3hQaO0zvEpJVenzu+KMIlCt09Tc7q8n+SgEwBOCE7e8eIcdtE7buOvEPuZKwUp57yW1GEcIKsH 3CGQ8padqMDRQbWSevdWqtaIYZ4+oPl+BM3HX59SYRQ0U0wmUeblaJLLLf87UsH4UNfcH45zqe72i G+pz1TMciXvOOnA0H2NEC4OMstDa3JATIggQ5s4zK1reOF0u7fVveeuPDxQVpAi+IUHAokArRBJK5 HpPjHZMw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJHL9-000NtU-5s; Mon, 08 Mar 2021 14:58:35 +0000 Received: from mail-qv1-xf4a.google.com ([2607:f8b0:4864:20::f4a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJHL4-000Nr8-TQ for linux-arm-kernel@lists.infradead.org; Mon, 08 Mar 2021 14:58:33 +0000 Received: by mail-qv1-xf4a.google.com with SMTP id dz17so7822444qvb.14 for <linux-arm-kernel@lists.infradead.org>; Mon, 08 Mar 2021 06:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=BxhzP0W+qvkeGdKa9mCwOIPGRH/6WApGqekyUBkmdsU=; b=CY88Hxf2Z8/gwTvCyBxUyuzMp7CoVm0G6k9lqiClBdaCH8B5QSel2N2Mj5PLm0i3yT Hqvloxqbm9lRHA6jBiv/OWaskMEaPGN+1X+POacMZcPwB0m699GyZlTZnfpZbVkH/D8r XM4GR0+EFi/Fv45w2TSAKL7nwGE8yTLUFS5AixCu+fjtSz41gcxDUOo21IUJdspNEp13 ewzp80BiD5xk0THgDQCxFULqm6xCJemMN/4iEmTcDHN3vS8rGKtG3skn1wdaO42YSiaz H/n5YdB6s79G30DRpGrJarKGHI0X3p9oLJikdt69GK7B01LI5G+VV/i3sIZFhzKBbToP zP9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=BxhzP0W+qvkeGdKa9mCwOIPGRH/6WApGqekyUBkmdsU=; b=mu7EVawFmW4pyYeig5PsBkOh6qfNe/C3A0iAOBR+rS5DcUJGfO5twkSwb8TGji/z+A n4b8xCMjuaDRu4C3f5MsHejuMBt12pg7w9i0jCMlSazCU19DbmeRK1FB4GHZ44gBkfzN /ShOh8V+mdtNeqD851uAjHO2TjX/jAOMbBS85wCvhUdUBRvhKpd5p9kdYboskDlGlS9w 2us7CzGxL53+SB7IsXkk0LwjPVkem+R00HuA9S9yXdFI7tMjvM88Fr1nFJbWmaMJwm2a fcZWQ8iqw1z8doF8ABq5O/EySypNgQWWd5Ec6k7XbiSmq1goONmzaX8czv9S4NUR7ZLT 5RLA== X-Gm-Message-State: AOAM530rFab0MJCMRhiSblEGYfKRsuR8HH1l+apa+eHLLvql4Zhr6jBe L83Btpfns0exaIMej9y1MTYMfgWW4bj1bTup X-Google-Smtp-Source: ABdhPJyIR50ri0LAWjT90EsKXlRruxnqF4NWGe0j6wHw7WPZvJUWWmFvWXg60/U+OgeRpKTWkVSKKitaM0gH1zUr X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:85fb:aac9:69ed:e574]) (user=andreyknvl job=sendgmr) by 2002:a0c:b418:: with SMTP id u24mr20842991qve.20.1615215508348; Mon, 08 Mar 2021 06:58:28 -0800 (PST) Date: Mon, 8 Mar 2021 15:58:21 +0100 Message-Id: <59e75426241dbb5611277758c8d4d6f5f9298dac.1615215441.git.andreyknvl@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.1.766.gb4fecdf3b7-goog Subject: [PATCH] kasan: fix KASAN_STACK dependency for HW_TAGS From: Andrey Konovalov <andreyknvl@google.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Dmitry Vyukov <dvyukov@google.com>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Alexander Potapenko <glider@google.com>, Marco Elver <elver@google.com>, Peter Collingbourne <pcc@google.com>, Evgenii Stepanov <eugenis@google.com>, Branislav Rankov <Branislav.Rankov@arm.com>, Kevin Brodsky <kevin.brodsky@arm.com>, kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov <andreyknvl@google.com>, stable@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210308_145831_293025_321E69A4 X-CRM114-Status: GOOD ( 12.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
kasan: fix KASAN_STACK dependency for HW_TAGS
|
expand
|
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan index 624ae1df7984..fba9909e31b7 100644 --- a/lib/Kconfig.kasan +++ b/lib/Kconfig.kasan @@ -156,6 +156,7 @@ config KASAN_STACK_ENABLE config KASAN_STACK int + depends on KASAN_GENERIC || KASAN_SW_TAGS default 1 if KASAN_STACK_ENABLE || CC_IS_GCC default 0
There's a runtime failure when running HW_TAGS-enabled kernel built with GCC on hardware that doesn't support MTE. GCC-built kernels always have CONFIG_KASAN_STACK enabled, even though stack instrumentation isn't supported by HW_TAGS. Having that config enabled causes KASAN to issue MTE-only instructions to unpoison kernel stacks, which causes the failure. Fix the issue by disallowing CONFIG_KASAN_STACK when HW_TAGS is used. (The commit that introduced CONFIG_KASAN_HW_TAGS specified proper dependency for CONFIG_KASAN_STACK_ENABLE but not for CONFIG_KASAN_STACK.) Fixes: 6a63a63ff1ac ("kasan: introduce CONFIG_KASAN_HW_TAGS") Cc: stable@vger.kernel.org Reported-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Andrey Konovalov <andreyknvl@google.com> --- lib/Kconfig.kasan | 1 + 1 file changed, 1 insertion(+)