summaryrefslogtreecommitdiffstats
path: root/block/bsg.c
diff options
context:
space:
mode:
authorNiklas Cassel <niklas.cassel@linaro.org>2018-04-09 23:40:15 +0200
committerAndy Gross <andy.gross@linaro.org>2018-05-25 05:36:45 +0200
commit5ec3444c8346c922316f4effafa8afc17defda0e (patch)
treef248c80eb4170515e7c886f23dc7805327096489 /block/bsg.c
parentLinux 4.17-rc6 (diff)
downloadlinux-5ec3444c8346c922316f4effafa8afc17defda0e.tar.xz
linux-5ec3444c8346c922316f4effafa8afc17defda0e.zip
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>
Diffstat (limited to 'block/bsg.c')
0 files changed, 0 insertions, 0 deletions