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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <SN6PR02MB4157723E965FAF4C0A60CA57D488A@SN6PR02MB4157.namprd02.prod.outlook.com>
Date: Wed, 7 May 2025 15:48:35 +0000
From: Michael Kelley <mhklinux@...look.com>
To: "longli@...uxonhyperv.com" <longli@...uxonhyperv.com>, "K. Y. Srinivasan"
	<kys@...rosoft.com>, Haiyang Zhang <haiyangz@...rosoft.com>, Wei Liu
	<wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>, Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>, "linux-hyperv@...r.kernel.org"
	<linux-hyperv@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: Long Li <longli@...rosoft.com>
Subject: RE: [Patch v3 4/5] Drivers: hv: Use kzalloc for panic page allocation

From: longli@...uxonhyperv.com <longli@...uxonhyperv.com> Sent: Monday, May 5, 2025 5:57 PM
> 
> To prepare for removal of hv_alloc_* and hv_free* functions, use
> kzalloc/kfree directly for panic reporting page.
> 
> Signed-off-by: Long Li <longli@...rosoft.com>
> ---
>  drivers/hv/hv_common.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
> index a7d7494feaca..a5a6250b1a12 100644
> --- a/drivers/hv/hv_common.c
> +++ b/drivers/hv/hv_common.c
> @@ -272,7 +272,7 @@ static void hv_kmsg_dump_unregister(void)
>  	atomic_notifier_chain_unregister(&panic_notifier_list,
>  					 &hyperv_panic_report_block);
> 
> -	hv_free_hyperv_page(hv_panic_page);
> +	kfree(hv_panic_page);
>  	hv_panic_page = NULL;
>  }
> 
> @@ -280,7 +280,7 @@ static void hv_kmsg_dump_register(void)
>  {
>  	int ret;
> 
> -	hv_panic_page = hv_alloc_hyperv_zeroed_page();
> +	hv_panic_page = kzalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL);
>  	if (!hv_panic_page) {
>  		pr_err("Hyper-V: panic message page memory allocation failed\n");
>  		return;
> @@ -289,7 +289,7 @@ static void hv_kmsg_dump_register(void)
>  	ret = kmsg_dump_register(&hv_kmsg_dumper);
>  	if (ret) {
>  		pr_err("Hyper-V: kmsg dump register error 0x%x\n", ret);
> -		hv_free_hyperv_page(hv_panic_page);
> +		kfree(hv_panic_page);
>  		hv_panic_page = NULL;
>  	}
>  }
> --
> 2.34.1
> 

Reviewed-by: Michael Kelley <mhklinux@...look.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ