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] [day] [month] [year] [list]
Message-ID: <MW4PR11MB698415531AEF2041384989FBC27F2@MW4PR11MB6984.namprd11.prod.outlook.com>
Date: Wed, 9 Oct 2024 02:49:45 +0000
From: "Hall, Christopher S" <christopher.s.hall@...el.com>
To: Rodolfo Giometti <giometti@...eenne.com>, "linux-doc@...r.kernel.org"
	<linux-doc@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: Andrew Morton <akpm@...ux-foundation.org>, Greg KH <greg@...ah.com>,
	"corbet@....net" <corbet@....net>, "Mohan, Subramanian"
	<subramanian.mohan@...el.com>, "tglx@...utronix.de" <tglx@...utronix.de>,
	"andriy.shevchenko@...ux.intel.com" <andriy.shevchenko@...ux.intel.com>,
	"Dong, Eddie" <eddie.dong@...el.com>, "N, Pandith" <pandith.n@...el.com>, "T
 R, Thejesh Reddy" <thejesh.reddy.t.r@...el.com>, "Zage, David"
	<david.zage@...el.com>, "Chinnadurai, Srinivasan"
	<srinivasan.chinnadurai@...el.com>
Subject: RE: [RFC 1/3] drivers pps: add PPS generators support

Hi Rudolfo,

> -----Original Message-----
> From: Rodolfo Giometti <giometti@...eenne.com>
> Sent: Tuesday, October 08, 2024 6:51 AM
> To: linux-doc@...r.kernel.org; linux-kernel@...r.kernel.org

> Sometimes one needs to be able not only to catch PPS signals but to
> produce them also. For example, running a distributed simulation,
> which requires computers' clock to be synchronized very tightly.
> 
> This patch adds PPS generators class in order to have a well-defined
> interface for these devices.
> 
> Signed-off-by: Rodolfo Giometti <giometti@...eenne.com>
> ---
>  drivers/pps/Makefile                   |   3 +-
>  drivers/pps/generators/Kconfig         |  19 +-
>  drivers/pps/generators/Makefile        |   4 +
>  drivers/pps/generators/pps_gen-dummy.c |  83 ++++++++
>  drivers/pps/generators/pps_gen.c       | 283 +++++++++++++++++++++++++
>  drivers/pps/generators/sysfs.c         |  89 ++++++++
>  include/linux/pps_gen_kernel.h         |  57 +++++
>  include/uapi/linux/pps_gen.h           |  35 +++
>  8 files changed, 571 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/pps/generators/pps_gen-dummy.c
>  create mode 100644 drivers/pps/generators/pps_gen.c
>  create mode 100644 drivers/pps/generators/sysfs.c
>  create mode 100644 include/linux/pps_gen_kernel.h
>  create mode 100644 include/uapi/linux/pps_gen.h

This looks pretty good to me. I would like to see an alarm callback. We are able
to detect a missed event and rather than stopping inexplicably or writing to the
system log, it would be better to be able to notify an application directly.

Off the top of my head, something like:

void pps_gen_alarm(pps_gen_device *pps_gen) {
	pps_gen->alarm = 1;
	sysfs_notify(pps_gen->dev->kobj, NULL, "alarm");
}

The device is reset by disabling/enabling and this resets the alarm flag.

Could we add something like this?

Thanks,
Chris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ