Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp854308ybx; Tue, 5 Nov 2019 06:37:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxMkekiAXJFG/R41oZfJgEd1FWUTMeJ3gVNgmGhTCA4zoy6Tn+ANLpAX13lim10koxPZ2ei X-Received: by 2002:a17:906:1cd8:: with SMTP id i24mr29632250ejh.149.1572964660622; Tue, 05 Nov 2019 06:37:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572964660; cv=none; d=google.com; s=arc-20160816; b=EhU7aM/UaG/IEbTOctOy5jcUUVSnazQYu5ZIBJTGHBrxt4q69d9hscNCYZpjI8jRtz 49QzhIABB0um6Bhb3lV5iarCH3KMdLm9y1hXBztuO8owIj9NCE8exaGCuTOH57fGZKDa 6Qawg2MPpGw1BDox7uLv8RJws4O1fhRApTVC/PqdtZc8E3cUvqSqhjsBFwCMHUQ1vt2V LyYjpRwKXwRdPfUwwdE2bAhsXx83jbhSR+IROA9IbSzecBCOYbR8ImCsBTMZ0h+cDlGy XEmTI6UDeNK31iR0SS/wMYbrE19HkqaYNlqUXUD3SdeP7D8LfqAyexRBjcilFf9nUsYd 2MiA== 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=kf4mHA+y3oJq+QHstu4rI1MJktm5ZOdROwo+HsHEzdY=; b=ufn9VD9P1MrdZaZWWYqz1m3gDbtxb/SboWAN944OjSwnVKZ8U10LeQ2za8b5s88Xyi 7rZMARy5d0hqMwxtIxmwNBfoDat6xcyJ8fTNPW/JUeVsjpMCvbRQ2kB/pHuaULT7y9yk m17vzdtJvtzvDC7c7CnCwmuynYADqz4ha3wvu7HDUakBN6hGfLbBNj1dbkSoWB+UsNG2 H/Tbc17S/O5YgT/sQPt/nXjqcynj3ITtyHIhDiVRIYurxpJv+8w2U5r9VT/nHR/0jvC4 7QjvALcHKyvuGQoNHQWZyOdEJZko56MUZfvp7B+ULPTlFPrJzyC7R7MT8pB7zTNOWkUO lJsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=emRiPf5k; 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 f45si10130244ede.381.2019.11.05.06.37.17; Tue, 05 Nov 2019 06:37:40 -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=emRiPf5k; 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 S2389688AbfKEOdz (ORCPT + 99 others); Tue, 5 Nov 2019 09:33:55 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:26279 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389563AbfKEOdy (ORCPT ); Tue, 5 Nov 2019 09:33:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572964433; 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=kf4mHA+y3oJq+QHstu4rI1MJktm5ZOdROwo+HsHEzdY=; b=emRiPf5kTBeeur6VT3H2tvxi4OaISWkGpvbbchKUJdu5aDVP7jsPqYCMRw1UnTB7YQAtuq dpC5gvNtHGW9RvBakvHeb6OS3gC0+BW3kFCso77rGhxtnMqgK0Ixbs4NzOaDazx8QsPMum pPVSEIpqFiN2+S8oCecJvS0NoSueIdg= 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-33-qAiX2K9vNrGbjATq5FX2UA-1; Tue, 05 Nov 2019 09:33:52 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 138311800D4A; Tue, 5 Nov 2019 14:33:48 +0000 (UTC) Received: from oldenburg2.str.redhat.com (dhcp-192-230.str.redhat.com [10.33.192.230]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23AAF600C6; Tue, 5 Nov 2019 14:33:40 +0000 (UTC) From: Florian Weimer To: Thomas Gleixner Cc: Carlos O'Donell , 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:33:38 +0100 In-Reply-To: (Thomas Gleixner's message of "Tue, 5 Nov 2019 15:27:54 +0100 (CET)") Message-ID: <87k18eqtod.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.11 X-MC-Unique: qAiX2K9vNrGbjATq5FX2UA-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 * Thomas Gleixner: > On Tue, 5 Nov 2019, Carlos O'Donell wrote: >> On 11/5/19 6:56 AM, Thomas Gleixner wrote: >> The other issue is this: >>=20 >> "Robust mutexes do not take ROBUST_LIST_LIMIT into account" >> https://sourceware.org/bugzilla/show_bug.cgi?id=3D19089 > > "The kernel limits the length of the robust mutex list to 2048 entries. > This constant does not seem to be exported to user space." > > FWIW, the constant is defined in the UAPI futex header. > > The main concern here is not the actual number of futexes held by a task. > > The real issue is that the robust list could be circular by incident or > malice and there is no way for the kernel to figure that out. That would > prevent the task from exiting and make it iterate over the list until > doomsday, i.e. a nice unpriviledged DoS. > > So I fear the kernel cannot really help with this one. I'm actually fine with treating ROBUST_LIST_LIMIT as an ABI constant. It's just not clear to me if the constant has this status today. I suspect it was just split from the implementation headers at one point. Thanks, Florian