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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 16 Jun 2016 13:17:44 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Hillf Danton <hillf.zj@...baba-inc.com>
Cc:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	linux-kernel <linux-kernel@...r.kernel.org>, linux-mm@...ck.org
Subject: Re: [PATCHv9-rebased2 11/37] mm: introduce do_set_pmd()

On Thu, Jun 16, 2016 at 05:15:22PM +0800, Hillf Danton wrote:
> > +
> > +static int do_set_pmd(struct fault_env *fe, struct page *page)
> > +{
> > +	struct vm_area_struct *vma = fe->vma;
> > +	bool write = fe->flags & FAULT_FLAG_WRITE;
> > +	unsigned long haddr = fe->address & HPAGE_PMD_MASK;
> > +	pmd_t entry;
> > +	int i, ret;
> > +
> > +	if (!transhuge_vma_suitable(vma, haddr))
> > +		return VM_FAULT_FALLBACK;
> > +
> > +	ret = VM_FAULT_FALLBACK;
> > +	page = compound_head(page);
> > +
> > +	fe->ptl = pmd_lock(vma->vm_mm, fe->pmd);
> > +	if (unlikely(!pmd_none(*fe->pmd)))
> > +		goto out;
> 
> Can we reply to the caller that fault is handled correctly(by
> resetting ret to zero before jump)?

It's non necessary handled. It's handled only if the pmd if huge. If it
points to pte table, we need to check relevant pte entry.

If pmd is huge it will caught by pte_alloc_one_map() later.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ