linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Simon Glass <sjg@chromium.org>
Cc: Yinghai Lu <yinghai@kernel.org>,
	Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Baoquan He <bhe@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>,
	Vivek Goyal <vgoyal@redhat.com>,
	Andy Lutomirski <luto@kernel.org>,
	Lasse Collin <lasse.collin@tukaani.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dave Young <dyoung@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/6] x86/boot: Move compressed kernel to end of decompression buffer
Date: Wed, 30 Nov 2016 18:52:22 +0200	[thread overview]
Message-ID: <CAHp75VdJ+2ibq8C8HdGXEZmCR5pRO6H_jjB4G0YF5cy3Tyu9JA@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ2HMiBOUJwVGqKnY5tyxZbp08Dm8DygmTuDtHBscEFn1Q@mail.gmail.com>

On Tue, Oct 4, 2016 at 12:50 AM, Simon Glass <sjg@chromium.org> wrote:
> HI Matt,
>
> On 16 August 2016 at 20:25, Matt Mullins <mmullins@mmlx.us> wrote:
>> On Tue, Aug 16, 2016 at 12:19:42PM -0700, Yinghai Lu wrote:
>>> On Mon, Aug 15, 2016 at 9:01 PM, Matt Mullins <mmullins@mmlx.us> wrote:
>>> >
>>> > This appears to have a negative effect on booting the Intel Edison platform, as
>>> > it uses u-boot as its bootloader.  u-boot does not copy the init_size parameter
>>> > when booting a bzImage: it copies a fixed-size setup_header [1], and its
>>> > definition of setup_header doesn't include the parameters beyond setup_data [2].
>>> >
>>> > With a zero value for init_size, this calculates a %rsp value of 0x101ff9600.
>>> > This causes the boot process to hard-stop at the immediately-following pushq, as
>>> > this platform has no usable physical addresses above 4G.
>>> >
>>> > What are the options for getting this type of platform to function again?  For
>>> > now, kexec from a working Linux system does seem to be a work-around, but there
>>> > appears to be other x86 hardware using u-boot: the chromium.org folks seem to be
>>> > maintaining the u-boot x86 tree.
>>> >
>>> > [1] http://git.denx.de/?p=u-boot.git;a=blob;f=arch/x86/lib/zimage.c;h=1b33c771391f49ffe82864ff1582bdfd07e5e97d;hb=HEAD#l156
>>> > [2] http://git.denx.de/?p=u-boot.git;a=blob;f=arch/x86/include/asm/bootparam.h;h=140095117e5a2daef0a097c55f0ed10e08acc781;hb=HEAD#l24
>>>
>>> Then should fix the u-boot about header_size assumption.
>>
>> I was hoping to avoid that, since the Edison's u-boot is 10,000-line patch atop
>> the upstream -- I don't trust myself to build and flash one quite yet.
>
> It would be good to upstream that!
>
>>
>> If this turned out to affect Chromebooks, I'd spend more effort pushing for
>> a kernel fix, but it seems that ChromeOS has a different kernel load procedure
>> and doesn't use "zboot".  For now, I'll probably just keep a local patch that
>> hard-codes a value large enough to decompress and launch the kernel.
>>
>> I may turn that local patch into something gated by a Kconfig eventually, in
>> hopes that users of the other x86 u-boot platforms will see it in a "make
>> oldconfig" run.
>
> Well, I think this patch is useful. But also, let's fix U-Boot.

Found this late.

Anyway, I have got same issue [1] and basically what I did, I just
deuglified a bit that monster hack pile for U-Boot to build my own
fork of most recent one [2].
For now on I have working x86_64 kernel directly and newest U-Boot.

[1] https://github.com/andy-shev/linux/issues/3
[2] https://github.com/andy-shev/u-boot/tree/edison

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2016-11-30 16:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29  0:09 [PATCH 0/6] x86/boot: Improve compressed kernel handling Kees Cook
2016-04-29  0:09 ` [PATCH 1/6] x86/KASLR: Handle kernel relocation above 2G Kees Cook
2016-04-29  8:02   ` [tip:x86/boot] x86/KASLR: Handle kernel relocations above 2G correctly tip-bot for Baoquan He
2016-04-29  0:09 ` [PATCH 2/6] x86/boot: Move compressed kernel to end of decompression buffer Kees Cook
2016-04-29  7:18   ` Ingo Molnar
2016-04-29  7:48     ` Kees Cook
2016-04-29  8:07       ` Ingo Molnar
2016-04-29  9:51         ` Ingo Molnar
2016-04-29  9:51   ` [tip:x86/boot] x86/boot: Move compressed kernel to the end of the " tip-bot for Yinghai Lu
2016-08-16  4:01   ` [PATCH 2/6] x86/boot: Move compressed kernel to end of " Matt Mullins
2016-08-16 19:19     ` Yinghai Lu
2016-08-17  2:25       ` Matt Mullins
2016-10-03 21:50         ` Simon Glass
2016-11-30 16:52           ` Andy Shevchenko [this message]
2016-04-29  0:09 ` [PATCH 3/6] x86/boot: Calculate decompression size during boot not build Kees Cook
2016-04-29  9:52   ` [tip:x86/boot] " tip-bot for Yinghai Lu
2016-04-29  0:09 ` [PATCH 4/6] x86/boot: Fix "run_size" calculation Kees Cook
2016-04-29  9:52   ` [tip:x86/boot] " tip-bot for Yinghai Lu
2016-04-29  0:09 ` [PATCH 5/6] x86/KASLR: Clean up unused code from old "run_size" Kees Cook
2016-04-29  9:52   ` [tip:x86/boot] x86/KASLR: Clean up unused code from old 'run_size' and rename it to 'kernel_total_size' tip-bot for Yinghai Lu
2016-04-29  0:09 ` [PATCH 6/6] x86/boot: Correctly bounds-check relocations Kees Cook
2016-04-29  9:53   ` [tip:x86/boot] " tip-bot for Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75VdJ+2ibq8C8HdGXEZmCR5pRO6H_jjB4G0YF5cy3Tyu9JA@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=bp@alien8.de \
    --cc=dyoung@redhat.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=lasse.collin@tukaani.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=sjg@chromium.org \
    --cc=vgoyal@redhat.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).