linux/arch/powerpc/platforms
Andrew Donnellan 7096deb7b5 powerpc/pseries: Fix endianness issue when parsing PLPKS secvar flags
When a user updates a variable through the PLPKS secvar interface, we take
the first 8 bytes of the data written to the update attribute to pass
through to the H_PKS_SIGNED_UPDATE hcall as flags. These bytes are always
written in big-endian format.

Currently, the flags bytes are memcpy()ed into a u64, which is then loaded
into a register to pass as part of the hcall. This means that on LE
systems, the bytes are in the wrong order.

Use be64_to_cpup() instead, to ensure the flags bytes are byteswapped if
necessary.

Reported-by: Stefan Berger <stefanb@linux.ibm.com>
Fixes: ccadf154cb ("powerpc/pseries: Implement secvars for dynamic secure boot")
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230216070903.355091-1-ajd@linux.ibm.com
2023-02-16 21:16:22 +11:00
..
4xx powerpc/msi: Fix deassociation of MSI descriptors 2022-12-17 10:58:48 +00:00
8xx powerpc/8xx: Add missing of_node_put() in tqm8xx_setup.c 2022-09-05 17:28:25 +10:00
40x powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
44x powerpc: Check !irq instead of irq == NO_IRQ and remove NO_IRQ 2023-01-30 17:53:05 +11:00
52xx powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
82xx powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
83xx powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe() 2022-12-02 20:09:48 +11:00
85xx powerpc/sgy_cts1000: convert to using gpiod API and facelift 2022-11-24 23:31:48 +11:00
86xx powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
512x powerpc/512x: Add missing of_node_put() in clock-commonclk.c 2022-09-05 17:30:24 +10:00
amigaone powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
book3s driver core: fix up some missing class.devnode() conversions. 2022-11-29 09:28:46 +01:00
cell powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
chrp powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
embedded6xx powerpc/embedded6xx/ls_uart: Add missing of_node_put() 2022-09-05 17:28:26 +10:00
maple powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
microwatt random: remove CONFIG_ARCH_RANDOM 2022-07-18 15:03:37 +02:00
pasemi powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
powermac powerpc/powermac: Fix symbol not declared warnings 2022-11-24 23:31:50 +11:00
powernv powerpc/secvar: Handle max object size in the consumer 2023-02-12 22:12:37 +11:00
ps3 powerpc/ps3: Change updateboltedpp() panic to info 2023-02-12 22:11:35 +11:00
pseries powerpc/pseries: Fix endianness issue when parsing PLPKS secvar flags 2023-02-16 21:16:22 +11:00
fsl_uli1575.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
Kconfig powerpc: Rename PPC_NATIVE to PPC_HASH_MMU_NATIVE 2021-12-02 22:57:22 +11:00
Kconfig.cputype powerpc/64: Replace -mcpu=e500mc64 by -mcpu=e5500 2023-02-15 22:41:11 +11:00
Makefile powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00