| 
  | 
Message-ID: <87frax4z1f.fsf@mid.deneb.enyo.de> Date: Sat, 01 Nov 2025 15:18:04 +0100 From: Florian Weimer <fw@...eb.enyo.de> To: Oliver Hunt <oliver@...le.com> Cc: Thiago Macieira <thiago@...ieira.org>, Alejandro Colomar <alx@...nel.org>, Paul Eggert <eggert@...ucla.edu>, libc-alpha@...rceware.org, musl@...ts.openwall.com, "A. Wilcox" <AWilcox@...cox-tech.com>, Lénárd Szolnoki <cpp@...ardszolnoki.com>, Collin Funk <collin.funk1@...il.com>, Arthur O'Dwyer <arthur.j.odwyer@...il.com>, Jonathan Wakely <jwakely@...hat.com>, "Paul E. McKenney" <paulmck@...nel.org> Subject: Re: realloci(): A realloc() variant that works in-place * Oliver Hunt: >> On Oct 31, 2025, at 10:53 AM, Thiago Macieira <thiago@...ieira.org> wrote: >> >> On Friday, 31 October 2025 10:31:54 Pacific Daylight Time Paul Eggert wrote: >>> On 10/31/25 11:25, Thiago Macieira wrote: >>>> I think the Committee would balk at adding a function >>>> that takes a pointer to already-freed memory whose purpose is to allow the >>>> contents of the new object to be adjusted solely based on arithmetic. >>> >>> Do you know of any platforms where this does not in fact work? Other >>> than sanitizing platforms that go to some lengths to impose the >>> Committee's rules even though the hardware would work fine? >>> >>> If not, then perhaps we can convince the Committee that the mismatch >>> between the current rules and reality is causing real harm, and that >>> it'd be a win for C's users to change the standard to match reality better. >> >> Oliver, please comment on ARM64e if you can, for pointer authentication. Think >> not just of statically-known pointers like vtables, but the general case of >> pointer authentication. > > > I don’t believe ptrauth would really play into this, but MTE does. I think MTE still works because if realloc changes the tag, the pointer changes. The application then has to do the offset-based adjustment, which happens to change the tag only. (I'm not saying this malloc change is a good idea. I don't know of its implications, and if it can be integrated safely with the other parts of the languages.)
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.