From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [PATCH v4 08/17] arm64/mm: Remove needless section quotes Date: Mon, 29 Jun 2020 13:04:31 -0700 Message-ID: <202006291301.46FEF3B7@keescook> References: <20200629061840.4065483-1-keescook@chromium.org> <20200629061840.4065483-9-keescook@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388810AbgF2UEe (ORCPT ); Mon, 29 Jun 2020 16:04:34 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F37FCC03E97A for ; Mon, 29 Jun 2020 13:04:33 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id a127so8336925pfa.12 for ; Mon, 29 Jun 2020 13:04:33 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Nick Desaulniers Cc: Will Deacon , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Russell King , Masahiro Yamada , Arvind Sankar , Nathan Chancellor , Arnd Bergmann , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , clang-built-linux , linux-arch , linux-efi , Linux ARM On Mon, Jun 29, 2020 at 12:53:47PM -0700, Nick Desaulniers wrote: > On Sun, Jun 28, 2020 at 11:18 PM Kees Cook wrote: > > > > Fix a case of needless quotes in __section(), which Clang doesn't like. > > > > Acked-by: Will Deacon > > Signed-off-by: Kees Cook > > Yep, I remember bugs from this. Probably should scan the kernel for > other instances of this. +Joe for checkpatch.pl validation. I think the others are safe because they're in macros: $ git grep -4 '__section("' include/linux/compiler.h-# define KENTRY(sym) \ include/linux/compiler.h- extern typeof(sym) sym; \ include/linux/compiler.h- static const unsigned long __kentry_##sym \ include/linux/compiler.h- __used \ include/linux/compiler.h: __section("___kentry" "+" #sym ) \ include/linux/compiler.h- = (unsigned long)&sym; -- include/linux/export.h-#define __ksym_marker(sym) \ include/linux/export.h: static int __ksym_marker_##sym[0] __section(".discard.ksym") __used From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388810AbgF2UEe (ORCPT ); Mon, 29 Jun 2020 16:04:34 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F37FCC03E97A for ; Mon, 29 Jun 2020 13:04:33 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id a127so8336925pfa.12 for ; Mon, 29 Jun 2020 13:04:33 -0700 (PDT) Date: Mon, 29 Jun 2020 13:04:31 -0700 From: Kees Cook Subject: Re: [PATCH v4 08/17] arm64/mm: Remove needless section quotes Message-ID: <202006291301.46FEF3B7@keescook> References: <20200629061840.4065483-1-keescook@chromium.org> <20200629061840.4065483-9-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Nick Desaulniers Cc: Will Deacon , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Russell King , Masahiro Yamada , Arvind Sankar , Nathan Chancellor , Arnd Bergmann , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , clang-built-linux , linux-arch , linux-efi , Linux ARM , LKML , Joe Perches Message-ID: <20200629200431.cZssPr_yNf2KVhA4aU4MutE4kMgAf_GSBEyJDlsJ5QE@z> On Mon, Jun 29, 2020 at 12:53:47PM -0700, Nick Desaulniers wrote: > On Sun, Jun 28, 2020 at 11:18 PM Kees Cook wrote: > > > > Fix a case of needless quotes in __section(), which Clang doesn't like. > > > > Acked-by: Will Deacon > > Signed-off-by: Kees Cook > > Yep, I remember bugs from this. Probably should scan the kernel for > other instances of this. +Joe for checkpatch.pl validation. I think the others are safe because they're in macros: $ git grep -4 '__section("' include/linux/compiler.h-# define KENTRY(sym) \ include/linux/compiler.h- extern typeof(sym) sym; \ include/linux/compiler.h- static const unsigned long __kentry_##sym \ include/linux/compiler.h- __used \ include/linux/compiler.h: __section("___kentry" "+" #sym ) \ include/linux/compiler.h- = (unsigned long)&sym; -- include/linux/export.h-#define __ksym_marker(sym) \ include/linux/export.h: static int __ksym_marker_##sym[0] __section(".discard.ksym") __used -- include/linux/srcutree.h-# define __DEFINE_SRCU(name, is_static) \ include/linux/srcutree.h- is_static struct srcu_struct name; \ include/linux/srcutree.h- struct srcu_struct * const __srcu_struct_##name \ include/linux/srcutree.h: __section("___srcu_struct_ptrs") = &name > Reviewed-by: Nick Desaulniers Thanks! -- Kees Cook