|
Message-ID: <1518634058.3678.15.camel@perches.com> Date: Wed, 14 Feb 2018 10:47:38 -0800 From: Joe Perches <joe@...ches.com> To: Matthew Wilcox <willy@...radead.org>, Andrew Morton <akpm@...ux-foundation.org> Cc: Matthew Wilcox <mawilcox@...rosoft.com>, linux-mm@...ck.org, Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org, kernel-hardening@...ts.openwall.com Subject: Re: [PATCH 0/2] Add kvzalloc_struct to complement kvzalloc_array On Wed, 2018-02-14 at 10:26 -0800, Matthew Wilcox wrote: > From: Matthew Wilcox <mawilcox@...rosoft.com> > > We all know the perils of multiplying a value provided from userspace > by a constant and then allocating the resulting number of bytes. That's > why we have kvmalloc_array(), so we don't have to think about it. > This solves the same problem when we embed one of these arrays in a > struct like this: > > struct { > int n; > unsigned long array[]; > }; I think expanding the number of allocation functions is not necessary.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.