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] [day] [month] [year] [list]
Message-ID: <CABCJKudqAEvLcdqTqyfE2+iW+jeqBpnTGgYJvrZ0by6hGdfevQ@mail.gmail.com>
Date: Wed, 25 Sep 2024 20:49:16 +0000
From: Sami Tolvanen <samitolvanen@...gle.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Gary Guo <gary@...yguo.net>, Miguel Ojeda <ojeda@...nel.org>, 
	Alex Gaynor <alex.gaynor@...il.com>, Wedson Almeida Filho <wedsonaf@...il.com>, 
	Boqun Feng <boqun.feng@...il.com>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...sung.com>, 
	Alice Ryhl <aliceryhl@...gle.com>, Dirk Behme <dirk.behme@...bosch.com>, 
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] kbuild: rust: auto generate rust helper exports

Hi folks,

On Mon, Aug 19, 2024 at 1:04 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Sat, Aug 17, 2024 at 6:54 PM Gary Guo <gary@...yguo.net> wrote:
> >
> > This removes the need for explicit exporting all symbols.
> >
> > Generate helper exports similar to what's currently done for Rust
> > crates. These helpers are exclusively called from within Rust code
> > and therefore can be treated similar as other Rust symbols.
> >
> > Signed-off-by: Gary Guo <gary@...yguo.net>
>
> Applied to `rust-next` -- thanks everyone!
>
>     [ Fixed dependency path, reworded slightly, edited comment a bit and
>       rebased on top of the changes made when applying Andreas' patch
>       (e.g. no `README.md` anymore, so moved the edits).  - Miguel ]

I noticed this patch when I was rebasing the modversions series, and
it breaks module versioning for the C helpers because they no longer
export anything. Since helpers.o is not Rust code either, it seems
we'd have to add a special rule to generate modversions just for this
one object file, which doesn't feel ideal.

I ended up reverting this patch for now in my personal test tree [1],
but I'd like to understand if there are benefits in using Rust-style
exports for this C code other than being able to drop a few lines of
exports? The comment added to rust/Makefile says that "In the future,
this may be revisited to reduce the number of exports" which sounds
like this might be a temporary clean-up?

[1] https://github.com/samitolvanen/linux/commits/rustmodversions-v3

Sami

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ