Re: [Xen-devel] [PATCH RFC] xen/common: Do not tolerate xmalloc(0, ...)

2015-04-13 Thread Jan Beulich
>>> On 31.03.15 at 17:57, wrote: > Currently, _xmalloc() supports zero-sized allocations by returning a sentinel > poisoned pointer. > > I posit that there are no legitimate situation for any code in the > hypervisor > to make a zero sized allocation. I'm afraid there are, and we ran into them

Re: [Xen-devel] [PATCH RFC] xen/common: Do not tolerate xmalloc(0, ...)

2015-04-09 Thread Tim Deegan
At 16:57 +0100 on 31 Mar (1427821072), Andrew Cooper wrote: > Currently, _xmalloc() supports zero-sized allocations by returning a sentinel > poisoned pointer. > > I posit that there are no legitimate situation for any code in the hypervisor > to make a zero sized allocation. > > Furthermore, the

[Xen-devel] [PATCH RFC] xen/common: Do not tolerate xmalloc(0, ...)

2015-03-31 Thread Andrew Cooper
Currently, _xmalloc() supports zero-sized allocations by returning a sentinel poisoned pointer. I posit that there are no legitimate situation for any code in the hypervisor to make a zero sized allocation. Furthermore, the sentinel value will pass a NULL pointer check, and introduces an unnecess