selftests: breakpoints: fix compile error on breakpoint_test_arm64
PATCH 1/1 selftests: breakpoints: fix compile error on breakpoint_test_arm64
The current mainline breakpoints test for arm64 fails to compile with
breakpoint_test_arm64.c: In function ‘set_watchpoint’:
breakpoint_test_arm64.c:97:28: error: storage size of ‘dreg_state’ isn’t known
struct user_hwdebug_state dreg_state;
Adding a direct include for asm/ptrace.h helps it to build, and passes the test on mainline on hikey.
--- tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/breakpoints/breakpoint_test_arm64.c +1 -0
@@ -19,6 +19,7 @@#define _GNU_SOURCE +#include <asm/ptrace.h> #include <sys/types.h> #include <sys/wait.h> #include <sys/ptrace.h>
Signature · 1 line
2.7.4
Shuah Khan
maintainerQuoted 20 lines · Sumit Semwal
The current mainline breakpoints test for arm64 fails to compile with
breakpoint_test_arm64.c: In function ‘set_watchpoint’:
breakpoint_test_arm64.c:97:28: error: storage size of ‘dreg_state’ isn’t known
structuser_hwdebug_statedreg_state;Adding a direct include for
asm/ptrace.hhelps it to build, and passes the test on mainline on hikey.Signed-off-by Sumit Semwal <[email protected]>--- tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/breakpoints/breakpoint_test_arm64.c +0
-0
tools/testing/selftests/breakpoints/breakpoint_test_arm64.c line 25
Quoted 7 lines
tools/testing/selftests/breakpoints/breakpoint_test_arm64.c +1
-0@@ -19,6 +19,7 @@#define _GNU_SOURCE +#include <asm/ptrace.h> #include <sys/types.h> #include <sys/wait.h> #include <sys/ptrace.h>
Sumit,
Thanks for the patch. I will queue this up for 4.15-rc1. This can be marked for stable I would assume?
thanks,
-- Shuah
Hi Shuah,
Quoted 31 lines · Shuah Khan
Quoted 20 lines · Sumit Semwal
The current mainline breakpoints test for arm64 fails to compile with
breakpoint_test_arm64.c: In function ‘set_watchpoint’:
breakpoint_test_arm64.c:97:28: error: storage size of ‘dreg_state’ isn’t known
structuser_hwdebug_statedreg_state;Adding a direct include for
asm/ptrace.hhelps it to build, and passes the test on mainline on hikey.Signed-off-by Sumit Semwal <[email protected]>--- tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/breakpoints/breakpoint_test_arm64.c +0
-0tools/testing/selftests/breakpoints/breakpoint_test_arm64.c line 25
Quoted 7 lines
tools/testing/selftests/breakpoints/breakpoint_test_arm64.c +1
-0@@ -19,6 +19,7 @@#define _GNU_SOURCE +#include <asm/ptrace.h> #include <sys/types.h> #include <sys/wait.h> #include <sys/ptrace.h> Sumit,
Quoted 2 lines
Thanks for the patch. I will queue this up for 4.15-rc1. This can be marked for stable I would assume?
Thank you; yes, it would need to be marked for 4.10+ kernels. Once you add it to your tree, I can send a separate request to stable.
Quoted 3 lines
thanks,
-- Shuah
Best,
Sumit.