linux-stable/include
Arnd Bergmann 002ec15747 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
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmKmORcACgkQAEG6vDF+
 4pgQkQ//Q7GnKFQdxm5r1fpphkFFPC3WKnQk2EU/+AHXXyLdxpg88CHKcWc1k+07
 PBwI0gOSLwVERS21m9zRrXUxA7gz6kdBKs6ycMpRt8LNXUYbV3Yxit8F7orKW6oK
 oOkCY6dC44Krg7ZXYaWsduoTECgvivoef6JduQru1/1PUBa6Cu5PrviF9sutYuB4
 qnHxoTykp2f0jQ9/9KOAcIDHCJGPccV14OK0AAXDcWBZgswnajoZk663Je1g+fxn
 0+b7B27DpmtArtTbcyxIgOUHSWP22HoLEoow4JELUXebtQ1CGcxb9I+FBAFzdyPq
 hyV/kchkr2hn/KaCzr7aQCDzmbleVxtr+6Ebe6ysokU+g2R/wvexpCVnogu3Pt4I
 D9bQ+uX3iLHFTbXj8j0w6pNE4+/FgytVKI2VOv+OM7regDXVsOKPAdIha4n6UoU1
 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sdJV4Nzo=
 =Y1Nw
 -----END PGP SIGNATURE-----

Merge tag 'scmi-fixes-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes

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

* tag 'scmi-fixes-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Fix incorrect error propagation in scmi_voltage_descriptors_get
  firmware: arm_scmi: Avoid using extended string-buffers sizes if not necessary
  firmware: arm_scmi: Fix SENSOR_AXIS_NAME_GET behaviour when unsupported
  firmware: arm_scmi: Remove all the unused local variables
  firmware: arm_scmi: Relax base protocol sanity checks on the protocol list

Link: https://lore.kernel.org/r/20220614100007.1029881-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-06-14 12:16:35 +02:00
..
acpi cxl for 5.19 2022-05-27 21:24:19 -07:00
asm-generic kernel: add platform_has() infrastructure 2022-06-06 08:06:00 +02:00
clocksource pwm: Changes for v5.19-rc1 2022-06-01 10:49:11 -07:00
crypto
drm LoongArch: Add writecombine support for drm 2022-06-03 20:09:27 +08:00
dt-bindings Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
keys
kunit
kvm
linux Arm SCMI firmware driver fixes for v5.19 2022-06-14 12:16:35 +02:00
math-emu
media
memory
misc
net Networking fixes for 5.19-rc2, including fixes from bpf and netfilter. 2022-06-09 12:06:52 -07:00
pcmcia
ras
rdma
scsi SCSI misc on 20220524 2022-05-25 19:09:48 -07:00
soc ARM: driver changes for 5.19 2022-05-26 10:32:47 -07:00
sound ARM: multiplatform changes, part 2 2022-06-02 15:23:54 -07:00
target SCSI misc on 20220524 2022-05-25 19:09:48 -07:00
trace workqueue: Fix type of cpu in trace event 2022-06-07 07:09:47 -10:00
uapi tls: Rename TLS_INFO_ZC_SENDFILE to TLS_INFO_ZC_TX 2022-06-09 21:51:57 -07:00
ufs
vdso
video video: fbdev: radeon: Fix spelling typo in comment 2022-05-26 13:38:59 +02:00
xen arm/xen: Assign xen-grant DMA ops for xen-grant DMA devices 2022-06-06 16:07:30 +02:00