linux/drivers/firmware
Niklas Cassel 5ec3444c83 firmware: qcom: scm: Fix crash in qcom_scm_call_atomic1()
qcom_scm_call_atomic1() can crash with a NULL pointer dereference at
qcom_scm_call_atomic1+0x30/0x48.

disassembly of qcom_scm_call_atomic1():
...
<0xc08d73b0 <+12>: ldr r3, [r12]
... (no instruction explicitly modifies r12)
0xc08d73cc <+40>: smc 0
... (no instruction explicitly modifies r12)
0xc08d73d4 <+48>: ldr r3, [r12] <- crashing instruction
...

Since the first ldr is successful, and since r12 isn't explicitly
modified by any instruction between the first and the second ldr,
it must have been modified by the smc call, which is ok,
since r12 is caller save according to the AAPCS.

Add r12 to the clobber list so that the compiler knows that the
callee potentially overwrites the value in r12.
Clobber descriptions may not in any way overlap with an input or
output operand.

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-24 22:36:45 -05:00
..
arm_scmi SCMI fix for v4.17 2018-05-14 01:05:00 -07:00
broadcom FIRMWARE: bcm47xx_nvram: Replace mac address parsing 2018-03-09 11:22:21 +00:00
efi efi/libstub/arm64: Handle randomized TEXT_OFFSET 2018-05-19 08:07:56 +02:00
google
meson firmware: meson-sm: rework meson_sm_init to use module_platform_driver_probe 2018-03-07 17:33:52 -08:00
tegra firmware: tegra: adjust tested variable 2018-03-08 14:43:13 +01:00
Kconfig firmware: arm_scmi: add device power domain support using genpd 2018-02-28 16:37:57 +00:00
Makefile firmware: arm_scmi: add basic driver infrastructure for SCMI 2018-02-28 16:37:57 +00:00
arm_scpi.c firmware: arm_scpi: improve info message for pre-1.0 firmware 2018-02-23 15:13:34 +00:00
arm_sdei.c firmware: arm_sdei: Fix return value check in sdei_present_dt() 2018-01-15 18:16:59 +00:00
dcdbas.c platform/x86: Fix dell driver init order 2018-03-14 11:05:53 -07:00
dcdbas.h
dell_rbu.c
dmi-id.c
dmi-sysfs.c firmware: dmi: handle missing DMI data gracefully 2018-02-03 11:25:20 +01:00
dmi_scan.c Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2018-04-13 16:32:16 -07:00
edd.c edd: don't spam log if no EDD information is present 2018-03-27 09:51:23 +02:00
iscsi_ibft.c ibft: Deprecate pci_get_bus_and_slot() 2018-01-11 17:26:55 -06:00
iscsi_ibft_find.c
memmap.c
pcdp.c
pcdp.h
psci.c firmware/psci: Expose SMCCC version through psci_ops 2018-02-06 22:54:11 +00:00
psci_checker.c drivers: psci: remove cluster terminology and dependency on physical_package_id 2018-01-17 12:59:33 +01:00
qcom_scm-32.c firmware: qcom: scm: Fix crash in qcom_scm_call_atomic1() 2018-05-24 22:36:45 -05:00
qcom_scm-64.c
qcom_scm.c
qcom_scm.h
qemu_fw_cfg.c fw_cfg: write vmcoreinfo details 2018-03-20 03:17:41 +02:00
raspberrypi.c
scpi_pm_domain.c
ti_sci.c
ti_sci.h