Re: [PATCH 6/6] x86/vdso: Move out the CPU number store

2018-06-05 Thread Andy Lutomirski
On Mon, Jun 4, 2018 at 10:36 PM H. Peter Anvin wrote: > > On 06/04/18 20:57, Mika Penttilä wrote: > > > > This won't work on X86-32 because it actually uses the segment limit with > > fs: access. So there > > is a reason why the lsl based method is X86-64 only. > > > > > > Why does that matter i

Re: [PATCH 6/6] x86/vdso: Move out the CPU number store

2018-06-04 Thread Mika Penttilä
On 06/05/2018 08:36 AM, H. Peter Anvin wrote: > On 06/04/18 20:57, Mika Penttilä wrote: >> >> This won't work on X86-32 because it actually uses the segment limit with >> fs: access. So there >> is a reason why the lsl based method is X86-64 only. >> > > > > Why does that matter in any shape,

Re: [PATCH 6/6] x86/vdso: Move out the CPU number store

2018-06-04 Thread H. Peter Anvin
On 06/04/18 20:57, Mika Penttilä wrote: > > This won't work on X86-32 because it actually uses the segment limit with fs: > access. So there > is a reason why the lsl based method is X86-64 only. > Why does that matter in any shape, way, or form? The LSL instruction doesn't touch any of the

Re: [PATCH 6/6] x86/vdso: Move out the CPU number store

2018-06-04 Thread Mika Penttilä
On 06/05/2018 07:44 AM, Bae, Chang Seok wrote: >>> diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c >>> index ea554f8..e716e94 100644 >>> --- a/arch/x86/kernel/setup_percpu.c >>> +++ b/arch/x86/kernel/setup_percpu.c >>> @@ -155,12 +155,21 @@ static void __init pcpup_popu

Re: [PATCH 6/6] x86/vdso: Move out the CPU number store

2018-06-04 Thread Bae, Chang Seok
>> diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c >> index ea554f8..e716e94 100644 >> --- a/arch/x86/kernel/setup_percpu.c >> +++ b/arch/x86/kernel/setup_percpu.c >> @@ -155,12 +155,21 @@ static void __init pcpup_populate_pte(unsigned long >> addr) >> >> static inl

Re: [PATCH 6/6] x86/vdso: Move out the CPU number store

2018-06-04 Thread Mika Penttilä
On 06/04/2018 10:24 PM, Chang S. Bae wrote: > The CPU (and node) number will be written, as early enough, > to the segment limit of per CPU data and TSC_AUX MSR entry. > The information has been retrieved by vgetcpu in user space > and will be also loaded from the paranoid entry, when > FSGSBASE en

[PATCH 6/6] x86/vdso: Move out the CPU number store

2018-06-04 Thread Chang S. Bae
The CPU (and node) number will be written, as early enough, to the segment limit of per CPU data and TSC_AUX MSR entry. The information has been retrieved by vgetcpu in user space and will be also loaded from the paranoid entry, when FSGSBASE enabled. So, it is moved out from vDSO to the CPU initia