Getting somewhat closer to releasing a new version of #swad. I now improved the functionality to execute something on a different worker thread: Use an in-memory queue, providing a #lockfree version. This gives me a consistent reliable throughput of 3000 requests/s (with outliers up to 4500 r/s) at an average response time of 350 - 400 ms (with TLS enabled). For waking up worker threads, I implemented different backends as well: kqueue, eventfd and event-ports, the fallback is still a self-pipe.

So, #portability here really means implement lots of different flavors of the same thing.

Looking at these startup logs, you can see that #kqueue (#FreeBSD and other BSDs) is really a "jack of all trades", being used for "everything" if available (and that's pretty awesome, it means one single #syscall per event loop iteration in the generic case). #illumos' (#Solaris) #eventports come somewhat close (but need a lot more syscalls as there's no "batch registering" and certain event types need to be re-registered every time they fired), they just can't do signals, but illumos offers Linux-compatible signalfd. Looking at #Linux, there's a "special case fd" for everything. 🙈 Plus #epoll also needs one syscall for each event to be registered. The "generic #POSIX" case without any of these interfaces is just added for completeness 😆

用 strace 換掉 syscall

在 Hacker News 上看到「TIL: timeout in Bash scripts (heitorpb.github.io)」這篇,不過原文講的 timeout 剛好在前陣子「用 flock + timeout 包裝 cron script」自己摸索出來了,這邊要提的是 id=44097449 在講 strace 的 syscall injection,他給的範例是: strace...

Gea-Suan Lin's BLOG
Watch out for any Linux malware sneakily evading syscall-watching antivirus

: Google dumped io_uring after $1M in bug bounties

The Register

Syscall и cgo в Go

Привет, Хабр! В этой статье рассмотрим работу с системными утилитами в Go. Будем напрямую общаться с ядром, дергать системные вызовы и писать код на C, чтобы Go не чувствовал себя одиноким.

https://habr.com/ru/companies/otus/articles/886062/

#golang #системные_утилиты #syscall #cgo

Syscall и cgo в Go

Привет, Хабр! Сегодня рассмотрим работу с системными утилитами в Go. Будем напрямую общаться с ядром, дергать системные вызовы и писать код на C, чтобы Go не чувствовал себя...

Хабр

Decai decompiling a malicious shellcode.
The instructions are not so readable, if you're not used to syscalls int 0x80. AI does it for you.

https://asciinema.org/a/4PY8wn2TPg2oBdDQ0Q5bgMYjk

#r2ai #decai #r2 #malware #shellcode #syscall #linux

Nice decompilation of Linux shellcode

sha256: fd8441f8716ef517fd4c3fd552ebcd2ffe2fc458bb867ed51e5aaee034792bde Uses Mistral AI. The assembly instructions spot calls to syscall, and see it's socket calls, sleep etc.

asciinema.org

@ax6761 Well, you could call it an implementation glitch. #uname is *meant* to give you information about "the OS", but has always been implemented as a #syscall (dating back to early Unix versions), therefore actually tells you something about the #kernel.

In #FreeBSD, the kernel doesn't *have* to be the exact same version as the userland, and for security updates, a new kernel is only built when some patch actually affects the kernel.

Note that on a #Linux system, it's arguably even "worse", as Linux is nothing but the kernel. To know version information about the rest of your installed OS, you'll have to use distribution specific information (or more recently look at the now standardized /etc/osrelease).

I'm surprised at how badly #Ghidra decompiles this very simple function.

It's a syscall 0x57 which is unlink (remove a file).

I'm surprised it decompiles saying it *returns 0x57* ...

#decompiler #syscall #linux

On thread vs. process permissions

In common Unix and POSIX systems, all threads in a process are supposed to have the same permission. So why does the vortex8 program work as exploited, where one thread sets different permissions than another one using setresuid/setresgid?

Reference: https://man7.org/linux/man-pages/man2/setresuid.2.html

Answer in thread.

#ctf #cybersecurity #posix #linux #glibc #syscall #overthewire #vortex

setresuid(2) - Linux manual page

Stratoshark: Computer debugging tool: like wireshark, but for system calls instead of network packets
https://stratoshark.org/
#via:hackernews #wireshark #debugging #syscall #strace #devops #linux #+
Stratoshark

FreshyCalls: Syscalls Freshly Squeezed!

FreshyCalls is a C++ library to simplify syscalls on Windows, allowing to extract syscall numbers dynamically without depending on specific versions.

https://github.com/crummie5/FreshyCalls

#windows #syscall

GitHub - crummie5/FreshyCalls: FreshyCalls tries to make the use of syscalls comfortable and simple, without generating too much boilerplate and in modern C++17!

FreshyCalls tries to make the use of syscalls comfortable and simple, without generating too much boilerplate and in modern C++17! - crummie5/FreshyCalls

GitHub