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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 1 Aug 2022 21:34:23 +0000
From:   "Keller, Jacob E" <jacob.e.keller@...el.com>
To:     "achaiken@...ora.tech" <achaiken@...ora.tech>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "richardcochran@...il.com" <richardcochran@...il.com>
CC:     "spayne@...ora.tech" <spayne@...ora.tech>,
        "alison@...-devel.com" <alison@...-devel.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
Subject: RE: [PATCH] Use ixgbe_ptp_reset on linkup/linkdown for X550



> -----Original Message-----
> From: achaiken@...ora.tech <achaiken@...ora.tech>
> Sent: Monday, August 01, 2022 6:38 AM
> To: Brandeburg, Jesse <jesse.brandeburg@...el.com>;
> richardcochran@...il.com
> Cc: spayne@...ora.tech; achaiken@...ora.tech; alison@...-devel.com;
> netdev@...r.kernel.org; intel-wired-lan@...ts.osuosl.org
> Subject: [PATCH] Use ixgbe_ptp_reset on linkup/linkdown for X550
> 
> From: Steve Payne <spayne@...ora.tech>
> 
> For an unknown reason, when `ixgbe_ptp_start_cyclecounter` is called
> from `ixgbe_watchdog_link_is_down` the PHC on the NIC jumps backward
> by a seemingly inconsistent amount, which causes discontinuities in
> time synchronization. Explicitly reset the NIC's PHC to
> `CLOCK_REALTIME` whenever the NIC goes up or down by calling
> `ixgbe_ptp_reset` instead of the bare `ixgbe_ptp_start_cyclecounter`.
> 
> Signed-off-by: Steve Payne <spayne@...ora.tech>
> Signed-off-by: Alison Chaiken <achaiken@...ora.tech>
> 

Resetting PTP could be a problem if the clock was not being synchronized with the kernel CLOCK_REALTIME, and does result in some loss of timer precision either way due to the delays involved with setting the time.

Do you have an example of the clock jump? How much is it? How often is it? Every time? More information would help in order to debug what is going wrong here.

Thanks,
Jake

> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 750b02bb2fdc2..ab1ec076fa75f 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -7462,7 +7462,7 @@ static void ixgbe_watchdog_link_is_up(struct
> ixgbe_adapter *adapter)
>  	adapter->last_rx_ptp_check = jiffies;
> 
>  	if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
> -		ixgbe_ptp_start_cyclecounter(adapter);
> +		ixgbe_ptp_reset(adapter);
> 
>  	switch (link_speed) {
>  	case IXGBE_LINK_SPEED_10GB_FULL:
> @@ -7527,7 +7527,7 @@ static void ixgbe_watchdog_link_is_down(struct
> ixgbe_adapter *adapter)
>  		adapter->flags2 |= IXGBE_FLAG2_SEARCH_FOR_SFP;
> 
>  	if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
> -		ixgbe_ptp_start_cyclecounter(adapter);
> +		ixgbe_ptp_reset(adapter);
> 
>  	e_info(drv, "NIC Link is Down\n");
>  	netif_carrier_off(netdev);
> --
> 2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ