mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Kaplan, David" <David.Kaplan@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"H . Peter Anvin" <hpa@zytor.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/5] x86/bugs: Use early_param for spectre_v2
Date: Fri, 22 Aug 2025 16:30:12 +0200	[thread overview]
Message-ID: <20250822143012.GFaKh-9DsBRQfapi87@fat_crate.local> (raw)
In-Reply-To: <LV3PR12MB9265EFE40F2C8EB7C15BBD06943DA@LV3PR12MB9265.namprd12.prod.outlook.com>

On Fri, Aug 22, 2025 at 02:12:55PM +0000, Kaplan, David wrote:
> It could, but I felt this was a way to logically separate the code vs having
> one giant function.  All the code in spectre_v2_check_cmd() does one thing:
> verifies if the chosen command is possible on this system.  The rest of
> spectre_v2_select_mitigation() then uses the cmd to actually pick
> a mitigation.
> 
> Since these were two distinct flows, I thought having a separate function
> made sense to make the code more readable.  But that was just my opinion,
> I won't object if you want to inline it.

Right, since we're making all the mitigations handling uniform, I'd prefer to
have the same code pattern here too. The function does get a bit big but it is
clear that it does two things: (1) checks the command before it (2) selects
the mitigation. And the others do the same so...

Thx.

-- 
Regards/Gruss,
    Boris.

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

  reply	other threads:[~2025-08-22 14:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 19:21 [PATCH v2 0/5] Bugs clean-up David Kaplan
2025-08-19 19:21 ` [PATCH v2 1/5] x86/bugs: Use early_param for spectre_v2_user David Kaplan
2025-08-20 18:37   ` Borislav Petkov
2025-08-27 21:51   ` Josh Poimboeuf
2025-08-27 21:59     ` Kaplan, David
2025-08-19 19:21 ` [PATCH v2 2/5] x86/bugs: Use early_param for spectre_v2 David Kaplan
2025-08-22 11:49   ` Borislav Petkov
2025-08-22 14:12     ` Kaplan, David
2025-08-22 14:30       ` Borislav Petkov [this message]
2025-08-22 14:37         ` Kaplan, David
2025-08-19 19:21 ` [PATCH v2 3/5] x86/bugs: Simplify SSB cmdline parsing David Kaplan
2025-08-27 22:02   ` Josh Poimboeuf
2025-08-19 19:21 ` [PATCH v2 4/5] x86/bugs: Add attack vector controls for SSB David Kaplan
2025-08-21  6:17   ` Pawan Gupta
2025-08-27 10:27     ` Borislav Petkov
2025-08-27 11:04       ` Borislav Petkov
2025-08-27 14:05         ` Kaplan, David
2025-08-27 14:22           ` Borislav Petkov
2025-08-27 14:25             ` Kaplan, David
2025-08-27 15:33               ` Borislav Petkov
2025-08-27 15:47                 ` Kaplan, David
2025-08-27 16:11                   ` Borislav Petkov
2025-08-27 16:15                     ` Kaplan, David
2025-08-27 16:19                       ` Borislav Petkov
2025-08-28 13:39   ` [tip: x86/urgent] " tip-bot2 for David Kaplan
2025-08-19 19:22 ` [PATCH v2 5/5] x86/bugs: Remove uses of cpu_mitigations_off() David Kaplan
2025-08-21  6:18 ` [PATCH v2 0/5] Bugs clean-up Pawan Gupta

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=20250822143012.GFaKh-9DsBRQfapi87@fat_crate.local \
    --to=bp@alien8.de \
    --cc=David.Kaplan@amd.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®