From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754790AbZEaCFS (ORCPT ); Sat, 30 May 2009 22:05:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752283AbZEaCFI (ORCPT ); Sat, 30 May 2009 22:05:08 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:42703 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751409AbZEaCFH (ORCPT ); Sat, 30 May 2009 22:05:07 -0400 Date: Sat, 30 May 2009 19:04:43 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: "Larry H." cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Rik van Riel , Alan Cox Subject: Re: [PATCH] Use kzfree in tty buffer management to enforce data sanitization In-Reply-To: <20090531015537.GA8941@oblivion.subreption.com> Message-ID: References: <20090531015537.GA8941@oblivion.subreption.com> User-Agent: Alpine 2.01 (LFD 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 30 May 2009, Larry H. wrote: > > This patch doesn't affect fastpaths. This patch is ugly as hell. You already know the size of the data to clear. If we actually wanted this (and I am in _no_way_ saying we do), the only sane thing to do is to just do memset(buf->data, 0, N_TTY_BUF_SIZE); if (PAGE_SIZE != N_TTY_BUF_SIZE) kfree(...) else free_page(...) but quite frankly, I'm not convinced about these patches at all. I'm also not in the least convinced about how you just dismiss everybodys concerns. Linus