aboutsummaryrefslogtreecommitdiff
path: root/include/linux/fpga/fpga-mgr.h
diff options
context:
space:
mode:
authorMark Rutland <[email protected]>2017-06-23 18:02:06 +0100
committerWill Deacon <[email protected]>2017-06-23 18:21:13 +0100
commit8486e54d30e170c969090f80bbdfa7142d33ed6a (patch)
treebeae3c73a6ca47ceafc6803ff15459f3a2badcb1 /include/linux/fpga/fpga-mgr.h
parent33f082614c3443d937f50fe936f284f62bbb4a1b (diff)
arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels
When a kernel is built without CONFIG_ARM64_MODULE_PLTS, we don't generate the expected branch instruction in ftrace_make_nop(). This means we pass zero (rather than a valid branch) to ftrace_modify_code() as the expected instruction to validate. This causes us to return -EINVAL to the core ftrace code for a valid case, resulting in a splat at boot time. This was an unintended effect of commit: 687644209a6e9557 ("arm64: ftrace: fix building without CONFIG_MODULES") ... which incorrectly moved the generation of the branch instruction into the ifdef for CONFIG_ARM64_MODULE_PLTS. This patch fixes the issue by moving the ifdef inside of the relevant if-else case, and always checking that the branch is in range, regardless of CONFIG_ARM64_MODULE_PLTS. This ensures that we generate the expected branch instruction, and also improves our sanity checks. For consistency, both ftrace_make_nop() and ftrace_make_call() are updated with this pattern. Fixes: 687644209a6e9557 ("arm64: ftrace: fix building without CONFIG_MODULES") Signed-off-by: Mark Rutland <[email protected]> Reported-by: Marc Zyngier <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions