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]
Date:   Thu, 23 Mar 2023 23:00:20 +0900
From:   Asahi Lina <lina@...hilina.net>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc:     Miguel Ojeda <ojeda@...nel.org>,
        Alex Gaynor <alex.gaynor@...il.com>,
        Wedson Almeida Filho <wedsonaf@...il.com>,
        Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
        Björn Roy Baron <bjorn3_gh@...tonmail.com>,
        Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
        rust-for-linux@...r.kernel.org, asahi@...ts.linux.dev,
        linux-arch@...r.kernel.org
Subject: Re: [PATCH v3] rust: ioctl: Add ioctl number manipulation functions

On 23/03/2023 22.05, Miguel Ojeda wrote:
> On Thu, Mar 23, 2023 at 1:34 PM Asahi Lina <lina@...hilina.net> wrote:
>>
>> Changes in v3:
>> - Actually made the change intended in v2.
>> - Link to v2: https://lore.kernel.org/r/20230224-rust-ioctl-v2-1-5325e76a92df@asahilina.net
>>
>> Changes in v2:
>> - Changed from assert!() to build_assert!() (static_assert!() can't work
>>    here)
>> - Link to v1: https://lore.kernel.org/r/20230224-rust-ioctl-v1-1-5142d365a934@asahilina.net
> 
> It seems `#[inline(always)]` got added to a few of those, right? (The
> addition looks fine to me, but just to understand if is it an omission
> in the changelog, or an unintended change, or intended for another
> reason).

Ah yes, I should've mentioned that! build_assert!() only works for stuff 
that can be const-optimized at build time, which requires inlining. 
Otherwise this change immediately causes build failures since generic 
variants of the functions get compiled (and since they're public 
functions, cannot be optimized out at link time).

> 
> Thanks!
> 
> Cheers,
> Miguel
> 

~~ Lina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ