From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC18B299A94 for ; Thu, 12 Mar 2026 08:50:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773305412; cv=none; b=dGFipclpfEDCWba/E7WK/Wca3kt1K+YV/kNhd7BA4Yy8X2xPRSnkSFjECnZanlyNIF8YiNfowrgIzmcwAqMcSUcAuUfLN999GIzdxLlKKp6XSQrjwU9XUZhdAJI1o3RTCr/HzyYferBBLVpJEgRpREk7jr00CvrpUtmuM60/sAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773305412; c=relaxed/simple; bh=bi5Eb63AhMMsqrbWg8Yg4jYWw5GXZOghmM141RPFl64=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=RsjHawiyuPE2PJqGmhuIDE1Mzkz3H2diHeJCbHmqVgdy5m9nDxIRQarm4EIpiGGPiVwyM5nebt1KeITXrHjSR/O0U1hTQ8vBkGl/ssidSJ0z95ZfNjMoPYbQFDOlDeNtD1qr7TqxxxlW7sUzUkFq8L+dPesboUnAHG0PiXhXemY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Q9Xqsn2P; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q9Xqsn2P" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773305409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TBn7uEIEkQAKUPdatx5WSJAeGGS2YtVDPykE75tsN5Y=; b=Q9Xqsn2PsYHIizCZuDF0KDF0I3Dc0sDy2kG0xF3fxtbJ8k8CKP8x3A5oNCfWapnSP9fVkL DRUyKp4ujT8HHZ1B3920mh1YjjCt7eBR3SNFGmVmQqFoJv78SID9PABGBFHecyUb53f6qe wwBVCu1mF+LB3KlfWDD+vlgP/H1I5JI= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-617-5dYG-4osOf6yyoZFEiBhWQ-1; Thu, 12 Mar 2026 04:50:06 -0400 X-MC-Unique: 5dYG-4osOf6yyoZFEiBhWQ-1 X-Mimecast-MFC-AGG-ID: 5dYG-4osOf6yyoZFEiBhWQ_1773305404 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 62E471800281; Thu, 12 Mar 2026 08:50:03 +0000 (UTC) Received: from fweimer-oldenburg.csb.redhat.com (unknown [10.2.16.175]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C102D19560B7; Thu, 12 Mar 2026 08:49:57 +0000 (UTC) From: Florian Weimer To: Mathieu Desnoyers Cc: =?utf-8?Q?Andr=C3=A9?= Almeida , linux-kernel@vger.kernel.org, Carlos O'Donell , Sebastian Andrzej Siewior , Peter Zijlstra , Rich Felker , Torvald Riegel , Darren Hart , Thomas Gleixner , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" Subject: Re: [RFC PATCH] futex: Introduce __vdso_robust_futex_unlock In-Reply-To: <20260311185409.1988269-1-mathieu.desnoyers@efficios.com> (Mathieu Desnoyers's message of "Wed, 11 Mar 2026 14:54:09 -0400") References: <20260311185409.1988269-1-mathieu.desnoyers@efficios.com> Date: Thu, 12 Mar 2026 09:49:55 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 * Mathieu Desnoyers: > + * This vDSO unlocks the robust futex by exchanging the content of > + * *uaddr with 0 with a store-release semantic. If the futex has > + * waiters, it sets bit 1 of *op_pending_addr, else it clears > + * *op_pending_addr. Those operations are within a code region > + * known by the kernel, making them safe with respect to asynchronous > + * program termination either from thread context or from a nested > + * signal handler. > + * > + * Expected use of this vDSO: > + * > + * if ((__vdso_robust_futex_unlock((u32 *) &mutex->__data.__lock, &pd->robust_head.list_op_pending) > + * & FUTEX_WAITERS) != 0) > + * futex_wake((u32 *) &mutex->__data.__lock, 1, private); > + * WRITE_ONCE(pd->robust_head.list_op_pending, 0); The comment could perhaps say that pd->robust_head is the thread-specific robust list that has been registered with set_robust_list. Thanks, Florian