Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp848355ybx; Tue, 5 Nov 2019 06:32:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwlOjQBaBUNX5nDXi2sH/gqUxiYg3TSPCn8qsl75tIsLjyeCxOneag3+7KMC8gI4QfXgkHj X-Received: by 2002:a05:6402:213:: with SMTP id t19mr36143934edv.7.1572964346783; Tue, 05 Nov 2019 06:32:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572964346; cv=none; d=google.com; s=arc-20160816; b=rfRjdsAyM7ZgszHvI1f0iy4+Bvb6WKzMGFgD/puF4YaO4FgN20CReSWrBmvU7STdL7 wllwrUsYq7JjlE1hkipOcJvDaOaKm2cmjx/H/1lIwBFw3SekyaWd6sxIcSkf1vhG1nPC ncRxqX6SJlszMySZm6NJZJBJIZHLlnwUjZk0s27UIZJWufhEjr2NTzciOv6gvlWyhlIs bXSWtHsL2nJcIgT0/ksTYDKs5e2Y3tjPSKoyZANJKJdq/wgcNIRShxQ0/fkUiK2u95EQ LeVLndi5mdYth80n8cRXKd+/QCKxnspirbAqq0418UwiZGeqY9GJWYkCL0GIcypTZ+kr XoVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=HlN265FK/KABiSoVogEIXFyTpEA9h+bE+0OpX/KyINw=; b=ErzA57zKDfXC50ultZLnD8vwbG12r0ZtJPihe2CzoQNqVEvj1nmgaHDkdQ/UQvgGcl 8YptLoSPTg7bLXDf7FKr8FmVg/yc8LNJ3ceOBvGFe+JcghZW8nctaNYA3/L0Vpp6GN+X YKqBKRWGrTUzkYHDpTURBnL0thDbVL1D6Zy4YT/2ylAiUahwR2ynQ8w/SCBLWmiVRaex BBnK453gwGk1pWTACPS/WpidBZgKQj3p3hyl07uap6cZoZjhweNB39K6lidsRQkGourP OF1cyCpsdXYlZJjkdyeBX6NpIum7qWB/oUcMxabH+1L5zK/fZxFq/c9fO0Xfhk/H48kQ AiLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a5jtOfAZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y14si9475863edu.250.2019.11.05.06.32.03; Tue, 05 Nov 2019 06:32:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a5jtOfAZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389392AbfKEO2M (ORCPT + 99 others); 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