From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.175 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796260738; b=IZk3oEzk5duynDq5kaUOHc+IlV71j1TLS+VSynIdIg6zCDA2gyk//XtMwVsw52W9Wrqm slhTWjErsUQQsTWGRHW8u1dDbPPh7LCIsViB3FqJd1mSpAR8KNEerDLJ2tgOnysHkxDPp YRDMnnFIivW0iKy30ST+i/tTAYmb8yyloC2x+Pdv/XxStmW5TcK4Xa50kz006VR37aTMs /OKbQfe8yv80xrBTAIVUU+RZdPGc9u20kY5NabnNBGVsChH3j5ZwNRE8UaN978a2JkLH+ qlp//gl6FhDESSLYeQEr1Q+rNDXsY+hqP2pD4uYfhY5OH+lli5xc2fcMyEn6ivuHSrg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796260738; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=6uQlCZg3DytyUOX639zlc5+5OBwYw9RseSTf4UQFJf0=; b=Ko9Ke8Amfn70ERk5f7rPYocCfi7N0E9GGUw49gXLRm3pgu/2WphfCurmW+WWzPj/8KRQ M8FJgPOkpyKbKTntJwDtSOqI/u8RW6vqj8vG6u5yK9sGjQUfRQZ16CJVG2QD6WIuEYiK3 31FWg8PiaSN7/mTkibQxHOK+ABjfYZcEu7SWmKnfarvQQtl9sLP8rY31uQJht0slboNrl xGHIkTDnr7nSIBB/NVjiycIZ9EWHzdDTF04PTFFVS7fJlaBp+mnxEjWbG0MSCeBfjaayq 0CXCFtt4Xx2VcUie1QTtWP8Sfhwd43J6FgIpCyOnAtjSbBR1aEGnD8VKp+BlsbOrDlQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ovIF99ma; arc=none smtp.remote-ip=74.125.82.175 Received: from mail-dy1-f175.google.com (mail-dy1-f175.google.com [74.125.82.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0F86606A32F for ; Thu, 3 Dec 2026 01:18:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F0F86606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ovIF99ma Received: by mail-dy1-f175.google.com with SMTP id 5a478bee46e88-38699cf08dfso19237214eec.1 for ; Wed, 02 Dec 2026 17:18:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796260737; x=1796865537; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=6uQlCZg3DytyUOX639zlc5+5OBwYw9RseSTf4UQFJf0=; b=ovIF99ma249joM4qq4ujCp/tMmEQI7KTNsBcRsAueEtzvWQSqOjHqBxysFOPpByD/9 1QPRj13svgVUfxHIxlP8+rh+5IxGFf/iA5YhKPhdfDk0C+a6eTLLI9p+PgLlK9MmAHY5 p79UY2b9NMV3Ab6QvnRzAormgapubhY7nADUUmUAB8tjHFEwKU87XeZb8/1kh590Wqhl 5AYeKnmfc75iGUdFoi8QBaqkKztpsYEVJmpFAP3xnj36DgLuvrZn3gUem/ygsIxz/hik WKLsCWxqpKRLiJqk7U+ilN0HCa63Kh2laCIyX5QwOjpre1uZIwdlzsld6cMOa2Gy4fCS 7CZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796260737; x=1796865537; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6uQlCZg3DytyUOX639zlc5+5OBwYw9RseSTf4UQFJf0=; b=yIM5p9GmBqEF01RYBkalzoUO+OnPVctuyOdNxTisgCIvs08B6u+hRZdqBkog+esNKj gGULHtmR1+2jG4BnsaSXGGhVIqstv0Y0TxK6bJ16pkPZoF05j6lX1xnr1Hy6CEuN0Y0f 71J7ztDa3XvOMSLb9p94/YfBadmtFGqW82Nmk5TohLCd9i8YuO/PtS+9dJHavFMUb2cx o+SLVBz6ap8VXqsjsylVbZf0jHo+4q91x5SWeUjG9lMB6c8Rxd/QXwBppivRqj8Jju1D 9UOW6HQZEQoPuHNLQsERA5e33Haimrt+/GQaJ3+eG006JFjzOLGhFDMpHWOvjVVC7zL1 b2lA== X-Forwarded-Encrypted: i=1; AL+hErGO4PmEHvsWiaGmQweRDEAE34CqTjnkOtM+FJyKMBPdxdFc49no3VWKVPTaSli8CFZJbgQGuyDRJzF3ynU=@vger.kernel.org X-Gm-Message-State: APuU4Z8Zc5uI9He67wguGXBl/8ZPQVy7hSX0ufSzu5rKisL51E6UYCgE UPp4C3FRPawE1lagHB2fGYFB9uOE2+I1rtYyTpVy2fJIiLV6BK37ld5A X-Gm-Gg: AZFdTZe199eWl/2Je5aeNZzF5rKaOdvmj470d+/58xNsxCLIVzLsjaLScBTxtus62zu L4hGOdfEBKeogLgaziPp9Iccn0DtjtO0fQoo9+u1RB9fCXSbZgKNCzXTAScVark489sXKnYsu/m wnkaTi2q6r+umEv1u9/jQUVLVrvvOvt5Y4GXPYZM1Ue5Wo+eFgfaBFQB5Ya3PoUJHTYdBqoaymL HAELVjxAxTkrjYVCA0vIb5y9O1fbvQmLZtG6zbhkGSnDeDrDXHi1+5e1tjin5BgLhAf1W+vD2KS pEVc9tz+LKVDSj+YzKGrjenE8TrhMPH+Mqfo+EF2NC6l1e2++THVsrR6J1tZBu2l/YNxceUI8cQ QJvckTBLBTE5/0lxPz8xzsTwthF4/vq10GGEnaYK1UMweOshoWl3Fu+GHZWlX25F7Qde1LKyGy3 iWjCD+ZBvXM0Td8leT5NfZxUIt7YPTZ60/eH9Kqvss2l9RkyT0rQ9Hm8Ro3iKygifqNTr8NtAr5 I8dac1Xlaey6n01In7++cLX6o4qaMFxaH8JfMIrOZOjz13Q8DaeWq3Wzry2LDaW7KIapYRREmFy +BJRUcxQxdjgajKIglvx79WTqS8Yk7R4L3+P/MQ= X-Received: by 2002:a05:7300:d509:b0:385:ac93:91f4 with SMTP id 5a478bee46e88-385ac939fc3mr53264158eec.26.1796260736676; Wed, 02 Dec 2026 17:18:56 -0800 (PST) Received: from localhost ([27.122.242.71]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-385666e7f59sm128967690eec.6.2026.12.02.17.18.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 17:18:55 -0800 (PST) Date: Thu, 3 Dec 2026 10:18:53 +0900 From: Hyunchul Lee To: Zhan Xusheng Cc: linkinjeon@kernel.org, liubaolin12138@163.com, ernest.borowski.git@proton.me, ntfs@lists.linux.dev, linux-kernel@vger.kernel.org, zhanxusheng@xiaomi.com, syzbot@syzkaller.appspotmail.com, stable@vger.kernel.org Subject: Re: [PATCH] ntfs: map a read past the end of the runlist as a hole Message-ID: References: <20261202072445.1975205-1-zhanxusheng1024@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261202072445.1975205-1-zhanxusheng1024@gmail.com> On Wed, Dec 02, 2026 at 03:24:45PM +0800, Zhan Xusheng wrote: > From: Zhan Xusheng > > ntfs_read_iomap_begin_non_resident() maps at most the rest of the run > holding the offset. At or past the allocated size, > ntfs_attr_vcn_to_rl() returns the end of the runlist, whose length is 0, > so the rest of the run comes out negative and is returned as the length > of the mapping: > > WARNING: fs/iomap/iter.c:39 at iomap_iter > iomap_readahead > ntfs_readahead > read_pages > page_cache_ra_unbounded > do_page_cache_ra > page_cache_ra_order > filemap_fault > > Readahead gets there when the file shrinks after the readahead window > was sized from i_size. "ntfs: trim the sizes after a short write" > makes that easy to hit: a write that runs out of space is rolled back > to what it wrote while a MAP_POPULATE mmap() of the file faults it in. > > Map the range past the end of the runlist as a hole. > > Fixes: b041ca562526 ("ntfs: update iomap and address space operations") > Tested-by: syzbot@syzkaller.appspotmail.com > Cc: stable@vger.kernel.org > Signed-off-by: Zhan Xusheng Looks good to me. Reviewed-by: Hyunchul Lee -- Thanks, Hyunchul