@@ -138,6 +138,8 @@ struct seccomp_data {
138
138
# define __NR_seccomp 337
139
139
# elif defined(__sh__ )
140
140
# define __NR_seccomp 372
141
+ # elif defined(__mc68000__ )
142
+ # define __NR_seccomp 380
141
143
# else
142
144
# warning "seccomp syscall number unknown for this architecture"
143
145
# define __NR_seccomp 0xffff
@@ -1838,6 +1840,10 @@ TEST_F(TRACE_poke, getpid_runs_normally)
1838
1840
# define ARCH_REGS struct pt_regs
1839
1841
# define SYSCALL_NUM (_regs ) (_regs).regs[3]
1840
1842
# define SYSCALL_RET (_regs ) (_regs).regs[0]
1843
+ #elif defined(__mc68000__ )
1844
+ # define ARCH_REGS struct user_regs_struct
1845
+ # define SYSCALL_NUM (_regs ) (_regs).orig_d0
1846
+ # define SYSCALL_RET (_regs ) (_regs).d0
1841
1847
#else
1842
1848
# error "Do not know how to find your architecture's registers and syscalls"
1843
1849
#endif
@@ -1902,7 +1908,7 @@ const bool ptrace_entry_set_syscall_ret =
1902
1908
* Use PTRACE_GETREGS and PTRACE_SETREGS when available. This is useful for
1903
1909
* architectures without HAVE_ARCH_TRACEHOOK (e.g. User-mode Linux).
1904
1910
*/
1905
- #if defined(__x86_64__ ) || defined(__i386__ ) || defined(__mips__ )
1911
+ #if defined(__x86_64__ ) || defined(__i386__ ) || defined(__mips__ ) || defined( __mc68000__ )
1906
1912
# define ARCH_GETREGS (_regs ) ptrace(PTRACE_GETREGS, tracee, 0, &(_regs))
1907
1913
# define ARCH_SETREGS (_regs ) ptrace(PTRACE_SETREGS, tracee, 0, &(_regs))
1908
1914
#else
0 commit comments