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]
Date:   Mon, 16 May 2022 10:18:45 +0200
From:   Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:     Greg KH <greg@...ah.com>
Cc:     Arnd Bergmann <arnd@...db.de>, Alex Gaynor <alex.gaynor@...il.com>,
        Carlos Llamas <cmllamas@...gle.com>,
        Finn Behrens <me@...enk.de>, Gary Guo <gary@...yguo.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Miguel Ojeda <ojeda@...nel.org>,
        Sven Van Asbroeck <thesven73@...il.com>,
        Wayne Campbell <wcampbell1995@...il.com>,
        Wedson Almeida Filho <wedsonaf@...gle.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: linux-next: manual merge of the rust tree with the char-misc tree

Hi Greg,

On Mon, May 16, 2022 at 9:49 AM Greg KH <greg@...ah.com> wrote:
>
> Odd, why does the Rust binder implementation require the IOCTL
> definitions to be in an enum instead of a #define?

It is because bindgen (the tool which generates the "raw" C bindings)
only works with simple C `#define`s. Thus there are two options when
one hits something like this: either copy-paste them manually into the
Rust side (which adds maintenance), or change them into real
objects/identifiers in the C side.

There may be support in the future for expanding macros that end up in
a numeric one: https://github.com/rust-lang/rust-bindgen/issues/753.

Stephen: the resolution looks fine, thanks!

> If that's required, I can take that type of change now to prevent merge
> issues in the future.

We have two so far: this one (for the RFC Android patch) and another
small one in include/linux/spinlock.h (for the `sync` module).

So far I have put those changes in their respective patches, but if
you prefer I can send them independently too (like the prerequisite
patches).

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ