lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c34c53b2-f1f8-b455-4b7b-5fde32b39724@infradead.org>
Date:   Fri, 26 Jan 2018 09:51:48 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     tglx@...utronix.de, hpa@...or.com, linux-kernel@...r.kernel.org,
        ak@...ux.intel.com, mingo@...nel.org, dwmw2@...radead.org,
        linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/pti] module/retpoline: Warn about missing retpoline in
 module

On 01/26/2018 06:59 AM, tip-bot for Andi Kleen wrote:
> Commit-ID:  caf7501a1b4ec964190f31f9c3f163de252273b8
> Gitweb:     https://git.kernel.org/tip/caf7501a1b4ec964190f31f9c3f163de252273b8
> Author:     Andi Kleen <ak@...ux.intel.com>
> AuthorDate: Thu, 25 Jan 2018 15:50:28 -0800
> Committer:  Thomas Gleixner <tglx@...utronix.de>
> CommitDate: Fri, 26 Jan 2018 15:03:56 +0100
> 
> module/retpoline: Warn about missing retpoline in module


> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index 390b3dc..4a39d7b 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -11,6 +11,7 @@
>  #include <linux/init.h>
>  #include <linux/utsname.h>
>  #include <linux/cpu.h>
> +#include <linux/module.h>
>  
>  #include <asm/nospec-branch.h>
>  #include <asm/cmdline.h>
> @@ -93,6 +94,19 @@ static const char *spectre_v2_strings[] = {
>  #define pr_fmt(fmt)     "Spectre V2 mitigation: " fmt
>  
>  static enum spectre_v2_mitigation spectre_v2_enabled = SPECTRE_V2_NONE;
> +static bool spectre_v2_bad_module;
> +
> +#ifdef RETPOLINE
> +bool retpoline_module_ok(bool has_retpoline)
> +{
> +	if (spectre_v2_enabled == SPECTRE_V2_NONE || has_retpoline)
> +		return true;
> +
> +	pr_err("System may be vunerable to spectre v2\n");

	                      vulnerable

> +	spectre_v2_bad_module = true;
> +	return false;
> +}
> +#endif



-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ