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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 30 Aug 2023 15:01:22 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Xabier Marquiegui <reibax@...il.com>
Cc: chrony-dev@...ony.tuxfamily.org, mlichvar@...hat.com,
	netdev@...r.kernel.org, ntp-lists@...tcorallo.com
Subject: Re: [PATCH] ptp: Demultiplexed timestamp channels

On Wed, Aug 30, 2023 at 11:41:01PM +0200, Xabier Marquiegui wrote:

> +ssize_t ptp_dmtsc_read(struct file *file, char __user *buf, size_t cnt,
> +		       loff_t *offset)
> +{
> +	struct ptp_dmtsc_cdev_info *cdev = file->private_data;
> +
> +	return ptp_queue_read(cdev->pclock, buf, cnt, cdev->minor);
> +}
> +
> +static const struct file_operations fops = {
> +						.owner = THIS_MODULE,
> +						.open = ptp_dmtsc_open,
> +						.read = ptp_dmtsc_read,
> +						.release = ptp_dmtsc_release
> +						};

I'll say it again... There is no need to add a new char dev!

You will need a patch series of at least three patches, step by step:

1. Delete ptp_clock.tsevq
   Replace it will a linked list of `struct timestamp_event_queue`
   Populate the list with ONE queue in ptp_clock_register()

   This will be your first patch.
   It will have the same functionality as before.

2. Allocate a new `struct timestamp_event_queue` on posix_clock_operations.open()
   Add it into the list.
   Remove it again on posix_clock_operations.release()

   This will introduce new functionality, as all events will go to all
   consumers.

3. Introduce a new ioctl that filters events based on user preference.

Hm?

Thanks,
Richard


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ