linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@gmail.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: "Paul E . McKenney" <paulmck@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org, rcu@vger.kernel.org,
	Clang-Built-Linux ML <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH v2] srcu: avoid escaped section names
Date: Wed, 30 Sep 2020 18:41:42 +0200	[thread overview]
Message-ID: <CA+icZUVgfnVQ1=zjUGhGKnJAs9g3Q06sWN3ffNdrfZMZLCEkbA@mail.gmail.com> (raw)
In-Reply-To: <20200929192549.501516-1-ndesaulniers@google.com>

On Tue, Sep 29, 2020 at 9:25 PM 'Nick Desaulniers' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
>
> The stringification operator, `#`, in the preprocessor escapes strings.
> For example, `# "foo"` becomes `"\"foo\""`.  GCC and Clang differ in how
> they treat section names that contain \".
>
> The portable solution is to not use a string literal with the
> preprocessor stringification operator.
>
> Link: https://bugs.llvm.org/show_bug.cgi?id=42950
> Fixes: commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Puh, remember one year ago an overnight bisecting to catch the root
cause for "escaped section names".

The two patches I see - this here and "export.h: fix section name for
CONFIG_TRIM_UNUSED_KSYMS for Clang" were new cases?

Do we have a check-script to catch/avoid such cases (Joe Perches?)?

Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>

- Sedat -

> ---
> Changes V1->V2:
> * drop unrelated Kconfig changes accidentally committed in v1.
>
>  include/linux/srcutree.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h
> index 9cfcc8a756ae..9de652f4e1bd 100644
> --- a/include/linux/srcutree.h
> +++ b/include/linux/srcutree.h
> @@ -124,7 +124,7 @@ struct srcu_struct {
>  # define __DEFINE_SRCU(name, is_static)                                        \
>         is_static struct srcu_struct name;                              \
>         struct srcu_struct * const __srcu_struct_##name                 \
> -               __section("___srcu_struct_ptrs") = &name
> +               __section(___srcu_struct_ptrs) = &name
>  #else
>  # define __DEFINE_SRCU(name, is_static)                                        \
>         static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data);      \
> --
> 2.28.0.709.gb0816b6eb0-goog
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200929192549.501516-1-ndesaulniers%40google.com.

  parent reply	other threads:[~2020-09-30 16:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 19:22 [PATCH] srcu: avoid escaped section names Nick Desaulniers
2020-09-29 19:22 ` Nick Desaulniers
2020-09-29 19:25   ` [PATCH v2] " Nick Desaulniers
2020-09-29 23:45     ` Kees Cook
2020-09-30 16:27     ` Nathan Chancellor
2020-09-30 16:41     ` Sedat Dilek [this message]
2020-09-30 18:57       ` Joe Perches
2020-09-30 19:16         ` [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo") Joe Perches
2020-09-30 21:40           ` Nick Desaulniers
2020-09-30 22:06             ` Joe Perches
2020-09-30 22:12               ` Joe Perches
2020-09-30 22:20               ` Nick Desaulniers
2020-09-30 22:25                 ` Joe Perches
2020-09-30 22:56                   ` Joe Perches
2020-10-01 10:15                     ` Miguel Ojeda
2020-10-01 19:05                       ` Joe Perches
2020-10-01 19:39                       ` Segher Boessenkool
2020-10-01 20:19                         ` Joe Perches
2020-10-05 18:36                           ` Nick Desaulniers
2020-10-05 18:46                             ` Joe Perches
2020-10-06  0:34                           ` Joel Stanley
2020-10-06  3:22                             ` Joe Perches
2020-09-30 20:40     ` [PATCH v2] srcu: avoid escaped section names Paul E. McKenney
2020-09-30 20:55       ` Nick Desaulniers
2020-10-02 20:51         ` Paul E. McKenney
2020-10-05 18:29           ` Nick Desaulniers
2020-10-05 18:38             ` Sedat Dilek
2020-10-05 18:49               ` Paul E. McKenney
2020-10-06  6:56                 ` Nathan Chancellor
2020-10-07 21:05                   ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+icZUVgfnVQ1=zjUGhGKnJAs9g3Q06sWN3ffNdrfZMZLCEkbA@mail.gmail.com' \
    --to=sedat.dilek@gmail.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=ndesaulniers@google.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).