lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1212699119.3953.206.camel@calx>
Date:	Thu, 05 Jun 2008 15:51:59 -0500
From:	Matt Mackall <mpm@...enic.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Thomas Tuttle <ttuttle@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] pagemap: Require reads of /proc/pid/pagemap to be
	multiples of 8 (v2 of series)


On Thu, 2008-06-05 at 12:37 -0700, Andrew Morton wrote:
> On Thu, 5 Jun 2008 14:38:10 -0400
> "Thomas Tuttle" <ttuttle@...gle.com> wrote:
> 
> > This matches the behavior of /proc/kpage{count,flags}, and simplifies
> > the logic a bit.
> > 
> > I also changed out and end in struct pagemapread to be u64* instead of
> > char*, which makes put_user work the way it was intended.  (Before, it
> > was only copying the bottom byte of a pagemap entry, because the target
> > of the copy was a char*.)
> 
> This one is for 2.6.25.x?

This one is for 2.6.26. Something more like this for 2.6.25.x:

Because put_user bases its copy size on the size of the target pointer,
not the source, it was copying only 1 byte rather than the intended 8.

Spotted-by: Thomas Tuttle <ttuttle@...gle.com>
Signed-off-by: Matt Mackall <mpm@...enic.com>

diff -r 5030869d9ded fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.c	Thu Jun 05 04:01:40 2008 +0000
+++ b/fs/proc/task_mmu.c	Thu Jun 05 15:45:00 2008 -0500
@@ -531,7 +531,7 @@
 		return PM_END_OF_BUFFER;
 	}
 
-	if (put_user(pfn, pm->out))
+	if (put_user(pfn, (u64 *)pm->out))
 		return -EFAULT;
 	pm->out += PM_ENTRY_BYTES;
 	return 0;


-- 
Mathematics is the supreme nostalgia of our time.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ