Re: privilege levels and kernel mode

From: Alan Cox
Date: Sun Oct 15 2006 - 18:35:38 EST


Ar Sul, 2006-10-15 am 20:17 +0100, ysgrifennodd ranjith kumar:
> I know how to include assembly instructions in a C
> program to wtrite into "Model specific registers". But
> that program has to be run at privilege level zero.

Its more hairy than that because of SMP and handling overflows and
according to whether you need to profile all use or your own task and so
on. Fortunately someone has done all the hard work already - take a look
at the oprofile support in the kernel and see if it will do what you
need.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/