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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH5fLgigLV17+6U75MC43XFnYeqtgvrrTWD7JmDSB-ebNjCVvw@mail.gmail.com>
Date: Mon, 8 Apr 2024 09:54:40 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: Benno Lossin <benno.lossin@...ton.me>
Cc: Miguel Ojeda <ojeda@...nel.org>, Matthew Wilcox <willy@...radead.org>, 
	Al Viro <viro@...iv.linux.org.uk>, Andrew Morton <akpm@...ux-foundation.org>, 
	Kees Cook <keescook@...omium.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>, 
	Andreas Hindborg <a.hindborg@...sung.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	Arve Hjønnevåg <arve@...roid.com>, 
	Todd Kjos <tkjos@...roid.com>, Martijn Coenen <maco@...roid.com>, 
	Joel Fernandes <joel@...lfernandes.org>, Carlos Llamas <cmllamas@...gle.com>, 
	Suren Baghdasaryan <surenb@...gle.com>, Arnd Bergmann <arnd@...db.de>, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org, 
	Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH v4 4/4] rust: add abstraction for `struct page`

On Sun, Apr 7, 2024 at 10:59 AM Benno Lossin <benno.lossin@...ton.me> wrote:
>
> On 05.04.24 09:44, Alice Ryhl wrote:
> > On Fri, Apr 5, 2024 at 12:33 AM Benno Lossin <benno.lossin@...ton.me> wrote:
> >>
> >> On 04.04.24 14:31, Alice Ryhl wrote:
> >>> +/// A bitwise shift for the page size.
> >>> +#[allow(clippy::unnecessary_cast)]
> >>
> >> Why can't you remove the cast?
> >
> > Bindgen could decide to use a different type in the future or on
> > different platforms.
>
> Did that already happen?
>
> I think that we might want to know if the type changes, since then the
> value might change?

I mean, it's quite unlikely that the page size will not fit in an
usize, even if it changes?

>From bindgen's point of view, this constant is just an integer literal
with no type information. So I don't see how we can expect it to
always be generated as a usize?

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ