Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

msr-tools silently accepts incorrect register #8

@dilinger

Description

@dilinger

A Debian user reported the following error: running "rdmsr MSR_K8_TOP_MEM2" doesn't return an error. Instead, it returned "0" for him, and on my system it returns "ff". Both of these could be plausible answers.

Instead, rdmsr should probably return an error when strtoul() returns MSR 0. According to an MSR data sheet that I found at http://www.cs.inf.ethz.ch/stricker/lab/doc/intel-part4.pdf , MSR 0 seems to only be available on original Pentium chips. Given that it's been almost 20 years since Pentium II was released, I'm hoping that it's safe to assume that a user asking for MSR 0 is an error. Likewise, similar behavior should probabably be done for wrmsr - returning an error when attempting to write to MSR 0.

Here's the original Debian bug report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790075

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions