[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6uAHp-FDsXS3EMf@hoboy.vegasvil.org>
Date: Tue, 11 Feb 2025 08:51:42 -0800
From: Richard Cochran <richardcochran@...il.com>
To: Wojtek Wasko <wwasko@...dia.com>
Cc: netdev@...r.kernel.org, vadim.fedorenko@...ux.dev, kuba@...nel.org,
horms@...nel.org
Subject: Re: [PATCH net-next v2 0/3] Permission checks for dynamic POSIX
clocks
On Tue, Feb 11, 2025 at 05:09:10PM +0200, Wojtek Wasko wrote:
> 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.
>
> Add a struct file pointer to the POSIX clock context and use it to
> implement the appropriate permission checks on PTP chardevs. Add a
> readonly option to testptp.
>
> 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.
>
> Wojtek Wasko (3):
> posix clocks: Store file pointer in clock context
> ptp: Add file permission checks on PHCs
> testptp: Add option to open PHC in readonly mode
For the series:
Acked-by: Richard Cochran <richardcochran@...il.com>
Powered by blists - more mailing lists