On 10/28/25 14:29, Bastian Blank wrote:
The FIGETBSZ ioctl get's "int *" (pointer to 32bit integer) as argument,
not "long *" as specified in qemu.  Using the correct type makes the
emulation work.

Signed-off-by: Bastian Blank <[email protected]>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3185

Reviewed-by: Michael Tokarev <[email protected]>

(Adding Laurent to Cc:)

While applying, it'd be nice to include "linux-user: " prefix to
the subject.  And the thing should definitely be picked up for the
stable series (Cc'd).

This bug has been with us since the day linux-user was implemented,
in 2003.

I can pick this one up to qemu-trivial tree, if no one objects.

Thanks,

/mjt

  linux-user/ioctls.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 3b41128..c87ce61 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -145,7 +145,7 @@
       IOCTL(FITRIM, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_fstrim_range)))
  #endif
- IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG))
+     IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_INT))
  #ifdef CONFIG_FIEMAP
       IOCTL_SPECIAL(FS_IOC_FIEMAP, IOC_W | IOC_R, do_ioctl_fs_ioc_fiemap,
                     MK_PTR(MK_STRUCT(STRUCT_fiemap)))



Reply via email to