[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84144f020905302327t36966003ufce87cf646d649a6@mail.gmail.com>
Date: Sun, 31 May 2009 09:27:09 +0300
From: Pekka Enberg <penberg@...helsinki.fi>
To: "Larry H." <research@...reption.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Rik van Riel <riel@...hat.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH] Use kzfree in tty buffer management to enforce data
sanitization
Hi Larry,
On Sat, 30 May 2009, Larry H. wrote:
>>> This patch doesn't affect fastpaths.
On 19:04 Sat 30 May, Linus Torvalds wrote:
>> 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(...)
>>
On Sun, May 31, 2009 at 5:35 AM, Larry H. <research@...reption.com> wrote:
> It wasn't me who proposed using kzfree in these places. Ask Ingo and
> Peter or refer to the entire thread about my previous patches.
Nobody suggested using kzfree() in this _specific_place_. It's obvious
that memset() is a better solution here given the current constraints
of the code as demonstrated by Linus' patch.
Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists