bdf2sfd

BDF to SFD converter, allowing to vectorize bitmap fonts
Log | Files | Refs | README | LICENSE

commit 1745a5ff22cdc2bd243aef316d9f44b0abd36dd5
parent 8278778e551b44e1d03a776a80328568f4b385b8
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed, 24 Jun 2020 20:05:06 +0200

Add seccomp support on i386, tested on glibc and musl.

Diffstat:
Msrc/seccomp.h | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/seccomp.h b/src/seccomp.h @@ -4,7 +4,7 @@ * https://github.com/fcambus/bdf2sfd * * Created: 2019-11-21 - * Last Updated: 2020-06-23 + * Last Updated: 2020-06-24 * * bdf2sfd is released under the BSD 2-Clause license * See LICENSE file for details @@ -21,12 +21,14 @@ #include <linux/filter.h> #include <linux/seccomp.h> -#if defined(__x86_64__) +#if defined(__i386__) +#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_I386 +#elif defined(__x86_64__) #define SECCOMP_AUDIT_ARCH AUDIT_ARCH_X86_64 #elif defined(__aarch64__) #define SECCOMP_AUDIT_ARCH AUDIT_ARCH_AARCH64 #else -#error "Seccomp is only supported on amd64 and aarch64 architectures." +#error "Seccomp is only supported on i386, amd64, and arm64 architectures." #endif #define BDF2SFD_SYSCALL_ALLOW(syscall) \ @@ -43,9 +45,14 @@ static struct sock_filter filter[] = { BPF_STMT(BPF_LD+BPF_W+BPF_ABS, offsetof(struct seccomp_data, nr)), BDF2SFD_SYSCALL_ALLOW(brk), + BDF2SFD_SYSCALL_ALLOW(clock_gettime), /* i386 glibc */ BDF2SFD_SYSCALL_ALLOW(close), BDF2SFD_SYSCALL_ALLOW(exit_group), BDF2SFD_SYSCALL_ALLOW(fstat), +#if defined(SYS_fstat64) + BDF2SFD_SYSCALL_ALLOW(fstat64), /* i386 glibc */ +#endif + BDF2SFD_SYSCALL_ALLOW(gettimeofday), /* i386 glibc */ BDF2SFD_SYSCALL_ALLOW(ioctl), #if defined(SYS_open) BDF2SFD_SYSCALL_ALLOW(open),