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: <1aa088b1-ca4d-4a97-b25c-96a18f62a79c@proton.me>
Date: Thu, 26 Sep 2024 22:15:30 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: kernel test robot <lkp@...el.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>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, Greg KH <greg@...ah.com>, Simona Vetter <simona.vetter@...ll.ch>, linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2 1/2] rust: add untrusted data abstraction

On 26.09.24 23:56, Miguel Ojeda wrote:
> On Thu, Sep 26, 2024 at 11:40 PM Benno Lossin <benno.lossin@...ton.me> wrote:
>>
>> I would like to use `#[cfg("rust version <= 1.82")]`, but I don't know
>> how to do that. Do we already have support for checking the version in a
>> cfg? The alternative would be `#[allow(unreachable_patterns)]`, but I
>> would like to avoid that.
> 
> We can do it, but it requires adding a Kconfig symbol, sadly, since
> `cfg` does not support numerical comparisons there.
> 
> See commit 93dc3be19450 ("docs: rust: include other expressions in
> conditional compilation section") where I explained it.

Thanks!

> So depending on how often we think we will hit this, we may want to
> pay the "cost" of the extra Kconfig symbol. Otherwise, we can just
> `allow` it as you say.

Personally, I would prefer adding a symbol. Since if we allow it, then
it might take a long time until the code is removed once we increase the
minimum version.

It would be best, if it produces an error when we raise the minimum
version beyond the one represented by the symbol. Is that already the
case?

On 26.09.24 23:57, Miguel Ojeda wrote:
> On Thu, Sep 26, 2024 at 11:40 PM Benno Lossin <benno.lossin@...ton.me> wrote:
>>
>> I can reproduce this error locally in a Rust project, but am unable to
>> do so on play.rust-lang.org. That seems very strange to me, anyone else
>> on 1.83 or 1.82 can confirm? AFAIK, it was stabilized in 1.82, see [1].
> 
> Can you try in Compiler Explorer? That allows you to select more versions etc.

Gave it a try and I also can't reproduce the error there...

---
Cheers,
Benno


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ