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: <20080507111404.871b8990.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Wed, 7 May 2008 11:14:04 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Nick Piggin <npiggin@...e.de>
Cc:	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, 30 Apr 2008 08:11:25 +0200
Nick Piggin <npiggin@...e.de> 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.

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