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: <20161017152043.GA502@swordfish>
Date:   Tue, 18 Oct 2016 00:20:43 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:     "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Aaro Koskinen <aaro.koskinen@....fi>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH] cpufreq: fix overflow in cpufreq_table_find_index_dl()

On (10/18/16 00:14), Sergey Senozhatsky wrote:
[..]
>  include/linux/cpufreq.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index 5fa55fc..2a7aa0b 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -677,10 +677,10 @@ static inline int cpufreq_table_find_index_dl(struct cpufreq_policy *policy,
>  		if (best == table - 1)
>  			return pos - table;
>  
> -		return best - pos;
> +		return pos - best;
>  	}
>  
> -	return best - pos;
> +	return pos - best;
>  }

hmm.., you know what... I'm now actually curious,
why does it do `pos - best' and not `best - table'?

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ