Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-17 Thread Tim Chen
On 01/06/2018 03:05 PM, Mark Marshall wrote: > Hi. > > (I've only just subscribed and can't work out how to reply to a message from > before I subscribed (on my phone), sorry) > > In the macro WRMSR_ASM you seem to have lost the wrmsr? > > Yes. That's a bug noticed by Thomas and I'll fix for

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-17 Thread Tim Chen
On 01/06/2018 03:05 PM, Mark Marshall wrote: > Hi. > > (I've only just subscribed and can't work out how to reply to a message from > before I subscribed (on my phone), sorry) > > In the macro WRMSR_ASM you seem to have lost the wrmsr? > > Yes. That's a bug noticed by Thomas and I'll fix for

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-08 Thread Tim Chen
On 01/07/2018 04:03 AM, Borislav Petkov wrote: > > WRMSR as a name is good enough. > It alias with wrmsr instruction and didn't build correctly. So I'll keep it as WRMSR_ASM. Tim

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-08 Thread Tim Chen
On 01/07/2018 04:03 AM, Borislav Petkov wrote: > > WRMSR as a name is good enough. > It alias with wrmsr instruction and didn't build correctly. So I'll keep it as WRMSR_ASM. Tim

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-07 Thread Borislav Petkov
On Sun, Jan 07, 2018 at 09:12:21AM -0800, Tim Chen wrote: > Currently we are not using other bits. > When the time comes that we have other bits in this MSR used, we will > change this. Then please write in a short comment above it that it is ok that the previous MSR contents get overwritten. --

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-07 Thread Borislav Petkov
On Sun, Jan 07, 2018 at 09:12:21AM -0800, Tim Chen wrote: > Currently we are not using other bits. > When the time comes that we have other bits in this MSR used, we will > change this. Then please write in a short comment above it that it is ok that the previous MSR contents get overwritten. --

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-07 Thread Tim Chen
On 01/07/2018 04:03 AM, Borislav Petkov wrote: > On Fri, Jan 05, 2018 at 06:12:17PM -0800, Tim Chen wrote: > >> Subject: Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS > > Your subject needs to have a verb and not scream: > > Subject: [PATCH v2 2/8] x86/entry:

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-07 Thread Tim Chen
On 01/07/2018 04:03 AM, Borislav Petkov wrote: > On Fri, Jan 05, 2018 at 06:12:17PM -0800, Tim Chen wrote: > >> Subject: Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS > > Your subject needs to have a verb and not scream: > > Subject: [PATCH v2 2/8] x86/entry:

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-07 Thread Borislav Petkov
On Fri, Jan 05, 2018 at 06:12:17PM -0800, Tim Chen wrote: > Subject: Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS Your subject needs to have a verb and not scream: Subject: [PATCH v2 2/8] x86/entry: Add macros to set/clear IBRS > Create macros to control IBRS. Use these

Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-07 Thread Borislav Petkov
On Fri, Jan 05, 2018 at 06:12:17PM -0800, Tim Chen wrote: > Subject: Re: [PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS Your subject needs to have a verb and not scream: Subject: [PATCH v2 2/8] x86/entry: Add macros to set/clear IBRS > Create macros to control IBRS. Use these

[PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-05 Thread Tim Chen
Create macros to control IBRS. Use these macros to enable IBRS on kernel entry paths and disable IBRS on kernel exit paths. The registers rax, rcx and rdx are touched when controlling IBRS so they need to be saved when they can't be clobbered. Signed-off-by: Tim Chen

[PATCH v2 2/8] x86/enter: MACROS to set/clear IBRS

2018-01-05 Thread Tim Chen
Create macros to control IBRS. Use these macros to enable IBRS on kernel entry paths and disable IBRS on kernel exit paths. The registers rax, rcx and rdx are touched when controlling IBRS so they need to be saved when they can't be clobbered. Signed-off-by: Tim Chen ---