From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org, Greg Kurz <groug@kaod.org>
Cc: qemu-stable@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>
Subject: Re: [Stable-10.0.11 79/86] hw/9pfs: consolidate name validation with check_name()
Date: Wed, 24 Jun 2026 09:15:02 +0200 [thread overview]
Message-ID: <2414838.ElGaqSPkdT@weasel> (raw)
In-Reply-To: <20260624050404.394225-23-mjt@tls.msk.ru>
Hi Michael,
On Wednesday, 24 June 2026 07:02:50 CEST Michael Tokarev wrote:
> From: Christian Schoenebeck <qemu_oss@crudebyte.com>
>
> Add a new, shared helper function check_name() that consolidates the name
> validation logic (illegal name check and "." / ".." rejection) currently
> spread over multiple 9p handlers, unnecessarily duplicating code.
>
> This is pure refactoring with no behavior change. The existing error code
> semantics are preserved: rename operations return -EISDIR, create
> operations return -EEXIST.
Note that this particular patch is actually not a fix. It is just code
deduplication. So my expecation was that this patch would not go to the stable
branches, therefore I intentionally omitted to CC qemu-stable on this patch.
/Christian
> Note: These current error codes actually differ from native Linux system
> calls (e.g. rename() returns -EBUSY, open(O_CREAT) returns -EISDIR). The 9P
> protocol does not mandate specific error codes for these validation errors.
> Hence consolidating to a single error code (e.g., -EINVAL) for all cases
> could be considered in the future for simplicity reason.
>
> This change reduces code duplication across 9 functions:
>
> - v9fs_lcreate
> - v9fs_create
> - v9fs_symlink
> - v9fs_link
> - v9fs_rename
> - v9fs_renameat
> - v9fs_wstat
> - v9fs_mknod
> - v9fs_mkdir
>
> Link:
> https://lore.kernel.org/qemu-devel/0573103880129eb543f07b68c77e86f2f572f6bf
> .1780072238.git.qemu_oss@crudebyte.com Signed-off-by: Christian Schoenebeck
> <qemu_oss@crudebyte.com>
> (cherry picked from commit 116db2986b11c914217bbd1547815b6c7efb944a)
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
next prev parent reply other threads:[~2026-06-24 7:15 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 5:02 [Stable-10.0.11 v2 00/86] Patch Round-up for stable 10.0.11, freeze on 2026-06-23 (frozen) Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 57/86] system/rtc: Fix a possible year-2038 integer overflow problem Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 58/86] linux-user: add preadv2/preadv2 Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 59/86] amd_iommu: restrict command buffer head/tail ranges to ring size Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 60/86] amd_iommu: Update command buffer head ptr in MMIO region after wraparound Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 61/86] tests/qtest: Add amd-iommu command buffer head wrap test Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 62/86] libvhost-user: fix buffer overflow in virtqueue_read_indirect_desc() Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 63/86] libvduse: fix buffer overflow in vduse_queue_read_indirect_desc() Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 64/86] virtio: Allow to fill a whole virtqueue in order Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 65/86] target/riscv/cpu_helper.c: allow LOAD_ADDR_MIS promotion to AMO fault Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 66/86] target/riscv/csr.c: do not allow mstatus MPV/GVA writes Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 67/86] target/riscv/csr.c: fix mstatus.UXL reserved value Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 68/86] disas/riscv.c: add 'cbo' insns to disassembler Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 69/86] target/riscv/insn_trans/trans_rvzicbo.c.inc: save opcode before helpers Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 70/86] target/riscv/cpu_helper.c: fault with reserved PTE.PBMT val Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 71/86] target/riscv/cpu_helper.c: add PMA access fault Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 72/86] disas/riscv.c: fix inst_length() Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 73/86] target/riscv: mask vxrm csrw write to the low 2 bits Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 74/86] hw/uefi: fix parse_hexstr Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 75/86] target/i386: apply mod to immediate count of an RCL/RCR operation Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 76/86] gdbstub: Update x86 control register bits Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 77/86] hw/9pfs: fix abort due to illegal name with Twstat rename Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 78/86] hw/9pfs: reject . and .. in " Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 79/86] hw/9pfs: consolidate name validation with check_name() Michael Tokarev
2026-06-24 7:15 ` Christian Schoenebeck [this message]
2026-06-24 7:35 ` Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 80/86] ui/sdl2: Set GL ES profile before creating initial GL context Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 81/86] target/xtensa: add cpu_set_fcr/fsr helpers to sync fp_status Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 82/86] linux-user/xtensa: save/restore FP registers across signal delivery Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 83/86] linux-user/xtensa: fix unlock of uninitialized frame pointer on sigreturn Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 84/86] ppc/pnv_phb3: Error out on invalid config access Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 85/86] hw/pci: Replace assert with bounds check and return Michael Tokarev
2026-06-24 5:02 ` [Stable-10.0.11 86/86] linux-user: Fix AT_PHDR when program headers are relocated into their own segment Michael Tokarev
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=2414838.ElGaqSPkdT@weasel \
--to=qemu_oss@crudebyte.com \
--cc=groug@kaod.org \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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 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.