Commit 9c061fec authored by Borislav Petkov's avatar Borislav Petkov Committed by Zheng Zengkai
Browse files

tools/insn: Restore the relative include paths for cross building

stable inclusion
from stable-v5.10.133
commit 844947eee36c8ab21005883d6626e713a678c868
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5PTAS
CVE: CVE-2022-29900,CVE-2022-23816,CVE-2022-29901

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=844947eee36c8ab21005883d6626e713a678c868



--------------------------------

commit 0705ef64 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 <asm/inat.h> /*__ignore_sync_check__ */
        |          ^~~~~~~~~~~~

Restore the relative include paths so that the compiler can find the
headers.

Fixes: 93281c4a ("x86/insn: Add an insn_decode() API")
Reported-by: default avatarIan Rogers <irogers@google.com>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Tested-by: default avatarIan Rogers <irogers@google.com>
Tested-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Link: https://lkml.kernel.org/r/20210317150858.02b1bbc8@canb.auug.org.au


Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLin Yujun <linyujun809@huawei.com>
Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 963f039a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -10,13 +10,13 @@
#else
#include <string.h>
#endif
#include <asm/inat.h> /* __ignore_sync_check__ */
#include <asm/insn.h> /* __ignore_sync_check__ */
#include "../include/asm/inat.h" /* __ignore_sync_check__ */
#include "../include/asm/insn.h" /* __ignore_sync_check__ */

#include <linux/errno.h>
#include <linux/kconfig.h>

#include <asm/emulate_prefix.h> /* __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)	\