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:	Thu, 7 Aug 2008 09:15:57 -0400
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Huang Ying <ying.huang@...el.com>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Pavel Machek <pavel@....cz>, nigel@...el.suspend2.net,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Andrew Morton <akpm@...ux-foundation.org>, mingo@...e.hu,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Kexec Mailing List <kexec@...ts.infradead.org>
Subject: Re: [PATCH 2/6] kexec jump: check code size in control page

On Thu, Aug 07, 2008 at 05:05:26PM +0800, Huang Ying wrote:
> Kexec/Kexec-jump requires code size in control page is less than
> PAGE_SIZE/2. This patch adds runtime checking for this.
> 
> Signed-off-by: Huang Ying <ying.huang@...el.com>
> 
> ---
>  arch/x86/kernel/machine_kexec_32.c   |    4 ++++
>  arch/x86/kernel/relocate_kernel_32.S |    3 +++
>  include/asm-x86/kexec.h              |    1 +
>  3 files changed, 8 insertions(+)
> 
> --- a/arch/x86/kernel/machine_kexec_32.c
> +++ b/arch/x86/kernel/machine_kexec_32.c
> @@ -92,6 +92,10 @@ int machine_kexec_prepare(struct kimage 
>  {
>  	if (nx_enabled)
>  		set_pages_x(image->control_code_page, 1);
> +
> +	BUG_ON((unsigned long)kexec_control_page_code_end - \
> +	       (unsigned long)relocate_kernel >= PAGE_SIZE/2);
> +

Hi Huang,

Run time check is better than nothing but I think in this case it would
be better if we can catch it at compile time. 

One of the methods will be to write a small program of your own and
put in script/ and at build time check for the size and flag error. May
be there are other better ways to do this.

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