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 8B7D2C5DF63 for ; Wed, 6 Nov 2019 14:04:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57D8920663 for ; Wed, 6 Nov 2019 14:04:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KmC6l7I7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727780AbfKFOEm (ORCPT ); Wed, 6 Nov 2019 09:04:42 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:49096 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726926AbfKFOEm (ORCPT ); Wed, 6 Nov 2019 09:04:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573049081; 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=bjDw7VtURttV92AniQsvr1aCutSqy+spKGbff6QZDRU=; b=KmC6l7I7mRzFWAOGXISq6O+F+CeMtzuxn8ZhP2rBrSRBWqlL8ikXIIjiMbwn9MdxBxofh5 8Sj97ssa5ROG/Ug3U1OrQzeNHMGMyhddItAz5DTFckt6WM7h4DqkE3diW8JRRJ/Dqm9O0+ smD+gANR8EwnkOINKB0yKcWz30HPb6A= 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-39-SlrdrPz0OqCEPyD-rxFU8w-1; Wed, 06 Nov 2019 09:04:37 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9A1891005500; Wed, 6 Nov 2019 14:04:35 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-224.ams2.redhat.com [10.36.116.224]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F539608B8; Wed, 6 Nov 2019 14:04:19 +0000 (UTC) From: Florian Weimer To: Zack Weinberg Cc: Thomas Gleixner , "Carlos O'Donell" , Shawn Landden , GNU C Library , 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: Wed, 06 Nov 2019 15:04:17 +0100 In-Reply-To: (Zack Weinberg's message of "Wed, 6 Nov 2019 09:00:51 -0500") Message-ID: <87a799nlsu.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.13 X-MC-Unique: SlrdrPz0OqCEPyD-rxFU8w-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 * Zack Weinberg: > On Tue, Nov 5, 2019 at 9:28 AM Thomas Gleixner wrote= : >> >> 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. > > Why can't the kernel use the standard tortoise-and-hare algorithm for > detecting circular linked lists here? It's not guaranteed to terminate if the list is in shared memory. Thanks, Florian