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: <4799914C.5060709@goop.org>
Date:	Thu, 24 Jan 2008 23:35:40 -0800
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	"Huang, Ying" <ying.huang@...el.com>
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

Huang, Ying 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.
>
> Signed-off-by: Huang Ying <ying.huang@...el.com>
>
> ---
>  arch/x86/kernel/efi.c    |   35 ++++++++++++++++++++++++++++++-----
>  arch/x86/kernel/efi_64.c |   26 ++++++--------------------
>  include/asm-x86/efi.h    |    1 -
>  3 files changed, 36 insertions(+), 26 deletions(-)
>
> --- a/arch/x86/kernel/efi.c
> +++ b/arch/x86/kernel/efi.c
> @@ -40,6 +40,8 @@
>  #include <asm/setup.h>
>  #include <asm/efi.h>
>  #include <asm/time.h>
> +#include <asm/cacheflush.h>
> +#include <asm/tlbflush.h>
>  
>  #define EFI_DEBUG	1
>  #define PFX 		"EFI: "
> @@ -379,6 +381,32 @@ void __init efi_init(void)
>  #endif
>  }
>  
> +#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
> +static void __init runtime_code_page_mkexec(void)
> +{
> +	efi_memory_desc_t *md;
> +	unsigned long end;
> +	void *p;
> +
> +	if (!(__supported_pte_mask & _PAGE_NX))
> +		return;
>   

On 32-bit non-PAE, _PAGE_NX == 0, so this if() statement should be 
sufficient to disable the whole function at compile time without needing 
the outer #if defined wrapper.

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