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

Re: [PATCH 2/2] x86/boot: Drop .note.gnu.properties in build32.lds



On 12.05.2020 05:39, Jason Andryuk wrote:
> reloc.S and cmdline.S as arrays of executable bytes for inclusion in
> head.S generated from compiled object files.  Object files generated by
> an -fcf-protection toolchain include a .note.gnu.property section.  The
> way reloc.S and cmdline.S are generated, the bytes of .note.gnu.property
> become the start of the .S files.  When head.S calls reloc or
> cmdline_parse_early, those note bytes are executed instead of the
> intended .text section.  This results in an early crash in reloc.

I may be misremembering, but I vaguely recall some similar change
suggestion. What I'm missing here is some form of statement as to
whether this is legitimate tool chain behavior, or a bug, and
hence whether this is a fix or a workaround.

> Discard the .note.gnu.property section when linking to avoid the extra
> bytes.

If we go this route (and if, as per above, I'm misremembering,
meaning we didn't reject such a change earlier on), why would we
not strip .note and .note.* in one go?

> Stefan Bader also noticed that build32.mk requires -fcf-protection=none
> or else the hypervisor will not boot.
> https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1863260

How's this related to the change here?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.