Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp836987imm; Fri, 31 Aug 2018 14:57:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbL/BTyXZIzuu70yaf/ZvOHhUcUwDu9Tfg1HBEF3yDvnB0OXLNdbzsf9VdtAczn7i1Zfu6V X-Received: by 2002:a63:c702:: with SMTP id n2-v6mr16609470pgg.108.1535752661681; Fri, 31 Aug 2018 14:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535752661; cv=none; d=google.com; s=arc-20160816; b=xjpMfIVxO8fpA6qO0JoZO3NUM26/HnyH/d5S3FbusOLPRx6RhR090T64ngtqe89gYg db4H+8AmcgmCuq9PnK+YwqRndtg4eVVVF43WUvwYQDuI/J8qdlEzousu2MoryG2Bh1xR SGz1W1M/JCdu2Obbm9CxRjo8zsMYdzmpvOIa+ilFOceps8RY9VNL89/Iky+Ci8JTH+Iz JU745KA4YoGxA7l/TwQA+7O6xv+PqiOV7rjFqP0IJhAEVJCFTF6wS/kp47YTetehx8nT gkCgPEu2E/iiVNmuB2BCsWqoFAm1khPIaAHyCUw0cbV8xFMZ702xaEHiqugjAc3o/8U8 swMA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=dMitvLYzskrRB0I43H+w5BZe5/4w5SXXw6EA6mU8CwI=; b=mwLeR2g1LbjrypjdWuzK8ITn0Dk6h6qmUdGpA9PBy5WKpjbmE4I3/uuM7qXnBEOuaq 790A4gv9Sz8bhlV3Q0/0lX3fMt/YdFNkkAQ3gZv2Y7yLCfQ0gkx5voUEER9sdH1osQhL gbJwdBnLzoP2KpY4+FMppz+RVqV6EHp3bstaT+nuQgnJ20j9PB0Wf3HZAqd8PlVPmRDr leW99b4jRUgPHAXd6sdJ0fIJ73kuAB5TOgNtVK0IZkkb9p8SDwQo+uM7Ip90CB0JGb2S s3Ol6g3Wto4wUcVMxO0EwSZYJAkhP0xJ5cFYJqxZ+huON+XYdrLM70REeQnOee69T9Dz ophw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qieeOq3i; 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 s26-v6si10635387pge.339.2018.08.31.14.57.21; Fri, 31 Aug 2018 14:57:41 -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=qieeOq3i; 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 S1727449AbeIACFi (ORCPT + 99 others); Fri, 31 Aug 2018 22:05:38 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:37343 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727232AbeIACFi (ORCPT ); Fri, 31 Aug 2018 22:05:38 -0400 Received: by mail-qt0-f193.google.com with SMTP id n6-v6so16189544qtl.4 for ; Fri, 31 Aug 2018 14:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dMitvLYzskrRB0I43H+w5BZe5/4w5SXXw6EA6mU8CwI=; b=qieeOq3icAkJCNgnn541Uu/jpdqOTlFYtQZIfHGaFQ+E591xxbJCCD2rRr9o5MaoPH MowdQgLG7TxNvpoBdP18gkWNDdTxfq1byntVm8ZP14oKY9JirGlGaQZk6WES/5AHbkUz rSntjY7NZM55g6bTyEKZOdie279vvJDW4ZQteJGZ9auotoL2IKN5dNx4EXz8U7NQHrK9 /+Y/UEsoHv6YsJe9lDQtXcE6WSNef1bfIwZ0l7uyfhSK0vOruXKrkqDPuJnRngd8XQoZ Bl/T09Z9grhN9lEG+hBaU9+0RyB5tq7NsBu/uYlSX4s8BWz8GpTwplV3jev6M5P8PtdQ g5Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dMitvLYzskrRB0I43H+w5BZe5/4w5SXXw6EA6mU8CwI=; b=o0PxZ9EtPIuC9BrRtUqP8QxkklC9ExH/VjN2GRQqwNX+raSBe7Krj84r/2h6hNniWl qKZOK41X1C3739VZrGrqwYVG9o+7N7E/pGdSmeuqr2wXUvZO+WA/KLVlMRJ+HncZAui3 /SJO8ETSAQl5ORsjLOpHgmItRYoc+l73EYi3waU9r1zf6WtidgjJPpWwuGcc80NX9n8L Sgrchht5XD+/NGmqgEBPfObMqcrucuechhJkhaJI3BttR4bx1O3x7a6xBU15oCoFqGun 3qiWEjMVNwWJ7268IqAhiDaOMzVnYlcVDz94gW7w8rabjT1cmcwaFK/PnYr6eorYZ2uh KzRg== X-Gm-Message-State: APzg51B/HzmwNufTgXtrUTz1PLAT9Ket4CC67RZRxklVAIYpxTOKPXPZ f9Hdos6sNWCLfGvATQL2rIWMGAh/Un9ANyLoZZw= X-Received: by 2002:ac8:34e1:: with SMTP id x30-v6mr18057976qtb.115.1535752571728; Fri, 31 Aug 2018 14:56:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:aed:2291:0:0:0:0:0 with HTTP; Fri, 31 Aug 2018 14:55:51 -0700 (PDT) In-Reply-To: References: <20180831170514.24665-1-miguel.ojeda.sandonis@gmail.com> <20180831170514.24665-6-miguel.ojeda.sandonis@gmail.com> From: Miguel Ojeda Date: Fri, 31 Aug 2018 23:55:51 +0200 Message-ID: Subject: Re: [PATCH 6/7] Compiler Attributes: remove unneeded sparse (__CHECKER__) tests To: Nick Desaulniers Cc: Christopher Li , Linus Torvalds , LKML , Eli Friedman , Kees Cook , Ingo Molnar , Geert Uytterhoeven , Arnd Bergmann , Greg KH , Masahiro Yamada , Joe Perches , Dominique Martinet 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 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. But indeed, Chris, please let us know. (Should have CC'd you). > 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. Hm... I thought it was supposed to be there for all patches, considering different patches may have to be targeted to different people. Also, one has to manage anyway the Acked-by and Reviewed-by per-patch, so you have to manually go through. On top of that, it is always handy to have in case you discard a patch into a separate series or in case you send them through a tool that picks the Cc individually (instead of something more advanced like git-send-email). So... I guess? Not sure if it is strictly required, though. Cheers, Miguel