]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/5.0.19/gcc-plugins-arm_ssp_per_task_plugin-fix-for-older-gcc-6.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 5.0.19 / gcc-plugins-arm_ssp_per_task_plugin-fix-for-older-gcc-6.patch
CommitLineData
427cc94b
GKH
1From 259799ea5a9aa099a267f3b99e1f7078bbaf5c5e Mon Sep 17 00:00:00 2001
2From: Chris Packham <chris.packham@alliedtelesis.co.nz>
3Date: Fri, 10 May 2019 21:00:25 +1200
4Subject: gcc-plugins: arm_ssp_per_task_plugin: Fix for older GCC < 6
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9From: Chris Packham <chris.packham@alliedtelesis.co.nz>
10
11commit 259799ea5a9aa099a267f3b99e1f7078bbaf5c5e upstream.
12
13Use gen_rtx_set instead of gen_rtx_SET. The former is a wrapper macro
14that handles the difference between GCC versions implementing
15the latter.
16
17This fixes the following error on my system with g++ 5.4.0 as the host
18compiler
19
20 HOSTCXX -fPIC scripts/gcc-plugins/arm_ssp_per_task_plugin.o
21 scripts/gcc-plugins/arm_ssp_per_task_plugin.c:42:14: error: macro "gen_rtx_SET" requires 3 arguments, but only 2 given
22 mask)),
23 ^
24 scripts/gcc-plugins/arm_ssp_per_task_plugin.c: In function ‘unsigned int arm_pertask_ssp_rtl_execute()’:
25 scripts/gcc-plugins/arm_ssp_per_task_plugin.c:39:20: error: ‘gen_rtx_SET’ was not declared in this scope
26 emit_insn_before(gen_rtx_SET
27
28Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
29Fixes: 189af4657186 ("ARM: smp: add support for per-task stack canaries")
30Cc: stable@vger.kernel.org
31Tested-by: Douglas Anderson <dianders@chromium.org>
32Signed-off-by: Kees Cook <keescook@chromium.org>
33Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34
35---
36 scripts/gcc-plugins/arm_ssp_per_task_plugin.c | 2 +-
37 1 file changed, 1 insertion(+), 1 deletion(-)
38
39--- a/scripts/gcc-plugins/arm_ssp_per_task_plugin.c
40+++ b/scripts/gcc-plugins/arm_ssp_per_task_plugin.c
41@@ -36,7 +36,7 @@ static unsigned int arm_pertask_ssp_rtl_
42 mask = GEN_INT(sext_hwi(sp_mask, GET_MODE_PRECISION(Pmode)));
43 masked_sp = gen_reg_rtx(Pmode);
44
45- emit_insn_before(gen_rtx_SET(masked_sp,
46+ emit_insn_before(gen_rtx_set(masked_sp,
47 gen_rtx_AND(Pmode,
48 stack_pointer_rtx,
49 mask)),