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, 12 Feb 2024 15:11:41 -0300
From: Martin Rodriguez Reboredo <yakoyoku@...il.com>
To: Alice Ryhl <aliceryhl@...gle.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>,
 Benno Lossin <benno.lossin@...ton.me>,
 Andreas Hindborg <a.hindborg@...sung.com>, Kees Cook
 <keescook@...omium.org>, Al Viro <viro@...iv.linux.org.uk>,
 Andrew Morton <akpm@...ux-foundation.org>,
 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 v2 4/4] rust: add abstraction for `struct page`

On 2/12/24 06:36, Alice Ryhl wrote:
> On Sat, Feb 10, 2024 at 5:23 AM Martin Rodriguez Reboredo
> <yakoyoku@...il.com> wrote:
>>
>> On 2/8/24 12:47, Alice Ryhl wrote:
>>> [...]
>>> +    /// Maps the page and reads from it into the given buffer.
>>> +    ///
>>> +    /// This method will perform bounds checks on the page offset. If `offset ..
>>> +    /// offset+len` goes outside ot the page, then this call returns `EINVAL`.
>>> +    ///
>>> +    /// # Safety
>>> +    ///
>>> +    /// * Callers must ensure that `dst` is valid for writing `len` bytes.
>>> +    /// * Callers must ensure that this call does not race with a write to the
>>> +    ///   same page that overlaps with this read.
>>
>> This safety section says that a call mustn't race with a page that
>> overlaps this read, hmmmmm.
> 
> Is there a question here?

I've said more like introducing the next point, but if you want to use
`copy_nonoverlapping` then the safety section should mention that both
`src` and `dst` memory areas are forbidden to be overlapping.

> [...]
> I'll use copy_nonoverlapping. Thanks for the suggestion.
> 
> Alice

You're welcome.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ