From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261877AbVHFNKQ (ORCPT ); Sat, 6 Aug 2005 09:10:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261900AbVHFNKQ (ORCPT ); Sat, 6 Aug 2005 09:10:16 -0400 Received: from courier.cs.helsinki.fi ([128.214.9.1]:36325 "EHLO mail.cs.helsinki.fi") by vger.kernel.org with ESMTP id S261877AbVHFNKN (ORCPT ); Sat, 6 Aug 2005 09:10:13 -0400 Subject: Re: [PATCH] kernel: use kcalloc instead kmalloc/memset From: Pekka Enberg To: Roman Zippel Cc: Arjan van de Ven , Andrew Morton , linux-kernel@vger.kernel.org, pmarques@grupopie.com In-Reply-To: References: <1123219747.20398.1.camel@localhost> <20050804223842.2b3abeee.akpm@osdl.org> <20050804233634.1406e92a.akpm@osdl.org> <1123235219.3239.46.camel@laptopd505.fenrus.org> <1123236831.3239.55.camel@laptopd505.fenrus.org> <1123238289.3239.57.camel@laptopd505.fenrus.org> <1123240325.3239.62.camel@laptopd505.fenrus.org> Date: Sat, 06 Aug 2005 16:09:40 +0300 Message-Id: <1123333780.11074.15.camel@haji.ri.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.2.3 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2005-08-06 at 02:40 +0200, Roman Zippel wrote: > I actually looked at the current kcalloc users and besides a few unchecked > module parameters, the arguments were either constant or had to be checked > anyway. I didn't find a single example which required the "safety" of > kcalloc(). Every caller of kcalloc() should do proper bounds checking. It's just that when they forget to do it, we hopefully avoid a buffer overflow which can be exploited. Pekka