Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241222125405.GY10433@brightrain.aerifal.cx>
Date: Sun, 22 Dec 2024 07:54:05 -0500
From: Rich Felker <dalias@...c.org>
To: Markus Wichmann <nullplan@....net>
Cc: musl@...ts.openwall.com
Subject: Re: struct mq_attr wrong on x32?

On Sat, Dec 21, 2024 at 06:50:55PM +0100, Markus Wichmann wrote:
> Am Sat, Dec 21, 2024 at 01:15:41AM -0500 schrieb Rich Felker:
> > On Tue, Dec 17, 2024 at 07:46:28PM +0100, Markus Wichmann wrote:
> >
> > > [struct mq_attr is wrong on x32]
> > I recall something about this coming up before. I'll dig and see what
> > I can find. It's not clear to me if we should fix this in the
> > interface type (leaving behind any broken stuff already compiled using
> > the mismatched definition) or translate it in libc (keeping ABI same
> > and fixing existing binaries too).
> >
> > Rich
> 
> I also found struct rusage to be wrong in a similar way. The kernel
> struct is defined in terms of __kernel_long_t again, and musl
> substitutes that for long. So that would add a few translations.
> 
> At this point, since the wrong definitions are already published,
> translation makes the most sense, of course.

I think these x32-specific implementations for the functions would
work. They're tested to compile but not runtime tested.

Arguably it might be better to put the code conditionally in the main
source files; I'm not sure.

Rich

View attachment "mq_open.c" of type "text/plain" (533 bytes)

View attachment "mq_setattr.c" of type "text/plain" (455 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.