Re: [PATCH v3] x86/bugs: Explicitly clear speculative MSR bits

2023-01-12 Thread Borislav Petkov
On Wed, Jan 11, 2023 at 11:00:37PM -0800, Pawan Gupta wrote: > > SPEC_CTRL_RRSBA_DIS_S is a disable bit and I presume it needs to stay > > enabled. > > The mitigation is enabled when this bit is set. When set, it prevents RET > target to be predicted from alternate predictors (BTB). This should

Re: [PATCH v3] x86/bugs: Explicitly clear speculative MSR bits

2023-01-11 Thread Pawan Gupta
On Wed, Jan 11, 2023 at 01:51:03PM +0100, Borislav Petkov wrote: > On Mon, Nov 28, 2022 at 07:31:48AM -0800, Breno Leitao wrote: > > Currently x86_spec_ctrl_base is read at boot time, and speculative bits > > are set if configs are enable, such as MSR[SPEC_CTRL_IBRS] is enabled if > >

Re: [PATCH v3] x86/bugs: Explicitly clear speculative MSR bits

2023-01-11 Thread Borislav Petkov
On Mon, Nov 28, 2022 at 07:31:48AM -0800, Breno Leitao wrote: > Currently x86_spec_ctrl_base is read at boot time, and speculative bits > are set if configs are enable, such as MSR[SPEC_CTRL_IBRS] is enabled if > CONFIG_CPU_IBRS_ENTRY is configured. These MSR bits are not cleared if > the

[PATCH v3] x86/bugs: Explicitly clear speculative MSR bits

2022-11-28 Thread Breno Leitao
Currently x86_spec_ctrl_base is read at boot time, and speculative bits are set if configs are enable, such as MSR[SPEC_CTRL_IBRS] is enabled if CONFIG_CPU_IBRS_ENTRY is configured. These MSR bits are not cleared if the mitigations are disabled. This is a problem when kexec-ing a kernel that has