Re: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arjan van de Ven <[email protected]> writes:

>> > +	if (!pdev)
>> > +		return 1;
>> 
>> Can this happen?
>
> eh I suppose not; the other code doesn't check it either; fixed
>
>> 
>> > +	/* this can crash the machine when done on the "wrong" device */
>> > +	if (!capable(CAP_SYS_ADMIN))
>> > +		return 1;
>> 
>> Don't the file's permissions suffice?
>
> that's a more philosophical question; you can ask that question about
> the entire capability system ;) Other code in the same file uses this
> same capability for a same level of access though.


A minor nit.  This level of access should really be CAP_SYS_RAWIO.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux