This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 04/21] nptl: x86_64: Fix Race conditions in pthread cancellation (BZ#12683)


On 26 Feb 2018, Adhemerval Zanella wrote:
> This patches adds the x86_64 modification required for the BZ#12683.
> It basically provide the required ucontext_get_pc symbol and remove
> the arch-specific libc-cancellation implementations.

These changes all look fine to me.

>   lock;orl $4, %fs:776
>
> Where with patch changes it now compiles to:
>
>   mov %fs:16,%rax
>   lock;orl $4, 776(%rax)

That might actually be faster on some microarchitectures due to not
having multiple unusual prefixes on one instruction.  I wouldn't worry
about it.

> In fact all x86_64 THREAD_ATOMIC_* macros
> do not respect the input descr and possible will fail when used with
> a 'descr' difference than THREAD_SELF.

Maybe we should correct or remove all of them, then?  They sound like
they're bugs waiting to happen.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]