So … are any #FreeBSD developers up to reinstating John Baldwin's change from 2008 and bringing FreeBSD back to parity with #OpenBSD?
https://cgit.freebsd.org/src/commit/include/stdio.h?id=c17bf9a9a5a3b59e03108b785f6b15070ff25651
So … are any #FreeBSD developers up to reinstating John Baldwin's change from 2008 and bringing FreeBSD back to parity with #OpenBSD?
https://cgit.freebsd.org/src/commit/include/stdio.h?id=c17bf9a9a5a3b59e03108b785f6b15070ff25651
folks who do smart things with multiprocessing models like Go and Chromium usually don't want C libraries potentially stepping on their toes. Oh gosh threads. The day I figure out how to do those, will be day the whole world will want to use this thing. But I want people who use Cosmopolitan #Libc to know what value it's providing them. I think the best way to do that is by raising awareness of the systems engineering fundamentals like this. Because that's something you're right to point out that the #Linux community leadership has room for improvement on.
https://news.ycombinator.com/item?id=26290723
@MichaelRoss something I have been trying to look for is a #Linux #ls that isn't depending on #glibc or another #libc implementation, the reason is there was some malware that attached itself to glibc and prevented you to see the directories and files it used and also the process directory in /proc
Had you a ls that wasn't built with glibc, then all the files and directories would be listed.
I kind of wish there was a version of Alpine that was libc based - just for desktop NVIDIA support really.
把 libc 移植到 GPU 上跑
在「Using Libc for GPUs (llvm.org)」這邊看到的,本來在想是個路人的噱頭 project,但仔細看才發現是 LLVM libc 官方的文件:「Using libc for GPUs」。
不是所有的 libc 函數都被 porting 上去,但從列出來的支援清單可以看到主要就是計算類會用到的,但還是有包括一些 I/O (stdio.h) 與時間 (time.h) 相關的函數:
Once you have finished building the GPU C library it can be used to ru
To enable fast system calls in dynamically linked binaries, we load at runtime a C library that is "unikernel-aware" and employs function calls into the kernel for system calls invocations. This C library is a special version of Musl #libc that can be created fully automatically from vanilla Musl. This is done with the Coccinelle code transformation tool. To build it and test it out, use the following steps.
https://github.com/ssrg-vt/hermitux/wiki/Fast-system-calls-in-dynamically-linked-programs
system call interface is designed to be compatible with the C calling convention, which is also the most common calling convention used globally. By adhering to the C calling convention, developers can not only perform system calls in different programming languages, they can also call procedures written in another language, because most languages use C calling convention for their FFI feature. The latter case is even more common, as most languages won’t interact with the system call interface directly in binary level, but by calling a C-based system call wrapper defined in the #libc
this ABI is painfully difficult to disentangle from the programming language C. In order to make a C call, you don’t just need to know what registers to pass arguments in and what size an int is, you need to know things like struct layout and what it means to spill a struct onto the stack. You also need some way to take the interface specifications provided by operating systems and turn them into a format your compiler can work with, and wouldn’t you know it, those interface specifications are provided in the form of… C header files.
https://langdev.stackexchange.com/questions/3233/why-do-common-rust-packages-depend-on-c-code/3237#3237
Ukrywanie procesów za pomocą ld.so.preload ( https://nfsec.pl/security/6505 ) #linux #security #libc #preloading #twittermigration
#TIL J'ai découvert https://justine.lol/cosmopolitan/index.html
Un outil pour compiler du #C vers un format capable de s'exécuter partout : Linux, Windows, Mac, FreeBSD... ARM64 et x86_64, sans reposer sur une plateforme (comme la #JVM) ni sur un interpréteur (comme #Python)
Il y a un article qui détail comment ça fonctionne (je n'ai que lu la moitié parce que je ne comprennais pas, c'est trop bas niveau) https://justine.lol/ape.html
must know crates in cargo
After again struggeling with #emscripten and the wait4 / wait3 #syscalls, and stumbeling across my 1year+ old bug report on that matter, I just said "Fine, I do it myself" and added the two missing c sources to the build process of emscripten's #libc build xDDDDDD Works flawlessly lmao
Exciting easy win I'd been meaning to do for a long time for broadening the scope of libc-test: 45 LoC (including include directives) to dive into a user+mount+net namespace where resolv.conf points to localhost and you have your own localhost you can bind to port 53 on (so resolver can be tested or even fuzzed). Non #musl specific; like all of libc-test, should work for any #libc.
@mntmn From what I understand though, it is rarely the best approach. Here's an interesting comment by @david_chisnall about the recent addition of some #assembly bits to #FreeBSD #libc:
https://lobste.rs/s/uhdxcb/freebsd_14_1_release_announcement#c_jdakn8
I've got an odd #posix #libc issue I could use help digging into.
I'm using `posix_spawnp`, and getting an errno of ECHILD. According to man7 and two other sources, `posix_spawnp` should only error as `clone`, `fork`, or `vfork` might, and none of them list ECHILD as a possible errno.
I'm using the Rust libc crate directly, fwiw, which is unabstracted bindings to libc. This error message compares directly against `libc::ECHILD`.
Thoughts?
pollyfill-glibc: Hackery to let new binaries run on old Linux systems. The docs directory has a bunch of interesting technical info on linker tricks
https://github.com/corsix/polyfill-glibc/tree/main
#compatibility #via:lobsters #pollyfill #linux #glibc #hack #libc #+
Cross-platform native C executables? Sweet.
"Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable."
New Linux glibc flaw lets attackers get root on major distros
LLMs as local offline tools like grep? llamafile combines model + binaries into one single file and it is easy to run as part of your bash script as grep or sed is. https://github.com/mozilla-Ocho/llamafile
Interesting thing is that the same binary runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS on AMD64 and ARM64 with the best possible performance. Because of this project: https://justine.lol/cosmopolitan/index.html