Skip to contentSkip to conversation

linux-user: update statx emulation

PATCH In review Andreas Schwab 2 participants 2 messages Dec 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: update statx emulation

---
 linux-user/syscall.c      | 3 +++
 linux-user/syscall_defs.h | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
linux-user/syscall.c +3 -0
index e379ddb1b7..248c5b5f7c 100644
@@ -8049,6 +8049,9 @@ static inline abi_long host_to_target_statx(struct target_statx *host_stx,
     __put_user(host_stx->stx_rdev_minor, &target_stx->stx_rdev_minor);
     __put_user(host_stx->stx_dev_major, &target_stx->stx_dev_major);
     __put_user(host_stx->stx_dev_minor, &target_stx->stx_dev_minor);
+    __put_user(host_stx->stx_mnt_id, &target_stx->stx_mnt_id);
+    __put_user(host_stx->stx_dio_mem_align, &target_stx->stx_dio_mem_align);
+    __put_user(host_stx->stx_dio_offset_align, &target_stx->stx_dio_offset_align);
 
     unlock_user_struct(target_stx, target_addr, 1);
 
linux-user/syscall_defs.h +5 -1
index cd9ff709b8..6ae6e1fa13 100644
@@ -2734,7 +2734,11 @@ struct target_statx {
     abi_uint stx_dev_major; /* ID of device containing file [uncond] */
     abi_uint stx_dev_minor;
     /* 0x90 */
-    abi_ullong __spare2[14]; /* Spare space for future expansion */
+    abi_ullong stx_mnt_id;
+    abi_uint stx_dio_mem_align;
+    abi_uint stx_dio_offset_align;
+    /* 0xa0 */
+    abi_ullong __spare2[12]; /* Spare space for future expansion */
     /* 0x100 */
 };
 
Signature · 7 lines
2.52.0


-- 
Andreas Schwab, SUSE Labs, [email protected]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
Reviewed-by on v1 1/1
#1 lore raw

Hi Andreas,

Quoted 26 lines · On Mon, 08 Dec 2025 14:40:00 +0100 Andreas Schwab wrote:
---
 linux-user/syscall.c      | 3 +++
 linux-user/syscall_defs.h | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
linux-user/syscall.c +3 -0
index e379ddb1b7..248c5b5f7c 100644
@@ -8049,6 +8049,9 @@ static inline abi_long host_to_target_statx(struct target_statx *host_stx,
     __put_user(host_stx->stx_rdev_minor, &target_stx->stx_rdev_minor);
     __put_user(host_stx->stx_dev_major, &target_stx->stx_dev_major);
     __put_user(host_stx->stx_dev_minor, &target_stx->stx_dev_minor);
+    __put_user(host_stx->stx_mnt_id, &target_stx->stx_mnt_id);
+    __put_user(host_stx->stx_dio_mem_align, &target_stx->stx_dio_mem_align);
+    __put_user(host_stx->stx_dio_offset_align, &target_stx->stx_dio_offset_align);
 
     unlock_user_struct(target_stx, target_addr, 1);
 
linux-user/syscall_defs.h +0 -0
index cd9ff709b8..6ae6e1fa13 100644
@@ -2734,7 +2734,11 @@ struct target_statx {
     abi_uint stx_dev_major; /* ID of device containing file [uncond] */

linux-user/syscall_defs.h struct target_statx { · line 2743

Quoted 10 lines
linux-user/syscall_defs.h +5 -1
     abi_uint stx_dev_minor;
     /* 0x90 */
-    abi_ullong __spare2[14]; /* Spare space for future expansion */
+    abi_ullong stx_mnt_id;
+    abi_uint stx_dio_mem_align;
+    abi_uint stx_dio_offset_align;
+    /* 0xa0 */
+    abi_ullong __spare2[12]; /* Spare space for future expansion */
     /* 0x100 */
 };