Re: [PATCH v10 08/24] firmware: arm_scmi: Add Telemetry configuration operations

Fayssal Benmlih <[email protected]>
Newsgroups org.kernel.vger.arm-scmi,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Cristian,

The group-versus-instance cached-state handling is improved in V10, but one
part of the original issue remains.

For a group operation, current_state and current_mode now refer to the
group, but collection_configure() still assigns:

        ti->info.notif_enabled =
                *current_mode == SCMI_TLM_NOTIFICATION;

A group operation can therefore overwrite the instance-wide notification
state. For example, configuring one group for on-demand collection can clear
the global flag while another group is still using notifications.

Please either maintain notification state per group or derive the
instance-wide state from all configured groups.

The SHMTI offset validation is also still incomplete. The checked addition
in scmi_telemetry_de_payld_safe_calc() verifies the line against
shmti->info.len, but a DE line must end before the TDCF epilogue, not merely
before the end of the allocation.

The returned block-timestamp offset is checked through
scmi_telemetry_shmti_overflow(), which uses the same end-of-allocation
boundary. Please validate both complete lines against:

        shmti->info.len - TDCF_EPLG_SZ

using checked arithmetic.

Thanks,
Fayçal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.