#OBOS (not vibecoded)
1 messages · Page 42 of 1
no such thing, i told myself that once upon a time and i rewrote because of it
nahhh

that will just be small refactor 4
after small refactor 3 for smp
which is after bash
i think im gonna do x2apic support
Don’t do it like me and make two separate drivers for it

I mean I did it because I chose to
I very well could of done it differently but I wanted to make it branchlesser
for some stupid fucking reason
nproc doesn't work with x2apic enabled
what
nproc doesn't work anymore
how sad
anyway
Faster than 130 bytes per second 
no obos gets download speeds from 50k-300k now
I think my pc's cpu hates me
lack of support for new cpus is one reason why I want to rewrite the x86 backend
wish me luck
@dense vigil
dev->base = map_registers(dev->pci_bar->bar->phys, dev->pci_bar->bar->size, false);
P,GFSDLP;KLSD,;L'
SKDJFOLP;DSKF;LSWED\
OMG
i map the bar cacheable
fsdk;lfsdmn;fswd
im gonna sprinkle in some mfence and wbinvd instructions
this was all to no avail
Mark it not cacheable instead of using thoes?
wha...?
yeah I marked in noncacheable
did nothing
im gonna do the same to the TRB rings
Lmao
on x86 mmio is made UC via MTRRs
and dma should be cache coherent
maybe the compiler is reordering trb writes with the doorbell ring?
I did add a asm volatile("mfence;wbinvd" :::"memory") before writing the doorbell and that didnt seem to change anything
that should theoretically be a memory barrier and also it should at least flush the cache if dumb shit happened somehow
of course i could also check to see if the writes during initialization are in order
at least get that out of the way
what problem are you experiencing in the first place
the controller isnt seeing any of the command ring enqueues/doorbell references
it works on qemu w/ xhci pass through, but not on that same hw
is memory decode and busmastering enabled in the pci config register
I enabled bus master and irq
but not memory decode
uh nvm I enabled memory decode
dev->dev->resource_cmd_register->cmd_register |= 0x6; Drv_PCISetResource(dev->dev->resource_cmd_register);```
I still don't like that naming scheme 💀
neither do I but im stuck with it now
but also
Patches are cheap, send talks
cheap is talk, send are
infy what do you think about these download speeds
https://cdn.discordapp.com/attachments/1417088322949480478/1465467880056422461/image.png?ex=697dd411&is=697c8291&hm=a80fe2915848d2cd6c90d4abfdb35a500aac7a60452f5578fd2c614bad34fa2d&
lol
am i right in thinking your packet send from tcp context is synchronous?
i had a brief click through the incoming packet handling code
I haven't pushed the new code
and it seemed that sending ack for instance will ultimately wait synchronously in NetH_SendEthernetPacket
oh thx for pointing that out actually
if iirc, its waiting for the irp to finish, right?
yes, in
VfsH_IRPSubmit(req, &nic->net_tables->desc);
VfsH_IRPWait(req);
i do this entirely asynchronously (in fact right now i don't even do tx packet queueing at all) and it doesn't even matter if the packet doesn't get sent since the retransmit timer will handle it
fadanoid do you think it is a good idea to only send an ACK after having processed all available packets
cuz rn it sends a bunch of ACKs for small amounts of data and im not sure if thats a bad thing
generally reasonable
if you do delayed acks eventually then that would call for something similar
but still probably reasonable to try to ack after every 2 full segments
delayed ACKs improved consistency in download speeds
before speeds would fluncate a lot
now they are consistent
Btw @flint idol the intel simics logs whenever USB has a spec violation
And for other violations too
Under personal NDA til I finish using it to implement feature
Because I wana be first
Il tell you though later
And it’s free
just found it
don't even bother
it's fucking terrible
I rage quit tryna get it to work lmao 😭
and i also think that curl is giving me completely wrong download speeds
cuz if i downloaded 5933k of data in 28 seconds, then that should mean my download speed has an average of 212k/s
but curl says 52k
for avg download
it's probably because i dont implement any socket options
no it's because my timer source for userspace is bad

207G download speed, everyone switch to obos
Not try it over real network
whats a real network never heard of it 
Amazing download speed
im getting the gist of it, not really that hard
im absorbing rfc9293 rn
and apparently my sequence numbers are not to spec
I just use an rng
but apparently it should use a monotonic timer combined with some sort of cryptographic hash that is computed with these parameters:
ISN = M + F(localip, localport, remoteip, remoteport, secretkey)```
well it only requires the monotonic timer
these diagrams are making me laugh idk why I might be going slightly insane
when i think of a RST in TCP I always think of it like one tcp peer telling its peer to go kill itself

yooooo I got some data for you
<who tf are you??? RST, go kys
also TODO: congestion control for TCP
CHAT
i got my final marks back for hte semester
93 math 😔
95 music
85 "geography"
90 english
anyway
i think i know how im gonna celebrate this 
[REDACTED]
oh and maybe a bit of || ||
If you don’t need FRED it has some faster albeit older CPUs you can emulate
But it’s a completely different command

guys
i was diagnosed with silly window syndrome 😔 (elite ball knowledge required)
||The "Silly Window Syndrome" (SWS) is a stable pattern of small incremental window movements resulting in extremely poor TCP performance. Algorithms to avoid SWS are described below for both the sending side and the receiving side. RFC 1122 contains more detailed discussion of the SWS problem. Note that the Nagle algorithm and the sender SWS avoidance algorithm play complementary roles in improving performance. The Nagle algorithm discourages sending tiny segments when the data to be sent increases in small increments, while the SWS avoidance algorithm discourages small segments resulting from the right window edge advancing in small increments.||
A TCP implementation MUST include a SWS avoidance algorithm in the sender (MUST-38).
blah blah blah ill do whatever i want rfc9293
yeah i cant lie my tcp transmission code is deeply fucked
i bet RFC writers tell scary stories about my tcp implementation around a campfire at night
"congestion? whats a congestion, never heard of 'em?"
to debug my loopback device on obos
i am going to do smth insane
im gonna use wireshark's ability to use stdin for captures
then im gonna make obos
write a PCAP file as it sends packets on the LO device
of course where will it write this pcap file?
it will write it onto serial
and serial will be routed to wireshark
through the stdin thing it has
```c
static bool lo_sent_file_header = false;
if (!lo_sent_file_header)
{
struct {
uint32_t magic_number;
uint16_t minor;
uint16_t major;
uint32_t resv[2];
uint32_t snap_len;
uint16_t link_type;
uint16_t flags;
} OBOS_PACK hdr = {
.magic_number = 0xA1B2C3D4,
.major = 2,
.minor = 4,
.snap_len = 0x40000,
.link_type = 1,
.flags = 0x5000
};
write_to_serial(&hdr, sizeof(hdr));
lo_sent_file_header = true;
}
struct {
uint32_t tstamp_sec;
uint32_t tstamp_usec;
uint32_t captured_packet_length;
uint32_t network_packet_length;
char data[];
} *record = ZeroAllocate(OBOS_KernelAllocator, 1, sizeof(*record) + pckt->size, nullptr);
record->network_packet_length = pckt->size;
record->captured_packet_length = record->network_packet_length;
record->tstamp_sec = get_current_time();
record->tstamp_usec = record->tstamp_sec * 1000000;
memcpy(record->data, pckt->buffer, pckt->size);
write_to_serial(record, sizeof(*record)+pckt->size);
Free(OBOS_KernelAllocator, record, sizeof(*record)+pckt->size);```

nice it worked
ok this actually kinda slaps as a setup tbh, ill have to keep the idea in mind for when i do networking
obos doesn't ack the last packet it sent to itself
```c
// Released into the public domain
static bool lo_sent_file_header = false;
if (!lo_sent_file_header)
{
struct {
uint32_t magic_number;
uint16_t minor;
uint16_t major;
uint32_t resv[2];
uint32_t snap_len;
uint16_t link_type;
uint16_t flags;
} __attribute__((packed)) hdr = {
.magic_number = 0xA1B2C3D4,
.major = 2,
.minor = 4,
.snap_len = 0x40000,
.link_type = 1,
.flags = 0x5000
};
write_to_serial(&hdr, sizeof(hdr));
lo_sent_file_header = true;
}
struct {
uint32_t tstamp_sec;
uint32_t tstamp_usec;
uint32_t captured_packet_length;
uint32_t network_packet_length;
char data[];
} record = {};
record.network_packet_length = pckt->size;
record.captured_packet_length = record.network_packet_length;
record.tstamp_sec = get_current_time();
record.tstamp_usec = record.tstamp_sec * 1000000;
write_to_serial(&record, sizeof(record));
write_to_serial(pckt->buffer, pckt->size);```
feel free to copy the code i sent above
if you ever need to debug ur network stack on ur loopback device
thanks
he was forced to debug optimized C code
oh fun fact ig
obos' loopback device
is slower than receiving the data from a remote server
ig that's just my tcp implementation, maybe
address unreachable
it crashed 
shit embed fail
for future reference:
sudo firewall-cmd --permanent --zone=public --add-forward-port=port=8080:proto=tcp:toaddr=192.168.1.2:toport=80
weird crash
it page faults trying to execute a null fptr
but dispatch dpcs doesn't call any function ptrs
nor do any of the functions it calls
and it faults sometime while calling Core_SpinlockRelease(&target->dpc_queue_lock, oldIrql);
while this does call lower irql which
dispatches DPCs
it makes sure dpc->handler isnt null before calling it
so that can't be it
the only thing i can think of is a weak function called somewhere
i decided to make a core dump of obos in qemu at the time of crash on the vps
and im gonna examine and see what exactly happened
it is 952 pm
time to implement congestion control
time to read rfc5681
i feel so sophistocated when i read RFCs
:>
good luck
thx
man this is complicated
im understanding it but this gonna be difficult to implement
might need a small rewrite of the tcp transmission code
rfc9293 my beloved
before i do congestion control im gonna implement some mitigations for attacks described by RFC5961
virus
website is literally down smh
try to host some page from obos and ddos it with replit or something
I can do it from my grandmas house

It would be limited to 100mbps
Which for OBOS
Is like uhhh
A neutrino bomb
I would use an HTTP stress testing util
So I could tune it or some shits
It’s what I used to test my HTTP server impl in HRMR
(This was over WiFi ti my desktop iirc)
(And the HTTP part was using the thread pool and it kept up really well putting tasks on the queue and having the threads take them and deliver them to the epoll loop and shit)
a vps with less than 1gbps bandwidth is criminal
tbf idr what im paying for
all i know is that im paying 10 bucks a month and sshing into the vps is painful
yeah 750mbps out
I know some VPS providers that may be better
They give me 10gbps

3.50 a month
For 1gb ram
Though they always out of fucking stock
also how is it possible to boot custom OSes on a VPS?
idk
but i just used a vm on the vps to host an http server on obos
They enable nested virtualization on yours? Or are you running it on qemu tcg
qemu tcg
Ah
once I fix my tcp transmission code and I get congestion control
and fix some instability in my tcp thing
I will be bringing the obos webserver back up
and hopefully I can uncover some bugs/vulnerabilities with obos
I also might add some watchdog timer to obos so that I dont need to manually reboot that server when it crashes
would be nmi powered, if after like a minute the userspace doesnt write a byte to the device, it will reset the kernel with a triple fault
set CR3 to 0
That’s not a garuntee
Something could be there
Making the IDT limit 0
Will certainly always crash
#ifdef __x86_64__
UACPI_ARCH_DISABLE_INTERRUPTS();
// Try triple faulting.
struct {
uint16_t limit;
uint64_t base;
} OBOS_PACK gdtr = {.limit=0x18-1};
asm volatile ("lgdt (%0); mov $0x8, %%ax; mov %%ax, %%ss; push $0;" : :"r"(&gdtr) :"memory");
// We should not be here anymore.
OBOS_UNREACHABLE;
#endif```
this is what I do if acpi reboot fails
in OBOS_Reboot
ill also do this in the watchdog trip function
i fixed some bugs in my tcp transmission code
now it actually respects the MSS
and it also now sends packets properly
and retransmits packets properly
i think it retransmits packets properly
what kind of shit is obos smoking 💀
my requests are timing out 😔
```
Flags [S.], seq 13167384, ack 1832486055, win 65535, options [mss 1460,[bad opt]]
idk who's sending this bad packet
now while obos is probably handling it right
idk why it hung
it should work again
i will continue working on my kernel in the meantime
RCE on oberrow computer because of crappy obos net stack 
hold on that server will be down for a bit
i need to make sure that no packets are retransmitted if the connection is reset
at least it works
did u try it
yes
ur vpn put you in finland i think
hm wait
i think someone was somehow trying to get obos to send a challenge ACK
as they established a connection, only up to SYN-RECEIVED
then tried to send another SYN
idk im just trying to connect to it on my browser
and i am in finland
so probably me
your thing is sending obos a SYN
obos sends a SYN, ACK back
then your thing never ACKs it
and instead sends another SYN
which according to RFC5961 is a type of attack or smth
the another syn could be me refereshing the page
nah it would use a different port number, most likely
yeah right
and here it's on the same port
ah nvm i think i see a problem
yeah that's it
i misread my packet dump
obos isn't seeing the ACKs that are sent back
and it's also not seeing the RSTs that are sent when your thing gives up
which means
it's a bug with my e1000 drive
r
that's causing it to drop packets
while indeed this is a bizzaire bug
i think i have found the cause
anyway that server should be back up
someone just downloaded /home/obos/.bashrc
how exciting
some1 just downloaded test.sh
this is quite exciting
wow obos is getting crawled by web spiders
and fun fact
as soon as you send a link in discord
it crawls it
this was right after i sent a link to this on discord
given the timing that's probably discord's embed generator
ah
it got through the first 0.7MiB, said the download failed, when retrying got to 1.1MiB, failed again and now it's refusing connections
well you just found a bug so i will be generating a core dump and rebooting
my new favourite qemu monitor command is dump-guest-memory
it gneerates a coredump file using the guest memory
anyway that server is back up
im looking at the core dump, and that connection is in FIN-WAIT-1, which i find interesting
did you so something to the e1000 driver? i can now access it on my phone. i also did change to better network so that could be it too
yes i fixed a bug that was causing it to lose packets in the rx queue
someone managed to find a bug on obos
they were using a vpn
this screenshot doesnt show it but obos would continue retransmitting SYN, ACK packets after a reset from the peer
it's still alive
oh yeah
transmission is kinda broken so there is a non-zero chance it wont work
ah
especially for big files
that'll be fixed once i do congestion control
that was so close lol
at least it didn't crash
its great yeah. if you pass the p flag to it it generates an ELF with sections set up to show you the arrangement of virtual memory too its great
208 kb
downloading it worked for me woo
it definitely would make sense if this were a congestion problem
one of these days ill get networking up and can have my os download things from yours lol
as im a lot closer physically to that server than you are
lol
i once sshed into astral from obos
it was an astronomical moment, truly
o it completed
lets go
damn now i have to implement a network stack and ssh into obos which will ssh into astral

if youve got a link you want me to try downloading from windows i can do that btw, dunno if anyone else ehre is using windows's network stack

try downloading the ahci driver
ah fucking hell
the kernel hung
wait a sec
it's back up now
dang
still sitting at that number
the entire web should move to obos ngl
lmao
yes
a) tcp transmission on obos is pretty bad b) the fact i have no TCP congestion control doesn't help that
lmao
obos pterodactyl when
obos can't even talk to another obos
I need to try downloading it on crescent 
do it
third time it worked\
damn
obos' network stack caused obos' network stack to crash
i would send a screenshot but some tcpdump logs got caught in the crash dump
rip
but anyway
that server is up after the crash
i should probably have this on a reboot timer
or add some sort of watchdog device
software watchdog through an NMI that happens every like minute idk
im gonna implement tcp congestion algorithms now
@devout niche what tcp congestion algorithms does fadanoid use, out of curiosity?
unfortunately i don't yet, but will implement reno initially
i see
there is no way lol
some malicious site tried to POST something lol
```
14:38:35.633057 IP srv-91-224-92-115.serveroffer.net.49316 > 192.168.1.2.http: Flags [P.], seq 1:71, ack 1, win 64240, length 70: HTTP: GET /cgi-bin/luci/;stok=/locale HTTP/1.1
smth else did this
```
14:38:54.423113 IP 192.168.1.2.http > 193.142.147.209.45378: Flags [F.], seq 1, ack 1, win 65535, length 0
and this is teh ip of another malicious server that tried probing at obos
lol
this is apparently supposed to exploit CVE-2023-1389
which is a bug on some TP-link router
i searched it too, this post request also might be malicious
TIL you're canadian
oh ew
what did canadians ever do to you
speak funny
are u american or smth
fuck nah
what are u
I just spent like 20 min figuring out why sys_socket_receive was returning ERR_INVALID_ARGUMENT just to figure out that sys_socket_create was never called due to it being inside an assert and me compiling in release mode 💀 but at least it kinda worked
lol
what is darkhttpd
idk stardust told me i should port a few months ago
i think cuz it was easy to port
it's written in pure C
may i ask what exactly happened here
did it download the file successfully or?
I think yes, I just tried to print the data
and the whole thing is doing a manual http get request https://gist.github.com/Qwinci/354fff9f850824d3ce1ebf9bbc4a099c
i see
best way to confirm is if you give me a checksum
of the file
and i can compare it against the actual file
ok that server is down for a bit
im fixing a bug where retransmissions of FINs would happen when they should not
anyway that server is back up
since i am procrastinating TCP congestion control im gonna port git
why not port my HTTP server impkenentation
oh wait it uses epoll 
well its more of a full server framework but would be neat to see lmfao
epoll is scary
i dont want to find out
yeah git does not work at all
it cant even initialize a repo
however, it was insanely easy to compile
currently actively implementing congestion control
im implementing the tahoe algorithm
with slow start and congestion avoidance
im not really understanding when and how the cwnd and ssthresh values should be updated
bah why does congestion have to exist why cant packets just magically make their way to the destination instantly
uh I need to change how packet enqueuing works
as the sequence numbers are completely messed up sometimes
which is why more often than not people would get incomplete downloads
the bug is currently that snd.nxt is not moved when it would go past the send window edge
which is correct behavior
but the push data to remote function
doesnt account for that
nor does the retransmission timer
what should happen is that assignment of the sequence number should happen when it actually transmits the segment
How does cogestion work
congestion happens cuz a network is overloaded
congestion control is tcp's best attempt at not overloading a network
how this is done varies by algorithm
but you generally have one variable in the tcp state that is called the congestion window
the tcp is never to send more data than this congestion window can handle
how the congestion window is managed differs by what algorithm is used
but in the one I am doing, the initial congestion window is initialized through the value of MSS
and it also has another variable called ssthresh
which is the slow start threshold
the ss threshold starts at an infinite value
and is modified at a few points
which i forgor
Interesting
ill explain how this algorithm works once im back at my pc
as im new to how this works
u can read rfc 5681
for a description of some algorithms
essentially
this algorithm says congestion happens whenever the tcp has to do a retransmission
and when congestion occurs, the congestion window is reset back to its initial value on SYN
and the slow start threshold is set to congestion window / 2
(and this happens before teh congestion window is modified)
the congestion window increases whenever an ACK is sent by the peer
and by what degree it increases depends on whether the tcp is currently using slow start (i.e., congestion window < slow start threshold), or congestion avoidance
iirc the slow start window is normaly 14kb? and thats why your site is good to be under that for most cases
this sounds way more fun than debugging xorg race conditions for 3 weeks
uh no
in the case of slow start, it is increased by min(bytes acked, mss)
otherwise it is increased by this formula: mss * mss/cwnd
https://endtimes.dev/why-your-website-should-be-under-14kb-in-size/
this is there i saw that 
as someone who has debugged xorg race conditions
it is
a lot funner
it depends on the algorithm

in the slow start algorithm it starts based off this:
```c
if (con->state.snd.smss <= 1095)
con->state.ciw = 4 * con->state.snd.smss;
else if (con->state.snd.smss <= 2190)
con->state.ciw = 3 * con->state.snd.smss;
else
con->state.ciw = 2 * con->state.snd.smss;
genius

it can still happen on one core
thats why you set race_condition=false
its the magic bullet
just like how c++ is the magic bullet for shotgunning your leg off
usually smss is 1460 bytes
so the congestion window starts at 4380 bytes
weirdly
there are attacker IPs that send a SYN to obos
and obos SYNs back
but they just RST back
idk if this is a port scan
or if they're tryna abuse a CVE
it's quite weird
btw i fixed that bug
wasnt congestion control or anything
my tx code had a bug i hadnt noticed yet
the obos server now has a build with experimental congestion control btw
nice
and it is now down because i need to fix a bug where RST breaks it
literally right as i hit the run web request button to test it lmao
obos, sees reset
must mean i need to retransmit SYN,ACK
hold on ill bring it back up
its back up
nw lol, just figured id try it
ok this time it went so fast i didnt even get to see output from invoke-webrequest
and worked
damn
u sure it actually made a request?
im looking at the kernel logs and it hasnt logged anything to do with congestion control
delete the file and retry to make sure it didnt like cache it or sm shit
same result, ima see if invoke-webrequest has some sort of verbose option to get speeds showing
which would happen if there was any connection
ah i just saw smth from tcpdump ur good
🎉
for some reason, this build seems to be less stable than the last one
as the kernel/web server stops responding to GET requests
after enough requests
ok i fixed that bug
it turns out when i was implementing some attack mitigations in RFC5961, I accidentally made the RST handling code drop the reset if the segment was acceptable
instead of if it is unacceptable
unfortunately, my congestion control algorithm seems to fold really easily
my computer sci class has a lot of pcs im gonna see if they will let me test obos on them
lol i'll be taking inspiration from that :^)
Did they let you
didnt ask yet
today im going to be fixing bugs causing the http server to break
no wrong im gonna be doing religion homework 
Make OBOS into a religion
Then do your homework on OBOS
Problem solved

what kind of homework is that??
easy homework
but homework nonetheless
in my schools religion class the teacher plays movies while we just use our phones
it's fucking pointless
lol
not to mention they're the same movies always
wtf is this crash
the faulting instruction is a rep movsb
the faulting instruction is nowhere near rdi or rsi
whats direction flag set to?
address*
0x210292 is rflags
let me check my bitfield
it's unset
btw quick question do you remember the CPUID thing for 1gb and 2mb pages
wtf is this doing
2mb are always supported
ill write it off as a tcg bug and get on with my life 
no such fault ever happens
who caresssssss
leaf=0x80000001, subleaf=0, edx, bit 26
ty
iirc
i still have many bugs to fix with tcp transmission on obos
yeah
it is i saw on sandpile
as a 16M file cannot be downloaded over a network (at least not on tcg?) without failing in some way
never knew checksum checks actually failed over networks
i thought that was a myth made up by big RFC to sell more checksum functions
tcg bug
send a bug report
talk is big dont send patches
btw i cant connect to ur website on my school wifi
my school blocks some github pages ips but not all for some reason
but hey they don't block my ip so
remember that bug u got
when u built obos
i was able to reproduce it
I reproduced it when trying to boot obos on a school pc in the comp sci room
had compilers pre-installed on it it was quite easy
and vs studio 2022
and obos already builds on windows anyway
then when I booted it on virtual box (also pre-installed)
I reproded the crash
I fixed it
the reason I couldnt reproduce it is because it didnt happen with ld, only with lld
the driver interface was trying to access the driver header's function table before applying the relocations
and the function table was nullptr before relocations
What was the fix
dont use the function table before relocations
why would it?
it wasnt calling any function in the ftable
it was just checking if one was null
diff --git a/src/oboskrnl/driver_interface/loader.c b/src/oboskrnl/driver_interface/loader.c
index 0e71a53..bea4473 100644
--- a/src/oboskrnl/driver_interface/loader.c
+++ b/src/oboskrnl/driver_interface/loader.c
@@ -163,12 +163,6 @@ OBOS_NO_UBSAN driver_id *Drv_LoadDriver(const void* file_, size_t szFile, obos_s
*status = st;
return nullptr;
}
- if (!header_.ftable.driver_cleanup_callback)
- {
- OBOS_Error("%s: Refusing to load a driver without a cleanup callback.\n", __func__);
- if (status) *status = OBOS_STATUS_INVALID_HEADER;
- return nullptr;
- }
for (driver_node* curr = Drv_LoadedDrivers.head; curr; )
{
if (strncmp(header_.driverName, curr->data->header.driverName, 64))
@@ -397,7 +391,10 @@ obos_status Drv_UnrefDriver(driver_id* driver)
driver->main_thread->free(driver->main_thread);
driver->main_thread = 0;
}
- driver->header.ftable.driver_cleanup_callback();
+ if (driver->header.ftable.driver_cleanup_callback)
+ driver->header.ftable.driver_cleanup_callback();
+ else
+ OBOS_Error("%s: memory leak! driver_cleanup_callback is nullptr!\n", __func__);
for (driver_node* node = driver->dependencies.head; node; )
{
// node->data->refCnt--;
this is the diff
tcp is driving me a bit insane
(have to get this off my chest im telling you today?)
((elite ball knowledge required to understand that
))
So it would check if it’s null then fuck up?
yeah
I’m on mobile and can’t read diffs
That’s just osdev 
yes
but elite ball knowledge is required to understand the 2nd line of this msg
ohoshahsbsheus
I get it now
i get it now
ill be redesigning my retransmission queue tomorrow
to be a buffer
and when data is ACKed or the retransmission timer is hit, it will try and send more data
more details tomorrow
after I play terraria
anyway the reason I am doing this
is because sequence numbers become weird and out of order because I managed to get the kernel to send them wrong
so how this new transmission queue will work is there will be infinite space like the rx buffer
and the semantics will be the same
but the consumer is the network stack
I would probably limit it to some sane limit no? So it can’t fucking overload the system?
Just limit it to like 16k max sized packets worth of space
and it will consume data whenever it advances SND.UNA and push that data
16K buffer sizes might as well be asking for terrible performance
in TCP
it should probably have SND.WND*2 size
It’s less than infinite?
u get terrible performance with small buffers
in tcp
as the goal with transmission is to send as much as the network and receiver can handle to maximize throughput
I’m not saying 16kb I’m saying enough space to fit 16 thousand packets of the max TCP packet size
Or is that like nothing
"max packet size" can mean a lot
it can mean the MSS (max segment size) sent by the peer
it could also mean 64K because that is generally the ip max packet size
1460 bytes or something right? Or MSS that’s what I was referring to
and that is generally 1560 bytes for an ipv4 connection
1460*
1460*16000 is a lot of bytes, realistically if i were to limit this buffer it would be double the amount the peer can handle (so send window * 2 bytes, which is likely around 128K bytes)

Still less than infinite so my point stands 
But yeah that sounds about right
Could even make it a 2mb page worth of buffer size?
And then have some TLB bonuses
and then im not sure if the retransmission queue will stay the same (i.e., a queue) but I will see
and hopefully this will allow for larger files to be sent as right now it is completely broken
and this buffer wont actually be the exact same as the rx buffer
it might have some more internal read pointers
which i will describe later
Nice nice
Is this a dumb idea I wonder?
I found out how to bypass my school's firewall
if i use curl --resolve
it completely bypasses it
only works on my site tho
Lmfao
unfortunately it only works on http
https I have found the firewall returns invalid certificate
I figure this is because they examine the http payload for the Host: section and also any other hints of the host (dns queries as well as hints in the SSL connection i think)
but --resolve makes it oblivious to the fact that im trying to communicate with an IP that it blocks
because all the http headers and everything contain the unrestricted domain on it
I should rewrite obos as a microkernel
all the cool kids are doing one

jk
maybe one day ill write a microkernel
the answer was yeah
cc @dense vigil u were wondering about this
what the tcp thing
no i have barely been home all dau
day*
didnt check yet
im gonna work on fixing obos real hw bugs and xhci soon
so I can actually have smth to show
when I try testing obos
I actually have found that obos doesn't boot on a 10th gen intel core cpu
in vbox
on hyperv
and yeah apparently im the only student he's met that has written their own kernel
(who would've guessed)
yo pog
hey if anyone wants ill also test their kernels if they send me an image
waiting until I meet a real osdev in real life
Let me get mine pushed with the VMA stuff
And generate an image
sure
I cannot wait til I get exit() working tomorrow 
too bad there aren't any osdevs i know of who live in Southern ontario
😔
mine doesnt have any way to get info out of it unless youve got outb 0xE9 atm or id send it
I wouldn’t mind moving to Canada lowkey
canadas amazing
A serial driver is really simple and flanterm can be bolted on very easy
i refuse to do serial unless im detecting the device properly and im doing this kernel as a learning project so no desire to use flanterm atm otherwise i wouldve some time ago
You can make the serial port a kernel cmdline argument
detect it with acpi
And probing is a form of detection
Move here
Imo
Or get me accepted into uoft or uwaterloo
thats literally what im currently working on 
i dont think i can help with that
but I think u could get in
toronto is so meh
tbh
uoft is excellent
im talking about the city
technically my bootloader does have display stuff so i could send an image but youd just stop getting feedback after exit boot services and my kernel ends by shutting down with uefi runtime services so itd probably just display stuff for a bit and then shut off lmao
oh yeah probably
its like rip off Canadian new york
Don't have the grades
probably will have to end up with McGill
Literally if I locked in first semester I would be fine because now my grades are really good
I see
That is, if McGill accepts me
I'm not sure if I wanna do CS or CE yet, and CE is more competitive
I'm not even sure if I wanna go to McGill, kinda dont wanna move cities but otoh it's a world renowned uni with access to a world renowned CS lab
I see
im not sure yet, but I am definitely aiming for uwaterloo or for smth good like that
CS?
yeah
do you think you have the grades?
im not old enough to know yet
if not then CE is less competitive apparently
I actually have not revealed my age in here yet
Aren't you applying this year?
I thought we were the same age
im 15 lol
but im definitely going to lock in because I want to get somewhere good
in the future
huh, I was sure you were like 17-18
nah
I always left my age vague
cuz when I joined this server I was underage for discord lmao
Waterloo requires near perfect grades and might not be worth it if you're not in it for the coop program, honestly a "good uni" isn't really that useful especially for undergraduates
💀
im 17 and i feel wofully under done here 
no i think im just a special type of tism or smth
(not actually diagnosed, just really hyperfixed)
lowkey i wouldnt bat an eye so
(i am diagnosed with the AAA package)
autism, adhd, anxiety?
yup
dang
The most impressive young guy here I can think of is andy
how old is he
but I haven't really seen him active for like 2 years
He's my age, but aero was pretty damn good when he was 14
nah it's normal to feel this way
But keep in mind people here are not representative of most developers
There's a heavy selection bias, and there's very smart people that will make you feel dumb even though you're still over average
You just gotta think about it optimistically and learn from them
i feel really dumb alot here 
i wonder where id actualy rank on some hypothetical global leaderboard
indeed
but then again i look at #osdev-misc-0
and realize
maybe im doing doing sooo bad

Well if you successfully enabled paging you're probably top 1% of this server statistically lol
i have userspace workin and doom ported with possibly the most janky mlibc port ever

using a bootloader that doesn't do this for you :P
lol
I meant loading your own page table
who need to exit when we can just hang yk
sure sure
though really?
ok this sounds more right, having paging enabled by the bootloader shouldnt count for that 1%
hell i wrote my own bootloader for my project and still have never actually manually enabled paging lmao
thanks uefi
Heck most people can’t even get a GDT
if u have done smp u have successfully enabled paging
i havent yet, keep putting it off lol
16 bit smp:
does smp need lapic
doesnt*
and isnt that only usable with 32 bit addresses
i mean x2apic tho...
well gg u got me there
can still have paging off i think? i dont remember for sure, i dont actually code for not-long-mode x86 lol
smp does not need paging enabled, no
unless of course it is long mode smp
or you are in long mode at all
in which case you obviously need to since long mode requires paging
you don't even need x2apic for that, you can just write a different base address to the msr
someone should make an SMP capable real mode os
also a todo for my init program is to initialize the utmpx entries
dont have to worry about TLB shootdowns that way 

my mlibc sysdep PR got approved
yo nice
also, i do know a project that has no paging/virtual memory at all but i dont know offhand if it does smp, dont think so
it has multitasking i know that much
damn
@flint idol so how’s that network stack coming along
its been merged for a few months.
well the fixing of TCP?
no progress since I described my idea of the buffer instead of queue
for tx
progress will continue sometime in the next three days
@flint idol what webserver did u use
darkhttpd
btw does astral have any webservers ported
Nope
um what happened on the 25th of january lol
AI scrapers
bruh
why is this legal
for fucks sake ive had ai scrapers on the goddamn obos web server
as in
the web server RUNNING ON OBOS
fsdfnsdo
OBOS will save it
#introduce-yourself message
OBOS is for the new world
im working on this rn
How many locks does it have
one
tx_buffer.lock
is how many this implementation
more locks than your entire kernel

cring
atomic flag better 
also feel like a clanker made this idk why
not architecture independant either
why would it need to disable IRQs
deadlocks?

the whole point of 'em are that they're interrupt safe
what
atomic_flag
isnt that a C++ thing?
no
oh right i have no stdatomic 
was added in C11
skill issue
ur using clang how do u even mess that up??
std atomic is nice
at least because you can just add std::atomic<sometype> and not care about it
i dont think i will
thats part of the limine C template

so people using the template afaik would have no stdatomic.h
unless u pass -nostdinc u will have it




