Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-07-01 Thread Arvind Sankar
On Wed, Jul 01, 2020 at 08:44:56AM +0200, Ard Biesheuvel wrote: > On Wed, 1 Jul 2020 at 01:28, Arvind Sankar wrote: > > > > On Tue, Jun 30, 2020 at 03:00:43PM -0700, Fangrui Song wrote: > > > * Ard Biesheuvel > > > > On Tue, 30 Jun 2020 at 01:34, Fangrui Song wrote: > > > > > > If the executable

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-30 Thread Ard Biesheuvel
On Wed, 1 Jul 2020 at 01:28, Arvind Sankar wrote: > > On Tue, Jun 30, 2020 at 03:00:43PM -0700, Fangrui Song wrote: > > * Ard Biesheuvel > > > On Tue, 30 Jun 2020 at 01:34, Fangrui Song wrote: > > > > If the executable is purely static, it does not need to have PLT. All > > calls to a PLT can be

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-30 Thread Arvind Sankar
On Tue, Jun 30, 2020 at 03:00:43PM -0700, Fangrui Song wrote: > * Ard Biesheuvel > > On Tue, 30 Jun 2020 at 01:34, Fangrui Song wrote: > > If the executable is purely static, it does not need to have PLT. All > calls to a PLT can be redirected to the function itself. Some range > extension thunk

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-30 Thread Fangrui Song
* Ard Biesheuvel On Tue, 30 Jun 2020 at 01:34, Fangrui Song wrote: > > On 2020-06-29, Ard Biesheuvel wrote: > >On Mon, 29 Jun 2020 at 19:37, Fangrui Song wrote: > >> > >> On 2020-06-29, Arvind Sankar wrote: > >> >On Mon, Jun 29, 2020 at 09:20:31AM -0700, Kees Cook wrote: > >> >> On Mon, Jun 29,

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-30 Thread Arvind Sankar
On Tue, Jun 30, 2020 at 06:26:43PM +0200, Ard Biesheuvel wrote: > On Tue, 30 Jun 2020 at 01:34, Fangrui Song wrote: > > > If (1) is not satisfied, the created .got.plt is just served as an anchor > > for > > things that want to reference (the distance from GOT base to some point). > > The > > l

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-30 Thread Ard Biesheuvel
On Tue, 30 Jun 2020 at 01:34, Fangrui Song wrote: > > On 2020-06-29, Ard Biesheuvel wrote: > >On Mon, 29 Jun 2020 at 19:37, Fangrui Song wrote: > >> > >> On 2020-06-29, Arvind Sankar wrote: > >> >On Mon, Jun 29, 2020 at 09:20:31AM -0700, Kees Cook wrote: > >> >> On Mon, Jun 29, 2020 at 06:11:59PM

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-29 Thread Fangrui Song
On 2020-06-29, Ard Biesheuvel wrote: On Mon, 29 Jun 2020 at 19:37, Fangrui Song wrote: On 2020-06-29, Arvind Sankar wrote: >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

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-29 Thread Ard Biesheuvel
On Mon, 29 Jun 2020 at 19:37, Fangrui Song wrote: > > On 2020-06-29, Arvind Sankar wrote: > >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: > >> > > > >> > > On M

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-29 Thread Arvind Sankar
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: > > > > > > On Mon, Jun 29, 2020 at 10:09:28AM -0400, Arvind Sankar wrote: > > > > Add a linker script check that there ar

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-29 Thread Ard Biesheuvel
On Mon, 29 Jun 2020 at 18:09, Kees Cook wrote: > > On Mon, Jun 29, 2020 at 10:09:28AM -0400, Arvind Sankar wrote: > > Add a linker script check that there are no runtime relocations, and > > remove the old one that tries to check via looking for specially-named > > sections in the object files. >

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-29 Thread Fangrui Song
On 2020-06-29, Arvind Sankar wrote: 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: > > > > On Mon, Jun 29, 2020 at 10:09:28AM -0400, Arvind Sankar wrote: > > > Add a link

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-29 Thread Kees Cook
On Mon, Jun 29, 2020 at 06:11:59PM +0200, Ard Biesheuvel wrote: > On Mon, 29 Jun 2020 at 18:09, Kees Cook wrote: > > > > On Mon, Jun 29, 2020 at 10:09:28AM -0400, Arvind Sankar wrote: > > > Add a linker script check that there are no runtime relocations, and > > > remove the old one that tries to

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-29 Thread Arvind Sankar
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 emitt

Re: [PATCH v3 7/7] x86/boot: Check that there are no runtime relocations

2020-06-29 Thread Kees Cook
On Mon, Jun 29, 2020 at 10:09:28AM -0400, Arvind Sankar wrote: > Add a linker script check that there are no runtime relocations, and > remove the old one that tries to check via looking for specially-named > sections in the object files. > > Drop the tests for -fPIE compiler option and -pie linke