From patchwork Mon Dec 10 20:58:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 153355 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4005304ljp; Mon, 10 Dec 2018 12:59:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/VRl3WaqtyfqHEzq3RklDJLdU/NPSrJElQwaGVKisnjskPC7mT2qlhsvscP5WMkyK43De8J X-Received: by 2002:a63:af18:: with SMTP id w24mr12248872pge.385.1544475582540; Mon, 10 Dec 2018 12:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544475582; cv=none; d=google.com; s=arc-20160816; b=uPBb81NMZ3TASpxbP8RUkb6SqSUsxHRwDhUJY6nIf5CEvEixevp+yyoUiL8DlVv/t9 p1Rt2/xLUuUaphPjCrZp9d3ymFO7iJQeDz4Q94SmCjpO9tqAtstzfKA0OpjE5tupDKEI xzJ5kHtpZPueh6D1DPhV0kn2yIeDt+uio5tR2N3a7Tm+r21C0YFCUKJXkZEuHGzuO2OK wv91IeUujkBVBu1Evu6ZnZz0c/D2a3mLUWAmq2HU5xY94D03SeuuXdsdgX5uKlG9JROB dzIVDQh4iyGyjMo/27r6hEkw1MmFCeTM2yekbcMubuyaZ0Z2J2TrnbQH/Q7+CFgPmjQw Vj+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=hcPER9qsqDqwxb2+p5xhBPNf7/v5JXkW2tiLFZhwAUU=; b=SoVP0hmzoOOYl/stV8g91gceTYeNirNMEanW9lYgyukvcBTCiorHAvk09LkZEAHDoc NVPYe+3/I+2dngqqctvwujxKEao+BgT0ndY4clTyd4b5MY4qosjSAfzp20XFKkuzrS19 g5nAK6cRmIEALLk6Zt5yQaHANnmkzJ8LIh9m79/DgNjI/TuTIVRZ5LB+FmlAmX5jG9l4 ixhO42GWiP7WjS0vgXRlD3pog1j/g6PREcHV5Ejmpo5PeCcw3cJvb2om1LEHRtwN/kMZ l1UaW60PunQ3gt917Doe6rBtEr1B4fPHykrS7gYj4X2tjPAlNsKQsxZLpGc2GHVaQDKl 1yUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si9959800pgr.345.2018.12.10.12.59.41; Mon, 10 Dec 2018 12:59:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729863AbeLJU7j (ORCPT + 31 others); Mon, 10 Dec 2018 15:59:39 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:49195 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727538AbeLJU7j (ORCPT ); Mon, 10 Dec 2018 15:59:39 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1M1HmG-1gTiYq0UyA-002sOD; Mon, 10 Dec 2018 21:59:30 +0100 From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , Andrey Ryabinin , Stephen Rothwell , Vasily Gorbik , Andrey Konovalov , linux-kernel@vger.kernel.org Subject: [PATCH] kasan: add missing Kconfig dependencies Date: Mon, 10 Dec 2018 21:58:54 +0100 Message-Id: <20181210205929.3213516-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:xoNhphRHQXdkYZP/b5IOxlR5jcfQmSAzvNH38P4crTBcPNi0nIo MhBVhTi7TVoksmicOymmYEelaKjqAuK6pg3r5mgRNWTK6UV7UN5lozRDOShD7HMxOi54D9w zUXggJUqlKpgg9MWUoEeI2X0A/uX7KZBAzquYiVDeBrrF9XQRAIgvuEfGuVsZTVEPG1roU7 cUCwkweTi/cIoiGEOeR9w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:+BQSkXC+a68=:Jtp8V7phoEFy6iZ0l5IrJ1 NTjvLrTQdPO/HG2Jcl9LSOnfJW8UlN/o9VZsWo3UsGUyrzseE0/zwJptj8K4l+d1YRP+rRnnh jBoaKt47+5H9Ck1rHhc7/w+vpqeyrNXsGi/XmFo8CPa8uxM/8v4EbSZsGOzL/BDCqTaRg+Xi/ S+uTAr2xdhpxxlSkTECF6ZNIDZ5KVV4zqttulmpoNId1vgVC2xrdpOrNddm9LRDDHZQdqX8XR wKika1H4sZ3FNqBQz6/JWSeV2V+8FsHGrQOZy9zgKrAkBcwXLz75PmYBgY/RV/LyY9aDy57+j IiHzZzwZ7v68833sTHj8YknxAkCcG2B1qCpgG5QW8LTZfg56PixEeff8I96U3xq60Ya1sr4bh LFrmwq2XJ4M7TJi+3lFU6jnuroSk03S9628zIGtoQkneEA1KADXLpOpBYBEEv4wafQU55txSG 6ZxFesgZ0UOftb+vX6ojVB0J/xVcpIjh7T/MfVkUrc/x+aHOtpXA6wFsC8/2By/PoJNF63Tt/ e1xZ8HTytPCUtAGcyDUlninBppMxDdK/PDN/oIFL1CXjf+3p9b1qbGluKqbRshj2K1qabpR27 4oxB+A58kPOPCfOYKd9ihln+0ei09MDKPCtZjnFuAkWMgk3d9S1OTM8rCTri/Yy4Ngnto/jsK K5pQtiZxxkiuPd1ZskIxAASvbe9j8JBhhhUIFryWzVa1we4iEoOAetNJK6uxZDWIoLTVlyGeT 0ifbvbxxt+ijV9GtF6A8KGJOXAIYV2Epgvje7Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building with CONFIG_KASAN=y when neither KASAN_GENERIC nor KASAN_SW_TAGS can be selected leads to a build error: arch/arm64/mm/kasan_init.c: In function 'kasan_pte_populate': arch/arm64/mm/kasan_init.c:106:28: error: 'KASAN_SHADOW_INIT' undeclared (first use in this function); did you mean 'KASAN_SHADOW_END'? We should really only allow enabling KASAN when all its dependencies are met as it was before the introduction of CONFIG_KASAN_SW_TAGS. Fixes: b8440cc16515 ("kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS") Signed-off-by: Arnd Bergmann --- lib/Kconfig.kasan | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.0 diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan index b5d0cbfce4a1..83286bca2f70 100644 --- a/lib/Kconfig.kasan +++ b/lib/Kconfig.kasan @@ -15,6 +15,8 @@ if HAVE_ARCH_KASAN config KASAN bool "KASAN: runtime memory debugger" + depends on CC_HAS_KASAN_GENERIC || CC_HAS_KASAN_SW_TAGS + depends on (SLUB && SYSFS) || (SLAB && !DEBUG_SLAB) help Enables KASAN (KernelAddressSANitizer) - runtime memory debugger, designed to find out-of-bounds accesses and use-after-free bugs.