Re: [PATCH v8 3/6] module: use relative references for __ksymtab entries

2018-06-25 Thread Martijn Coenen
On Mon, Jun 25, 2018 at 11:14 AM, Ard Biesheuvel wrote: > Because struct kernel_symbol is only 8 bytes in size after this > change, and aligning a 8 byte quantity to 16 bytes wastes 8 bytes. I get that, but then that means the 16-byte alignment wasn't actually necessary in the first place. > The

Re: [PATCH v8 3/6] module: use relative references for __ksymtab entries

2018-06-25 Thread Martijn Coenen
Hi Ard, > --- a/arch/x86/include/asm/export.h > +++ /dev/null > @@ -1,5 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0 */ > -#ifdef CONFIG_64BIT > -#define KSYM_ALIGN 16 > -#endif Why remove the 16-byte alignment here? I was working on some other code and ran into this 16-byte alignment, but I'm

Re: [PATCH v8 3/6] module: use relative references for __ksymtab entries

2018-06-25 Thread Ard Biesheuvel
On 25 June 2018 at 12:15, Martijn Coenen wrote: > On Mon, Jun 25, 2018 at 11:14 AM, Ard Biesheuvel > wrote: >> Because struct kernel_symbol is only 8 bytes in size after this >> change, and aligning a 8 byte quantity to 16 bytes wastes 8 bytes. > > I get that, but then that means the 16-byte alig

Re: [PATCH v8 3/6] module: use relative references for __ksymtab entries

2018-06-25 Thread Ard Biesheuvel
On 25 June 2018 at 10:56, Martijn Coenen wrote: > Hi Ard, > >> --- a/arch/x86/include/asm/export.h >> +++ /dev/null >> @@ -1,5 +0,0 @@ >> -/* SPDX-License-Identifier: GPL-2.0 */ >> -#ifdef CONFIG_64BIT >> -#define KSYM_ALIGN 16 >> -#endif > > Why remove the 16-byte alignment here? Because struct

Re: [PATCH v8 3/6] module: use relative references for __ksymtab entries

2018-03-11 Thread Ard Biesheuvel
On 11 March 2018 at 12:38, Ard Biesheuvel wrote: > An ordinary arm64 defconfig build has ~64 KB worth of __ksymtab > entries, each consisting of two 64-bit fields containing absolute > references, to the symbol itself and to a char array containing > its name, respectively. > > When we build the s

[PATCH v8 3/6] module: use relative references for __ksymtab entries

2018-03-11 Thread Ard Biesheuvel
An ordinary arm64 defconfig build has ~64 KB worth of __ksymtab entries, each consisting of two 64-bit fields containing absolute references, to the symbol itself and to a char array containing its name, respectively. When we build the same configuration with KASLR enabled, we end up with an addit