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>] [day] [month] [year] [list]
Date:   Mon, 17 Sep 2018 17:09:30 +0000
From:   "Spruyt, Randy" <Randy.Spruyt@...istiedigital.com>
To:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "john.stultz@...aro.org" <john.stultz@...aro.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "sboyd@...eaurora.org" <sboyd@...eaurora.org>
Subject: getting a PHC reference in a kernel module?

I'm new to kernel driver development, so I hope you bear with me on the question. 

I'd like to timestamp an IRQ event in a kernel module using a PTP synchronized clock (e.g. the PHC from eth0 = /dev/ptp0). E.g. a GPIO pin goes high, I'd like to keep track of when this happened as accurate as we can. One option is to use getnstimeofday() and have phc2sys synchronize /dev/ptp0 with the system  clock. 

This seems to work but I feel like there is a more direct way to just query the PHC clock e.g. using struct ptp_clock* and gettime64(). The question is how to get this pointer, find_driver()? Or something else? Perhaps this is not exposed for a reason?
 
If this is the wrong way to go about this, by all means, I'm open to suggestions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ