Re: [PATCH v6 07/13] ARC: Linux Syscall Interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/29/20 9:49 AM, Adhemerval Zanella via Libc-alpha wrote:
>> +	; ----- child starts here ---------
>> +
>> +	; Setup TP register (only recent kernels v4.19+ do that)
>> +	and.f	0, r12, CLONE_SETTLS
>> +	mov.nz	r25, r9
> Do you still need to set it since the minimum supported kernel
> for ARC is 5.1 ?

Right.

> It should be safe for internal glibc usage, since for both pthread
> and posix_spawn it blocks all signals including SIGCANCEL and SIGXID.
> However this is still small race window if this is called directly 
> with pthread cancellation or g*uid in multithread.

I'm not sure what you mean above. Do you mean not doing this in glibc and even if
kernel support didn't exist should be safe internally ?

fwiw as mentioned above kernel sets up TP for clone (SETTLS). I detested doing
that for a long time, give ABI implications but ended up doing it anyways due to
an actual race hit when running uClibc tst-kill6 [1]

[1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-October/004480.html
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-snps-arc



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux