ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.8k stars 881 forks source link

x86_32 Linux Syscall Tracker #58

Open lunixbochs opened 5 years ago

lunixbochs commented 5 years ago
Ronsor commented 5 years ago

this list should be reduced. there are some syscalls that you're never going to actually need (creat, *_module, settimeofday)

tbodt commented 5 years ago

Also some of them are duplicates, such as fstat and fstat64.

lunixbochs commented 5 years ago

(1) I don’t think the list should be reduced unless the latest shipping Linux kernel has completely removed a syscall (which I don’t think happens). I personally am likely to use very old software / syscalls, so I might use them even if you won’t. There are so many standards besides musl and glibc that it’s very hard to definitively say a syscall won’t be used. (2) syscalls that have different numbers are different syscalls. e.g. getdents64 has a different abi from getdents and both are called by active code in the wild. 32-bit vs 64-bit versions of a syscall often use different structure layouts on x86_32

tbodt commented 5 years ago

Syscall 0 should probably be removed though, as it's an implementation detail of signal restarting.

lunixbochs commented 5 years ago

Removed. We can also mark impossible syscalls like kexec.

tbodt commented 5 years ago

Even the impossible ones should be implemented to return EPERM or something.

On Nov 13, 2018, at 4:51 PM, Ryan Hileman notifications@github.com wrote:

Removed. We can also mark impossible syscalls like kexec.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

idvorkin commented 5 years ago

For apps that fail with invalid system call, I’d love to trace which system call is failing so I can share with the maintainer, is there a good Linux one-liner for this. Something like:

   Syscall-trace myprog
tbodt commented 5 years ago

The number if any missing syscall will be logged, and dmesg will print the log.

happyliii commented 4 years ago

Need for IPC calls to work for gnupg

happyliii commented 4 years ago

Try to use:

tbodt commented 4 years ago

405. The same calls work for several other things FWIW.

versaloon commented 3 years ago

So, is it possible or any plan to support some of the syscalls like timer_create, etc?

saagarjha commented 3 years ago

timer_create is implemented: https://github.com/ish-app/ish/blob/3b8a860ead5a23dd29667129b7c5b1b2ccb97719/kernel/time.c#L259. Are you running into issues with it?

rbreaves commented 1 year ago

Would really like to set (74) sethostname resolved as it prevents syslog from running properly and the alternatives.

adamoudad commented 1 month ago

I am getting Bad system call error when I try to run bash or fish.

I understand this is due to syscall not currently supported.

I can't help much on resolving the issue, but is there a way to know which syscall is missing but required by BASH to run?

It seems I can get this info with ptrace, but from the list above, ptrace is not usable either.