[PATCH v2 1/2] linux-user: Add new flag VERIFY_NONE

Thomas Weißschuh posted 2 patches 2 years, 9 months ago
Maintainers: Laurent Vivier <laurent@vivier.eu>
[PATCH v2 1/2] linux-user: Add new flag VERIFY_NONE
Posted by Thomas Weißschuh 2 years, 9 months ago
This can be used to validate that an address range is mapped but without
being readable or writable.

It will be used by an updated implementation of mincore().

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
 linux-user/qemu.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index e2e93fbd1d5d..92f9f5af41c7 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -168,6 +168,7 @@ abi_long do_brk(abi_ulong new_brk);
 
 /* user access */
 
+#define VERIFY_NONE  0
 #define VERIFY_READ  PAGE_READ
 #define VERIFY_WRITE (PAGE_READ | PAGE_WRITE)
 
-- 
2.40.0


Re: [PATCH v2 1/2] linux-user: Add new flag VERIFY_NONE
Posted by Laurent Vivier 2 years, 9 months ago
Le 22/04/2023 à 12:03, Thomas Weißschuh a écrit :
> This can be used to validate that an address range is mapped but without
> being readable or writable.
> 
> It will be used by an updated implementation of mincore().
> 
> Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
> ---
>   linux-user/qemu.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/linux-user/qemu.h b/linux-user/qemu.h
> index e2e93fbd1d5d..92f9f5af41c7 100644
> --- a/linux-user/qemu.h
> +++ b/linux-user/qemu.h
> @@ -168,6 +168,7 @@ abi_long do_brk(abi_ulong new_brk);
>   
>   /* user access */
>   
> +#define VERIFY_NONE  0
>   #define VERIFY_READ  PAGE_READ
>   #define VERIFY_WRITE (PAGE_READ | PAGE_WRITE)
>   

Applied to my linux-user-for-8.1 branch.

Thanks,
Laurent


Re: [PATCH v2 1/2] linux-user: Add new flag VERIFY_NONE
Posted by Laurent Vivier 2 years, 9 months ago
Le 22/04/2023 à 12:03, Thomas Weißschuh a écrit :
> This can be used to validate that an address range is mapped but without
> being readable or writable.
> 
> It will be used by an updated implementation of mincore().
> 
> Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
> ---
>   linux-user/qemu.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/linux-user/qemu.h b/linux-user/qemu.h
> index e2e93fbd1d5d..92f9f5af41c7 100644
> --- a/linux-user/qemu.h
> +++ b/linux-user/qemu.h
> @@ -168,6 +168,7 @@ abi_long do_brk(abi_ulong new_brk);
>   
>   /* user access */
>   
> +#define VERIFY_NONE  0
>   #define VERIFY_READ  PAGE_READ
>   #define VERIFY_WRITE (PAGE_READ | PAGE_WRITE)
>   

Reviewed-by: Laurent Vivier <laurent@vivier.eu>