linux-stable/drivers/firmware/arm_ffa
Arnd Bergmann 629253b2f6 firmware: arm_ffa: Avoid string-fortify warning in export_uuid()
Copying to a 16 byte structure into an 8-byte struct member
causes a compile-time warning:

 | In file included from drivers/firmware/arm_ffa/driver.c:25:
 | In function 'fortify_memcpy_chk',
 |    inlined from 'export_uuid' at include/linux/uuid.h:88:2,
 |    inlined from 'ffa_msg_send_direct_req2' at drivers/firmware/arm_ffa/driver.c:488:2:
 | include/linux/fortify-string.h:571:25: error: call to '__write_overflow_field'
 |   declared with attribute warning: detected write beyond size of field
 |   (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
 |                         __write_overflow_field(p_size_field, size);

Use a union for the conversion instead and make sure the byte order
is fixed in the process.

Fixes: aaef3bc981 ("firmware: arm_ffa: Add support for FFA_MSG_SEND_DIRECT_{REQ,RESP}2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Message-Id: <20240909110938.247976-1-arnd@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-10-14 21:07:27 +01:00
..
bus.c Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
common.h firmware: arm_ffa: Split bus and driver into distinct modules 2024-05-29 23:23:25 +01:00
driver.c firmware: arm_ffa: Avoid string-fortify warning in export_uuid() 2024-10-14 21:07:27 +01:00
Kconfig firmware: arm_ffa: Add support for SMCCC as transport to FFA driver 2021-05-26 22:36:46 +01:00
Makefile firmware: arm_ffa: Split bus and driver into distinct modules 2024-05-29 23:23:25 +01:00
smccc.c firmware: arm_ffa: Add support for SMCCC as transport to FFA driver 2021-05-26 22:36:46 +01:00