From: Thomas Gleixner <tglx@kernel.org>
To: Roman Storozhenko <romeusmeister@gmail.com>,
Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/msr: Remove misleading "unrecognized" wording in write warning
Date: Thu, 02 Apr 2026 22:49:01 +0200 [thread overview]
Message-ID: <87h5pt6qbm.ffs@tglx> (raw)
In-Reply-To: <CALsPMBPs9Uc5qbanUv6xBzxnApOMxGX1OeLF0jM5FieEGHvCag@mail.gmail.com>
Roman!
On Thu, Apr 02 2026 at 19:37, Roman Storozhenko wrote:
> I can use 'allow_writes', but userland SW uses "/dev/cpu/<X>/msr"
> relies on default msr driver behaviour. Indeed, it would be strange if
> such SW reloads a kernel driver (if it is possible) to make sure that
> this message doesn't appear. Most distributions don't pass that
> parameter.
Sane distributions use allow_writes=off because allowing user space to
write to random MSRs is a system stability issue even if the interface
is restricted to root.
> Let's take a SW I work on as an example:
> https://github.com/intel/intel-cmt-cat
>
> If your CPU supports Intel RDT you could build and run it:
If my CPU supports RDT, I use RESCTRL in the kernel. It provides a
proper interface, monitoring with all bells and whistels and is fully
integrated into the kernel task and process management.
RESCTRL has been around for almost a decade. Your colleagues Reinette
and Tony spent a lot of time to make this work in a sane way, so the
real question is why you need a seperate tool which works around the
provided and sane interfaces.
> to see that 'unrecognized' messages in dmesg periodically.
We don't need your tool for that at all. wrmsr(1) is sufficient.
> Both allocation and monitoring use 'msr_write' and 'msr_read'
> functions that rely on '/dev/cpu/<X>/msr:
Which is wrong to begin with because the kernel provides full support
for it.
> Our stakeholders interpret that 'unrecognized' word as a writing to
> wrong or non-existing MSR registers.
Your stakeholders seem not to care about the way worse CPU_OUT_OF_SPEC
taint. Are you going to remove that next?
> To be honest I interpreted this in this way too, unless I read msr
> driver code. That is why I posted this patch. My intention is to
> align this message with what is really happening in the driver, that
> is writing to a valid register, but against the current policy.
I kinda agree with you that the 'unrecognized' wording is suboptimal and
it should rather be explicit about user space [ab]use of the interface,
i.e.:
"User space write to MSR ...., tainting ..."
or something like that.
The changelog surely should explain that 'unrecognized' is not the
appropriate word, but without a lame justification why such tools exists
in the first place and need to be supported gracefully.
The only justification for them is experimentation and people who do
that should know what they are doing. If they get confused by the
message then they should not touch CPU MSRs in the first place.
Thanks,
tglx
next prev parent reply other threads:[~2026-04-02 20:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 17:48 [PATCH] x86/msr: Remove misleading "unrecognized" wording in write warning Roman Storozhenko
2026-03-30 14:16 ` Borislav Petkov
2026-04-01 19:18 ` Roman Storozhenko
2026-04-01 19:27 ` Borislav Petkov
2026-04-02 17:37 ` Roman Storozhenko
2026-04-02 18:07 ` Borislav Petkov
2026-04-02 20:49 ` Thomas Gleixner [this message]
2026-04-03 7:55 ` Roman Storozhenko
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=87h5pt6qbm.ffs@tglx \
--to=tglx@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=romeusmeister@gmail.com \
--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