[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/6] types.h: add UINT-related macros needed for Argon2
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2 2/6] types.h: add UINT-related macros needed for Argon2 |
Date: |
Fri, 21 Feb 2020 13:34:49 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Feb 20, 2020 at 07:00:50PM +0100, Patrick Steinhardt wrote:
> For the upcoming import of the Argon2 library, we need the macros
> GRUB_UINT32_MAX, GRUB_UINT32_C and GRUB_UINT64_C. Add them as a
> preparatory step.
>
> Signed-off-by: Patrick Steinhardt <address@hidden>
> ---
> include/grub/types.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/grub/types.h b/include/grub/types.h
> index 035a4b528..35ba900dd 100644
> --- a/include/grub/types.h
> +++ b/include/grub/types.h
> @@ -137,6 +137,7 @@ typedef grub_int32_t grub_ssize_t;
> #define GRUB_SHRT_MAX 0x7fff
> #define GRUB_SHRT_MIN (-GRUB_SHRT_MAX - 1)
> #define GRUB_UINT_MAX 4294967295U
> +#define GRUB_UINT32_MAX 4294967295U
> #define GRUB_INT_MAX 0x7fffffff
> #define GRUB_INT_MIN (-GRUB_INT_MAX - 1)
> #define GRUB_INT32_MAX 2147483647
> @@ -151,6 +152,13 @@ typedef grub_int32_t grub_ssize_t;
> #endif
> # define GRUB_LONG_MIN (-GRUB_LONG_MAX - 1)
>
> +# define GRUB_UINT32_C(x) x ## U
> +# if GRUB_ULONG_MAX >> 31 >> 31 >> 1 == 1
> +# define GRUB_UINT64_C(x) x##UL
> +# elif 1
#else?
Daniel
- Re: [PATCH 2/5] argon2: Import Argon2 from cryptsetup, (continued)
- [PATCH v2 0/6] Support Argon2 KDF in LUKS2, Patrick Steinhardt, 2020/02/20
- [PATCH v2 2/6] types.h: add UINT-related macros needed for Argon2, Patrick Steinhardt, 2020/02/20
- Re: [PATCH v2 2/6] types.h: add UINT-related macros needed for Argon2,
Daniel Kiper <=
- [PATCH v2 1/6] efi: Allocate half of available memory by default, Patrick Steinhardt, 2020/02/20
- [PATCH v2 4/6] luks2: Add missing newline to debug message, Patrick Steinhardt, 2020/02/20
- [PATCH v2 5/6] luks2: Discern Argon2i and Argon2id, Patrick Steinhardt, 2020/02/20
- [PATCH v2 3/6] argon2: Import Argon2 from cryptsetup, Patrick Steinhardt, 2020/02/20
- [PATCH v2 6/6] luks2: Support key derival via Argon2, Patrick Steinhardt, 2020/02/20
- Re: [PATCH v2 0/6] Support Argon2 KDF in LUKS2, Leif Lindholm, 2020/02/20
- Re: [PATCH v2 0/6] Support Argon2 KDF in LUKS2, Daniel Kiper, 2020/02/21