Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Kees Cook
On Tue, Mar 10, 2015 at 1:00 AM, Borislav Petkov wrote: > Final patch: > > --- > From: Yinghai Lu > Date: Sat, 7 Mar 2015 14:07:16 -0800 > Subject: [PATCH] x86/setup: Move compressed kernel to the end of the buffer > > Boris found that passing KASLR status through setup_data from the boot >

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Borislav Petkov
On Tue, Mar 10, 2015 at 08:11:03AM -0700, Yinghai Lu wrote: > Also stop using "compressed kernel" please, that is confusing. Why? > Just use > > ZO: arch/x86/boot/compressed/vmlinux > VO: vmlinux and this is not confusing? Yeah, right. -- Regards/Gruss, Boris. ECO tip #101: Trim your

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Yinghai Lu
On Tue, Mar 10, 2015 at 1:00 AM, Borislav Petkov wrote: > Final patch: > > --- > From: Yinghai Lu > Date: Sat, 7 Mar 2015 14:07:16 -0800 > Subject: [PATCH] x86/setup: Move compressed kernel to the end of the buffer setup should only about arch/x86/boot/setup.ld related. So please keep x86,

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Borislav Petkov
On Tue, Mar 10, 2015 at 10:34:31AM +0100, Jiri Kosina wrote: > Thanks a lot for fixing my oversight. Bah, it was my suggestion to use setup_data in the first place, sorry about that. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list:

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Jiri Kosina
On Tue, 10 Mar 2015, Borislav Petkov wrote: > Final patch: > > --- > From: Yinghai Lu > Date: Sat, 7 Mar 2015 14:07:16 -0800 > Subject: [PATCH] x86/setup: Move compressed kernel to the end of the buffer [ ... ] > Signed-off-by: Yinghai Lu > Cc: "H. Peter Anvin" > Cc: Matt Fleming > Cc: Kees

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Borislav Petkov
Final patch: --- From: Yinghai Lu Date: Sat, 7 Mar 2015 14:07:16 -0800 Subject: [PATCH] x86/setup: Move compressed kernel to the end of the buffer Boris found that passing KASLR status through setup_data from the boot stage cannot be used later in the kernel stage, see commit f47233c2d34f

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Borislav Petkov
On Mon, Mar 09, 2015 at 05:54:01PM -0700, Kees Cook wrote: > On Sat, Mar 7, 2015 at 2:07 PM, Yinghai Lu wrote: > > Boris found data from boot stage can not be used kernel stage. > > "... be used during kernel stage." > > Also, can you give a specific example of this problem? (Which data, used

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Borislav Petkov
On Mon, Mar 09, 2015 at 05:54:01PM -0700, Kees Cook wrote: On Sat, Mar 7, 2015 at 2:07 PM, Yinghai Lu ying...@kernel.org wrote: Boris found data from boot stage can not be used kernel stage. ... be used during kernel stage. Also, can you give a specific example of this problem? (Which

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Jiri Kosina
On Tue, 10 Mar 2015, Borislav Petkov wrote: Final patch: --- From: Yinghai Lu ying...@kernel.org Date: Sat, 7 Mar 2015 14:07:16 -0800 Subject: [PATCH] x86/setup: Move compressed kernel to the end of the buffer [ ... ] Signed-off-by: Yinghai Lu ying...@kernel.org Cc: H. Peter Anvin

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Borislav Petkov
On Tue, Mar 10, 2015 at 10:34:31AM +0100, Jiri Kosina wrote: Thanks a lot for fixing my oversight. Bah, it was my suggestion to use setup_data in the first place, sorry about that. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list:

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Kees Cook
On Tue, Mar 10, 2015 at 1:00 AM, Borislav Petkov b...@suse.de wrote: Final patch: --- From: Yinghai Lu ying...@kernel.org Date: Sat, 7 Mar 2015 14:07:16 -0800 Subject: [PATCH] x86/setup: Move compressed kernel to the end of the buffer Boris found that passing KASLR status through

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Yinghai Lu
On Tue, Mar 10, 2015 at 1:00 AM, Borislav Petkov b...@suse.de wrote: Final patch: --- From: Yinghai Lu ying...@kernel.org Date: Sat, 7 Mar 2015 14:07:16 -0800 Subject: [PATCH] x86/setup: Move compressed kernel to the end of the buffer setup should only about arch/x86/boot/setup.ld related.

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Borislav Petkov
On Tue, Mar 10, 2015 at 08:11:03AM -0700, Yinghai Lu wrote: Also stop using compressed kernel please, that is confusing. Why? Just use ZO: arch/x86/boot/compressed/vmlinux VO: vmlinux and this is not confusing? Yeah, right. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-10 Thread Borislav Petkov
Final patch: --- From: Yinghai Lu ying...@kernel.org Date: Sat, 7 Mar 2015 14:07:16 -0800 Subject: [PATCH] x86/setup: Move compressed kernel to the end of the buffer Boris found that passing KASLR status through setup_data from the boot stage cannot be used later in the kernel stage, see commit

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-09 Thread Yinghai Lu
On Mon, Mar 9, 2015 at 5:54 PM, Kees Cook wrote: > On Sat, Mar 7, 2015 at 2:07 PM, Yinghai Lu wrote: >> Boris found data from boot stage can not be used kernel stage. > > "... be used during kernel stage." > > Also, can you give a specific example of this problem? (Which data, used how?) > >>

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-09 Thread Kees Cook
On Sat, Mar 7, 2015 at 2:07 PM, Yinghai Lu wrote: > Boris found data from boot stage can not be used kernel stage. "... be used during kernel stage." Also, can you give a specific example of this problem? (Which data, used how?) > Bootloader allocate buffer according to init_size in hdr, and

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-09 Thread Yinghai Lu
On Mon, Mar 9, 2015 at 5:54 PM, Kees Cook keesc...@chromium.org wrote: On Sat, Mar 7, 2015 at 2:07 PM, Yinghai Lu ying...@kernel.org wrote: Boris found data from boot stage can not be used kernel stage. ... be used during kernel stage. Also, can you give a specific example of this problem?

Re: [PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-09 Thread Kees Cook
On Sat, Mar 7, 2015 at 2:07 PM, Yinghai Lu ying...@kernel.org wrote: Boris found data from boot stage can not be used kernel stage. ... be used during kernel stage. Also, can you give a specific example of this problem? (Which data, used how?) Bootloader allocate buffer according to init_size

[PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-07 Thread Yinghai Lu
Boris found data from boot stage can not be used kernel stage. Bootloader allocate buffer according to init_size in hdr, and load the ZO (arch/x86/boot/compressed/vmlinux) from start of that buffer. During running of ZO, ZO move itself to the middle of buffer at z_extract_offset to make sure that

[PATCH v3 2/7] x86, boot: Move ZO to end of buffer

2015-03-07 Thread Yinghai Lu
Boris found data from boot stage can not be used kernel stage. Bootloader allocate buffer according to init_size in hdr, and load the ZO (arch/x86/boot/compressed/vmlinux) from start of that buffer. During running of ZO, ZO move itself to the middle of buffer at z_extract_offset to make sure that