lkml.org 
[lkml]   [2012]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Word-at-a-time dcache name accesses (was Re: .. anybody know of any filesystems that depend on the exact VFS 'namehash' implementation?)
On Fri, Mar 2, 2012 at 4:38 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>
> My biggest concern is what happens when this happens to be at the end of
> mapped kernel memory and we overrun the page?

Yes. It's very unlikely, and it never happens with the dentry data
itself (the name is always aligned for those).

But it *can* happen if:

- the page contains the filename we copied from user space

- the page is the last page mapped

- the filename is PATH_MAX in size (or very close)

- the last component is sufficiently unaligned

but I was thinking we'd just make sure not to free the last page, and
just solve it that way.

I was playing around with other ideas (take the page fault and fix it
up), but those are all really complicated when the notion of "don't
use the last page" is so much simpler.

Linus


\
 
 \ /
  Last update: 2012-03-03 02:01    [from the cache]
©2003-2011 Jasper Spaans