Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/include Define PTRACE_ILLEGAL_ASM for arm (32-bit)



details:   https://anonhg.NetBSD.org/src/rev/060c4b28b135
branches:  trunk
changeset: 457248:060c4b28b135
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Jun 17 17:53:22 2019 +0000

description:
Define PTRACE_ILLEGAL_ASM for arm (32-bit)

udf $0 is expected to raise SIGILL for all ARM 32-bit targets.

diffstat:

 sys/arch/arm/include/ptrace.h |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r aa0c1fd44850 -r 060c4b28b135 sys/arch/arm/include/ptrace.h
--- a/sys/arch/arm/include/ptrace.h     Mon Jun 17 17:45:18 2019 +0000
+++ b/sys/arch/arm/include/ptrace.h     Mon Jun 17 17:53:22 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptrace.h,v 1.12 2017/12/27 19:35:05 christos Exp $     */
+/*     $NetBSD: ptrace.h,v 1.13 2019/06/17 17:53:22 kamil Exp $        */
 
 /*
  * Copyright (c) 1995 Frank Lancaster
@@ -64,6 +64,8 @@
 #define PTRACE_REG_SP(_r)              (_r)->r_sp
 #define PTRACE_REG_INTRV(_r)           (_r)->r[0]
 
+#define PTRACE_ILLEGAL_ASM     __asm __volatile ("udf $0" : : : "memory")
+
 #ifdef __ARMEB__
 #define PTRACE_BREAKPOINT      ((const uint8_t[]) { 0xfe, 0xde, 0xff, 0xe7 })
 #define PTRACE_BREAKPOINT_INSN 0xfedeffe7



Home | Main Index | Thread Index | Old Index