lkml.org 
[lkml]   [2020]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] arm64:msr: Add MSR driver
On Tue, Dec 01, 2020 at 01:48:30AM +0800, Rongwei Wang wrote:
> MSR ARM driver aims to provide interfacs for user to read or write
> data to all system registers.

Just a warranty from x86 land: if I were an ARM arch maintainer, I would
never never *ever* take such driver exposing naked hw registers to
userspace.

We have been fighting with this on x86 for years:

a7e1f67ed29f ("x86/msr: Filter MSR writes")

with userspace tools poking at random MSRs. Read the commit message
for what can happen. And taking that thing is like opening a huge
can'o'worms that can't be closed anymore.

Currently, we're trying to move userspace tools to proper sysfs
interfaces but it is a huuuge pain. It is a lot easier to have people
define proper interfaces from the get-go where the kernel can control
and synchronize access.

HTH.

--
Regards/Gruss,
Boris.

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

\
 
 \ /
  Last update: 2020-11-30 20:05    [W:1.512 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site