Re: [PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-30 Thread Kees Cook
On Mon, Jan 30, 2017 at 1:49 AM, Michal Hocko wrote: > From: Michal Hocko > > There are many code paths opencoding kvmalloc. Let's use the helper > instead. The main difference to kvmalloc is that those users are usually > not considering all the aspects of

Re: [PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-30 Thread Vlastimil Babka
On 01/30/2017 10:49 AM, Michal Hocko wrote: From: Michal Hocko There are many code paths opencoding kvmalloc. Let's use the helper instead. The main difference to kvmalloc is that those users are usually not considering all the aspects of the memory allocator. E.g. allocation

Re: [PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-30 Thread Leon Romanovsky
On Mon, Jan 30, 2017 at 10:49:36AM +0100, Michal Hocko wrote: > From: Michal Hocko > > There are many code paths opencoding kvmalloc. Let's use the helper > instead. The main difference to kvmalloc is that those users are usually > not considering all the aspects of the memory

[PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-30 Thread Michal Hocko
From: Michal Hocko There are many code paths opencoding kvmalloc. Let's use the helper instead. The main difference to kvmalloc is that those users are usually not considering all the aspects of the memory allocator. E.g. allocation requests <= 32kB (with 4kB pages) are