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: <d0356d0a-83dd-f3ae-c0ba-82089976c014@redhat.com>
Date:   Wed, 3 Jun 2020 11:39:38 -0400
From:   Waiman Long <longman@...hat.com>
To:     "Tada, Kenta (Sony)" <Kenta.Tada@...y.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
        "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "pawan.kumar.gupta@...ux.intel.com" 
        <pawan.kumar.gupta@...ux.intel.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/speculation: Check whether speculation is force
 disabled

On 6/3/20 3:12 AM, Tada, Kenta (Sony) wrote:
> Once PR_SPEC_FORCE_DISABLE is set, users cannot set PR_SPEC_ENABLE.
> This commit checks whether PR_SPEC_FORCE_DISABLE was previously set.
>
> Signed-off-by: Kenta Tada <Kenta.Tada@...y.com>
> ---
>   arch/x86/kernel/cpu/bugs.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index ed54b3b21c39..678ace157035 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -1173,6 +1173,9 @@ static int ib_prctl_set(struct task_struct *task, unsigned long ctrl)
>   		if (spectre_v2_user == SPECTRE_V2_USER_STRICT ||
>   		    spectre_v2_user == SPECTRE_V2_USER_STRICT_PREFERRED)
>   			return -EPERM;
> +		/* If speculation is force disabled, enable is not allowed */
> +		if (task_spec_ib_force_disable(task))
> +			return -EPERM;
>   		task_clear_spec_ib_disable(task);
>   		task_update_spec_tif(task);
>   		break;

There is a comment up a few lines about this:

                 /*
                  * Indirect branch speculation is always allowed when
                  * mitigation is force disabled.
                  */
It conflicts with your new code. We can have an argument on whether IB 
should follow how SSB is being handled. Before that is settled,

Nacked-by: Waiman Long <longman@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ