lkml.org 
[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 08/17] arm64/mm: Remove needless section quotes
On Mon, Jun 29, 2020 at 12:53:47PM -0700, Nick Desaulniers wrote:
> On Sun, Jun 28, 2020 at 11:18 PM Kees Cook <keescook@chromium.org> wrote:
> >
> > Fix a case of needless quotes in __section(), which Clang doesn't like.
> >
> > Acked-by: Will Deacon <will@kernel.org>
> > Signed-off-by: Kees Cook <keescook@chromium.org>
>
> 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 <ndesaulniers@google.com>

Thanks!

--
Kees Cook

\
 
 \ /
  Last update: 2020-06-29 22:05    [W:0.242 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site