All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: ARM SoC Team <arm@kernel.org>, SoC Team <soc@kernel.org>,
	ALKML <linux-arm-kernel@lists.infradead.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	Arnd Bergmann <arnd@kernel.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Olof Johansson <olof@lixom.net>
Subject: [GIT PULL] firmware: arm_scmi: Fixes for v5.19
Date: Tue, 14 Jun 2022 11:00:07 +0100	[thread overview]
Message-ID: <20220614100007.1029881-1-sudeep.holla@arm.com> (raw)

Hi ARM SoC Team,

Please pull !

Regards,
Sudeep

-->8

The following changes since commit f2906aa863381afb0015a9eb7fefad885d4e5a56:

  Linux 5.19-rc1 (2022-06-05 17:18:54 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git tags/scmi-fixes-5.19

for you to fetch changes up to 44dbdf3bb3f44bf08897ed5f22eb262edcf3d926:

  firmware: arm_scmi: Fix incorrect error propagation in scmi_voltage_descriptors_get (2022-06-12 19:59:55 +0100)

----------------------------------------------------------------
Arm SCMI firmware driver fixes for v5.19

Bunch of fixes to address:
1. Issues reported on RK3568 EVB1 and BPI-R2 pro platforms using SCMI.
   More checks were added to validate the firmware response but that
   resulted in breaking above platforms, so the checks are relaxed when
   for cases where there is no potential memory corruption issues.

2. Possible data leak by reading more than required length from the firmware.
   Recent addition of support for v3.1 extended names used larger buffers
   in the kernel and used their size to read response from the firmware even
   for cases where shorter formats are used. While that is mostly harmless
   except when firmware sends malformed non-NULL terminated buffers.

3. Possible issues sending unsupported commands to the firmware.
   SENSOR_AXIS_NAME_GET added in v3.1 needs to be used only if the firmware
   supports it. While the firmware conformant to the spec must return not
   supported error for any unsupported features, it is always safer to
   avoid issuing commands that are known to be unsupported.

4. Incorrect error propagation in scmi_voltage_descriptors_get.
   Since the return value is not reset for each iteration of the loop, the
   error value in the previous iteration will be carried for the current one.
   Fix that by not saving the return values into local variable.

5. Some warnings reported by cppcheck

----------------------------------------------------------------
Cristian Marussi (4):
      firmware: arm_scmi: Relax base protocol sanity checks on the protocol list
      firmware: arm_scmi: Remove all the unused local variables
      firmware: arm_scmi: Fix SENSOR_AXIS_NAME_GET behaviour when unsupported
      firmware: arm_scmi: Avoid using extended string-buffers sizes if not necessary

Ludvig Pärsson (1):
      firmware: arm_scmi: Fix incorrect error propagation in scmi_voltage_descriptors_get

 drivers/firmware/arm_scmi/base.c      | 24 ++++++++-----
 drivers/firmware/arm_scmi/clock.c     |  7 ++--
 drivers/firmware/arm_scmi/perf.c      |  6 ++--
 drivers/firmware/arm_scmi/power.c     |  2 +-
 drivers/firmware/arm_scmi/protocols.h |  2 --
 drivers/firmware/arm_scmi/reset.c     |  2 +-
 drivers/firmware/arm_scmi/sensors.c   | 68 ++++++++++++++++++++++++++---------
 drivers/firmware/arm_scmi/voltage.c   | 15 +++-----
 include/linux/scmi_protocol.h         |  9 ++---
 9 files changed, 85 insertions(+), 50 deletions(-)

WARNING: multiple messages have this Message-ID (diff)
From: Sudeep Holla <sudeep.holla@arm.com>
To: ARM SoC Team <arm@kernel.org>, SoC Team <soc@kernel.org>,
	ALKML <linux-arm-kernel@lists.infradead.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	Arnd Bergmann <arnd@kernel.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Olof Johansson <olof@lixom.net>
Subject: [GIT PULL] firmware: arm_scmi: Fixes for v5.19
Date: Tue, 14 Jun 2022 11:00:07 +0100	[thread overview]
Message-ID: <20220614100007.1029881-1-sudeep.holla@arm.com> (raw)

Hi ARM SoC Team,

Please pull !

Regards,
Sudeep

-->8

The following changes since commit f2906aa863381afb0015a9eb7fefad885d4e5a56:

  Linux 5.19-rc1 (2022-06-05 17:18:54 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git tags/scmi-fixes-5.19

for you to fetch changes up to 44dbdf3bb3f44bf08897ed5f22eb262edcf3d926:

  firmware: arm_scmi: Fix incorrect error propagation in scmi_voltage_descriptors_get (2022-06-12 19:59:55 +0100)

----------------------------------------------------------------
Arm SCMI firmware driver fixes for v5.19

Bunch of fixes to address:
1. Issues reported on RK3568 EVB1 and BPI-R2 pro platforms using SCMI.
   More checks were added to validate the firmware response but that
   resulted in breaking above platforms, so the checks are relaxed when
   for cases where there is no potential memory corruption issues.

2. Possible data leak by reading more than required length from the firmware.
   Recent addition of support for v3.1 extended names used larger buffers
   in the kernel and used their size to read response from the firmware even
   for cases where shorter formats are used. While that is mostly harmless
   except when firmware sends malformed non-NULL terminated buffers.

3. Possible issues sending unsupported commands to the firmware.
   SENSOR_AXIS_NAME_GET added in v3.1 needs to be used only if the firmware
   supports it. While the firmware conformant to the spec must return not
   supported error for any unsupported features, it is always safer to
   avoid issuing commands that are known to be unsupported.

4. Incorrect error propagation in scmi_voltage_descriptors_get.
   Since the return value is not reset for each iteration of the loop, the
   error value in the previous iteration will be carried for the current one.
   Fix that by not saving the return values into local variable.

5. Some warnings reported by cppcheck

----------------------------------------------------------------
Cristian Marussi (4):
      firmware: arm_scmi: Relax base protocol sanity checks on the protocol list
      firmware: arm_scmi: Remove all the unused local variables
      firmware: arm_scmi: Fix SENSOR_AXIS_NAME_GET behaviour when unsupported
      firmware: arm_scmi: Avoid using extended string-buffers sizes if not necessary

Ludvig Pärsson (1):
      firmware: arm_scmi: Fix incorrect error propagation in scmi_voltage_descriptors_get

 drivers/firmware/arm_scmi/base.c      | 24 ++++++++-----
 drivers/firmware/arm_scmi/clock.c     |  7 ++--
 drivers/firmware/arm_scmi/perf.c      |  6 ++--
 drivers/firmware/arm_scmi/power.c     |  2 +-
 drivers/firmware/arm_scmi/protocols.h |  2 --
 drivers/firmware/arm_scmi/reset.c     |  2 +-
 drivers/firmware/arm_scmi/sensors.c   | 68 ++++++++++++++++++++++++++---------
 drivers/firmware/arm_scmi/voltage.c   | 15 +++-----
 include/linux/scmi_protocol.h         |  9 ++---
 9 files changed, 85 insertions(+), 50 deletions(-)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-06-14 10:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 10:00 Sudeep Holla [this message]
2022-06-14 10:00 ` [GIT PULL] firmware: arm_scmi: Fixes for v5.19 Sudeep Holla
2022-06-14 20:33 ` patchwork-bot+linux-soc
2022-06-14 20:37 ` patchwork-bot+linux-soc
2022-06-15  3:42 ` Florian Fainelli
2022-06-15  3:42   ` Florian Fainelli
2022-06-15 12:29   ` Sudeep Holla
2022-06-15 12:29     ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220614100007.1029881-1-sudeep.holla@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=arm@kernel.org \
    --cc=arnd@kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=olof@lixom.net \
    --cc=soc@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.