svn commit: r296428 - head/sys/boot/common

Julian Elischer julian at freebsd.org
Mon Mar 7 01:11:25 UTC 2016


On 6/03/2016 7:57 AM, Dimitry Andric wrote:
> Author: dim
> Date: Sun Mar  6 15:57:43 2016
> New Revision: 296428
> URL: https://svnweb.freebsd.org/changeset/base/296428
>
> Log:
>    Since kernel modules can now contain sections of type SHT_AMD64_UNWIND,
>    the boot loader should not skip over these anymore while loading images.
>    Otherwise the kernel can still panic when it doesn't find the .eh_frame
>    section belonging to the .rela.eh_frame section.
>    
>    Unfortunately this will require installing boot loaders from sys/boot
>    before attempting to boot with a new kernel.

what happens to someone who doesn't replace their bootblocks?
Or is this just the loader?

The general way we have handled this sort of thing in the past is that 
we do something
that produces a nagging message for a decent time before it becomes 
mandatory.

I don't like the idea of people being caught unaware by this..

Can you please give a more detailed description of what happens?

>    
>    Reviewed by:	kib
>    MFC after:	2 weeks
>    X-MFC-With:	r296419
>
> Modified:
>    head/sys/boot/common/load_elf_obj.c
>
> Modified: head/sys/boot/common/load_elf_obj.c
> ==============================================================================
> --- head/sys/boot/common/load_elf_obj.c	Sun Mar  6 14:37:49 2016	(r296427)
> +++ head/sys/boot/common/load_elf_obj.c	Sun Mar  6 15:57:43 2016	(r296428)
> @@ -221,6 +221,9 @@ __elfN(obj_loadimage)(struct preloaded_f
>   		switch (shdr[i].sh_type) {
>   		case SHT_PROGBITS:
>   		case SHT_NOBITS:
> +#if defined(__i386__) || defined(__amd64__)
> +		case SHT_AMD64_UNWIND:
> +#endif
>   			lastaddr = roundup(lastaddr, shdr[i].sh_addralign);
>   			shdr[i].sh_addr = (Elf_Addr)lastaddr;
>   			lastaddr += shdr[i].sh_size;
>
>



More information about the svn-src-head mailing list