[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/17] Use the x86_64 message ABI on all 64-bit ports
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 03/17] Use the x86_64 message ABI on all 64-bit ports |
Date: |
Wed, 27 Mar 2024 19:39:12 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Sergey Bugaev, le mer. 27 mars 2024 19:18:27 +0300, a ecrit:
> ---
> include/mach/message.h | 10 +++++-----
> ipc/ipc_kmsg.c | 4 ++--
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/mach/message.h b/include/mach/message.h
> index 9790ef98..87b83951 100644
> --- a/include/mach/message.h
> +++ b/include/mach/message.h
> @@ -240,7 +240,7 @@ typedef struct {
> } mach_port_name_inlined_t;
>
> typedef struct {
> -#ifdef __x86_64__
> +#ifdef __LP64__
> /*
> * For 64 bits, this struct is 8 bytes long so we
> * can pack the same amount of information as mach_msg_type_long_t.
> @@ -275,9 +275,9 @@ typedef struct {
> } __attribute__ ((aligned (__alignof__ (uintptr_t)))) mach_msg_type_t;
>
> typedef struct {
> -#ifdef __x86_64__
> +#ifdef __LP64__
> union {
> - /* On x86_64 this is equivalent to mach_msg_type_t so use
> + /* On 64-bit this is equivalent to mach_msg_type_t so use
> * union to overlay with the old field names. */
> mach_msg_type_t msgtl_header;
> struct {
> @@ -298,7 +298,7 @@ typedef struct {
> #endif
> } __attribute__ ((aligned (__alignof__ (uintptr_t)))) mach_msg_type_long_t;
>
> -#ifdef __x86_64__
> +#ifdef __LP64__
> #ifdef __cplusplus
> #if __cplusplus >= 201103L
> static_assert (sizeof (mach_msg_type_t) == sizeof (mach_msg_type_long_t),
> @@ -401,7 +401,7 @@ typedef integer_t mach_msg_option_t;
>
> #define MACH_SEND_ALWAYS 0x00010000 /* internal use only */
>
> -#ifdef __x86_64__
> +#ifdef __LP64__
> #if defined(KERNEL) && defined(USER32)
> #define MACH_MSG_USER_ALIGNMENT 4
> #else
> diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
> index 179c43fa..b23cae7c 100644
> --- a/ipc/ipc_kmsg.c
> +++ b/ipc/ipc_kmsg.c
> @@ -1357,7 +1357,7 @@ ipc_kmsg_copyin_body(
>
> if ((is_port && !is_inline && (size !=
> PORT_NAME_T_SIZE_IN_BITS)) ||
> (is_port && is_inline && (size != PORT_T_SIZE_IN_BITS)) ||
> -#ifndef __x86_64__
> +#ifndef __LP64__
> (longform && ((type->msgtl_header.msgt_name != 0) ||
> (type->msgtl_header.msgt_size != 0) ||
> (type->msgtl_header.msgt_number != 0))) ||
> @@ -2876,7 +2876,7 @@ ipc_msg_print(mach_msg_header_t *msgh)
> is_port = MACH_MSG_TYPE_PORT_ANY(name);
>
> if ((is_port && (size != PORT_T_SIZE_IN_BITS)) ||
> -#ifndef __x86_64__
> +#ifndef __LP64__
> (longform && ((type->msgtl_header.msgt_name != 0) ||
> (type->msgtl_header.msgt_size != 0) ||
> (type->msgtl_header.msgt_number != 0))) ||
> --
> 2.44.0
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
- [PATCH 05/17] gsync: Use copyin()/copyout() to access user memory, (continued)
- [PATCH 05/17] gsync: Use copyin()/copyout() to access user memory, Sergey Bugaev, 2024/03/27
- [PATCH 01/17] elf-load: Respect PT_GNU_STACK, Sergey Bugaev, 2024/03/27
- [PATCH 04/17] Load 64-bit ELFs on all 64-bit ports, Sergey Bugaev, 2024/03/27
- [PATCH 06/17] kern/syscall_subr.c: Use copyin()/copyout() to access user memory, Sergey Bugaev, 2024/03/27
- [PATCH 03/17] Use the x86_64 message ABI on all 64-bit ports, Sergey Bugaev, 2024/03/27
- Re: [PATCH 03/17] Use the x86_64 message ABI on all 64-bit ports,
Samuel Thibault <=
- [PATCH 02/17] Disable host_kernel_version() everywhere but on i386, Sergey Bugaev, 2024/03/27
- [PATCH 08/17] ipc: Turn ipc_entry_lookup_failed() into a macro, Sergey Bugaev, 2024/03/27
- [PATCH 11/17] tests: Fix halt(), Sergey Bugaev, 2024/03/27
- [PATCH 09/17] Move copy{in,out}msg declarations to copy_user.h, Sergey Bugaev, 2024/03/27
- [PATCH 15/17] tests: Make exception subcode a long, Sergey Bugaev, 2024/03/27