lkml.org 
[lkml]   [2023]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip: x86/bugs] x86/retpoline: Ensure default return thunk isn't used at runtime

* Borislav Petkov <bp@alien8.de> wrote:

> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index bb0ab8466b91..e4b2dfbf3de5 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -2849,3 +2849,8 @@ ssize_t cpu_show_gds(struct device *dev, struct device_attribute *attr, char *bu
> return cpu_show_common(dev, attr, buf, X86_BUG_GDS);
> }
> #endif
> +
> +void check_thunks(void)
> +{
> + WARN(1, "Unconverted return thunk\n");

If then WARN_ONCE().

Thanks,

Ingo

\
 
 \ /
  Last update: 2023-10-18 15:39    [W:0.373 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site