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] [day] [month] [year] [list]
Date:	Mon, 11 Aug 2008 09:02:38 +0800
From:	Huang Ying <ying.huang@...el.com>
To:	Vivek Goyal <vgoyal@...hat.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 -v2 3/8] kexec jump: check code size in control page

Hi, Vivek,

On Fri, 2008-08-08 at 10:09 -0400, Vivek Goyal wrote:
[...]
> > --- a/arch/x86/kernel/relocate_kernel_32.S
> > +++ b/arch/x86/kernel/relocate_kernel_32.S
> > @@ -20,10 +20,11 @@
> >  #define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
> >  #define PAE_PGD_ATTR (_PAGE_PRESENT)
> >  
> > -/* control_page + PAGE_SIZE/2 ~ control_page + PAGE_SIZE * 3/4 are
> > - * used to save some data for jumping back
> > +/* control_page + KEXEC_CONTROL_CODE_MAX_SIZE
> > + * ~ control_page + PAGE_SIZE * 3/4 are used to save some data for
> > + * jumping back
> >   */
> 
> Hi Huang,
> 
> Above comment is not very clear. Can you please elaborate it. I thought
> that PAGE_SIZE/2 is used for control code and rest half is shared between
> kjump data and stack. What is PAGE_SIZE *3/4?

Yes. Rest half is shared between kjump data and stack. I will change it.

> > +++ b/arch/x86/kernel/vmlinux_check_32.lds.S
> > @@ -0,0 +1,7 @@
> > +/*
> > + * Link time checks
> > + */
> > +
> > +#include <asm/kexec.h>
> > +
> > +ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE,
> "kexec control code size is too big")
> 
> Will it make sense to move it into vmlinux_32.lds.S itself? Creating a
> separate
> file for a single check seems superfluous.

I hope other ones can use it. But for now, put it in vmlinux_32.lds.S is
better. I will change it.

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