Re: config(8) elf handling

2017-09-13 Thread Jonathan Gray
On Wed, Sep 13, 2017 at 08:34:56PM -0600, Theo de Raadt wrote: > > If the attribute to force it into .data isn't wanted the alternative > > gets messy as config has a bunch of bogus types and casts and treats the > > int values as longs. > > Well, I believe that messiness is a result of trying to

Re: config(8) elf handling

2017-09-13 Thread Ted Unangst
Philip Guenther wrote: > On Wed, 13 Sep 2017, Miod Vallat wrote: > > > > > Forcing uextraloc into .data via > > > int uextraloc __attribute__ ((section(".data"))) = 0; > > > avoids the crashes. > > > > Regardless of this bug, the in-tree gcc was modified to default to put > > explicitly zero

Re: config(8) elf handling

2017-09-13 Thread Theo de Raadt
> If the attribute to force it into .data isn't wanted the alternative > gets messy as config has a bunch of bogus types and casts and treats the > int values as longs. Well, I believe that messiness is a result of trying to avoid the consequences of the ABI. I feel the ABI shouldn't be exposed

Re: config(8) elf handling

2017-09-13 Thread Jonathan Gray
On Wed, Sep 13, 2017 at 10:23:46AM -0600, Theo de Raadt wrote: > > On Wed, 13 Sep 2017, Miod Vallat wrote: > > > > > > > Forcing uextraloc into .data via > > > > int uextraloc __attribute__ ((section(".data"))) = 0; > > > > avoids the crashes. > > > > > > Regardless of this bug, the in-tree gcc

Re: config(8) elf handling

2017-09-13 Thread Theo de Raadt
> > Anyone recall the issues that it was originally changed to fix? > > It broke the passing of information between the boot blocks and the > kernel on x86, because locore would zero bss after the boot blocks > information variables had been written to. Yeah.. but that can be blamed on a

Re: config(8) elf handling

2017-09-13 Thread Miod Vallat
> Anyone recall the issues that it was originally changed to fix? It broke the passing of information between the boot blocks and the kernel on x86, because locore would zero bss after the boot blocks information variables had been written to.

Re: config(8) elf handling

2017-09-13 Thread Theo de Raadt
> On Wed, 13 Sep 2017, Miod Vallat wrote: > > > > > Forcing uextraloc into .data via > > > int uextraloc __attribute__ ((section(".data"))) = 0; > > > avoids the crashes. > > > > Regardless of this bug, the in-tree gcc was modified to default to put > > explicitly zero initialized data in .data

Re: config(8) elf handling

2017-09-13 Thread Jonathan Gray
On Wed, Sep 13, 2017 at 08:44:24AM +, Miod Vallat wrote: > > > Forcing uextraloc into .data via > > int uextraloc __attribute__ ((section(".data"))) = 0; > > avoids the crashes. > > Regardless of this bug, the in-tree gcc was modified to default to put > explicitly zero initialized data in

Re: config(8) elf handling

2017-09-13 Thread Miod Vallat
> Forcing uextraloc into .data via > int uextraloc __attribute__ ((section(".data"))) = 0; > avoids the crashes. Regardless of this bug, the in-tree gcc was modified to default to put explicitly zero initialized data in .data rather than .bss, i.e. default to -fno-zero-initialized-in-bss. It