previous: >>108337962#define __NR_creat 85https://man7.org/linux/man-pages/man2/creat.2.htmltl;dr:create a filethis guy didn't get included in the open() thread 'cause i wasn't doing multiple at the time. so it gets its own thread! how exciting!this syscall is LITERALLY completely pointless lol. it is just a wrapper around open. why the hell it exists, i have no idea. my guess (and the only sane justification) is that O_CREAT didn't exist at the time. now, is that actually the case? i don't know! i guess someone could look it up. but yeah, otherwise, waste of a syscall numberrelevant resources: man manman syscallshttps://man7.org/linux/man-pages/https://linux.die.net/man/https://elixir.bootlin.com/linux/https://elixir.bootlin.com/musl/https://elixir.bootlin.com/glibc/
#define __NR_creat 85
O_CREAT
man man
man syscalls
>make another syscall for file creation>they make it non-batched againAt some point autism as pathology has to be entertained, screened for, and banned in any and all software development.
>The creat() function is redundant. Its services are also provided by the open() function. It has been included primarily for historical purposes since many existing applications depend on it. It is best considered a part of the C binding rather than a function that should be provided in other languages.what a redundant thread
yeah i still want private lessons on syscalls> why the hell it exists, i have no ideasounds like another case of backward compatibility cruft
>>108347474ok, post contact info and i will reach out after i get off from work
my favourite syscall is mmap :3
>>108347804omg that's my favorite too
>>108347780huh was it really that easy
>>108347812i like using it with MADV_WILLNEED to feed my program some extra ram as a treat
>>108346314The closest you'll get to batching is io_uring. Good luck with that though.
>>108349337Yeah, that's kind of my point. All the kernels are fucking shit because their developers are autistic to the max, and no one's talking about it.
>>108346188Literally why. This could've been a libc wrapper, there was absolutely no need to bloat the kernel with this.At least they didn't bother implementing it on AArch64, only x86 is stuck with this bloat.
>>108350008Oh, no. One wasted syscall number. Whatever shall we do.>meanwhile, over on Windows NT
>>108350064>still on Windows 7And meanwhile today they've deleted all those from the kernel, something Linux can never do because they stabilized the syscall interface and not dynamic libraries.
>>108350168Oh shit, never mind.
>>108350168>Windows 7The filename *IS* win32u_dll, isn't it.
bampu
>>108350168Also it's not like the NTAPI isn't stabilized. The one thing they do *not* guarantee are static syscall numbers; you're supposed to use the stubs in NTDLL.DLL for those (or extract them from the binary and issue SYSCALLs on your own, and yes, I actually had a usecase that wasn't malware to do so).But parameters? ABI? Function calls in and of themselves? Those are stable. And not only are they stable, but you should really, really, REALLY use them rather than the Win32 API, because the Win32 API sucks ass.>you cannot imagine the userspace overhead for a simple CreateFileA>and that's userspace overhead>not like, shit that's done in the kernel>if everything's warm and cached it's like 10% of the entire call>and if not it's like 2000%>true story
>>108347902i already said earlier i would talk to anyone who wanted to discuss the subject i like syscalls, and those with similar interests>>108348881i like it cause it takes lots of arguments and is very useful>>108350064l o l
>>108350942ok, i left it in the name field of the post you replied to
>>108346844OP is meticulous that way
>>108350942>i would talk to anyone who wanted to discuss the subjecthave you done osdev?>>108347804>>108347812lovely syscall indeed....
>>108350929>I actually had a usecase that wasn't malware to do sohow did that come to be? were you unable to source the headers for some platform your were compiling for?
>>108352778No, it was a syscall tracer that modified the stubs in NTDLL.DLL to jumps into my code. Problem was that the tracer itself relied on a couple syscalls, like>NtAllocateVirtualMemoryEx>NtClose>NtCreateFile>NtFreeVirtualMemory>NtQueryInformationAtom>NtWriteFile, which then required my own stubs.
>>108349337What's wrong with io_uring? Or are you wanting bulk file creation transactions? (??)
>>108353014io_uring is a clusterfuck because they wanted userspace to be able to add new submissions to the ring while old ones were still being completed - when realistically they should've adopted front and back buffers instead, or, even better, not share control data with userspace in the first place.
Ok, I admit it. You're the real regdumper.
>>108353057So you want transactions then not just batching.
>>108353077Not necessarily, no. I'd be fine with io_uring's model *if it worked, which it doesn't, as proven by the amount of CVEs it keeps generating*.>>108353064What?