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]
Date:	Sun, 25 Mar 2007 01:09:03 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Roman Zippel <zippel@...ux-m68k.org>
Cc:	john stultz <johnstul@...ibm.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Avoid time_offset overflows

On Sat, 24 Mar 2007 06:20:45 +0100 (CET) Roman Zippel <zippel@...ux-m68k.org> wrote:

> Hi,
> 
> On Fri, 23 Mar 2007, john stultz wrote:
> 
> > @@ -314,8 +314,8 @@ #endif
> >  		    freq_adj += time_freq;
> >  		    freq_adj = min(freq_adj, (s64)MAXFREQ_NSEC);
> >  		    time_freq = max(freq_adj, (s64)-MAXFREQ_NSEC);
> > -		    time_offset = (time_offset / NTP_INTERVAL_FREQ)
> > -		    			<< SHIFT_UPDATE;
> > +		    do_div(time_offset, NTP_INTERVAL_FREQ);
> > +		    time_offset <<= SHIFT_UPDATE;
> >  		} /* STA_PLL */
> >  	    } /* txc->modes & ADJ_OFFSET */
> >  	    if (txc->modes & ADJ_TICK)
> 
> This is wrong, time_offset is signed and do_div is unsigned.
> In general I planned to do the same change, but the do_div API could use a 
> little cleanup to provide some clear function for signed/unsigned divide 
> (hopefully with a better name than div_long_long_rem_signed or 
> do_div_llr).
> 

Can we do a minimal thing for 2.6.21, worry about API beautification later?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ