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] [day] [month] [year] [list]
Message-ID: <20240907035748.GA5769@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
Date: Fri, 6 Sep 2024 20:57:48 -0700
From: Saurabh Singh Sengar <ssengar@...ux.microsoft.com>
To: Dexuan Cui <decui@...rosoft.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

On Sat, Sep 07, 2024 at 12:49:59AM +0000, Dexuan Cui wrote:
> > 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
> 

make sense, thanks.

- Saurabh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ