lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] mm: Avoid putting a bad page back on the LRU
On Mon, 28 Apr 2008 14:23:58 -0500
Russ Anderson <rja@sgi.com> wrote:

> --- test.orig/include/linux/kernel.h 2008-04-25 15:22:07.640501421 -0500
> +++ test/include/linux/kernel.h 2008-04-25 15:42:02.826266036 -0500
> @@ -412,6 +412,7 @@ struct sysinfo {
> unsigned long totalhigh; /* Total high memory size */
> unsigned long freehigh; /* Available high memory size */
> unsigned int mem_unit; /* Memory unit size in bytes */
> + unsigned int badpages; /* Number of bad (PG_memerror) pages */
> char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
> };

eek. sys_sysinfo() copies this structure out to userspace verbatim.
Increasing its size by four bytes will cause memory scribbles in userspace
applications.

That's fixable by suitably adjusting sysinfo._f, but given the lack of
version information in the sysinfo struct, I'm not sure how useful this
change really is.



\
 
 \ /
  Last update: 2008-04-29 23:35    [W:0.039 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site