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.133.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 1B91C4C8E for ; Tue, 28 Jan 2025 20:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738096543; cv=none; b=pXthXZdHrV+bH1h+fxYs3+RxtNp9rdI6XZie8EL2qaoVcihSyz+QTorJr8jVrhpVmzJ99DocRxHi/WuLFCiCVYTWlAm5lf97MK62kETkhmGKCKkNS5N1HVJd9A+/JVknunBE6RcwcKQyOTDCMO9do60ksgaBDeOH4nq2OXeYFrs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738096543; c=relaxed/simple; bh=7eMXsEDpuaOmgg6LdQPOVc1mtNWq3WTzQL6mExUgq28=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=cHVv7uaHvbgdS2W+AQwZCsORjhadO9EhqtmOJfNYhvXK4qqI2UlcS+0Kf8Et8YDoUjGyW9g0RoBUr+FqWEOKPrnafuNstWacjKFRiWiLy8J2dS2N+uguj5W76x/YaPB6g05bsYWhJbCpQ0GTQi8XFOe0/NVeNLAaKm5Sa+8BqX4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=Q+EN9JCJ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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="Q+EN9JCJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738096540; 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=YBdodvJLDoCXM3cTyYeuOr55XoQt+jNWsXGraZqEodE=; b=Q+EN9JCJvH48X7a6Ku64BiA7YcNX17clUzb/RGz18GmzWrNE7pVTBv/ofpBiai6Fokvk9D v6ezRZwTYm6HNq8gE6LbUFNdokyfPfZ3lMmnfsWwG+oQhfLzRaokCf7dhc7rHuyo4ElM7c G616zDkd/r7v9lkJgHJwNh5fppUtzqk= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-284-aYPaB-NgMxiQwIp66wCmIQ-1; Tue, 28 Jan 2025 15:35:36 -0500 X-MC-Unique: aYPaB-NgMxiQwIp66wCmIQ-1 X-Mimecast-MFC-AGG-ID: aYPaB-NgMxiQwIp66wCmIQ Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CE0A1180034F; Tue, 28 Jan 2025 20:35:33 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.12]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BB8C818008D4; Tue, 28 Jan 2025 20:35:29 +0000 (UTC) From: Florian Weimer To: =?utf-8?Q?Andr=C3=A9?= Almeida Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , Arnd Bergmann , linux-kernel@vger.kernel.org, kernel-dev@igalia.com, Vinicius Peixoto Subject: Re: [PATCH v2 0/4] futex: Drop ROBUST_LIST_LIMIT In-Reply-To: (=?utf-8?Q?=22Andr=C3=A9?= Almeida"'s message of "Tue, 28 Jan 2025 11:28:10 -0300") References: <20250127202608.223864-1-andrealmeid@igalia.com> <875xlzl6lq.fsf@oldenburg.str.redhat.com> Date: Tue, 28 Jan 2025 21:35:26 +0100 Message-ID: <874j1iismp.fsf@oldenburg.str.redhat.com> 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 * Andr=C3=A9 Almeida: > Hi Florian, > > Em 28/01/2025 04:50, Florian Weimer escreveu: >> * Andr=C3=A9 Almeida: >>=20 >>> As requested by Peter at [1], this patchset drops the >>> ROBUST_LIST_LIMIT. This is achieve by simply rewriting the processed >>> list element ->next to point to the head->list address, destroying the >>> linked list to avoid any circular list. >> Doesn't this turn a robust mutex overwrite or a TCB overwrite into a >> write-anything-anywhere primitive? Furthermore, I'm not entirely sure >> if this is entirely backwards-compatible. >>=20 > > The robust list is meant to be a private resource, per-process, and > this patch only rewrites it after the process exits, so I believe that > any changes done in this memory should be safe given that the process > will soon disappear anyway, right? At least in the glibc implementation, we let the kernel handle robust mutex notification on thread exit, and that's observable. Beyond that, process-shared robust mutexes exist, too, and those updates will be observable, too. > Do you think you can point out a scenario that wouldn't be > backwards-compatible? I would like to try to test it. I think it should be okay for the glibc implementation. The robust list is libc-owned (at least in glibc implementation), so it should not matter, but the are other libs out there. >> Could you use the tortoise/hare approach instead? > I believe that you want the approach to be "slow and steady" but I'm > not sure what you have in mind, if you could you please elaborate :) I meant cycle detection using Floyd's algorithm. Thanks, Florian