[PATCH v2 4/4] pwm: meson: make full use of common clock framework

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sun Apr 23 10:34:38 PDT 2023


On Mon, Apr 17, 2023 at 11:27 AM Thierry Reding
<thierry.reding at gmail.com> wrote:
[...]
> It seems to me like really your only option is to completely hide that
> clock from Linux. Even if you use CLK_IGNORE_UNUSED, you could still run
> into a situation where the clock gets turned off.
>
> Actually the same is true of the PWM channel. Once the PWM channel is
> registered somebody could try and use the sysfs interface to control it.
> So even if nothing in the DT makes use of the "reserved" PWM channel,
> people could still try to use it, which means that even if the clock
> were to remain always on, somebody could modify the period and
> destabilize the CPU.
>
> I think reserving specific PWM channels is the only way to safely make
> this work. People could still abuse this by patching the DT, but once
> you can do that, you can probably do a whole bunch of other things as
> well, so if there's no hardware mechanism to prevent access to the PWM
> channel, that's about as good as it'll get.
I agree with you. It should be done in a separate patch(set), not as
part of this CCF conversion as the issue which you mention is already
present even without Heiner's changes.


Best regards,
Martin



More information about the linux-arm-kernel mailing list