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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Jul 2011 17:36:46 +0100
From:	Rafał Bilski <rafalbilski@...eria.pl>
To:	Axel Lin <axel.lin@...il.com>
CC:	linux-kernel@...r.kernel.org, Dave Jones <davej@...hat.com>,
	cpufreq@...r.kernel.org
Subject: Re: [RFC][PATCH] cpufreq: e_powersaver: Fix checking brand for
 EPS_BRAND_C3


> Do not return -ENODEV for EPS_BRAND_C3.
>
> Signed-off-by: Axel Lin<axel.lin@...il.com>
> ---
> I just found the code is suspect.
> I don't have this hardware handy.
> Anyone can help to confirm and test if this patch works?
> Axel
>
>   drivers/cpufreq/e_powersaver.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
> index 35a257d..637f055 100644
> --- a/drivers/cpufreq/e_powersaver.c
> +++ b/drivers/cpufreq/e_powersaver.c
> @@ -199,8 +199,9 @@ static int eps_cpu_init(struct cpufreq_policy *policy)
>   		break;
>   	case EPS_BRAND_C3:
>   		printk(KERN_CONT "C3\n");
> -		return -ENODEV;
>   		break;
> +	default:
> +		return -ENODEV;
>   	}
>   	/* Enable Enhanced PowerSaver */
>   	rdmsrl(MSR_IA32_MISC_ENABLE, val);
EPS_BRAND_C3 isn't handled by this driver. So you have to return -ENODEV 
for it. Why this code is suspect?
If you looking for an error it is probably in:
 > rdmsr(0x1154, lo, hi);
 > brand = (((lo >> 4) ^ (lo >> 2))) & 0x000000ff;
which was added later to this driver. Probably & 0xff should be replaced 
by & 3.

Best regards
Rafał Bilski


----------------------------------------------------------------
Najwieksza baza samochodow nowych i uzywanych
Sprawdz >> http://linkint.pl/f29e3
--
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