qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: Greg Kurz <groug@kaod.org>, Andrey Erokhin <language.lawyer@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2] 9pfs: local: read native symlinks when security-model=mapped
Date: Fri, 28 Nov 2025 11:23:42 +0100	[thread overview]
Message-ID: <2808056.mvXUDI8C0e@weasel> (raw)
In-Reply-To: <3c35955d-a57e-4203-81c5-395146e23f83@gmail.com>

On Saturday, 22 November 2025 21:19:09 CET Andrey Erokhin wrote:
> Directories attached using virtfs with security-model=mapped
> may contain native symlinks
> 
> This can happen e.g. when booting from a rootfs directory tree
> (usually with a writable overlay set up on the host side)
> 
> Currently, when security-model=mapped[-xattr|-file],
> QEMU assumes that host-side "symlinks" are in the mapped format,
> i.e. are regular files storing the linked path,
> so it tries to open with O_NOFOLLOW
> and fails with ELOOP on native symlinks
> 
> This patch introduces a fallback for such cases:
> reuse security-model=[none|passthrough] else if branch logic
> where readlink will be called for the path basename
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/173
> 
> Signed-off-by: Andrey Erokhin <language.lawyer@gmail.com>
> ---
>  hw/9pfs/9p-local.c | 4 ++++
>  1 file changed, 4 insertions(+)

Queued on 9p.next:
https://github.com/cschoenebeck/qemu/commits/9p.next

Thanks!

/Christian




      parent reply	other threads:[~2025-11-28 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-22 20:19 [PATCH v2] 9pfs: local: read native symlinks when security-model=mapped Andrey Erokhin
2025-11-25 14:04 ` Greg Kurz
2025-11-25 14:21   ` Andrey Erokhin
2025-11-25 18:58     ` Greg Kurz
2025-11-25 19:31       ` Christian Schoenebeck
2025-11-25 20:40         ` Andrey Erokhin
2025-11-26 12:26           ` Christian Schoenebeck
2025-11-28 10:23 ` Christian Schoenebeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2808056.mvXUDI8C0e@weasel \
    --to=qemu_oss@crudebyte.com \
    --cc=groug@kaod.org \
    --cc=language.lawyer@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).