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] [day] [month] [year] [list]
Date:	Tue, 3 Jul 2012 07:16:03 +0000
From:	"AnilKumar, Chimata" <anilkumar@...com>
To:	Axel Lin <axel.lin@...il.com>
CC:	"Girdwood, Liam" <lrg@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Nori, Sekhar" <nsekhar@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: RE: [PATCH 2/2] regulator: tps65217: Fix voltage boundary checking
 in tps65217_pmic_map_voltage

On Tue, Jul 03, 2012 at 12:39:45, Axel Lin wrote:
> 
> > In side tps65217_pmic_map_voltage() we have
> > 
> > tps->info[rid]->uv_to_vsel(850000, &sel) nothing but
> > tps65217_uv_to_vsel1(850000, &sel);
> > 
> > sel = (((850000 - 900000) + (25000) - 1) / (25000));
> > sel = ((-25001)/(25000));
> > sel = -1; /* Which is not expected */
> > 
> > Ideally this would be the change
> > 
> > 	if (min_uV < tps->info[rid]->min_uV)
> > 		min_uV = tps->info[rid]->min_uV;
> > 
> ok. I got your point now.
> 
> So if min_uV < tps->info[rid]->min_uV, we need to set
> min_uV = tps->info[rid]->min_uV.
> This is because the equation we used in uv_to_vsel() does not allow
> min_uV < tps->info[rid]->min_uV, otherwise it returns negative selector.
> 
> 
> > 	if (max_uV > tps->info[rid]->max_uV)
> > 		max_uV = tps->info[rid]->max_uV;
> 
> This looks not necessary. the equation in uv_to_vsel() does not use
> max_uV.
> 

Yes, I agree.

Regards
AnilKumar--
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