[Top] [All Lists]

Re: [PATCH v4] MIPS: Make CP0 config registers readable via sysfs.

To: "Maciej W. Rozycki" <>
Subject: Re: [PATCH v4] MIPS: Make CP0 config registers readable via sysfs.
From: David Daney <>
Date: Thu, 13 Dec 2012 15:38:58 -0800
Cc: "Steven J. Hill" <>,, Ralf Baechle <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=VTABqe3S7OO3Ep3/PurOxZNtPmjmh2USs6RfbyoMKeU=; b=gd0l1yStgBASdBpIkGL+f/nUUzFVW5TsV3mrR/pqTGHH54GTtoxJbsGipYKVujXDg3 XLBY0ulfrhUquhUFSgpPyuckTef3hNfssMj1VX3NVOw1bLKzicE9ufv2lsPDHowEHIEh qWSCVW4LrBebkY3bpJ7/pvRFnqQylcYAJXW4HG/Z1atCQSilIvYTx8MFxKw0CRe6RKNF T+Tbk2JkPM0Y7LderZxNT+h5HYDk+lbXdeATWFskpBSRvi40uzRhXTsi01eHBYdKxrO/ puagHbyJ5snv1YFkjk8kKYed0z1TM86Va5RUDMH7cvfCxQu218wfi7ho+KciKpK+h6mf v1IQ==
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
References: <> <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
On 12/13/2012 03:27 PM, Maciej W. Rozycki wrote:
On Thu, 13 Dec 2012, Steven J. Hill wrote:

Allow reading of CP0 config registers via sysfs for each core
in the system. The registers will show up in sysfs at the path:


  You're exporting privileged context outside the kernel -- have all the
security implications been considered?

Can you give an example of what would be risky?

 At the very least I don't think
these files should be word-readable.

According to Steven's earlier comments, all he really cares about are the ASEs implemented.

We have a patch (that I will send soon) that exports the Cache configurations via the same method that x86 Cache information is reported, so that part of the config register information would be reported separately.

The rest of the CP0_ConfigX bits really report things that are only useful to privileged mode software, so perhaps they shouldn't be reported.

David Daney

<Prev in Thread] Current Thread [Next in Thread>