[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] linux-user: Fix member types of target_dirent64
From: |
Warner Losh |
Subject: |
Re: [PATCH 3/4] linux-user: Fix member types of target_dirent64 |
Date: |
Tue, 9 Nov 2021 09:44:46 -0700 |
> On Nov 7, 2021, at 5:48 AM, Richard Henderson <richard.henderson@linaro.org>
> wrote:
>
> The host uint64_t (etc) does not have the correct
> alignment constraint as the guest: use abi_* types.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/syscall_defs.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed by: Warner Losh <imp@bsdimp.com>
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 98b09ee6d6..41aaafbac1 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -437,9 +437,9 @@ struct target_dirent {
> };
>
> struct target_dirent64 {
> - uint64_t d_ino;
> - int64_t d_off;
> - unsigned short d_reclen;
> + abi_ullong d_ino;
> + abi_llong d_off;
> + abi_ushort d_reclen;
> unsigned char d_type;
> char d_name[];
> };
> --
> 2.25.1
>
>
- [PATCH 0/4] linux-user: Fix getdents alignment issues (#704), Richard Henderson, 2021/11/07
- [PATCH 1/4] linux-user: Split out do_getdents, do_getdents64, Richard Henderson, 2021/11/07
- [PATCH 3/4] linux-user: Fix member types of target_dirent64, Richard Henderson, 2021/11/07
- [PATCH 4/4] linux-user: Rewrite do_getdents, do_getdents64, Richard Henderson, 2021/11/07
- [PATCH 2/4] linux-user: Always use flexible arrays for dirent d_name, Richard Henderson, 2021/11/07
- Re: [PATCH 0/4] linux-user: Fix getdents alignment issues (#704), Warner Losh, 2021/11/09
- Re: [PATCH 0/4] linux-user: Fix getdents alignment issues (#704), Laurent Vivier, 2021/11/10