[PATCH v8 00/13] fix several inconsistencies with sysfs configuration in etmX

Yeoreum Yun yeoreum.yun at arm.com
Thu Jul 16 13:11:22 PDT 2026


> On Thu, Jul 16, 2026 at 01:48:15PM +0100, Suzuki K Poulose wrote:
> > On 29/06/2026 09:59, Yeoreum Yun wrote:
> > > The current ETMx configuration via sysfs can lead to the following
> > > inconsistencies:
> > > 
> > >    - If a configuration is modified via sysfs while a perf session is
> > >      active, the running configuration may differ between before
> > >      a sched-out and after a subsequent sched-in.
> > > 
> > >    - If a perf session and sysfs session tries to enable concurrently,
> > >      configuration from configfs could be corrupted (etm4).
> > > 
> > >    - There is chance to corrupt drvdata->config if perf session tries
> > >      to enabled among handling cscfg_csdev_disable_active_config()
> > >      in etm4_disable_sysfs() (etm4).
> > > 
> > > To resolve these inconsistencies, the configuration should be separated into:
> > > 
> > >    - active_config, which is applied configuration for the current session
> > >    - config, which stores the settings configured via sysfs.
> > > 
> > > and apply configuration from configfs after taking a mode.
> > > 
> > > Also, This patch set includes some small fixes:
> > >    - missing trace id release in etm4x.
> > >    - underflow issue for nrseqstate.
> > >    - wrong check in etm4x_sspcicrn_present().
> > >    - missing call of cscfg_csdev_disable_active_config()
> > > 
> > > This patch based on coresight tree's next
> > 
> > 
> > Please could you move all the "Fixes" to the top of the series, that way
> > it is cleaner to backport for the stable kernels
> 
> Okay. but the fix which based on the cleanup wouldn't be top of it.
> I'll deploy below patches first:
> 
>   coresight: etm3x: change drvdata->spinlock type to raw_spin_lock_t
>   coresight: etm4x: fix leaked trace id
>   coresight: etm4x: fix underflow for usage of (nrseqstate - 1)
>   coresight: etm4x: fix wrong check of etm4x_sspcicrn_present()

Sorry. Ignore this please, I've moved all fix in the top properly.

Thanks!

[...]

-- 
Sincerely,
Yeoreum Yun



More information about the linux-arm-kernel mailing list