Re: Safely reading Intel MSRs?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=UHvwac5XCqjP7OtYIKgj/8q1qfa9Ck0nzD9zCJQcscM=; b=gY42x5BnjLd4Lt0RMMnTZM3ZZGeYOVqlMg188joACzUrP7gOqIFvP7B4AOsn/ZBIi/ JSxccVngjxUqjqPGsGN+erZehtaZqXQ5l9MOuV6eEgVpFLRvcI9zCWDAnHC5ENYg5RVZ dnidFAeeNvWWLvscd/C3n+O0Yic7ODu/376jk= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=iyEuBioCCkQmFK5iZjldeuqLMVxL2ixoCxbimmoVNS3HdjENjM/BSmJmRyFWd1clvv 7kxkusy0SdeILy5a1kowrhLtYyFlXWBMvTbOZgJiOVGNcb8LB1maNLIHBF/bEcEIO2rz SE7DbcoXosi48e6vmLtswaIZkWwAAb4SJWZNs= Hi nop (and yes include what you need), osfmk/i386/proc_reg.h so can use the defined rdmsr, I guess , instead of doing it by hand, if I did "well" understand, unsigned hi, lo, msr; __asm( movl %%edx, % ... ); Cheers! On Fri, Nov 21, 2008 at 8:58 AM, Brent Burton <brentpburton@gmail.com> wrote:
Hi all,
I am writing some internal system software including a kernel extension that has the ability to read MSR values. While I have a runtime check for processor family and model, the mapping to valid MSR registers isn't finished (and of course, may have errors when it is finished). If an invalid MSR is read or written, it causes a kernel panic (via GPF), and I'd like to protect against this for all cases.
Are there kernel functions, accessible from a kext, that provide safe reading of Intel MSRs?
If not, one alternative is to (temporarily) redirect GPF handling. I don't particularly like this path, but I want to get more information on it. Where is documentation or headers that cover this, if any?
thanks, -Brent _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/openspecies%40gmail.com
This email sent to openspecies@gmail.com
-- -mmw _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
mm w