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: <alpine.LRH.2.21.1711281504580.27929@math.ut.ee>
Date:   Tue, 28 Nov 2017 15:05:38 +0200 (EET)
From:   Meelis Roos <mroos@...ux.ee>
To:     Arnd Bergmann <arnd@...db.de>
cc:     Dave Carroll <david.carroll@...rosemi.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi <linux-scsi@...r.kernel.org>,
        Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: Re: News UBSAN warnings in aacraid

> I think this chunk would solve the problem and result in the
> same behavior as before:
> 
> --- a/drivers/scsi/aacraid/commsup.c
> +++ b/drivers/scsi/aacraid/commsup.c
> @@ -2511,8 +2511,8 @@ int aac_command_thread(void *data)
>                         /* Synchronize our watches */
>                         if (((NSEC_PER_SEC - (NSEC_PER_SEC / HZ)) > now.tv_nsec)
>                          && (now.tv_nsec > (NSEC_PER_SEC / HZ)))
> -                               difference = (((NSEC_PER_SEC -
> now.tv_nsec) * HZ)
> -                                 + NSEC_PER_SEC / 2) / NSEC_PER_SEC;
> +                               difference = HZ + HZ / 2 -
> +                                            now.tv_nsec / (NSEC_PER_SEC / HZ);
>                         else {
>                                 if (now.tv_nsec > NSEC_PER_SEC / 2)
>                                         ++now.tv_sec;
> 
> but I don't see why we add in half a second here. Any ideas?

I did not try to understand the details but I can confirm that this 
patch makes the warnings go away.

-- 
Meelis Roos (mroos@...ux.ee)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ