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]
Message-ID: <ZMWjhRyvsWIZal72@boqun-archlinux>
Date:   Sat, 29 Jul 2023 16:40:53 -0700
From:   Boqun Feng <boqun.feng@...il.com>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc:     rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, Miguel Ojeda <ojeda@...nel.org>,
        Alex Gaynor <alex.gaynor@...il.com>,
        Wedson Almeida Filho <wedsonaf@...il.com>,
        Gary Guo <gary@...yguo.net>,
        Björn Roy Baron <bjorn3_gh@...tonmail.com>,
        Benno Lossin <benno.lossin@...ton.me>,
        Martin Rodriguez Reboredo <yakoyoku@...il.com>,
        Alice Ryhl <aliceryhl@...gle.com>,
        Dariusz Sosnowski <dsosnowski@...snowski.pl>,
        Geoffrey Thomas <geofft@...reload.com>,
        Fox Chen <foxhlchen@...il.com>,
        John Baublitz <john.m.baublitz@...il.com>,
        Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Kees Cook <keescook@...omium.org>,
        Andreas Hindborg <nmi@...aspace.dk>, stable@...r.kernel.org
Subject: Re: [PATCH] rust: allocator: Prevents mis-aligned allocation

On Sat, Jul 29, 2023 at 04:01:03PM +0200, Miguel Ojeda wrote:
> On Tue, Jun 13, 2023 at 6:44 PM Boqun Feng <boqun.feng@...il.com> wrote:
> >
> > Cc: stable@...r.kernel.org # v6.1+
> 
> Applied to `rust-next`, thanks!
> 
> However, should this go to stable? The actual functions being called
> are the `__rust_*` ones (until they get removed in 1.71), no? Thus

Interesting, I wasn't aware of the `__rust_*` "hack" here, so you are
right, this doesn't fix the issue in stable kernels.

> this is not actually fixing the actual functions being called, right?
> 
> If that is correct, then the fix should change the functions below,
> perhaps adding `krealloc_with_flags()` from the other patch (it does
> not need to be a method, by the way), and calling it with a `Layout`
> like the generated ones do. Then I can rebase `rust-next` on top of

Sounds good, however I think it'll be better if I resend this one, and
the other one originally from Bjorn based on the introduction of
function `krealloc_with_flags` (I will name it as `krealloc_aligned`,
since it's a function that returns a aligned object with krealloc). 

Thoughts?

Regards,
Boqun

> the fix that adds the `krealloc_with_flags()`.
> 
> Cheers,
> Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ