Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1188965pxm; Wed, 23 Feb 2022 20:42:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLIeuMnFVsEY2YDUUH2M2kceHI6lLDlvdNet+O7Lh+T82LK9foYZMkwpR7P9XP713Ox+RW X-Received: by 2002:a17:906:2bc1:b0:6cf:d009:7f6b with SMTP id n1-20020a1709062bc100b006cfd0097f6bmr782401ejg.17.1645677759522; Wed, 23 Feb 2022 20:42:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645677759; cv=none; d=google.com; s=arc-20160816; b=JE4j0i4bCU/ljIRHiURLZd0L1WpViAyFUN/NoFfppVESB4MlZH6p1HzbC9ngFBrnJw zBF2QHCPpLwIQAvPKqTu4Eq+1XrDGD54oFS46nn6vAWQBLSiJBQgcHGE0sRJcihRZbkq 65vTrRTzz+FylTqRvSzWMQjBkA9/YHDRNV3OFf74NPLYbN5/64SdYIZQFSDnyZg/v/H2 nRyrJrs7C6ft2XQVN5thJCQviQAR7ImhxHp54ZDPdIdMvPwZEfQFcqWUR2bEFrvChUrS nx4nf5tRm5LSyVj4pxlz3gx1CFB3W0XVdwaoSn8SWMHBm/1WAC9KwT02cIbNV3XUtxEj 7+Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=9qSoa5O8frfLb+pmIu2CxTmrUc1or+c2eh6ry0RtQ2A=; b=tNsHckrspXhuSacBeLVzIbgFuS3SSXR94Bca+NOEWI/0xbdgJc34BMgpqAxpYWtY/i ird6Y3obZDF2KHv1dossJ+xAElf8fIhI+KguOq7QYk53QTGu9SBGTfYAtl/h5nkBZJrw k8uKnr0ltm+CQbAe86KxmeZczL1NBHct72358BucPiI+H/oNJ9Jn0B+v0xGmv6p4tKp4 tRWmOcFWzAeZ2QjOdaxD5pKtPJ2Cr8ksihy31d58rRJxtGiYs+ucvZHIFYNkfN421eB/ gqa5WCm9oZ415Nnzd5pX7uwfR3f3fYnazfKoI6GIFUaR081EN+itS3nPp3UjAZWJCG9I o8Uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16si906131edv.4.2022.02.23.20.42.04; Wed, 23 Feb 2022 20:42:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229785AbiBXDvF (ORCPT + 99 others); Wed, 23 Feb 2022 22:51:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbiBXDvF (ORCPT ); Wed, 23 Feb 2022 22:51:05 -0500 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F38720D82F; Wed, 23 Feb 2022 19:50:35 -0800 (PST) Received: from cwcc.thunk.org (pool-108-7-220-252.bstnma.fios.verizon.net [108.7.220.252]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 21O3o9DG002766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Feb 2022 22:50:10 -0500 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 2BFEF15C0036; Wed, 23 Feb 2022 22:50:09 -0500 (EST) Date: Wed, 23 Feb 2022 22:50:09 -0500 From: "Theodore Ts'o" To: Dave Chinner Cc: Greg Kroah-Hartman , John Hubbard , Lee Jones , linux-ext4@vger.kernel.org, Christoph Hellwig , Dave Chinner , Goldwyn Rodrigues , "Darrick J . Wong" , Bob Peterson , Damien Le Moal , Andreas Gruenbacher , Ritesh Harjani , Johannes Thumshirn , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [REPORT] kernel BUG at fs/ext4/inode.c:2620 - page_buffers() Message-ID: References: <82d0f4e4-c911-a245-4701-4712453592d9@nvidia.com> <20220224014842.GM59715@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220224014842.GM59715@dread.disaster.area> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Feb 24, 2022 at 12:48:42PM +1100, Dave Chinner wrote: > > Fair enough; on the other hand, we could also view this as making ext4 > > more robust against buggy code in other subsystems, and while other > > file systems may be losing user data if they are actually trying to do > > remote memory access to file-backed memory, apparently other file > > systems aren't noticing and so they're not crashing. > > Oh, we've noticed them, no question about that. We've got bug > reports going back years for systems being crashed, triggering BUGs > and/or corrupting data on both XFS and ext4 filesystems due to users > trying to run RDMA applications with file backed pages. Is this issue causing XFS to crash? I didn't know that. I tried the Syzbot reproducer with XFS mounted, and it didn't trigger any crashes. I'm sure data was getting corrupted, but I figured I should bring ext4 to the XFS level of "at least we're not reliably killing the kernel". On ext4, an unprivileged process can use process_vm_writev(2) to crash the system. I don't know how quickly we can get a fix into mm/gup.c, but if some other kernel path tries calling set_page_dirty() on a file-backed page without first asking permission from the file system, it seems to be nice if the file system doesn't BUG() --- as near as I can tell, xfs isn't crashing in this case, but ext4 is. - Ted