rdmsr from userspace

Mike Meyer mwm-keyword-freebsdhackers2.e313df at mired.org
Sat May 17 17:32:03 UTC 2008


On Sat, 17 May 2008 18:26:01 +0100
Rui Paulo <rpaulo at FreeBSD.org> wrote:

> Andriy Gapon wrote:
> > on 17/05/2008 18:37 Rui Paulo said the following:
> >> Andriy Gapon wrote:
> >>>
> >>> It seems that rdmsr instruction can be executed only at the highest 
> >>> privilege level and thus is not permitted from userland. Maybe we 
> >>> should provide something like Linux /dev/cpu/msr?
> >>> I don't like interface of that device, I think that ioctl approach 
> >>> would be preferable in this case.
> >>> Something like create /dev/cpuN and allow some ioctls on it: 
> >>> ioctl(cpu_fd, CPU_RDMSR, arg).
> >>> What do you think?
> >>>
> >>
> >> While I think this (devcpu) is good for testing and development, I 
> >> prefer having a device driver to handle that specific MSR than a 
> >> generic /dev/cpuN where you can issue MSRs.
> >> Both for security and reliability reasons.
> > 
> > What about /dev/pci, /dev/io? Aren't they a precedent?
> 
> They are, but, IMHO, we should no longer continue to create this type of 
> interfaces.

Ok, in relation to the question I asked about sysctl's vs. /dev/* -
why not?

    <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org


More information about the freebsd-hackers mailing list