lkml.org 
[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 1/7] x86/boot/compressed: Move .got.plt entries out of the .got section
On Mon, 29 Jun 2020 at 17:50, Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> On Mon, Jun 29, 2020 at 08:48:05AM -0700, Kees Cook wrote:
> > On Mon, Jun 29, 2020 at 10:09:22AM -0400, Arvind Sankar wrote:
> >
> > This is also being done on arm64, and the section was specified slightly
> > differently (with INFO) which maybe should be done here too?
>
> I was actually just about to email you to ask what that INFO is for :)
> What does it do?
>

It makes the section non-allocatable, so it is dropped from the final image

> >
> > .got.plt (INFO) : { *(.got.plt) }
> > ASSERT(SIZEOF(.got.plt) == 0 || SIZEOF(.got.plt) == 0x18, ".got.plt not empty")
> >
> > Otherwise, yes, looks good.
> >
> > Reviewed-by: Kees Cook <keescook@chromium.org>
> >
> > > +
> > > .data : {
> > > _data = . ;
> > > *(.data)
> > > @@ -77,3 +80,9 @@ SECTIONS
> > >
> > > DISCARDS
> > > }
> > > +
> > > +#ifdef CONFIG_X86_64
> > > +ASSERT(SIZEOF(.got.plt) == 0 || SIZEOF(.got.plt) == 0x18, "Unexpected GOT/PLT entries detected!")
> > > +#else
> > > +ASSERT(SIZEOF(.got.plt) == 0 || SIZEOF(.got.plt) == 0xc, "Unexpected GOT/PLT entries detected!")
> > > +#endif
> > > --
> > > 2.26.2
> > >
> >
> > --
> > Kees Cook

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