-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dynamic-possix-clocks-permission-checks'
Wojtek Wasko says: ==================== Permission checks for dynamic POSIX clocks Dynamic clocks - such as PTP clocks - extend beyond the standard POSIX clock API by using ioctl calls. While file permissions are enforced for standard POSIX operations, they are not implemented for ioctl calls, since the POSIX layer cannot differentiate between calls which modify the clock's state (like enabling PPS output generation) and those that don't (such as retrieving the clock's PPS capabilities). On the other hand, drivers implementing the dynamic clocks lack the necessary information context to enforce permission checks themselves. Additionally, POSIX clock layer requires the WRITE permission even for readonly adjtime() operations before invoking the callback. Add a struct file pointer to the POSIX clock context and use it to implement the appropriate permission checks on PTP chardevs. Permit readonly adjtime() for dynamic clocks. Add a readonly option to testptp. Changes in v4: - Allow readonly adjtime() for dynamic clocks, as suggested by Thomas Changes in v3: - Reword the log message for commit against posix-clock and fix documentation of struct posix_clock_context, as suggested by Thomas Changes in v2: - Store file pointer in POSIX clock context rather than fmode in the PTP clock's private data, as suggested by Richard. - Move testptp.c changes into separate patch. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
4 changed files
with
46 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters