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]
Date:	Mon, 26 Jan 2009 12:44:27 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	npiggin@...e.de, linux-arch@...r.kernel.org,
	torvalds@...ux-foundation.org, rusty@...tcorp.com.au,
	travis@....com, linux-kernel@...r.kernel.org,
	venkatesh.pallipadi@...el.com, suresh.b.siddha@...el.com,
	arjan@...radead.org, hpa@...or.com, tglx@...utronix.de,
	Ying Han <yinghan@...gle.com>,
	Mike Waychison <mikew@...gle.com>
Subject: Re: [git pull] cpus4096 tree, part 3

On Mon, 26 Jan 2009 21:09:57 +0100
Ingo Molnar <mingo@...e.hu> wrote:

> ...
>
> Btw., regarding pagefault retry. The bits that are in -mm currently i 
> find a bit ugly:
> 
> > +++ a/arch/x86/mm/fault.c
> > @@ -799,7 +799,7 @@ void __kprobes do_page_fault(struct pt_r
> >  	struct vm_area_struct *vma;
> >  	int write;
> >  	int fault;
> > -	unsigned int retry_flag = FAULT_FLAG_RETRY;
> > +	int retry_flag = 1;
> >  
> >  	tsk = current;
> >  	mm = tsk->mm;
> > @@ -951,6 +951,7 @@ good_area:
> >  	}
> >  
> >  	write |= retry_flag;
> > +
> >  	/*
> >  	 * If for any reason at all we couldn't handle the fault,
> >  	 * make sure we exit gracefully rather than endlessly redo
> > @@ -969,8 +970,8 @@ good_area:
> >  	 * be removed or changed after the retry.
> >  	 */
> >  	if (fault & VM_FAULT_RETRY) {
> > -		if (write & FAULT_FLAG_RETRY) {
> > -			retry_flag &= ~FAULT_FLAG_RETRY;
> > +		if (retry_flag) {
> > +			retry_flag = 0;
> >  			goto retry;
> >  		}
> >  		BUG();
> 
> as this complicates every architecture with a 'can the fault be retried' 
> logic and open-coded retry loop.
> 
> But that logic is rather repetitive and once an architecture filters out 
> all its special in-kernel sources of faults and the hw quirks it has, the 
> handling of pte faults is rather generic and largely offloaded into 
> handle_pte_fault() already.
> 
> So when this patch was submitted a few weeks ago i suggested that retry 
> should be done purely in mm/memory.c instead, and the low level code 
> should at most be refactored to suit this method, but not complicated any 
> further.
> 
> Any deep reasons for why such a more generic approach is not desirable?
> 

Let's cc the people who wrote it.
--
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