diff options
author | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2018-03-05 15:58:02 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-07 06:34:52 -0800 |
commit | 1f9d6427f4e5af91050748f0c5f995298a1be85e (patch) | |
tree | a0e4b022bc523933021fa9e97da5f78b6aa68b03 /meta | |
parent | 22318836f67c9839729f81c86fd4001c63a42840 (diff) | |
download | poky-1f9d6427f4e5af91050748f0c5f995298a1be85e.tar.gz |
valgrind: Mask CPUID support in HWCAP on aarch64
valgrind currently does not know anything about the CPUID flag added to
the HWCAP auxv entry in kernel 4.11+
At runtime it will fails like this:
ARM64 front end: branch_etc
disInstr(arm64): unhandled instruction 0xD5380001
disInstr(arm64): 1101'0101 0011'1000 0000'0000 0000'0001 ==2082==
valgrind: Unrecognised instruction at address 0x4014e64.
This patch is a workaround by masking all HWCAP. This patch is dervied
from https://bugzilla.redhat.com/show_bug.cgi?id=1464211
(From OE-Core rev: cdeb3d530af6cec1959c986aff3d6906939c8918)
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch | 36 | ||||
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind_3.13.0.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch b/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch new file mode 100644 index 0000000000..89a95b82fe --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Fix runtime Valgrind failure | ||
2 | |||
3 | This patch is derived from | ||
4 | https://bugzilla.redhat.com/show_bug.cgi?id=1464211 | ||
5 | |||
6 | At runtime it will fails like this: | ||
7 | |||
8 | ARM64 front end: branch_etc | ||
9 | disInstr(arm64): unhandled instruction 0xD5380001 | ||
10 | disInstr(arm64): 1101'0101 0011'1000 0000'0000 0000'0001 ==2082== | ||
11 | valgrind: Unrecognised instruction at address 0x4014e64. | ||
12 | |||
13 | This patch is a workaround by masking all HWCAP | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | |||
17 | Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | ||
18 | |||
19 | Index: valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c | ||
20 | =================================================================== | ||
21 | |||
22 | --- valgrind-3.13.0.orig/coregrind/m_initimg/initimg-linux.c 2018-03-04 22:22:17.698572675 -0800 | ||
23 | +++ valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c 2018-03-04 22:23:25.727815624 -0800 | ||
24 | @@ -703,6 +703,12 @@ | ||
25 | (and anything above) are not supported by Valgrind. */ | ||
26 | auxv->u.a_val &= VKI_HWCAP_S390_TE - 1; | ||
27 | } | ||
28 | +# elif defined(VGP_arm64_linux) | ||
29 | + { | ||
30 | + /* Linux 4.11 started populating this for arm64, but we | ||
31 | + currently don't support any. */ | ||
32 | + auxv->u.a_val = 0; | ||
33 | + } | ||
34 | # endif | ||
35 | break; | ||
36 | # if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux) | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb index 25b412662a..5bd315aff0 100644 --- a/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb +++ b/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb | |||
@@ -37,6 +37,7 @@ SRC_URI = "ftp://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | |||
37 | file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ | 37 | file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ |
38 | file://link-gz-tests.patch \ | 38 | file://link-gz-tests.patch \ |
39 | file://ppc-headers.patch \ | 39 | file://ppc-headers.patch \ |
40 | file://mask-CPUID-support-in-HWCAP-on-aarch64.patch \ | ||
40 | " | 41 | " |
41 | SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369" | 42 | SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369" |
42 | SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b" | 43 | SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b" |