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]
Date:	Mon, 27 Jun 2011 20:15:59 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Shawn Bohrer <sbohrer@...advisors.com>
Cc:	Darren Hart <dvhart@...ux.intel.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	eric.dumazet@...il.com, david@...advisors.com,
	linux-kernel@...r.kernel.org, zvonler@...advisors.com,
	hughd@...gle.com, tglx@...utronix.de, mingo@...e.hu
Subject: Re: [PATCH v2] futex: Fix regression with read only mappings

On Mon, 2011-06-27 at 11:40 -0500, Shawn Bohrer wrote:
> > >     if (PageAnon(page_head)) {
> > 
> > This bit needs a comment too (unless I am the only one to whom this
> was
> > non-obvious), maybe:
> > 
> >               
> >               /*
> >                * A read-only anonymous page implies a COW on a
> >                * MAP_PRIVATE mapping. There is no sane use-case
> >                * for this scenario, return -EFAULT to userspace.
> >                */
> 
> Your comment is wrong.  Unfortunately the code is completly
> non-obvious to me as well, and I have no idea why it is there.  This
> little snippet came from Peter's suggested fix in:
> 
> https://lkml.org/lkml/2011/6/6/368
> 
> Sadly Peter's gone silent and I'm left wondering if he knew some
> corner case that should return -EFAULT with a RO anonymous page or if
> he _thought_ this was preventing RO MAP_PRIVATE mappings.  If it is
> the latter then this block can be removed because it does NOT do that.
> > > +           if (ro) {
> > > +                   err = -EFAULT;
> > > +                   goto out;
> > > +           }
> > > + 

Peter simply gets too much email.. anyway, the reason I put that there
is that a RO Anon page will never change and is thus a little pointless
to use for futex ops.


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