Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp897172imu; Tue, 11 Dec 2018 09:13:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/XaxdLeUMpc/1B6g+U1C+UqArOJvFvXt2y+wEvLM0Hcm821RGdb5AUroaSRX9NWqlHTN6Ki X-Received: by 2002:a17:902:4081:: with SMTP id c1mr17124828pld.87.1544548419296; Tue, 11 Dec 2018 09:13:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544548419; cv=none; d=google.com; s=arc-20160816; b=RNn4LwtY0ibtE0vi03oTwi4xUa1cj1mL+Ybg0DxUp4WZhgTwIiqG1JLXylgBp1uQzp fTDw81jkWgC9ZJjM2VqVuomqoNg4ECwqpwWfs+K0TCWZe4uBA6zO0WCwIBpTaN0Y2aJZ W/xOF5v9rwm50z7wZm2MFS2lwu0ZNFWY70M2GjZKKFus0eD1XEhO8hPeASxQKVTfiVDk vaAtPlHObd9N6HNLs12avgqzxK8FlGmh+9AVnhPxpSpKdPc1wElnPRqMI4FP3YHs+k3W IEDvahP++zAWz1OoEA7zaRrQSM84NQcbNfQx8K8oVlb02Big5HmCLi3MNed4FY4BEdvS p4xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7awNY4ymdO+RNLil9JDwL8hY7iyonw/4hjSQTrtkG0Y=; b=NHM3rLkkxLa1A9xL4TKepBik50l5w6Ig6J8/1I5tcI2teMz9zGTbN99I3aFY5yX2ua fvoVQSE7GVuBaC3UJUkL+tznDuOfQagNfqLw/+9jJOihIGuPEzH9dV+w39vO9V4/ZEu/ eFI1ajFZY4GACfF8X6FUB+NrYychpHvZHYgb+k2gfEeSkDcw42NdameldCwBe6VBOAxd YjF/ffnVDVaNtrl1hvVHUV2HGSY8/ComTDyAGUXBRFzuGMraSCP2QEjBmjgQrgL/Cfqa pcrHOCUwi5RAj41twn5u5dVag8LSoJUVvA5zMntQGJKPfSda9AU280I/6/rVppvVB3GD 9HKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aqkFX09o; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si9961219pln.430.2018.12.11.09.13.14; Tue, 11 Dec 2018 09:13:39 -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=@gmail.com header.s=20161025 header.b=aqkFX09o; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbeLKP2s (ORCPT + 99 others); Tue, 11 Dec 2018 10:28:48 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:37555 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbeLKP2r (ORCPT ); Tue, 11 Dec 2018 10:28:47 -0500 Received: by mail-ed1-f66.google.com with SMTP id h15so12868376edb.4; Tue, 11 Dec 2018 07:28:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7awNY4ymdO+RNLil9JDwL8hY7iyonw/4hjSQTrtkG0Y=; b=aqkFX09os53Wz8YPHEdNH1j5+XhWVQIwp4/1t7QqAnq09NQZ5e/Ky2kExZjNmuh902 e34RcDqx9Bcd7WGqugCvaM19UgoHlvAJedvAcVHCklkbsS9E+sUh3dq/AaOeV/G7d4VJ NMMjLK4OB/FNgxLrxjz+gG1+6HQZH6YEkdoSOBQTYiLHbHcbQNJNAIikT8/hkI7TKUlo zmjpB1hxadWqk9OSQcbe50BYSJyS0J3m6h2ktvi6uQnTu5UpfYTd4ql3CyieH/c1fYtq 4XdF4z3ZgPhQICWWhjDZd8OeRpD2npwa749bXI3aGBLAfC76dkIpAVbMI+JWgXRJ/Wk+ cXuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7awNY4ymdO+RNLil9JDwL8hY7iyonw/4hjSQTrtkG0Y=; b=Xk9QWV1FFW32z7tVgwsc4CjsPjWjXhWQftRIaUVVkJwMPvVJ6OC86j+PPtLAhNdK4E GIpVefACx4Mk0Pq+75bETqOxTHYpXdi9d7liXIhy/9LMUoCwFDsSBwANXRBfI7+xogY5 sHo292LQdxlaFUjooNsqVh/PM8fpQRlQzd5xrFaDZqc216fIXlDj1YR/qXVwjv37hdnz VmUj0Gtl83gYtF9IxtHUweCIKpyuIo7Agu59MH/x3bt8+tDwv9aTTS6HApn6OSIHROJ6 ou7sco6MS9fnG8BPONeTvhFTpTtsKAXnJrcnZUm5JeoA9PonCFkTn2s3Xx3Tjsa7vaO0 j/QA== X-Gm-Message-State: AA+aEWbezLHbyVJ2baTdosf4spsAe/ZgXH/vTofYXXXrP3w4n2lt5JZK tx3KN+h/H6m2QTPNJ9yrG08= X-Received: by 2002:a50:a6cf:: with SMTP id f15mr15192704edc.97.1544542124463; Tue, 11 Dec 2018 07:28:44 -0800 (PST) Received: from ltop.local ([2a02:a03f:40bc:4d00:450b:7efe:59a0:ccfd]) by smtp.gmail.com with ESMTPSA id t11sm3981662eds.34.2018.12.11.07.28.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 07:28:43 -0800 (PST) Date: Tue, 11 Dec 2018 16:28:41 +0100 From: Luc Van Oostenryck To: Andrey Konovalov 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@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sparse@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org, Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Jann Horn , Mark Brand , Chintan Pandya , Vishwath Mohan Subject: Re: [PATCH v13 05/25] kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS Message-ID: <20181211152840.ezjujzpyz5z6fd2d@ltop.local> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180622 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 06, 2018 at 01:24:23PM +0100, Andrey Konovalov wrote: > diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h > index 3e7dafb3ea80..39f668d5066b 100644 > --- a/include/linux/compiler-clang.h > +++ b/include/linux/compiler-clang.h > @@ -16,9 +16,13 @@ > /* all clang versions usable with the kernel support KASAN ABI version 5 */ > #define KASAN_ABI_VERSION 5 > > +#if __has_feature(address_sanitizer) || __has_feature(hwaddress_sanitizer) > /* emulate gcc's __SANITIZE_ADDRESS__ flag */ > -#if __has_feature(address_sanitizer) > #define __SANITIZE_ADDRESS__ > +#define __no_sanitize_address \ > + __attribute__((no_sanitize("address", "hwaddress"))) > +#else > +#define __no_sanitize_address > #endif > > /* > diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h > index 2010493e1040..5776da43da97 100644 > --- a/include/linux/compiler-gcc.h > +++ b/include/linux/compiler-gcc.h > @@ -143,6 +143,12 @@ > #define KASAN_ABI_VERSION 3 > #endif > > +#if __has_attribute(__no_sanitize_address__) > +#define __no_sanitize_address __attribute__((no_sanitize_address)) > +#else > +#define __no_sanitize_address > +#endif Not really important but it's the name with leading and trailing underscores that is tested with __has_attribute() but then it's the naked 'no_sanitize_address' that is used in the attribute. -- Luc