Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb80a2d1-ed9d-0830-2758-275324427e96@evolvis.org>
Date: Fri, 8 Aug 2025 02:32:16 +0200 (CEST)
From: Thorsten Glaser <tg@...lvis.org>
To: musl@...ts.openwall.com
cc: David Edelsohn <dje.gcc@...il.com>, Sertonix <sertonix@...teo.net>
Subject: Re: ctr registry after syscall on powerpc

On Thu, 7 Aug 2025, Rich Felker wrote:

>> > The relevant code from src/malloc/mallocng/malloc.c:
>> >
>> >         size_t pagesize = PGSZ; // stored into ctr registry
>> >         ...
>> >         ctx.brk = brk(0); // mess up ctr registry
>> >         ...
>> >         ctx.brk += -ctx.brk & (pagesize-1); // try to read back ctr
>> > registry

>It's not across a[n exteral] call. It's just across an (inlineable)
>syscall. So apparently this is a bug in our syscall asm constraints.

Is brk() an inlineable syscall that frees GCC from having to save
registers it can clobber?

Hm, perhaps if it can “see” the entire implementation, but that may
be surprising to users. But… I mean, it’s not static inline or a
macro, is it?

(Just adding that clobber is ofc good.)

bye,
//mirabilos
-- 
  "Using Lynx is like wearing a really good pair of shades: cuts out
   the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
                                         -- Henry Nelson, March 1999

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.