Re: [PATCH v6 2/8] module: use relative references for __ksymtab entries

2017-12-27 Thread Ard Biesheuvel
On 27 December 2017 at 20:13, Linus Torvalds wrote: > On Wed, Dec 27, 2017 at 12:11 PM, Ard Biesheuvel > wrote: >> >> I tried to keep the generic patches generic, so perhaps I should just >> put the arm64 vmlinux.lds.S change in a patch on its own? > > I guess it doesn't matter, but regardless of

Re: [PATCH v6 2/8] module: use relative references for __ksymtab entries

2017-12-27 Thread Linus Torvalds
On Wed, Dec 27, 2017 at 12:11 PM, Ard Biesheuvel wrote: > > I tried to keep the generic patches generic, so perhaps I should just > put the arm64 vmlinux.lds.S change in a patch on its own? I guess it doesn't matter, but regardless of where it gets introduced I would like to see the explanation f

Re: [PATCH v6 2/8] module: use relative references for __ksymtab entries

2017-12-27 Thread Ard Biesheuvel
On 27 December 2017 at 20:07, Linus Torvalds wrote: > On Wed, Dec 27, 2017 at 12:50 AM, Ard Biesheuvel > wrote: >> diff --git a/include/linux/compiler.h b/include/linux/compiler.h >> index 52e611ab9a6c..fe752d365334 100644 >> --- a/include/linux/compiler.h >> +++ b/include/linux/compiler.h >> @@

Re: [PATCH v6 2/8] module: use relative references for __ksymtab entries

2017-12-27 Thread Linus Torvalds
On Wed, Dec 27, 2017 at 12:50 AM, Ard Biesheuvel wrote: > diff --git a/include/linux/compiler.h b/include/linux/compiler.h > index 52e611ab9a6c..fe752d365334 100644 > --- a/include/linux/compiler.h > +++ b/include/linux/compiler.h > @@ -327,4 +327,15 @@ static __always_inline void __write_once_siz

Re: [PATCH v6 1/8] arch: enable relative relocations for arm64, power, x86, s390 and x86

2017-12-27 Thread Ard Biesheuvel
On 27 December 2017 at 19:54, Linus Torvalds wrote: > On Wed, Dec 27, 2017 at 12:50 AM, Ard Biesheuvel > wrote: >> diff --git a/arch/arm64/kernel/vmlinux.lds.S >> b/arch/arm64/kernel/vmlinux.lds.S >> index 7da3e5c366a0..49ae5b43fe2b 100644 >> --- a/arch/arm64/kernel/vmlinux.lds.S >> +++ b/arch/a

Re: [PATCH v6 1/8] arch: enable relative relocations for arm64, power, x86, s390 and x86

2017-12-27 Thread Linus Torvalds
On Wed, Dec 27, 2017 at 12:50 AM, Ard Biesheuvel wrote: > diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S > index 7da3e5c366a0..49ae5b43fe2b 100644 > --- a/arch/arm64/kernel/vmlinux.lds.S > +++ b/arch/arm64/kernel/vmlinux.lds.S > @@ -156,7 +156,7 @@ SECTIONS >

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-27 Thread Brice Goglin
Le 22/12/2017 à 23:53, Dan Williams a écrit : > On Thu, Dec 21, 2017 at 12:31 PM, Brice Goglin wrote: >> Le 20/12/2017 à 23:41, Ross Zwisler a écrit : > [..] >> Hello >> >> I can confirm that HPC runtimes are going to use these patches (at least >> all runtimes that use hwloc for topology discover

[PATCH v6 8/8] x86/kernel: jump_table: use relative references

2017-12-27 Thread Ard Biesheuvel
Similar to the arm64 case, 64-bit x86 can benefit from using 32-bit relative references rather than 64-bit absolute ones when emitting struct jump_entry instances. Not only does this reduce the memory footprint of the entries themselves by 50%, it also removes the need for carrying relocation metad

[PATCH v6 7/8] arm64/kernel: jump_label: use relative references

2017-12-27 Thread Ard Biesheuvel
On a randomly chosen distro kernel build for arm64, vmlinux.o shows the following sections, containing jump label entries, and the associated RELA relocation records, respectively: ... [38088] __jump_table PROGBITS 00e19f30 0002ea10 00

[PATCH v6 6/8] kernel/jump_label: abstract jump_entry member accessors

2017-12-27 Thread Ard Biesheuvel
In preparation of allowing architectures to use relative references in jump_label entries [which can dramatically reduce the memory footprint], introduce abstractions for references to the 'code' and 'key' members of struct jump_entry. Signed-off-by: Ard Biesheuvel --- arch/arm/include/asm/jump_

[PATCH v6 5/8] kernel: tracepoints: add support for relative references

2017-12-27 Thread Ard Biesheuvel
To avoid the need for relocating absolute references to tracepoint structures at boot time when running relocatable kernels (which may take a disproportionate amount of space), add the option to emit these tables as relative references instead. Cc: Steven Rostedt Cc: Ingo Molnar Signed-off-by: A

[PATCH v6 4/8] PCI: Add support for relative addressing in quirk tables

2017-12-27 Thread Ard Biesheuvel
Allow the PCI quirk tables to be emitted in a way that avoids absolute references to the hook functions. This reduces the size of the entries, and, more importantly, makes them invariant under runtime relocation (e.g., for KASLR) Acked-by: Bjorn Helgaas Signed-off-by: Ard Biesheuvel --- drivers

[PATCH v6 3/8] init: allow initcall tables to be emitted using relative references

2017-12-27 Thread Ard Biesheuvel
Allow the initcall tables to be emitted using relative references that are only half the size on 64-bit architectures and don't require fixups at runtime on relocatable kernels. Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: James Morris Cc: "Serge E. Hallyn" Signed-off-by: Ard

[PATCH v6 2/8] module: use relative references for __ksymtab entries

2017-12-27 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

[PATCH v6 1/8] arch: enable relative relocations for arm64, power, x86, s390 and x86

2017-12-27 Thread Ard Biesheuvel
Before updating certain subsystems to use place relative 32-bit relocations in special sections, to save space and reduce the number of absolute relocations that need to be processed at runtime by relocatable kernels, introduce the Kconfig symbol and define it for some architectures that should be

[PATCH v6 0/8] add support for relative references in special sections

2017-12-27 Thread Ard Biesheuvel
This adds support for emitting special sections such as initcall arrays, PCI fixups and tracepoints as relative references rather than absolute references. This reduces the size by 50% on 64-bit architectures, but more importantly, it removes the need for carrying relocation metadata for these sect