[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOi1vP8-8WWF7e=L34Hq7pcS+XhV0K3pBrBzkTsNeiO8caf4uw@mail.gmail.com>
Date: Wed, 25 Jan 2017 14:40:17 +0100
From: Ilya Dryomov <idryomov@...il.com>
To: Michal Hocko <mhocko@...nel.org>
Cc: Vlastimil Babka <vbabka@...e.cz>,
Kees Cook <keescook@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>,
David Rientjes <rientjes@...gle.com>,
Mel Gorman <mgorman@...e.de>,
Johannes Weiner <hannes@...xchg.org>,
Al Viro <viro@...iv.linux.org.uk>,
Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Ben Skeggs <bskeggs@...hat.com>,
Kent Overstreet <kent.overstreet@...il.com>,
Santosh Raspatur <santosh@...lsio.com>,
Hariprasad S <hariprasad@...lsio.com>,
Tariq Toukan <tariqt@...lanox.com>,
Yishai Hadas <yishaih@...lanox.com>,
Dan Williams <dan.j.williams@...el.com>,
Oleg Drokin <oleg.drokin@...el.com>,
Andreas Dilger <andreas.dilger@...el.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
David Sterba <dsterba@...e.com>,
"Yan, Zheng" <zyan@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants
On Wed, Jan 25, 2017 at 2:09 PM, Michal Hocko <mhocko@...nel.org> wrote:
> On Wed 25-01-17 12:15:59, Vlastimil Babka wrote:
>> On 01/24/2017 04:00 PM, Michal Hocko wrote:
>> > > > Well, I am not opposed to kvmalloc_array but I would argue that this
>> > > > conversion cannot introduce new overflow issues. The code would have
>> > > > to be broken already because even though kmalloc_array checks for the
>> > > > overflow but vmalloc fallback doesn't...
>> > >
>> > > Yeah I agree, but if some of the places were really wrong, after the
>> > > conversion we won't see them anymore.
>> > >
>> > > > If there is a general interest for this API I can add it.
>> > >
>> > > I think it would be better, yes.
>> >
>> > OK, fair enough. I will fold the following into the original patch. I
>> > was little bit reluctant to create kvcalloc so I've made the original
>> > callers more talkative and added | __GFP_ZERO.
>>
>> Fair enough,
>>
>> > To be honest I do not
>> > really like how kcalloc...
>>
>> how kcalloc what?
>
> how kcalloc hides the GFP_ZERO and the name doesn't reflect that.
The userspace calloc() is specified to zero memory, so I'd say the name
does reflect that.
Thanks,
Ilya
Powered by blists - more mailing lists