#Managarm and related projects

1 messages · Page 6 of 1

upbeat smelt
#

since it's basically doing what the x86 code is doing in tsc deadline mode

carmine current
#

why stack exhaustion btw? Irqs should never exhaust the stack no matter how frequent they occur

#

yeah we could do that

lament grove
#

BadgerOS does this regardless of architecture or SOC

#

It has one generic file for dealing with it and defers timer specifics to the timer's driver

fervent zodiac
#

idk it jmp 0's at some point

#

or maybe not actually hmm

lament grove
#

Stacks are hard to debug if you don't have any guards around them

#

Specifically that overflow guard; does Managarm use one?

fervent zodiac
#

uh

#

okay so i dont know why

#

but i think that 2^64-1 is not a valid value for cntp_cval_el0

carmine current
#

that's just basically infinity far into the future right?

fervent zodiac
#

or at least apple does not like it

#

it is supposed to be

lament grove
fervent zodiac
#

what my m1 treats it as, however

upbeat smelt
#

we could also mask the irq in the control reg

fervent zodiac
#

is infinitely far in the past

lament grove
upbeat smelt
#

also, i think the problem is that we try using both the physical and virtual timers

carmine current
upbeat smelt
#

afaicu we should only ever use the virtual one, otherwise we'll see jumps in the raw timestamp due to the host scheduling differences

carmine current
fervent zodiac
#

resetting cntp_cval_el0 to 0xFFF'FFFF'FFFF'FFFFULL works

upbeat smelt
#

or alternatively, only ever use the physical timer if we don't mind those jumps

fervent zodiac
#

sooooooooo

#

30 is the physical timer btw

upbeat smelt
carmine current
#

If it causes an immediate irq while we expect it to cause an irq only in 300 years, that'd obviously explain the problem meme

fervent zodiac
#

yeah it does

#

lol

#

the timer does work as normal though

#

currently it reads 10537447172497

lament grove
#

Is there any reason you don't just disable the alarm in some way?

fervent zodiac
#

suspiciously close to my uptime

upbeat smelt
#

but as i mentioned we can just mask the irq in the control reg

lament grove
#

RISC-V does guarantee that for its equivalent but a quick skim of the ARM docs for this timer doesn't seem to say so

fervent zodiac
fervent zodiac
#

but hear me out

#

its an apple

lament grove
#

Like those apple USB extension cords that only fit their keyboards

fervent zodiac
#

lol

#

ffff...fffe also works

#

apple moment lmfao

#

oh wait is this the virtual timer??

#

hmm

#

i dont know and i dont care

#

its one of the two

upbeat smelt
#

the linux devs yearn for auto ```c
if (type == ARCH_TIMER_TYPE_CP15) {
typeof(clk->set_next_event) sne;

fervent zodiac
#

uh yes i think its virtual

#

wait

#

wtf

#

i need to more carefully test this before i get confused

#

ok nevermind

#

fff...ffe does not work

upbeat smelt
#

what about 7fff...ffff?

#

if it is treated as signed

lament grove
fervent zodiac
#

okay i dont know anymore

#

math is too hard

#

and it doesnt ALWAYS happen

upbeat smelt
#

i wonder what's the longest uptime you could get on linux before it croaks

carmine current
#

Maybe it's not that it treats it as signed but that it ignores writes with reserved bits set?

#

If it implements less than 64 bits

fervent zodiac
#

hmm

#

dont think so

#

and its not all Fs either

vestal sapphire
#

IT WORKS

upbeat smelt
#

nice

trim eagle
#

pog

vestal sapphire
trim eagle
#

meanwhile, systemd getting closer and closer

fervent zodiac
#

hmm i dont even know if its actually the issue

#

i now got this stack trace

#

which is not inspiring confidence

lament grove
#

lmao rip

upbeat smelt
#

oops lol

lament grove
#

Have you considered double / triple fault handling? That helped me debug ISRs and trap handlers early on in BadgerOS.

fervent zodiac
upbeat smelt
#

address 456

fervent zodiac
#

yeah idk

magic marsh
#

nah, not just 32-bit in general, we need Managarm for 32-bit PowerPC ultrameme

fervent zodiac
#

i wonder if its another wonderful integer overflow

#

or cache stuff

upbeat smelt
#

cache stuff could be likely

fervent zodiac
#

i think you win the cache game!

#

yeah

#

perfect

upbeat smelt
#

does that work?

fervent zodiac
#

yes

upbeat smelt
#

amazing

fervent zodiac
#

this is the power of a good icache meme

upbeat smelt
#

i would've imagined the page table caching would've been correct

#

i know icache management is borked

fervent zodiac
#

its dcache actually wait

#

lol

#

its just a good cache

upbeat smelt
#

i have a patch lying around locally somewhere that i should clean up and push

fervent zodiac
#

face it

upbeat smelt
#

to flush icache when faulting in an executable page

fervent zodiac
#

WTF

#

you dont do that?

#

well then uh

lament grove
#

Do we need a "it isn't cache\nit's never cache\nit was cache" T-shirt?

upbeat smelt
fervent zodiac
#

why am i doing this

#

its never gonna work

#

since m1 has caching

upbeat smelt
fervent zodiac
#

yeah

#

oh

#

lmao

#

i guess the m1 has negative tlb entries

#

wait wtf

#

where do you flush the tlb?

upbeat smelt
fervent zodiac
#

im just gonna go around and fix your tlb maintainance logic lol

upbeat smelt
#

but i dug it up in my git stash

#

at entry 37 meme

fervent zodiac
#

lmao

upbeat smelt
fervent zodiac
#

missing, mostly

upbeat smelt
#

missing?

fervent zodiac
#

hmm wait no

#

uh

#

okay i think the issue is that you are missing a reordering fence

#

yes

#

you must use DSB ISHST; ISB after updating page tables

upbeat smelt
#

okay that makes sense

fervent zodiac
#

yeah so i added thor::pageTableUpdateBarrier();

#

and now im spamming it out after every map

#

wtf

#

what is this code

#
void KernelVirtualAlloc::unmap(uintptr_t address, size_t length) {
    assert((address % kPageSize) == 0);
    assert((length % kPageSize) == 0);

    // TODO: The slab_pool poisons memory before calling this.
    //       It would be better not to poison in the kernel's VMM code.
    unpoisonKasanShadow(reinterpret_cast<void *>(address), length);

    for(size_t offset = 0; offset < length; offset += kPageSize) {
        PhysicalAddr physical = KernelPageSpace::global().unmapSingle4k(address + offset);
        physicalAllocator->free(physical, kPageSize);
    }
    kernelMemoryUsage -= length;

    // TODO: we could replace this closure by an appropriate async::detach_with_allocator call.
    struct Closure final : ShootNode {
        void complete() override {
            frg::slab_allocator<CoreSlabPolicy, IrqSpinlock> coreAllocator(corePool.get());

            KernelVirtualMemory::global().deallocate(reinterpret_cast<void *>(address), size);
            Closure::~Closure();
            asm volatile ("" : : : "memory");
            frg::destruct(getCoreAllocator(), this);
        }
    };
    static_assert(sizeof(Closure) <= kPageSize);

    auto p = frg::construct<Closure>(getCoreAllocator());
    p->address = address;
    p->size = length;
    if(KernelPageSpace::global().submitShootdown(p))
        p->complete();
}

``` im sure im reading this wrong
#

but this seems like a kernel UaF

#

the kernel frees the backing page

#

and only then dispatches a TLB shootdown

#

that is uh

#

very incorrect

cinder trench
#

its only a uaf if there was a uaf to begin with

fervent zodiac
#

oh right

#

yeah im stupid

cinder trench
#

it doesnt have the same considderations as userspace code

fervent zodiac
#

yeah i realized now

cinder trench
#

u can Assume nobodys touching it by then

#

that lets u batch kernel virtual memory shootdowns a lot more aggressively and stuff

fervent zodiac
#

this is a kernel code path so its fine

cinder trench
#

until its totally full

#

then you free everything that was freed previously and do a single shootdown ipi

#

and have basically eliminated kernel vm shootdowns

fervent zodiac
#

ah yeah

#

cool

#

lets see i applied a generous amount of barriers

cinder trench
#

potential managarm improvement right there since it seems its doing a shootdown per virtual page.

fervent zodiac
#

let's see if the arm gods are happy

#

panics on thor: ECAM interrupt-maps with non-zero parent #address-cells are unsupported

#

yeah its the standard qemu interrupt swizzle i think

upbeat smelt
#

maybe the vgic stuff is messing with it

fervent zodiac
#

yeah its definitely vgic

#

the address cells are just 0

#

🤷

upbeat smelt
#

i suppose an improvement would be if a shootdown node could point to multiple ranges of pages at once

#

to avoid multiple ipis

fervent zodiac
#

No IRQ controller associated with /intc@8000000

#

uuuuuuh what

#

it's an arm,gic-v3

upbeat smelt
#

oh that might be a me issuee

fervent zodiac
#

oh lol

#

yeah

upbeat smelt
#

korona changed how the dt stuff works a bit for interrupts when porting to riscv to make it less ass and i've said i'll port the arm side but haven't gotten around to it yet

fervent zodiac
#

ah yeah cool

#

well ill do it instead ig

cinder trench
#

does managarm have deadlock detection

cinder trench
#

that sounds like a major oversight

upbeat smelt
#

afaics it's either whole asid or whole tlb?

#

i might just be blind though

cinder trench
#

whole tlb works

upbeat smelt
#

well it works but that throws away more than we want

cinder trench
#

its not a big deal if the batching is as extreme as what i gave (allowing the entire dynamic kernel va space to get filled up before you actually free and do a single shootdown)

#

practically undetectable

upbeat smelt
#

true

cinder trench
#

that in itself could cause a latency spike though from how much "actual" freeing youd suddenly be doing so youd probably batch much less than that

#

but still it wouldnt be a big deal

upbeat smelt
cinder trench
#

:)

#

what about measures to avoid priority inversion

#

like priority ceiling or priority inheritance or random boosting

fervent zodiac
#

okay i think it got to userspace!

#

no graphics though

#

i'll give it like a 50% chance its my shitty interrupt code

vestal sapphire
upbeat smelt
#

ps/2 since the controller has a small buffer and we might miss data otherwise, virtio-console since it's used to dump kernel ring buffers for things like the kernel profiler or allocation tracing and we don't want to lose data

#

anyway i should stop procrastinating working on stuff i'm supposed to be doing

fervent zodiac
#

yeah idk it still doesnt work

carmine current
#

Yeah priority inheritance is definitely a feature that we're missing in the kernel

#

and that we should implement sooner or later

cinder trench
#

theyre cool

carmine current
#

yea that might be a good idea. One question that I still wanted to research is whether we can also do priority inheritance over IPC. Basically, let one process cooperatively donate its priority to another process

#

That would be useful for example if a high priority process (say, sound driver) needs to request something from a normal priority process (e.g., USB host controller driver). You probably don't want the USB hcd to always run at a high priority, but if it needs to process a request by the sound driver, it would make sense to boost its priority

carmine current
brittle mauve
#

the arm code never calls associateIrqController

carmine current
#

the ARM code has a separate code path for PCIe interrupts though

brittle mauve
#

that define is missing __ in the end

carmine current
#

uhh

carmine current
carmine current
brittle mauve
#

yeah that's a good question

carmine current
#

maybe it was never tested properly

#

that's probably the case. if i fix this, then it boots for me

carmine current
brittle mauve
#

I also had issues with weston last time I tried it on aarch64

fervent zodiac
#

okay

#

time to look at my buggy gic code some more

#

oh also

#

netserver crashes on arm

#

Legacy transports are unsupported on this architecture

#

hmm now that i think about it

#

this is really fucking weird

#

why am i not getting kmscon?

carmine current
brittle mauve
#

its still kinda weird that it just hangs there forever

carmine current
#

for some reason the virtio-net crash makes udevd hang for a minute or so

#

not sure why it doesn't just continue

fervent zodiac
#

ah okay

#

its trying to run weston now

#

which fails because i dont hate myself enough to build weston

#

now thats back to working

#

the performance is still not great

carmine current
#

so it works now on M1 kvm?

fervent zodiac
#

yes

carmine current
#

that's nice

fervent zodiac
#

although its quite slow

#

dont know if its managarm, my m1 or qemu

#

or something else

carmine current
#

how slow is quite slow? :^)

fervent zodiac
#

significantly worse than linux in muvm

carmine current
#

It's expected that it's slower than Linux but if it's really slow, something else may contribute to this as well

#

should be way faster than x86 with tcg though, isn't it?

fervent zodiac
#

it is faster

fervent zodiac
carmine current
#

you mean when typing?

fervent zodiac
#

yeah

#

and after enter before a command runs

carmine current
#

what's weird, latency on x86 is certainly way smaller than 50ms

fervent zodiac
#

ill try ffmpeging it to a format discord is happy with, one sec

carmine current
#

what is time ls?

fervent zodiac
#

ugh

#

nvm

fervent zodiac
carmine current
#

huh

fervent zodiac
#

sometimes 230-240

carmine current
#

it's 10x faster for me on x86

#

i wonder if we're doing something that makes aarch64 kvm choke

#

by doing too many exits or so

fervent zodiac
#

i'll try profiling

#

apple_firestorm_pmu/cycles/P: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat' nevermind

carmine current
#

perf can also show a lot of kvm stats

#

that might be useful

fervent zodiac
#

hmm i wonder if its the memory barriers i put in a bunch of places

#

they are required for correctness, though

#
Assertion failed: physical != PhysicalAddr(-1) && "OOM"
Assertion failed: physical != PhysicalAddr(-1) && "OOM"
In function fetchRange at ../../../src/managarm/kernel/thor/generic/memory-view.cpp:1799
In function fetchRange at ../../../src/managarm/kernel/thor/generic/memory-view.cpp:1799
``` oh and at some point this happens
#

that's not worrying or anything

#

i have 2 gigs assigned

#

this is a vmexit

#

that msr

#

about 18% of them

carmine current
#

that can definitely be improved

#

i can actually probably do that in the evening

#

we use IPIs to ping remote CPUs when threads are resumed by we don't make a lot of effort to suppress them when they are not necessary

fervent zodiac
#

but even without SMP it is still slow so

fervent zodiac
#

weirdly, if i run while true; do time ls; done then the times do seem to come down

#

before it all, uh, crashes

#

posix: Thread killed as the result of signal 2

#

ah thats just me ^C ing it

#

nvm

#

this is weird

#

uh. host-qemu doesn't build

#

meson complains about relative -Dprefix ../../../src/ports/qemu/meson.build:1:0: ERROR: prefix value '../../build/tools/host-qemu' must be an absolute path

vestal sapphire
#

huh

#

ig we never tried building host-qemu on a non-x86 machine

#

dunno why this specific error is a thing tho lol

#

xbstrap should make that an absolute path tho

#

idk why that is relative tbh

full slate
carmine current
#

Automatically doing it is probably not possible but it would be nice to integrate it into the ipc syscall

#

such that it doesn't add any substantial overhead

vestal sapphire
#

funni idea for porting binary stuff: we could just implement something like prctl(PR_SET_SYSCALL_USER_DISPATCH, PR_SYS_DISPATCH_ON) and have an adapter interface?

vestal sapphire
#

it's already a thing

#

on linux

fervent zodiac
#

doesn't really make sense as an emulation control API though

#

if anything personality(2) is a better fit

#

or a sysdep, mlibc::sys_set_user_syscall_handler(address) which will make the kernel return to address whenever it gets a syscall

vestal sapphire
#

well it would be for running linux binaries on managarm where we can keep the dynamic linked stuff but need to catch syscall()

fervent zodiac
#

how would a prctl work anyway?

#

prctls are a posix server thing

vestal sapphire
#

we could probably make our observer stuff catch syscalls

rigid wyvern
#

e

fervent zodiac
#

i dont understand why you would use a prctl for this

vestal sapphire
#

depends on what level we'd want to emulate the syscalls

fervent zodiac
#

i mean, doing it in process would make a lot of sense

vestal sapphire
#

personality(2) turns this into a pure kernel/posix-subsystem thing, while prctl defers to a userspace handler

fervent zodiac
#

you dont have to use a linux syscall anyway

quaint fern
#

try the mach "Emulator" mechanism

fervent zodiac
#

it's called "doing your own design instead of shoehoring extra functionality into linux apis where it does not make any sense"

fervent zodiac
#

ah

vestal sapphire
fervent zodiac
#

okay nevermind

#

this is so fucking cursed

#

as like an api

vestal sapphire
#

this is how people get mac binaries running on linux

#

for instance

fervent zodiac
#

ahhh

vestal sapphire
#

best username on gh btw

carmine current
#

How would that be different from implementing syscall() as a giant switch in mlibc

#

Maybe i misunderstand the goal

#

Is the goal to run linux binaries without recompilation?

fervent zodiac
#

honestly having a linux emulation layer inside of mlibc would be very cool

brittle mauve
#

its just a normal variadic function not defined in a header

fervent zodiac
#

and sometimes people inline their own syscall instructions regardless

brittle mauve
#

usually non-glibc binaries are the ones that also have source available

fervent zodiac
#

fair

brittle mauve
#

but yeah ig its possible that there could be manually written syscall instructions

vestal sapphire
vestal sapphire
brittle mauve
#

though with this kind of syscall emulation thing wouldn't it basically need a chroot (if you don't want to have a mlibc compat layer binary)?

#

with like all the X and whatever libraries + nvidia libs + the programs you want to run all compiled for linux

vestal sapphire
#

I haven't thought about it too much meme

carmine current
#

If you want to support linux binaries unmodified, just port kvm and use qemu-user or gvisor :^)

trim eagle
#

We have qemu, so just KVM is left meme

vestal sapphire
#

but muh gpu accel

#

and factorio

carmine current
#

pcie passthrough is a thing

vestal sapphire
#

you go implement that kthx

carmine current
#

reverse virt-gpu meme

vestal sapphire
#

nested virtio-gpu

carmine current
#

If you add kvm, I'll add passthrough ;D

vestal sapphire
#

don't tempt me with a good time

vestal sapphire
trim eagle
#

I see a new target after systemd meme

#

Oh Leo, you were doing network memes, maybe you can look at implementing loopback interfaces?

trim eagle
vestal sapphire
#

no idea where to start with that even

#

ngl

trim eagle
#

The KVM stuff? Probably make a device node for it and log whatever stuff gets done to it. Then hook that up

nocturne tide
#

i had some stuff done locally but

#

oh well

#

the async stuff won

#

i don't understand how any of it works

#

i have been offered help btw, so it's totally a me issue

#

if leo doesn't get to it i might take a look at it another day

trim eagle
#

Would be based

#

Then Leo can do loopback interfaces meme

fervent zodiac
carmine current
#

Pitust's vmexit stats prompted me to look at perf stat kvm on my x86 machine and I noticed that for <= Kaby Lake (= my host), KVM perf can be improved by a solid 40% by doing -cpu host,-umip meme

#

this doesn't affect newer intel cpus though

#

the reason is that KVM devs apparently decided to emulate umip no matter if it's supported by the host or not

#

by trapping every table access including ltr

trim eagle
#

lol

carmine current
#

which we do on task switch when the I/O permission bitmap changes

trim eagle
#

That might be a good one for me too

vestal sapphire
#

anyways I have 8 PRs in queue for review, I need to work on something that takes a while to empty that queue

trim eagle
#

Loopback????

carmine current
#

I'll try to reduce the number of ping IPIs later today

#

that seems like a low hanging perf improvement

#

afterwards I'll probably either do imsic on RISC-V (as that might be less broken than plain aplic in qemu) or may better OOM handling

trim eagle
#

@carmine current may I also suggest fixing the load balancing PR?

carmine current
#

yeah

trim eagle
#

Highly based

carmine current
#

user mode instruction prevention

#

disables sgdtr and stuff like that in user mode

fervent zodiac
#

yeah i see

#

fun!

#

okay lets try profiling managarm

fervent zodiac
#

oh also

#

managarm crashes if you try profiling on !x86

#
/*
 * PMC[0-1] are the 48/64-bit fixed counters -- PMC0 is cycles and PMC1 is
 * instructions (see arm64/monotonic.h).
 *
 * PMC2+ are currently handled by kpc.
 */
#

pmc0 is S3_2_c15_c0_0

#

(just making some notes around m1 profiling)

#

pmc doesn't seem to work inside qemu

brittle mauve
#

also one thing which should be implemented for aarch64 is user access prevention

#

though its not really that difficult, just have to check for pan support and if its supported then use msr s0_0_c4_c1_4, xzr to enable it and msr s0_0_c4_c0_4, xzr to disable it (idk why there are no proper names for those msrs)

fervent zodiac
#

no hits in linux

brittle mauve
#

maybe it uses the pstate to change it or whatever

fervent zodiac
#

yeah

brittle mauve
#

I think I got these msrs from optee

fervent zodiac
#

also annoyingly

#

linux doesn't enable PMCs for guests

#

😦

#

damn, i dont even know if that is possible on m1

brittle mauve
fervent zodiac
#

yeah i think apple PMCs are just unusable in kvm

carmine current
#

that's sad

#

x86 PMCs work generally fine in KVM

#

it doesn't support all PMCs that native supports but that's expected

fervent zodiac
#

or maybe not

#

i do not know

#

i suspect this is at play

#

(xnu code)

#

so i suspect that PMC N for N in [0, 7], at EL1, is 1<<(16+N) in PMCR1_EL1

#

idea.

#

what if i write a kernel module to set it

#

security is boring

carmine current
#

lol

fervent zodiac
#

0xffffffffffffffff sounds like a secure value for PMCR1_EL1

serene portal
#

managarm m1 when

carmine current
#

just enabling it is probably not enough, it also needs to be context switched by kvm

fervent zodiac
#

s3_1_c15_c1_0

carmine current
#

otherwise you're also measuring the host

fervent zodiac
#

the host is cool too

carmine current
#

:^)

fervent zodiac
#

i'll just kill firefox

#

or make sure my system is quiet for testing

#

hmm actually

#

that could mess with linux really badly

#

yeah maybe i won't do that

#

now that i think about it

#

or rather, enabling IRQs could

#

because that definitely needs saving/restoring

#

so yeah i wont

carmine current
#

yeah true

fervent zodiac
#

if linux kernel code wasnt so crap, i'd consider implementing PMC support for linux

#

actually i think i also can't contribute to asahi now that i looked at the xnu code

carmine current
#

isn't xnu open source?

fervent zodiac
#

yeah, under an apple-flavored GPL

carmine current
#

just looking at code doesn't mean that a re-implementation violates copyright

native prairie
fervent zodiac
#

ah no i can read it

fervent zodiac
quaint fern
fervent zodiac
#

but aiui its a real open source license

brittle mauve
#

I'd say that as long as you literally don't copy code its going to be fine

quaint fern
#

none of the liberal licences permit the licence text to be expunged

fervent zodiac
#

wait wtf

#

perf stat can read the counters

#

i think maybe?

quaint fern
#

so if applying the same principle, any time you read BSD or even MIT licenced code, you'd be having to reproduce the licence notice

carmine current
#

yeah

native prairie
fervent zodiac
carmine current
#

obviously if you try to memorize the literal code and try to replicate it from memory etc the story is different

fervent zodiac
#

oh APSL is also free software

carmine current
#

but reading the algorithm and re-implementing the idea is not a copyright violation

fervent zodiac
#

yeah

#

anyway it can totally count cycles and instructions

#

lets unshallow my copy of linux and try more aggressive grep

#

and yeah kvm doesnt expose them to VMs

carmine current
#

are the PMCs apple specific? or architectural for aarch64?

fervent zodiac
#

apple specific

#

not passed to VMs without a special entitlement on macOS, not passed to VMs at all on linux afaict

#

hmm perf kvm record fails with apple_firestorm_pmu/cycles/Pu: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'

carmine current
#

wtf why don't they support overflow interrupts

fervent zodiac
#

they... do

fervent zodiac
#

i think the driver is just broken tbh

vestal sapphire
#

ig the next wide sweep I could do is this

#

for improving the request logging experience

#

so that a symlink request log might look like

#

result on e9

fervent zodiac
#

couldn't you implement logging more generically?

#

just send a copy of every request to dmalog

#

and then support bragi in wireshark :^)

carmine current
#

Maybe you could also make it more general by using some kind of attribute syntax

median wharf
#

cant we use something off the shelf?

carmine current
#

<< req_log::Attr{"from", ViewPath{...}} <<

#

Might also make sense to not log directly to stdout

#

that way we could wire it up in such a way that you can get the log in a machine readable way and only for some processes etc

fervent zodiac
#

i'd just dump the data to dmalog

#

a new dmalog channel

#

and then have a machine analyzer on the host as the only way of reading it

vestal sapphire
#

anyways the nice thing about converting it to lambdas is that switching it over to something else becomes easier

#

@trim eagle thoughts?

vestal sapphire
#

I was more asking about the pitust idea

#

we'd need to make up a special format that encodes some data like PID and protocol (fs vs posix for instance), and then append the bragi message

#

ig we could also try to use virtio-console

trim eagle
#

I mean, I wouldn’t necessarily make it only machine readable. The e9 logs as is are valuable (even tho the information logged could be better). But for the really extensive logging dumping it to a file and wiresharking it sounds pretty good

vestal sapphire
#

yeah we can just make the output configurable so that you can get (maybe even configurable selective) e9 logging + a wiresharkable dump

#

might even be helpful for stuff like systemd

trim eagle
#

Yeah. That sounds good

vestal sapphire
#

so I think step one is doing what the screenshots above hint at, which is prettier request loggiing on e9

trim eagle
#

Yeah that would be nice

vestal sapphire
#

hmm if I try to .getPath() on the pathResult in the readlinkat request handling I get a treeLink() not implemented for this FsNode exception

#

again

trim eagle
#

Ahhh

#

I have something for you locally that might be of use

vestal sapphire
#

pls gib

trim eagle
#

Unfortunately I can’t access that rn

vestal sapphire
#

NOOOOOOOOOOO

trim eagle
#

So gimme a sec while I think hard to get it

vestal sapphire
#

is it a fix to getPath?

trim eagle
#

No

#

It’s a tree link impl for pts

vestal sapphire
#

ah

trim eagle
#

If you check pts.cpp, there’s a globalRootLink or something like that?

#

Make treeLink return that

#

That’s what I did with Korona

vestal sapphire
#

based

#

testiing in 3 sec

trim eagle
#

That works?

carmine current
#

bragi msgs are self delimited anyway

#

for example ostrace is basically just a stream of self delimited bragi msgs

#

you can also re-use ostrace for this purpose btw

#

but not yet their parameters

#

that'd be easy to adapt though

carmine current
#

i grepped for all directory node implementations and that were the only ones where it was missing

vestal sapphire
#

what do I return for the procfs fd node treeLink?

trim eagle
#

Yeah uhhhhhh I have that locally but I forgot to commit it

#

So I don’t have access now as I only have my laptop

vestal sapphire
#

ok I think I have iit

carmine current
#

basically the same that the root dir does

#

you create the Link, the somehow tell the directory node about the Link

vestal sapphire
#

hmm it's a bit more annoying as it gets directMknodeed

trim eagle
#

We made a directMkFdnode for it

#

I recommend you do the same

carmine current
#

you could also check if it's possible to add the logic to directMknode

#

or some directMkdir

vestal sapphire
#
template<typename T>
requires requires (T t) { {t._treeLink} -> std::same_as<Link *&>; }
std::shared_ptr<Link> DirectoryNode::directMknode(std::string name, std::shared_ptr<T> node) {
    assert(_entries.find(name) == _entries.end());
    auto link = std::make_shared<Link>(shared_from_this(), name, std::move(node));
    node->_treeLink = link.get();
    _entries.insert(link);
    return link;
}
trim eagle
#

Yeah that works

carmine current
#

seems cleaner to have a directMkdir though instead of adding an overload that silently does something extra meme

trim eagle
#

YOOOO LOAD BALANCING IS MERGED

vestal sapphire
#

ok it works now

carmine current
#

I have a local patch to avoid self IPIs when resuming threads

#

that gives a nice perf boost, at least inside virtual machines

#

Now the most frequent vmexit reason is IO_INSTRUCTION

#

can perf tell me for which RIPs this occurs most often?

carmine current
#

okay now the vmexit stats look sane

trim eagle
#

Awesome! We might want to try glxgears and see what the FPS is now

carmine current
#

that's highly machine dependent obviously

#

on my host it's around 200 fps

trim eagle
#

Obviously but 200 FPS is pretty damn good

#

Highest I’ve ever gotten on my laptop was 120

#

If / when patches are posted I’ll try it on the laptop

#

Once before LB and this work and once after

vestal sapphire
#

I think I have fixed the dhcpcd fork_cb meme

#

the fix is in un-socket

trim eagle
#

Ahh

#

Pog

vestal sapphire
#

I specifically tested this on linux

#

when you have a socketpair, and process A writes to one end and closes it, and process B attempts to read later, it will first successfully read the written data, and only on the next read get EAGAIN

carmine current
#

Do you also get EAGAIN if the socket is blocking?

vestal sapphire
#

no, that just hangs

#

hmm maybe that check is unnecessary to begin with?

#

I'm not sure

#

the man pages aren't helping me with this tho

rigid wyvern
#

what the hell are yall speaking?

#

minecraft enchanting table?

vestal sapphire
#

ig the next bugfix I'd want to do today is the funni upower crash

trim eagle
#

Sounds good

carmine current
vestal sapphire
#

however that made me notice that the check is not really correct there I think?

#

hmm I don't really get how the env gets corrupted

vestal sapphire
#

the bt for it is pretty interesting too

#

it seems to use gettext to print some message about a task getting cancalled

trim eagle
#

Gettext my beloved

carmine current
#

please

rigid wyvern
#

e

fervent zodiac
carmine current
#

Going from machine readable to formatted is easy but the other direction is not

vestal sapphire
#

reminder about the NVMe sysfs PR

#

and the setitimer PR

vestal sapphire
#

@trim eagle at the recommendation of korona I just correctly implemented unix socket stuff like DGRAM/STREAM and related memes

#

honestly that might just fix a few funnies all around

trim eagle
#

I like it a lot

#

I’ll rebase my Managarm tree for systemd on Monday (I expect VC chances to be decent)

vestal sapphire
#

about the comment proposing the intrusive list for keeping track of the sockets, that doesn't quite work tho, right?

#

we need a shared_ptr for servePassthrough and that in turn means we can't really append to the list without hassle

carmine current
#

What's the issue?

#

We can pass a shared_ptr to servePassthrough and add a raw ptr to the intrusive list

vestal sapphire
#

how does an intrusive list handle a raw ptr

brittle mauve
vestal sapphire
#

afaict boost intrusive list doesn't work with ptrs?

#

not sure

#

the docs aren't helping tbf

brittle mauve
#

from the docs looks like it takes in a reference in which case it would work

carmine current
#

just use frg::intrusive

#

we should get rid of the boost dependency

#

But yes, boost intrusive takes references and it doesn't care whether that reference is produced by dereferencing a shared_ptr or a raw ptr etc

#

frg::intrusive just takes raw pointers

trim eagle
#

with the recent perf fixes in, I decided to run a basic test to see what performance increases we got. So I ran glxgears 5 times on a system without the load balancing and the IPI fixes for 35 seconds each run (glxgears reports FPS every 5 seconds) and did the same on current master. Averaged them together and had the following results

without load balancing and ipi fixes
run 1: avg over 35 seconds: 86.736 FPS
run 2: avg over 35 seconds: 98.062 FPS
run 3: avg over 35 seconds: 98.223 FPS
run 4: avg over 35 seconds: 101.097 FPS
run 5: avg over 35 seconds: 100.724 FPS
total avg: 96.968 FPS

with load balancing and ipi fixes
run 1: avg over 35 seconds: 102.791 FPS
run 2: avg over 35 seconds: 99.637 FPS
run 3: avg over 35 seconds: 114.354 FPS
run 4: avg over 35 seconds: 98.559 FPS
run 5: avg over 35 seconds: 114.580 FPS
total avg: 105.984 FPS

gain: 9 FPS give or take

fervent zodiac
#

nice

fervent zodiac
#

i considered doing only machine readable logs for shkwve actually

carmine current
#

pitust, do you want to PR your M1 changes?

#

or post a patch such that we don't forget about them?

fervent zodiac
#

its all horrible and ugly

#

i'll try untangling it some more i think

#

but thats also the umask stuff

#

i'll split it up into commits in a sec

#

ah theres more in the managarm/managarm repo too

fervent zodiac
vestal sapphire
#

so circling back to the credentials memes, ig it's time to also make the helix stuff return std::array

#

and maybe to use a type for credentials

vestal sapphire
#

I was thinking of something like this

struct CredentialsView : std::span<const char, 16> {};

struct Credentials {
    Credentials(char data[16]) : data_{
            data[0], data[1], data[2], data[3],
            data[4], data[5], data[6], data[7],
            data[8], data[9], data[10], data[11],
            data[12], data[13], data[14], data[15],
        } {
    }

    auto operator<=>(const Credentials &c) const {
        return this->data_ <=> c.data_;
    }

    operator CredentialsView() {
        return view();
    }

    CredentialsView view() {
        return CredentialsView{data_};
    }

private:
    std::array<const char, 16> data_;
};
#

with the credentials + process changes

#

and I'm getting ~440 fps on glxgears

trim eagle
#

Spicy

#

I’ll test my desktop on master whenever I have access to it again

native prairie
vestal sapphire
#

prob not

#

I did however work on some long-standing things we wanted to improve in posix

#

and korona did some performance-enhancing work

#

but that is scheduler-level or IPI stuff

native prairie
vestal sapphire
#

2025, the year of the managarm desktop

native prairie
#

Indeed

trim eagle
#

You bet

carmine current
#

we can probably get another 50% perf by allocator and kernel data structure improvements meme

#

but that requires a bit more work

upbeat smelt
#

squeezing every bit out of the kernel so we can put off optimizing the actual bottlenecks meme

vestal sapphire
#

we've already seen and felt massive speedups in the past weeks ngl

carmine current
#

One big improvement in userspace would be a dentry cache in libblockfs

fervent zodiac
quaint fern
#

i think that's the wrong place

#

it's analogous to how BSD traditionally did namecaching prior to DragonFly BSD, and Linux also does it the DragonFly way

fervent zodiac
#

a much nicer approach is to handle caching in the VFS layer

fervent zodiac
quaint fern
#

that is to say put it in libblockfs is like put it in the vnode layer, but since your vnodes are a protection boundary away from the posix server, you pay an even greater penalty

fervent zodiac
#

2025, the year in which managarm is actually reasonably fast maybe

vestal sapphire
quaint fern
#

you miss out on things like the posix server being able to resolve a path into whatever your vnode equivalent is (some entity on the libblockfs side) without actually needing to contact another server

fervent zodiac
#

also you still dont have a web browser do you

vestal sapphire
#

I have everything I need: Ethernet (e1000), LTE (USB CDC MBIM), USB, webkitgtk for browsing, and a mail client

fervent zodiac
#

oh do you

vestal sapphire
fervent zodiac
#

i thought it was broken

vestal sapphire
#

works for me

fervent zodiac
#

ah okay

#

well then run it

#

wait for it to crash

#

then debug the crash

vestal sapphire
#

it's reasonably stable

quaint fern
#

so that's my position on where you should put name caching in managarm, ask me if you want to know more (i looked into name caching quite a bit), i trust i won't get the serenityos treatment for this

carmine current
#

lol

#

I don't think we're given anybody the serenity os treatment

vestal sapphire
#

the crashes are stuff like timer overflow or posix commiting seppuku over what should be error returns

carmine current
#

I'm always willing to learn about new approaches 😄

quaint fern
carmine current
#

Well, libblockfs would have the advantage that the would be no need for cache invalidation in another process

#

If the vfs does the caching (which sits in the posix server) and something changes on the libblockfs side, we'd need to invalidate the cache somehow

fervent zodiac
#

what would change on the libblockfs side?

#

the advantage of caching in posix is that it also allows for a nice impl of mounts

quaint fern
fervent zodiac
#

i don't think linux revalidates 9p, actually

quaint fern
fervent zodiac
#

yeah lol

#

i have no idea how NFS regains cache coherence but i do know that there is a generation number involved

#

and probably locks

vestal sapphire
#

I'm not sure caching stuff should be a higher priority than uncoupling libblockfs from ext2

fervent zodiac
#

libblockfs is coupled to ext2????

#

how do you do that

#

lol

vestal sapphire
#

it sort of assumes that

quaint fern
#

if you want correct but complicated client side then you use NFS which provides reservations speculatively that guarantee consistency for you, and has a protocol for revoking these, as well as a timestamp for revalidation

vestal sapphire
fervent zodiac
#

aaaaaanyway

carmine current
#

yeah libblockfs is basically libext2fs right now :^)

fervent zodiac
#

namecaches should be first, most likely

carmine current
#

but i don't think it's such a big deal actually since filesystem internals differ by quite a bit

#

so i expect the shared code to be small when we untangle it

fervent zodiac
#

because it affects how you architect the backing fs

vestal sapphire
#

honest to god libblockfs is the only eyesore in managarm code remaining tbh, maybe except for the use of boost

quaint fern
#

that touches on another area, namecache in posix server will work for both ibblockfs and for whatever will provide 9p/nfs to managarm

carmine current
#

how does nfs actually achieve coherence?

vestal sapphire
#

not sure how we would even go about implementing 9p or nfs tbh

fervent zodiac
carmine current
#

caching in posix would certainly be faster, i agree

fervent zodiac
#

it's also a better approach, in general

quaint fern
#

and in turn it also revokes them

fervent zodiac
#

so its basically just classic leases

quaint fern
#

i don't think it does anything to prevent the host changing things from under it, but they would disapprove of that anyway

#

there are a lot of horrible cases i have no idea what happens on linux or any other system, like someone mounting over /nfs/mount/subdirectory and some other client unlinks subdirectory

carmine current
#

so how does it work if, say, one client opens foo/bar/baz and another client renames foo/bar to foo/bar2

fervent zodiac
#

you still have a handle to foo/bar/baz

#

the thing you get has the filesystem id

#

and inode

#

and a generation number that is random

#

oh and there is no signature over any of this by the way, because those are boring

#

oh and 0 is a valid generation for every file handle meme

carmine current
quaint fern
carmine current
#

iirc that was done to avoid a DoS attack where you mount over a dir inside a mount namespace to prevent its deletion on the host

quaint fern
#

so that timeout deals with the case where a client doesn't acknowledge revocation of the reservation timeously

carmine current
#

ah i see

#

actually if we want to revalidate cache entries, we could make that really fast by putting some "is still valid" flag into memory that's shared between the posix server and the fs server

outer leaf
#

wait does your OS have gnome???

trim eagle
#

We have ran some gnome applications yes

vestal sapphire
outer leaf
#

cool!!

trim eagle
#

@carmine current I'd like to report an OOM after running glxgears for like sub 4 minutes

#

from limine enter to OOM I note 4 minutes 20 seconds

fervent zodiac
#

while true; do ls; done also provokes an OOM

carmine current
#

that's at least partially fixed by a PR by leo

#

were we accidentally retained a shared_ptr to a process in posix

#

glxgears needs investigation though, probably by adding memory consumption traces to ostrace

trim eagle
#

That would be good yeah

vestal sapphire
#

I think we're now pretty close to having everything needed to run systemd-udevd upstream once #1232 is merged, except for the bits that break ABI and the package itself

trim eagle
#

All the more reason for me to get going on the init portion so we can get both at the same time potentially

vestal sapphire
#

I'm currently taking a look at the linux __UAPI_DEF_* memes, the other ABI break stuff is ready

carmine current
#

We should get systemd udevd in before systemd init

#

Not both at the same time

vestal sapphire
#

I'll try to get the abi-breaking changes ready for a PR ig

#

but

#

maybe I should combine this with the ABI checker that I worked on a while back

#

that pointed out some funnies, including the ones I fixed for udevd

#

I'm not sure how usable it is in its current state for ci tho

#
./src/mlibc/scripts/header-abi-compare.py ../glibc/sysroot/usr/local/include/ build/packages/mlibc-headers/usr/include --help
usage: header-abi-compare.py [-h] [-m] [-M] [-f] [-s] [-t] reference mlibc [file]

positional arguments:
  reference   reference headers
  mlibc       headers to be checked
  file        limit scope to this file

options:
  -h, --help  show this help message and exit
  -m          Search missing functions
  -M          Compare macro definitions
  -f          Check function signatures
  -s          Check structs
  -t          Dump tree (debug + extremely verbose)
vestal sapphire
#

ig I'll work on setting up a PR that addresses all (relevant) ABI differences spotted by this, including the stuff necessary for systemd-udevd

#

I gtg for now tho, so I'll continue tomorrow

#

think the ABI checker might even be good for CI tho

#

but only if we maintain a configuration that blacklists some stuff for which we can safely diverge from our reference

#

I only tested this against glibc so far, it might be interesting to do this against musl and bionic as well ig

carmine current
#

I don't think we should care about libc abi differences

#

(we should care about OS abi of course but we should not aim for glibc ABI compat)

#

and also, any changes in this regard should not block udevd progress

vestal sapphire
#

thing is that systemd hard-asserts some constants to have certain values

#

GRND_* comes to mind

trim eagle
#

GRND should match for Linux anyway

#

Considering we run the Linux abi we switch with it

vestal sapphire
#

basically anything that is passed to the kernel in linux needs to be a 1:1 match anyways

trim eagle
#

Yep

vestal sapphire
#

the rest, ig that depends on the individual thing

#

like

#

I don't think changing NSS_PASSLENGTH is necessary

#

but F_TEST and parters might be a consideration

vestal sapphire
#

basically my aim is to try and resolve all outstanding ABI differences that we would want to address

#

the scripts is just a tool to generate the list of things to look at meme

carmine current
#

GRND_ is OS abi not libc ABI

#

My answer to "that we should address" is: those that are linux kernel ABI

#

but for udevd/systemd we should only address the subset needed to make systemd work

carmine current
#

swap won't help if there's a memory leak

#

when will Managarm have an oom killer

trim eagle
#

Help me port systemd and we get oomd meme

icy verge
#

Still

#

When swap

nocturne tide
#

be the change you want to see

trim eagle
#

Real

icy verge
#

Okay

#

Where is managarm's VMM code

#

Is it in some server thing

#

Actually no microkernel sounds unfun to write a VMM for

#

Or not unfun

#

But too much design to consider

#

Anyway what I'm saying is that I'd make a cluster fuck out of the VMM code

trim eagle
icy verge
#

Wtf

#

It's 1k loc

carmine current
#

the code for memory objects is in memory-view.cpp

#

1k sloc is not that much for a proper vmm ;D

#

swap has not really been a top priority for us yet

#

Managarm can swap file backed memory just fine, it just can't swap anonymous memory

fervent zodiac
#

ah i think the reason PMCs dont work on m1

#

is because they are marked as "TODO" in the driver

carmine current
#

:^)

#

You can check if the reduction of IPIs made it faster on the M1. This is now merged to master

#

I also want to do some more changes to reduce the number of cpu timer updates

trim eagle
#

More performance == more better. I like

vestal sapphire
#

Ok, the plan for today is to get bragi to autogenerate Wireshark dissectors

#

After that ig it's time to make the dumping code pretty and integrate it into all protocols

carmine current
#

👍

trim eagle
#

Pog

wild stone
#

bragi
wireshark
what did i miss

vestal sapphire
#

I'm dumping all managarm ipc, writing that into a pcap, and loading it up in Wireshark

trim eagle
wild stone
#

ok that is exceedingly based

carmine current
#

Are you in VC today, leo?

vestal sapphire
vestal sapphire
#

@trim eagle wireshark bragi dissector, but now autogenerated from bragi files

#

I do not handle tags and tails yet

upbeat smelt
#

nice

#

how bad was the bragi code to work with? meme

vestal sapphire
#

it's good

#

I was a bit lost at times but mostly just skill issues

#

like I searched for a way to obtain the offset for a fixed message member

#

until I noticed (and korona pointed out) that I need to just add up all prev members

vestal sapphire
#

I'd like to revise my previous statement

#

I now get to implement varint parsing in lua 🤮

nocturne tide
#

fun

trim eagle
#

Nice work tho

vestal sapphire
#

tag-based messages now work

vestal sapphire
#

hmm what if we adapted ostrace to dump pcap over dmalog instead of the ostrace format on request?

#

that would be super nice as you could just Ctrl+R in wireshark while managarm runs

#

anyways now that bragi decoding seems like a mostly solved issue, time to clean that up and push it somewhere

carmine current
#

I don't think that makes sense. But you could just launch the conversion program in parallel with qemu

fervent zodiac
#

now you just need to get a properly allocated pcap protocol id

vestal sapphire
#

Nah I'll just keep using USR0

#

I'll probably remove bragi from rootfs and name it a host tool

carmine current
#

then you have to install it into a venv

#

or something like that

vestal sapphire
#

Yeah we should do that anyways

vestal sapphire
#

Yeah we should do that anyways

jaunty charm
#

Yeah we should do that anyways

icy verge
#

Yeah we should do that anyways

native prairie
#

Yeah we should do that anyways

indigo urchin
#

Yeah we should do that anyways

outer leaf
#

epic!!!!!!!

#

this os seems to be quite polished, how long y'all been working on it?

#

also dumb question but the github says "Linux API compatibility", what does that mean exactly? sorry for stupidity, I'm new to this stuff 😅

trim eagle
trim eagle
outer leaf
outer leaf
trim eagle
trim eagle
#

KDE soon™️ if I get it working

outer leaf
outer leaf
trim eagle
trim eagle
# outer leaf systemd 😭 why

Cuz I need a target, systemd is regarded as damn near impossible, we need an init system, we already use eudev, I need logind and because we can

trim eagle
#

(The logind requirement is for KDE and GNOME)

outer leaf
#

I talk shit about systemd damn well knowing I'm too stupid to figure out anything else trl

#

Imma join the discord server, if that's okay, this seems epic

trim eagle
#

Of course!

outer leaf
#

tried to close window and qemu died 😭

#

bro was just done with life atp trl

trim eagle
#

Your terminal should have logging that might be of interest

#

(Our git port is broken and does not exist in upstream, neofetch can be installed but fastfetch is better)

outer leaf
#

oh, already closed the window, sorry, will try again and see if it is recurring

outer leaf
trim eagle
#

xbps-install -S <name of package>

#

Be sure to run dhcpcd first otherwise no network!

outer leaf
#

the sway version just refuses to run for me trl

trim eagle
#

Sway is not installed by default

outer leaf
#

weston runs fine, besides the terminal issue 😅

trim eagle
#

You’ll need to install it first

outer leaf
#

sorry, and thank you!!!

trim eagle
#

No worries

outer leaf
#

completely frozen

outer leaf
#

oh, sorry, already reset the vm 😭

trim eagle
#

I do see a crash but the actual issue is higher up. I just see the memory dump, the crash message is a bit higher. Look for where that purple block starts

outer leaf
#

oh wait just realised

#

my terminal would still say it, unless i close

#

like right here?

trim eagle
#

Yep

#

I see the issue and I have it fixed locally already

outer leaf
outer leaf
trim eagle
#

Thanks for this, I’ll PR in a fix in the next few days (real life do be busy)

outer leaf
#

np

trim eagle
outer leaf
#

I wish I could code, I'd love to contribute 😅

#

:3
got it working, thank you!!!

trim eagle
#

Awesome

outer leaf
#

so, might just be stupid but I installed sway and still getting a black screen when trying to boot from the sway option

trim eagle
#

Yeah sway seems to have died

outer leaf
#

dam

#

this is really cool btw!!!

#

aside from a few hiccups it's super smooth and def feels polished 🙂

trim eagle
#

@vestal sapphire idk if you have time but sway from ci is dead. Something about DRM dumb from what I can see?

outer leaf
#

also having networking, a gui, and even a package manager working is super impressive 🙂

trim eagle
#

Unfortunately the full browser kinda broke atm otherwise you’d have a browser that has been able to run the discord webapp too

outer leaf
#

not awesome that it broke, I mean awesome that its a full browser and can run discord!!

vestal sapphire
#

I'll take a look

#

Probably also time to bump it

trim eagle
#

I likely bumped it a week or two back. But I didn’t touch versions

vestal sapphire
#

I mean bumping version

vestal sapphire
#

hmm did we bump wlroots btw

trim eagle
#

Idk tbh

vestal sapphire
#
tools:
  - name: host-bragi
    from_source: bragi
    tools_required:
      - host-python
    revision: 1
    install:
      - args: ['python3', '-m', 'venv', '.']
        workdir: '@PREFIX@'
      - args: ['bin/pip', 'install', '-e', '@THIS_SOURCE_DIR@']
        workdir: '@PREFIX@'
        isolate_network: false
#

this works

#

let's goooo

carmine current
#

-e looks wrong

#

This will not work if you nuke the source

vestal sapphire
#

hmm true

#

that's annoying for development tho

vestal sapphire
carmine current
#

Well, same workflow as for all other pkgs, right? Just install them before using

trim eagle
vestal sapphire
#

no it's kinda weird

#

apparently sysfs doesn't have a drm directory for the device any more????

trim eagle
#

Bruh?

#

How the fuck does kmscon work then

vestal sapphire
#

ah it was a sysfs meme

#

during cleanup I removed one dir traversal that changed the parent dir of an object

#

but I didn't consider the side effect that it created the directory

trim eagle
#

Oops

#

Small yikes

vestal sapphire
#

hmm I'm not sure the was it worked before was any good lol

trim eagle
#

Fair lol

vestal sapphire
#

getting it right seems tricky tho, fuck

#

okay I remember why I changed the meme before

#

it was because systemd-udev didn't like it

#

and that's correct ngl

#

however I'm nbot sure how to set up the class subdirs for devices with the name

trim eagle
#

Yikes

vestal sapphire
#

works again

#

it has some ugly artifacting tho, and I have no clue why

#

the solution ain't pretty tho

nocturne tide
#

why does it have the weston decorations

#

lol

vestal sapphire
#

so if we have the gpu at /sys/devices/pci0000:0000/0000:02.0/, we should create a subdir for the drm class

#

which in turn should contain card0

carmine current
#

We discussed that already didn't we?

#

The correct logic is: if a class device is added to a non-class device parent, there is a glue directory

#

with the name of the class

#

That's the logic that linux uses

#

If a class device is added to another class device (even in a different class), there is no glue directory

vestal sapphire
#

yeah but where should that logic go

carmine current
#

I guess in whatever function we do the mkdir for the child's sysfs dir

vestal sapphire
#

ok flags decoding works

wild stone
#

when distributed managarm server

carmine current
#

considering that requests can transfer memory objects etc that's probably not happening meme

#

distributed OSes are a meme anyway

upbeat smelt
vestal sapphire
#

or any other RDMA solution

wild stone
carmine current
#

infiniband doesn't support transparent rdma either

vestal sapphire
#

more metadata meme

#

did I mention

#

with timestamps

carmine current
#

very nice

vestal sapphire
#

now with responses

trim eagle
#

Nice

vestal sapphire
#

#840 is some bragi cleanup, I'll probably clean up the dumping code and put it there too

#

only thing that I still want to do is to try to hook up protocols/fs to this

#

and fix the bragi header 128 size assumption there as well

fervent zodiac
#

pretty cool

vestal sapphire
vestal sapphire
#

okay I think I implemented the extract-ostrace policy memes now

trim eagle
#

Based

vestal sapphire
serene portal
#

lfg

lament grove
vestal sapphire
#

yep it's dumped IPC

lament grove
#

nice

icy verge
#

nice