|
| 1 | +/** |
| 2 | + * Enhanced Seccomp m68k Specific Code |
| 3 | + * |
| 4 | + * Copyright (c) 2015 Freescale <[email protected]> |
| 5 | + * 2017-2023 John Paul Adrian Glaubitz <[email protected]> |
| 6 | + * Author: Bogdan Purcareata <[email protected]> |
| 7 | + * John Paul Adrian Glaubitz <[email protected]> |
| 8 | + * |
| 9 | + * Derived from the PPC-specific code |
| 10 | + * |
| 11 | + */ |
| 12 | + |
| 13 | +/* |
| 14 | + * This library is free software; you can redistribute it and/or modify it |
| 15 | + * under the terms of version 2.1 of the GNU Lesser General Public License as |
| 16 | + * published by the Free Software Foundation. |
| 17 | + * |
| 18 | + * This library is distributed in the hope that it will be useful, but WITHOUT |
| 19 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 20 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License |
| 21 | + * for more details. |
| 22 | + * |
| 23 | + * You should have received a copy of the GNU Lesser General Public License |
| 24 | + * along with this library; if not, see <http://www.gnu.org/licenses>. |
| 25 | + */ |
| 26 | + |
| 27 | +#include <stdlib.h> |
| 28 | +#include <errno.h> |
| 29 | +#include <string.h> |
| 30 | +#include <linux/audit.h> |
| 31 | + |
| 32 | +#include "db.h" |
| 33 | +#include "syscalls.h" |
| 34 | +#include "arch.h" |
| 35 | +#include "arch-m68k.h" |
| 36 | + |
| 37 | +/* m68k syscall numbers */ |
| 38 | +#define __m68k_NR_socketcall 102 |
| 39 | +#define __m68k_NR_ipc 117 |
| 40 | + |
| 41 | +ARCH_DEF(m68k) |
| 42 | + |
| 43 | +const struct arch_def arch_def_m68k = { |
| 44 | + .token = SCMP_ARCH_M68K, |
| 45 | + .token_bpf = AUDIT_ARCH_M68K, |
| 46 | + .size = ARCH_SIZE_32, |
| 47 | + .endian = ARCH_ENDIAN_BIG, |
| 48 | + .sys_socketcall = __m68k_NR_socketcall, |
| 49 | + .sys_ipc = __m68k_NR_ipc, |
| 50 | + .syscall_resolve_name = abi_syscall_resolve_name_munge, |
| 51 | + .syscall_resolve_name_raw = m68k_syscall_resolve_name, |
| 52 | + .syscall_resolve_num = abi_syscall_resolve_num_munge, |
| 53 | + .syscall_resolve_num_raw = m68k_syscall_resolve_num, |
| 54 | + .syscall_rewrite = abi_syscall_rewrite, |
| 55 | + .rule_add = abi_rule_add, |
| 56 | + .syscall_name_kver = m68k_syscall_name_kver, |
| 57 | + .syscall_num_kver = m68k_syscall_num_kver, |
| 58 | +}; |
0 commit comments