lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 4 Mar 2011 07:05:46 +0100
From:	Richard Cochran <richardcochran@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	John Stultz <john.stultz@...aro.org>,
	Richard Cochran <richard.cochran@...cron.at>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [patch 28/28] posix clocks: Introduce dynamic clocks

On Thu, Mar 03, 2011 at 06:07:59PM +0100, torbenh wrote:
> On Thu, Mar 03, 2011 at 05:01:14PM +0100, Richard Cochran wrote:
> > 
> > You are right, but I think the check should be for the capability
> > instead. Checking the file mode for RDWR seems a bit pedantic to me.
> 
> i dont see, why an fd based clock, which already has associated permissions,
> should check against the capability.
> why should the ptpd be running as root ?
> changing the permissions of /dev/ptp0 to allow ptpd to set the
> clock should be enough. 

Thinking a bit more about this, I can see three options:

1. Enfore CAP_SYS_TIME in the posix dynamic clock layer.

2. Defer the CAP_SYS_TIME check to the underlying dynamic clock. That
   puts the decision of whether a clock counts as a "system clock" to
   the author of the driver.

3. As you suggest, just use file read/write as get/set permissions.

The admin can still restrict device node ownership and read access in
any case. You could event combine these methods (1 and 3, or 1 and 2)
but I think that would only lead to user confusion.

I am not opinionated about this, but I would like to gather some
feedback before going forward. The implementation is easy in any case.

Thanks,

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ