[PATCH-for-10.1 1/3] accel/hvf: Display executable bit as 'X'

Philippe Mathieu-Daudé posted 3 patches 4 months ago
Maintainers: Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Mads Ynddal <mads@ynddal.dk>, Peter Maydell <peter.maydell@linaro.org>, Alexander Graf <agraf@csgraf.de>
[PATCH-for-10.1 1/3] accel/hvf: Display executable bit as 'X'
Posted by Philippe Mathieu-Daudé 4 months ago
Developers are custom to read RWX, not RWE.
Replace E -> X.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/hvf/hvf-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
index e67a8105a66..0a4b498e836 100644
--- a/accel/hvf/hvf-all.c
+++ b/accel/hvf/hvf-all.c
@@ -84,7 +84,7 @@ static int do_hvf_set_memory(hvf_slot *slot, hv_memory_flags_t flags)
     trace_hvf_vm_map(slot->start, slot->size, slot->mem, flags,
                      flags & HV_MEMORY_READ ?  'R' : '-',
                      flags & HV_MEMORY_WRITE ? 'W' : '-',
-                     flags & HV_MEMORY_EXEC ?  'E' : '-');
+                     flags & HV_MEMORY_EXEC ?  'X' : '-');
     ret = hv_vm_map(slot->mem, slot->start, slot->size, flags);
     assert_hvf_ok(ret);
     return 0;
-- 
2.49.0


Re: [PATCH-for-10.1 1/3] accel/hvf: Display executable bit as 'X'
Posted by Xiaoyao Li 4 months ago
On 7/17/2025 1:28 AM, Philippe Mathieu-Daudé wrote:
> Developers are custom to read RWX, not RWE.
> Replace E -> X.
> 
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>

> ---
>   accel/hvf/hvf-all.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
> index e67a8105a66..0a4b498e836 100644
> --- a/accel/hvf/hvf-all.c
> +++ b/accel/hvf/hvf-all.c
> @@ -84,7 +84,7 @@ static int do_hvf_set_memory(hvf_slot *slot, hv_memory_flags_t flags)
>       trace_hvf_vm_map(slot->start, slot->size, slot->mem, flags,
>                        flags & HV_MEMORY_READ ?  'R' : '-',
>                        flags & HV_MEMORY_WRITE ? 'W' : '-',
> -                     flags & HV_MEMORY_EXEC ?  'E' : '-');
> +                     flags & HV_MEMORY_EXEC ?  'X' : '-');
>       ret = hv_vm_map(slot->mem, slot->start, slot->size, flags);
>       assert_hvf_ok(ret);
>       return 0;


Re: [PATCH-for-10.1 1/3] accel/hvf: Display executable bit as 'X'
Posted by BALATON Zoltan 4 months ago
On Thu, 17 Jul 2025, Xiaoyao Li wrote:
> On 7/17/2025 1:28 AM, Philippe Mathieu-Daudé wrote:
>> Developers are custom to read RWX, not RWE.

"accustomed to"

>> Replace E -> X.
>> 
>> Reported-by: Alex Bennée <alex.bennee@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
>
>> ---
>>   accel/hvf/hvf-all.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
>> index e67a8105a66..0a4b498e836 100644
>> --- a/accel/hvf/hvf-all.c
>> +++ b/accel/hvf/hvf-all.c
>> @@ -84,7 +84,7 @@ static int do_hvf_set_memory(hvf_slot *slot, 
>> hv_memory_flags_t flags)
>>       trace_hvf_vm_map(slot->start, slot->size, slot->mem, flags,
>>                        flags & HV_MEMORY_READ ?  'R' : '-',
>>                        flags & HV_MEMORY_WRITE ? 'W' : '-',
>> -                     flags & HV_MEMORY_EXEC ?  'E' : '-');
>> +                     flags & HV_MEMORY_EXEC ?  'X' : '-');
>>       ret = hv_vm_map(slot->mem, slot->start, slot->size, flags);
>>       assert_hvf_ok(ret);
>>       return 0;
>
>
>
Re: [PATCH-for-10.1 1/3] accel/hvf: Display executable bit as 'X'
Posted by Mads Ynddal 4 months ago
> On 16 Jul 2025, at 19.28, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 
> Developers are custom to read RWX, not RWE.
> Replace E -> X.
> 
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/hvf/hvf-all.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Mads Ynddal <mads@ynddal.dk>
Re: [PATCH-for-10.1 1/3] accel/hvf: Display executable bit as 'X'
Posted by Alex Bennée 4 months ago
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> Developers are custom to read RWX, not RWE.
> Replace E -> X.
>
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro