Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp828503imm; Fri, 31 Aug 2018 14:39:57 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb6KyvNjXhKA590eKMaKVIbmBUA0Jh5KDw5rDQbX+POnpT13qZO4ac+ddYJAl7rg3NQ+6d3 X-Received: by 2002:a63:f002:: with SMTP id k2-v6mr16035192pgh.8.1535751597258; Fri, 31 Aug 2018 14:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535751597; cv=none; d=google.com; s=arc-20160816; b=pNy6LMLJlyUngb7l8JI+RoTXGVT9o2O8fKTMJ+nGsiaq5NUGF3Rh6AkoiFz55VjMP+ eeKfI6vbuCxJPFEyJ8nHtXgwHcraUGp9VLgwm/WJwZi31qtvtA7Go+FpnhEURwH6bWT5 9VXUTSaKuwn2L00Z4N+4x4w6crk8rXW8TP1ob/RbPmnhXjq37YcV4YgiYPOImdl5PoQN TkcbRNlYtzDz1oTxi36tX0t7O5NSxnQlMlOhlgF0Xr1JNaZMkk7fxN9q2rthBlglSg0v TA1DO2pcZbu8nAXY/jsJQkatmY7VxLNFgJj4DNIZUJlHwpat6LIj98sWudRNf53jcry2 u0oA== 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 :arc-authentication-results; bh=L2myr9DjiLMzEybNM7rgB8Hb4Y/Lf9yt4tmGt7nA3V4=; b=GuHFU2iVY4J+Em0CygPSUGBK6jsTm8fW9MmKB6Ee7iVezl82sc/fXlB3wPoo/6Viib BgIOCzklU2tJ4n4xV06UENm7KX+pTleAHx1uB7VRR61Y/Wr9+/TEyrJSOe68GJC9RzET lSh3wlNxQJ+xrU6o3wulnJymr6z/DrLgYzSfTAthDMmIE8Awk7kUKsrb1IMn82KW0Hil dN2R4JRzv+qOwFRaU0V5ZI61yZqB1/Qq4UlpSm2nLgZ1Pz3iZRHUo0d0JQxT4B7iMUBq zsUi8/2Ymq5UlXMWP2P8mHpzIwqUvdrMeZAqqyw8KeEH0Kx52ql+otxSH6qI2O6+K2qz jOuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dF8luGdB; 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 y7-v6si8972653pgp.551.2018.08.31.14.39.42; Fri, 31 Aug 2018 14:39:57 -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=@google.com header.s=20161025 header.b=dF8luGdB; 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 S1727381AbeIABsC (ORCPT + 99 others); Fri, 31 Aug 2018 21:48:02 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:47094 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727247AbeIABsC (ORCPT ); Fri, 31 Aug 2018 21:48:02 -0400 Received: by mail-pf1-f195.google.com with SMTP id u24-v6so6058648pfn.13 for ; Fri, 31 Aug 2018 14:38:39 -0700 (PDT) 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=L2myr9DjiLMzEybNM7rgB8Hb4Y/Lf9yt4tmGt7nA3V4=; b=dF8luGdBdJxIa8ULEdtQBV4rL7W6jPwD/rfAK0oovt1PyvxzUsssgi/7rPUnMsN7T8 ZnANy6TK2c4r/F1efwIBODktzKnvH5+Ws9t2RPmL4xrnktayFMiWRVsZUZlC5LxIPuHt 9WXCWr/ga7Bn85eHYYSiH4BShqpFx1k3fAR+1hb+CdzvJdsGWAF5sTt1a3793gaOuTlx 4gUrjhCQfEM455VV/e7eFlKLXlUog5o8SBqg4nih9cuGZA/acvBQ6c5v6sgxTZxNDP3J SaddHi3PyC6swC/fPRFx5Dr0dC3IaBDbcoBHfO0veaWj12Esg9Zm20NNdFyzp8han7x9 /B3A== 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=L2myr9DjiLMzEybNM7rgB8Hb4Y/Lf9yt4tmGt7nA3V4=; b=c9VlKcPID3tB9WVqPQ0N8oHcyX+hBwdwsdnBo+3vvUK58KERXAeQvzEFjKV3eiMOvi L8opv+qEYfamwao2O/rqrcYP9EygYjQ9tuSUEl9Ws5FmmcpHmE83kSI7zhOU5+10t5Wk cvCXr/R4Wf/jPJj5IphFJcVrn/dKPkLtA4FyCax9zSOnQELplOG+25wTrS4xj/af7dqB h9pqPfDG2S1nlEpxJlb9fKYwhByz1cnaofvvin4UDmEllZyLJG8hcZSAYJRqy9/mt+Gr SmXA7nloiwRt+PF/pgpHtj325mMhCcYIwVUNjF6OK0YlfhzCctaBNBEByQorIYeHf8R+ FdvA== X-Gm-Message-State: APzg51CqTq1BW1RQsjqsj8ipoxr+TsdZn0YpghR45HVgb0AHjU8eh9d1 6M/SgxMFttwRinzRt2QH3DUYmkYtkxXIU7ehmXLzSgxAqCpjsA== X-Received: by 2002:a63:6243:: with SMTP id w64-v6mr16355192pgb.145.1535751518301; Fri, 31 Aug 2018 14:38:38 -0700 (PDT) MIME-Version: 1.0 References: <20180831170514.24665-1-miguel.ojeda.sandonis@gmail.com> <20180831170514.24665-6-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180831170514.24665-6-miguel.ojeda.sandonis@gmail.com> From: Nick Desaulniers Date: Fri, 31 Aug 2018 14:38:26 -0700 Message-ID: Subject: Re: [PATCH 6/7] Compiler Attributes: remove unneeded sparse (__CHECKER__) tests To: Miguel Ojeda , sparse@chrisli.org Cc: Linus Torvalds , LKML , efriedma@codeaurora.org, Kees Cook , Ingo Molnar , Geert Uytterhoeven , Arnd Bergmann , Greg KH , Masahiro Yamada , joe@perches.com, asmadeus@codewreck.org 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 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 happy with it, then you can add my signoff: Reviewed-by: Nick Desaulniers Also, do you need to put the cc list in the commit message? Some people do (hopefully in an automated fashion, because I'd imagine manually to be difficult) but don't this it's required. Doesn't matter, just curious. -- Thanks, ~Nick Desaulniers