Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 14 Feb 2019 19:20:02 -0500
From: Rich Felker <>
Subject: Re: Draft outline of thread-list design

On Tue, Feb 12, 2019 at 01:26:25PM -0500, Rich Felker wrote:
> Here's a draft of the thread-list design, proposed previously as a
> better way to do dynamic TLS installation, and now as a solution to
> the problem of __synccall's use of /proc/self/task being (apparently
> hopelessly) broken:
> Goal of simplicity and correctness, not micro-optimizing.
> List lock is fully AS-safe. Taking lock requires signals be blocked.

To elaborate on this: application signals must be blocked before the
lock is taken, but implementation signals (particularly the synccall
signal) must not be blocked. Otherwise there is a deadlock: it's
possible that thread A is waiting for the thread list lock, and thread
B holds the thread list lock and is waiting for thread A to respond to
a synccall signal before it can make forward progress.

If we want to block *all* signals, which is needed at detached thread
exit to prevent delivery in the absence of a stack, they must be
blocked after obtaining the thread list lock.


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.