#Nyaux

1 messages ยท Page 33 of 1

flat nymph
#

No direct mappings of any sorts

rigid fable
#

sigma !

surreal path
#

following proper limine spec for a very similar hhdm

flat nymph
#

Default was handling everything

#

Also it might have stuff like acpi and mmio (?)

surreal path
surreal path
rigid fable
flat nymph
#

๐Ÿคท

surreal path
#

no im not doing that

#

it should be mapped

#

i think yea

#

nvm it dies when

#

trying to mmio the hpet

#

yay :)

#

first write

flat nymph
#

Temporary map user ultrameme

surreal path
#

mappings still overlap

thorn bramble
#

imagine unconditionally mapping 4GiB

surreal path
#

mappings are still overlapping

#

@flat nymph is that bad?

#

im not mapping gib

#

4 gib

#

it still dies trying to access mmio as expected btw

thorn bramble
#

why vmm(x86_64)()

#

what is the () supposed to be

surreal path
#

idk

#

lol

thorn bramble
#

lmao

surreal path
#

looks cooler

thorn bramble
#

i mean okay

surreal path
#

hold on lemme allow my idt to actually init

#

nvm infinite death

flat nymph
#

Maybe I've been looking at the wrong values

#

mapped 0xffff800007c00000 to 0xffff800007e00000 : from phys 0x7c00000 to 0x7e00000

#

Why are you mapping size 0?

surreal path
#

oh weird

surreal path
#

im js following memory mappings blindly

surreal path
#

that is the hpets address???

#

OH WAIT THAT MAKES SENSE

flat nymph
#

Also this is kinda inconsistent vmm(x86_64)(): mapped 0xffff800000000000 to 0xffff800000200000 : from phys 0x0 to 0x200000
vmm(x86_64)(): mapped 0xffff800000000000 to 0xffff800000200000 : from phys 0x0 to 0x200000
vmm(x86_64)(): mapped 0xffff800000000000 to 0xffff800000800000 : from phys 0x0 to 0x800000
?

surreal path
#

yea i dont know

#

this is weird

#

and page fault handler is dying very weirdly

#

i dont know at all

flat nymph
#

But like don't print what you're mapping

surreal path
#
for (uint64_t i = 0; i != memmap_request.response->entry_count; i += 1) {
    struct limine_memmap_entry *entry = memmap_request.response->entries[i];
    switch (entry->type) {
    case LIMINE_MEMMAP_FRAMEBUFFER: {
      uint64_t disalign = entry->base % MIB(2);
      entry->base = align_down(entry->base, MIB(2));
      uint64_t page_amount =
          align_up(entry->length + disalign, MIB(2)) / MIB(2);
      for (uint64_t j = 0; j != page_amount; j++) {
        map2mb(take->root, entry->base + (j * MIB(2)),
               hhdm_request.response->offset + entry->base + (j * MIB(2)),
               PRESENT | RWALLOWED | WRITETHROUGH | PATBIT2MB);
      }
      kprintf("vmm(x86_64)(): mapped 0x%lx to 0x%lx : from "
              "phys 0x%lx to 0x%lx\n",
              hhdm_request.response->offset + entry->base,
              hhdm_request.response->offset + entry->base +
                  (page_amount * MIB(2)),
              entry->base, entry->base + (page_amount * MIB(2)));
      hhdm_pages += page_amount;
      break;
    }
    case LIMINE_MEMMAP_BAD_MEMORY: {
      break;
    }
    case LIMINE_MEMMAP_RESERVED: {
      break;
    }
    default: {
      uint64_t disalign = entry->base % MIB(2);
      entry->base = align_down(entry->base, MIB(2));
      uint64_t page_amount =
          align_up(entry->length + disalign, MIB(2)) / MIB(2);
      for (uint64_t j = 0; j != page_amount; j++) {
        map2mb(take->root, entry->base + (j * MIB(2)),
               hhdm_request.response->offset + entry->base + (j * MIB(2)),
               PRESENT | RWALLOWED);
      }
      kprintf(
          "vmm(x86_64)(): mapped 0x%lx to 0x%lx : from phys 0x%lx to 0x%lx\n",
          hhdm_request.response->offset + entry->base,
          hhdm_request.response->offset + entry->base + (page_amount * MIB(2)),
          entry->base, entry->base + (page_amount * MIB(2)));
      hhdm_pages += page_amount;
      break;
    }
    }
  }
  hhdm_pages = (hhdm_pages * MIB(2)) / 4096;
flat nymph
#

Walk over the page tables and print the contents

surreal path
#

this is what i do

surreal path
#

anyways not doing the stacktrace doesnt kill nyaux

#

so

#

commenting out the stacktrace for now

#

cr2 is completely wrong

#

NOT QUESTIONING IT

#

js gonna

#

do as u asked

#

that is the mappings

#

first address

#

second

#

(gdb) pt -walk 0xffffffff80001000
Page table walk for VA = 0xffffffff80001000

CR3 = 0x3a6d000
PML4[511] = 0x3a6c000 | Flags 0x027
PDP[510] = 0x3a6b000 | Flags 0x027
PD[0] = 0x3a6a000 | Flags 0x027
PT[1] = 0x1fe2000 | Flags 0x021

#

5th

#

(gdb) pt -walk 0xffffffff80087000
Page table walk for VA = 0xffffffff80087000

CR3 = 0x3a6d000
PML4[511] = 0x3a6c000 | Flags 0x027
PDP[510] = 0x3a6b000 | Flags 0x027
PD[0] = 0x3a6a000 | Flags 0x027
PT[135] = 0x2068000 | Flags 0x021

#

6th

#

and now

#

7th

#

(gdb) pt -walk 0xffffffff80095000
Page table walk for VA = 0xffffffff80095000

CR3 = 0x3a6d000
PML4[511] = 0x3a6c000 | Flags 0x027
PDP[510] = 0x3a6b000 | Flags 0x027
PD[0] = 0x3a6a000 | Flags 0x027
PT[149] = 0x2076000 | Flags 0x003

#

@flat nymph

flat nymph
#

Idk does it point where it's supposed to?

#

I'm occupied lol

rigid fable
#

nyaux master poopcode win

surreal path
#

tho some entries look weird

#

i think

surreal path
surreal path
#

/j

#

pin this

rigid fable
#

๐Ÿฆ†๐Ÿ˜ญ

surreal path
silver yarrow
#

The problem is still that you're likely looking for UB that only happens on specific hardware and not qemu. So it's likely you wont find it in qemu

#

Since the UB works in your favor in qemu

surreal path
#

on my laptop

#

if the 4gib meme was the actual problem

#

ill be happy

#

@flat nymph u still busy?

flat nymph
#

Yes

surreal path
silver yarrow
#

have you been able to reproduce the issue in qemu or some vm

#

before you have done that or are able to debug on your laptop, you are just taking shots in the dark

#

not saying you wont hit anything but seems like a very tedious process

surreal path
#

and yea it kind of makes sense why it dies now.

#

a lot of overrlapping entries

#

a LOT

#

and no idea how to fix this

silver yarrow
#

I dont really see any overlap

#

I mean sure u are mapping the same regions many times but thats not overlap

#

unless they are meant to be unique virtually too

surreal path
#

but then

#

i dont know whats going on then

#

i removed the unconditally 4gib mapping

#

which breaks all mmio, and nyaux symbol loading for some reason

#

still doesnt want to load

silver yarrow
#

the hhdm 4gig mapping?

surreal path
silver yarrow
#

wdym above?

#

You mean under right 0-4gib

surreal path
#

0x0 to 0x1000000

#

yea

silver yarrow
#

yeah thats fine

surreal path
#

thats fine

#

thats not a problem?

#

so i can leave it in right?

#

please

silver yarrow
#

not in the slightest

#

its what I do too

surreal path
#

thank you

#

and mr other guy was flaming me for

#

doing that

silver yarrow
#

now obviously would be nice to optimize it with 4 x 1gig mappings but thats an optimization u can do later

silver yarrow
surreal path
#

^

#

^

silver yarrow
#

well technically thats correct, you might not need it

surreal path
#

i need it

#

clearly do

silver yarrow
#

interesting

surreal path
#

for mmio reasons

#

cause im lazy

silver yarrow
#

on qemu it really shouldnt be necessary

#

as long as the memory map is mapped

#

real hardware is dodgier so that 4gib mapping is nice

surreal path
#

yeaa

silver yarrow
#

So do you have any clue what goes wrong on real hardware

surreal path
#

no

silver yarrow
#

Well lets start there then, how far along do you get

thorn bramble
surreal path
#

to switching cr3

thorn bramble
#

like what is overlapping

surreal path
thorn bramble
#

wow ok but like

#

is that in a loop?

#

or something

surreal path
#

yea

thorn bramble
#

show the loop

#

the whole thing

#

and what does the loop do

surreal path
#

kk

thorn bramble
#

map memory?

surreal path
#

ill js

#

give u the entire function

surreal path
thorn bramble
#

your problem is that you're assuming every entry has 2MiB aligned base and length

#

from a quick look at the very least

silver yarrow
#

yeap

surreal path
#

but i have the disalign and i add it?

silver yarrow
#

only doing 2mb mappings

thorn bramble
#

that won't work

surreal path
#

so what do i do

silver yarrow
#

map 4kib pages

surreal path
#

no

silver yarrow
#

or lose the alignment

#

you can ceil the base and floor the end

#

but you are wasting memory

#

actually hold on

#

im dumb, you cant do that

thorn bramble
#
#define FOUR_KIB (4*1024)
#define TWO_MIB (2*1024*1024)
#define ONE_GIB (1*1024*1024*1024)
while (length >= FOUR_KIB) {
  if (is_aligned(addr, ONE_GIB) && length >= ONE_GIB) {
    map_1gib(...);
    addr += ONE_GIB;
    length -= ONE_GIB;
  } else if (is_aligned(addr, TWO_MIB) && length >= TWO_MIB) {
    map_2mib(...);
    addr += TWO_MIB;
    length -= TWO_MIB;
  } else {
    map_4kib(...);
    addr += FOUR_KIB;
    length -= FOUR_KIB;
  }
}```
#

now, you can probably clean that up a little bit

#

but this is necessary

#

you cant just round down an entry and map it as 2mib page lol

silver yarrow
#

yeah was about to say

thorn bramble
#

the memory entry has clear boundaries

silver yarrow
#

btw this answers why u needed the 4gib mapping

#

mapping the entries failed because u were doing it on unaligned boundaries but the 4gib mapping was aligned

#

honestly prolly the only reason this works on qemu is because the entries are all or mostly below 4gib

thorn bramble
#

here, i updated the code so it's a bit more C-like

surreal path
#

i dont know how to do basic math trl

thorn bramble
#

#define is_aligned(value, align) (((value) & ((align) - 1)) == 0)

#

assuming align is a power of 2

surreal path
#

thanks

thorn bramble
#

i wrote it in this discord chat, this should probably be some sort of a function so it's properly typed

surreal path
thorn bramble
#

you did not need a function to specifically check that but sure yeah

surreal path
#
if (is2mibaligned(entry->base, entry->length)) {
      uint64_t disalign = entry->base % MIB(2);
      entry->base = align_down(entry->base, MIB(2));
      uint64_t page_amount =
          align_up(entry->length + disalign, MIB(2)) / MIB(2);
      for (uint64_t j = 0; j != page_amount; j++) {
        map2mb(take->root, entry->base + (j * MIB(2)),
               hhdm_request.response->offset + entry->base + (j * MIB(2)),
               PRESENT | RWALLOWED | WRITETHROUGH | PATBIT2MB);
      }
      kprintf("vmm(x86_64)(): mapped 0x%lx to 0x%lx : from "
              "phys 0x%lx to 0x%lx\n",
              hhdm_request.response->offset + entry->base,
              hhdm_request.response->offset + entry->base +
                  (page_amount * MIB(2)),
              entry->base, entry->base + (page_amount * MIB(2)));
      hhdm_pages += page_amount;
      } else {
        uint64_t disalign = entry->base % 4096;
        entry->base = align_down(entry->base, 4096);
        uint64_t page_amount = 
        align_up(entry->length + disalign, 4096) / 4096;
        for (uint64_t j = 0; j != page_amount; j++) {
          map(take->root, entry->base + (j * 4096),
          hhdm_request.response->offset + entry->base + (j * 4096),
          PRESENT | RWALLOWED | WRITETHROUGH | PATBIT4096);
        }
      }
#

i do an if statement

#

if its aligned

#

map with 2mib

#

if not

tawdry mirage
#

wtf is this

surreal path
#

4kib

thorn bramble
#

do not do this disalign bullshit anymore

surreal path
thorn bramble
#

its 2 mib aligned

#

just map it

surreal path
#

sorry

thorn bramble
#

dont apologize

surreal path
#

no aligning down as well

thorn bramble
#

nope

surreal path
#

okay

#

this is better now

#

im scared qookie is typing a long paragraph

#

am i about to be cooked

thorn bramble
surreal path
tawdry mirage
#
progress = 0
while (progress < size) {
    if (size - progress >= 2M && !(base + progress & (2M - 1))) {
        map_2M_page(addr)
        progress += 2M;
    } else {
        map_4K_page(addr);
        progress+= 4K;
    }
}```
thorn bramble
#

basically the same except more complicated meme

surreal path
tawdry mirage
rigid fable
surreal path
#

so close

#

uh huh

#

yea idk why that is failing

#

its just like changing that 2mib entry into a bunch of smaller 4kib ones

#

so why is it failing

#

oh thanks ubsan

#

store to null pointer of type uint64

#

whats the null poninter exactly tho

#

???

#

im confused

#

is it guy[j]????

#

he should be valid tho

#

cr2 is 0x0

#

all guy is is just ```C
uint64_t *guy = (uint64_t *)((uint64_t)pmm_alloc());

#

oh

#

we ran out of memory

#

come on like why am i running out of memory

#

should i be running out of memory

#

???

#

do yall know

#
uint64_t page_amount = align_up(entry->length, 4096) / 4096;
        for (uint64_t j = 0; j != page_amount; j++) {
          map(take->root, entry->base + (j * 4096),
              hhdm_request.response->offset + entry->base + (j * 4096),
              PRESENT | RWALLOWED);
        }
        kprintf("vmm(x86_64)(): mapped 0x%lx to 0x%lx : from "
                "phys 0x%lx to 0x%lx\n",
                hhdm_request.response->offset + entry->base,
                hhdm_request.response->offset + entry->base +
                    (page_amount * 4096),
                entry->base, entry->base + (page_amount * 4096));
        hhdm_pages += page_amount;
#

thats the logic

#

fun so we ran out of memory trying to map the memory map

#

:)

#

yea no idea if i should be running out of memory in the first place

#

this is on qemus default ram

molten grotto
#

at least with full 2mb pages for the hhdm

surreal path
#

check the makefile

molten grotto
#

I meant to reply to the "if i should be running out of memory in the first place"

surreal path
#

yea

#

so no idea whats going on

surreal path
#

help

rigid fable
#

with what

surreal path
#

i dont get why im running out of memory

rigid fable
#

pmm issue

surreal path
#

no its not

#

the pmm is fine

#

its so simple

#

it cant have an issue

#

its like 73 lines of code lmao

hexed mango
surreal path
#

i should not be taking that much ram

hexed mango
#

hm

rigid fable
hexed mango
#

it's taking up that much RAM while doing what exactly?

surreal path
hexed mango
#

what?

surreal path
#

yea

rigid fable
#

add more ram and check

#

don't be a dumb

surreal path
#

fine

hexed mango
#

are you mapping the HHDM or smth?

surreal path
rigid fable
hexed mango
# surreal path mhm

did you try using larger pages for the HHDM? that'll be faster during translation misses anyways

surreal path
#

i used before

#

but now because of alignment

surreal path
#

i have to use 4096 byte pages if they arent aligned to 2 MiB

#

because of real hw issue

hexed mango
#

ya? that sounds about right

rigid fable
#

if real hw crashing, it's vm issue

surreal path
#

vmm dies no matter what i do

#

no matter how much memory i give

#

fucking hell

hexed mango
#

memory leak somewhere?

surreal path
#

no

rigid fable
hexed mango
rigid fable
#

try to make your vmm cleaner

surreal path
#

am i somehow

surreal path
surreal path
#

wc

#

and stuff

hexed mango
rigid fable
surreal path
#

like they shouldnt be overcommiting memory

#

im js asking for ONE page

thorn bramble
#

i see that we all have different definitions of "clean code"

rigid fable
surreal path
rigid fable
#

exactly

surreal path
#

dont u see the shift -= 9

thorn bramble
#

he subtracts 9 at the start

#

so it becomes 39

surreal path
#

mhm

rigid fable
#

what mhm means

surreal path
#

yes

rigid fable
thorn bramble
#

by shifting the virtual address right by 39 bits you put the 9 bits used to index the page table at bit 0

#

so (va >> 39) & 0x1ff gives you the index

surreal path
#

ima have a break from trying to debug this

#

for like a few

#

i am not feeling okay

rigid fable
#

just

#

dont

#

shitcode

surreal path
#

i am not shitcoding

rigid fable
#

and think about users

surreal path
#

sorry users>

#

?

rigid fable
rigid fable
surreal path
#

okay but seriously i need a break im too frustrated

tender gorge
surreal path
#

im back and im not feelings happy rn

#

with nyaux fucking running out of memory

#

๐Ÿ˜ก

#

time to read the code line by line ig

edgy pilot
surreal path
rigid fable
rigid fable
surreal path
#

its lit

#

73 lines

rigid fable
#

little != working

surreal path
#

its a freelist

#

how could it be wrong

edgy pilot
surreal path
#

okay @rigid fable

#

join vc

#

voice 0

rigid fable
surreal path
#

and? u can join on ur phone lol

rigid fable
#

๐Ÿ˜ˆ

surreal path
#

cringe

#

hold on

rigid fable
#

I hear some monkey in voice

surreal path
#

IM NOT A MONKEY

#

WOW

#

can u see my stream tho

rigid fable
#

yes

surreal path
#

finally

rigid fable
#

is this your bf ?

surreal path
#

bf??? im not gay ๐Ÿ˜ญ

#

well i am bi so i am gay but

#

but

rigid fable
#

I think the opposite

surreal path
#

๐Ÿ˜ญ

#

okay this girl im cooking with

#

i got the rizz with her

#

tho she has a strong irish acent

#

omg

surreal path
surreal path
#

@thorn bramble

#

ur code

kind root
#

classic if true return true else return false

surreal path
#

i realized the problem

spice yarrow
surreal path
#

IT WORKED

#

NYAUX WORKED

#

ON MY LAPTOP

#

TEST IT YALL

#

EVERYONE ONE OF YOU

#

@kind root my laptop has kinda weird aml

edgy pilot
#

that needs a reboot and a spare flash drive

surreal path
#

im so happy

kind root
surreal path
edgy pilot
kind root
surreal path
#

im sure its because some didnt impl some things in uacpi

kind root
#

try pmos on it

surreal path
#

k

kind root
#

or just send a screenshot of what errors u get

surreal path
#

screenshot

#

๐Ÿ˜ญ

#

its real hardware

kind root
#

what hw btw

#

(or a photo idc as long as its legible)

surreal path
#

acer predator trition PT14-51

kind root
#

doubt it has weird aml

#

pretty new stuff

surreal path
#

it works fine

#

yea its js

#

yk

kind root
#

so uh

#

photos?

surreal path
#

i didnt take any

#

๐Ÿ˜ญ

#

but i swear @kind root i saw no errors

#

my laptop has a ec controller

#

cool!

kind root
#

so whats weird about it lol

surreal path
#

nothing just my unimplmented kernel api

#

๐Ÿ’€

kind root
#

uh

#

makes sense

#

pmos worked fine?

surreal path
#

yep

#

anyways

#

now

#

we fixed all the bugs we encountered before doing the scheduler

#

its time for the scheduler

#

tomorrow we will

kind root
surreal path
finite summit
thorn bramble
#

looks fine

#

only thing i can think of is the macro doing some weird implicit narrowing but like idk looks fine to me

surreal path
#

i was being stupid

surreal path
#

idk if i can do any development today

#

wsl has stopped working

#

and

#

i rebooted

#

and tried wsl --shutdown

#

and stuff

#

and it wont work

#

i mean obviously i will get development done today

#

i js

#

need to figure out this windows skill issue

#

github js said i have "free access to copilot"

#

lmao like i care

thorn bramble
#

i do too for some reason

finite summit
#

same

kind root
#

Everyone has it now

rigid fable
#

easy

rigid fable
#

Neither bios nor uefi

surreal path
finite summit
surreal path
rigid fable
#

Nice to meet you

surreal path
#

also whats ur cpu

rigid fable
#

It's a random mini PC I've got lying around

surreal path
#

thats an old cpu

rigid fable
#

Yup it is

surreal path
#

when was rep stosb and friends introduced into the instruction set @molten grotto

#

i suspect its that instruction

finite summit
#

they have always been there

surreal path
#

since when

finite summit
#

probably 80386

#

or eariler

#

if it were relatively new, it would have a cpuid flag

surreal path
#

i feel like its probs because im relying on something thats quite new

#

causing it to page fault

#

as it doesnt page fault on most hw

finite summit
#

could be popcount if it crashes at uacpi

surreal path
finite summit
#

x86_64-v2 I believe

#

so ~2013?

surreal path
#

yea

#

that would make sense

#

nyaux is compiled with x86_64 v2

finite summit
#

nvm

surreal path
#

oh

molten grotto
#

also idk why would it page fault and not ud or whatever

finite summit
#

x86_64-v3 is haswell

#

so 2013

rigid fable
surreal path
#

oh it works

#

yay

#

nvm

#

we are all good

#

nyaux is not UBing thankfully

#

i should change that panic message to

#

32 bit hpet buddy

#

because i dont support a 32 bit hpet lol

finite summit
#

no change it to

#

"NyauxKC does not support 32-bit HPETs"

#

because it took me a good second or two to realize what you meant

tawdry mirage
#

the panic message sounds like you only support 32-bit HPETs

finite summit
#

yeah

finite summit
#

for example in obos:

if (!(timer->timerConfigAndCapabilities & (1<<5)))
    OBOS_Panic(OBOS_PANIC_DRIVER_FAILURE, "HPET Timer is not a 64-bit timer.");
surreal path
#

can we make a more funny error message chat

finite summit
#
uacpi_status uacpi_kernel_handle_firmware_request(uacpi_firmware_request* req)
{
    switch (req->type)
    {
    case UACPI_FIRMWARE_REQUEST_TYPE_BREAKPOINT:
        break;
    case UACPI_FIRMWARE_REQUEST_TYPE_FATAL:
        OBOS_Debug("Firmware requested fatal error. Panicking.\n");
        OBOS_Panic(OBOS_PANIC_FATAL_ERROR,
            "Your bios fucked up, so now you have to deal with the consequences, also known as possible data loss. Firmware Error Code: 0x%016x, argument: %016lx\n",
            req->fatal.code, req->fatal.arg);
        break;
    default:
        break;
    }
    return UACPI_STATUS_OK;
}```
#

I should remake that panic message

rigid fable
#

Disabled the HPET from the bios because I can

surreal path
#

lol

rigid fable
#

It's a thing lol

surreal path
#

crazy

finite summit
#

"Your firmware shat itself, so now obos will shit itself. Firmware Error Code: 0x%016x, argument: %016lx\n"

surreal path
#

lool

#

my wsl is broken

#

i cant fix it

#

time to nuke wsl install?

#

nuked it and it got solved

flat nymph
rigid fable
#

whar

#

bro it's a timer ๐Ÿ˜ญ

tawdry mirage
#

nyaux confirmed not for gaming because it uses hpet

rigid fable
#

bruh

flat nymph
#

Idk I think (supposedly) Windows uses it wrong and it's slow/broken on AMD or something

#

I've been arguing about it with my friend a couple of months ago

#

Who also insisted on me using Windows optimizers

rigid fable
#

oof ๐Ÿ˜ญ๐Ÿ™

elder shoal
#

the hpet is pretty slow

surreal path
#

i got sick today

#

๐Ÿ˜ญ ๐Ÿ˜”

#

my sister gave me a throat infection

#

so ima do a coin flip, if a girl txts me within 2 hours ill work on scheduler

#

if no

#

not today

rigid fable
#

๐Ÿ˜ญ

surreal path
#

@edgy pilot give me a link

edgy pilot
#

it would take me the same amount of time as you to go and look for it

surreal path
#

wheres the ubsan impl

#

i dont know where to look

edgy pilot
#

google

#

or "go to file"

#

on github

#

smh

tawdry mirage
#
qookie@selenium ~/projects/mlibc/linux-6.1.8 ฮป rg __ubsan_handle_nonnull_arg
qookie@selenium ~/projects/mlibc/linux-6.1.8 ฮป rg __ubsan_handle_vla_bound_not_positive
qookie@selenium ~/projects/mlibc/linux-6.1.8 ฮป 
edgy pilot
#

hmm I have never encountered those

tawdry mirage
#

i've seen __ubsan_handle_vla_bound_not_positive get triggered in the wild (not in managarm, but in foot on linux)

surreal path
#

FOUND IT

tawdry mirage
#

lol

kind root
#

I think I found it as well

surreal path
#

๐Ÿ˜ญ

finite summit
#

wait

#

I found it

kind root
#

Can nyaux get more stars than Linux

surreal path
#

please someone star nyaux

#

๐Ÿ˜ก

finite summit
#

no

surreal path
#

why

finite summit
#

because if I clicked the button

#

it would unstar it

#

:)

surreal path
#

OHHH

#

yayaya

#

:D

finite summit
edgy pilot
surreal path
#

okay

#

dw ill get there soon

kind root
#

Ill star when it gets an EC controller driver

#

Or maybe I already starred it

surreal path
#

u didnt

kind root
#

Then yeah u have my conditions

surreal path
kind root
#

What

surreal path
#

wait it doesnt need pci??

kind root
#

Its two io registers

#

Not a pci device

surreal path
#

is there a spec i can read

kind root
#

Yes

#

Acpi spec

surreal path
#

kk

kind root
#

Look at pmos as an example

edgy pilot
#

I don't really know what embedded controllers are

flat nymph
#

microcontrollers

kind root
#

Get/set a byte

surreal path
#

whats firmware state

finite summit
#

translation: just some retarted ACPI thing

edgy pilot
#

what is it used for

finite summit
#

some retarted ACPI thing

flat nymph
#

thing which makes your computer go wroom wroom when you press buttons on its case

kind root
flat nymph
#

power button (sometimes)

surreal path
#

how to do this

flat nymph
#

On laptops it's battery, lid, chargers, fans and other stuff

kind root
edgy pilot
#

ah

kind root
surreal path
kind root
#

Yes

surreal path
#

how

finite summit
#

magic

kind root
#

It tells aml you're windows 11

surreal path
#

๐Ÿ˜ญ

finite summit
#

(which I am)

surreal path
#

๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ

finite summit
#

((nvm that's an insult to obos))

surreal path
#

and what if you told aml ur nyaux

finite summit
#

it becomes sad

kind root
#

It would proceed to off itself

flat nymph
edgy pilot
finite summit
#

telling it you're not linux

kind root
surreal path
flat nymph
#

although idk, windows 11 is really bad on my PCs

edgy pilot
kind root
flat nymph
finite summit
#

ik

flat nymph
surreal path
#

okay

kind root
kind root
elder shoal
#

if I tell acpi I'm windows 12 do I get access to the secret windwos build

surreal path
edgy pilot
#

yes

kind root
surreal path
#

and if it doesnt find it

#

it kills itself

#

basically

kind root
#

It assumes oldest os

surreal path
#

oh

#

yeayae i see

#

anyways

kind root
surreal path
#

how long does it take to implment a EC controller driver

surreal path
#

okay

#

first

#

impl these functions

#

next

#

yes

#

ec controller driver

edgy pilot
kind root
#

Ask mishakov for assistance he recently implemented one that works well

surreal path
#

@flat nymph

flat nymph
#

@surreal path

kind root
#

Dont blind ping

surreal path
#

๐Ÿ˜ญ

kind root
#

Just ask when you have questions lol

surreal path
#

okay lol

edgy pilot
#

@surreal path

#

good night

surreal path
#

yes

#

goodnight

#

!!!

kind root
flat nymph
#

good night @edgy pilot

surreal path
#

why is linux bit shiffting data alignment by 1

#

why is linux doing that lol

#

anyone know?

cinder plinth
#

because thats how it works

#

alignment is probs a power-of-2 value

tawdry mirage
#

the alignment is stored as log_2 of the value

cinder plinth
#

or rather

#

the power

#

yea

surreal path
#

si yr diubg this to make it not a power of two?

#

so your doing *

cinder plinth
#

no

#

log_alignment is an exponent

tawdry mirage
#

1<<x is the same as 2**x and 2**log_2(x)=x

surreal path
#

i understand math

#

๐Ÿ˜ญ

#

dont*

flat nymph
#

It's quite easy once you see it

surreal path
#

so its making it a power of two

#

???

#

is this correct

flat nymph
#

Yes

surreal path
#

okay

tawdry mirage
#

the alignment is always a power of 2, so instead of storing 2**x as a number you can just store x since getting the alignment from that is simple

flat nymph
#

If you have 100.000 and move the point 1 right, you get 1000.00, which is multiplying by 10

#

Is the same with 0b100 to 0b1000

#

You multiply by 2

surreal path
#

why are u multipling it by 2

flat nymph
#

Just different base

#

The math is the exact same as with decimal numbers

surreal path
flat nymph
#

I.e. what you study at school

flat nymph
#

Soy you convert it back by doing 2^value

surreal path
#

added this

flat nymph
#

Why are you shifting it right?

surreal path
#

sorry

#

mistake

#

there

#

no need to do this anymore

#

actually ill js remove what i js added

tawdry mirage
surreal path
#

this is for v2

flat nymph
surreal path
#

since linux doesnt shift it

surreal path
#

didnt i take this from u

#

fix it

flat nymph
#

I don't have sanitizers

surreal path
#

hold on

tawdry mirage
#

i mean it's a pretty simple pattern for the compiler to figure out and optimize anyway

surreal path
#

oh yeah this

flat nymph
#

Yeah, except that the code becomes unreadable when it's full of stuff like this

surreal path
#

ill js copy what linux does

tawdry mirage
flat nymph
#

Although if Nyaux just gets rewritten every few months...

surreal path
#

and nuke the entire file

surreal path
#

im sticking to this

tawdry mirage
elder shoal
#

ubsan is boring

#

real programmers just dont create ub

flat nymph
#

Yeah

#

And clang inserts ud2

tawdry mirage
#

not always

flat nymph
#

Or optimizes shit out and you get insane bugs ultrameme

tawdry mirage
#

yeah

flat nymph
#

My kernel doesn't have framebuffer output so there is nowhere to complain to about UB (sanitizers) galaxybrain

surreal path
#

okay i did what linux does for v1

#

ish

#

im js gonna follow up with what linux is doing and if there is any missing functions reference the linux functions for them

#

nvm linux is missing some clang functions???

#

not even managarm does it?

#

the hell

orchid dawn
tawdry mirage
#

so now linux no longer says it's linux

surreal path
#

im taking obos's ubsan im too sick for this

finite summit
#

you mean sortix' ubsan, right

surreal path
#

yea

#

huh???

#

it has a complete type

#

bro

#

oh right

#

nvm

#

well clang compilers

#

it works perfectly on debug build

#

oh waits

#

its running at o2

#

think

#

yea it is

#

i ran nyaux on o3

#

it worked fine???

#

less goo
??

#

nyaux on clang???

#

worked perfectly?

#

even on -Ofast??

#

damn

#

well nyaux runs on clang

#

:)

#

on tcg

#

gcc

#

-O2

#

oh

#

on clang

#

this happens

finite summit
#

I will never understand how nyaux has more "committed memory" than obos when it doesn't do half as much

surreal path
#

even tho

#

i do return it???

#

wtf is clang doing

elder shoal
#

its almost impressive

surreal path
#

ubsan says nothing

surreal path
#

idk why either

surreal path
#

it said it foudn it

#

and didnt return it?

#

bro what

#

why is the if statement succeding

#

omg

#

gcc

#

im stupid

#

and gcc didnt catch this

#

yay im sticking to clang

#

:)

surreal path
#

slightly better

#

with clang

#

gcc probs generated the call

#

to return the value

#

or smthin

finite summit
surreal path
#

๐Ÿ˜ญ

#

ummm

#

on kvm???

#

thats

#

38k

#

wtf

#

hitting 43k

#

@finite summit

#

whats the highest obos has

finite summit
#

with or without bump allocator?

surreal path
#

without

finite summit
#

no

surreal path
#

u dont have anything but a bump allocator???

#

or

#

are u too scared

#

hold on

finite summit
#

no, I'm not telling you

surreal path
#

lemme see

#

uacpi readme

finite summit
#

you don't have stuff implemented

#

so yours is unofficial

surreal path
#

WE BEAT OBOS

#

WE BEAT OBOS

#

WE BEAT OBOS CHAT

finite summit
#

no you didn't

#

you're unimplemented

#

no PCI helpers

surreal path
finite summit
#

no swapping?

surreal path
#

i have a vmm

surreal path
surreal path
surreal path
#

soon โ„ข๏ธ

surreal path
#

TMRW

#

IM SICK

#

๐Ÿ˜ญ

finite summit
#

no locking primitives?

surreal path
#

we have spinlocks

finite summit
surreal path
finite summit
#

no suspend to S3 support?

surreal path
finite summit
#

no driver interface?

surreal path
#

no need to flex

#

anymore

#

please

#

i submit

surreal path
#

can we update the speeds

finite summit
#

not until you get pci

surreal path
finite summit
#

also:

[uACPI][INFO]: successfully loaded 1 AML blob, 1704 ops in 8ms (avg 199539/s)```
#

I got this on my other pc

surreal path
#

dman nvm

finite summit
#

with the scheduler disabled on uacpi init

surreal path
#

i submit

finite summit
cinder plinth
finite summit
#

@brisk zenith

#

it's his os

cinder plinth
#

ah

kind root
#

Oh wait that is qemu I think?

#

Which cpu

kind root
#

And not until your mutex helpers do something

finite summit
finite summit
#

Actually

finite summit
kind root
#

what changed

finite summit
#

The machine and environment

#

Wait it was using -nographic with

#

qemu

thorn bramble
#

i dont think that matters much

surreal path
#

man im so sick

#

ugh

#

i took a bunch of medience

#

earlier

#

still sick

#

this is legit cringe

#

how tf am i gonna work on nyaux like this

edgy pilot
surreal path
thorn bramble
#

i believe what ilobilo was trying to say is just don't be sick

hollow goblet
#

tbh i work on projects better when I'm sick

surreal path
#

do you like the pain

#

the constant coughing

#

do u like

#

that

hollow goblet
#

nah not that

#

coughing is pain

#

but like

#

when i'm calling in sick to school

#

with a fever or something

#

or a runny nose

#

or diarrhea

#

it's fun

#

especially diarrhea

edgy pilot
#

can't

#

you

#

people

#

type

#

messages

#

on

#

a

#

single

#

line?

#

it's

#

very

#

annoying

#

to

#

read

#

this

#

way

surreal path
hollow goblet
#

i cannot type a full sentence

#

wait i just

#

did

edgy pilot
#

instead of pressing send, imagine that you did and continue typing

hollow goblet
#

ok i

edgy pilot
#

it's not hard

hollow goblet
#

will try

#

ok that last one was a joke

hollow goblet
surreal path
#

me looking at the thread eating my food be like:

hollow goblet
#

nyauxmaster

#

next time you get diarrhea please try this. i guarantee you it will work wonders

surreal path
#

ok

hollow goblet
#

i set myself a goal and i award myself with a bathroom break and if i can't do it until i shit myself, that's a punishment

edgy pilot
#

๐Ÿคจ

#

you shit yourself?

hollow goblet
#

omg pastafarian

edgy pilot
#

R'amen brother

hollow goblet
#

sadly i am not a pastafarian

#

i am an atheist alevi