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: <20250213142308.4aed36d7@eugeo>
Date: Thu, 13 Feb 2025 14:23:08 +0000
From: Gary Guo <gary@...yguo.net>
To: Tamir Duberstein <tamird@...il.com>
Cc: Danilo Krummrich <dakr@...nel.org>, Miguel Ojeda <ojeda@...nel.org>, DJ
 Delorie <dj@...hat.com>, Eric Blake <eblake@...hat.com>, Paul Eggert
 <eggert@...ucla.edu>, Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng
 <boqun.feng@...il.com>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>, Andreas
 Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, Trevor
 Gross <tmgross@...ch.edu>, rust-for-linux@...r.kernel.org,
 linux-man@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6] rust: alloc: satisfy POSIX alignment requirement

On Thu, 13 Feb 2025 06:33:58 -0500
Tamir Duberstein <tamird@...il.com> wrote:

> On Thu, Feb 13, 2025 at 6:30 AM Gary Guo <gary@...yguo.net> wrote:
> >
> > On Thu, 13 Feb 2025 06:26:41 -0500
> > Tamir Duberstein <tamird@...il.com> wrote:
> >  
> > > ISO C's `aligned_alloc` is partially implementation-defined; on some
> > > systems it inherits stricter requirements from POSIX's `posix_memalign`.
> > >
> > > This causes the call added in commit dd09538fb409 ("rust: alloc:
> > > implement `Cmalloc` in module allocator_test") to fail on macOS because
> > > it doesn't meet the requirements of `posix_memalign`.
> > >
> > > Adjust the call to meet the POSIX requirement and add a comment. This
> > > fixes failures in `make rusttest` on macOS.
> > >
> > > Acked-by: Danilo Krummrich <dakr@...nel.org>
> > > Fixes: dd09538fb409 ("rust: alloc: implement `Cmalloc` in module allocator_test")
> > > Signed-off-by: Tamir Duberstein <tamird@...il.com>
> > > ---
> > > Changes in v6:
> > > - Replace unsound use of build_error with map_err. (Danilo Krummrich)  
> >
> > It's sound, just not correct.  
> 
> Changed. I asked a tangential question in the last thread but: do you
> think it's possible to make build_error work correctly on the host?

I don't know what would be needed to make it work off the top of my
head.

Maybe it could be done, but I don't think it's worth the effort since
it's only used for host side test.

- Gary

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ