Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp819915imu; Tue, 11 Dec 2018 08:04:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vww9SO7V/Pk9RGqZF6tvN7jAJJcKImJ7nIjYpf3N3rIhr4FrR8Fuso5x8rKgMemLeunkKr X-Received: by 2002:a17:902:a70b:: with SMTP id w11mr16432059plq.84.1544544295624; Tue, 11 Dec 2018 08:04:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544544295; cv=none; d=google.com; s=arc-20160816; b=JpL5zOCncb7QHeUxHgp1yKAddTWrk/YNLERkoLn7M/nNGKps83T1Lr8gAZLrh3GHMZ t+vV3uiye0rqrmRQ0l5YDphoagmU6ZUOdSpCj5pyb9pJq8U2sROir/cnNxFAWgiatj/4 lwIeSi9n72hzRxuxwdLm0nBKmkox4ikNSCmvFiWRmtfD6iB9wxo8+QI1xaF3hUSZr3qT uhf+hv2vWj5xPRBsXE72o7k6GVjkj/72LRe3KQf1KIyGsMC3t5Q7nhyR5wpFoa1ZYwm5 HtXNtm+xRl8RWpc1BuK8K0/Pv40HYu1t2/adu7IAgkz3NhDs39kTrLaTOolj6YoaIJQc TeZw== 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=6lDXo7875JvpNdIIVM85W2LwkMrgyNvSCv8MEHJ7j3k=; b=yu/F2MXZAy3EUcWwb/6VFp4+jEXpgDglB4g2nCRe6xDSOrWOenFvAXR3QQrJQMX1Dd 4jEIaxircd0gJOl3gtGf/ObPaLKlUwXaMLOzswz1D/THTfuJAWtQ5haRLYbdonzaq6iS XpkdcDnESHHN8Bo4Ya3FH6VYAy9EFtTlg+FR5zTEOiB/c/cjQd1ufiMWXY+q1o28J3lv ZaDEgFi0d+OZxcLJp6rP3ZrjGIrPQx53vZ6X2ofSXaVOCc5eHd1z3Cbh+1PKFtTqgdTB 595GxXjvPxATNkncnQWkFwpPKbgDxDD51QbqdYuOz5b13tpwPG+7vE2xQ+avVTlHa1Qe m6nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tS66kPRg; 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 i18si12438442pgl.414.2018.12.11.08.04.40; Tue, 11 Dec 2018 08:04:55 -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=tS66kPRg; 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 S1731175AbeLKQC5 (ORCPT + 99 others); Tue, 11 Dec 2018 11:02:57 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:52785 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727605AbeLKQCz (ORCPT ); Tue, 11 Dec 2018 11:02:55 -0500 Received: by mail-it1-f195.google.com with SMTP id g76so4302530itg.2 for ; Tue, 11 Dec 2018 08:02:54 -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=6lDXo7875JvpNdIIVM85W2LwkMrgyNvSCv8MEHJ7j3k=; b=tS66kPRg4T6a6sS3sCR8zxd6jJehHiIxUakWflPr5JBabcgJNYs/9EXBlKW/nn/cjS 8hiuTHeetM9Z6fjYktYVpqCqOgioXJJH40Kut411yYAQ5Sg7FsuXHZyS1cZcXcal3RUQ 1fxKxyiPEgqlARKdyP+QLzED8jm5S2YHBV3trOwG705At6V1sOrYIZ4N6TpORwF38vaO 4mNwGg+o8jgncxjb+Z6S5I2oySkLj8UWXWIJehk4yw62OPMSEnvRUmrkhrp6b9pgD4R9 G3PMqrp5qTOXRWC08JbCfJi6hymkWk2uIhjCQrJP9f9sRUtvhVS2snCjgwH2TZJi0s7l NlYw== 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=6lDXo7875JvpNdIIVM85W2LwkMrgyNvSCv8MEHJ7j3k=; b=s09daaDx9IKIdTphJ+suRbvGm009O2FVUJ42RiuP+VFG4nyGc3B/gxCHg4+TKZQjsk rghmT5d/bpkTRcnwaMeoe6DzqbcYnToDXozKhr6QmmM0NdCqqth3Mn+BhELi+N+Cqbsx xsNxyEDJYJ1n732R7tUbu6dvSFC/uXyk6zalebvKpVeFHw4sJdv6Xz3+K659EOPXxtYv 7yvHRszBwMSVOmiE5LsusY5ASrH9BMTKARXEbbzt7CGAf8qtoDjm+eqbKXjO9XJp0hwv wz8SATT0vlZjPgw1MNjFJwrNQjvtYUQ8Km/XRLFfkg0tnp/wlwOhgTM1IDcytxW9HV2y Xr8Q== X-Gm-Message-State: AA+aEWajz4RWoE2elhFeW5770oH8bZb0IynYWCW7ugzR07ILgld7Xy6U bqch6mdfbAAZsAbHiDW7w0IZTv4B/qe8Hs54NsluKw== X-Received: by 2002:a24:2716:: with SMTP id g22mr2447702ita.40.1544544174164; Tue, 11 Dec 2018 08:02:54 -0800 (PST) MIME-Version: 1.0 References: <20181211152840.ezjujzpyz5z6fd2d@ltop.local> In-Reply-To: <20181211152840.ezjujzpyz5z6fd2d@ltop.local> From: Andrey Konovalov Date: Tue, 11 Dec 2018 17:02:42 +0100 Message-ID: Subject: Re: [PATCH v13 05/25] kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS To: Luc Van Oostenryck 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 11, 2018 at 4:28 PM Luc Van Oostenryck wrote: > > 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. Hi Luc, You're right. This shouldn't be important though, since "__" in attribute names are optional AFAIK. It might make sense to fix it as a separate patch when this series is merged. Thanks!