All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, rdunlap@infradead.org
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Borislav Petkov <bp@suse.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Subject: Re: [PATCH 4.9 13/20] x86/speculation/mmio: Add mitigation for Processor MMIO Stale Data
Date: Wed, 22 Jun 2022 13:48:44 +0200	[thread overview]
Message-ID: <20220622114844.GA6854@duo.ucw.cz> (raw)
In-Reply-To: <20220614183725.181834522@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

Hi!


> +static int __init mmio_stale_data_parse_cmdline(char *str)
> +{
> +	if (!boot_cpu_has_bug(X86_BUG_MMIO_STALE_DATA))
> +		return 0;
> +
> +	if (!str)
> +		return -EINVAL;
> +
> +	if (!strcmp(str, "off")) {
> +		mmio_mitigation = MMIO_MITIGATION_OFF;
> +	} else if (!strcmp(str, "full")) {
> +		mmio_mitigation = MMIO_MITIGATION_VERW;
> +	} else if (!strcmp(str, "full,nosmt")) {
> +		mmio_mitigation = MMIO_MITIGATION_VERW;
> +		mmio_nosmt = true;
> +	}
> +
> +	return 0;
> +}

This is wrong, AFAICT. Returning 0 will pollute init's environment;
Randy was cleaning those lately and we are even seeing them in
-stable. See for example b793a01000122d2bd133ba451a76cc135b5e162c.

The early return 0 should disappear, too; we should validate the
option even on non-buggy machines.

Best regards,
								Pavel

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2022-06-22 11:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 18:39 [PATCH 4.9 00/20] 4.9.319-rc1 review Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 01/20] x86/cpu: Add Elkhart Lake to Intel family Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 02/20] cpu/speculation: Add prototype for cpu_show_srbds() Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 03/20] x86/cpu: Add Jasper Lake to Intel family Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 04/20] x86/cpu: Add Cannonlake " Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 05/20] x86/CPU: Add Icelake model number Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 06/20] x86/CPU: Add more Icelake model numbers Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 07/20] x86/cpu: Add Comet Lake to the Intel CPU models header Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 08/20] x86/cpu: Add Lakefield, Alder Lake and Rocket Lake models to the to Intel CPU family Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 09/20] x86/cpu: Add another Alder Lake CPU to the Intel family Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 10/20] Documentation: Add documentation for Processor MMIO Stale Data Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 11/20] x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 12/20] x86/speculation: Add a common function for MD_CLEAR mitigation update Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 13/20] x86/speculation/mmio: Add mitigation for Processor MMIO Stale Data Greg Kroah-Hartman
2022-06-22 11:48   ` Pavel Machek [this message]
2022-06-22 14:39     ` Randy Dunlap
2022-06-14 18:39 ` [PATCH 4.9 14/20] x86/bugs: Group MDS, TAA & Processor MMIO Stale Data mitigations Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 15/20] x86/speculation/mmio: Enable CPU Fill buffer clearing on idle Greg Kroah-Hartman
2022-06-14 18:39 ` [PATCH 4.9 16/20] x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data Greg Kroah-Hartman
2022-06-14 18:40 ` [PATCH 4.9 17/20] x86/speculation/srbds: Update SRBDS mitigation selection Greg Kroah-Hartman
2022-06-14 18:40 ` [PATCH 4.9 18/20] x86/speculation/mmio: Reuse SRBDS mitigation for SBDS Greg Kroah-Hartman
2022-06-14 18:40 ` [PATCH 4.9 19/20] KVM: x86/speculation: Disable Fill buffer clear within guests Greg Kroah-Hartman
2022-06-14 18:40 ` [PATCH 4.9 20/20] x86/speculation/mmio: Print SMT warning Greg Kroah-Hartman
2022-06-14 21:00 ` [PATCH 4.9 00/20] 4.9.319-rc1 review Florian Fainelli
2022-06-15  2:42 ` Shuah Khan
2022-06-15 22:01 ` Guenter Roeck
2022-06-15 22:01 ` Naresh Kamboju
2022-06-16  8:21 ` Jon Hunter
2022-06-16 11:06 ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220622114844.GA6854@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=bp@suse.de \
    --cc=cascardo@canonical.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=rdunlap@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.