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: <20090209220830.GA15633@ioremap.net>
Date:	Tue, 10 Feb 2009 01:08:30 +0300
From:	Evgeniy Polyakov <zbr@...emap.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, ian@...are.dropbear.id.au
Subject: Re: [1/1] w1: w1 temp calculation overflow fix.

On Mon, Feb 09, 2009 at 01:56:41PM -0800, Andrew Morton (akpm@...ux-foundation.org) wrote:
> > Signed-off-by: Ian Dall <ian@...are.dropbear.id.au>
> > Signed-off-by: Evgeniy Polyakov <zbr@...emap.net>
> 
> I assumed from the above that Ian authored this patch.  Please let me
> know if that was incorrect.

> The way to track authorship is to put the originator's From: line at
> the top of the changelog.
 
Yes, Ian is the author.
I will put appropriate From: field next time, I did not know it :)

> > --- a/drivers/w1/slaves/w1_therm.c
> > +++ b/drivers/w1/slaves/w1_therm.c
> > @@ -115,7 +115,7 @@ static struct w1_therm_family_converter w1_therm_families[] = {
> >  
> >  static inline int w1_DS18B20_convert_temp(u8 rom[9])
> >  {
> > -	s16 t = (rom[1] << 8) | rom[0];
> > +	int t = ((s16)rom[1] << 8) | rom[0];
> >  	t = t*1000/16;
> >  	return t;
> >  }
> 
> It seems strange to use s16 here, but it will fix the bug.
> 
> Perhaps this function should be using plain old `unsigned' everywhere.
> 
> Please provide changelogs.  This bugfix is applicable to 2.6.28.x and
> probably earlier.  But due to the lack of any supporting information I
> am not in a position to determine whether it should be backported.
 
That's what was placed into the documentation iirc, code for the more
advanced chip works ok. This code exists for way too long, but
apparently did not grow higher than 32 degrees, so it is applicable for
the earlier trees either.

-- 
	Evgeniy Polyakov
--
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