Re: [PATCH 1/8] x86, kaslr: get kaslr_enabled back correctly

From: Yinghai Lu
Date: Mon Mar 02 2015 - 13:58:28 EST


On Mon, Mar 2, 2015 at 6:53 AM, Borislav Petkov <bp@xxxxxxx> wrote:
> Well, it seems to work here but it still doesn't look reliable enough to
> me. And this addon_zo thing of arbitrary 256K is strange.

Thanks for check that out.

That is not arbitrary number. Need to make that bigger than _end - _rodata

> objdump -t arch/x86/boot/compressed/vmlinux | grep \ _end
0000000000996000 g .pgtable 0000000000000000 _end
> objdump -t arch/x86/boot/compressed/vmlinux | grep \ _rodata
0000000000981780 g .rodata 0000000000000000 _rodata

We only get that size after arch/x86/boot/compressed/vmlinux

but need number during building kernel vmlinux.

other way would be just increase init_size in arch/x86/boot/header.S
instead of put it BRK area.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/