[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <18102.43459.440189.123024@gargle.gargle.HOWL>
Date: Sun, 5 Aug 2007 23:55:31 -0500
From: boutcher@...umn.edu (Dave Boutcher)
To: Matt Mackall <mpm@...enic.com>
Cc: Dave Boutcher <boutcher@...umn.edu>, linux-kernel@...r.kernel.org,
Dave Hansen <haveblue@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] Fix /proc/pid/pagemap return length calculation
On Sun, 5 Aug 2007 22:34:46 -0500, Matt Mackall <mpm@...enic.com> said:
>
> On Sun, Aug 05, 2007 at 09:03:23PM -0500, Dave Boutcher wrote:
>>
>> /proc/pid/pagemap has a header (usually 8 bytes) the length
>> of which needs to be compensated for when converting from
>> proc file offset to page number. The calculation of the
>> starting page number (svpfn) compensates for this, but the
>> calculation of the ending page number (evpfn) does not, resulting
>> in reads returning 8 bytes more than were asked for and
>> nastily overwriting userspace memory.
>
> Does this mean you're running on a 64-bit arch? I'd already fixed this
> locally, but it was off by 4 for me.
>
> Acked-by: Matt Mackall <mpm@...enic.com>
Yeah, and there is going to be at least one more patch coming, since
with this fix, which is a righteous fix, things don't get copied up to
user space correctly since some other code was dependent on the borken
length :-)
I like the /proc/xxx/pagemap function though...thanks for writing it.
Dave B
-
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