From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796260738; b=tyV2bBL7L1DToivATV4scBN2xnDP0yZ4D80rx1hQdTsSwInxcUorgKjBSFMKiXI2il2Z 4thMkV+0EIzQwkCAMgqJ3Kgr9YlRYvxYd0nvfvNiYbKQx30NhCNRQzxRkZC0esns+II4t UmJOyI5KRp3cIIiF/1JTqGdagaclDVM8vRyiA9WkouHjS1DkegTghvgifgsHVJtaMUOFC yzt0f9bqbSpcDv3J/UDXGNCuSUL/iHZfJb5MiUkD7CKoWBWe4wVztf77iEXKs9j6WcGC1 fD1qOsaK6cJN5eo1GSxwbUTP4bijpTHwuJVXO7Kk7s+YEui6ddu+9LxYttLd7dWXV0g== 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=Nlu8Ym5Sja+42XrYrS/2j//uRPuNPrLtoeYBKmRfYo+nKheeamW5MIq580CnuqgyRE6e 70vLD9sS0SWtTG6rW9Ua/qzVgQlCnNikhh6ohztLTL2OQVesF60b9xlVAaHu/G8yLi5tv F10EeTdhZgM7EQBIcBOJAp/5rYEESTcWbFb3Nm3KYNB6qE4nuucGcpagtjEz1bIDwz4ld HsXacBzhnNCeP1BVXsh6DdbEh+zYFUWGwOHUg4pgRmjMiNfYgQxJGWrdOHMq5HsgMj4Vk E9LM2wPvHqHk5VMDPbZlu+yL886o4YkvtdlDrlVUfUdSplD7KeFRJllLmU6ttWCxu0A== 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.179 Received: from mail-dy1-f179.google.com (mail-dy1-f179.google.com [74.125.82.179]) (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 E67A1606A32D for ; Thu, 3 Dec 2026 01:18:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E67A1606A32D 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-f179.google.com with SMTP id 5a478bee46e88-386cf1041cdso15261609eec.0 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=V912/SYCLSMpNS1rLEUbcNJFNXoRA+g5kfZyQhM5+y1r9KCrPggOYHRHbQznXUiAsw gcdEZPcR2po7PyjDir7BlOe71nt3prVcKvp4pN5S7hQzoM4fez8V0gTRYj8vocoQAY8H aYtwxtxNamYAPnPl6keHXlhlqPYMrvSWhUil87GpQpXMaxnitrL3GwKKr7BMXs2L9j38 ISBMgBACJ1UMeEI9J5c+1jB2TH5dF2p2C24sE3Q1F0IDdZ0Lk/kMkvYd+bvVw8v9QAcr nVjazFTl+13SYDxykSO7lB6b+VuEXgv4l51zeyqXlOs5L7zVwjqJFNxOe0eD66T+fBd5 PSbA== X-Forwarded-Encrypted: i=1; AL+hErGbepeqeNCK+2DU+CyUvgOazjp7P7m2AHIalZt8HKb5/KYWs9Rv/LIeWq8acGEG5+RCODWL4xU=@vger.kernel.org X-Gm-Message-State: APuU4Z8wOjzpMAra3epbcf2Sy42iaiOiG/nNwNy2XC1waV6y+8QBb5MP gjbJ5KbPnbmbZG2UX4lKANcQA/S2hWZKhf0dXEqY2p02j2GZ6x6Qee14 X-Gm-Gg: AZFdTZcV04NdkhTOGVIpaQv2JSORIczT3u+i/AmFNqaIiqfg9zlqtkc7eAM7VApOy81 SHhjQUJy9BsGlbrJ+DnlQTS+ebElPyNZNN7UhgLzJiVPXRICG6/ViveLQVP+s1WpPeKoRE3wEW/ uVHPyxiLJ1cdQVtAk5jeqPNCR5siX9Op56lRao5S9v8jkx4T06Yz4vFelC2Z6soCMCLtB7TDIvw gCs43/k6q/M4Lksa5VKH/PBci8f+0ScHnAG4XyZH1EKKWVWTn3JaO0T+eF4ytt5sV5dXpAlaaQL yJ/VJRg/g4DB87zUEuy908wvXxIYW9KJOUsHOJ4agTheZdTOtr9LacZ6vxDxy3HTk9Od7JcC97d U1AuzYt3M2xcB2ETazAUr0UO0MVmnKehb3GR0TnhxvvGSYOKqI+xacd3YkIW5eNBHwY5c2wZ3jq +uvEnZto3kbrQ7POpxoke/yE1qhcCcQCtTS3XGfszdY9xuxwbsvIywyvcNQRynhgT0R5/KEVZ5p q9hGXwC/xkLllGzwl/AQOmmblvKqjXF45T5rhUkTP6PCoyF2b7OXk7QNPZNpqBXMPZz2/LpBZ1u OiF42h5htoFTjEbi6yazDeiWxd8VtjzU/u4QTfU= 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: stable@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