Searchable Linux Syscall Table for x86 and x86_64
filippo.io
filippo.io
> Compiled from Linux 4.14.0 headers.
We're in the 6.x's now!
pwn constgrep also works in a pinch: https://docs.pwntools.com/en/stable/commandline.html#pwn-con...
There needs to be improvements in eBPF-like DSL/VMs that run in isolated, in-kernel contexts to accomplish particular latency-sensitive and coordination tasks. These can potentially be JITed as well.
In-kernel JIT is a scary prospect. I'm sure it can be done securely (perhaps even provably so), but it's a whole can of security-flavoured worms in itself.
Which simplyfies picking parts out and moving them into https://en.wikipedia.org/wiki/Rump_kernel , or FPGAs.
I've been wary to use that on a system locked down with https://en.wikipedia.org/wiki/Veriexec exposed to the net in the past, but not anymore.
OTOH it's all moot, or are you using a browser with settings which BLOCK JS, WEB-RTC/GL/GPU and countless other stuff by default?
The 32-bit version has been "coming soon" for many years now (very relatable!), but this page still pollutes my search results when looking for 32-bit syscall tables (although thankfully the ChromiumOS docs page has recently supplanted it, linked elsewhere in this thread)
To be clear I'm not mad at the author, it's a useful resource and I'm thankful for it's existence, but search engines still suck.
See also:
https://marcin.juszkiewicz.com.pl/download/tables/syscalls.h...
https://github.com/torvalds/linux/blob/master/include/uapi/a...
64 bit: read = 0, write = 1, open = 2 ...
32 bit: restart_syscall = 0, exit = 1, fork = 2 ...
It's like they shuffle these around on purpose and don't bother to properly document it anywhere.
The asm include for x86 is here:
https://github.com/torvalds/linux/blob/master/arch/x86/inclu...
It includes either unistd_32.h or unistd_64.h. Those headers don't seem to be in the repository anymore. It seems they are generated from the system call tables as sickall mentioned and exported to user space as C header files.
https://github.com/torvalds/linux/blob/master/arch/x86/entry...
https://github.com/torvalds/linux/blob/master/arch/x86/entry...
The following commit introduced this auto-generation mechanism:
https://github.com/torvalds/linux/commit/303395ac3bf3e2cb488...
Other architectures just define some macros which modify the behavior of the asm-generic unistd.h header. For example, the arm64 unistd.h defines macros and then just includes it:
https://github.com/torvalds/linux/blob/master/arch/arm64/inc...
#define __ARCH_WANT_RENAMEAT
#define __ARCH_WANT_NEW_STAT
#define __ARCH_WANT_SET_GET_RLIMIT
#define __ARCH_WANT_TIME32_SYSCALLS
#define __ARCH_WANT_SYS_CLONE3
#define __ARCH_WANT_MEMFD_SECRET
#include <asm-generic/unistd.h>
I suppose x86 is too old or too different to fit this paradigm.is that not "user mode linux"?
How large of an effort would it be to make it work on Mac? Monstrous? Not that bad? 100 hours? 1000 hours? For what payoff?
Any particular citation for this claim? I tried to do some searching and couldn't find anything definitive, but my memory from contemporaneous conversations and articles suggests that the primary reason was really performance, since the differences in how filesystem access in particular work between Windows/Linux were such that some of the I/O bottlenecks were deemed too difficult to impossible to address.
Certainly WSL2 has higher compatibility, but I'm not sure that compatibility and not performance was the primary driver, and would love a source if you have one.
Relatedly, it's worth noting that a number of other platforms have developed and shipped syscall translation layers for Linux binaries, including FreeBSD and SmartOS/illumos.
The HN submission for the youtube video also has discussion about the same topics. https://news.ycombinator.com/item?id=19868282
> Our top requests from the WSL community have been to increase the file system performance, and make more apps work inside of WSL (i.e: introduce better system call compatibility). We have heard your feedback, and are glad to announce that WSL 2 helps solve these issues.
> In WSL 1 we created a translation layer that interprets many of these system calls and allows them to work on the Windows NT kernel. However, it’s challenging to implement all of these system calls, resulting in some apps being unable to run in WSL 1. Now that WSL 2 includes its own Linux kernel it has full system call compatibility.
Meanwhile, Google Container Engine uses gVisor, where the syscalls are implemented by some Go libraries with a very narrow seccomp interface to the actual host.
[1] https://en.wikipedia.org/wiki/GVisor [2] https://github.com/google/gvisor/issues/1270
> We regularly test that Blink is able run x86-64-linux binaries on the following platforms:
> Linux (x86, ARM, RISC-V, MIPS, PowerPC, s390x)
> macOS (x86, ARM)
> FreeBSD
> OpenBSD
> Cygwin
From what I gather, it's in the "excellent but incomplete" stage. It's new enough.
"All of 'em (excluding obsolete ones)."
What I want is an x86 and ARM opcodes database.