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 298FCC433F5 for ; Sat, 23 Apr 2022 18:42:10 +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: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=zlrgzFOz5SgviXaG5Je1hHal6ksx+nSdsRb1qyR5ZU4=; b=lhYb0ritXEO+H/ hPKUE/5x3YVGEAPOto4zzm4m8+YnPhfUz1NlkLy6/I9W06BJSVrCMuvmxygL3pHUysaClp0OiQVXh vjKvQAkvtVPHlHSoM93cZ3dv1hBtP9haLhnUBm3eRqc9YAhOI1doOxxoI0gMmmWUHznuLC8qag9fD tQNkJRRK/FlLpqB2G/6uM2ddY5WdgKKPgu8alUW7gmLXtArMLHq269VDJj6xy74K318njwSbiJpM6 ypB0M7ytnxXY1dgDwZVNGMqIgUGwDeGO8RrD1xAFfppxawy6P3DBHukb7E7sNHiAO33NXXgrhDvlQ Vs4rM5W3/1fBWjwNJImQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niKge-004qju-Vr; Sat, 23 Apr 2022 18:40:53 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niKgc-004qjb-A6 for linux-arm-kernel@lists.infradead.org; Sat, 23 Apr 2022 18:40:51 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E9D47B80D19; Sat, 23 Apr 2022 18:40:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66F7DC385A0; Sat, 23 Apr 2022 18:40:44 +0000 (UTC) Date: Sat, 23 Apr 2022 19:40:40 +0100 From: Catalin Marinas To: Linus Torvalds Cc: Andrew Morton , Andreas Gruenbacher , Josef Bacik , Al Viro , Chris Mason , David Sterba , Will Deacon , linux-fsdevel , Linux ARM , linux-btrfs , Linux Kernel Mailing List Subject: Re: [PATCH v4 0/3] Avoid live-lock in btrfs fault-in+uaccess loop Message-ID: References: <20220423100751.1870771-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220423_114050_539384_C12B7019 X-CRM114-Status: GOOD ( 17.22 ) 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 Sat, Apr 23, 2022 at 09:35:42AM -0700, Linus Torvalds wrote: > On Sat, Apr 23, 2022 at 3:07 AM Catalin Marinas wrote: > > > > The series introduces fault_in_subpage_writeable() together with the > > arm64 probing counterpart and the btrfs fix. > > Looks fine to me - and I think it can probably go through the arm64 > tree since you'd be the only one really testing it anyway. I'll queue it via arm64 then. > I assume you checked that btrfs is the only one that uses > fault_in_writeable() in this way? Everybody else updates to the right > byte boundary and retries (or returns immediately)? I couldn't find any other places (by inspection or testing). The buffered file I/O can already make progress in current fault_in_*() + copy_*_user() loops. O_DIRECT either goes via GUP (and memcpy() doesn't fault) or, if the user buffer is not PAGE aligned, it may fall back to buffered I/O. That's why I simplified the series, AFAICT it's only btrfs search_ioctl() with this problem. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel