lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH5fLghtCure3EjN-hRx9PT=10_E+0MNbjFACT_v+P1StWELPQ@mail.gmail.com>
Date: Thu, 9 Jan 2025 15:15:36 +0100
From: Alice Ryhl <aliceryhl@...gle.com>
To: Neal Gompa <neal@...pa.dev>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, Matthew Maurer <mmaurer@...gle.com>, 
	Arnaldo Carvalho de Melo <acme@...nel.org>, Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, 
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Trevor Gross <tmgross@...ch.edu>, linux-kernel@...r.kernel.org, 
	rust-for-linux@...r.kernel.org, Matthias Maennich <maennich@...gle.com>, 
	bpf <bpf@...r.kernel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, 
	Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Andrii Nakryiko <andrii@...nel.org>, John Fastabend <john.fastabend@...il.com>, 
	Eric Curtin <ecurtin@...hat.com>, Martin Reboredo <yakoyoku@...il.com>
Subject: Re: [PATCH] rust: Disallow BTF generation with Rust + LTO

On Thu, Jan 9, 2025 at 3:10 PM Neal Gompa <neal@...pa.dev> wrote:
>
> On Thu, Jan 9, 2025 at 8:17 AM Miguel Ojeda
> <miguel.ojeda.sandonis@...il.com> wrote:
> >
> > On Thu, Jan 9, 2025 at 12:35 AM Matthew Maurer <mmaurer@...gle.com> wrote:
> > >
> > > The kernel cannot currently self-parse BTF containing Rust debug
> > > information. pahole uses the language of the CU to determine whether to
> > > filter out debug information when generating the BTF. When LTO is
> > > enabled, Rust code can cross CU boundaries, resulting in Rust debug
> > > information in CUs labeled as C. This results in a system which cannot
> > > parse its own BTF.
> >
> > Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> >
> > as well as BPF/BTF, plus others that may be using or were involved
> > with the right-hand side of the condition.
> >
>
> Do we have cases where something is a mix of C and Rust? I thought all
> our Linux Rust code was self-contained?

If LTO is used, then any time that Rust calls C or C calls Rust,
optimizations could move Rust code into a C object file and cause this
boot failure. For example, vsprintf calls the Rust function
rust_fmt_argument when using the %pA format specifier.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ