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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 47CD7C433B4 for ; Wed, 7 Apr 2021 16:44:55 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFDB16108B for ; Wed, 7 Apr 2021 16:44:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFDB16108B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RE5ZA30HH41AhFFcIKIHU5TgG2k68pmEa3Vn/Uga/uk=; b=iNIKatWrS9r0FAS5GZOAzQgDe S/xE2V32+/5kgOqPzn78R5OX9Uy6iHXKzccrEUgAtCfX6fWXp5+G8YaphRkLi9BU3j8pKze4x53M0 gR7G8GNqkVFAxQH8UUKQkXpuJ/0U+LL6sGmTKw8oQh3W3fqRNC62ds37iXeUuFQjd+aXuJb90JCHf Xprxidjl0HN7Z8UgEOAMBAsLoq6Wgyi13wQOyHjEI6dy5Ib4E0c8I2W+XdmWIVuVFKcjEmFRcG4o/ H7hU+IJX5nFBlAvlqV2wSIB0P/L+1EA34Wpge1ihMr9K/EUjJipT0jaPCzzdFJw0jt1/11Npjxq6D 11sIfYZRA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUBIE-005V5a-Ey; Wed, 07 Apr 2021 16:44:38 +0000 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lUBIB-005V5Q-Qu; Wed, 07 Apr 2021 16:44:36 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B5C40300331; Wed, 7 Apr 2021 18:44:34 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9EEA423D3AF86; Wed, 7 Apr 2021 18:44:34 +0200 (CEST) Date: Wed, 7 Apr 2021 18:44:34 +0200 From: Peter Zijlstra To: Christoph =?iso-8859-1?Q?M=FCllner?= Cc: Christoph Hellwig , Guo Ren , linux-riscv , Linux Kernel Mailing List , linux-csky@vger.kernel.org, linux-arch , Guo Ren , Will Deacon , Ingo Molnar , Waiman Long , Arnd Bergmann , Anup Patel Subject: Re: [PATCH v4 3/4] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32 Message-ID: References: <20210407094224.GA3393992@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, Apr 07, 2021 at 05:51:07PM +0200, Peter Zijlstra wrote: > On Wed, Apr 07, 2021 at 04:29:12PM +0200, Christoph M=FCllner wrote: > > Further, it is not the case that RISC-V has no guarantees at all. > > It just does not provide a forward progress guarantee for a > > synchronization implementation, > > that writes in an endless loop to a memory location while trying to > > complete an LL/SC > > loop on the same memory location at the same time. > = > Userspace can DoS the kernel that way, see futex. The longer answer is that this means you cannot share locks (or any atomic really) across a trust boundary, which is of course exactly what futex does. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv