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: <20090625100413.GD29980@elte.hu>
Date:	Thu, 25 Jun 2009 12:04:13 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Darren Hart <dvhltc@...ibm.com>
Subject: Re: [GIT pull] futex fixes for 2.6.31


* Thomas Gleixner <tglx@...utronix.de> wrote:

> On Thu, 25 Jun 2009, Zhang, Yanmin wrote:
> > On Wed, 2009-06-24 at 21:48 +0200, Thomas Gleixner wrote:
> > > +static int fault_in_user_writeable(u32 __user *uaddr)
> > > +{
> > > +	int ret = get_user_pages(current, current->mm, (unsigned long)uaddr,
> > > +				 sizeof(*uaddr), 1, 0, NULL, NULL);
> > The 4th parameter of get_user_pages means page number. sizeof(*uaddr) is equal to
> > 4, so you want 4 pages?
> 
> Grrr. I looked up the prototype of it in include/linux/mm.h:
> 
> int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
> 			unsigned long start, int len, int write, int force,
> 			struct page **pages, struct vm_area_struct **vmas);
> 
> len == number of pages ! How intutitive. :(
> 
> I guess Linus tripped over it as well. See:
> http://lkml.org/lkml/2009/6/21/95

heh, and then i suggested to you to change the '4' to sizeof(u32) 
;-)

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