Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1511340rdb; Wed, 31 Jan 2024 00:15:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZOmHInykXRmFZpnRHDGt+MR4Lmf/LAVVQ4KUsT9HmOetAcsSWlrzS3mwzf1HM3mdikbNi X-Received: by 2002:a05:620a:44c3:b0:785:35e0:5e75 with SMTP id y3-20020a05620a44c300b0078535e05e75mr1095710qkp.41.1706688914567; Wed, 31 Jan 2024 00:15:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706688914; cv=pass; d=google.com; s=arc-20160816; b=M52OXwDOcYGWSAeQSuPSYyd1b5jnL9jtBPM6bKKYozU2kKoUl7d+x8IUmi3QYUKkJq 5mXC3hkD1Gm5b5/9l6AfG2ZMZ6KxfSPKo6S0xiUWVjyEh43pWTL2pEWWjUIfTc/yKYHA YK43sX2ioGvK6mfDLdq3Ve0ek2AVQQfYd9E3YU+1mIGlsjdut/4ZGhc3CGUh93bwvAGM lCTHcP+fXLTzZofx2ofF0vIXypkQssmicOQZFZYGMEXr/HQXHvRVCaIHmWTWlWcUFVIp 9gK9RWrmEV0MpAGzuTUiYm/q9JqIh8PE3Ct9W+MmylUzs7mnTMWMSkiEgAsKYxCv8P6R hWzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jk7WOZDUvIYW2PjF8VD17+BgmLnTpAIrlDYLakGFvFE=; fh=/bz7vzqnbB7uUY4kUDlSjjwNdrc+zjNOecPqvRaBHy4=; b=HGTNCFbcLYlsQLGc2MWgu7tYaDeCnVwpJnwEnSMtgQXNfkZDZS+A3AoON09Uov4tL0 GOtuJlVl9K4dabjoyfHMoOBdcb49l9kcGrJXGaZagWzgtcnQD9sCNBJHXH21gswhz7vx LjIg7PGvd9xkq/4dGCU+z0hS2fvHQBtVffChCCMrA6t6mir60Cqcdi8kfLCtGbgcfZdR RL+YXoeZQmOpFT2uZkTVtl9x2aFvj1/gV7Y8fL/zUP7Gxvq9oR3g3y3idY7O+LIInicT 9slEfoY7G10zgqdAOJXUO3D02xiKAnjn1D0jOlox7R7n5BdfPa+qNO5GiyPSL5nYSo7c 42xA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="cE/36VbY"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-45783-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45783-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWYTxgg7KyNkSqtW0CQYKrhXw0Vv4gSc09s5dHolwfqRWXJElkEctD7dGu/It+uGDQcVgvIXwWXkWq3hel4vo9CekDbYHnp0YYc4ApEGw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k23-20020a05620a0b9700b007815fc2a677si11757396qkh.699.2024.01.31.00.15.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:15:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45783-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="cE/36VbY"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-45783-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45783-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 79D311C26526 for ; Wed, 31 Jan 2024 05:48:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A0163DBAE; Wed, 31 Jan 2024 05:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="cE/36VbY" 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.subspace.kernel.org (Postfix) with ESMTPS id 0A5143E468; Wed, 31 Jan 2024 05:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706680065; cv=none; b=mVL0719VYK4CUpCv4iG2KHTBxCdK2Z6FrhhDbfQIqFIKO9H6PCaFcb/TrlRHhqVT4XDP0fqZrUiSjeMnJ+H1f0QcU31gPRbQlKdi6q+FacXu2XiS41ap0IrPvINcCSjobI3KYkKijtBCCWTBteYbCxLo2aYm4S0O5pf0XgAarb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706680065; c=relaxed/simple; bh=F6moQ6b9hiDMnR0QCy3aTXiISPhYTzA0ruzY3ud/4Do=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jCu8Y5b/ZrvI++veomxsG7f1RvYUdEnb8EnaVJyrdI5QeqiCv53peqAKCDShZbZzjplInKlq+dxxbXJ7tZNeiPvrNVbBICyGCXNCyM+O3T2uUYLrnnrCuxvNfU6xCFVWrxjlc+bgmjhq/4uYVO+lwzZzBDI+OU8Dj4FmFhz/3Tk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=cE/36VbY; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jk7WOZDUvIYW2PjF8VD17+BgmLnTpAIrlDYLakGFvFE=; b=cE/36VbYtZ0pze2of8EvkDAQ/8 D10bqRlYDzXeaaWU+/7Bb5Q0KTCPtFrrsWW94+I3M38KcBfenFc19xlfbFOQantxHu643P/RNXMDH dCX+o6WmoNA2BCwEWS8Zk3cF53kvYnM5decKvTNWzbu68DI7PF/vbY0v3QvOHA7kSoM0tTr11GXUc iiQsM4UTN/su7ZB9pMGLknezdjuNDBqXN9IUHHIiE5LVTFGsOGKuHn8nR4EWCogq4iRiucu/CPjsm fwXc7hDl30TPNyUdweYsrsryGrwaJkLVF/Zy+VNsHxp2sIm5bi0o90Gjw4hkHL0S8DsSS7SR4A+XQ JaUdThsw==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV3Rl-00000001ZKH-26eL; Wed, 31 Jan 2024 05:47:41 +0000 Date: Tue, 30 Jan 2024 21:47:41 -0800 From: Christoph Hellwig To: Matthew Wilcox Cc: Theodore Ts'o , Dave Chinner , syzbot , adilger.kernel@dilger.ca, chandan.babu@oracle.com, jack@suse.com, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: current->journal_info got nested! (was Re: [syzbot] [xfs?] [ext4?] general protection fault in jbd2__journal_start) Message-ID: References: <000000000000e98460060fd59831@google.com> <000000000000d6e06d06102ae80b@google.com> <20240131045822.GA2356784@mit.edu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, Jan 31, 2024 at 05:20:10AM +0000, Matthew Wilcox wrote: > I'd suggest that saving off current->journal_info is risky because > it might cover a real problem where you've taken a pagefault inside > a transaction (eg ext4 faulting while in the middle of a transaction on > the same filesystem that contains the faulting file). Agreed. > Seems to me that we shouldn't be writing to userspace while in the > middle of a transaction. We could even assert that in copy_to_user()? That sounds useful, but also rather expensive.