From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8B60C17460 for ; Tue, 5 Nov 2019 14:28:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B6FF217F5 for ; Tue, 5 Nov 2019 14:28:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="a5jtOfAZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731004AbfKEO2M (ORCPT ); Tue, 5 Nov 2019 09:28:12 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:37046 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727830AbfKEO2M (ORCPT ); Tue, 5 Nov 2019 09:28:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572964091; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HlN265FK/KABiSoVogEIXFyTpEA9h+bE+0OpX/KyINw=; b=a5jtOfAZGwWcEJ6kkNc4LxTzJnIdzgsnsN8P0PKFvbCN0dyXTiczt6UncSpphHz7bYKE+C V405lkm9t+cpiVjpic/dfuJLX3xq+893SWXigp+uGvFmzr4F0juiTw0oJHULGhB+h1/pIU VNFVWEcWygfD5ylFCUYD9XxQF/fWC04= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-10-pRg-AAxWM4y88l7D9tLXQw-1; Tue, 05 Nov 2019 09:28:06 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D39E2107ACC3; Tue, 5 Nov 2019 14:28:04 +0000 (UTC) Received: from oldenburg2.str.redhat.com (dhcp-192-200.str.redhat.com [10.33.192.200]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F1D225D713; Tue, 5 Nov 2019 14:27:49 +0000 (UTC) From: Florian Weimer To: Carlos O'Donell Cc: Thomas Gleixner , Shawn Landden , libc-alpha@sourceware.org, linux-api@vger.kernel.org, LKML , Arnd Bergmann , Deepa Dinamani , Oleg Nesterov , Andrew Morton , Catalin Marinas , Keith Packard , Peter Zijlstra Subject: Re: [RFC v2 PATCH] futex: extend set_robust_list to allow 2 locking ABIs at the same time. References: <20191104002909.25783-1-shawn@git.icu> <87woceslfs.fsf@oldenburg2.str.redhat.com> <87sgn2skm6.fsf@oldenburg2.str.redhat.com> Date: Tue, 05 Nov 2019 15:27:48 +0100 In-Reply-To: (Carlos O'Donell's message of "Tue, 5 Nov 2019 09:10:38 -0500") Message-ID: <87o8xqqty3.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: pRg-AAxWM4y88l7D9tLXQw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Carlos O'Donell: > On 11/5/19 6:56 AM, Thomas Gleixner wrote: >> On Tue, 5 Nov 2019, Florian Weimer wrote: >>> * Thomas Gleixner: >>>> On Tue, 5 Nov 2019, Florian Weimer wrote: >>>>> * Shawn Landden: >>>>>> If this new ABI is used, then bit 1 of the *next pointer of the >>>>>> user-space robust_list indicates that the futex_offset2 value should >>>>>> be used in place of the existing futex_offset. >>>>> >>>>> The futex interface currently has some races which can only be fixed = by >>>>> API changes. I'm concerned that we sacrifice the last bit for some >>>>> rather obscure feature. What if we need that bit for fixing the >>>>> correctness issues? >>>> >>>> That current approach is going nowhere and if we change the ABI ever t= hen >>>> this needs to happen with all *libc folks involved and agreeing. >>>> >>>> Out of curiosity, what's the race issue vs. robust list which you are >>>> trying to solve? >>> >>> Sadly I'm not trying to solve them. Here's one of the issues: >>> >>> >>=20 >> That one seems more a life time problem, i.e. the mutex is destroyed, >> memory freed and map address reused while another thread was not yet out= of >> the mutex_unlock() call. Nasty. > > It is difficult to fix. > > The other issue is this: > > "Robust mutexes do not take ROBUST_LIST_LIMIT into account" > https://sourceware.org/bugzilla/show_bug.cgi?id=3D19089 That's just a missing check in our implementation and something that few applications will encounter, if any. There is this one here: It contains a kernel patch. I thought that there were more issues in the current implementation, but I can't a record of them. 8-( Thanks, Florian