#Astral
1 messages · Page 3 of 1
ssh had some funnies with resolving which port to connect to
so doesn't work (yet)
I have tcp server side so I should see if it works once I make my tcp stack less bad
minecraft bedrock is written in c++ and has microsoft code in it
minecraft bedrock is basically a shared library
for all the haters who doubted me
tcp can now download at a miraculous rate of ~300 kb/s
technology is awesome
time to build https support into this thing
Nice job
now im interested in finding out how fast managarms TCP/IP stack is
i dont think its actually that slow
I'm going to port openssl and try to download some big file and see how fast this can get
according to the video dennis recorded, he managed to download gnu hello tarball at 160KB/s
common monolithic kernel W
(for astral obviously)
is the bottleneck now your connection? the fs? or still the netstack?
i tried seeing if i could install speedtest-cli with pip on managarm but i realised that
- we dont ship pip
- venv doesnt work lmao
i kinda want to port my xhci driver+usb stack to astral, it could be a fun challenge
maybe it was related to the level of logging dennis had configured
i think he was logging quite a lot
probably more related to dennis iirc still running his vm with a single core and without kvm because reasons
nah hes running multicore with kvm
although i am probably also logging a bit less than he is
i am logging all posix requests tho
without logging requests i get between 700kb and 1000kb/s
no idea, I still gotta get openssl to test on a large file
Whats the bottleneck?
currently trying to find out
as much as i know we have bigger problems, i kinda want to optimize the net stack now 
wtf is this build system agh
currently trying to make managarm system compile with -Ofast instead of -O2
yeah openssl is terrible lmao
Just to flex on astral lmao
let me build astral
although astral is also super based and impressive
I will rename astral to tcpstral and focus all my effort on the netstack
I don't even have tcp upstreamed yet
all hobby os's that can get shit working are automatically based (unless they are written in rust)
and the code is bad tbh
:^(
Netbsdstral
let me try and build astral anyway
like its messy and I really need to do a proper cleanup on it
do it
jinx, nice
honestly I will just take heavy inspiration™️ from the managarm recipes for this I'm not gonna spend the next few hours figuring this out
mammogram wins again
Nyaux had a working tarball fs
Does that make it based
vinix recipes are jinx
i recommend those instead ;^)
does vinix have openssl
it does
apparently taisei and libzip
hmm fs/tmpfs.c: In function ‘tmpfs_link’: fs/tmpfs.c:248:23: warning: comparison between pointer and integer 248 | if (node->vfs == V_TYPE_DIR) | ^~ [CC] io/block/vioblk.o [CC] io/pci.o io/block/nvme.c:10:10: fatal error: event.h: No such file or directory 10 | #include <event.h> | ^~~~~~~~~ compilation terminated.
Wait why is vfs pointer storing the file type
wait wtf
how the fuck did I not notice that
aaaaaa I thought I nuked all includes of event.h
that had a nasty lost wakeup problem
@robust geyser pull now
yeah that seems to have worked, thanks
I do have like 12381292183129 unstaged changes rn so once I get openssl ported I will probably upstream them
well https is here
based
gonna see that certificate stuff
the recipes build with -Og by default?
that's what debugoptimized is
i notice that sometimes astral is eating my keystrokes
when typing fast in the terminal sometimes it skips a key or two
what is your qemu version
hm then that weird bug isn't supposed to happen
maybe its because of the mouse focus thing
that never happened to me
doesnt happen anymore, weird i agree
also nvme boot not working, is that expected?
managarm-system was compiling with -O2
i checked by adding an #error to a file and checking the command
also compiling as release + removing a couple logs gives me a consistent 1MB/s
http is also slower than https for some reason, lmao
__assert(devfs_getbyname(root, &backing) == 0); in kernel_entry fails when using any of the nvme boot options
im assuming the nvme device just isnt there
huh i misremembered debugoptimized is -O2 -g
which would make sense, i dont see anything on the qemu cmdline regarding that
im going to try -Ofast now 
Ofast won't help for managarm
I don't actually ship the script to generate an nvme image lmao

there isn't even an nvme drive attached to the vm
or well, it won't be any better than O3
you can use vioblk as well (and change the root in limine.cfg)
also, have you thought about shipping a clang-format file?
Mind you, slowdowns due to recording were observed
or maybe only slightly better, due to -fno-semantic-interposition
what does that do
from 1mb/s -> 160kb, lol
Used to. And always with KVM I’m not that sadistic
basically a tool to format your code
you can configure it using a .clang-format file
Yeah it sucks. Took me a while and a tiny mis configure lead me to a two week debugging of the ssl state machine. That sucked
a lot of people like to format code to keep it consistent, and a clang-format file would be nice for other people to have a way to follow the code style of astral
Traitor 
hmmmmm
You really think I take 8 mins to configure gun hello in my unrecorded test runs? Lol
no
I should get lynx ported so I don't have to manually type in the download link of stuff every time
Still all based on my work so I’ll be taking that W thank you very much
its not webkitgtk but its something
Doable (or something along those lines). I forgot if I ported lynx or links
But I have a text mode webbrowser in managarm
i mean i dont want to force you to do that, it would be nice but it may take some time to get everything tweaked so it formats the code exactly the way you want it to
and even then it wont be perfect
for that you just need to // clang-format: off + // clang-format: on
or learn how to tame it with strategic // at the end of line :^)
It was links
managarm does links
I mean links is graphical so I might as well do that
oh perfect then
There must be a reason why I didn’t do lynx. Maybe shit build system or some weirdness
https://github.com/managarm/bootstrap-managarm/blob/master/bootstrap.d/www-client.yml contains links
its called the interrupt stack table in x8664 iirc
doesn't really matter
i thought it was the "task state segment"
it contains the ist, but the entire structure is called the tss :^)
no worries
im just snooping around
this just caught my eye in a particular way
im trying to pick up the coding conventions, see how things work
so much code that could be simplified 
but i must resist the urge
yea, maybe an xhci driver or something
i dont have motivation
and i dont know how to do shit
Classic
Same
yeah i can
i mean i know i can
but i just have to do so much shit
i want to do stuff properly
As one should
yea but idk how 😭
From the start
lol ur so right
yea let me port them to kernel space real quick
I hear udev
No no from userspace duh
yea but i need so much shit for that
i dont want to speedrun a shit scheduler + vfs again
Then get to work 
keyronex networking is drastically slowed by printfs in the code
that's one to watch out for
i know i know
its just too much stuff to handle
without a clear path
ordinarily networking is prioritised over everything else because the stack below the sockets themselves run in DPCs
Speaking of keyronex related items, I should upstream the InitWare changes
but with printfs in the way the DPCs get hung
i have no idea if astral prints during networking but it's a low hanging fruit
and tell @winged basin to continue work on it, when new udev and tmpfiles
i feel like im never gonna get my shit together and write anything good
Relatable
Also incorrect
every time i sit down and try to do something useful i just get overwhelmed by how much shit i have to do
some day...
Just in a different scope
tbh its easier said than done, i wish i could plan things out but i dont have enough knowledge on what to actually do
Feared you’d say that. Maybe I can entice you with Managarm support PRs for InitWare
(for real tho, I need to get this old ass udev to behave while I’m waiting on new udev)
i want to have a nice vmm, robust interrupt system, i have no idea how everything is tied together just yet and that annoys and discourages me
That I can’t help with. I’m awful with planning and I never did the steps to get to userspace 
Understandable
i can feel the awful planning part atm
oops
think its get sock opt
either way I'm probably gonna at least upstream all of these changes I have here jesus christ
couldn't get the graphical version to work
nevermid it was google that didn't work in specific
epic
I mean hey its not too bad to use
the tcp ip stack doesn't immediatelly combust
the only thing I ran into was an oom but I was also running at 256 mb of ram 
hm the issue was that it was default to ipv6
or not
idk I'm tired today was productive
Nice work
it's kiloBYTES/s (kB/s)
dont confuse!
i mean it's about 2.4mbps which is still slow as hell but at least it's not 56kbps 😄
agree
From now on I will measure everything in kilo nibbles to prevent further confusion 
I wanna do something fun today and get an ssh server on astral
The sys futex wait signal interruption stuff still hasnt been upstreamed into mlibc damn its like an 8 line diff
PR?
#1068
Apparently building the managarm sysdeps failed because it failed to get libdrm or something
Ive been running with it on astral ever since I opened the pr, I guess you can wait until someone who wrote the code confirm its good but all it does is just retry to take the locks on an eintr and go back to sleep if not
i restarted the ci jobs
freedesktop seems back up? at least the gitlab instance loaded in my browser
as for the code i looked at it and it seemed fine
could you run a rebase to get rid of the merge commit though?
Yeah I dont think squashing would be a problem since its just a single commit anyways
okay ci passed now
Im surprised you didnt run into this when doing mlibc on linux since FUTEX_WAIT is interruptible there
inb4 linux returns EAGAIN if futex_wait is interrupted by a signal :^)
hm no it doesn't ```
EINTR A FUTEX_WAIT or FUTEX_WAIT_BITSET operation was interrupted by a signal (see signal(7)). Before Linux 2.6.22, this error could also be returned for a spurious wakeup; since Linux 2.6.22, this no longer happens.
What kept dying because of this was fvwm iirc and fvwm does start new processes once in a while
So I think it was a sigchld interrupting it
Yeah lmao
hmmmmm
I will need socketpair for sshd
yeah localsocket socketpair doesn't sound so bad to implement
damn sshd is making me implement all of the socket system calls I was too lazy to implement
oop
chroot is pretty simple
yeah I literally just copied my chdir and changed a single thing
I already had the root stuff implemented just never the chroot syscall itself
wtf
I don't handle uid/gid stuff so its probably complaining that it can change the gid because I just stubbed those
I can probably just hack something together lmao
or actually
disable that in openssh
yeah its just setting a flag in configure.ac
WHAT DOES IT WANT FROM ME I DON'T HAVE PASSWORD SUPPORT
wait there isn't even a mathewnd user
oh
if you can connect to it because not even I can lmao
I need to figure out how to make this work
I either implement crypt(3) or stub it to return the bullshit I put in /etc/passwd
random bullshit go
ssh speedrun
I mean its an mlibc panic because of a function I don't even know how to implement being stubbed
I will just make it so that like if the first input is some specific string it will return another string
and otherwise do the normal unimplemented
libxcrypt
does that overwrite mlibc's stub
yeah if you have libxcrypt you can just disable the mlibc crypt option
likewise with libiconv
most things should pick the dedicated libraries
libxcrypt should definitely work because not even glibc provides crypt on it's own nowadays
(or at least distros use libxcrypt)
well ty for the pointer
sshd
https works fine, I have a web browser ported
ah I see, insane!
I'm just going after sshd now
oh dang
yeah getting https ported is one of my OS goals, but I'm still a long long way from it
and then other stuff it may need which just adds to the complexity
great stuff on ur OS tho!
tbh you can (and perhaps should) import most changes from the vinix repo
when it comes to ports
i could even do it for you like i do it for Gloire
i don't mind
you don't have to, I'm probably gonna have to take a day to do port maintenance sooner or later anyways
I ported firefox to astral 
what a madman
great work
does X forwarding work? :^)
I should try
yeah that would be amazing
Astral is a windows 11 fork confirmed
I just got libxcrypt ported and then remembered I could let ssh use empty passwords
true....
man
every day i need to do more and more to catch up
:^)
i should start doing something
I'm on my VMM and haven't written a single line of code for it since the day I started
but we both gotta catch up
I'll start catching up
uhhh
the 22nd
i probably wont lmao
my arm with a cast is itchy

but the itch
is bad
like
it needs to be itched
idk if x forwarding doesn't work with wsl2, if it doesn't work with astral or if I'm just too dumb to set it up
whatever I have openssh thats what matters :3
should work on wsl, at least it worked last time i tried it
but great work nonetheless :3
seems pretty stable on ssh too, was able to run links and stuff
I should do the ssh from one astral vm to the other
u should host a public astral vm :D
@robust geyser
that's a fun idea and I would need to add permssion stuff cuz like I know in the first 10 seconds someone will rm -rf /usr/bin/* lmao
better than windows™️ 
that is so god damn based
you should really implement absolute ps/2 mouse extension
but nice thats really cool
I should add credentials tbh
And unstub all those functions from mlibc
no no dont do that
mount your host fs into astral and expose over ssh
and host on a public ip
perfect
then put up a public ssh
and run printf "flag{%s}" <(head -c 12 /dev/urandom | xxd -ps) > /flag
and see how long it takes for someone to recover that
Implementing nfs just to get my host fs messed with 🙏
Honestly sounds like a fun idea
qemu has fat: thing\
u can mount any directory as a fat disk
make sure to instance qemu though
awwww that's awesome
i found the easiest thing is to implement virtio-9p
i mean
and if you are prudent when you implement it, you can then implement networked 9p without changing the actual 9p driver (just the transport driver, which should be separate)
its plan9 so
qemu implements 9p2000.L which is 9p, minus 80% of the plan9 stuff, plus serialised linux vfs ops
so it's much less pain
already found one thing that might be exploitable
syscall_hostname assumes a terminator and then performs a strcpy into a buffer that is too small
oh and
PLEASE enable SMAP and SMEP
hostname also has a kernel read which is cool
oh and write
I dont really have a read from user implemented yet lmao
Old astral had it but Im too lazy to backport that
do it
its a major security feature
Yeah
Guess I will add it together with credentials
Since everythijg still runs as root
https://github.com/Mathewnd/Astral/blob/rewrite/kernel-src/sys/syscalls/sigaltstack.c this is racey if you have cpu migration
ah i see
Yeah that can be vary bad oop
I should probably add a getrunningthread func or something
what the fuck
this is serenity os level stuff
why cant vfs_write lock user pages until its written?
you dont need this memcpy bs
also u have an interesting code style
no underscores nor camel
itsjustonewordcase
veryhardtoreadbutwhatever
slower than a memcpy that just bails out on a page fault
wdym
thats not even what im talking about
im saying he straight up allocates a new kernel buffer
so it copies the entire range from user, then does DMA from that range, then frees the range
thats extremely expensive
my guess is he doesn't want it to crash WITHIN vfs_write
i mean just copy_from_user into the page cache
does he have such a thing
if he has one then yeah
but what if you pass an invalid memory region to the function
and it bails in the middle of writing
u return the page back to cache
an exception is thrown
and then you've half-written the file already
half the file has been written then
NT verifies the entire range and locks it before doing anything
for example
u cant half write
expensive and impossible
I never said the code was good 
that's a problem isn't it
it is legal to have, let's say, 1 tib of data in virtual memory, and to write that whole lot to a file
you could pull that off with an MDL
with only, say, 32 gib of ram
sooo how does that make it impossible to lock pages
so that unmap hangs until the data is copied
you can't lock all 1TB into memory at once
u lock page by page
locking implies it can't be paged out
it can't fit
if any fails u unlock all of them
by lock i mean the virutal address cannot be unmaped by user
it doesnt have to be present
u just say this virtual address cannot be unmapped for the duration of the operation
in that case possible but requires a little work
u have to have a similar mechanism for paging out stuff anyway, while in a page fault handler you shouldnt allow a different thread to unmap said page
you need to inhibit files for which some mapping exists from being truncated, for example
it also breaks a bit on some networked filesystems where mmap() can be risky in general (because the file may be remotely truncated and then what should you do? provide zero-filled pages or fault?)
probably doesnt really matter because this is implementation defined behavior
my feeling is that if someone tries to write data part of which is virtually unmapped then it is fair to punish them by only writing the virtually mapped part of it
isn't that just locking the address space
fair enough but what i described above is not that difficult to implement
for write() style interface anyway, for asynchronous writes not a virtual but a physical wiring of the pages is necessary
When I wrote that I didnt even have a page cache but I might do that once I have a copy from user anyways
but thats all u need
if its present it will be present
yeah, but you will write private data if that page is freed by the user before the write is finished
which is why we lock stuff
or you just bump the page reference count if u have struct page
if it's physically wired it's not subject to reuse
what does physically wired mean
in keyronex this is the use v.s. reference distinction
so like ref count?
a page use can be e.g. file shared, anonymous, pml3, or deleted; a page is freed when its use is "deleted" at the same time as its reference count is 0
i mean yeah that works
and a reference count > 0 = physical wiring because the page is not subject to either freeing or reuse
Hm another thing that phases me more than the performance aspect of it does is that it needs to allocate the memory for writing all of that especially if its like a huge file which is dumb yeah
Whatever Ill deal with it later Id need user memcpy for that anyways
It was just the easiest solution at the time
Because I wrote that before I had the page cache
I didnt implement it with my vmm I did it much later because I had no idea how to
I did this because it was the simplest thing to do at the time
I see
Anyhow for today I will probably go around the kernel doing a few todos here and there while seeing how I will be implementing the credential stuff
Maybe even the user copy stuff too
Since thats part of the todos lmao
kauth
it seems like an interesting idea
I got a friend to ssh into astral all the way from poland so serverside stuff defo works over the internet too
POLAND MOUNTAIN 🇵🇱
I already undid the port forwarding and stuff 💔
my family is trying to get italian citizenship and the hearing is in the 24th I really hope we get it and get it this month so I can come out as italian during pride month lmao
its probably not happening because bureocracy is slooow but one can hope
Fuck now Managarm really need that server stack asap
Nice work
i'm so sorry
why not portugal? they speak portuguese so you won't need to learn another language, just the different accent
I dont think we can trace anyone on our side of the family tree thats from portugal
I didn't say it because of that
I said it because since you live in Brazil, you most likely speak Portuguese
I mean isnt portugal an eu country
it is
Great, I'm polish as well 😉
and italy is too?
I have been very productive these past days yes I love productivity
I ported shadow (still not 100%, passwd works with the putpwent pr and login will work once I get to add the handling of a few wtranscode errors in more functions)
that way once I start working on stuff related to different users I can quickly test stuff out
and today I didn't do a lot other than add a commit to that pr and try to build gcc inside astral for fun (which during a mmap test in the configure the makefile calls ran into a page refcount issue which I still have to find the cause of, neat)
this weekend I really should get going again
u got this
also, if you start working on filesystem permissions you might notice jinx conveniently makes everything owned by $yourhostuseruid, which probably doesn't map cleanly into the astral vm :3
that's because of the unshare+uid/gid mapping trick it uses to gain fake root in the containers without running as root outside the container
which also sucks because shit inside the container (install scripts or whatever) can't set the uid/gid of certain files/directories, which might be needed for some things
you can just fakeroot tar tho
but the files on the filesystem wont be owned by root
?
thats the problem
you are root inside the container
but on the outside you aren't
fakeroot is like the entire userns meme, it remaps the uids
so tar thinks that its all root
yeah but its not actually root
so the files on the outside are owned by your user, not root
thats the problem
but that doesnt matter, what matters is what is written in fs metadata
but linux maps uid 0 inside the container to your user's uid on the outside
so what's written in the fs metadata is actually different depending if you look at it from inside or outside the container
at least if you look at it through linux apis
the actual values written there are what you'd see outside the container
if it didn't work like that it would be a security issue
what you can do is just adjust the ownership of the files when you pack the initrd
and no it's not just a Jinx issue, it would be the same with xbstrap
unless you run it as root
Yes that is correct
but you pack the initrd inside
and then no problem
or with fakeroot which is equivalent
^
I ran into an issue with sshd because of that, it expected the chroot dir it used to be owned by root which made me have to go and chown it every time I first ran a disk image
Gloire manually runs chown -R root:root on the sysroot as root for similar reasons
but yeah you can also pack the initrd in a fakeroot as pitust said, assuming you use an initrd
I was going to do that as I barely use the initrd to test in my machine since its faster to just boot from disk if Im doing some random testing
fair
That as in what gloire does
i mean there is no other way
other than running as root
unless you manually edit the filesystem inodes from userland to be all root
:^)
maybe guestfish can do something? idk
but guestfish is an abomination
its also possible that whatever tool you used can do that
mksquashfs can, idk about mke2fs or tar
good for you
;)
Ty
You can now ssh into it from the other side of the world (and do anything because theres no separation between users)
woah
thats actually rlly cool
must have taken a lot of work to get working
It was mostly having a working tcp impoementation
Also theres a web browser.now that works for some pages
bro is the definition of "diy"
I just hope that the OS doesn't turn out messy out the other end like (iirc) SCAL/UX was
its already messy 
eithre way
boom thats one bug fixed, no longer dies because of the page refcount
lets see how far into gcc compilation this goes
waitpid deadlock memes at the end of intl configure
does astral say, boot on real hardware?
I tried once like last year and it got to a bash prompt but the keyboard didn't work
I should try again someday
I think I already know whats happening and it should be an easy fix
just some lock ordering oops I did in my signal code
I'm gonna leave it building gcc while I go out for lunch
it began
anyways hopefully it doesn't crash and burn when I come back
oh lol
ill take this as a challenge on managarm
Configure won’t work without at least one hack I have locally and something something fcntl.h check
tar -xvf also fails with weird EBADF errors?
that's honestly really impressive matt
I, for one, could only dream of getting to that point
so to speed that up
I'll stop talking for now
I'll be back
i'd love to run astral on my laptop
still not able to install it to disk sadly, I need fat32 so limine can be installed
works now
time to go through all of the 70 system calls and switch what they use
I'm curious, is xhci super difficult to implement?
cc @wild marsh
conceptually not really, but i've been having trouble getting stuff working on real hardware
it's just a bunch of ring buffers for submitting commands and transfers and receiving events (incl completions), and some context data structures that hold the device and endpoint states
most recent struggle, after fixing some other stuff, is usb hubs
xhci itself is pretty simple, i was considering implementing it in astral for a while but i couldnt really find any motivation to read and learn the codebase lol
i think the hard part is making it work with different controllers on real hardware
but that might just be because my scheduler is absolute dog poop, the xhci driver did seem to work fine for the most part
usb is pretty simple too, it just builds on top of xhci and it gives you so much for free basically
i mean linux defines like 46 quirks for xhci :^)
well you probably want to build a nice abstraction if you want to add ehci/uhci/ohci support
yeah, s/xhci/hcd basically
dont they work pretty similarly? i have not looked into anything else at all so i wouldnt know
well for the older ones you need to build the schedule for packets to send within a microframe yourself
and for ehci you need to manage generating split transactions for high speed usb hubs
thankfully xhci manages that on its own
run curl http://ascii.live/can-you-hear-me
gimme a sec I'm making execve work with copy from user
HTTP request sent, awaiting response... 417 Expectation Failed
2024-06-09 18:33:06 ERROR 417: Expectation Failed.```
I get that with wget
On astral?
Oh lmao
I really should get around to seeing if I could unassert a few wtranscode errors like someone else did in another function
it gets really close to being done but it doesn't actually get done
based
doing it without passwords and passing the user on the command line does work (with some hacks)
debug logging is elogind for session management
with the sysconf pr you're now able to actually pass the login user in the prompt
only if we implement cooked mode I think 
oh lmao
and hopefully with me handling the illegal_input mbrlen error thing it should be able to log in with a password
based
I patched pam to just ignore password and return ok 
but that's only because input is fucked
based tbh you can't be hacked if the system is public anyways
I want to fix it but I have negative braincells so idk how well that goes lol
hm
idk how this wchar stuff works
well thats fun
uhhh
making that return an illegal_input instead of an assert failure kinda worked
and with kinda I mean
wtf is this bash prompt
I'm still root uid though since I don't have a setuid or anything like that
maybe its that
this is really weird though
it seems like its not being treated as a login shell
i suggest reading the patches/recipes/extra files from Vinix
lemme see
Seems like it indeed
still doesn't explain the weird bash name
in xterm it works
maybe that wchar stuff gets called from bash and not from login
yeah bash is the one that calls mbrlen etc
gonna compile bash with the vinix configure arguments and see if that helps
ah well whatever
I'll look into this tmr
Im a pussy and I really dont feel like debugging bash so Ill drop this login thing for now and instead go fix some things I have on my backlog and work on fat32
i remember having a similar issue on linux but i dont exactly remember how it was fixed
does it ever segfault for you when using login?
Nope, all that happened was a wtranscode error
That I patched out
I genuinelt have no idea wtf bash wants from me, I think its thinking its own name isnt just ascii or smth
well atleast you know it works x)
I'm thinking of buying a domain and a vps or something to host the packages for astral once you can install it to disk
tho I have no idea how that stuff works since I've never looked into it too much
other than buying a domain a few years ago because I was going around a bit and wanted to ssh to my computer at home
why dont u just set up a basic https server that reads off package names on a request, and then returns it's address link where then the pac man would just download off of
the issue mostly is the hosting part of things, I could self host it but I really don't feel like exposing my home network that much nor do I have any spare machines to leave on 24/7
with that out of the way its just a matter of doing it
you could buy a simple server, the other problem would be the pricing, but for a simple server I think that it wouldn't be that expensive
which provider though
I searched in this server and one called "tornado vps" caught my attention
idrk atp I'll probably leave that to future me
@fervent fjord are you still using this and is it worth
I can barely find anything about it online
future you will remember u...
then that's not a good sign, usually something more known will be more reliable
yo @grand shadow did you need to recompile the WSL kernel for KVM to work?
nope
huh
how did yall get kvm working then
I tried adding myself to the group
and staring up the virt manager (and what it needs)
but it still didnt work
and checking with kvm-ok it said my CPU didnt support it (it ran fine on linux)
yeah why does it need to do that
probably for the astral gcc toolchain
oh wait, u run windows 11 right?
yeah my laptop uses it
oh that's why
windows 10 doesnt support nested virtualization
dang
I might need to reinstall windows 11 or just dualboot
(I don't have much space for dualboot)
😭
its neat yeah
?
how come
im pretty sure it does
I tried enabling nestedvirtualization on .wslconfig and when WSL started it said "This machine does NOT support nested virtualization"
and running kvm-ok it said "this CPU does not support KVM run with sudo for more info.."
it blamed your machine, not windows
the problem being that my machine supports it
oh, very bizarre
and other people facing the same issue on gh reported it
and most answers were that windows 10 doesnt support it
apparently you could enable it using windbg
but it's not safe
I saw you were running ironclad there and that caught my interest, I will be checking them out later
yes, the problem was windows
I did it
I'm gonna see if I can download a minimal chroot with bash and dependencies
What is links exactly?
a web browser
Does it load youtube
don't think so
What can it load
it could load github
it doesn't load a lot of things and what it does load is us quesitonable
also rip
got close
Allocator bug?
hmm
double free
might be some vnode refcounting memes
well the download part of it worked lmao
averaged like between 600 and 700 kb/s
not that good but better than 30 kb/s
install fortnite next
well I added an assert (
reference) to my VOP_HOLD to see if I can catch that the first time it happens
Lol
Time to get my ass back on track again today
I got a list of todos from the source and I will try to do at least half today
My friend is also making a simple landing page for astral-os.org because I know nothing about web dev
@grand shadow question, why aren't you popping FS and GS here: https://github.com/Mathewnd/Astral/blob/rewrite/kernel-src/arch/x86-64/isr.asm#L54
Also perhaps you should have your ISR handlers be like:
isr_X:
if x != 8 && (x < 10 || x > 14)
push qword 0
endif
push qword X
jmp isr_common
isr_common:...
My gs and fs are always 0
Yeah true
It was one of those things that has been on my todo list for so long but it has never mattered enough for me to do it
Ill add it to the list of stuff I wanna do today tho
Im gonna work on a bunch of stuff I left behind before I do fat32
its so easy tho
and it saves quite a bit in binary size
So then why preserve them
In case something corrupts it and completeness sake I guess
I guess I'd also make sure that ds and es are the kernel data segment before you enter the interrupt ISR
Oops yeah I think I forgot that
I guess it never really mattered that much because all my checks are done on the cs
It's not about that
It's about using the CPU in an inconsistent state I think
Maybe it doesn't matter if DS and ES have a CPL of 3 while CS and SS, a CPL of 0
but for completeness
Is Astral cursed on the inside
i.e., bugs that are pretty big, but a worked around instead of fixed
I hope not lmao
I usually try to fix bugs when I find them
well those 2 fixes (the segment thing and interrupt code size) took like less than 10 minutes
goddamn if I werent so lazy
did you figure out the tar corruption?
and you guys say my kernel is cursed ||(it is)||
is the tar corruption
for the ramdisk?
.
still haven't tried to reproduce it
I probably should soon
I am just lazy (and work has been taking up quite a bit of my energy)
You don't have to constantly work on the same project, that's fine
I should port an irc client
unironically
oh my god yes that's awesome
i genuinely look forward to the day i can use astral on my hardware
like, today then
smp would be nice, but beggars can' be choosers
it does have smp
well, bugless smp, i suppose
iirc there's still some problems with the current impl
you can pass nosmp to the kernel commandline in limine and it will boot without smp
the biggest smp issue rn is that my tlb shootdown is painfully slow
and some things still arent 100% smp safe and racey
oh fuck yeah, well i'd love to check it out then
Port hexchat. Port GTK2
perhaps...
fixed the certificate memes finally
I do wonder if it could post in the osdev forums, it can log in and navigate around just fine
haha wow, very nice
is there anything in specific you needed kernel side for webkitgtk
well sysdep side since managarm is a microkernel
when I stop being lazy and fix a race that affects like 90% of the files in the kernel and make the tlb shootdown not horrible
funnily enough some of the stuff I had thought were smp bugs were just my scheduler doing an oopsie with the stack
that also happened out of smp but were more common with smp
SMP is surprisingly the most stable thing on OBOS
it just adds thrill to the computing experience
guess the least stable
(difficulty: impossible)
allocator....
I want astral to be self hosting enough to be able to:
open osdev wiki on browser
follow barebones from compiling an i686-elf gcc cross compiler cuz why not
run qemu and the barebones and post in #osdev-misc-0 asking how do paging
if you manage all of this im donating 10€ to a (good) charity of your choice
he just has to remember the (good) part
by good i mean morally decent if that makes sense
Bet
Before I add new things I still gotta finish my todo list though
Tomorrow Im gonna go after 2 of them where a thread does nonstop yield waiting for I/O because my old event thing was bad, so Im gonna write another one that doesnt suffer from that nasty lost wakeup
Its gonna be more general than the poll system thing
So just an attach etc
More specifically when its waiting for a page to be ready in the page cache and waiting for an arp response lol
Well, considering I always lie to the programs and say that (if needed) just use Linux code paths, probably some Linux stuff if you follow that route. I know we had to do some netlink shit cuz glib. I know there is a BSD backend which uses a different interface. I know I told GTK just assume we’re Linux, which means you may or may not run into some memes there too. My advice? Just try it. If you want to be Linux like, there is a good chance you’ll need some of the following (list is in random order and not guaranteed you need anything from it, list might be incomplete): eventfd, timerfd, signalfd, inotify, netlink, DRM. Most, if not all, can probably be substituted for something else, if you claim that you aren’t Linux but more like a BSD for example. Best way to find out is to try
Does that also count if Managarm can do it?
Cuz the only thing in this list we can’t do yet is compile GCC
Qookie wrote a bootsector on Managarm and ran it in Qemu, I have had discord conversations from Managarm
Free tip, GTK and friends (especially GTK3 and 4) really like their mime database (shared-mime-info, run update-mime-database /usr/share/mime). Oh and GTK kinda wants to refuse to run as root? I patched that check, might want to borrow that patch
Sure
shadow really doesn't like it when you don't have a valid shell
seems like the weird bash name isn't in bash but rather in login, makes things easier to debug I think
I wont have to read bash code
so it could be that exec
what the fuck?
this can't be right
am I going insane or
I think this was supposed to be argv[0] = argv0?
idk
actually wait
lemme try thios
this was taken from musl so it must be right
gonna see whtats in that argv[0]
yeah no this is wrong
from musl source
fucking hell
another mlibc bug it seems
yeah
that was why bash was acting all weird
execle is broken in mlibc
be the change you want to see™️
Has been merged for like 10h already smh
lapfed slow as usual 
My list of things to fix is getting smaller, soon I will actually be able to progress again
woohoo!
soon™️ or actually soon
if I stop being lazy soon otherwise soon®️
skill issue tbh 
I've been working on the same project daily for the past 2 months or more, I don't even remember anymore
legitimately not 1 day that I haven't worked on it
I don't think this is healthy
I did that too for like 3 months until I ported openssh then I kinda burnt out a bit
now I'm just slowly grinding away at a todo list of random fixes and improvements
did a thing
I should try to compile it 
well the kernel
jinx Is Not Going To Work
oops yeah its missing flanterm and stuff
but hey git works
oh fuck yeah, nice
damn
still another step towards self hosting, which would be pushing its own code into the internet
I don't know if pushing works and I'm too lazy to configure the credentials and stuff
I will only consider astral truly self hosting once I can compile gcc though
because what good is for that it can compile itself if it cant compile the tool to compile itself?
I worked on it years ago. Back then, netstack was the biggest issue. So no, technically we don’t, but I’m pretty sure it’s a recompile away. Minor fixes at most (at least for git clone). If I dig I can probably find screenshots of git doing stuff
Yep. Got a screenshot from the 15th of April 2021 running git log
#678608576151027734 message
Still, getting git clone working is massive for self hosting. Amazing job
ah nice
Quake and doom on x11
Based
What syscalls do you need to support X11?
the astral kernel
so it has its own
yep
wow
it is the traditional fashion here to make our own kernels
though maybe someone could legitimately do something on top of Se.L4
or w/e
port astral to the 68k
the core of it is giving it somewhere to draw like using a xf86-video-fbdev driver and a way for applications to talk between them and the server like unix sockets, so a good enough posix support w/ the socket stuff gets you a long way
what did you use for nanoshell
or you can just not even have the X server be on your os and do it thru the network like god intended 
they would need an n64 emulator
sm64 has been decompiled and that has been ported to various other platforms
i think it just needs sdl2 and opengl?
or something thereabout anyway
I don't have mesa and I'd need to port llvm for that and I wanna fix up some other stuff first
can it run QEMU?
Idk never tried it
qemu should be simple enough i think
on the outside you might want sdl2 or gtk for the ui, on the inside it wants pthreads
and it does some signal trickery (sigaltstack + sigsetjmp & siglongjmp) to switch stacks for coroutines but that's also not that bad
why llvm?
llvm-pipe
Ah I should have everything then I think
The software renderer made by "fgsfdsfgs" for his DOS port
great name
I do wonder something
eventually I will need a better init system than just running a shell script at boot and all
how easy would it be to port openrc, hm
its not something I really need atm (or for the close future anyways) but I am curious
why not s6 or upstart?
chromeos uses upstart fwiw
runit, perhaps?
Cuz Ive always used openrc and it really doesnt matter enough
What's an init system do other than launch the shell
Make init a symlink to bash smh
reap orphans
I assume orphans that exited right?
Depends how one defines it
Will discuss when home
well, yeah
usually it also deals with service managment
because some services always orphan themselves
and so you have to be pid1 to get a notification
Pretty sure mlibc can (almost) run it
I should try that under LFS
I wonder if it can run my "debugging init"
give me a sec to clean it up so it has a chance, and I'll drop it here
this is much more a test of how much of a generic userspace you have and less of a C library test (it's literally a script), but still
made this to get some info as to why somebody's OS wasn't booting for (non-osdev, it's Linux) project I maintain, just to gather some basic system info
cleaned it up a little for here, since I threw it together in like 60s over there
and it was meant for recording the screen with a phone camera, hence reading stuff out slowly
curious to see what they all give, since I know neofetch was being pretty funky in regards to RAM, and didn't even list a CPU on Astral last I saw it
gonna try it
actually wait
free -h doesnt work, I don't have /proc, I don't have dmesg, I don't have an /etc/os-release
i don't think /etc/os-release is necessary
but procfs is definitely something you need if you want neofetch to pick up your cpu/memory info
yeah I will have to look into it sometime
