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 4F71C32936C for ; Tue, 17 Mar 2026 10:37:52 +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=1773743874; cv=none; b=cnbLRD8wD48u0B+ogzDsshBe4NQpE/kHaJSN7wPuiFs7MMA7sg7/esQAaT/scJ+T1YzSItrnaZ6JdlgIaUuZNeSRvkq30rRyCI5f5LMQVF5qMHK/Psm0ruK7HexaHPgNkGAGa1Cu9sDvqPz8mCH/E4l0OtDK0syYW/1bVyZpq/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773743874; c=relaxed/simple; bh=nuqYJXAGWn0CI6LRjFC5UlcZX26hjdUcd6M8g+cppa4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JwdhHWV0aKHygoK3jLOvTNk/iT8m+6bbAMlTmABzVIyburcog28PvhVbZFjKW9MfOroE/HLOdBem0hd4eKxx0eIcq0YCNqI9pWnQTk+ITBNHwsdwxjafXRl8RD03GkEbY0O6pBaKZgSrupFGuXwcwrB1Yl+e2Q9J0q7sD9ugNUE= 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=Ie1I1WfF; 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="Ie1I1WfF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773743872; 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=aiOoGpgIjWYsIL7BKHFD/zNsy7G4Gy3R1YhGRSpbShQ=; b=Ie1I1WfFt/c4Rdpzuy5Re6l0XNSpVBOJh10DfF4vDDgEmQMMVMICgiSxocwu50GgtYVeLZ hKlS5Ie67450iG8OZVfg5wSnM5luvBUuk6dJpR9HLGDB/HsFBHh4WOWlu4ecD6bjLAC6oj 2FjNrHBJnC8bN21i4dzSTeZHD9/+P5Y= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-61-PCZLE5gqOwy0Fm3u4q79VA-1; Tue, 17 Mar 2026 06:37:48 -0400 X-MC-Unique: PCZLE5gqOwy0Fm3u4q79VA-1 X-Mimecast-MFC-AGG-ID: PCZLE5gqOwy0Fm3u4q79VA_1773743866 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A8B79195609F; Tue, 17 Mar 2026 10:37:44 +0000 (UTC) Received: from fweimer-oldenburg.csb.redhat.com (unknown [10.45.224.103]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D385B1955F19; Tue, 17 Mar 2026 10:37:37 +0000 (UTC) From: Florian Weimer To: Thomas Gleixner Cc: LKML , Mathieu Desnoyers , =?utf-8?Q?Andr=C3=A9?= Almeida , Sebastian Andrzej Siewior , Carlos O'Donell , Peter Zijlstra , Rich Felker , Torvald Riegel , Darren Hart , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" Subject: Re: [patch 8/8] x86/vdso: Implement __vdso_futex_robust_try_unlock() In-Reply-To: <87ecliokzz.ffs@tglx> (Thomas Gleixner's message of "Tue, 17 Mar 2026 10:36:48 +0100") References: <20260316162316.356674433@kernel.org> <20260316164951.484640267@kernel.org> <87ecliokzz.ffs@tglx> Date: Tue, 17 Mar 2026 11:37:35 +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.17 * Thomas Gleixner: > On Tue, Mar 17 2026 at 09:28, Florian Weimer wrote: >> * Thomas Gleixner: >> >>> Arguably this could be avoided by providing separate functions and making >>> the IP range for the quick check in the exit to user path cover the whole >>> text section which contains the two functions. But that's not a win at all >>> because: >>> >>> 1) User space needs to handle the two variants instead of just >>> relying on a bit which can be saved in the mutex at >>> initialization time. >> >> I'm pretty sure that on the user-space side, we wouldn't have >> cross-word-size operations (e.g., 64-bit code working on both 64-bit and >> 32-bit robust mutexes). Certainly not within libcs. The other point >> about complexity is of course still valid. > > Right, I know that no libc implementation supports such an insanity, but > the kernel unfortunately allows to do so and it's used in the wild :( > > So we have to deal with it somehow and the size modifier was the most > straight forward solution I could come up with. I'm all ears if someone > has a better idea. Maybe a separate futex op? And the vDSO would have the futex call, mangle uaddr2 as required for the shared code section that handles both ops? As far as I can tell at this point, the current proposal should work. We'd probably start with using the syscall-based unlock. Thanks, Florian