From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Weimer Subject: Re: [RFC v2 PATCH] futex: extend set_robust_list to allow 2 locking ABIs at the same time. Date: Wed, 06 Nov 2019 15:04:17 +0100 Message-ID: <87a799nlsu.fsf@oldenburg2.str.redhat.com> References: <20191104002909.25783-1-shawn@git.icu> <87woceslfs.fsf@oldenburg2.str.redhat.com> <87sgn2skm6.fsf@oldenburg2.str.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: (Zack Weinberg's message of "Wed, 6 Nov 2019 09:00:51 -0500") Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-api@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