All of lore.kernel.org
 help / color / mirror / Atom feed
* erofs image that can put z_erofs_scan_folio() into an infinite loop
@ 2025-10-16 20:18 rtm
  2025-10-17  0:19 ` Gao Xiang
  0 siblings, 1 reply; 2+ messages in thread
From: rtm @ 2025-10-16 20:18 UTC (permalink / raw)
  To: Gao Xiang, Chao Yu; +Cc: linux-erofs

This produces an infinite loop in z_erofs_scan_folio():

# uname -r
6.17.0-12747-g859be217ee9e
# wget http://www.rtmrtm.org/rtm/erofs6a.img
# mount -t erofs -o loop erofs6a.img /mnt
# cp /mnt/x /tmp/y

I'm afraid I have not been able to track down what is going on. But
one factor is that erofs_inode_extended->i_size is 0x80000000000fff;
changing it to e.g. 3 makes the infinite loop go away.

On the other hand, here's another image can also loop forever in
z_erofs_scan_folio(), but has a more ordinary i_size:

# wget http://www.rtmrtm.org/rtm/erofs23a.img
# mount -t erofs -o loop erofs23a.img /mnt
# cp /mnt/x /tmp/y

Robert Morris
rtm@mit.edu



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: erofs image that can put z_erofs_scan_folio() into an infinite loop
  2025-10-16 20:18 erofs image that can put z_erofs_scan_folio() into an infinite loop rtm
@ 2025-10-17  0:19 ` Gao Xiang
  0 siblings, 0 replies; 2+ messages in thread
From: Gao Xiang @ 2025-10-17  0:19 UTC (permalink / raw)
  To: rtm, Gao Xiang, Chao Yu; +Cc: linux-erofs



On 2025/10/17 04:18, rtm@csail.mit.edu wrote:
> This produces an infinite loop in z_erofs_scan_folio():
> 
> # uname -r
> 6.17.0-12747-g859be217ee9e
> # wget http://www.rtmrtm.org/rtm/erofs6a.img
> # mount -t erofs -o loop erofs6a.img /mnt
> # cp /mnt/x /tmp/y
> 
> I'm afraid I have not been able to track down what is going on. But
> one factor is that erofs_inode_extended->i_size is 0x80000000000fff;
> changing it to e.g. 3 makes the infinite loop go away.
> 
> On the other hand, here's another image can also loop forever in
> z_erofs_scan_folio(), but has a more ordinary i_size:
> 
> # wget http://www.rtmrtm.org/rtm/erofs23a.img
> # mount -t erofs -o loop erofs23a.img /mnt
> # cp /mnt/x /tmp/y

Thanks! Will look into those soon.

Thanks,
Gao Xiang

> 
> Robert Morris
> rtm@mit.edu
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-17  0:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 20:18 erofs image that can put z_erofs_scan_folio() into an infinite loop rtm
2025-10-17  0:19 ` Gao Xiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.