#Aero

1 messages · Page 2 of 1

livid coral
#

the attack surface for userspace applications is still just microkernel syscall interface

#

and within the main server security is not as much of an issue due to rust guarantees

#

at least not as much of an issue

willow lotus
#

if all we had to worry about were syscalls and UB we would live in a much better world

#

the point of a microkernel security wise is that if one segment of the chain goes down, which you can always get it to, the rest doesnt fall down

#

if you put all the segments together, any of the little cracks I can use to bring it all down

#

if you make a single server, you are just putting all the segments together

#

you just have a thin divide between user and kernel for no reason, as its just as easy to bring it down as before

livid coral
#

bringing down is not the worst thing that can happen

#

you don't get cve score of 10 for bringing shit down

#

usually its things like arbitrary code execution in kernel and what not

#

the microkernel part helps to mitigate these by reducing the attack vector

#

and with single server this doesn't go away

willow lotus
#

in any case of vulnerability or harm that you are planning to bring, putting it all in the same component and address space makes it all shared, take one, take all

#

you need some isolation for a microkernel to make sense

livid coral
#

well, the microkernel part here makes sure its harder to take one

#

because syscall attack surface is smaller

#

its not pointless

willow lotus
#

If the OS implements 20 functions, the deal with microkernel and monolithic is how you spread those 20 functions, whether you have them all in one place, in 2 places, or 20. Bigger modularity is spreading those points further.

When you say you have a smaller syscall attack surface, what I understand is that you are insisting on making 20 lower, that is not how this game works, the surface is the same, its how you spread it that matters

livid coral
#

you are not making 20 lower, you are exposing 20 over a lower number

willow lotus
#

which means that if I get one of those 20, I get all of the ones you put together in the same group, dont you see how that compromises the security aspect?

livid coral
#

right, but it is harder to get any of these 20 with microkernel in between

#

like the number of attacks by which you can "get" these 20 decreases

willow lotus
#

its marginally harder that if they were all together, but its also miles easier than if they were properly distributed

livid coral
#

well its not exactly clear why

willow lotus
#

it is pretty clear why, more components means less complexity per component, which means less that can go wrong, and less that can be vulnerated if it breaks

#

more components also means slower, sadly, as isolation has a cost

#

its the ever spanning microkernel vs monolithic argument

livid coral
#

I think that rust provides a good chunk of guarantees at compile time that can isolate components without runtime overhead

#

the most unsafe part like memory management, scheduling, and interrupt handling are usually within the microkernel

willow lotus
#

that is just not the case, rust is not an evil superpower that makes stuff more isolated. The code is gonna be inside the same address space, even if the total vulnerability count is smaller by magic of the borrow checker, the fact of the code not being isolated means you can still sniff on other components

#

the most useful way I can think of visualizing it is a denial of service

#

if I bombard a process, and I make it so it just cannot run fine, a thing that is possible to do regardless of language, it can vary from destroying your workflow to causing a minor inconvenience, depending on OS architecture and how you distribute those 20 functions

#

the deal why I said that single server microkernels are pretty useless on the regard of isolation, is that in reality, its not 20 functions we are spreading, but hundreds, usually with a heavy skew on the userland side thanks to the inherent issues of kernel space. If you put all userland in a single entity tho, you effectively created a second kernel space that overlooks all

#

and it all comes crashing down next

rotund shadow
#

why should andy have to worry about someone not being able to use parted?

#

and it's not like using sudo on the script isn't a thing

#

honestly, there are so many ways to suggest something be reconsidered, but all caps FIX THAT does nothing towards motivating someone to do anything

#

especially when they have absolutely zero obligation to do anything for you

stark idol
#

I’d just ignore those trolls

dim goblet
#

any suggestions for what should I do now

tawdry sparrow
#

have you ported nftables yet?

dim goblet
#

not that lol

tawdry sparrow
#

why not

stark idol
#

so you can actually use aero on real hw

dim goblet
#

more suggestions

#

😄

sonic mantle
#

Port KDE or GNOME

pearl pumice
#

port java 8 so I can play Minecraft 😎

candid mural
#

this but unironically

willow lotus
#

Port systemd

slow bronze
#

i am always available for consultation on initware ports

#

it might be able to run without any cgroups or emulation thereof at all, can't remember

#

likewise for systemd i am available for any assistance required though i haven't tracked whether it's gotten harder to port since the version i tackled

barren shell
#

Port qemu and run aero under aero

sonic mantle
#

Nah, port QEMU and install macOS or Windows in QEMU on aero

ebon sail
#

Will the idea of a common init system you mentioned in the Keyronex thread be a variation of InitWare or something different?

#

CC: @slow bronze

teal swift
teal swift
teal swift
teal swift
#

KDE is qt5 which sucks

slow bronze
teal swift
#

GNOME needs gobject-introspection which sucks

teal swift
ebon sail
slow bronze
teal swift
slow bronze
#

the porting process to all the BSDs left me no choice but to construct a new build system that used OS name to determine features rather than feature-tests (because of myriad subtle variations)

teal swift
#

can't be that bad

#

it's CMake? I can deal with that

slow bronze
#

yeah, it was prior to my having any knowledge of meson

teal swift
#

so I nuke libcap

#

and pam

#

and cgroups

slow bronze
#

it might build with cgrups enabled

teal swift
#

dbus not required I hope?

slow bronze
#

and fail gracefully (i forgot). dbus is not required

#

i think i made sure it operates without dbusd

teal swift
#

and I intent to use them meme

#

this should be highly doable with some patchwork here and there

#

on it!

dim goblet
#

I use kde daily so would be nice to have it ngl

teal swift
#

Qt5 cross compilation sucks massive ass

#

Wait until they move to Qt6

#

Trust me

#

I have a Qt5 base recipe if you really want to disregard the Portmaster supreme

dim goblet
#

When is that expected?

#

Move to qt6

#

@teal swift

teal swift
#

Last I checked it was on the todo list. But I haven’t checked in a while

dim goblet
#

Alr

teal swift
#

Plasma 6 is where it’s at

#

Includes links to trello style boards

dim goblet
#

Aero TTY

#

looks beautiful ngl

dim goblet
#

now it shows boot logs before heading to dwm

pearl pumice
#

nice

twin zenith
#

Can u send the link for it?

twin zenith
#

thanks

twin zenith
#

lol

dim goblet
#

indeed

glacial obsidian
rotund shadow
#

amazing

dim goblet
#

i cannot decide what to work on next

willow lotus
#

yourself

#

lift some weights

#

get buff

candid mural
#

minecraft

prisma helm
#

real hardware support

#

then, as an exercise, install aero to a second computer of yours and write and git commit, git push a patch entirely from it

sonic mantle
#

Port Nvidea drivers troll

livid coral
#

add tcp server support if you don't have that

#

add ipv6 support

prisma helm
#

intel drivers are at least reasonable

#

while amd drivers for linux are open source, but you can't just

git clone https://git.kernel.org/torvalds/linux.git linux
cp -r linux/drivers/gpu/amd aero/drivers/gpu/amd
#

because then you'd have to match the entire linux kernel interface, which is definitely hard to do

#

especially considering it is unstable

forest silo
#

He was joking

rotund shadow
#

joking

#

on the internet?????

#

that's unnatural

sonic mantle
#

what is this "joking" thing you speak of?

#

I've never heard this term in my entire life

dim goblet
#

yo

#

i am thinking of doing

#

// `/dev/ctty`: controlling terminal of the process
// `/dev/vtty[0-9]`: virtual terminals
#

instead of just /dev/tty being ctty and tty[n] being a vtty

#

so, the bsd approach instead of linux

#

what you guys think? yeah or nah?

#

if i do so, not much compatibility would be broken right?

dim goblet
#

also why isnt /dev/tty on linux just a symlink?

#

nvm

fierce fractal
#

Why not /dev/cty xD

azure cloak
#

because it doesnt stand for anything meaningful

dim goblet
#

looks like a lot of programs expect it to be this way (which is /dev/tty instead of /dev/ctty)

#

so I cannot really make that move

#

instead I could do vtty[n] instead of tty[n], which basically xorg makes use of and already has support for /dev/vtty so there shouldnt be much to patch out

fierce fractal
#

Or make symlinks

dim goblet
#
    async fn read_at(&self, _: usize, buffer: &mut [u8]) -> usize {
        if self.0.is_empty() && self.is_nonblock() {
            return Ok(0);
        }

        let mut copied = 0;

        loop {
            futures_util::select! {
                byte = self.0.next().await => {
                    // New scancode byte; push it in the result buffer.
                    buffer[i] = byte;
                    copied += 1;
                },

                _ => {
                    // No more scancodes in the stream; return.
                    return Ok(buffer.len());
                }
            }
        }
    }```

VS

```rs
    fn read_at(&self, _: usize, buffer: &mut [u8]) -> fs::Result<usize> {
        if self.buffer.lock_irq().is_empty() && self.is_nonblock() {
            return Ok(0);
        }

        // self.wq is a waitqueue
        let mut sbuf = self.wq.block_on(&self.wq, |s| !s.is_empty()).unwrap();
        let drainage = core::cmp::min(buffer.len(), sbuf.len());

        for (i, byte) in sbuf.drain(..drainage).enumerate() {
            buffer[i] = byte;
        }

        Ok(drainage)
    }```
#

which one is better in readability

#

both do the same thing but one uses async rust syntax

#

block_on is basically async

willow lotus
#

First

#

But by 1%

#

Both are a bit unreadable

dim goblet
#

dont roast rust

#

it is what it is lol

dim goblet
#

the latter one is easier to use

#

the first one is cleaner

#

but the first one uses rust async which is somewhat unstable

rotund shadow
#

then don't use it

livid coral
#

I would probs go with async if that is smth ur kernel supports

forest silo
#

You'd take the stable version and add a new item to your list of technical debt

dim goblet
#

As in it blocks the task but yields so other task can execute

livid coral
#

thats sync

#

just like e.g. read() syscall is sync

#

even if it will yield until data is available

dim goblet
#

The first one does the same

#

Except that you don't have to explicit code the state machine

drifting silo
#

the second one kinda looks better to me

red nova
#

I would go second too

dim goblet
#

I got aero to boot in 2.5 seconds

#

approx

#

includes startup programs and dwm

rotund shadow
#

ok

#

👍

dim goblet
#

ok

#

👍

tranquil vessel
#

getting anything with X to spin up that fast is an accomplishment worthy of congratulations

candid mural
#

Lyre spins up faster

#

i didn't want to bring this up earlier but now you're forcing my hand

#

additionally, dwm is a big L as it's suckless which may as well be naziware

#

dumbnaziware*

tranquil vessel
#

Quite a bit of my boot time is from loading and decompressing a ramdisk... I should probably not be shipping 9MiB of wallpapers by default. 🙃

dim goblet
#

lmao

#

i will try to make it faster then

#

if its possible as you say

dim goblet
#

yes i do

rotund shadow
#

best of luck andy

#

make it speedy

#

or there will be consequences

dim goblet
#

the profile really just shows that reading from nvme is slow

#

thats it lol

#

using qprofiler btw

warped furnace
#

My 32-bit OS takes about a sec to get to the command line and another sec to the desktop (most of that is loading the wallpaper), on QEMU TCG and good hardware

sly mango
#

Which could be fixed by adding a page cache

#

reading from disk is always somewhat slow compared to other operations

dim goblet
#

Also just to be fair this is a single core only

#

SMP is disabled

azure cloak
#

enable

dim goblet
#

Will try later. Now going to 🏫

#

Also hi local bed enjoyr

azure cloak
#

hello andy ;)

dim goblet
#

me website

golden lintel
#

now run your webserver on aero 😎

atomic sentinel
#

uh

#

andy forgot to port ruby on rails

teal swift
#

Nice work

severe pumice
#

Awesome, amazing

foggy anvil
#

Btw does Aero support MSI(-X)?

#

Sorry I can't check with the repo rn

foggy anvil
#

ok apparently there is support, based

quick thicket
azure cloak
#

i believe that's it

dim goblet
#

yea

quick thicket
#

Oh

dim goblet
#

lol i was bored

dim goblet
dim goblet
#

does this count as overengineered or is it fine. this is for a custom display method when debug printing syscalls

#

(systrace)

#

basically ```rs
match self {
Some(value) => {
write!(fmt, "Some({})", CustomFormat::<SyscallFmt>::display(value))
}

        None => write!(fmt, "None"),
    }``` vs ```rs

    match self {
        Some(value) => {
            write!(fmt, "Some(");
            value.log(fmt);
            write!(fmt, ")")
        }
        None => write!(fmt, "None"),
    }
#

1st looks cleaner(?)

azure cloak
#

what even is the point

dim goblet
#

for option, not much

azure cloak
#

is it really just to save 2 liens of code

dim goblet
#

but the inner have have different debug fmt impls

dim goblet
#

😭

azure cloak
#

i see you've been spending your time everywhere but not making webkitgtk work :^)

dim goblet
#

💀

azure cloak
#

fix webkitgtk: ❌
pretty log: ✅

#

jk you've done a lot

#

aero is pretty cool except for when you've shifted from providing your own userland to porting all the fancy xorg stuff :^)

#

does the kernel still have leftovers from aero ipc?

dim goblet
#

who knows, i might do that again

dim goblet
azure cloak
#

damn i bet it hasnt aged well

dim goblet
#

i just work on aero as i feel. i might do kernel stuff if i feel like it. i do userland porting stuff when i feel like it etc...

azure cloak
#

yeah ofc

#

it's all important anyway

dim goblet
#

and it makes it fun :^)

azure cloak
#

i wanna do osdev again but whenever i think about having to write a vmm or a vfs i dont want to anymore

dim goblet
#

when i sometimes diveret my attentions to other parts, i end up fixing a probelm in some other x part

#

so thats why i do it

azure cloak
#

for me when i do that i usually end up breaking 3 other things

#

:^)

dim goblet
#

and actually i might sometime write some aero userland apps

azure cloak
#

that would be hella based

dim goblet
#

i wanted to do something like the serenity userland profiler

#

but idk if i should rather port some other preexisitng userland profiler instead

azure cloak
#

valgrind

dim goblet
#

oh wait

azure cloak
dim goblet
#

that wouldnt point the kernel slow functions tho

#

so custom userland profiler could be useful

#

baked in the kernel

azure cloak
#

you can collect traces from the kernel aswell

#

and include them in the same profile

#

ofc the profiler wont know what's in the kernel unless you provide it with aslr slide, dwarf etc

#

but you can expose that somehow to the userland

dim goblet
#

syscalls 🧠

#

add the extra root mode

#

you can read kernel mem

#

and write

azure cloak
#

gdb -p 0

#

easy

#

does linux even have a pid 0 process

#

surely right?

#

for gdb you'd need ptrace though :^) so have fun with that!

dim goblet
#

wait can i make that work 🤔

#

its not going to work

azure cloak
#

pid 0 doesnt exist on linux

#

sadly

#

or rather, ptrace doesnt acknowledge it's existence

dim goblet
#

doesnt matter tho

#

own kernel, own rules

azure cloak
#

lmao

#

honestly could just make a cool in-kernel debugger

#

over serial or whatever

dim goblet
#

gdb stub

#

eh

#

idk

azure cloak
#

not even that

#

a literal tiny shell

#

that runs in its own kernel thread

dim goblet
#

hmm

rotund shadow
#

wow

dim goblet
#

raidy

rotund shadow
#

that sounds hecking crazy

dim goblet
#

how ru

rotund shadow
dim goblet
#

idc

rotund shadow
azure cloak
#

raidyyyy

dim goblet
#

fine aswell

rotund shadow
#

all very aero i hope

dim goblet
#

my keyboard my rules bro

rotund shadow
#

lol

dim goblet
#

guys i touched grass for the last week

#

it was crazy experience

rotund shadow
#

how aero was it?

dim goblet
#

100x

#

like i looked at the rendering

#

it was so realistic

rotund shadow
#

100 times?

#

wow

#

that's at least 1 more time(s) than normal

dim goblet
rotund shadow
#

rust...

dim goblet
#

ikr

rotund shadow
#

so true

dim goblet
#

ok i think ill rewrite the #[syscall] macro

#

so it works with more types easily

dim goblet
#

i currently do this with fatptr syscall arguments fn syscall(ptr: usize, ptr_size: usize), would it be cleaner to do fn syscall(obj: &[u8]) // assuming the ptr is &[u8] and then the actual syscall function generated with the macro will look like fn syscall(ptr: usize) where ptr will be a reference to Fat { ptr, size }

#

actually nvm, thats a unnecessary double deref

#

its fine the way it is rn i suppose

#

or is that premature optimization

#

wtf am i thinking of

azure cloak
#

you kind of have to copy memory into kernel space, or temporarily disable smap to access it

#

or if you don't support smap then go right ahead and just access it tf

#

but it would be nice if aero had some sort of UserspacePtr, UserspaceSlice and UserspaceString helpers that wrap raw addresses and let you .verify_access()? or some shi like that at the start of the syscall

#

you could then insert a const obj = __obj_ptr.verify_access()?;

#

verify_access would obviously make sure that memory range is valid and return an error otherwise

dim goblet
#

others should be simple to add

dim goblet
azure cloak
#

yeah im not very familiar with aero codebase anymore, i dont remember that type sadly

dim goblet
azure cloak
#

thats nice tho

dim goblet
#

oh shit i forgor, i have the docs on my website

#

😭

#

L screenshots

azure cloak
#

so UserRef is really a "please copy this value from user to kernel"

#

but in a type safe™️ way

dim goblet
#

and if it gets dirty

#

it writes it back

#

👌

azure cloak
#

assert!(...)

dim goblet
#

oh yeah i fogror about dat

#

bruh

#

atleast its functional

#

we can do error handling later

azure cloak
#

Result that bitch up

dim goblet
#

i promise i will after webkitgtk

azure cloak
dim goblet
#

🙏

azure cloak
#

webkitgtk importante

#

whats the progress on that?

#

still memeing when trying to load websites?

dim goblet
#

it starts up but for some reason doenst load the page

azure cloak
#

ah rip

dim goblet
#

no request is made to the kernel to load webpage

#

even file:/// doesnt work

#

from the current looks

#

something is wrong with ipc?

#

recieve queue thread in webkit is probs not getting the reqs

dim goblet
#

so ipc memes i think

azure cloak
#

uhhh not fun

dim goblet
#

ik

#

so hard to debug

#

idk how to tackle it

azure cloak
#

well if you're brave enough

#

go dig through the webkitgtk source code :^)

dim goblet
#

printf?

azure cloak
#

to find out how the thing handles page loads

dim goblet
#

already am doing that

azure cloak
#

oh damn

dim goblet
#

i was doing some backtraces on the host

#

but then arch decided to break my host linux webkit build

#

some libxml new version memes

#

i think

azure cloak
#

rip lol

#

recompile time

dim goblet
#

i probs should docker it

azure cloak
#

wooooo

dim goblet
#

cauz i didnt find any solution online

#

wait ill show u

#
In file included from /home/andy/work/tmp/aero/webkitgtk/build/WebCore/DerivedSources/unified-sources/UnifiedSource-42f7b70e-4.cpp:3:
/home/andy/work/tmp/aero/webkitgtk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:143:28: error: no matching constructor for initialization of 'XMLDocumentParserScope'
    XMLDocumentParserScope scope(cachedResourceLoader(), XSLTProcessor::genericErrorFunc, XSLTProcessor::parseErrorFunc, console);
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andy/work/tmp/aero/webkitgtk/Source/WebCore/xml/parser/XMLDocumentParserScope.h:47:9: note: candidate constructor not viable: no known conversion from 'void (void *, xmlError *)' (aka 'void (void *, _xmlError *)') to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const _xmlError *)') for 3rd argument
        XMLDocumentParserScope(CachedResourceLoader*, xmlGenericErrorFunc, xmlStructuredErrorFunc structuredErrorFunc = 0, void* errorContext = nullptr);
        ^
/home/andy/work/tmp/aero/webkitgtk/Source/WebCore/xml/parser/XMLDocumentParserScope.h:39:30: note: candidate constructor not viable: requires 1 argument, but 4 were provided
        WTF_MAKE_NONCOPYABLE(XMLDocumentParserScope);
                             ^
/home/andy/work/tmp/aero/webkitgtk/Source/WebCore/xml/parser/XMLDocumentParserScope.h:41:18: note: candidate constructor not viable: requires 1 argument, but 4 were provided
        explicit XMLDocumentParserScope(CachedResourceLoader*);
                 ^```
azure cloak
#

oh i see

#

actual build failure

dim goblet
#

yeah

azure cloak
#

what version is that?

dim goblet
#

and i the c++ fucks with my brain

azure cloak
#

did you perhaps upgrade it in the mean time

#

or is it the same source

dim goblet
#
      # I think? Apple is weird with naming
      tag: 'Safari-612.1.27.0.24'
      version: '2.33.3'```
#

the same ver as mgrm

azure cloak
#

yeah i see

dim goblet
#

btw jsc works

azure cloak
#

based

dim goblet
#

its just the page loading i think

#

also when building this webkit version, shitload of warnings

azure cloak
#

oh same here

dim goblet
#

because use of std::iterator

#

which is apparantly deprecated

#

idk c++ enough, why would they deprecate iterator lol

#

maybe they added smth better

#

iteratorv2

azure cloak
#

i wish c++reference wasnt dead

#

The connection has timed out

An error occurred during a connection to en.cppreference.com.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the web.
#

yayyy

dim goblet
azure cloak
#

true

#

(deprecated in C++17)

#

wtf

dim goblet
#

yea idk why

azure cloak
#

oh this shit

#

i think its because of iterator traits or whatever

#

took me a while to figure out what im looking at

#

ive never seen it tbh lmao

dim goblet
#

inheretience stuff?

azure cloak
#

but yeah webkitgtk is full of warnings, like any decent c++ codebase trl

dim goblet
#

prefection

azure cloak
#

gcc screams a lot for no reason too

dim goblet
#

clang does too

azure cloak
#

i noticed that building firefox with clang its very quiet

#

but with gcc i get like a billion warnings

dim goblet
#

¯_(ツ)_/¯

dim goblet
#

@azure cloak i just removed the extra arguments

#

how important can they be lmao

#

¯_(ツ)_/¯

#

💀 🗿

azure cloak
#

riiight

#

hopefully not too important ;^)

dim goblet
#

so many errors, not even in my scrollback

#

💀

#

professional apple

#

💀

#

@azure cloak

azure cloak
dim goblet
#

wait sheesh

#

its compiling

#

😬

#

🙏

#

that const mf

rotund shadow
#

wow

dim goblet
#

fuck c++ const

rotund shadow
#

const is in C too

dim goblet
#

no especially in c++

rotund shadow
#

how so?

dim goblet
#

the error message

rotund shadow
#

oh

#

right

#

c++ is very strict

dim goblet
#

lmao i mean as in instead of yapping just tell me your missing const buddy

#

such a waste of time

#

c is pretty chill

#

its error messages are fine

rotund shadow
#

yeah, all very clear

#

no multiline shit that vaguely resembles an error message

#

which in and of itself only vaguely tells you what is going on

dim goblet
#

exactly

tawdry sparrow
#

why cant you assign a function that takes a const xmlError* to a function that takes a mutable xmlError*

crisp plume
#

Whats the repo?

teal swift
dim goblet
#

recieve threads are awaiting io

#

🤔

azure cloak
#

now add a bunch of shit to backtrace them from within the kernel

#

and find out which file descriptors they are waiting on

#

and all that cool shi

#

hell that looks cool already, good job

dim goblet
#

🙏 thanks

#

hehe

#

now lets try this on webkit

azure cloak
#

why 10

#

its like you're begging the kernel for answers

#

i love it

dim goblet
#

yea lmao

#

ok so the debugger is working properly

#

so i can trust it now

#

🤝

azure cloak
#

based

#

now expose it over a device so you can just use it with a terminal emulator

#

from within aero

#

debug aero from within aero

#

no don't im jk it's probably not worth it lol

#

get that webkitgtk working Prayge you're so close

dim goblet
#

ok so they ALL are waiting on some fd

#

they are stuck in poll basically

azure cloak
#

cant you pull some info about the file descriptors?

dim goblet
#

the recvqueue

azure cloak
#

like if they are a socket

#

a file

dim goblet
#

oh yeah

azure cloak
#

or wahtever

willow lotus
#

definitely worth it

azure cloak
#

im not sure how you'd make a terminal emulator try and use the kernel debug device instead of stdin/stdout though

#

well sorry, what i mean is idk how you'd make any normal terminal emulator do that

#

i was thinking of using cat for the stdout part but idk about stdin

willow lotus
#

you can just report it to userland and let userland do the printing in a userland app

azure cloak
#

just open 2 terminals, one with tail and another one just echo whatever you want to the device

#

seems easy enough

#

oh i think i see what you mean

willow lotus
#

watch lsio

#

thats your debugging reports

dim goblet
#

hmm

#
[48] main.rs:268 (tid=6, pid=6) debug ===================================================
[53] main.rs:278 (tid=6, pid=6) debug ==== KDBG WHY 46 -> /usr/libexec/webkit2gtk-4.0/WebKitNetworkProcess/ has state of AwaitingIo is ===== (fd=17, path=<eventfd>/, actual_state=OUT, wanted_state=IN)
[62] main.rs:278 (tid=6, pid=6) debug ==== KDBG WHY 49 -> /usr/libexec/webkit2gtk-4.0/WebKitWebProcess/ has state of AwaitingIo is ===== (fd=21, path=<eventfd>/, actual_state=OUT, wanted_state=IN)
[67] main.rs:278 (tid=6, pid=6) debug ==== KDBG WHY 43 -> /usr/libexec/webkit2gtk-4.0/MiniBrowser/ has state of AwaitingIo is ===== (fd=17, path=<unix_socket>/, actual_state=OUT, wanted_state=IN) (fd=19, path=<eventfd>/, actual_state=OUT, wanted_state=IN)```
#

its unix_socket and event_fd

azure cloak
#

well that's annoying

dim goblet
#

they didnt get anything to begin with

#

so the state is actually correct i think

azure cloak
#

now why arent they getting anything

#

btw is the kernel debugger thing gonna end up upstream? i kinda wanna see your implementation of it lol

dim goblet
#

currently its a mess

#

if i get webkit working with it, i will upstream it

azure cloak
#

best of luck to you then 🙏

dim goblet
#

to respect it

#

thanks

dim goblet
#

ok now i need systrace

#

the last time i did systrace on webkit and piped to log file, my computer froze

dim goblet
#

still trying to figure it out

dim goblet
#

maybe i need to change my editor theme

azure cloak
#

that will definitely aid your debugging

dim goblet
#

it might just be eyes dont see the bug in that theme

pale pike
willow lotus
#

lsio being a hypothetical command to list IO

#

the closest equivalent in linux would be a merged netstat and ipcs

pale pike
#

ahh

dim goblet
#

webkit_web_view_load_uri()

#

getPage() :: WebPageProxy

#

WebPageProxy::loadRequest()

#

bro this is why i hate debugging this

#

takes shitlong to rebuild

#

webkit

#

i probs need to upgrade my setup

lament lintel
#

Lol, should be fine for another year or two

willow lotus
#

that quadro is showing its fangs, you can totally use the iGPU instead and save yourself pain

#

with all due respect, you are not playing any games with that quadro anyways

azure cloak
#

should improve incremental rebuild times

teal swift
#

You can

#

There’s a flag for unified builds

#

If it works might be a different story

dim goblet
#

The thread name of WebProcessProxy process is WebContent

dim goblet
#

void WebPage::loadRequest() which shouldve been called, is not on Aero.

#

The WebProcessProxy class derives from the AuxProcessProxy class which in turn has the send method.

#

m_connection in AuxProcessProxy is non-null and it seems to succeed but the method is not called on the other thread.

#

m_connection is an IPC::Connection

teal swift
#

Ahhhh the joys of debugging this shit. I’ve been here before. I see names i recognize

#

Unfortunately I don’t remember the fix, it was likely some meme in our Unix sockets implementation

#

I also remember digging into glib cuz the trace goes to there

#

So that’s fun

dim goblet
#

i had a look if its trying to send file descriptors over

#

but the cmsg has nothing inside

#

rest of unix sockets impl looks complete

#

dennis cmon plz tell me. try to remember

teal swift
#

I’ve had this shit like years ago

dim goblet
#

only seems to be doing an inital read and then just writes to connection without any reads

sly mango
#

Did you try comparing strace on linux

dim goblet
#

doing strace on aero and piping it to a file freezes my computer

sly mango
#

What about Linux

dim goblet
#

then i have nothing to compare with

sly mango
#

Well can you at least print syscalls on aero

#

Without fancy strace shit

#

Might help?

#

Idk

dim goblet
#

hm i could try printing them without backtrace

#

good idea

#

but lemme quickly try smth else

dim goblet
#

here is it ran on linux

sly mango
#

Is there some kind of socket/netstack test suite?

dim goblet
#

not sure

sly mango
#

If somehow you could reproduce the problem in smaller form that would be great

dim goblet
#

exactly what i want lmao

dim goblet
#

bro c++ is so confusing

#

fuck classes

dim goblet
#

who wrote the no documentation

#

bruh

dim goblet
#

how do rebuild a dep and all its dependents

#

in xbstrap

teal swift
#

you don't

#

well

#

you can do it manually

willow lotus
#

./jinx rebuild <package>

#

oh wait sorry this is xbstrap

teal swift
#

does that also do all it's dependents?

#

I've used jinx a bit now and I didn't see that

willow lotus
#

oh, no

#

you gotta go dependency by dependency yourself

teal swift
#

Figured

#

Something that both xbstrap and jinx could use tbh

willow lotus
#

but I mean, they are in deps, you can just do that easily

#

at least it isolates them, so its easy

teal swift
#

(Aka jinx will get that in a day or two if we ask mint and xbstrap maybe next decade meme)

dim goblet
#

mint please migrate aero to jinx

#

yeah it would be a lot if you were to do so

rotund shadow
dim goblet
#

in addition to very nice reproducable builds, shell syntax, is there anything else i would get with jinx @candid mural

candid mural
#

uh, eee is probably happy to migrate aero to jinx

#

@azure cloak

willow lotus
#

package sanity checks when installing for checking overlapping files, customization with jinx config, containerized builds so it never fails in any other linux system

#

for that you gotta pay the price of only ever working on linux

azure cloak
#

im not insane

#

yet

dim goblet
#

cmon eeee

#

plzz

candid mural
#

not that anyone's xbstrap scripts work on anything but Linux

rotund shadow
candid mural
#

tbh

willow lotus
#

I am just saying

#

if you develop from freebsd, maybe thats a non starter

rotund shadow
#

does ironclad build on windows?

dim goblet
#

no?

candid mural
willow lotus
#

Ironclad builds on all platforms autoconf and gprbuild are ported to, that includes windows and Mac, Gloire (the distro) doesnt

dim goblet
#

does ironclad use jinx

candid mural
candid mural
#

we use rbrt

#

which is similar

dim goblet
willow lotus
#

yeah but the concept is the same

dim goblet
#

just rewritten in c

candid mural
#

it's not an exact rewrite

#

it's more made tailored for Jinx specifically

azure cloak
#

cbuildrt is basically bwrap anyway

willow lotus
#

bwrap is basically chroot

azure cloak
#

exactly

rotund shadow
#

pressure vessel bwrap...

candid mural
#

chroot is basically rebooting

#

into a different OS

dim goblet
#

lmao

willow lotus
#

rebooting is basically kexec to triple faulting kernel

dim goblet
#

so eee, thanks for agreeing to migrating every package in aero to jinx

candid mural
#

ok andy, i'll look into porting aero to Jinx

#

if eee doesn't wanna do it

dim goblet
#

alr

rotund shadow
#

woah

candid mural
#

how many recipes do you have

dim goblet
#

103 packages and 19 tools

candid mural
#

h

rotund shadow
candid mural
#

alright lol

dim goblet
#

😬

candid mural
#

it may take me a while

willow lotus
#

does aero have less packages than gloire? damn

candid mural
#

gloire has more than 103?

willow lotus
#

123

candid mural
#

what the fuck

willow lotus
#

when I told you earlier today that its a whole system, it wasnt a lie

dim goblet
#

also mint, in jinx every package recipie is a file right?

candid mural
#

yeah

willow lotus
#

the only thing I need to move to Gloire is better networking

#

the rest works

dim goblet
#

and is it all in one directory?

#

could you make it like so you can have sub-dirs to organize it better?

candid mural
#

uh

sly mango
#

we need a perl script to convert xbstrap to jinx

dim goblet
#

so like recipe/dev-libs/package

willow lotus
#

no distro does that, just use metapackages

dim goblet
#

whats dat

candid mural
dim goblet
#

jinx would also probs cleanup the image generation mess in aero.py

pale pike
#

Whats the purpose of jinx? To make it easier to create a whole OS and not just a kernel? pika_think

warped furnace
#

it's not xbstrap

azure cloak
dim goblet
#

@candid mural jinx 👀

dim goblet
rotund shadow
#

haunting

dim goblet
#

exciting

candid mural
#

i'll work on it in a bit

#

i am resting rn

dim goblet
#

🫡 🎉

dim goblet
#

🙏 minttt

rotund shadow
#

so needy

dim goblet
dim goblet
#

Day 5 of requesting mint to port Aero to Jinx

#

💪

candid mural
#

it's not gonna be done in one day smh

#

i have other stuff to do, i am basically doing it on the side

dim goblet
dim goblet
#
jinx:
    if [ ! -d "3rdparty/jinx" ]; then \
        git clone https://github.com/mintsuki/jinx 3rdparty/jinx; \
    fi``` i need to fix my makefile skills. but is this a sane way to clone the repo and skip if it already exists
#

@candid mural is it possible to have the host-recipies, source-recipies, ... directories in a seperate subdir (like distro/host-recipies)?

dim goblet
#

how does the workdir and clean stuff work?

#

like is there a command that generates the patch after modifying the workdir

candid mural
#

./jinx regenerate <pkg>

dim goblet
#

i see

#

thanks!

dim goblet
#

ok building host-gcc

#

sacrificing sleep

dim goblet
rotund shadow
#

update autoconf then

azure cloak
candid mural
#

^ this

dim goblet
#

👍 allrighty!

#

being a bloatware full editor, vscode, why doesnt it respect to use the fileformat specified in gitattributes for syntax highlight

dim goblet
#

vinix mlibc recipe doesnt set the linux_kernel_headers path

#

or does it not enable the linux option hmm

dim goblet
indigo fox
#

consider checking config.log :^)

dim goblet
#

cannot find libc

#

and libgcc

#

deps="mlibc libgcc libstdc++" is how your supposed to declare deps right?

dim goblet
#

okay works now

candid mural
#

but you can and should easily be able to figure out how to add that

candid mural
#

also note: there is a fair share of idiosyncracies in managarm's recipes (which you were using before), but those have been fixed in the Vinix/Lyre (now outdated)/Gloire recipes

#

like not having libgcc and libstdc++ as a target package but a host package, which is just insane

dim goblet
#

@candid mural is it possible to run a script inside the container with a jinx command

#

i want to make image inside container

#

so i dont need root priv

#

for loopback

#

it would be nice to have scripts/ and then you could do smth like jinx run-script make-iso

#

and will be ran in the container

dim goblet
#

ok i added the command run-script for this

#

:^)

#

wait that wont work fuck

teal swift
dim goblet
#

currently says $ENV{XBSTRAP_SYSROOT_DIR}

candid mural
#

fair enough

candid mural
#

i am sure that you'd do it differently if you could snap your fingers and get it done

candid mural
teal swift
#

I think xbstrap might finally get this soon

candid mural
#

@teal swift btw the problem isn't the splittage of packages

#

the host gcc produces libraries for the target, meant for use on the target

#

there is no need to build the target's own gcc to obtain these libraries that can be obtained from the host gcc anyways

#

and, that are actually used for cross compiling all ports anyways, so it just makes sense to use those

teal swift
#

that too, didn't actually think of that

dim goblet
#

now why tf doesnt bash compile

#
In file included from /base_dir/sources/bash/jobs.c:47:
/sysroot/usr/include/sys/ioctl.h:9:17: fatal error: asm/ioctls.h: No such file or directory
    9 | #       include <asm/ioctls.h>
      |                 ^~~~~~~~~~~~~~
compilation terminated.
#

the file clearly exists

azure cloak
#

well in my case it clearly didn’t exist

#

you need to provide one in your mlibc sysdeps

dim goblet
#

isnt it from linux-headers?

azure cloak
#

idk honestly

#

may be

#

just make sure it is part of the mlibc-headers package

#

stat pkgs/mlibc-headers/usr/include/asm/ioctls.h

#

if not then you might have to make mlibc-headers depend on linux-headers

dim goblet
azure cloak
#

deps

#

not builddeps

#

that way the headers are available to everyone who depends on mlibc-headers

#

not just while building mlibc-headers

dim goblet
#

and now it works :^)

#

thanks eeeeee!

azure cloak
#

gg

#

you’re very welcome

dim goblet
#

so i could now remove the linux-headers from builddeps since now its in deps right?

teal swift
#

Yep

dim goblet
#

alrighty!

#

thanks guys

dim goblet
#

shouldnt this be ${source_dir}/configure

azure cloak
#

look at jinx-config

#

there is a funny little function that does configure

#

it’s called autotools_configure

dim goblet
#

does doing build use the workdir or the original source dir?

#

like is it possible to build without regenerating?

azure cloak
#

it uses sources/${name}

#

the two copies, ${name}-clean and ${name}-workdir, are there for the regenerate command

#

you can modify the original source dir and if it works modify the workdir after that

dim goblet
#

hm interesting

#

that copies make the storage required grow exponentially lol

willow lotus
#

yes, jinx is more storage heavy

#

its not exponentially, but its *3

dim goblet
#

couldnt you make it like

#

./jinx workspace ${package}

#

that generates the two additional copies

#

and ./jinx clean-workspace $(package}

#

to remove them after?

#

sounds resonable no? since only the OG one is used

azure cloak
#

50gb of sources ;DDD

dim goblet
azure cloak
#

probably

#

though

#

i think we need a separate copy

#

because how else are you going to create „the workspace”

#

if you only have a patched source

dim goblet
#

just dont modify the source

azure cloak
#

..?

dim goblet
#

and work from the workspace if created

#

build from workspace dir

azure cloak
#

you still need a copy tho

dim goblet
#

before workspace-create
sources/package
build uses sources/package and is readonly

after workspace-create
sources/package
sources/package-workdir

build uses sources/package-workdir and regen bases it off of package and package-workdir

azure cloak
#

you need a clean source tree to compare against when generating patches, so if you have a patch for a package you will always need the clean copy

#

but i do think something like that would be nice

#

but if you want to avoid those two@copies you’d need to redownload the source when creating the workspace

dim goblet
candid mural
#

it doesn't require regeneration

azure cloak
azure cloak
#

so he doesn't have to regenerate every time he makes a change to the workdir

#

instead he can just directly build from the workdir

candid mural
#

would need to modify jinx for that

#

it is not supported currently

azure cloak
#

well yeah

#

i said the same thing

#

just modify the source dir and copy the changes over manually

#

then regenerate

candid mural
#

it sounds like it would make it exceedingly easy for people to forget to create the proper patch by regenerating though

azure cloak
#

yeah

#

has it's up and downsides

candid mural
#

i think that was my reasoning behind forcing you to regenerate

azure cloak
#

the only thing i do not appreciate

#

is that

#

there is 3 fucking copies

#

of the source directory

#

well, 2 copies

#

and one actual source directory

#

i do understand why that is needed

#

but its just annoying

#

fucking 50gb of sources just for chromium

candid mural
#

that can technically be addressed by using git

#

not git repos mind you, but using git for managing what would otherwise be the "3 copies"

#

something i wanted to do at some point

dim goblet
#

anyways

#

like 5% is done

#

💀

#

but i also along the way removed aero.py

#

and now you just make

#

and it just works

dim goblet
#

tf In file included from /base_dir/sources/libxpm/src/XpmI.h:63, from /base_dir/sources/libxpm/src/CrIFrBuf.c:38: /sysroot/usr/include/strings.h:13:7: error: expected declaration specifiers or '...' before '(' token 13 | char *index (const char *s, int c); | ^~~~~ /sysroot/usr/include/strings.h:13:7: error: expected declaration specifiers or '...' before '(' token 13 | char *index (const char *s, int c); | ^~~~~ /sysroot/usr/include/strings.h:14:7: error: expected declaration specifiers or '...' before '(' token 14 | char *rindex(const char *s, int c); | ^~~~~~ /sysroot/usr/include/strings.h:14:7: error: expected declaration specifiers or '...' before '(' token 14 | char *rindex(const char *s, int c); | ^~~~~~

indigo fox
#

missing patch

dim goblet
#

vinix doesnt have any

#

it seem like it

indigo fox
#

actually are you on current mlibc master

dim goblet
#

yeah

#

i think

#

wait lemme se

#

shit no lol

#

@indigo fox still errors

indigo fox
#

hm

dim goblet
#

i dont get what its trying to say tho

indigo fox
#

something is replacing index with a define

#

and the libc function prototype for it breaks

#

due to the macro replacement

dim goblet
#

sure is

#

😬

#

wait no

#

thats only for ms windows

#

that doesnt make sense

dim goblet
#

nvm i fixed it

#

missed the xorg-proto patch

teal swift
#

Told ya so. Missing patch

dim goblet
#

$(shell cd src && cargo build --package aero_kernel --target .cargo/x86_64-aero_os.json --release) how do you make so when exit code is nonzero makefile doesnt continue to cook

#

idk why it still continues

#

actually nvm

#

i can just do it without the$(shell)

#

i am learning 🗿

#

aint that bad yet

candid mural
#

@dim goblet how does your llvm even link?

#

i wanted to update the llvm in Lyre since it was still at 14 so i "took inspiration" from the aero diffs

#

and it builds but then linking fails with a bunch of undefined reference errors

#

is there something i am missing?

#

i think you may be missing ``` -DLLVM_BUILD_LLVM_DYLIB=ON \

#

rebuilding now

#

ok no, that fixed nothing

dim goblet
#

huh i rebuild and it rebuilds fine

#

@candid mural what are the errors

#

and also, is it from the jinx branch?

dim goblet
#

update mesa, its old too

candid mural
#

no, that is not what i am talking about

#

else i would've said mesa

#

and i know the mesa is also out of date

candid mural
#

i sorted it out btw

#

i had to readd the host cmake

#

apparently using image cmake for llvm doesn't work

dim goblet
#

i see

dim goblet
#

interesting, freetype doesnt use mmap

#

"checking for working mmap... no"

#
13651   │ else case e in #(
13652   │   e) if test "$cross_compiling" = yes
13653   │ then :
13654   │   case "$host_os" in # ((
13655   │               # Guess yes on platforms where we know the result.
13656   │           linux*) ac_cv_func_mmap_fixed_mapped=yes ;;
13657   │               # If we don't know, assume the worst.
13658   │           *)      ac_cv_func_mmap_fixed_mapped=no ;;
13659   │         esac``` huh
#

"If we don't know, assume the worst."

#

i did build meson instead of autotools version

#

and it works now

#

@candid mural might wanna do this for your oses

#

lyre and vinix

candid mural
#

not even

#

you can pass it as a variable to ./configure

dim goblet
#

it didnt work for some reason

#

idk

candid mural
#

ac_cv_func_mmap_fixed_mapped=yes

dim goblet
#

oh

#

anways

#

this works

#

btw mint why do you prefer autotools

candid mural
#

whatever works for you - in my OSes i always prefer autotools and only use alternatives if it's not available for a given package

dim goblet
#

i see

candid mural
#

because

  1. it works
  2. i know it better
  3. i like it
dim goblet
#

why tf do certin projects have both meson and autotools

#

build methods

candid mural
#

some are transitioning from one to the other

#

and vice versa

dim goblet
#

i see

candid mural
#

and have both in transition periods (X comes to mind)

#

and uh, some other projects may just want to provide users with more options

dim goblet
#

i see

candid mural
#

certainly cannot blame them for wanting to be nice

dim goblet
#

building llvm host now

#

🙏

#

the sources directory is getting BIGGG

dim goblet
#

@candid mural how do you do a git source

dim goblet
azure cloak
willow lotus
#

packaging is ugly

#

especially silly rust

dim goblet
#

its not offical rust repo thats why

#

its my fork

#

their repo probs has release tarballz iirc

willow lotus
#

make a release tarball yourself

dim goblet
#

will do after hmwrk

#

working on aero is addicting and i have to finish my hmwrk before the summer break ends

#

which is good tho

dim goblet
#

this is supposed to be a dist tarball right?

tranquil vessel
#

that’s just an automatically generated tarball of the git repository

dim goblet
#

i see

#

anways, even after genning tarball

#

it does some stuff with the submodules

#

in bootstrap

dim goblet
#

jwm gives windows vibes

warped furnace
dim goblet
#

yeah

warped furnace
#

damn, nice

dim goblet
#

we got gtk back with jinx

#

lets build webkitgtk again

#

💪

#

all the rust ports are very hard unless i am able to upstream it

#

which is sadge

dim goblet
#

the one that managarm has is 3 years old

rotund shadow
#

:P

dim goblet
#
* building package: libnghttp2
tar: This does not look like a tar archive

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now``` how do i make it refecth sources
#

help @candid mural