[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#805965: boot-s390-common, d390.ins: initrd overwrites kernel due to a low offset



On Tue, Nov 24, 2015 at 05:08:17PM +0000, Steve McIntyre wrote:
> On Tue, Nov 24, 2015 at 05:39:16PM +0100, Hendrik Brueckner wrote:
> >On Tue, Nov 24, 2015 at 01:00:13PM +0000, Steve McIntyre wrote:
> >> On Tue, Nov 24, 2015 at 12:38:16PM +0100, Hendrik Brueckner wrote:
> >> >
> >> >To correct this problem, please update the memory location to which
> >> >the initrd is loaded from 0x00800000 (8M) to 0x02000000 (32MB).
> >> >
> >> >The 0x02000000 memory location is the preferred and commonly used
> >> >memory location.   As far as I could see, this affects all d390.ins
> >> >files, as well as, the boot-s390-common files which create the
> >> >root.off file.
> >> 
> >> ACK, thanks for your report. In fact, just 2 weeks back Philipp Kern
> >> (in CC) has added some fixes in this exact area in debian-cd
> >> git. He's moved the root.bin up to 0x01000000 (16MB); I'd be happy to
> >> move it up to 0x02000000 as you suggest. Phil - what do you think?
> >
> >Actually, the best solution would be to calculate this offset dynamically,
> >and write the modified root.off and d390.ins file.  For the initrd offset
> >calcuation, take the size of the vmlinuz kernel image + 4MB (0x00400000).
> 
> OK, that's easy enough. Are there any alignment issues to worry about
> on top of that - do we have to pad that to the next 1MB, say?
> 
No alignment issues.  The initrd could be right after the kernel image.
Adding some space between prevents a potential move of the initrd.  The
kernel includes some checks to ensure the initrd does not collide, for
example, with the BSS section.  If it conflicts, the kernel moves the
initrd after these areas.  So providing some room between avoids some
memory copy operations.

Thanks and kind regards,
  Hendrik


Reply to: