[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations
On Mon, Jun 29, 2020 at 09:20:31AM -0700, Kees Cook wrote:
> On Mon, Jun 29, 2020 at 06:11:59PM +0200, Ard Biesheuvel wrote:
> > On Mon, 29 Jun 2020 at 18:09, Kees Cook <> wrote:
> > >
> > > Should these be marked (INFO) as well?
> > >
> >
> > Given that sections marked as (INFO) will still be emitted into the
> > ELF image, it does not really make a difference to do this for zero
> > sized sections.
> Oh, I misunderstood -- I though they were _not_ emitted; I see now what
> you said was not allocated. So, disk space used for the .got.plt case,
> but not memory space used. Sorry for the confusion!
> -Kees

To confuse the issue a bit more, there are subtleties around "disk space
used" :) The section will be present in the ELF format file, but at
least on x86, that file is then converted into binary format via
objcopy. At this point a non-allocated section at the end of the file
will be stripped off. So on 32-bit x86, moving .got.plt to the end and
marking it INFO will shave 16 bytes off the bzImage kernel.

 \ /
  Last update: 2020-06-29 20:44    [W:0.174 / U:1.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site