From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 B07AD3672BA; Tue, 12 May 2026 07:23:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778570646; cv=none; b=bh7nBjgF6ruh71giOtEqSEUnh1JJCh/ICGzcg9AjZmc0c4wBtAVPivMCGRSxxL/Ebd7x3YAaOcta9Lo+Bh6MZjzrMPcEJerR3bPrrWF230EMfFM/Ta/wzhkkWPQdY6ss7QFaWc14VnyaEcV27118SuYLSrESAh4HrIAsuMV6Uec= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778570646; c=relaxed/simple; bh=P88LEQ5YyKigQBzVBJmMNDmRI4fEf/bJfH/Kh3BBBe8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M8l7LIHzrbiU/XRXgpuKD7Ri2k0hMdJSUHaYMvycNKUjn+kvnZ5z2kC/D1PFHEmkBFEOK807xSszOgC8ET+DUV7ordbYY9Qk5zUP6sGTvzVk5bp155cr40ysPD5lteiKYCkMc8Cob0qBYEbgmnJcMMBpIidjW9tg3AzBAoBryvM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id E305568BFE; Tue, 12 May 2026 09:23:47 +0200 (CEST) Date: Tue, 12 May 2026 09:23:47 +0200 From: Christoph Hellwig To: Damien Le Moal Cc: Christoph Hellwig , Andrew Morton , Chris Li , Kairui Song , Christian Brauner , "Darrick J . Wong" , Jens Axboe , David Sterba , Theodore Ts'o , Jaegeuk Kim , Chao Yu , Trond Myklebust , Anna Schumaker , Namjae Jeon , Hyunchul Lee , Steve French , Paulo Alcantara , Carlos Maiolino , Naohiro Aota , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org Subject: Re: [PATCH 07/12] swap,block: limit swap file size to device size Message-ID: <20260512072347.GA32756@lst.de> References: <20260512053625.2950900-1-hch@lst.de> <20260512053625.2950900-8-hch@lst.de> <217f91d9-4d5f-47a6-ad20-0404968b8e08@kernel.org> Precedence: bulk X-Mailing-List: linux-doc@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: <217f91d9-4d5f-47a6-ad20-0404968b8e08@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, May 12, 2026 at 04:21:47PM +0900, Damien Le Moal wrote: > On 5/12/26 14:35, Christoph Hellwig wrote: > > Don't blindly pass the value from the swap header to swap_add_extent, > > but instead the device size rounded down to page granularity. This > > activated the sanity checking in the core code that catches a too large > > value in the swap header. > > > > Signed-off-by: Christoph Hellwig > > Looks OK to me, though this maybe could be folded in the previous patch ? I prefer to keep behavior changes as isolated as possible.