This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/2] nptl: Update struct pthread_unwind_buf
On Fri, Feb 9, 2018 at 4:11 AM, Florian Weimer <fw@deneb.enyo.de> wrote:
> * H. J. Lu:
>
>>> My proposal is still rather hackish, but so is the existing code (the
>>
>> A pointer to a buffer in user program is passed to libpthread.
>> There is a jmp buf in the buffer followed by other fields. Since
>> the size of jmp buf is increased in glibc 2.28, we need to know the
>> offset of other fields. Otherwise libpthread may write beyond the
>> buffer in user program. I don't see how symbol versioning can help
>> us here since the INTERNAL libpthread functions don't know the
>> layout of __pthread_unwind_buf_t of USER programs.
>
> I suggest *not* to increase the size of the jump buffer.
Where do we save shadow stack pointer?
> CET markup will not be correct for static libraries compiled against
> 2.27 or earlier with a CET-enabled toolchain, so this is the only
> completely safe approach.
I don't believe so. As long as there is a single input .o file which
isn't marked
with CET, the output static binary won't be marked with CET. If what
you said is true, please file a glibc bug report.
--
H.J.