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:	Wed, 7 Jul 2010 11:56:01 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Russell King <rmk@....linux.org.uk>
Cc:	linux-kernel@...r.kernel.org, alan@...rguk.ukuu.org.uk,
	Anfei Zhou <anfei.zhou@...il.com>,
	Alexander Shishkin <virtuoso@...nd.org>,
	Siarhei Siamashka <siarhei.siamashka@...ia.com>,
	linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org
Subject: Re: [patch 071/149] ARM: 6166/1: Proper prefetch abort handling on
 pre-ARMv6

On Tue, Jul 06, 2010 at 11:58:15PM +0100, Russell King wrote:
> On Tue, Jul 06, 2010 at 04:06:18PM +0300, Kirill A. Shutemov wrote:
> > I've investigated the issue. It's reproducible if you try to jump to
> > the megabyte next to section mapping.
> 
> Okay, this is specific to the way that OMAP sets up its mappings, which
> is why it doesn't appear everywhere.
> 
> > On ARM one Linux PGD entry contains two hardware entry. But there is error
> > in do_translation_fault(). It's always call pmd_none() check for the first
> > entry of two, not for the entry corresponded to address. So in case if we
> > try to jump the megabyte next to section mapping, we will have inifinity
> > loop of translation faults.
> 
> Okay, now that we know _why_ it happens, I'm satisfied that the fix
> previously committed will help this situation.
> 
> > diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> > index 9634fe1..825b9da 100644
> > --- a/arch/arm/mm/fault.c
> > +++ b/arch/arm/mm/fault.c
> > @@ -406,7 +406,8 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
> >         pmd_k = pmd_offset(pgd_k, addr);
> >         pmd   = pmd_offset(pgd, addr);
> >  
> > -       if (pmd_none(*pmd_k))
> > +       index = (addr >> SECTION_SHIFT) & 1;
> > +       if (pmd_none(pmd_k[index]))
> 
> I do think this is extremely obscure, and therefore requires a comment
> to help people understand what is going on here and why.  Leaving it
> in the commit log would be an invitation for this to be needlessly
> cut'n'pasted.

Ok, I'll fix it.

But it seems that the problem is more global. Potentially, any of
pmd_none() check may produce false results. I don't see an easy way to fix
it.

It's not so big problem since we don't have [super]section in userspace,
but I guess, we want to have huge pages support in the future.

Any ideas how to fix it in the right way?

Does Linux VM still expect one PTE table per page?

CC list modified. Removed persons who unlikely interested in ARM-specific
stuff. linux-arm-kernel and linux-mm added.

-- 
 Kirill A. Shutemov
--
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