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] [thread-next>] [day] [month] [year] [list]
Message-Id: <1201253177.15972.57.camel@caritas-dev.intel.com>
Date:	Fri, 25 Jan 2008 17:26:17 +0800
From:	"Huang, Ying" <ying.huang@...el.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>, Andi Kleen <ak@...e.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] x86: fix some bugs about EFI runtime code mapping

On Fri, 2008-01-25 at 10:16 +0100, Ingo Molnar wrote:
> * Huang, Ying <ying.huang@...el.com> wrote:
> 
> > This patch fixes some bugs of making EFI runtime code executable.
> > 
> > - Use change_page_attr in i386 too. Because the runtime code may be
> >   mapped not through ioremap.
> > 
> > - If there is no _PAGE_NX in __supported_pte_mask, the change_page_attr
> >   is not called.
> > 
> > - Make efi_ioremap map pages as PAGE_KERNEL_EXEC, because EFI runtime
> >   code may be mapped through efi_ioremap.
> 
> thanks, applied.
> 
> note that here:
> 
> > -		set_fixmap_nocache(FIX_EFI_IO_MAP_FIRST_PAGE - pages_mapped,
> > -				   offset);
> > +		__set_fixmap(FIX_EFI_IO_MAP_FIRST_PAGE - pages_mapped,
> > +			     offset, PAGE_KERNEL_EXEC);
> 
> you've changed it from nocache-noexec to cached-exec. I suspect that's 
> what we want - except if an early EFI area can be non-prefetchable 
> device memory. Can that ever happen? Would you like to have 
> PAGE_KERNEL_NOCACHE_EXEC perhaps? I implemented that yesterday but did 
> not commit it yet. (see the patch below)

Yes. EFI area can be non-prefetchable device memory. I should use
PAGE_KERNEL_NOCACHE_EXEC.

A question about this:

The MTRR on x86 should have set the memory area as un-cachable. Why do
we bother to set it in page table?

Best Regards,
Huang Ying

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