From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH for-4.22 v2 8/8] x86/mwait-idle: Add C-states validation
Date: Fri, 15 May 2026 09:01:08 +0200 [thread overview]
Message-ID: <eff07afd-791b-4078-924c-ed56d76ff7c6@suse.com> (raw)
In-Reply-To: <agXqiEQgGblLyc7-@macbook.local>
On 14.05.2026 17:30, Roger Pau Monné wrote:
> On Tue, May 12, 2026 at 05:38:32PM +0200, Jan Beulich wrote:
>> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
>>
>> Add validation for C-states specified via the "table=" module parameter.
>> Treat this module parameter as untrusted input and validate it thoroughly.
>>
>> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
>> Link: https://patch.msgid.link/20251216080402.156988-4-dedekind1@gmail.com
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git be6a150829b3
>>
>> Add __init to validate_cmdline_cstate(). Other adjustments to fit our env.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Thanks.
>> @@ -1697,6 +1737,21 @@ static void __init cmdline_table_adjust(
>> state->name, state->exit_latency, state->target_residency);
>> }
>>
>> + /* Validate the adjusted C-states */
>> + for (i = 0; i < state_count; i++) {
>> + struct cpuidle_state *prev_state;
>
> const?
Oh, yes, I should have done that with the other v2 change.
> FWIW, you could also init the field at definition, but I
> understand this might diverge too much from the Linux code.
Right, hence why I left it. Generally I agree that using initializers is
preferable over separate assignments.
Jan
next prev parent reply other threads:[~2026-05-15 7:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 15:34 [PATCH for-4.22 v2 0/8] x86/mwait-idle: sync up with Linux 7.0-rc Jan Beulich
2026-05-12 15:35 ` [PATCH for-4.22 v2 1/8] x86/mwait-idle: arrange for BSP MSR adjustments during S3 resume Jan Beulich
2026-05-14 13:06 ` Roger Pau Monné
2026-05-12 15:36 ` [PATCH for-4.22 v2 2/8] x86/mwait-idle: clean up BYT/CHT auto demotion disable Jan Beulich
2026-05-14 14:10 ` Roger Pau Monné
2026-05-12 15:36 ` [PATCH for-4.22 v2 3/8] x86/mwait-idle: latch struct idle_cpu contents Jan Beulich
2026-05-12 15:36 ` [PATCH for-4.22 v2 4/8] x86/mwait-idle: move pre-initialized struct idle_cpu instances Jan Beulich
2026-05-12 15:37 ` [PATCH for-4.22 v2 5/8] x86/mwait-idle: Remove the 'preferred_cstates' parameter Jan Beulich
2026-05-12 15:37 ` [PATCH for-4.22 v2 6/8] x86/mwait-idle: drop const from struct cpuidle_state arrays Jan Beulich
2026-05-12 15:38 ` [PATCH for-4.22 v2 7/8] x86/mwait-idle: Add cmdline option to adjust C-states table Jan Beulich
2026-05-14 15:18 ` Roger Pau Monné
2026-05-15 6:57 ` Jan Beulich
2026-05-15 7:59 ` Roger Pau Monné
2026-05-12 15:38 ` [PATCH for-4.22 v2 8/8] x86/mwait-idle: Add C-states validation Jan Beulich
2026-05-14 15:30 ` Roger Pau Monné
2026-05-15 7:01 ` Jan Beulich [this message]
2026-05-12 15:39 ` [PATCH for-4.22 v2 0/8] x86/mwait-idle: sync up with Linux 7.0-rc Jan Beulich
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=eff07afd-791b-4078-924c-ed56d76ff7c6@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.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 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.