Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ed0fj5yi.fsf@oldenburg.str.redhat.com>
Date: Mon, 03 Feb 2025 18:25:41 +0100
From: Florian Weimer <fweimer@...hat.com>
To: Daniele Personal <d.dario76@...il.com>
Cc: d.dario76@...il.com,  Rich Felker <dalias@...c.org>,
  musl@...ts.openwall.com
Subject: Re: pthread_mutex_t shared between processes with different
 pid namespaces

* Daniele Personal:

> On Sat, 2025-02-01 at 17:03 +0100, Florian Weimer wrote:
>> * Daniele Personal:
>> 
>> > > Is this required for implementing the unlock-if-not-owner error
>> > > code
>> > > on mutex unlock?
>> > 
>> > No, I don't see problems related to EOWNERDEAD.
>> 
>> Sorry, what I meant is that the TID is needed for efficient reporting
>> of
>> usage errors.  It's not imposed by the robust list protocol as such.
>> There could be a PID-namespace-compatible robust mutex type that does
>> not have this problem (but with less error checking).
>> 
>> Thanks,
>> Florian
>> 
>
> Are you saying that there are pthread_mutexes which can be shared
> across processes run on different pid namespaces? If yes I'm definitely
> interested on this. Can you tell me something more?

You would have to add a new mutex type that is a mix of
PTHREAD_MUTEX_NORMAL amd PTHREAD_MUTEX_ROBUST.  Closer to the latter,
but without the ownership checks.

Thanks,
Florian

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.