From d72564839ad9ed9df6966d0d0d60d18a666c54e9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 13 Jul 2022 09:42:03 +0200 Subject: [PATCH] 5.10-stable patches added patches: tools-insn-restore-the-relative-include-paths-for-cross-building.patch --- queue-5.10/series | 1 + ...ive-include-paths-for-cross-building.patch | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 queue-5.10/tools-insn-restore-the-relative-include-paths-for-cross-building.patch diff --git a/queue-5.10/series b/queue-5.10/series index 91daa3e414c..84af897df89 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -128,3 +128,4 @@ x86-bugs-do-not-enable-ibpb-on-entry-when-ibpb-is-not-supported.patch x86-kexec-disable-ret-on-kexec.patch x86-speculation-disable-rrsba-behavior.patch x86-static_call-serialize-__static_call_fixup-properly.patch +tools-insn-restore-the-relative-include-paths-for-cross-building.patch diff --git a/queue-5.10/tools-insn-restore-the-relative-include-paths-for-cross-building.patch b/queue-5.10/tools-insn-restore-the-relative-include-paths-for-cross-building.patch new file mode 100644 index 00000000000..40a811ce0c6 --- /dev/null +++ b/queue-5.10/tools-insn-restore-the-relative-include-paths-for-cross-building.patch @@ -0,0 +1,51 @@ +From 0705ef64d1ff52b817e278ca6e28095585ff31e1 Mon Sep 17 00:00:00 2001 +From: Borislav Petkov +Date: Wed, 17 Mar 2021 11:33:04 +0100 +Subject: tools/insn: Restore the relative include paths for cross building + +From: Borislav Petkov + +commit 0705ef64d1ff52b817e278ca6e28095585ff31e1 upstream. + +Building perf on ppc causes: + + In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15: + util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory + 14 | #include /*__ignore_sync_check__ */ + | ^~~~~~~~~~~~ + +Restore the relative include paths so that the compiler can find the +headers. + +Fixes: 93281c4a9657 ("x86/insn: Add an insn_decode() API") +Reported-by: Ian Rogers +Reported-by: Stephen Rothwell +Signed-off-by: Borislav Petkov +Tested-by: Ian Rogers +Tested-by: Stephen Rothwell +Link: https://lkml.kernel.org/r/20210317150858.02b1bbc8@canb.auug.org.au +Cc: Florian Fainelli +Signed-off-by: Greg Kroah-Hartman +--- + tools/arch/x86/lib/insn.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/tools/arch/x86/lib/insn.c ++++ b/tools/arch/x86/lib/insn.c +@@ -10,13 +10,13 @@ + #else + #include + #endif +-#include /* __ignore_sync_check__ */ +-#include /* __ignore_sync_check__ */ ++#include "../include/asm/inat.h" /* __ignore_sync_check__ */ ++#include "../include/asm/insn.h" /* __ignore_sync_check__ */ + + #include + #include + +-#include /* __ignore_sync_check__ */ ++#include "../include/asm/emulate_prefix.h" /* __ignore_sync_check__ */ + + /* Verify next sizeof(t) bytes can be on the same instruction */ + #define validate_next(t, insn, n) \ -- 2.47.3