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: <f6115867-281d-4c97-87d2-3698e6474b7a@linux.microsoft.com>
Date: Wed, 26 Feb 2025 14:59:53 -0800
From: Nuno Das Neves <nunodasneves@...ux.microsoft.com>
To: mhklinux@...look.com, kys@...rosoft.com, haiyangz@...rosoft.com,
 wei.liu@...nel.org, decui@...rosoft.com, tglx@...utronix.de,
 mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
 lpieralisi@...nel.org, kw@...ux.com, manivannan.sadhasivam@...aro.org,
 robh@...nel.org, bhelgaas@...gle.com, arnd@...db.de
Cc: x86@...nel.org, linux-hyperv@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
 linux-arch@...r.kernel.org
Subject: Re: [PATCH 1/7] x86/hyperv: Fix output argument to hypercall that
 changes page visibility

On 2/26/2025 12:06 PM, mhkelley58@...il.com wrote:
> From: Michael Kelley <mhklinux@...look.com>
> 
> The hypercall in hv_mark_gpa_visibility() is invoked with an input
> argument and an output argument. The output argument ostensibly returns
> the number of pages that were processed. But in fact, the hypercall does
> not provide any output, so the output argument is spurious.
> 
> The spurious argument is harmless because Hyper-V ignores it, but in the
> interest of correctness and to avoid the potential for future problems,
> remove it.
> 
> Signed-off-by: Michael Kelley <mhklinux@...look.com>
> ---
> I have not provided a "Fixes:" tag because the error causes no impact.
> There's no value in backporting the fix.
> 
>  arch/x86/hyperv/ivm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c
> index dd68d9ad9b22..ec7880271cf9 100644
> --- a/arch/x86/hyperv/ivm.c
> +++ b/arch/x86/hyperv/ivm.c
> @@ -464,7 +464,6 @@ static int hv_mark_gpa_visibility(u16 count, const u64 pfn[],
>  			   enum hv_mem_host_visibility visibility)
>  {
>  	struct hv_gpa_range_for_visibility *input;
> -	u16 pages_processed;
>  	u64 hv_status;
>  	unsigned long flags;
>  
> @@ -493,7 +492,7 @@ static int hv_mark_gpa_visibility(u16 count, const u64 pfn[],
>  	memcpy((void *)input->gpa_page_list, pfn, count * sizeof(*pfn));
>  	hv_status = hv_do_rep_hypercall(
>  			HVCALL_MODIFY_SPARSE_GPA_PAGE_HOST_VISIBILITY, count,
> -			0, input, &pages_processed);
> +			0, input, NULL);
>  	local_irq_restore(flags);
>  
>  	if (hv_result_success(hv_status))

Reviewed-by: Nuno Das Neves <nunodasneves@...ux.microsoft.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ