root and capabilities list

Dimitri John Ledkov xnox at ubuntu.com
Wed Oct 15 20:53:45 UTC 2014


On 15 October 2014 02:11, ds <1000hz.radiowave at gmail.com> wrote:
>
> On 15.10.2014 04:54, Colin Watson wrote:
>
>>   Martin's right - CAP_SYS_MODULE is functionally equivalent to root.
>
> I see.
> Anyway, there is another part, reading the msr and cpuid. For that, it seems
> to be really beneficial, to make it available to everyone. So the process
> which needs it, can only live with limited CAP_SYS_RAWIO powers. It seem to
> me, that the root rights are there only because the capability system was
> introduced only a couple of years ago, and the msr and cpuid part was not
> yet changed with capabilities in mind.
> As i said, i am new to linux, so not sure how it all works, and where to
> discuss the whole thing.

#include <cpuid.h>

And then use __get_cpuid() for cpuid. I believe it's possible to
retrieve it without being root that way.
As user-space libraries use that to check if they can/cannot execute
certain optimized instructions.
(e.g. checking for SSE)

-- 
Regards,

Dimitri.




More information about the Ubuntu-devel-discuss mailing list