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: <Z3_vhR_QMaK0Klly@x1>
Date: Thu, 9 Jan 2025 12:47:17 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Tamir Duberstein <tamird@...il.com>
Cc: Alice Ryhl <aliceryhl@...gle.com>, Neal Gompa <neal@...pa.dev>,
	Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
	Matthew Maurer <mmaurer@...gle.com>,
	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>,
	Alessandro Decina <alessandro.d@...il.com>,
	Michal Rostecki <vadorovsky@...tonmail.com>,
	Dave Tucker <dave@...cker.co.uk>
Subject: Re: [PATCH] rust: Disallow BTF generation with Rust + LTO

On Thu, Jan 09, 2025 at 09:55:34AM -0500, Tamir Duberstein 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.
 
> In bpf-linker[0] we implemented "sanitization" to allow Rust DI to
> produce functional BTF[1]. This is certainly outside the scope of this
> change but: could pahole adopt a similar strategy rather than
> employing such coarse heuristics?

I was thinking about it after reading this thread yesterday, i.e. we
could encode constructs from Rust that can be represented in BTF and
skip the ones that can't, pruning types that depend on non BTF
representable types, etc.

This way we wouldn't care what language it was written on, as long as we
can represent the types in BTF.

I'll try to do some experimentation with this idea.

- Arnaldo
 
> [0] https://github.com/aya-rs/bpf-linker
> [1] https://github.com/aya-rs/bpf-linker/blob/e4a9267b0fee69ecb2550058d3c8e5233f946ebe/src/llvm/di.rs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ