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:   Sun, 7 Jan 2018 21:26:44 +0530
From:   Keerthy <j-keerthy@...com>
To:     Ladislav Michl <ladis@...ux-mips.org>, <daniel.lezcano@...aro.org>
CC:     <tony@...mide.com>, <aaro.koskinen@....fi>,
        <thierry.reding@...il.com>, <grygorii.strashko@...com>,
        <linux-omap@...r.kernel.org>, <robh+dt@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-pwm@...r.kernel.org>, <sebastian.reichel@...labora.co.uk>,
        <linux-kernel@...r.kernel.org>, <t-kristo@...com>
Subject: Re: [PATCH v6 10/10] clocksource: timer-dm: Check prescaler value



On 1/5/2018 4:17 AM, Ladislav Michl wrote:
> On Tue, Jan 02, 2018 at 03:39:59PM +0530, Keerthy wrote:
>> From: Ladislav Michl <ladis@...ux-mips.org>
>>
>> Invalid prescaler value is silently ignored. Fix that
>> by returning -EINVAL in such case. As invalid value
>> disabled use of the prescaler, use -1 explicitely for
>> that purpose.
>>
>> Signed-off-by: Ladislav Michl <ladis@...ux-mips.org>
>> ---
>>   drivers/clocksource/timer-dm.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/clocksource/timer-dm.c b/drivers/clocksource/timer-dm.c
>> index 60db173..01a9cb0 100644
>> --- a/drivers/clocksource/timer-dm.c
>> +++ b/drivers/clocksource/timer-dm.c
>> @@ -672,6 +672,9 @@ int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
>>   	if (prescaler >= 0x00 && prescaler <= 0x07) {
>>   		l |= OMAP_TIMER_CTRL_PRE;
>>   		l |= prescaler << 2;
>> +	} else {
>> +		if (prescaler != -1)
>> +			return -EINVAL;
> 
> Argh... This is actually wrong, as it leaves timer enabled.
> I suggest simply dropping this patch and I'll rethink whole
> approach a bit later (and better).

Okay. I hope the rest 9 patches work well for you.

> 
>>   	}
>>   	omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
>>   
> 
> Sorry for the noise,
> 	ladis
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ