diff --git a/valgrind-3.14.0-arm64-ptrace-traceme.patch b/valgrind-3.14.0-arm64-ptrace-traceme.patch
new file mode 100644
index 0000000..726be00
--- /dev/null
+++ b/valgrind-3.14.0-arm64-ptrace-traceme.patch
@@ -0,0 +1,24 @@
+commit 43fe4bc236d667257eeebfb4f6bcbe2b92aea455
+Author: Mark Wielaard <mark@klomp.org>
+Date:   Fri Dec 14 14:32:27 2018 +0100
+
+    arm64: Fix PTRACE_TRACEME memcheck/tests/linux/getregset.vgtest testcase.
+    
+    The sys_ptrace post didn't mark the thread as being in traceme mode.
+    This occassionally would make the memcheck/tests/linux/getregset.vgtest
+    testcase fail. With this patch it reliably passes.
+
+diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
+index 9ef54b4..650f5b9 100644
+--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
++++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
+@@ -499,6 +499,9 @@ PRE(sys_ptrace)
+ POST(sys_ptrace)
+ {
+    switch (ARG1) {
++   case VKI_PTRACE_TRACEME:
++         ML_(linux_POST_traceme)(tid);
++         break;
+    case VKI_PTRACE_PEEKTEXT:
+    case VKI_PTRACE_PEEKDATA:
+    case VKI_PTRACE_PEEKUSR:
diff --git a/valgrind.spec b/valgrind.spec
index 2e50ed5..e2c665c 100644
--- a/valgrind.spec
+++ b/valgrind.spec
@@ -154,6 +154,9 @@ Patch27: valgrind-3.14.0-sigkill.patch
 # KDE#402048 Implement minimal ptrace support for ppc64[le]-linux.
 Patch28: valgrind-3.14.0-ppc64-ptrace.patch
 
+# commit 43fe4bc23 arm64: Fix PTRACE_TRACEME
+Patch29: valgrind-3.14.0-arm64-ptrace-traceme.patch
+
 
 %if %{build_multilib}
 # Ensure glibc{,-devel} is installed for both multilib arches
@@ -315,6 +318,7 @@ Valgrind User Manual for details.
 %patch26 -p1
 %patch27 -p1
 %patch28 -p1
+%patch29 -p1
 
 %build
 CC=gcc
@@ -549,6 +553,9 @@ fi
 %endif
 
 %changelog
+* Fri Dec 14 2018 Mark Wielaard <mjw@fedoraproject.org>
+- Add valgrind-3.14.0-arm64-ptrace-traceme.patch
+
 * Wed Dec 12 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-6
 - Add valgrind-3.14.0-final_tidyup.patch
 - Add valgrind-3.14.0-ppc64-ldbrx.patch