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]
Date:	Fri, 10 Dec 2010 00:20:28 +0000
From:	Hank Janssen <hjanssen@...rosoft.com>
To:	Jesper Juhl <jj@...osbits.net>,
	Ky Srinivasan <ksrinivasan@...ell.com>
CC:	"zbr@...emap.net" <zbr@...emap.net>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"virtualization@...ts.osdl.org" <virtualization@...ts.osdl.org>,
	"gregkh@...e.de" <gregkh@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Haiyang Zhang <haiyangz@...rosoft.com>
Subject: RE: [PATCH 1/1] Properly check return values of kmalloc and
 vmbus_recvpacket



> -----Original Message-----
> From: Jesper Juhl [mailto:jj@...osbits.net]
> Sent: Thursday, December 09, 2010 4:11 PM
> On Thu, 9 Dec 2010, Ky Srinivasan wrote:
> > I am wondering if it might be better to allocate a page during module
> > startup for dealing with some of these services. Since the protocol
> > guarantees that there cannot be more than one outstanding request from
> > the host side, having a pre-allocated receive buffer would be a more
> > robust solution - we don't have to allocate memory when we cannot
> > afford to sleep and thereby don't have to deal with a class of failure
> > conditions that are not easy to deal with. For instance not being able
> > to shut the guest down because of low memory situation would be bad.
> >
> 
> IMVHO; nicer to have a module fail at load time with ENOMEM than having
> failures later. If memory requirement is known at load time (and is fairly low),
> just allocate what's needed then and then there's no unexpected failure
> later.

Agreed, That is a way neater implementation. I will correct and resubmit.

Thanks,

Hank.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ