<rayanmargham>
yea me and archa tried debugging it
<rayanmargham>
we couldnt figure it out
<rayanmargham>
we tried memsetting at alloc and free
<rayanmargham>
no luck
<rayanmargham>
i tried using gdb to figure out whats causing this
<rayanmargham>
i couldnt get anywhere
<heat>
step 1 would be stubbing out slabfree and seeing if it tells you anything interesting (maybe you have a double free somewhere), then check for regular heap corruption, then maybe check if the memory map limine gives you is completely busted
<heat>
etc
<rayanmargham>
limine isnt giving me a completely busted memory map
<rayanmargham>
i know this for sure because limine is used on countless hobby oses
<rayanmargham>
and i wouldnt be the exception
<rayanmargham>
i dont have a double free as im not doing anything, uacpi is using my allocator and it is very well tested
<zid`>
poison everything with 0xDEADBEEF and add asserts everywhere, and then extra everywhere :p
<heat>
grub is used on countless actual OSes and it's still busted regularly
<rayanmargham>
oh we did try to posion it
<rayanmargham>
its def my code
<rayanmargham>
i will say that for sure
<rayanmargham>
other kernels run fine\
<zid`>
Like, if you can get a reliable corruption
<zid`>
then you're 99% of the way there
the_oz has quit [Remote host closed the connection]
<heat>
>it is very well tested
<heat>
see, this being hobby code we're talking about, i somehow doubt it
<rayanmargham>
we cant, it runs fine as ud expect but one of the slab-> next fields is pointing to 0xffffffff which makes no sense
<zid`>
because you can literally just add if(entire_program_state == bad_state) checks
the_oz has joined #osdev
<rayanmargham>
i mean
<heat>
even real code is poorly tested, much less animelover69's acpi implementation or whatever
<zid`>
now you have a stack trace?
<zid`>
If it never triggers you have memory corruption
<rayanmargham>
oh i have a stacktrace
<zid`>
so add an accessor to slab->next where it checks for that value attempting to be set?
<rayanmargham>
hold on
<zid`>
if it triggers you have a trace
<heat>
like, this is your code and we can't debug it for you
<heat>
dont bother posting the stack trace
<zid`>
etc
<zid`>
you can then go into the parent function and add the if(this exact state) { dump all locals }
sskras has quit [Ping timeout: 248 seconds]
<heat>
irc is for design discussion and stupid, simple, direct problems
<heat>
otherwise i'll post 200k of code and hope zid` finds the bugs for me
<rayanmargham>
lmao
<heat>
which he will because he's good like that
<zid`>
I will report the first bug I find and then stop though
<zid`>
heat: Your keyboard layout is still encrypted.
<heat>
eh maybe with the fancy google quantum computer you can break the encryption
LBeatrix has quit [Ping timeout: 272 seconds]
<zid`>
probably
<zid`>
oh good news btw, github finally logged me out
<rayanmargham>
wait is the guy who made uacpis irc username animelover69????
<rayanmargham>
lol????
sskras has joined #osdev
<rayanmargham>
if thats okay
<rayanmargham>
wait zid, can u check if u can reproduce the problem on ur machine with my kernel
<rayanmargham>
i can give u the github, its public
<zid`>
But did you learn photoshop from a 16 year old youtube video
<heat>
no but i always played d4 as the first move
<heat>
because e4 is smelly
<heat>
lichess is based and open source btw
<heat>
chess.com is the solaris of chess
<zid`>
heat is your gcc built with -D_GENTOO_TIME64_FORCE=0
<zid`>
mine is, apparently
<sortie>
I have access to Solaris :)
<heat>
no
<heat>
it would be weird if it did
<heat>
sortie, my condolences
<rayanmargham>
hey hold on im gonna brb for a little bit
<rayanmargham>
im gonna eat omg im so hungry
<heat>
alright buddy
<sortie>
heat: Oh Solaris is great wait until you hear about AIX
<zid`>
Does the little mans want his din-dins?
<sortie>
I'm testing a POSIX 2024 feature right now and the only operating systems with it (checks notes) (this can't be right) (what) is macOS and Solaris
<heat>
what feature?
pax_73 has quit [Max SendQ exceeded]
<sortie>
F_OFD_SETLK
<heat>
linux definitely has it?
<heat>
it's, like, where it spawned
<sortie>
Huh that's odd
<heat>
how are you testing for it?
<sortie>
#ifdef F_OFD_SETLK
<sortie>
My feature macros may be off
<sortie>
May be a glibc ism
<sortie>
I definitely see it in my /usr/include
<zid`>
you're suppsoed to use autotools to see if it links then generate your own macro something something
<zid`>
*gags*
<heat>
gotta use libtool too
<heat>
sortie, on musl at least it doesn't require feature set macros
<sortie>
#ifdef __USE_GNU
<sortie>
ugh
<heat>
oopsie
<heat>
>(this can't be right)
<heat>
good news, it wasn't right
<sortie>
I'm used to libc's that expose more or less everything unless you define any feature macros
<heat>
that seems backwards
<sortie>
It's the only sane behavior to avoid feature macro hell
<heat>
-D_GNU_SOURCE
<heat>
this solves everything
<heat>
always
<sortie>
You can't know what the proper feature macro is for whatever operating system you're on without knowing all of the operating systems
<heat>
_GNU_SOURCE is funnily also implicit in g++
<sortie>
Sortix libc actually ignores it
<sortie>
But does respect _SORTIX_SOURCE, _ALL_SOURCE, and _DEFAULT_SOURCE
<zid`>
this is the best printf I've written all week
<sortie>
heat: It's already the year of the GNU Sortix, you should enjoy it while it lasts, I lose more GNU every year
<heat>
zid`, the correct solution there is to link with ncurses
<sortie>
heat is foreign GNU agent
<zid`>
what do you mean, correct
<heat>
gotta make sure you're running on an ascii-escape-code supporting terminal
<zid`>
That is perfect
<heat>
it could be cmd.exe you're running on
<zid`>
that works in cmd though
<zid`>
lol
<heat>
it did not
<zid`>
ansi escapes work in cmd
<heat>
that's pretty recent
<zid`>
w7 is not recent
<heat>
10
<zid`>
it worked in w7
<zid`>
ANSI.SYS
<heat>
ok maybe those worked in 7, but in general conhost knowing escape codes is a windows 10 thing
<zid`>
yea it's limited in 7 and cmd is super slow and dogshit
<zid`>
cus of conhost
PublicWiFi has quit [Ping timeout: 248 seconds]
pax_73 has joined #osdev
Celelibi has quit [Read error: Connection reset by peer]
eddof13 has joined #osdev
Celelibi has joined #osdev
apokryptein has joined #osdev
<nikolar>
it's windows, what did you expecte
<nikolar>
s/e$//
<bslsk05>
<nikolar*> it's windows, what did you expect
<heat>
s/.*/linux kernal/n
<bslsk05>
<nikolar**> linux kernallinux kernal
eddof13 has quit [Quit: eddof13]
<nikolar>
kek
eddof13 has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
annamalai has quit [Ping timeout: 252 seconds]
annamalai has joined #osdev
netbsduser has joined #osdev
<sortie>
heat: Well now I have a ton of F_OFD_SETLK tests :) It works a little differently than I expected, but that's mostly me never bothering to learn the crappy F_SETLK locks lol. I can observe the differences between F_SETLK and F_OFD_SETLK too. I also test conflicting locks with files that are reopened for real, vs a dup(2)'d handle.
<zid`>
rayanmargham: I get as far as needing xorriso
<rayanmargham>
hey im back
<rayanmargham>
okay, that shouldnt be too hard
<sortie>
rayanmargham's back alright
<zid`>
I always use mkisofs cus.. xorriso is just a fucking wrapper for it
<rayanmargham>
you can change the script then if youd like
<sortie>
Fun fact xorriso is the GNU package with the weirdest coding style
<kof673>
eh, the glibc feature test thing makes me think "i need to add special lines just for this one libc?"
<zid`>
can I boot this by asking qemu very nicely to take the uefi image and shit, or do i *need* the cd-rom image
<rayanmargham>
no you kinda need the iso
<rayanmargham>
limine is the bootloader here you can't just pass my elf via -kernel or something
<zid`>
[ Results for search key : xorriso ]
<zid`>
Searching...
<zid`>
[ Applications found : 0 ]
<zid`>
what's the package even called
<rayanmargham>
hold on
<heat>
sortie, can you post the tests on a branch?
<rayanmargham>
dev-libs/libisoburn
<heat>
curious if onyx passes
<rayanmargham>
thats for gentoo
<zid`>
I will -1 it, just for you, be grateful
<rayanmargham>
im very grateful
<rayanmargham>
that your helping me
<sortie>
heat: You got OFD? Neato
<zid`>
you're
<zid`>
I mean, I am not helping though
<rayanmargham>
apologises, you're*
<zid`>
you just told me to build it so I am
<rayanmargham>
yea
<sortie>
heat: I honestly thought OFD was a POSIX invention and didn't think anyone had implemented it
<heat>
nope, OFD was a linux invention
Turn_Left has joined #osdev
<heat>
one of the few cases where POSIX did it right and defered to impls
<sortie>
Yeah that explains why it doesn't have a super terrible name
<kof673>
i thought that was all posix was "defer to implementations" ---- maybe with some changes, but did posix ever invent anything that wasn't implemented yet?
<rayanmargham>
yea its loading
<rayanmargham>
wait a bit zid, i use a really stupid freelist allocator for the pmm
<sortie>
kof673: Oh they invented posix_close and posix_devctl this time around and it's terrible things
<rayanmargham>
but now we know that it is repeatable
<heat>
>oopsie uwu
<heat>
fuck me
<heat>
this is worse than uacpi's author being animelover69
<rayanmargham>
im asking him
<rayanmargham>
he says thats not him
<rayanmargham>
i think
<heat>
WHAT
<rayanmargham>
hold on
<heat>
i have lived a lie.
<rayanmargham>
i asked him. waiting for a proper response
Left_Turn has quit [Ping timeout: 265 seconds]
<rayanmargham>
either way thanks for testing it zid
<sortie>
heat: I pushed the tests up on the ofd branch. I didn't finish writing test expectations yet and doing dinner in a moment. But you can compare with Linux. Makefile.os is handy for that
<rayanmargham>
thanks for going through that trouble
<zid`>
oh almost forgot emerge -C libisoburn
<rayanmargham>
understandable
xenos1984 has joined #osdev
<heat>
sortie, aight, thanks
<heat>
i do have to mention how i really implemented OFD locks as a side effect of implementing POSIX file locking
<heat>
because testing the locking logic with OFD is much easier than spawning two processes :)
<sortie>
heat: Yeah I see how much code would be shared in terms of impl
<sortie>
I may still only do OFD locks
<sortie>
Cus fuck the old ones
<rayanmargham>
uacpi guy says he never used irc
<sortie>
But may change my mind
<rayanmargham>
@heat
<heat>
you need the old ones for sqlite
<heat>
@rayanmargham you're the one that implied uacpi's author is animelover69
<rayanmargham>
i thought
<rayanmargham>
you were kinda implying
<sortie>
heat: Note my tests are basic. They just test the truth table for the most basic uses, that everything works as intended.
<sortie>
So they should be easy to pass, no cleverness that looks for real bugs or differences yet
_ngn- has joined #osdev
<sortie>
heat: Threw a couple O_CLOFORK tests in there too. Figured testing all of POSIX is too much work, but that it might be fun to test POSIX 2024 changes
_ngn has quit [Ping timeout: 264 seconds]
<heat>
what O_CLOFORK systems are there?
<heat>
sortix, openbsd maybe, maybe solaris?
<sortie>
Sortix and Solaris
<sortie>
You can headcanon Theo's reaction to CLOFORK
<heat>
lol
<heat>
i mean i did read they tried or were trying to implement it
<sortie>
It'll be interesting to see how it rolls out
<sortie>
POSIX was arguably a bit too premature standardizing here
<sortie>
If there isn't adoption, it might move to an option in the next standard
<heat>
i suspect O_CLOFORK will only get merged over al viro's grave
<heat>
also kind of a dubious flag isn't it
<sortie>
If FreeBSD and OpenBSD both move on it, plus maybe a couple proprietary unixen, it might get a critical mass
<zid`>
heat is waiting for O_WO
<heat>
O_CLOEXEC makes sense and arguably should've been the default from the start
<sortie>
But likely it'll just be contended for a decade or two
<heat>
O_CLOFORK? weird, now you can fork and fds suddenly EBADF
<heat>
zid`, O_WO support would certainly be merged by animelover69
<heat>
and then later put in the C standard thanks to the linux man-pages guy
<sortie>
I actually have O_CREATE
<heat>
sortie, all alternative UNIX systems together are still way smaller than linux's size
<sortie>
heat: Not macOS
<sortie>
That one would carry some weight
<sortie>
But macOS is always massively behind on POSIX. I was shocked to see it had OFD
xenos1984 has quit [Ping timeout: 272 seconds]
PublicWiFi has joined #osdev
<kof673>
the annoying thing about linux manpages is they seem to just lump all functions together re: first appeared, conforming to, without saying which specific function came from where/when. it is not the purpose to assist least common denominator-ing, but bsd i think is usually better on this
apokryptein has quit [Ping timeout: 265 seconds]
<kof673>
</minor gripe>
<heat>
i mean, usually depends on the manpage
<heat>
lots of functions would be somewhat like: HISTORY UNIX V1
<sortie>
heat: By C, everything else should be zero initialized
<heat>
hmm
<heat>
maybe it's tripping on something else, then
<sortie>
I did get EINVAL everywhere when I did .l_type = 0 until I realized I did have to set the field (and that F_UNLCK was non-zero on many platforms)
<heat>
if (arg->l_type == F_UNLCK)
<heat>
return -EINVAL;
<heat>
oops?
<sortie>
idk
<heat>
what's the intended POSIX behavior for GETLK F_UNLCK?
<sortie>
" Get any lock which blocks the OFD-owned file lock description pointed to by the third argument, arg, taken as a pointer to type struct flock, defined in <fcntl.h>; the application shall ensure that the l_pid member of the structure pointed to by arg is set to 0 on input. The information retrieved shall overwrite the information passed to fcntl() in the structure flock. If no lock is found that would prevent this lock from being created, then the
<sortie>
structure shall be left unchanged except for the lock type in l_type which shall be set to F_UNLCK."
<sortie>
"Get any lock which blocks the OFD-owned file lock description pointed to by the third argument" ← I mean, is { .l_type = F_UNLCK } a valid lock?
the_oz has quit [Remote host closed the connection]
<heat>
creating a F_UNLCK lock is nonsensical, you can always do that
<heat>
unless that's the point, just return
the_oz has joined #osdev
<Ermine>
ofd is the what
<sortie>
heat, note how this is os-test, I just throw all the inputs at the syscalls and see what happens, whether defined or not, and then try to figure out what POSIX says about the cases
<sortie>
Note that all systems output F_UNLCK in this case (linux, macos, solaris)
<sortie>
I would go with that behavior
Left_Turn has joined #osdev
xenos1984 has quit [Ping timeout: 248 seconds]
Turn_Left has quit [Ping timeout: 265 seconds]
obrien has quit [Remote host closed the connection]
heat has quit [Read error: Connection reset by peer]
heat_ has joined #osdev
<zid`>
heat if you kernel developers were F1 drivers, who would be mazepin?
<heat_>
define mazepin
<zid`>
worst driver in history?
<heat_>
markus elfring
<zid`>
go on then?
housemate has quit [Ping timeout: 248 seconds]
<heat_>
i mean he's just terrible
<heat_>
generationally terrible because he doesn't give up
frkazoid333 has quit [Read error: Connection reset by peer]
<zid`>
lol
<heat_>
king of useless patches and bad review comments
mpetch has joined #osdev
<mpetch>
I think you mean mazespin ;-)
<zid`>
mazespin should have one of those custom google result pages
<zid`>
that makes the page spin around then burst into flames
<heat_>
kent overstreet is definitely verstappen
<mpetch>
lol
<mpetch>
rayanmargham I think I helped you quite some time back with problems you had. I helped fix some bugs (probably didn't find them all). I tried building your repo again and I don't get an error. Have you committed your latest non-working code? Anything special to reproduce the issue?
<nikolar>
heat_: how's Kent verstappen
<nikolar>
He's being kicked out of the kernel lol
<heat_>
arrogant and crashes out
<heat_>
and technically decent
frkazoid333 has joined #osdev
elderK has joined #osdev
<pog>
pounce: i don't want rust i just want c#
<zid`>
oh it's gogetta
<zid`>
done any aoc? I'd wager not, you sound busy
<pog>
i cba to do anything
<pog>
my whole day is chores and work and wife care
<pog>
i need to get out sometime in the afternoon tomorrow to find her a bday gift
<zid`>
I recommend a 40 meter tall mecha
<rayanmargham>
@mpetch i figured out that uacpi is giving me a bunch of crappy sizes. check my thread on the forums
<rayanmargham>
causing me to take the address given as a slab address even tho its well
<rayanmargham>
a vmm region
<rayanmargham>
dunno how to solve this
<rayanmargham>
thats weird
<mpetch>
my bad. I was building from one of the branches in my fork and not from master. Now that I am building the right branch I see the page fault with CR2=ffffffff
<pog>
hm a mobile suit gundam
<zid`>
aww yis, new tactical breach wizards vid
<heat_>
WELL TESTED
<heat_>
if there's something i do love its being right
<zid`>
Did you fix your keyboard?
<heat_>
keyboard is working gr8 m8
<zid`>
I should use that lexer I wrote to make c2pt
<zid`>
that replaces all the tokens with what you'd get if you typed them on a pt keyboard
dzwdz has joined #osdev
mpetch has left #osdev [#osdev]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
Dead_Bush_Sanpai has quit [Ping timeout: 265 seconds]
Dead_Bush_Sanpa1 has joined #osdev
Dead_Bush_Sanpa1 is now known as Dead_Bush_Sanpai
zid` is now known as zid
<zid>
heat_: Now that you've lost the 2024 chess championship, are you going to win the bot championship with heatfish?
agent314 has quit [Ping timeout: 260 seconds]
cloudowind has quit [Ping timeout: 244 seconds]
<heat_>
i have stockfish ready to go
Matt|home has joined #osdev
goliath has joined #osdev
<heat_>
funnily enough i've thought about writing a small chess engine
<heat_>
for fun
<zid>
There's some cool chess engine vids
<zid>
There was one that was like, what's the best chess engine you can write with 400 tokens?
<geist>
ah yeah anything sebastian lague does is great
<geist>
i can spot that voice in an instant
heat_ is now known as heat
<Matt|home>
hello.
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
Dominika is now known as sdomi
<geist>
hola!
<nikolar>
oi
<heat>
i've been writing procfs
<heat>
it's fun
<heat>
ish
<geist>
yeah i assume that's mostly an engineering effort to solve the partial reads of /proc stuff and then a lot of fun adding of new files to it
cloudowind has joined #osdev
<heat>
yeah
<heat>
there's an annoying problem i'm yet to tackle: the pid entries
<Ermine>
seems like partial reads can be a dos vector
<heat>
not that creating the individual files is that terrible (it's a lot of work, but not awful), but rather that pid procfs entries dont really exist until they do
<heat>
inodes are fully dynamic
Left_Turn has joined #osdev
<heat>
also, fun fact: linux procfs files are fully seekable in non-obvious ways
<Ermine>
why would they make them seekable
<heat>
if you open /proc/pid/maps and seek to an address it'll Just Work
steelswords94 has quit [Read error: Connection reset by peer]
<heat>
you already need to handle short reads and reads that dont fit in buffers (too much data)
<heat>
sprinkle a little lseek handling and you got seeking for free
Turn_Left has quit [Ping timeout: 244 seconds]
<zid>
heat: my favourite is cpuid btw
<zid>
you can seek to the MSR address and read there
<Ermine>
so you can ask /proc/pid/maps for an address like 0xdeadbeef and you'll know whether it's mapped or not?
steelswords943 has joined #osdev
<heat>
you can ask for $addr and it should give you (as far as I understand) the maps line matching that addr
<sortie>
Literally had to decrease the font size to 85% to even fit all of the tables on my 1920 pixel wide monitor
<zid>
to be fair there's a lot of cell padding
<sortie>
Even that padding is turned a good bit down
<heat>
sortie, your bad and good on the O_CLOFORK are inverted! hth
<zid>
looks fine to me with padding-left/right: 1px rather than 0.1em
<sortie>
heat: It is POSIX 2024 so idk
<heat>
posix_trace_event good
<sortie>
posix_trace_event got removed it looks like
<heat>
you should try it
<heat>
AIX was the only one that implemented it
<sortie>
I don't even have a man page
<sortie>
But I do have AIX access now
<sortie>
heat: You got a sshd disk image with a C compiler yet? So I can add Onyx?
<heat>
In Progress
<sortie>
Stop EINPROGRRESSing me
<heat>
lots of work i need to stablize and merge
<sortie>
If I can't ssh into your os are you really doing osdev
<sortie>
(to anyone else in here: Yes, yes one is doing osdev, even if one does not do that, but special rules apply to heat because heat is my main rival)
<zid>
I have a 'network stack'
<zid>
so I am half way to osdev
<sortie>
<heat> lots of work i need to stablize and merge
<sortie>
Why do you sound like me trying to 1.1
<zid>
he's never heard of working on master
<zid>
what an idiot
<heat>
not THAT much
Left_Turn has quit [Read error: Connection reset by peer]
* sortie
joins zid in bullying heat, despite the fact that I am the worst at working on master
<heat>
github says 33 commits
<zid>
branches are for saving CHECKPOINTS from master
<zid>
not working on
<zid>
They're so you can give your bisection points names
<zid>
master is where the magic should happen
<heat>
i _could_ work on merging everything, but i'm busy everythingisafileing
<heat>
sortie's worst nightmare
<heat>
no, the dentry isn't real, no, it can't hurt you
<sortie>
heat: Sortix master..staging is down to 22 commits if you don't count commits that will never be merged (turning on volatile branch options, debug code) and temporary reverts
<heat>
my commits are way smaller than yours
<heat>
even though you fixup! to shit
<sortie>
Thank you. My commits are glorious for great victory.
<sortie>
My commits aim for perfection :)
<sortie>
The goal is to have a very high bar for master/nightly quality
LostFrog has joined #osdev
<sortie>
heat: It would be awesome to have you on os-test though. I can then keep competing with you in kernel semantic quality.
<sortie>
heat: Hey what is your result for trio-send-wrong-y-connect-recv?
<sortie>
Cus I'm like that's a race condition vulnerability and everyone have it except me
PapaFrog has quit [Ping timeout: 260 seconds]
<zid>
sortie I keep telling you ffs, stop opening up NEW cans of whoop-ass when there's already an open one in the fridge
<heat>
sortie, all of those tests ENETUNREACH and i need to figure out what's wrong
<sortie>
That is probably why I can't ssh in
<zid>
There that's better, finish that can
foudfou has quit [Remote host closed the connection]
<sortie>
*belches*
<heat>
oh i think i realize what might be happening
<heat>
my getsockname is a little screwed up
<zid>
santa is judging you heat, be careful of what you change
<zid>
so close to christmas you wanna be careful
* kof673
<stares at sothis in FIRE tree at spring/summer in egyptian zodiac....> <stares at pyramid-shaped FIRE fir tree at winter..........>