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: <6a6d4ec3156cb00537ed632f60430a37@agner.ch>
Date:	Fri, 03 Jul 2015 13:11:04 +0200
From:	Stefan Agner <stefan@...er.ch>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Jingchang Lu <b35083@...escale.com>,
	Shawn Guo <shawn.guo@...aro.org>
Subject: Re: [PATCH 39/41] clocksource: vf_pit: Migrate to new 'set-state'
 interface

On 2015-07-03 10:57, Viresh Kumar wrote:
> On 03-07-15, 10:10, Stefan Agner wrote:
>> >  	.features	= CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
>> > -	.set_mode	= pit_set_mode,
>> > +	.set_state_shutdown = pit_shutdown,
>> > +	.set_state_periodic = pit_set_periodic,
>>
>> I'm not really familiar with the interface, but given that we announce
>> the feature CLOCK_EVT_FEAT_ONESHOT shouldn't we add a set_state_oneshot
>> callback here?
> 
> We weren't doing anything in pit_set_mode(ONESHOT) and so that
> callback is not implemented. In case you need to do something in
> set_state_oneshot(), we can add it back.

True, weren't doing anything. I wonder if that is right. Afaik, we
should set the same timer for oneshot too, hence call
pit_set_next_event. With your change we can just reuse the same function
(pit_set_periodic) for set_state_oneshot.

To maintain the atomicity of the changes, this would need to be fixed in
a separate patch anyway. So this change looks good to me:

Acked-by: Stefan Agner <stefan@...er.ch>

I guess "clockevents: Allow set-state callbacks to be optional" makes it
before this patch? Otherwise we would call a null pointer...

--
Stefan
--
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