Re: [PATCH 2/3] x86/bugs: Add a separate config for missing mitigation

From: Breno Leitao
Date: Tue Jan 23 2024 - 10:05:59 EST


On Mon, Jan 22, 2024 at 12:58:21PM -0800, Pawan Gupta wrote:
> On Thu, Jan 18, 2024 at 09:32:12AM -0800, Breno Leitao wrote:
> > +config MITIGATION_RETBLEED
> > + bool "Mitigate RETBleed hardware bug"
> > + depends on CPU_SUP_INTEL || (CPU_SUP_AMD && MITIGATION_UNRET_ENTRY)
>
> Atleast on Intel CPUs, Retbleed mitigation is meaningless without
> spectre-v2 being mitigated, shouldn't this depend on MITIGATION_SPECTRE_V2?

I suppose it is the same for AMD, right?

So, I suppose it should be something as:

depends on (MITIGATION_SPECTRE_V2 && (CPU_SUP_INTEL || (CPU_SUP_AMD && MITIGATION_UNRET_ENTRY))

Is this better?

Thanks!