lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7bbd5f46-de70-4158-a790-d2aa90d32929@arm.com>
Date: Thu, 22 Aug 2024 16:05:51 +0100
From: Steven Price <steven.price@....com>
To: "Aneesh Kumar K.V" <aneesh.kumar@...nel.org>, kvm@...r.kernel.org,
 kvmarm@...ts.linux.dev
Cc: Catalin Marinas <catalin.marinas@....com>, Marc Zyngier <maz@...nel.org>,
 Will Deacon <will@...nel.org>, James Morse <james.morse@....com>,
 Oliver Upton <oliver.upton@...ux.dev>,
 Suzuki K Poulose <suzuki.poulose@....com>, Zenghui Yu
 <yuzenghui@...wei.com>, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, Joey Gouly <joey.gouly@....com>,
 Alexandru Elisei <alexandru.elisei@....com>,
 Christoffer Dall <christoffer.dall@....com>, Fuad Tabba <tabba@...gle.com>,
 linux-coco@...ts.linux.dev,
 Ganapatrao Kulkarni <gankulkarni@...amperecomputing.com>,
 Gavin Shan <gshan@...hat.com>, Shanker Donthineni <sdonthineni@...dia.com>,
 Alper Gun <alpergun@...gle.com>
Subject: Re: [PATCH v4 18/43] arm64: RME: Handle realm enter/exit

On 22/08/2024 04:58, Aneesh Kumar K.V wrote:
> Steven Price <steven.price@....com> writes:
> 
>> +	/* Exit to VMM to complete the change */
>> +	kvm_prepare_memory_fault_exit(vcpu, base, top_ipa - base, false, false,
>> +				      ripas == 1);
>> +
> 
> 
> s/1/RMI_RAM ?

Ah, good spot - I must have missed that when I added the definitions.

> May be we can make it an enum like rsi_ripas

I guess that makes sense - I tend to avoid enums where the value is
controlled by something external, but here it makes some sense.

Thanks,

Steve

> modified   arch/arm64/include/asm/rmi_smc.h
> @@ -62,9 +62,11 @@
>  #define RMI_ERROR_REC		3
>  #define RMI_ERROR_RTT		4
>  
> -#define RMI_EMPTY		0
> -#define RMI_RAM			1
> -#define RMI_DESTROYED		2
> +enum rmi_ripas {
> +	RMI_EMPTY,
> +	RMI_RAM,
> +	RMI_DESTROYED,
> +};
>  
>  #define RMI_NO_MEASURE_CONTENT	0
>  #define RMI_MEASURE_CONTENT	1
> modified   arch/arm64/kvm/rme-exit.c
> @@ -112,7 +112,7 @@ static int rec_exit_ripas_change(struct kvm_vcpu *vcpu)
>  
>  	/* Exit to VMM to complete the change */
>  	kvm_prepare_memory_fault_exit(vcpu, base, top_ipa - base, false, false,
> -				      ripas == 1);
> +				      ripas == RMI_RAM);
>  
>  	return 0;
>  }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ