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]
Message-ID: <452A51C2.2010106@gmail.com>
Date:	Mon, 09 Oct 2006 17:42:26 +0400
From:	"Eugeny S. Mints" <eugeny.mints@...il.com>
To:	Dominik Brodowski <linux@...inikbrodowski.net>,
	"Eugeny S. Mints" <eugeny.mints@...il.com>,
	pm list <linux-pm@...ts.osdl.org>,
	Matthew Locke <matt@...adgs.com>,
	Amit Kucheria <amit.kucheria@...ia.com>,
	Igor Stoppa <igor.stoppa@...ia.com>,
	kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] CPUFreq PowerOP integration, Centrino PM Core and OPs registration
 2/3

Dominik Brodowski wrote:
> Hi,
> 
> On Thu, Sep 14, 2006 at 06:50:02PM +0400, Eugeny S. Mints wrote:
> 
>> +static int 
>> +process_pwr_param(struct pm_core_point *opt, int op, char *param_name,
>> +		  int va_arg)
>> +{
>> +	int cpu = 0;
>> +	char buf[8];
>> +
>> +	for (cpu = 0; cpu < NR_CPUS; cpu++)
>> +	{
>> +		sprintf(buf, "v%d", cpu);
>> +
>> +		if (strcmp(param_name, buf) == 0) {
>> +			if (op == PWR_PARAM_SET)
>> +				opt->opt[cpu].pwpr[_I386_PM_CORE_POINT_V] = 
>> +									va_arg;
>> +			else if (opt != NULL)
>> +				*(int *)va_arg = 
>> +				     opt->opt[cpu].pwpr[_I386_PM_CORE_POINT_V];
>> +			else if ((*(int *)va_arg = get_vtg(cpu)) <= 0)
>> +				return -EINVAL;
>> +			return 0;
>> +		}
>> +
>> +		sprintf(buf, "freq%d", cpu);
>> +
>> +		if (strcmp(param_name, buf) == 0) {
>> +			if (op == PWR_PARAM_SET)
>> +				opt->opt[cpu].pwpr[_I386_PM_CORE_POINT_FREQ] = 
>> +									va_arg;
>> +			else if (opt != NULL)
>> +				*(int *)va_arg = 
>> +				  opt->opt[cpu].pwpr[_I386_PM_CORE_POINT_FREQ];
>> +			else if ((*(int *)va_arg = get_freq(cpu)) <= 0)
>> +				return -EINVAL;
>> +
>> +			return 0;
>> +		}
>> +	}
>> +
>> +	return -EINVAL;
>> +}
> 
> Ouch. IIRC Pavel had some fine comments about such string parsing deep in
> arch code... Other than that I see lots of indirection, lots of code being
> added (~400 lines) for no gain in functionality for the x86 case.
THis code is no longer anyhow relevant to the latest take of PowerOP. Please 
check to make sure that you are looking at the very latest PowerOP code 
submitted for discussion. Latest PowerOP take gets rid of all parsing. Latest 
patches do not contain x86 patch yet but omap PM core reference code is 
supplied.  So please use  omap code for the discussion. FYI, forward porting of 
x86 patches to the latest POwerOP is on the way.

Thanks,
	Eugeny
> 
> Thanks,
> 	Dominik
> 

-
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