#AxeialOS, A Modern AMD64 POSIX Operating System

1 messages · Page 2 of 1

sleek mason
#

that's fine

#

but stil rust nooo

#

1000th message!

marble epoch
exotic ibex
bronze prawn
#

marvin just watching all channels for the menix mentions

neat sandal
sleek mason
#

why only 2 stars here but 12 stars and 3 forks on repo

#

😭

#

so ded btw

#

well, gotta fix a random triple fault...

sleek mason
exotic ibex
sleek mason
#

LESS GOOOO

#

finally fixed the gpf

#

now a pagefault....

#

well Thats simple fix just a NULL deref

#

SO CLOSE to stability

#

and fixed the timer stuff

#

like the redundant function to setup APIC timer, like one for APs and one for BSP

exotic ibex
#

bruh

sleek mason
# exotic ibex bruh

also i'm stress testing with like 100 different prio threads across 4-8 cpus

#

well that works

#

all threads get some schduling time... and wreaking fast

#

tho the loggers are MASSIVE bottleneck

exotic ibex
sleek mason
#

well it was surprisingly fast, so it mean my kernel is efficient

exotic ibex
#

hmm my kernel cant handle too much threads

#

havent touched for a while though

sleek mason
#

you kernel must atleast handle 100 - 500 threads. MINIMUM

#

ig make it less overcomplicated

#

your kernel is just...

exotic ibex
#

or maybe it cant handle creating

#

threads

sleek mason
exotic ibex
#

no, creating is slow asf

sleek mason
#

well how many thread it can handle before it blows up?

sleek mason
exotic ibex
#

which is 128

#

hmm

exotic ibex
sleek mason
exotic ibex
sleek mason
#

i use 256

#

i'm not sure, i only created 100 threads stress test, maybe 1000?

exotic ibex
#

ohwait

#

creating is not slow

#

it halts somewhere i think

sleek mason
#

how 😭

exotic ibex
#

should be around here

sleek mason
#

Oh nvm

#

i'm blind 😭

exotic ibex
#

me too also

sleek mason
#

it could be activate task

#

if it also uses spinlocks

#

and it acquiring the same lock, it may just deadlock

exotic ibex
#

this is the most unsafe code in my kernel

struct task_struct *spawn_user_process_raw(void *data, size_t len, const char *name) {
    struct task_struct *curr = get_current();
    struct task_struct *p = copy_process(0, 0, curr);
    if (!p) return NULL;

    strncpy(p->comm, name, sizeof(p->comm));
    p->flags &= ~PF_KTHREAD;

    p->mm = mm_create();
    if (!p->mm) {
        free_task(p);
        return NULL;
    }
    p->active_mm = p->mm;

    uint64_t code_addr = 0x400000; // Standard base for simple ELFs/bins
    if (mm_populate_user_range(p->mm, code_addr, len, VM_READ | VM_WRITE | VM_EXEC | VM_USER, data, len) != 0) {
        free_task(p);
        return NULL;
    }

    uint64_t stack_top = vmm_get_max_user_address() - PAGE_SIZE; // Dynamic canonical stack top
    uint64_t stack_size = PAGE_SIZE * 16;
    uint64_t stack_base = stack_top - stack_size;
    if (mm_populate_user_range(p->mm, stack_base, stack_size, VM_READ | VM_WRITE | VM_USER | VM_STACK, NULL, 0) != 0) {
        free_task(p);
        return NULL;
    }

    cpu_regs *regs = (cpu_regs *)((uint8_t *)p->stack + (PAGE_SIZE * 4) - sizeof(cpu_regs));
    memset(regs, 0, sizeof(cpu_regs));

    regs->rip = code_addr;
    regs->rsp = stack_top - 8; // Align stack
    regs->cs = USER_CODE_SELECTOR | 3;
    regs->ss = USER_DATA_SELECTOR | 3;
    regs->rflags = 0x202; // IF=1, bit 1 is reserved and must be 1

    regs->ds = regs->es = regs->fs = regs->gs = (USER_DATA_SELECTOR | 3);

    uint64_t *sp = (uint64_t *)regs;
    *(--sp) = (uint64_t)ret_from_user_thread;
    *(--sp) = 0; // rbx
    *(--sp) = 0; // rbp
    *(--sp) = 0; // r12
    *(--sp) = 0; // r13
    *(--sp) = 0; // r14
    *(--sp) = 0; // r15

    p->thread.rsp = (uint64_t)sp;

    wake_up_new_task(p);
    return p;
}
EXPORT_SYMBOL(spawn_user_process_raw);
exotic ibex
exotic ibex
#

for itself

exotic ibex
#

basically

#

dw i just dont have VFS

sleek mason
#

well, i have question, why not isolate processes and threads?

exotic ibex
#

i do

#

its just implicit

#

task_struct->mm and task_struct->active_mm is the identifier

#

i use linux concept

sleek mason
exotic ibex
#

but only from a user perspective

sleek mason
exotic ibex
#

my kernel just treats everything as "tasks"

exotic ibex
#

its user proc/thread and kernel proc/thread

sleek mason
exotic ibex
#

thats why mine is implicit

exotic ibex
sleek mason
#

because when i actually see videos talking about how processes and multitasking works in OSes

#

well treating them as "task" may centralize control

#

like unify

exotic ibex
#

i see

sleek mason
exotic ibex
#

though still cooking my MM again

#

gotta make sure its solid

#

btw i freaking port linux maple tree xarray and radix tree in one go

#

lmao

sleek mason
#

well if yall weren't aware i have community on discord

sleek mason
sleek mason
#

still 3 stars ⭐ nooo

sleek mason
#

yay 5 stars

sleek mason
#

stresstesting 100 threads across 4 CPUs, on REAL HARDWARE, super fast

exotic ibex
exotic ibex
sleek mason
#

ig very efficient and optimized

crimson raft
#

Make them malloc somthing calculate some numbers of pi and then free it

#

And maybe some other system calls PSP1G_pspTrollar

crimson raft
# exotic ibex good suggestion

If you’re doing dynamic memory management shit it’s gonna stress out your system. Make sure it’s large enough to make mmap unmap aswell too

#

And make sure you don’t have any deadlocks or race conditions there

#

That’s the main place I’d suspect them imo

#

Atleast where I suspect them happening to me PSP1G_pspTrollar

#

Also make the tasks last for 5 minutes and see how far they all got to check how fair the schedular is

sleek mason
#

also they are kernel threads

crimson raft
#

Oh PSP1G_pspTrollar

#

You should still make them do a bit of more work to properly stress test it?

sleek mason
#

to see if my MMs blow up

crimson raft
#

Malloc on composte

#

Free on prime

sleek mason
crimson raft
#

And if you hit a limit free all of them anyways

#

Like num % 256 == 0 do a free on them all

sleek mason
#

just imagine HOW wreaking fast that is

tepid burrow
#

Yes its fast.

#

But printing is the expensive part.

#

Not the loops

#

I bet if you printed every loop it would be a lot slower.

tepid burrow
#

But as always, its 100% faster than a emulator

crimson raft
#

They are gonna be nailing it every loop

#

And basically make it one cycle

tepid burrow
crimson raft
#

Possibly less than a cycle depending on throughput too?

#

I’d have to check the uops list tho

sleek mason
#

also my KrnPrintfs loggers ARE HEAVY, very very HEAVY

#

Update: doing final stability touch ups

#

today and complete this shit

sleek mason
daring mortar
#

so you can have hundreds of threads all using up a little bit of scheduling time

sleek mason
sleek mason
daring mortar
#

however you see fit

sleek mason
#

hmm, doing that

sleek mason
#

fixing some posixfd stuff

#

my fds broke and printf doesnt work for libc (newlib) nooo

#

also thats my final thing to fix

exotic ibex
sleek mason
exotic ibex
#

I'm just gonna use musl

sleek mason
exotic ibex
#

Or llvm libc if I want to be truly GNU free

sleek mason
#

do yall think i need to add documentation? for my kernel?

#

because it's almost complete

#

also doing some more error handling overhaul

exotic ibex
#

fact, the xv6 kernel (MIT teaching kernel) have more docs LOC than the kernel itself

#

just the old xv6 though, newer revisions (like the 2022 course) is much bigger

marble epoch
#

it's way more portable

#

llvm libc is incomplete and hard to port

tepid burrow
exotic ibex
marble epoch
#

i don't get what's so hard about mlibc tbh

#

there's literally a demo of how to do it

tepid burrow
marble epoch
#

????

tepid burrow
#

it isnt better with newlib though lol

sleek mason
marble epoch
#

this should explain how everything works

tepid burrow
#

never had any issue with that

tepid burrow
sleek mason
crimson raft
marble epoch
#

but you need these patches regardless

marble epoch
#

like, using newlib doesn't magically fix this issue

tepid burrow
#

or well maybe its only me

tepid burrow
#

it wont be better with newlib

crimson raft
#

Mlibc is just a plain better libc too in general with atleast decent documentation and examples for getting started

marble epoch
#

i might be biased, but mlibc is literally piss easy to port. you just implement the sysdeps and add it to the build system

#

and you have people here that actually care about it and can support you

exotic ibex
#

so whats the choice then, musl or mlibc, what do you guys think

marble epoch
#

are you doing linux binary compatibility

exotic ibex
#

yes

marble epoch
#

then musl works fine

#

mlibc is for when you want POSIX/linux source compatibility

sleek mason
#

i had like problems with headers and just refusing to compile, like tons of static assert kind of problems

marble epoch
#

in mlibc?

sleek mason
#

maybe i'm a noob

sleek mason
marble epoch
#

please drop the errors, might help us in the future too

sleek mason
#

sure, if i would switch mlibc, and ofc i would retry, newlib is pretty stripped

#

and kind of bad

#

like long sysdeps list

marble epoch
#

the mlibc sysdep list is pretty short actually

#

and since they're weak functions, you can just leave out the ones you don't have

exotic ibex
#

interesting to know that mlibc is a bit larger than musl

marble epoch
#

most notably, musl only targets linux, but managarm needs a lot of userspace code in libc to work

exotic ibex
#

hmm, maybe mlibc is a better fit?

#

though again, i forgot, i make kernel

#

so maybe my distro will use mlibc

marble epoch
#

note that not all programs support mlibc upstream (because of messed up includes, aka not posix compliant programs)

#

so you might need few patches for some programs

#

i recently upstreamed a fix for fastfetch

#

and xbps

sleek mason
#

Should i change name of "AxeialOS?"

#

it's too random

#

and was random

#

i just thought "Axe" and "Axial Loads" would be nice

daring mortar
# tepid burrow toolchain ig

you would have to build a cross compiler (or hack your way around the fact that your host compiler compiles executable for your host OS) on any libc

#

so thats not really a problem

#

mlibc is actually super portable, like to start with you need like 10 whole mlibc::sys_X implementations

#

(as you port more programs you implement more sys_X callbacks)

#

its really neat

#

im not sure how the arch portability is but they did get a 32-bit x86 port going so

tepid burrow
tepid burrow
sleek mason
sleek mason
#

should we change?

sleek mason
#
PushError("Ayo, Exception #GPF", -Unknown)
bronze prawn
sleek mason
#

forgot the asterisk

bronze prawn
#

Okay but still

#

How do you even name an os more then like 4 words

#

Without it sounding ass

sleek mason
#

It should be creative

#

Swiftix?

tepid burrow
sleek mason
#

just not stable

#

Lemme cook

tepid burrow
sleek mason
#

Swift = fast

tepid burrow
#

💀

sleek mason
tepid burrow
#

Personally I would just think it's a OS built in swift

sleek mason
#

already taken

tepid burrow
sleek mason
#

Yea

#

IxyBox?

#

very random

#

also taken

sleek mason
#

64IX?

tepid burrow
sleek mason
#

Ik

#

random

#

lemme cook again

cinder otter
#

Axis?

sleek mason
sleek mason
#

what 'bout "Velonix"?

#

"Optix"?

#

wait that's nice, "Optimize" + "Unix/Posix" + "Optics"

#

meaning: fast + standard + clarity(open source)

#

hmm

sleek mason
exotic ibex
sleek mason
#

lemme think something else

exotic ibex
#

Yeah, Optix is very sleek tbh

sleek mason
exotic ibex
#

Your os have anything special in mind

#

Like design considerations

#

Flexible

#

Etc.

sleek mason
#

with modernness

#

i had another "Velix" or "Velonix"

exotic ibex
#

velix is a bit unclear

sleek mason
#

I see

exotic ibex
#

and velonix clearly express velocity

#

the velo-

sleek mason
#

lemme check if it's ALSO taken

exotic ibex
#

my kernel name is partly taken

#

theres already some Aero kernels

sleek mason
exotic ibex
#

AI BIKE ☠️☠️ ☠️☠️ 🔥🔥🔥🔥

sleek mason
exotic ibex
#

but you could use that though

sleek mason
exotic ibex
#

its not copyrighted as long as the industry differs

#

i think

sleek mason
exotic ibex
#

☠️

sleek mason
#

AxeialOS is obviously not a taken name

#

so that's the reason for AxeialOS

#

what about ShitBox KEKW

#

totally not stolen name from Busybox

exotic ibex
#

hmm, what if i use GPT-5.2-Codex-Max-High or Claude 4.5 Opus-Max to think of a name 🔥

bronze prawn
#

5.2-codex eh

#

opus-max you go broke 🔥

#

I hope you enjoy your lighter wallet

exotic ibex
#

btw, got some news on some random guy making a PR to redis (the database) deleting 4000 lines of a float library in C++ and replaces it with vibecoded raw C impl within 350 lines written with claude and reviewed with gpt

exotic ibex
#

using those make me broker ☠️

bronze prawn
#

how much do you like debt to our ai overlords

exotic ibex
#

wat

#

like how much i spend

#

if so, i spend none, since i just do docs using agents

#

and i can wait for it to renew

#

what is not ok is my token usage, though just input token

exotic ibex
#

You get 1m token free and 10m token if you add a cc

#

Got this for free

sleek mason
exotic ibex
#

Just the fact that you need to restart to change keyboards

sleek mason
sleek mason
#

the reason why error handling in kernel is so superior in my OS

sleek mason
#

we got 3 stars in a row TODAY

#

on the github

#

ttl: 15 stargazers

tepid burrow
#

it just looks like normal error handling

sleek mason
exotic ibex
#

lmao, some intel chips does not suppor windows

sleek mason
#

Huh a Debug Exception, not intentional? huh?

#

the TF is set in RFLAGS? hmm...

#

also adding support to Syscall/Sysret instructions

#

as i used Int 0x80

#

But i'll support both of them

#

Int0x80 and Syscall/Sysret

bronze prawn
#

hm tf set?

#

that's strange

#

what's your IA32_SFMASK msr set to?

sleek mason
# bronze prawn what's your IA32_SFMASK msr set to?

here is that setup:

        uint64_t Efer = ReadMsr(0xC0000080); // EFER MSR
        Efer |= (1 << 0);                    // Set SCE (System Call Enable)
        WriteMsr(0xC0000080, Efer);
        uint64_t Star = ((uint64_t)0x1B << 48) | ((uint64_t)0x08 << 32);
        WriteMsr(0xC0000081, Star);                               // STAR MSR
        WriteMsr(0xC0000082, (uint64_t)SysEntASMSys /*Syscall*/); // LSTAR MSR
        WriteMsr(0xC0000084, ~0x2);                               // SFMASK MSR
#

#DB happens on Sysret

#

which is weird

bronze prawn
#

hm

#

looks fine

slim bane
#

SFMASK is for syscall

#

for sysret you'll want to look into whatevers in rcx/r11 and see how that value is getting there

sleek mason
#

Hmm...

sleek mason
bronze prawn
#

yeah you're right

slim bane
sleek mason
#

The above one is the kernel's handler and the bottom is the userspace caller

#

Also i just don't know where the fuck CS = 0x2B coming from, ik its a valid usercode selector but i don't set it?

slim bane
#

and right... so you dont set r11, so it could contain anything

#

yeah. R11 is caller preserved, those functions you call are free to trash it.

sleek mason
#

yes... wait a min, lemme try something

bronze prawn
#

oof yeah

#

the first time you implement sysret is when you learn sysret doesn't load selectors how you assume it would

#

:P

sleek mason
#

I guess i fixed the DPF by saving the R11 in the kernel stub on the stack

#

and restoring during sysret

sleek mason
slim bane
#

no problems 🙂

#

also note the rest of what sysret does with CS/SS, it uses fixed values for the hidden parts of the those registers. You'll want to ensure this matches your GDT otherwise you may into an issue on the next iret, or anywhere else that checks those values.

bronze prawn
#

not checking the values on sysret still pisses me off

slim bane
#

this is also one of those edge cases where intel and AMD behaviour differ, but I forget the specifics

#

check the manuals for that

slim bane
bronze prawn
#

amd does not

sleek mason
#

YAY Syscall/Sysret work! now i support both!

cinder otter
bronze prawn
#

if you don't support cmode then you will never get to cmode

#

meaning you will never get a cmode syscall

#

unless it allows you to do cmode syscalls from lmode

#

which is stupid

cinder otter
#

I've learned to never trust the user

#

Some malicious program might trigger some compatibility mode syscall

bronze prawn
#

intel what?

#

wait what the fuck

#

wtf is the point??????

cinder otter
#

sysenter

cinder otter
bronze prawn
#

no

#

not to that

#

for fucking intel

#

yeah

#

amd does it correctly

#

strange that intel just didn't bother

bronze prawn
#

sysenter and sysexit were made by intel

#

and don't work in lmode

#

the sysenter_esp and sysenter_eip were never updated to 64 bit

cinder otter
#

Mhmmm

bronze prawn
#

I have a feeling intel isn't telling the whole truth

#

"is not recognized in compat mode"

#

🤔

#

they always say something like "If Mode != 64-Bit.`

#

and omg apparently sysenter does work in 32 bit

#

bro what the fuck is intel on

#
RSP := IA32_SYSENTER_ESP;
RIP := IA32_SYSENTER_EIP;```
#

yeah okay intel

#

oh my days

#

intel extended them to 64 bit

#

😭

#

nonono let's not bother implementing the cmode versions of syscall/sysret

#

but let's extend sysenter & sysexit because we made them so we can feel good about ourselves

#

okay so tldr
intel doesn't allow 32 bit user apps to use syscall
amd doesn't allow 64 bit kernels to support sysenter

#

sooooo

bronze prawn
#

IT DOESN'T SAVE A STACK OR THE RIP

crimson raft
#

It

#

What

#

It dosnt

#

Save

bronze prawn
#

nope

crimson raft
#

The RIP

bronze prawn
#

nope

crimson raft
#

What the fuck

bronze prawn
#

yep

bronze prawn
#

or rflags

#

(linux/arch/x86/entry/entry_64_compat.S)

#

for flags you can just pushfq and be fine* (the if flag is cleared on entry <3)

crimson raft
#

Intel

#

WHY

bronze prawn
#

at least amd puts them in rcx and r11 for syscall

#

two caller saved regs

crimson raft
#

Intel making AMD look sane

sleek mason
#

what goin' on here

bronze prawn
#

linux seems to just say okay ebp is the stack

#

I have no fucking clue where it puts the return address tho

crimson raft
#

Apologies

sleek mason
#

well, i guess my kernel is too massive

#

god

#

i need python script to configure and auto uncomment-comment #define

crimson raft
#

@bronze prawn I’m pretty sure Linux still uses interupts for 32bit syscalls no

crimson raft
#

Use ifdef

#

And check for arch or whatever

bronze prawn
#

you would just fault on the instruction in kernel mode

#

very smart!

crimson raft
#

Fuck

#

Why

#

Why Intel

#

What the fuck is wrong with you Intel

bronze prawn
#

on amd this is a non issue

#

sysenter doesn't work.

sleek mason
# crimson raft Use ifdef

Not that, my kernel have configurations which are controlled via tons of macros and these statements

crimson raft
#

Genuinely what kind of crack were you smoking

#

And can I have some

#

Intel cmon

sleek mason
#

and i trun them on/off via uncommenting/commenting respectively

crimson raft
sleek mason
#

their #define statements

bronze prawn
#

the wiki states

CPU registers

These must be set by the application, or the C library wrapper

    ECX: Ring 3 Stack pointer for SYSEXIT
    EDX: Ring 3 Return address

Operation

When SYSENTER is called, CS is set to the value in IA32_SYSENTER_CS. SS is set to IA32_SYSENTER_CS + 8. EIP is loaded from IA32_SYSENTER_EIP and ESP is loaded from IA32_SYSENTER_ESP. The CPU is now in ring 0, with EFLAGS.IF=0, EFLAGS.VM=0, EFLAGS.RF=0.

When SYSEXIT is called, CS is set to IA32_SYSENTER_CS+16. EIP is set to EDX. SS is set to IA32_SYSENTER_CS+24, and ESP is set to ECX. ```
#

but I'm not sure if this is true

#

we prob could move to #x86

#

or just somewhere else

crimson raft
#

I don’t even wana argue about this tbh

#

It’s a dead horse

#

The instructions suck dookie shit

bronze prawn
#

oh

#

I know what you mean

bronze prawn
#

(if a non cannonical address is in rcx when executing sysret, a gpf will be taken in cpl0 with a cpl3 stack)

crimson raft
#

How do you prevent that one

bronze prawn
#

do intels job for them

crimson raft
sleek mason
#

i'll push teh changes soon after fixing some... stuff

#

-# i broke the driver manager database nooo

raven lotus
#

SYSENTER does indeed not save anything, and SYSEXIT uses ECX and EDX for SP and IP respectively

bronze prawn
#

I have no fucking idea I'm not gonna lie

raven lotus
#

so you as an user program must give SYSENTER a return address and stack, linux uses ECX and EDX

#

But you could just make it EAX and ESI if you wanted

sleek mason
sleek mason
exotic ibex
#

Oh cool

marble epoch
#

also these config options are way too granular

exotic ibex
sleek mason
#

give as much granular control i can

raven lotus
marble epoch
raven lotus
#

like if they have a problem in x thing they can just enable logging in it

sleek mason
sleek mason
#

hmm...

#

driver manager freaking out

sleek mason
#

well nvm fixed it (problem was a inverted conditional)

#

should i push the changes?

#

i'm delaying this shit too much 😭

marble epoch
#

you can just log everything and filter for relevant logs

#

i generally don't understand the point of hiding logs

#

you want a lot printed on the console

sleek mason
marble epoch
#

how?

#

are you logging in a hot loop?

#

rather, why not just have a loglevel command line option

#

then you can limit the logs to debug/info/etc

crimson raft
marble epoch
#

💀 what's the point

crimson raft
sleek mason
#

my kernel prints like HUMANGOUS amount of log

crimson raft
#

So I had to sit there and wait a good 20 minutes for it to HHDM

#

💀

marble epoch
#

printf debugging

sleek mason
#

it takes too much time to filter out

marble epoch
#

you don't leave the prints in

crimson raft
#

True

crimson raft
marble epoch
#

ctrl + f

#

💀

#

you already print the lines of where stuff is happening

sleek mason
#

lessgooo letsgo , 16 stargazers on our repo

#

And ONCE AGAIN something broke nooo this time the PosixFds

sleek mason
sleek mason
#

after the fix i'll push the changes because i've delayed too much

exotic ibex
sleek mason
exotic ibex
#

The delay is like a few days

#

Same as yours, i have a staging branch

sleek mason
exotic ibex
#

And the main branch is just a mirror or the latest release

sleek mason
exotic ibex
#

So we donf pollute the main while having the sources online

sleek mason
#

i guess after the push i'll merge the pre-main branch to main

#

because it's too outdated now

exotic ibex
sleek mason
exotic ibex
#

Current diff state

sleek mason
#

but yeah the changes ARE ALOT in my kernel

sleek mason
exotic ibex
exotic ibex
sleek mason
exotic ibex
#

Still wonder why so much

sleek mason
exotic ibex
#

Right

sleek mason
#

ig there will be more deletions than addition in my push diff 😭

#

because cleaned up lot of clutter

exotic ibex
#

Oh wow last relase is already 3 weeks

#

And 2 more weeks is lunar new year

sleek mason
exotic ibex
#

I got 2 week off

exotic ibex
#

Then the second

#

And third

#

And im still not planning r0c2 till next weekend

sleek mason
#

my commits are inconsistent

sleek mason
exotic ibex
sleek mason
#

this maybe my most delayed commit

exotic ibex
#

In a fair way so they can grow gradually

sleek mason
#

3 weeks ago was the last major commit

exotic ibex
#

You planning any release, versioning model yet?

sleek mason
#

still considering

#

well i will have the first release if i at least ported bash shell and terminal

sleek mason
exotic ibex
#

peak

sleek mason
#

again... fucking again... something broke nooo , user stack is misaligned during schduling and user stack's argv and envp points to NOTHING

sleek mason
#

gotta fix the argc, envp and argc...

sleek mason
#

ig i fucked up the crt0.asm

#

lemme fix

exotic ibex
#

veri cool

sleek mason
sleek mason
#

almost fixed the argv, envp and auxv

#

was tiny problems in the SetStack function

#

well... the push order was wrong... lmao

#

LESSSGOOOO letsgo

crimson raft
#

🗣️ 🔥

#

KERNEL=1

sleek mason
crimson raft
#

I don’t even do argc or argv or envp or auxv

crimson raft
#

When I fix my userspace app spawning

#

I will add it

sleek mason
#

i guess that's enough to port a decent bash

crimson raft
#

Do you uhh

#

Have fork

#

And exec

sleek mason
sleek mason
#

well fork is pretty shit

crimson raft
#

How do you have fork before userspace :o

#

I’m putting fork off for now

sleek mason
crimson raft
#

And I’m gonna copy on write

crimson raft
sleek mason
#

i don't use COW

crimson raft
#

🥀

sleek mason
crimson raft
#

You should use copy on write

#

It’s not that hard

sleek mason
#

well as real programmer, i marked it as

/*TODO: Add COW*/
crimson raft
#

It’s just a reference count and making pages read only if it’s > 1 ref count

#

🥀

#

And then handling the fault by allocating one 4kb page and copying the data and changing the PTE

sleek mason
#

well i guess i would overhaul my fork and execve

crimson raft
#

Something like that

#

Plus CoW also lets you do on demand allocations later as it’s a similar framework

#

With allocating things and copying/zeroing on the fly

sleek mason
#

i guess i must invest my time to add CoW

#

should i make a insult randomizor for my exceptions?

#

like different insults to driver devs and me (kernel) with function called StrTroll trl

sleek mason
#

fuck, i can't create new processes via execve if in userspace

#

fork is breaking stuff nooo

#

as well as execve is fucked nooo

#

AND ONCE AGAIN! BROKE SOMETHING AS ALWAYS...

#

🥀 💔 nooo 😭 gdtdoesnotwork

#

why am i speedrunning in breaking stuff

#

well on the brightside atleast it would make my kernel "safer" and "usable"

#

without crashing now and then

cinder otter
marble epoch
sleek mason
#

ig i'll just overhaul the process stuff

#

and especially add CoW

crimson raft
sleek mason
#

hmm... i just noticed that the BSP Cpu's APIC timer never interrupts...

#

interesting...

#

well nevermind

#

i've fixed it

#

problem was the BSP conditional which keeped the APIC masked lol

sleek mason
#

yay execve works (as well as segmentation fault).

exotic ibex
#

whats your philosophy?

#

*for contributors

#

im cooking up my guidelines

#

currently looks sth like this

#

looking for inspiration

sleek mason
exotic ibex
#

thought you like optimized stuff

#

thats a philosophy

sleek mason
exotic ibex
#

if you are not too strict

exotic ibex
#

but im doing it in advance

#

though for sure no ones gonna care

sleek mason
#

well i didn't made one because obviously i thought this project won't get popular so i just made my mind to do it later

exotic ibex
#

i see

#

i probably have to do this carefully

#

since stuff like definition issues

#

etc..

#

people can exploit those

#

like this example

sleek mason
#

well ig i'm fine to be solo, like if any one wants to contribute their changes just fork and open PR for consideration

sleek mason
#

i'll tell them the philosophy later when they had already opened a PR

#

like changes and etc

exotic ibex
#

though have a look at this

sleek mason
sleek mason
bronze prawn
#

but I wanna use it for killer drones :(

exotic ibex
#

the issue is, you are threatening]

#

and that is the worst possible thing to do

#

in a legal document

#

plus, it have unclear claims

sleek mason
exotic ibex
#

"you're free to do whatever you like with it (free as in freedom!)."

#

and "However, there are a bunch of things we would prefer you avoid to do with this Software"

bronze prawn
#

"do whatever. also here is a list of shit we don't want you to do with it"

#

like

#

dawg

exotic ibex
#

literally conflicting words

bronze prawn
#

I mean

#

not really tho

#

you can do whatever you want

#

but we would rather you not do these things

exotic ibex
#

company wants (very) clear intentions

bronze prawn
#

doesn't conflict

#

at all

#

legally you are free to do whatever

exotic ibex
#

that you can do whatever you like

bronze prawn
#

we ask you not to do this

#

legally > personal asks

#

but yeah

#

I agree

exotic ibex
#

it should be rephrased

bronze prawn
#

wdym?

#

it perfectly fine

#

"You can do whatever. but we would like you not to do this"

sleek mason
bronze prawn
#

they can't enforce those legally it's just suggestions on what not to do

#

ig

exotic ibex
#

do whatever you like is actually very strong

bronze prawn
#

well

#

it's not whatever

exotic ibex
#

in friendly terms it is fine

bronze prawn
#

it's whatever gpl3 allows

exotic ibex
#

but for legal documents its not that straightfoward

exotic ibex
sleek mason
exotic ibex
#

what they just do is add another layer of implicit declaration

bronze prawn
#

yeah

exotic ibex
#

wait

bronze prawn
#

I agree with that

#

while not legally binding nor legally enforceable it does make it less clear to a normal person

bronze prawn
sleek mason
bronze prawn
#

it's not written in the licence

#

and therefor they cannot stop me

exotic ibex
#

i was there the whole time

sleek mason
exotic ibex
#

they also mentioned about not for military uses

#

aka blowing people up

neat sandal
cinder otter
#

And preferably not be a bot with human front

exotic ibex
#

wdym?

cinder otter
#

Tho in all seriousness, Include writing tests as a requirement

sleek mason
neat sandal
raven lotus
raven lotus
#

guau

sleek mason
#

gnau

cinder otter
sleek mason
#

my kernel love segmentation fault

#

also AxeOS is the smaller nickname for AxeialOS

#

like axeos

gray crescent
#

and axe body spray is the official axeialOS body spray made for real men trl

sleek mason
#

17 stars on my repo letsgo letsgo letsgo letsgo letsgo letsgo letsgo letsgo

#

insanity

#

well still fixing my execve and fork

#

execve has problem where i successfully load the elf and create the process, but returning to the reused thread causes this segmentation fault

sleek mason
#

fork has the problem where the forked child is executed but just never proceeds to run at all

#

does my kernel have lot of features?

#

lemme list em all

slim bane
#

Wow that's a short list trl

sleek mason
#

List of features my shitty kernel has:

  • VMM
  • PMM
  • Kernel Heap (Slab free list allocator)
  • ModMemMgr (manages memory for kernel modules) well partially deprecated*
  • Kernel module linker
  • Driver manager database.
  • Device manager
  • Plug-n-Play (well unsure if it works well, untested)
  • MLFQ Scheduler
  • SMP
  • Unix-Like VFS
  • POSIX processes
  • Threads
  • Procfs
  • Devfs
  • POSIX Signals
  • POSIX FDs
  • POSIX Syscalls
  • Syscall instruction
  • Int 0x80 Syscalls (legacy is supported)
  • IDT
  • GDT
  • TSS
  • CoW for fork
  • Timer support for APIC
  • Timer support for HPET (well its TODO for ignore this in list)
  • Timer support for PIT
  • kernel config
  • Testing stuff
  • PCI Bus system
  • RAMFS
  • Initrd/Initramfs (my BootImg)
  • Firmware blob management stuff (request firmware and etc stuff)
  • a EarlyBootConsole (WHICH STARTS WAY BEFORE EVEN GDT/IDT/TSS, every first thing to start in the kernel)
  • UART (serial port debugging)
  • kernel symbol exports (KExports for drivers and kernel api)
  • Mutexes
  • Spinlocks
  • Semaphores
  • BusyWait (Blocking and Non-Blocking)
  • another massive debugging infrastructure (my printf loggers and per-file loggers).
  • handle user faults
  • module record manager (handles all loaded module because driver manager is dependent on this as its older ancestor)
  • block devices(devfs)
  • char devices(devfs)
  • parses memory map ofc
  • massive and overcomplicated error handling structure and logging (Errnos)
#

insane wall of text

exotic ibex
#

the first thing that starts in my kernel is the panic handler

#

the prinkt (s1) the when modules are loaded, s2 kicks in

sleek mason
exotic ibex
#

'enough' vastly depends

exotic ibex
#

a GP os has to be up-to-date with whatever the world is like

sleek mason
#

but yeah that's way more than enough to handle some sophisticated applications

exotic ibex
#

hmm, idk what to focus on now

sleek mason
exotic ibex
#

drivers stack, an fs, perfecting my sched

exotic ibex
sleek mason
#

like DAM in my kernel

exotic ibex
#

with UDM

#

but yeah

sleek mason
#

nice

exotic ibex
#

good point

sleek mason
#

also make it good enough to work as PnP

exotic ibex
#

because of the diversity

#

of USB is infinite

sleek mason
sleek mason
#

still i have only a PCI bus

exotic ibex
exotic ibex
#

people say pci is dead

#

in reality, it is still there powering everything

#

AHCI, xHCI controllers are on pci bus, PCIe still needs PCI, and NVMe itself is just PCIe

sleek mason
# exotic ibex very cool then

because of my probemgr and device abstraction makes it easy to load specfic drivers when needed at run time and because hardware events exist

exotic ibex
#

im thinking of adding real modules some where in the future

#

i will make a distro using my kernel

sleek mason
#

and my kernel has a function called CheckForHardware which calls the probemgr to trigger lots of probes and check for any hardware changes like a new driver and load the driver and put into the device tree

exotic ibex
#

maybe in the late 2030s ngl

sleek mason
#

lol

#

so indeed my kernel has PnP in it's minimalist form

sleek mason
#

nah i think the name "AxeialOS" is fine

#

I'm too used to it now

#

and changing it is a bad idea

gray crescent
#

the only good instance of renaming a project applies to windows, they should rename it to "if EA made an operating system (episode 1)"

sleek mason
#

I gonna just push

#

too much delays

sleek mason
#

@exotic ibex i've pushed the changes after a long time

exotic ibex
#

lets see whatve you been cooking

#

why bad? invalid is the word

#

the patch is filled with atomics

#

where is the advertised configurator?

#

mostly a logging and return values consistency

sleek mason
sleek mason
sleek mason
sleek mason
# exotic ibex the patch is filled with atomics

lots of fixes and features too, some SMP fixes, POSIX Fds fixes, Syscall Instruction, Fork with CoW, Timer has a BSP and AP Conditional, Error logs everywhere with tracebacks and errno codes, atomics, fixed the userstack argc, argv, envp and auxv

#

and other fixes i lost track off

exotic ibex
cinder otter
#

GUI idea: Use CSS and Javascript to design the UI

#

(You need to technically write a web page renderer in userspace)

#

Maybe a js engine too

exotic ibex
cinder otter
#

Not the configurator

exotic ibex
cinder otter
#

Use CMAKE for that

exotic ibex
cinder otter
exotic ibex
#

and it sucks

#

for kernel configuration

cinder otter
exotic ibex
#

here dependant is a thing

cinder otter
#

I haven't really explored granular cmake configuration with my kernel yet

cinder otter
crimson raft
cinder otter
#

It does??

crimson raft
#

Yes

#

Lmfao

#

My friends even saw some of the OOBE was using html and CSS for the animations

#

This would be tearing a page right out of windows

cinder otter
crimson raft
#

Well you see I really hate gnome

#

But native UI stuff will be alot better in the end

#

Opening an electron app vs a native app for example

exotic ibex
#

number 1 reason why i delete rhel 10 after 2 hours (beside its nerfed dnf)

sleek mason
#

well my kernel can support that if i'm a miniac to port that

#

assuming i fixed everything in my kernel

#

i would still have to make some real sophisticated drivers to support that or even internet at all

#

well back to fixing my Processes (fork and execve)

#

i've been procrastinating alot

exotic ibex
#

do we use gnu extensions here @sleek mason ?

#

like gnu11, gnu23

sleek mason
#

i dont think so

exotic ibex
#

you explicitly set -std?

#

if so then yeah, no extension

sleek mason
#

i'm on vacation guys

#

for the next 16 days

#

so this will be some standstill

#

tho i'm getting my GCC work on my arch linux laptop lol

exotic ibex
#

SIXTEEN

sleek mason
#

nah i will be active on github

#

and try a workaround to work on it

#

also my laptop battery lasts way longer on linux

#

for some reason

neat sandal
neat sandal
sleek mason
#

developing AxeialOS on arch linux! for the entire span on vacation 🔥

gray crescent
sleek mason
#

this projects is not ded

exotic ibex
cinder otter
#

Looks ded to me

neat sandal
neat sandal
# cinder otter That's super-ded dude

yea but messages not being sent for 5 hours is just the time a channel is quiet pretty often
algorithms channel is a good example of what ded truly is

neat sandal
cinder otter
sleek mason
#

reminding this PROJECT IS NOT DED

sleek mason
#

THIS PROJECT IS NOT DEAD, i will make this into distro for sure if #1467786251510743061 goes nicely

graceful terrace
#

just do what I do, take breaks of years in length and keep coming back and adding more to the os. people stopped assuming mine was dead the 3rd time I came back lol

sleek mason
neat sandal
#

take a break o7

sleek mason
#

i will make a AxeialOS distro but from the Modularus kernel trl #1467786251510743061

sleek mason
#

Liquid OS is on the go!

#

#1467786251510743061

exotic ibex
#

very ded thread

foggy swallow
#

we should clearly go back to the weird k&r c function definitions they were so good!!!

cinder otter
#

Except defining function arguments outside the parenthesis

foggy swallow
#

what why would you exclude the best part

exotic ibex
#

DED @sleek mason

sleek mason
exotic ibex
sleek mason
#

So AxeialOS is not ded, just that it will not use the axkrnl

#

but the Modularus

exotic ibex
#

this didnt last long

exotic ibex
graceful terrace
#

hmm when did I post here

#

ah months ago

graceful terrace
exotic ibex
#

though just a bit sad, hes my frist friend in the osdev journey ngl

#

we cant do anything so yeah 👍

#

its just memories

graceful terrace
#

lost a good contributor to one of my projects that way, one day just gone

#

but that's just the way it goes