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  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]
Date:   Sun, 24 May 2020 10:57:33 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     netdev@...r.kernel.org
Cc:     David Miller <davem@...emloft.net>,
        Miroslav Lichvar <mlichvar@...hat.com>,
        John Stultz <john.stultz@...aro.org>,
        Vincent Cheng <vincent.cheng.xh@...esas.com>
Subject: Re: [PATCH net-next] Let the ADJ_OFFSET interface respect the
 STA_NANO flag for PHC devices.

On Sun, May 24, 2020 at 06:28:00AM -0700, Richard Cochran wrote:
> @@ -147,8 +147,13 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct __kernel_timex *tx)
>  			err = ops->adjfreq(ops, ppb);
>  		ptp->dialed_frequency = tx->freq;
>  	} else if (tx->modes & ADJ_OFFSET) {
> -		if (ops->adjphase)
> -			err = ops->adjphase(ops, tx->offset);
> +		if (ops->adjphase) {
> +			s32 offset = tx->offset;
> +			if (!(tx->status & STA_NANO)) {
> +				offset *= NSEC_PER_USEC;

Oh man.  This should check for ADJ_NANO instead.  V2 follows soon...

Thanks,
Richard

Powered by blists - more mailing lists