‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, April 29, 2019 8:52 PM, Martin Lucina <[email protected]> wrote:

> Hi Adam,
>
> On Friday, 26.04.2019 at 06:00, Adam Steen wrote:
>
> > Good Afternoon all
> > Is there any appetite for a cross platform support in solo5 SPT?
>
> It's certainly something that's possible, but the state of the spt code in
> general is a bit too raw to consider abstracting it to target different
> host kernels just yet.

Ok, easy enough.

>
> Also, I don't think there is as much of a pressing need for spt as on Linux
> -- I'd expect most people running OpenBSD on amd64 to be doing so on bare
> metal, i.e. with access to the CPU virtualization hardware, where you can
> just run hvt.

I was thinking a use can on virtualized hardware (ie 
https://openbsd.amsterdam/) or even non-amd64 hardware

>
> > The system call restriction would be very easy, and I expect the other code 
> > to compile with very little changes.
>
> What would you use for implementing the syscall restrictions? The
> granularity of pledge(2) is different to that of seccomp/BPF...

OpenBSD could not be as strict as Linux/seccomp/BPF, but also a lot less 
complex, using pledge with a promise of "stdio" (see below), this would also 
remove file system access.

>
> -mato


Cheers
Adam


Quote from the pledge man page(https://man.openbsd.org/pledge)

"stdio"

The following system calls are permitted. sendto(2) is only permitted if its 
destination socket address is NULL. As a result, all the expected 
functionalities of libc stdio work.

clock_getres(2), clock_gettime(2), close(2), closefrom(2), dup(2), dup2(2), 
dup3(2), fchdir(2), fcntl(2), fstat(2), fsync(2), ftruncate(2), getdents(2), 
getdtablecount(2), getegid(2), getentropy(2), geteuid(2), getgid(2), 
getgroups(2), getitimer(2), getlogin(2), getpgid(2), getpgrp(2), getpid(2), 
getppid(2), getresgid(2), getresuid(2), getrlimit(2), getrtable(2), getsid(2), 
getthrid(2), gettimeofday(2), getuid(2), issetugid(2), kevent(2), kqueue(2), 
lseek(2), madvise(2), minherit(2), mmap(2), mprotect(2), mquery(2), munmap(2), 
nanosleep(2), pipe(2), pipe2(2), poll(2), pread(2), preadv(2), pwrite(2), 
pwritev(2), read(2), readv(2), recvfrom(2), recvmsg(2), select(2), sendmsg(2), 
sendsyslog(2), sendto(2), setitimer(2), shutdown(2), sigaction(2), 
sigprocmask(2), sigreturn(2), socketpair(2), umask(2), wait4(2), write(2), 
writev(2)

Reply via email to