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]
Message-ID: <20150706204458.GE25028@jcartwri.amer.corp.natinst.com>
Date:	Mon, 6 Jul 2015 15:44:58 -0500
From:	Josh Cartwright <joshc@...com>
To:	Christopher Hall <christopher.s.hall@...el.com>
Cc:	richardcochran@...il.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, john.ronciak@...el.com,
	john.stultz@...aro.org, tglx@...utronix.de
Subject: Re: [PATCH v2 1/1] Added additional callback to ptp_clock_info:

On Thu, Jul 02, 2015 at 06:14:48PM -0700, Christopher Hall wrote:
> * getsynctime64()

Hello Christopher-

A couple comments below.

> 
> This takes 2 arguments referring to system and device time
> 
> With this callback drivers may provide both system time and device time
> to ensure precise correlation
> 
> Modified PTP_SYS_OFFSET ioctl in PTP clock driver to use the above
> callback if it's available
> 
> Added capability (PTP_CLOCK_GETCAPS) for checking whether driver supports
> precise timestamping
> 
> Signed-off-by: Christopher Hall <christopher.s.hall@...el.com>
> ---
[..]
> @@ -196,19 +197,31 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
>  			break;
>  		}
>  		pct = &sysoff->ts[0];
> -		for (i = 0; i < sysoff->n_samples; i++) {
> -			getnstimeofday64(&ts);
> +		if (ptp->info->getsynctime64 && sysoff->n_samples == 1) {
> +			ptp->info->getsynctime64(ptp->info, &ts, &systs);
> +			pct->sec = systs.tv_sec;
> +			pct->nsec = systs.tv_nsec;

It's difficult to make too many judgements without seeing how a driver
might implement this; is there another patchset that shows how a driver
implements this?

[..]
> diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h
> index f0b7bfe..421b637 100644
> --- a/include/uapi/linux/ptp_clock.h
> +++ b/include/uapi/linux/ptp_clock.h
> @@ -51,7 +51,9 @@ struct ptp_clock_caps {
>  	int n_per_out; /* Number of programmable periodic signals. */
>  	int pps;       /* Whether the clock supports a PPS callback. */
>  	int n_pins;    /* Number of input/output pins. */
> -	int rsv[14];   /* Reserved for future use. */
> +	/* Whether the clock supports precise system-device cross timestamps */
> +	int precise_timestamping;

Perhaps now is a good time to add an unsigned int 'flags' member instead,
and start allocating bits.

  Josh

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ