Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10512760imu; Thu, 6 Dec 2018 02:21:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vrj6Ktzp0wxJm5AsY76kWCeb4U4AzzhpIzccq9CiHpToe3sGr/mjWGsK/hb6kqRHDAomN9 X-Received: by 2002:a62:1c96:: with SMTP id c144mr27849438pfc.129.1544091690890; Thu, 06 Dec 2018 02:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544091690; cv=none; d=google.com; s=arc-20160816; b=IKYx0kZBvbayk+r7X+6lMOJQXwZabajr9Z3IBhlGzorP0S11YMKK4CVDIJ9b6mUxe5 v+qLWdzPTk8DX8y5fXzcxplDYJEXn+aaIbvogQkqSaj9CgS1RvYu0XO9rRONHogWmQIu dQitzFuCgNZIe0pQC5nOAU5NWZvUUFWNBkUGvILByXBnIMzV5ouRs7FwFMY7cBCGZgSg kvWZ2ePPibcYLQUUEGobQRqZcdCJFK3WACuyMcuLjILwoNO2ids045T4F6izJbNsKhhB I9SEqGD3gUauJesTRm2GAu4ulz7VH2MH3LNzi2Xd2Pib3KNBxYEDN9tf7EJ9sQrCKvUx od7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8E9PbE8KN4ACuzYfCxgB7Qnel5iCJrJXGdqLgrAraZs=; b=BqWqdgjPw2lM3X6VaLsg+gVU6YYdL0xSHDEIWgkwiBNnDKzKwk5DCc7FM9RryR0QHL EwRiYG60mm1CORPZ8tePHJ3516fErl1OTW9Lhha60HwIIgWmjnRjWlw0dgj/6+OJ1MJO 53EnzDxv222O/p3YDCwg8z2D698jcLBTXBYSvS/eKQD67beFQ7BA2HljmG2l42gtxHuY HSKP5wYjdB17vMioI6cjXZxtHfXPg5Ldyxb102NCFMBv2yX6TwmPfC62Ligp2JoUYE5v pNEmAMok4Ev/I2u5jV8Zpfn7KIyNu8E7Pub30vlWTv9dC4hKM46aZzHANudjxBqlhuQs vZQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=upjF35iY; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z29si16848937pfi.9.2018.12.06.02.21.15; Thu, 06 Dec 2018 02:21:30 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=upjF35iY; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729081AbeLFKTR (ORCPT + 99 others); Thu, 6 Dec 2018 05:19:17 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:35178 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727806AbeLFKTR (ORCPT ); Thu, 6 Dec 2018 05:19:17 -0500 Received: by mail-it1-f196.google.com with SMTP id p197so564936itp.0 for ; Thu, 06 Dec 2018 02:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8E9PbE8KN4ACuzYfCxgB7Qnel5iCJrJXGdqLgrAraZs=; b=upjF35iYD3/uGdNNZCfP2U5fqUW4lGBU094scjynoWN24nJtSnzyCQqcxaHybWVzTh N7OgaX+UfENuRID4VRbgfPpcQ05YxW/GrXX7KSfwHvgsxXk9r2GrrDY4aLYQCQVJ0kUU 8fYkkUxjwlHn2HmF6nNqAzHdGXlJFCh1hl/+X29kSZfPHToJyc0fP0es/GufFNCHXI0k dQommNJoqgPlcdZVHypT9FoOksl1wBVsNfqws9WrDxqG4GMb1RlcISoT2fD1aRQFOr2G fxXmsxtpUjaz06HCMwqJHoHFG/6thVs2Ar/RV4WKGYensUIUeX6CPLjCG6/demjq4LZu d7gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8E9PbE8KN4ACuzYfCxgB7Qnel5iCJrJXGdqLgrAraZs=; b=ENzOAlcdUZKNIe1+90Aasq9DyBJz7IAi2eR9n7WT8FqhAdyJqVadxT6CcMbooTyPsv caSeYyzlK4KILQ5fTkXK2Xp5/yJyRmDgiwT+9xFc2zz14qD39gMGAZi/6SawzY+0L9wV FZTpdAEbcXTNuPsQXTRM7GpwC0C7ZGMSuhdq3iNxPvOg3jE/k7AljCNjRRQPV9ze77+H 3ZARyc4z449q0D/O1vXAOSq1g9MN4I1Whzcdk+tn/PchQlGoGdy00MLPbSjGFD0ceLON D1xAp8VuGb2yyRD9W/iXGoO6MYOD30DAiVGU1OTHRxaCdqrbVO1d+0hSN6vtPKLw342x r0ww== X-Gm-Message-State: AA+aEWbx2NKJIVRAMaJMgCF+61/9G7uUefrVQ6Cz0i+6k86fJGT4Ui0X HQvnP0fQMseoie2rwSYMnAbnKu0VCcYq3rrcUJy1ow== X-Received: by 2002:a24:2716:: with SMTP id g22mr16771301ita.40.1544091555752; Thu, 06 Dec 2018 02:19:15 -0800 (PST) MIME-Version: 1.0 References: <20728567aae93b5eb88a6636c94c1af73db7cdbc.1543337629.git.andreyknvl@google.com> In-Reply-To: From: Andrey Konovalov Date: Thu, 6 Dec 2018 11:19:04 +0100 Message-ID: Subject: Re: [PATCH v12 05/25] kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS To: Max Filippov Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Catalin Marinas , Will Deacon , Christoph Lameter , Andrew Morton , Mark Rutland , Nick Desaulniers , Marc Zyngier , Dave Martin , Ard Biesheuvel , "Eric W . Biederman" , Ingo Molnar , Paul Lawrence , Geert Uytterhoeven , Arnd Bergmann , "Kirill A. Shutemov" , Greg Kroah-Hartman , Kate Stewart , Mike Rapoport , kasan-dev , "open list:DOCUMENTATION" , LKML , Linux ARM , linux-sparse@vger.kernel.org, Linux Memory Management List , Linux Kbuild mailing list , Kostya Serebryany , Evgenii Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Jann Horn , Mark Brand , Chintan Pandya , Vishwath Mohan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 4, 2018 at 11:24 PM Max Filippov wrote: > > Hello, > > On Tue, Nov 27, 2018 at 9:00 AM Andrey Konovalov wrote: > > > > This commit splits the current CONFIG_KASAN config option into two: > > 1. CONFIG_KASAN_GENERIC, that enables the generic KASAN mode (the one > > that exists now); > > 2. CONFIG_KASAN_SW_TAGS, that enables the software tag-based KASAN mode. > > [...] > > > --- a/lib/Kconfig.kasan > > +++ b/lib/Kconfig.kasan > > @@ -1,35 +1,95 @@ > > +# This config refers to the generic KASAN mode. > > config HAVE_ARCH_KASAN > > bool > > > > +config HAVE_ARCH_KASAN_SW_TAGS > > + bool > > + > > +config CC_HAS_KASAN_GENERIC > > + def_bool $(cc-option, -fsanitize=kernel-address) > > + > > +config CC_HAS_KASAN_SW_TAGS > > + def_bool $(cc-option, -fsanitize=kernel-hwaddress) > > + > > if HAVE_ARCH_KASAN > > > > config KASAN > > - bool "KASan: runtime memory debugger" > > + bool "KASAN: runtime memory debugger" > > + help > > + Enables KASAN (KernelAddressSANitizer) - runtime memory debugger, > > + designed to find out-of-bounds accesses and use-after-free bugs. > > + See Documentation/dev-tools/kasan.rst for details. > > Perhaps KASAN should depend on > CC_HAS_KASAN_GENERIC || CC_HAS_KASAN_SW_TAGS, > otherwise make all*config may enable KASAN > for a compiler that does not have any -fsanitize=kernel-*address > support, resulting in build failures like this: > http://kisskb.ellerman.id.au/kisskb/buildresult/13606170/log/ Will fix in v13, thanks! > > -- > Thanks. > -- Max > > -- > You received this message because you are subscribed to the Google Groups "kasan-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com. > To post to this group, send email to kasan-dev@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/CAMo8BfK5aEGae--xvboLxMXTe1orA7kmLR_uFNCqC6M-a%3DOm5Q%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout.