rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Maurer <mmaurer@google.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: Do not export generated KASAN ODR symbols
Date: Wed, 5 Feb 2025 12:08:04 -0800	[thread overview]
Message-ID: <CAGSQo02HFMn0b=d6LVFr35Bc06F0AY8XmPFtqWi4b17cQSF0+g@mail.gmail.com> (raw)
In-Reply-To: <CANiq72nr9vTgUF9u0uyypzprQrEpGv4qbOUJS_QgYbMZhTTrRQ@mail.gmail.com>

On Wed, Jan 22, 2025 at 1:12 AM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Wed, Jan 22, 2025 at 1:14 AM Matthew Maurer <mmaurer@google.com> wrote:
> >
> > ASAN generates sppecial synthetic symbols to help check for ODR
> > violations. These synthetic symbols lack debug information, so
> > gendwarfksyms emits warnings when processing them. No code should ever
> > have a dependency on these symbols, so we should not be exporting them,
> > just like the __cfi symbols.
> >
> > Signed-off-by: Matthew Maurer <mmaurer@google.com>
>
> Sounds good -- are those generated unconditionally by ASAN to check
> for C++ ODR violations and so we get them anyway or do we benefit
> somehow?
>
> I also wondered about whether we should search for an extra underscore
> (`__odr_asan_`), but I also see mentions of `__odr_asan.`, which I
> guess that is the reason you used that prefix. Is that right?

In case you were waiting for an answer on that, it's because I was
trying to be as loose as possible, since `__odr_asan` isn't going to
end up on random symbols we *intended* to export from the kernel.
We could technically restrict it to `__odr_asan_gen_` to be more
precise and it should still work.

>
> Acked-by: Miguel Ojeda <ojeda@kernel.org>
>
> Thanks!
>
> Cheers,
> Miguel

  reply	other threads:[~2025-02-05 20:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22  0:14 [PATCH] rust: Do not export generated KASAN ODR symbols Matthew Maurer
2025-01-22  8:38 ` Alice Ryhl
2025-01-22  9:11 ` Miguel Ojeda
2025-02-05 20:08   ` Matthew Maurer [this message]
2025-02-05 23:00     ` Miguel Ojeda
2025-02-05 23:03       ` Matthew Maurer
2025-02-05 23:08         ` Miguel Ojeda
2025-02-05 23:12           ` Matthew Maurer
2025-02-05 23:13             ` Miguel Ojeda
2025-02-06 23:04 ` Miguel Ojeda

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='CAGSQo02HFMn0b=d6LVFr35Bc06F0AY8XmPFtqWi4b17cQSF0+g@mail.gmail.com' \
    --to=mmaurer@google.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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).