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] [day] [month] [year] [list]
Message-Id: <20080507112708.623bc8fd.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Wed, 7 May 2008 11:27:07 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	Nick Piggin <npiggin@...e.de>,
	Mika Penttilä <mika.penttila@...umbus.fi>,
	Tony Battersby <tonyb@...ernetics.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] more ZERO_PAGE handling ( was 2.6.24 regression:
 deadlock on coredump of big process)

On Wed, 7 May 2008 11:14:04 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:

> > >  	pte = *ptep;
> > > -	if (!pte_present(pte))
> > > +	if (!pte_present(pte)) {
> > > +		if (!(flags & FOLL_WRITE) && pte_none(pte)) {
> > > +			pte_unmap_unlock(ptep, ptl);
> > > +			goto null_or_zeropage;
> > > +		}
> > >  		goto unlock;
> > > +	}
> > 
> > Just a small nitpick: I guess you don't need this FOLL_WRITE test because
> > null_or_zeropage will test FOLL_ANON which implies !FOLL_WRITE. It should give
> > slightly smaller code.
> > 
> > Otherwise, looks good to me:
> > 
> Hmm, but 
> 
> do_execve()
>   -> copy_strings()
>        -> get_arg_page()
>             -> get_user_pages()
> 
> can do write-page-fault in ANON (and it's a valid ops.)
> 
> So, I think it's safe not to remove FOLL_WRITE check here.
> 
BTW, in above case, returning ZERO_PAGE() when pgd/pud/pmd is not available is
safe ? (above path is expanding-stack at exec.)

Thanks,
-Kame




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