[PATCH v4 0/7] Retbleed fixes

Pawan Gupta posted 7 patches 4 months ago
arch/x86/kernel/cpu/bugs.c | 93 ++++++++++++++++++++++++++--------------------
1 file changed, 52 insertions(+), 41 deletions(-)
[PATCH v4 0/7] Retbleed fixes
Posted by Pawan Gupta 4 months ago
v4:
- Replace the warning message in set_return_thunk() with an info. (Borislav)
- Collected tags.
- Rebased to v6.16-rc1.

v3: https://lore.kernel.org/r/20250522-eibrs-fix-v3-0-12704e291e1e@linux.intel.com
- Get rid of AUTO check in retbleed mitigation. (Borislav)
- Update commit message to mention the preparatory patch. (Nikolay)
- Collected tags.

v2: https://lore.kernel.org/r/20250521-eibrs-fix-v2-0-70e2598e932c@linux.intel.com
- Split the ITS stuffing patch into smaller patches. (Borislav)
- Zap spectre_v2_in_retpoline_mode() helper. (Borislav)

v1: https://lore.kernel.org/r/20250520-eibrs-fix-v1-2-91bacd35ed09@linux.intel.com

This series untangles retbleed and ITS mitigation.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
---
Pawan Gupta (7):
      x86/retbleed: Avoid AUTO after the select step
      x86/retbleed: Simplify the =stuff checks
      x86/bugs: Avoid warning when overriding return thunk
      x86/its: Use switch/case to apply mitigation
      x86/retbleed: Introduce cdt_possible()
      x86/its: Remove =stuff dependency on retbleed
      x86/its: Allow stuffing in eIBRS+retpoline mode also

 arch/x86/kernel/cpu/bugs.c | 93 ++++++++++++++++++++++++++--------------------
 1 file changed, 52 insertions(+), 41 deletions(-)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250520-eibrs-fix-6c452b697dbf

Best regards,
-- 
Thanks,
Pawan
Re: [PATCH v4 0/7] Retbleed fixes
Posted by Borislav Petkov 3 months, 2 weeks ago
On Wed, Jun 11, 2025 at 10:28:44AM -0700, Pawan Gupta wrote:
> Pawan Gupta (7):
>       x86/retbleed: Avoid AUTO after the select step
>       x86/retbleed: Simplify the =stuff checks
>       x86/bugs: Avoid warning when overriding return thunk
>       x86/its: Use switch/case to apply mitigation
>       x86/retbleed: Introduce cdt_possible()
>       x86/its: Remove =stuff dependency on retbleed
>       x86/its: Allow stuffing in eIBRS+retpoline mode also

Note that the subject prefixes are "x86/bugs:" not the mitigations themselves.

https://kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject

I've fixed them up.

Otherwise looks ok to me, lemme put them through the test.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Re: [PATCH v4 0/7] Retbleed fixes
Posted by Pawan Gupta 3 months, 2 weeks ago
On Sun, Jun 22, 2025 at 06:01:22PM +0200, Borislav Petkov wrote:
> On Wed, Jun 11, 2025 at 10:28:44AM -0700, Pawan Gupta wrote:
> > Pawan Gupta (7):
> >       x86/retbleed: Avoid AUTO after the select step
> >       x86/retbleed: Simplify the =stuff checks
> >       x86/bugs: Avoid warning when overriding return thunk
> >       x86/its: Use switch/case to apply mitigation
> >       x86/retbleed: Introduce cdt_possible()
> >       x86/its: Remove =stuff dependency on retbleed
> >       x86/its: Allow stuffing in eIBRS+retpoline mode also
> 
> Note that the subject prefixes are "x86/bugs:" not the mitigations themselves.
> 
> https://kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject

Ok.

Do you think also appending the vulnerability name like "x86/bugs/retbleed"
would be useful for someone filtering commits based on vulnerability?

> I've fixed them up.

Thanks.
Re: [PATCH v4 0/7] Retbleed fixes
Posted by Borislav Petkov 3 months, 2 weeks ago
On Mon, Jun 23, 2025 at 11:35:31AM -0700, Pawan Gupta wrote:
> Do you think also appending the vulnerability name like "x86/bugs/retbleed"
> would be useful for someone filtering commits based on vulnerability?

I've moved the vuln into the commit title. bugs.c is not that special enough
to have it be an exception.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette