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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D3E1C433F5 for ; Wed, 24 Nov 2021 21:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: 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=SrhbAvR3sstIKGTVmbvRLioROiChraaLEDm8Pv3HsQs=; b=M2OuWXCDz1E6Ub 0Q82E4golVysckc97K7HGmGZwPCJh0XP+vtfQpeJdNC10QYNJ6glYOnKrlwLzcOI+wiUIojrFVc1v +X0nFJztLcunZOvW3Deb4lYoSKGIBCH1h/1Va441mC4MA9rhnG7P+iYfuhqUBiDZtn+eZzeuaxYcs R4/WL1vNdAtC3CQWWyYPTwsx0Vk9hWFuslXj2rXE79mWdZjTglicBk/wIaYU3L4aE4RXL4GCSj53d h1lNVL4hmK62VUKoHqRRSfzmDHL4qXjdOjs2pL8K+HrIdLBtn6f2y1ed75Q8QIogVWrywaUv8T5GX JtF7wQC7sSlgEKo5H97g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpzvz-005uDI-QQ; Wed, 24 Nov 2021 21:36:07 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpzvw-005uC5-Oo for linux-arm-kernel@lists.infradead.org; Wed, 24 Nov 2021 21:36:05 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7373461038; Wed, 24 Nov 2021 21:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1637789762; bh=1qxWEC18le/A8a+N+COfBev7NdB1IPDGt4hnJIvrNwg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P8rTHiQ7DBWjiMEGFw33451N0sRxqPFqWieczHCkX39OnJt1bfR04SQCx6RSFGpf6 iZPDUWsPtC46QiCzMnjhqucmerI0qtIJFG5RF0r6FSi2rKwoWEz25ZRPikr/diwjTX bLlVbbqKsSNKUYFowE542Io7+4i1PFNHCZ+sZNU8= Date: Wed, 24 Nov 2021 13:36:00 -0800 From: Andrew Morton To: Catalin Marinas Cc: Linus Torvalds , Josef Bacik , David Sterba , Andreas Gruenbacher , Al Viro , Will Deacon , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-btrfs@vger.kernel.org Subject: Re: [PATCH 0/3] Avoid live-lock in fault-in+uaccess loops with sub-page faults Message-Id: <20211124133600.94f0b9a6c611ee663c9a8d6d@linux-foundation.org> In-Reply-To: <20211124192024.2408218-1-catalin.marinas@arm.com> References: <20211124192024.2408218-1-catalin.marinas@arm.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_133604_865952_81961F9D X-CRM114-Status: GOOD ( 14.86 ) X-BeenThere: linux-arm-kernel@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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 24 Nov 2021 19:20:21 +0000 Catalin Marinas wrote: > Hi, > > There are a few places in the filesystem layer where a uaccess is > performed in a loop with page faults disabled, together with a > fault_in_*() call to pre-fault the pages. On architectures like arm64 > with MTE (memory tagging extensions) or SPARC ADI, even if the > fault_in_*() succeeded, the uaccess can still fault indefinitely. > > In general this is not an issue since such code restarts the > fault_in_*() from where the uaccess failed, therefore guaranteeing > forward progress. The btrfs search_ioctl(), however, rewinds the > fault_in_*() position and it can live-lock. This was reported by Al > here: Btrfs livelock on some-of-arm sounds fairly serious. Should we backport this? If so, a48b73eca4ce ("btrfs: fix potential deadlock in the search ioctl") appears to be a suitable Fixes: target? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel