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]
Message-ID: <m18xm9425s.fsf@ebiederm.dsl.xmission.com>
Date:	Mon, 31 Jul 2006 20:31:43 -0600
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	vgoyal@...ibm.com
Cc:	fastboot@...l.org, Horms <horms@...ge.net.au>,
	Jan Kratochvil <lace@...kratochvil.net>,
	"H. Peter Anvin" <hpa@...or.com>,
	Magnus Damm <magnus.damm@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [Fastboot] [CFT] ELF Relocatable x86 and x86_64 bzImages

Vivek Goyal <vgoyal@...ibm.com> writes:

> On Mon, Jul 31, 2006 at 04:25:20PM -0400, Vivek Goyal wrote:
>> On Mon, Jul 31, 2006 at 10:19:04AM -0600, Eric W. Biederman wrote:
>> > 
>> > I have spent some time and have gotten my relocatable kernel patches
>> > working against the latest kernels.  I intend to push this upstream
>> > shortly.
>> > 
>> > Could all of the people who care take a look and test this out
>> > to make certain that it doesn't just work on my test box?
>> > 
>> Hi Eric,
>> 
>> Currently I am testing your patches on i386. With CONFIG_RELOCATABLE=y
>> kernel boots fine and kexec also works.
>> 
>> But my kernel hangs on kexec on panic case. It hangs early in 
>> decompress_kernel(). Kernel hangs at following condition.
>> 
>> +       if (((u32)output - CONFIG_PHYSICAL_START) & 0x3fffff)
>> +               error("Destination address not 4M aligned");
>> 

As for the missing print.  Did you have an appropriate earlyprintk?

> Ok. I am decompressing the kernel to 16MB and after reducing 1MB of
> CONFIG_PHYSICAL_START I am left with 15MB which is not 4M aligned
> hence I seems to be running into it.
>
> I changed it to
>
> if ((u32)output) & 0x3fffff)
>
> and kdump kernel booted fine. But this will run into issues if I load
> kernel at 1MB.
>
> I got a dump question. Why do I have to load the kernel at 4MB alignment?
> Existing kernel boots loads at 1MB, which is non 4MB aligned and it works
> fine?

4MB is a little harsh, but I haven't worked through what the exact rules
are, I know 4MB is the worst case alignment for arch/i386.

The rule is that we have to be at the same offset from 4MB as we
were built to run at.  So in this case address where (address %4MB) == 1MB.

We might be able to get away with 2MB alignment.  I thought kexec-tools
did that calculation automatically for an ET_DYN image but it has been
a while since I looked.

My goal with the check was to catch problems early before something
bad happened.

Eric

-
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