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:
 <SJ0PR21MB13245A34AC4AC3638F2108DCBF9F2@SJ0PR21MB1324.namprd21.prod.outlook.com>
Date: Sat, 7 Sep 2024 00:49:59 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: Saurabh Singh Sengar <ssengar@...ux.microsoft.com>
CC: Zhu Jun <zhujun2@...s.chinamobile.com>, KY Srinivasan <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>, "wei.liu@...nel.org"
	<wei.liu@...nel.org>, "linux-hyperv@...r.kernel.org"
	<linux-hyperv@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] tools/hv: Add memory allocation check in
 hv_fcopy_start

> From: Saurabh Singh Sengar <ssengar@...ux.microsoft.com>
> Sent: Wednesday, September 4, 2024 10:21 PM
>  [...]
> hv_fcopy_send_data is the parent function which calls hv_fcopy_start.
> Possibly a good solution is to check the return value from
> hv_fcopy_send_data

The return value of hv_fcopy_send_data() is saved into icmsghdr->status, which
is sent to the host, so the PowerShell command on the host will report an error
immediately.

> in fcopy_pkt_process function. Otherwise I prefer exit over returning error.
> 
> And as you rightly pointed out if we use exit, there is no sense of using free.
> 
> - Saurabh

exit() here is not ideal in that the host doesn't know what's going on inside
the VM, and I guess the host PowerShell command will time out after quite
a while. Without exit(), the daemon can continue to run to accept the next
requests from the host; with exit(), we rely on systemd's Restart=on-failure.
I prefer not to call exit() here.

Thanks,
Dexuan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ