[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/14] expose MACH_MSG_USER_ALIGNMENT for manually-built mess
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 10/14] expose MACH_MSG_USER_ALIGNMENT for manually-built messages |
Date: |
Fri, 29 Dec 2023 15:17:01 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Luca Dariz, le jeu. 28 déc. 2023 20:42:57 +0100, a ecrit:
> ---
> include/mach/message.h | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/include/mach/message.h b/include/mach/message.h
> index 0b8b34d4..9790ef98 100644
> --- a/include/mach/message.h
> +++ b/include/mach/message.h
> @@ -401,6 +401,16 @@ typedef integer_t mach_msg_option_t;
>
> #define MACH_SEND_ALWAYS 0x00010000 /* internal use only */
>
> +#ifdef __x86_64__
> +#if defined(KERNEL) && defined(USER32)
> +#define MACH_MSG_USER_ALIGNMENT 4
> +#else
> +#define MACH_MSG_USER_ALIGNMENT 8
> +#endif
> +#else
> +#define MACH_MSG_USER_ALIGNMENT 4
> +#endif
> +
> #ifdef KERNEL
> /* This is the alignment of msg descriptors and the actual data
> * for both in kernel messages and user land messages.
> @@ -411,15 +421,6 @@ typedef integer_t mach_msg_option_t;
> * so that kernel messages are correctly aligned.
> */
> #define MACH_MSG_KERNEL_ALIGNMENT sizeof(uintptr_t)
> -#ifdef __x86_64__
> -#ifdef USER32
> -#define MACH_MSG_USER_ALIGNMENT 4
> -#else
> -#define MACH_MSG_USER_ALIGNMENT 8
> -#endif
> -#else
> -#define MACH_MSG_USER_ALIGNMENT 4
> -#endif
>
> #define mach_msg_align(x, alignment) \
> ( ( ((vm_offset_t)(x)) + ((alignment)-1) ) & ~((alignment)-1) )
> --
> 2.39.2
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
- Re: [PATCH 06/14] adjust range when changing memory pageabilityg, (continued)
- [PATCH 07/14] add basic vm tests, Luca Dariz, 2023/12/28
- [PATCH 09/14] add syscall tests, Luca Dariz, 2023/12/28
- [PATCH 10/14] expose MACH_MSG_USER_ALIGNMENT for manually-built messages, Luca Dariz, 2023/12/28
- Re: [PATCH 10/14] expose MACH_MSG_USER_ALIGNMENT for manually-built messages,
Samuel Thibault <=
- [PATCH 11/14] add raw mach_msg tests, Luca Dariz, 2023/12/28
- [PATCH 14/14] add tests to make check, Luca Dariz, 2023/12/28
- [PATCH 12/14] add basic task tests, Luca Dariz, 2023/12/28