All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Guo <gary@garyguo.net>
To: Tamir Duberstein <tamird@gmail.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>, "DJ Delorie" <dj@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Paul Eggert" <eggert@cs.ucla.edu>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	rust-for-linux@vger.kernel.org, linux-man@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] rust: alloc: satisfy POSIX alignment requirement
Date: Thu, 13 Feb 2025 14:23:08 +0000	[thread overview]
Message-ID: <20250213142308.4aed36d7@eugeo> (raw)
In-Reply-To: <CAJ-ks9mQG5pyEP+cnVxBkCDbfR_cecBZK0K456=Qw6Y03LuRvg@mail.gmail.com>

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

> On Thu, Feb 13, 2025 at 6:30 AM Gary Guo <gary@garyguo.net> wrote:
> >
> > On Thu, 13 Feb 2025 06:26:41 -0500
> > Tamir Duberstein <tamird@gmail.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@kernel.org>
> > > Fixes: dd09538fb409 ("rust: alloc: implement `Cmalloc` in module allocator_test")
> > > Signed-off-by: Tamir Duberstein <tamird@gmail.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

      reply	other threads:[~2025-02-13 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 11:26 [PATCH v6] rust: alloc: satisfy POSIX alignment requirement Tamir Duberstein
2025-02-13 11:30 ` Gary Guo
2025-02-13 11:33   ` Tamir Duberstein
2025-02-13 14:23     ` Gary Guo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250213142308.4aed36d7@eugeo \
    --to=gary@garyguo.net \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dj@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eggert@cs.ucla.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.