Re: [PATCH v6 14/27] x86/percpu: Adapt percpu for PIE support

2019-04-08 Thread Thomas Garnier
On Fri, Feb 1, 2019 at 9:13 AM Thomas Garnier wrote: > > On Thu, Jan 31, 2019 at 6:31 PM Christopher Lameter wrote: > > > > On Thu, 31 Jan 2019, Thomas Garnier wrote: > > > > > The per-cpu symbols are in a section that is zero based to create > > > offsets. The compiler doesn't see them as offset

Re: [PATCH v6 14/27] x86/percpu: Adapt percpu for PIE support

2019-02-01 Thread Thomas Garnier
On Thu, Jan 31, 2019 at 6:31 PM Christopher Lameter wrote: > > On Thu, 31 Jan 2019, Thomas Garnier wrote: > > > The per-cpu symbols are in a section that is zero based to create > > offsets. The compiler doesn't see them as offsets but as relative > > symbol and try to relocate them. Given the dis

Re: [PATCH v6 14/27] x86/percpu: Adapt percpu for PIE support

2019-01-31 Thread Christopher Lameter
On Thu, 31 Jan 2019, Thomas Garnier wrote: > The per-cpu symbols are in a section that is zero based to create > offsets. The compiler doesn't see them as offsets but as relative > symbol and try to relocate them. Given the distance between zero and > the mapped kernel is much larger than the inst

Re: [PATCH v6 14/27] x86/percpu: Adapt percpu for PIE support

2019-01-31 Thread Thomas Garnier
On Thu, Jan 31, 2019 at 12:57 PM Christopher Lameter wrote: > > On Thu, 31 Jan 2019, Thomas Garnier wrote: > > > Perpcu uses a clever design where the .percu ELF section has a virtual > > address of zero and the custom linux relocation code avoid relocating > > specific symbols. It makes the code

Re: [PATCH v6 14/27] x86/percpu: Adapt percpu for PIE support

2019-01-31 Thread Christopher Lameter
On Thu, 31 Jan 2019, Thomas Garnier wrote: > Perpcu uses a clever design where the .percu ELF section has a virtual > address of zero and the custom linux relocation code avoid relocating > specific symbols. It makes the code simple and easily adaptable with or > without SMP support. We usually t