public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* VFS regression with 9pfs ("Lookup would have caused loop")
@ 2024-09-23 10:05 Will Deacon
  2024-10-09 15:34 ` Will Deacon
  0 siblings, 1 reply; 10+ messages in thread
From: Will Deacon @ 2024-09-23 10:05 UTC (permalink / raw)
  To: ericvh; +Cc: lucho, asmadeus, oss, v9fs, linux-kernel, oleg, keirf

Hi Eric,

I'm trying to use kvmtool to run a simple guest under an Android host
but, for v6.9+ guest kernels, 'init' reliably fails to run from a 9pfs
mount because VFS emits this error:

  | VFS: Lookup of 'com.android.runtime' in 9p 9p would have caused loop

The host directory being shared is a little odd, as it has symlinks out
to other mount points. In the guest, /apex is a symlink to /host/apex.
On the host, /apex/com.android.runtime is a mounted loopback device:

/dev/block/loop13 on /apex/com.android.runtime type ext4 (ro,dirsync,seclabel,nodev,noatime)

This used to work prior to 724a08450f74 ("fs/9p: simplify iget to remove
unnecessary paths") and it looks like Oleg ran into something similar
before:

  https://lore.kernel.org/all/20240408141436.GA17022@redhat.com/

although he worked around it by driving QEMU with different options.

I can confirm that reverting the following commits gets mainline guests
working again for me:

	724a08450f74 "fs/9p: simplify iget to remove unnecessary paths"
	11763a8598f8 "fs/9p: fix uaf in in v9fs_stat2inode_dotl"
	10211b4a23cf "fs/9p: remove redundant pointer v9ses"
	d05dcfdf5e16 " fs/9p: mitigate inode collisions"

Do you have any better ideas? I'm happy to test anything you might have,
since this is 100% reproducible on my setup.

Cheers,

Will

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

end of thread, other threads:[~2024-10-25 15:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 10:05 VFS regression with 9pfs ("Lookup would have caused loop") Will Deacon
2024-10-09 15:34 ` Will Deacon
2024-10-15 18:07   ` Thorsten Leemhuis
2024-10-16  9:39     ` asmadeus
2024-10-22 15:01       ` Will Deacon
2024-10-22 23:00         ` Dominique Martinet
2024-10-23  7:22           ` Linux regression tracking (Thorsten Leemhuis)
2024-10-23 15:14           ` Will Deacon
2024-10-25 15:25     ` Christian Brauner
2024-10-25 15:29       ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox