Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp18459imm; Fri, 31 Aug 2018 15:41:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZkzTPjtDvmJcmo7EpN7KO7yo6esy23aFx6QoRBSOF43htkRr79gBHftG5RJZ270vumi9s0 X-Received: by 2002:a17:902:8a8e:: with SMTP id p14-v6mr17529375plo.213.1535755288107; Fri, 31 Aug 2018 15:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535755288; cv=none; d=google.com; s=arc-20160816; b=mrWkBLUm5v7FCaVUsc5pyseWnXPmO3yBqj0dvSAxAYbKk6TrxuJKTCTeHTkLeEE/Mg aQasMe/Zd+J1eZKJDZK0yQw1cOoNRUID6zOwsjgvSLal/pD8Mi5cZy1IigTnTzj623qu dbGvuJpCZq6Ah/OcA0f4hG518iquGaqHlmok54WfAt0wvOirtJFvvLkGbbBUDzR7SRjf 6yV5hQ4Cyk7L2IzPkQG90v7lWp79YD8d+lB3plB0wQXmVdRPgeWt5pXkxt5Frg3ZFg25 1kYdRqFu+cbhIM45/8SR7fm7BLAXqGbrrx6TMbmdxv8exc2sFaKlc0QyLqBGzwYOFY93 vi1Q== 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:arc-authentication-results; bh=eLfnMqsOtBZ5X/PZiNA5zDcvLniTokm3iCs8AdKlvag=; b=anQzQqXt4R2iNj4UeWntbFuywE+WJZvdOWV9BS60G6Hm/uQ8pRV7RmqfO51MBderlv Y2x4JHHFe5W2TNaipharTBho7vO9627PjTsrLXiSrXWNWUyf2r4J7ZjrhkutFtAd9R/7 qd6ZjWl+iiNHaBse0lWwyUQ+skciEtjnavU2cM8Vfscz6x6ynCc39U6kVnRCWgOHsWIu /V4BAITD2H4OtO6d1+xTjQiyfQKu1XvilaRmKpdxscrimtOVVH1aPNyAt7j/YAkqlF6P a6uQ9ZxcdS0vmKYXdbBDi6hwkJcP4KU7tyLn+fMmuPWLJGZ0HOVqnp5href6E1TzFvLn uWGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GEJOuqc4; 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 a24-v6si10701182pgh.357.2018.08.31.15.41.13; Fri, 31 Aug 2018 15:41:28 -0700 (PDT) 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=GEJOuqc4; 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 S1727539AbeIACtf (ORCPT + 99 others); Fri, 31 Aug 2018 22:49:35 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54600 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727258AbeIACtf (ORCPT ); Fri, 31 Aug 2018 22:49:35 -0400 Received: by mail-wm0-f66.google.com with SMTP id c14-v6so6501031wmb.4 for ; Fri, 31 Aug 2018 15:39:58 -0700 (PDT) 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=eLfnMqsOtBZ5X/PZiNA5zDcvLniTokm3iCs8AdKlvag=; b=GEJOuqc44R8Xhd9Ezx1m7wQNhcMZE0YBX/YiRVHDl1tjgB6/mML/J/bVgOOdYUvXhm FSb0nOsSDawFnnCg0FsJqUwT0+rCFhgIoCip5MafImeXR6rk2ALO2auuAeAR4aA8iKeT 5JkxZN4i8YbwRWIbYXk/KuG6aTWf0+3gUl+PXMnuxcSR0MxFrEAoP20MvXZIs7HJVxAJ 70ypgRTYRBESXuovS6kJi3qU3EDWwHBwRO08af/FRWn7lIaIW8wErR4yInJ1BJURswFv P8YPN+vOCmp69GnySXARi7zwNx6ScPQPoaK8G479YF7bmZKg+eWwkh+Tc8V5MemTC47f 30Eg== 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=eLfnMqsOtBZ5X/PZiNA5zDcvLniTokm3iCs8AdKlvag=; b=pXQMm9Vkoom9G6Yj9U6vPIpuR3dnZhfdfaZB0lIyqFrw/6Vxbdj3H9JTiv+5ie8B3p VzMUQ+uv6M+OwJ5x2i/huzv32v2G/yg/Uw3BQMg0XoxiKyRepC548O8IGDSAjrtEXx0C BoPXmk/HguZ4a2Q0P4P4JjopkB4ud4dnoIHbFIjWavCzDOIHxjLmGSZkooVBjUIIN6BE D89YRov5u68sGKoH8Q7PKINuBHPm0RVK1Y1EimjLdaRjp+7/039L1iRxeVQTUFmriAag TkAJjl9L0TTLZbOXbLBE1mxgf1HySYFyviFw14J4T2roL1WfK45XKXPbKxuD6J4DCadI gO/g== X-Gm-Message-State: APzg51BZOh4GYg5Z/k2TVYJM8VpbwQdokWut2u0rjiq9YK9HnkfRhhX6 hsVoBvzvx6lI1Q9tCz6TXTA= X-Received: by 2002:a1c:ee57:: with SMTP id m84-v6mr5726207wmh.9.1535755197651; Fri, 31 Aug 2018 15:39:57 -0700 (PDT) Received: from ltop.local ([2a02:a03f:4006:df00:1c3e:86e4:17b5:54c7]) by smtp.gmail.com with ESMTPSA id d18-v6sm4386771wmb.33.2018.08.31.15.39.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 15:39:56 -0700 (PDT) Date: Sat, 1 Sep 2018 00:39:55 +0200 From: Luc Van Oostenryck To: Miguel Ojeda Cc: Nick Desaulniers , Christopher Li , Linus Torvalds , LKML , Eli Friedman , Kees Cook , Ingo Molnar , Geert Uytterhoeven , Arnd Bergmann , Greg KH , Masahiro Yamada , Joe Perches , Dominique Martinet Subject: Re: [PATCH 6/7] Compiler Attributes: remove unneeded sparse (__CHECKER__) tests Message-ID: <20180831223954.ljokaxczxyw5wvbu@ltop.local> References: <20180831170514.24665-1-miguel.ojeda.sandonis@gmail.com> <20180831170514.24665-6-miguel.ojeda.sandonis@gmail.com> 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 Fri, Aug 31, 2018 at 11:55:51PM +0200, Miguel Ojeda wrote: > Hi Nick, > > On Fri, Aug 31, 2018 at 11:38 PM, Nick Desaulniers > wrote: > > On Fri, Aug 31, 2018 at 10:05 AM Miguel Ojeda > > wrote: > >> > >> Sparse knows about a few more attributes now, so we can remove > >> the __CHECKER__ conditions from them (which, in turn, allow us > >> to move some of them later on to compiler_attributes.h). > >> > >> * assume_aligned: since sparse's commit ffc860b ("sparse: > >> ignore __assume_aligned__ attribute"), included in 0.5.1 > >> > >> * error: since sparse's commit 0a04210 ("sparse: Add 'error' > >> to ignored attributes"), included in 0.5.0 > >> > >> * hotpatch: since sparse's commit 6043210 ("sparse/parse.c: > >> ignore hotpatch attribute"), included in 0.5.1 > >> > >> * warning: since sparse's commit 977365d ("Avoid "attribute > >> 'warning': unknown attribute" warning"), included in 0.4.2 > >> > >> Cc: Eli Friedman > >> Cc: Christopher Li > >> Cc: Kees Cook > >> Cc: Ingo Molnar > >> Cc: Geert Uytterhoeven > >> Cc: Arnd Bergmann > >> Cc: Greg Kroah-Hartman > >> Cc: Masahiro Yamada > >> Cc: Joe Perches > >> Cc: Dominique Martinet > >> Cc: Nick Desaulniers > >> Cc: Linus Torvalds > >> Signed-off-by: Miguel Ojeda > >> --- > >> include/linux/compiler-gcc.h | 6 ++---- > >> include/linux/compiler_types.h | 2 +- > >> 2 files changed, 3 insertions(+), 5 deletions(-) > >> > >> diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h > >> index fdf2fbe6d544..32e6ce06163f 100644 > >> --- a/include/linux/compiler-gcc.h > >> +++ b/include/linux/compiler-gcc.h > >> @@ -84,14 +84,12 @@ > >> > >> #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) > >> > >> -#ifndef __CHECKER__ > >> #define __compiletime_warning(message) __attribute__((warning(message))) > >> #define __compiletime_error(message) __attribute__((error(message))) > >> > >> -#ifdef LATENT_ENTROPY_PLUGIN > >> +#if defined(LATENT_ENTROPY_PLUGIN) && !defined(__CHECKER__) > >> #define __latent_entropy __attribute__((latent_entropy)) > >> #endif > >> -#endif /* __CHECKER__ */ > >> > >> /* > >> * calling noreturn functions, __builtin_unreachable() and __builtin_trap() > >> @@ -139,7 +137,7 @@ > >> > >> /* gcc version specific checks */ > >> > >> -#if GCC_VERSION >= 40900 && !defined(__CHECKER__) > >> +#if GCC_VERSION >= 40900 > >> /* > >> * __assume_aligned(n, k): Tell the optimizer that the returned > >> * pointer can be assumed to be k modulo n. The second argument is > >> diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h > >> index 3662b19599fc..5dddc7e0c607 100644 > >> --- a/include/linux/compiler_types.h > >> +++ b/include/linux/compiler_types.h > >> @@ -216,7 +216,7 @@ struct ftrace_likely_data { > >> #define __must_check > >> #endif > >> > >> -#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__) > >> +#if defined(CC_USING_HOTPATCH) > >> #define notrace __attribute__((hotpatch(0, 0))) > >> #else > >> #define notrace __attribute__((no_instrument_function)) > >> -- > >> 2.17.1 > >> > > > > Everything looks correct here. It would be good for the sparse > > maintainer to triple check the commit sha's (as those are for sparse's > > code base, not the kernel's) and have their blessing. If Chris is > > Actually, nowadays it is very easy to check in sparse's > gcc-attr-list.h file, but since the file was not always there, I tried > to find out when the support for each attribute was added. Acked-by: Luc Van Oostenryck