zetef has quit [Remote host closed the connection]
vdamewood has joined #osdev
<Ermine>
but why
<netbsduser`>
wind bug
<netbsduser`>
Ermine: because microsoft are embracing a role for linux
<netbsduser`>
but that doesn't mean they'd want to whip out GDB
<Ermine>
What about more sensible speculations?
goliath has quit [Quit: SIGSEGV]
<zid>
They're shilling windows as a vm host pretty hard
<zid>
dropping patches on linux to let wsl2 programs use dx12 etc
<zid>
(for ML)
<zid>
probably just so you can debug that side too
<netbsduser`>
Ermine: what more sensible could you want?
<Ermine>
Something which doesn't involve EEE stuff
<nikolapdp>
ms windows, the new hypervisor
<nikolapdp>
hasn't that been the whole point of wsl, eee
<nikolapdp>
or at least disincetivising people from trying linux on real hardware
<netbsduser`>
where does EEE come into it
<nikolapdp>
dx12??
<netbsduser`>
i am simply saying that microsofters are going to turn their nose up at GDB
<nikolapdp>
wouldn't expect anything less from them
<netbsduser`>
embracing a role for linux doesn't mean they are going to adopt everything richard stallman ever churned out to the detriment of their own tools
<zid>
yea, every linux program they see running on a windows machine to them is an extra licence sale
<zid>
so they're trying to make that as easy as possible
<zid>
then they can sell you the fleet management software for maintaining hyper-v farms, enterprice support etc, on top
<zid>
instead of redhat
<nikolapdp>
exactly, disincentivising people from running linux on bare metal
<nikolapdp>
redhat isn't even selling software, just support
<Ermine>
linux does much better job of such disincentivising
<nikolapdp>
don't really agree with that one
<zid>
linux's existence disincentivises installing linux?
<nikolapdp>
zid, well without linux, there would be nothing to disincentivise
<nikolapdp>
so true?
<zid>
food causes hunger
<nikolapdp>
lol
<geist>
at least most linux distros dont pop up ads all the time
<geist>
that's hella disencentivizing me from win11 nowadays
<zid>
I really really didn't even wanna use w10
<nikolapdp>
i'd say none of the relevant ones pop up adds
<zid>
because of what they did to windows update and the search and stuff
<zid>
w11 is just more and worse :(
<nikolapdp>
now imagine how bad w11 is
<zid>
can't even not-stack windows on the system bar anymore I'm told
<zid>
useless os
<nikolapdp>
gccrs is being confused: mov %edi,%edi
<geist>
zid: they at least fixed that
<geist>
about 6 months ago in one of the releases
<zid>
oh did they give in
<zid>
did they give in on center task bar too
<geist>
theres an option. yeah that fixed a major issue i had that was driving me nuts
<heat>
wasn't ubuntu rolling with ads too?
<zid>
They were adamant that center task bar was the future a couple of releases ago
<geist>
now w11 is pretty much the same as w10 to me *except* this incessant ads and trying to get me to use msft services
<heat>
or some weirdish windows-like thing
<geist>
zid: no you can left justify it
<zid>
w11 supposedly makes hyper-v work at least
<nikolapdp>
no, unless you count it telling you about ubuntu pro for outdated packages
<geist>
yah w11 WSL2 is pretty nice
<zid>
wsl2 works great on w10
<nikolapdp>
heat ^
<zid>
it's the hyper-v part that sucks, only wsl2 can use it
<geist>
and integrates nicer, since you can start X apps in linux and they just pop up as a native window, somehow
<zid>
nothing else can on amd
<geist>
i thin kthat's a w11 only feature
<zid>
they're native on w10
<geist>
artifically segmented i'm sure
<geist>
oh dunno then
<zid>
the drop-shadow gets included in window screencaps though which is annoying
<heat>
dwm.exe is probably an xorg server too?
<zid>
the w10 issue is that amd and intel don't do virt the same, one enters in real and one enters in long or something? There's names for it
<heat>
or there's some shim in the middle playing xorg
<heat>
in any case, FUCKING HILARIOUS
<zid>
and w10 doesn't support the amd one except for itself
<heat>
xorg conquers all
<zid>
so it can run windows under hyper-v, but nothing else can run under it
<nikolapdp>
if i'd have to guess, they are running a full xorg server, patched to cooperate with dwm.exe
<zid>
they have a huge translation layer for everything else
<Ermine>
xming
<zid>
idk why graphics would be different
<heat>
windbg also supports mach-o dumps
<geist>
heat: yeah dunno how it works. may be running some sort of linux native X thing that shares textures across some interface maybe
<heat>
windbg conquers all
<nikolapdp>
or it could be xorg withing the vm with special drivers to make it work with dwm
<zid>
sys_read and sys_write don't run a "posix emulator", they just get routed to hyper-v and back to windows as winapi calls
<bslsk05>
github.com: wslg/docs/WSLg_ArchitectureOverview.png at main · microsoft/wslg · GitHub
<heat>
Ermine: linux kernel hackers don't use debuggers
<nikolapdp>
it's rdp??
<heat>
or they use crash or drgn
<zid>
linux kernel debugging is
<zid>
you paste the panic to lkml
<zid>
and linus tells you which instruction faulted
<nikolapdp>
and why
<zid>
and which fucking moron submitted a patch to that line 3 days ago
<Ermine>
there is kgdb or something like this though?
<heat>
you can also use crash or drgn
<zid>
(You can tell they're a fucking moron because they caused your kernel to crash, so there's no other option)
<geist>
yeah and then linus tells you you're a moron because of something he didn't like that day
<nikolapdp>
one of the dumbest decisions about rust syntax is returning from functions by ommiting ;
<nikolapdp>
like why
<zid>
nikolapdp: did you read MUH ARTICLE btw
<geist>
agreed. i like to type return anyway just to be clear WTF is going on
<zid>
I read a lot of it
<Ermine>
that's why i'm onyx kernal hacker
<nikolapdp>
zid, skimmed a bit through it
<nikolapdp>
haven't read it yet
<nikolapdp>
geist: yeah same
<Ermine>
heat wouldn't call me moron, would he?
<zid>
it was pretty nice to see someone rag on rust who'd actually used rust
<nikolapdp>
try him
<zid>
and confirm that it is infact, a pain in the arse to use
<heat>
Ermine: no never
<heat>
not while i can't get more hackers
<geist>
yah some of the initial sheen has worn off to me. and then i discovered std::span the other day and am much happier about C++
<geist>
std::span changes the game when dealing with strings mang
<heat>
you're supposed to use std::string_view
<geist>
oh oh and that too, i need to grok that next
<zid>
what are you supposed to use next year
<geist>
we even have the v"..." extension in zircon for that
<zid>
so they can call you an outdated moron for using string view
<nikolapdp>
std::string_view_span
<zid>
thanks
<heat>
std::string_view has been a thing since C++17
<nikolapdp>
you're welcome
<heat>
it hasn't been surpassed yet
<geist>
yah std::span is a c++20 thing i think, which is why it hadn't really come up in work until pretty recently
<geist>
when we started enabling some c++20 in the kernel
<heat>
reject modernity
<heat>
embrace C MAGENTA MONOLITHIC KERNAL
<geist>
initially i was not down with it, but once i grokked it. it's pretty neat
<nikolapdp>
indeed, embrace c90
<zid>
gnu89
<zid>
get you some anonymous unions + c90
<nikolapdp>
k&r c
<nikolapdp>
typing function arguments is optional
<zid>
pre-ansi is my prefered universe normally, but not for C
<nikolapdp>
lol
<Ermine>
magenta?
<nikolapdp>
the colour
<geist>
heat: i assume you saw the %sv (or %v or whatnot) extension in the zircon printf for stringview
<heat>
yep
<geist>
there's some pragmas in there to disable all the warnings about it
<geist>
otherwise -Wformat shits the bed when i sees that
<heat>
yeah
<Ermine>
%v means other thing in go btw
<heat>
linux pulled a funny for their format extensions
<heat>
they did %pWHATEVER
<heat>
and it turns out cuz its C all pointers back and forth anyway
<heat>
and %pS is valid in printf anyway
<nikolapdp>
zid we should make our new and improved libc, with reasonable functionality builtin
<zid>
%pS prints cats?
<nikolapdp>
cats print
<heat>
%pS symbolizes a pointer
<zid>
nikolapdp: improved libc is just one where you delete anything starting with w or ending in f
<geist>
huh, putting it *after* the p seems no bueno. seems like any extension to printf you must do it as a modifier in front of something, so that when you see the final thing you can replace
<geist>
like %Sp would be ice, because S isn't used anywhere else
<geist>
like 'p' is the instruction, everything else should be a prefix
netbsduser` has quit [Ping timeout: 256 seconds]
<heat>
but %Sp isn't recognized by gcc
<zid>
yea that should absolutely print DEADBEEFS
<geist>
oooooooooh
<geist>
ooooooooooooooh
<geist>
okay. yeah.
<zid>
oh so they steal the type checking?
<heat>
yes
<nikolapdp>
kek
<heat>
they're pointers, so Wformat doesn't complain. And no one is doing %pS to print 0xDEADBEEFS
<geist>
and of course it's basically never that you would natively put anything in the spot after %p so it works
<heat>
yep
<zid>
__attribute__ ((format (printf, 1, 2)) for life
<geist>
it's in pretty much every situation a space or a comma or other kinda []()etc char or a \n
heat has quit [Quit: Client closed]
heat has joined #osdev
<heat>
could anyone on fedora/rpm do an strace of an rpm install of a random package?
<heat>
this is funny, pacman does not update atomically
<heat>
not on a reinstall at least
frkazoid333 has quit [Read error: Connection reset by peer]
frkazoid333 has joined #osdev
Burgundy has quit [Ping timeout: 268 seconds]
\Test_User has quit [Quit: \Test_User]
\Test_User has joined #osdev
mmohammadi9812 has joined #osdev
skipwich has quit [Ping timeout: 268 seconds]
mmohammadi9812 has quit [Ping timeout: 272 seconds]
masoudd has joined #osdev
gog has quit [Read error: Connection reset by peer]
<heat>
it unlinks then creates a file and writes a bunch of crap
<heat>
probably very libarchive-y if i'd guess
Matt|home has joined #osdev
\Test_User has joined #osdev
gog has quit [Read error: Connection reset by peer]
<Ermine>
damn
\Test_User has quit [Quit: \Test_User]
<Ermine>
heat: on the other news, wine seems to work in alpine
<Ermine>
I didn't test it thoroughly though. Maybe will try RTW
<heat>
TRIIIIIIIiARIIIIIIIIIII
<heat>
are triari pessimal
<heat>
they did stand around for the whole battle doing jack shit
<heat>
otoh hastati were MINIMAL
<Ermine>
Hastati are enough to steamroll Gauls
<Ermine>
And Romans don't have anything else to counter cavalry but triarii
<Ermine>
There are some post-marian spearmen but they suck
<heat>
historically they'd use auxiliaries
<heat>
triari very rarely saw battle
<heat>
even if they needed spears they'd prefer to use their pila vs deploying triari i'm pretty sure
<Ermine>
yeah
<Ermine>
There's even an idiom about dire situations
\Test_User has joined #osdev
<heat>
isn't RTW the game where principes are damn near useless?
<heat>
or is it rome 2 i'm thinking of
<Ermine>
Idk about rome 2, never played
<heat>
you should try russia in M2TW
<heat>
it's poor af, very sparse and you get the nice privilege of possibly getting invaded by the mongols first, worst case second or third
<heat>
all in all, historical!
<Ermine>
defo should try
<heat>
those early-ass tw's are still crackhead levels of historical accuracy
<heat>
bronze age egypt post-alexander, russian nation in 1000, portugal owns a random spanish town near france
<heat>
empire was better but the european map was so sparse you could kill off france in literally two turns
<Ermine>
I wanted to mention bronze age egyptian army
\Test_User has quit [Quit: \Test_User]
vai has joined #osdev
<vai>
yo
zhiayang has quit [Ping timeout: 252 seconds]
\Test_User has joined #osdev
zhiayang has joined #osdev
heat has quit [Ping timeout: 268 seconds]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
\Test_User has quit [Quit: e]
\Test_User has joined #osdev
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
bliminse has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
stolen has joined #osdev
Gooberpatrol66 has joined #osdev
foudfou has quit [Remote host closed the connection]
joe9 has joined #osdev
joe9 has quit [Client Quit]
foudfou has joined #osdev
\Test_User has quit [Quit: e]
\Test_User has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
Ermine has quit [Remote host closed the connection]
Ermine has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
<Ermine>
openvsix should be renamed to librevsix
gbowne1 has quit [Quit: Leaving]
Mooncairn has quit [Ping timeout: 256 seconds]
GeDaMo has joined #osdev
zxrom has quit [Quit: Leaving]
clever has quit [Ping timeout: 256 seconds]
\Test_User has quit [Quit: \Test_User]
\Test_User has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
Matt|home has quit [Ping timeout: 245 seconds]
op has joined #osdev
zxrom has joined #osdev
<geist>
zy: still around?
vikn has joined #osdev
vai has quit [Ping timeout: 252 seconds]
goliath has joined #osdev
PublicWiFi has quit [Ping timeout: 264 seconds]
\Test_User has quit [Quit: e]
\Test_User has joined #osdev
\Test_User has quit [Client Quit]
\Test_User has joined #osdev
\Test_User has quit [Quit: e]
Burgundy has joined #osdev
heat has joined #osdev
zid` has joined #osdev
zid has quit [Ping timeout: 268 seconds]
Left_Turn has joined #osdev
<zid`>
fork is the superior api, factorio only supports async saving on systems with fork
op has quit [Remote host closed the connection]
\Test_User has joined #osdev
stolen has quit [Quit: Connection closed for inactivity]
bitoff__ has joined #osdev
bitoff_ has quit [Ping timeout: 256 seconds]
netbsduser` has joined #osdev
gildasio1 has quit [Quit: WeeChat 4.1.2]
<zy>
geist: yes sorry went to sleep, scrolling up
gildasio has joined #osdev
<zy>
ah my nick was zyloze but I used that Freenode webclient for a while during my osdev stint so it could've been something else. You helped me a lot with getting PCI working, and I noticed you helped countless others. Appreciate your services. Are you still working on NewOS?
hl_ is now known as hl
PublicWiFi has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
srjek has joined #osdev
pretty_dumm_guy has joined #osdev
joe3462 has joined #osdev
skipwich has joined #osdev
navi has joined #osdev
Gooberpatrol66 has quit [Ping timeout: 260 seconds]
skipwich has quit [Ping timeout: 256 seconds]
skipwich has joined #osdev
gog has joined #osdev
<heat>
zid`, does it fork the whole game process?
<zid`>
yup
<zid`>
lets the kernel do all the RCUing
<zid`>
and it just snapshots the forked copy to disk
<heat>
that seems xpensive
<heat>
how large are the saves?
<zid`>
not a full memory dump, just the map save
<heat>
yeah but how large?
<zid`>
depends how much shit you built?
<heat>
idunno i dont play factorio
<zid`>
couple meg to a couple tens of meg
<heat>
oh that's small
<heat>
i do wonder if async saves make a difference then
<zid`>
yea but it would otherwise need to completely lock the map while it saves
<zid`>
and trying to repack 10MB and get it on disk in 16ms is difficult
<heat>
truncate(save_file, size) + some cheap serialization to an mmap sounds ezpz
<zid`>
it ruins your caches too
<heat>
yeah but with fork you'll still pay a lot for CoWing random stuff
<heat>
in the game's case, a whole lot of megs i guess
<zid`>
they quickly get orphaned
<zid`>
then it stops needing to cow them
<heat>
yea but you'll still fault
<zid`>
autosave is only every 15 mins, you can deal with slowly eating a useless fault
<zid`>
over those 15 mins
<heat>
considering factorio is hopefully single-threaded, you could also just spawn a thread and copy up some stuff i think
<zid`>
no because you need to lock the map
<zid`>
else you'll have desync
<zid`>
and locked map can't do any work
<zid`>
it's a full big kernel lock
<heat>
desync with what?
<zid`>
the save vs reality
<zid`>
if you scan it out like an iphone while the factory is running
<zid`>
iphone camera*
<zid`>
you'll get blurry buildings
<heat>
isn't that what you get with a fork() snapshot too?
<zid`>
no because it immediately makes a clone, the factory stays running by cowing
<zid`>
there's always a 'before' and an 'after' and never a mixture
<heat>
hmm i guess threads won't get you much, making a full copy of the game state will take ages OR it'll be more or less as fast as writing a save game
<heat>
fork() is a funny solution but it'll go out the window as soon as you have threads
<zid`>
works fine with threads though?
<zid`>
one thread just forks off a copy of an old game-state, done
<heat>
you can only call async-safe functions after a MT fork()
<zid`>
MT?
<heat>
multi-threaded
<zid`>
what's a 'multi-threaded fork'
<heat>
parent process is multi-threaded
<heat>
or "forking process"
<zid`>
This seems suddenly, I swear there wasn't a restriction on what you could do as a child before
<zid`>
when did this happen, or alternatively, how did I miss this
<heat>
it's in POSIX 2004
<heat>
no idea if its in the OG pthreads standard
<zid`>
isn't.. every process forked?
<zid`>
like, init then fork then execve
<zid`>
turtles all the way down
<heat>
sure
<zid`>
so nothing but init may call functions?
<heat>
no
<heat>
locks stay held and all threads disappear except the one that called fork()
<zid`>
good?
<zid`>
that's
<heat>
soo you can't call async unsafe functions, because you'll deadlock
<zid`>
that's exactly what we'd want
<zid`>
what's an async unsafe function
<heat>
malloc()
<zid`>
and how could it deadlock if we *don't have any threads*
<heat>
all stdio functiosn too
<heat>
>locks stay held
<zid`>
oh so you mean, we started with thread #0 and thread #1, we fork, while thread #0 was holding a lock, but now we'll never see it *unlock* because we're in a diff thread group now?
<heat>
yes
<zid`>
sounds like you'd need to be a bit careful then, but should be fine
<zid`>
just pre-allocate the buffers etc you'll need just before you fork
<zid`>
could even write-back the data via shm if you're not allowed to do anything but memcpy and abort
<zid`>
rather than writing it to the file
<heat>
basically what i'm saying is that after fork() in a MT process you need to be super careful not to call something unsafe and randomly deadlock
<zid`>
yea gathered that
<heat>
because you're in essentially something resembling a signal handler
<zid`>
but, I just solved it above trivially
<zid`>
so I don't think it'd be a huge problem
<heat>
if the game state requires locks you're screwed too
<zid`>
n--no?
<zid`>
You don't need to take any locks as the forkee
<zid`>
you can just bulldoze right over them
<zid`>
and all the locks will unlock at the end of the update anyway
<zid`>
even if it were a problem
<heat>
i guess you can take care of it by doing something like "pthread_mutex_lock(&game_lock); fork();"
<zid`>
like, the program not going fully quiessent 60 times a second is a bug
<heat>
and then completely ignoring the lock in the child
<zid`>
by the the time the frame has finished
<zid`>
*everything* should be unlocked *already*, *then* you preallocate some space for a save, *then* fork
<zid`>
and everything should just be naturally hunky-dory
<zid`>
You take a lock at all to do things like "I need to add to this belt while it's moving", if you have that lock held at the end of the frame, that's a game-bug and it's *already* deadlocked
<heat>
does only a single thread touch game state?
<zid`>
no
<heat>
then you need my lock -> fork() trick to ensure consistency in the child
<heat>
i think
<zid`>
no
<heat>
unless there's some video-gamey reason why you don't need it
<zid`>
The locks not being in a consistent state *is a game bug*
<zid`>
They're either all fully taken, or all fully un-taken, nothing else
<zid`>
no other states
<zid`>
every other state is a bug
<zid`>
You can consider it like a database with a bunch of read/writers, but where every 60th of a second, every single client disconnects, then you get change to fsck the db, then they all reconnect.
<zid`>
you do the fork during the 'fsck the db' part, not the 'while all clients are connected and a bunch of shit is happening' part
<zid`>
that was previously happening serially, so it delayed everybody reconnecting
<zid`>
Like, in theory you could probably even kill every single thread between frames to double-plus-good make it work, but it'd make your audio glitch probably
<heat>
makes sense, thanks
<heat>
darn video games with their frames
zetef has joined #osdev
clever has joined #osdev
vai has joined #osdev
<vai>
hi
joe3462 has quit [Remote host closed the connection]
<nikolar>
Hello
<heat>
good morning linux user
<nikolar>
Hello Linux copycat
<heat>
if you're not a linux user, bad morning propriecuck, how's the lack of freedom
<zid`>
awful, but my software works
<heat>
if it was FOSS we could've made your software not work, together
<zid`>
ikr
<nikolar>
The real software was the friends we've made along the way
<mjg>
were they generated by chatgpt?
xenos1984 has quit [Read error: Connection reset by peer]
Mooncairn has joined #osdev
<sham1>
But free software does work tho
<sham1>
And it's getting better by the day. Meanwhile basically every proprietary platform is enshittifying itself to death
<bslsk05>
nohello.club: The No Hello Club - Just say what you need!
<heat>
>free software does work tho
<heat>
[CITATION NEEDED]
<zid`>
like what
<sham1>
[1] [2] [3] [4] [5]
<zid`>
name ONE piece of software
<mjg>
mofo you are literally shitposting from free software
<zid`>
quick, for a dollar, name a woman
<heat>
gog
<sham1>
Taylor Swift
<zid`>
both fake names sorry
<zid`>
too late
<mjg>
yes i'm a swiftie, no i don't use swift (the programming language)
<heat>
mjg, correct but i'm also using a crap text chatting service from the early 80s
<nikolar>
Firefox works, for one
<sham1>
Blender
<sham1>
The Linux kernal
<sham1>
gcc
<zid`>
firefox is a windows port
<zid`>
linux isn't software
<mjg>
heat: it is battle tested
<zid`>
gcc sorta works actually
<mjg>
old == stood the test of time!
<mjg>
i mean if unix or windows were shite they would not be in active use, would they
<mjg>
1111
<nikolar>
zid`: firefox is a windows port
<nikolar>
So?
<zid`>
so it's windows software that graciously works on linux
<zid`>
not linux software
<nikolar>
Still free software
<zid`>
no?
<zid`>
it's licenced to hell
<heat>
firefox is FOSS
<zid`>
if you install PALE MOON or whatever it's got no video or audio playback and no icons
<nikolar>
That's not because of ff
<nikolar>
That's a codec issue
<zid`>
ohh so the software works fine then without those
<heat>
chromium is also FOSS
<nikolar>
Indeed
Mooncairn has quit [Quit: Leaving]
<zid`>
This is why richard stallman picks and eats his own feet, it's more reliable than free softawre
<heat>
glibc is also okay when they don't break everything by removing some random shit in their ELF .so
<nikolar>
I think that those two are orthogonal zid
zetef has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
<kof673>
there is netscape 3 code that is probably not supposed to be on archive.org, but possibly jwz put it there :D
* kof673
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
<zid`>
Do you think richard stallman stays in heaven because he too lives in fear of what he's created?
<heat>
why's he in heaven
<heat>
after the creep comments about epstein
<heat>
or are you hinting epstein is also in heaven
<zid`>
god is allowed to creep
<zid`>
it's his right, same with putting bugs in people's eyes that hatch then burrow out and blind you
<zid`>
his perogative
<mjg>
hands off epstein
<mjg>
i mean literally
<vai>
thought hes dead :)
<vai>
heh
xFCFFDFFFFEFFFAF has joined #osdev
d5k has joined #osdev
d5k has quit [Remote host closed the connection]
d5k has joined #osdev
k0valski18891621 has quit [Quit: Peace out !]
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
Mooncairn has joined #osdev
Arthuria has joined #osdev
xFCFFDFFFFEFFFAF has joined #osdev
<sham1>
heat: you're not allowed to make fun of people with cancer
Mooncairn has quit [Ping timeout: 260 seconds]
Mooncairn has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
<heat>
mjg, what's geom? is it your block layer?
leg7 has joined #osdev
Left_Turn has joined #osdev
<leg7>
Hey I'm writing a ps2 8042 controller driver and the wiki says I should disable "usb legacy support" to avoid running into hardware quirks. Is there a quick and dirty way to do this without going deep into USB stuff?
<bslsk05>
osdev.org: "8042" PS/2 Controller - OSDev Wiki
<leg7>
> This USB Legacy Support should be disabled by the OS as soon as the OS initialises the USB Controller, and this should be done before the OS attempts to initialise the real PS/2 controller. Otherwise the OS would only initialise the emulated PS/2 controller and there's a large risk of problems caused by deficiencies in the firmware's emulation.
<leg7>
It sounds like it has to be done in the kernel
zetef has joined #osdev
<leg7>
maybe you can do it in BIOS settings to but I'm using a qemu vm so I don't even know if I have access to that
<heat>
>as the OS initialises the USB Controller
<heat>
you're not doing it
op has joined #osdev
<leg7>
Yes I would like to skip that I don't want to get into usb right now
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
<heat>
ok then skip it no problem
<leg7>
Oh is it enabled only when you initialise the usb controller?
<heat>
no, it'll only give you grief if you support both USB and PS/2
<mjg>
heat: s/your/
sbalmos has quit [Ping timeout: 256 seconds]
<mjg>
heat: it's a stackable fuckery for i/o handling
zetef has quit [Remote host closed the connection]
<mjg>
overall a failed experiment
Left_Turn has quit [Remote host closed the connection]
<mjg>
at best
xFCFFDFFFFEFFFAF has joined #osdev
<heat>
ooooooooh windows IRP but worse?
<mjg>
part of the design was to ship al lrequests to kernel threads
Left_Turn has joined #osdev
<mjg>
so you had to suffer mandatory extra context switches
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
<mjg>
afair this got partially patched and you can submit some of the i/o directly
<mjg>
anyhow, the real problem with these "modular designs" is that they lose information at every level and you end up worse
<leg7>
heat: ok ty
xFCFFDFFFFEFFFAF has joined #osdev
<mjg>
also kind of obsoleted by ZFS
<mjg>
made obsolete*
<heat>
the giant layering violation
<heat>
zfs handles all your storage like solaris handles all your operating system needs
<mjg>
sounds like you got TRIGGERED
<mjg>
how did geom even come up tho
<mjg>
you lookin' for bad ideas how to do something?
<nikolar>
I mean zfs does handle all of my storage
<nikolar>
What's your point
<mjg>
retroboomer
<heat>
mjg, no i was looking at ways to implement umount
<bslsk05>
osdev.org: "8042" PS/2 Controller - OSDev Wiki
<leg7>
what do you think?
<heat>
ignore it
<leg7>
ok
<heat>
yes it'd be better to use usb, no it's probably not needed, no you shouldn't worry about it now
<leg7>
ok ty the wiki really insists on it so I just wanted to make sure
<heat>
mjg, lol what u mofo
<heat>
i'll fite u
<mjg>
hm
<mjg>
how about we maintain a veneer of civility
<mjg>
to that end let me take back "lol" and instead ask why would you look at that code and not the linux variant
<mjg>
also netbsd has an implementation btw
<heat>
linux's super_block management looks insanely complicated to me
<nikolar>
Also onyx is a Linux knockoff, why look at fbsd
<heat>
so i tried looking at freebsd and it's also making me cry
<mjg>
i have a quote for you which should help
<mjg>
Marcus Aurelius, Meditations, book 1
<heat>
bro quoting marcus aurelius is a big L
<mjg>
page number and exact wording depends on the translation
<mjg>
but:
<mjg>
Of Codeus, for he did not bother looking at BSD codebases
<mjg>
something to think about
<mjg>
there is also a paragraph about Fasteus, who detested PESSIMAL
joe9 has joined #osdev
xenos1984 has quit [Ping timeout: 246 seconds]
xenos1984 has joined #osdev
xFCFFDFFFFEFFFAF has quit [Ping timeout: 245 seconds]
xenos1984 has quit [Ping timeout: 268 seconds]
<kof673>
zfs: > You probably should go with 32 gigs of ram at the very least if you are hoping to achieve any form of sustainable read/write
<kof673>
old freebsd, geom: > 1.2 Hardware Requirements FreeBSD for the i386 requires a 486 or better processor to install and run (although FreeBSD can run on 386 processors with a custom kernel) and at least 24 MB of RAM.
<nikolar>
kof673: it's a laptop, a sata ssd would be fine, speed-wise
<mjg>
486 with 24M of ram?
<mjg>
that would be some high end shit
<heat>
zfs need 50 trillion gigs of ram and 5 nvmes in RAID0
<zid`>
only 5?
<zid`>
and not 0+1?
<zid`>
your zfs game is weak heat
* mjg
checks his spec
<mjg>
yep i'm running on the bare minimum here
<nikolar>
heat: no
xenos1984 has joined #osdev
<heat>
mjg your machine only has 40 cores at 6GHz it can't handle the compression of 40GB/s
<heat>
the best part about zfs is when it shuffles your data from the page cache to the in-memory journal 0, then to the on-disk journal 1, then the on-disk journal frobbler 2, then finally the "final disk location" whatever that means
<nikolar>
You clearly have no clue how that works heat
<nikolar>
We've had this conversation before
<heat>
no one does, it's brilliant
<nikolar>
Ni
<nikolar>
No
<mjg>
ask on reddit
<heat>
ext4 can journal data too but it doesn't need to collect data in the frobbler to make a mega-collection of guzzlers that it can then write to disk
<zid`>
You forgot the horngozlers and thumbeasties
<mjg>
hue > I want to know the best resources from where i can learn about os development and tutorials also. I want to make a os like windows xp from scratch ,the first os i ever used.
<nikolar>
heat: zfs doesn't need all that
<nikolar>
If you want more write speed, you add a write cache
<nikolar>
It not run it with one disk
<mjg>
windows xp was like a part time job for one dude voer the summer
<nikolar>
s/it/if
<mjg>
> i will give myself 20 years but 1 thing i tell you i will make OS like Win Xp and that's a promise and i will do it single handedly
<mjg>
ok it's a troll
<heat>
can win xp do snapshots
<mjg>
it is effort toward perfection
<zid`>
it can do cool fake filesystems off read only images
<kof673>
zfs and geom was meant tongue in cheek but my point is apples and oranges, they were from different eras for different targets
<zid`>
I forget what it's called though
<zid`>
xp embedded does it
<zid`>
cus it's tooo harrrd to make windows not die if the root is ro
matrice64 has joined #osdev
<heat>
can i stream my dnodes into znodes into tcp over nvme into oracle database
<heat>
zid`, union mounts?
<heat>
like a tmpfs over a ro fs?
<zid`>
yea
<heat>
kool
<heat>
yeah i'm pretty sure it's very hard to make linux not die with a ro root too
<heat>
at least conventional linux
<zid`>
all mine work fine
<zid`>
but I only run gentoo
<heat>
oh yeah? that's cool
<heat>
distro installers are usually tmpfs union mounted over some compressed thing, usually squashfs
<bslsk05>
learn.microsoft.com: EWF RAM Mode | Microsoft Learn
<zid`>
That's what my arcade machine uses
<Ermine>
There are people that enable dm-verity on desktops, I guess that also pretty much implies ro rootfs
<heat>
Ermine, how do routers do logging then?
<zid`>
/var mounted ramfs
<zid`>
nikolar: is it terry time?
<nikolar>
Nope
<heat>
i mean, sure
<zid`>
this kid is not going places
<zid`>
except maybe gulag
<heat>
i guess windows' problem is that it doesn't have designed "this should totes be writeable" dirs?
<heat>
and it can't do mounts can it
<zid`>
it was just never designed not to trash its fs constantly
<nikolar>
Nah, not gulag, goli otok maybe
<zid`>
all the services act like it's rw, and all the services depend on other services
<heat>
as it should.
<heat>
read-only filesystems are not POSIX compliant anyway
<zid`>
neither is your face
<zid`>
but we allow to exist
<heat>
yes but both suck
<heat>
i'll try to get my face into POSIX-next
<Ermine>
Now I wonder how windows phone storage is designed
<nikolar>
Good question Ermine
zetef has joined #osdev
<kof673>
> Chapter 15. Configuring a remote logging solution access.redhat.com › red_hat_enterprise_linux › html › security_hardening The Rsyslog application enables you to configure a system to receive logging information from remote systems.
<kof673>
business people like that sort of thing
<mjg>
still rsyslog?
<mjg>
systemd had something funny for remote logging, tcp + http based
<kof673>
i just mean ro does not matter, i have no idea what is "current"
<mjg>
(:S)
<kof673>
yes, im sure it does :D
<Ermine>
tcpwrappers
troseman has joined #osdev
<Ermine>
iirc debian still runs rsyslog by default
<heat>
windows phone is obviously refs
<zid`>
heat: read only / is easy, just only have 8 read only symlinks to rw mounts duh
<zid`>
does posix ban that too
<mjg>
and solaris phone is zfs
<heat>
zid`, yes
<zid`>
posix is silly then
<zid`>
I can rules lawyer it trivially ergo the rules are SOFT AND WEAK
Arthuria has quit [Read error: Connection reset by peer]
<nortti>
Ermine: I don't think it does on debian 12 or 13 anymore
<heat>
>readdir() shall mark for update the last data access timestamp of the directory each time the directory is actually read
<heat>
rules laywer this
<zid`>
it can mark it for update all it likes
<zid`>
nobody says it has to do anything
<heat>
oh fuck
<heat>
i underestimated the zid`
<zid`>
LAWYERED
<kof673>
that's just normal lawyer lol
<zid`>
further lawyering: My filesystem only supports one date-time format on directory last data access timestamps
<zid`>
and it's a binary 0 for before 1970, and a binary 1 for after 1970
<netbsduser`>
i wonder if PoSix specifies what should happen if 1) program maps a 1mib sized file MAP_SHARED 2) program touches mapping at offset corresponding to 512kib into file 3. user demands truncation of the file to 256kib but does not touch the mapping 4. user extends the file to 1mib again 5. user reads mapping at offset corresponding to 512kib into file
<netbsduser`>
i assume it doesn't
<Ermine>
> PoSix
<zid`>
I assume extended mappings are mandated to be zero
<Ermine>
people even do utilities to make win11 install on refs...
<heat>
it's demanded to be 0
<netbsduser`>
is it really demanded to be 0? it's hard to implement if you don't actually have virtual memory, which i remember posix appeared to take pains to support
<zid`>
why is memset 0 on malloc/mmap/etc hard to support?
<netbsduser`>
because there is no second mmap()
<netbsduser`>
the file was truncated and then extended
<zid`>
> 4. user extends the file to 1mib again
<heat>
If the effect of ftruncate() is to decrease the size of a memory mapped file [SHM] [Option Start] or a shared memory object [Option End] and whole pages beyond the new end were previously mapped, then the whole pages beyond the new end shall be discarded.
<zid`>
how does this extend, if not through a posix api?
<heat>
also
<heat>
If the file size is increased, the extended area shall appear as if it were zero-filled
<nikolar>
People have installed win on btrfs
<netbsduser`>
i swear to god posix "does not specify the behaviour of" accessing a mapped file in a truncated area
<netbsduser`>
and this adds a fun twist to that by making the area untruncated
<zid`>
what it does sure, but what happens during truncate is
<zid`>
and during growth
<heat>
i just quoted you the scripture
<netbsduser`>
what is "discarded"?
<zid`>
discarded
<zid`>
deleted
<zid`>
gone
<zid`>
ceased to be
<netbsduser`>
> References to discarded pages shall result in the generation of a SIGBUS signal.
<kof673>
an ex-page, pining for the .......something
<zid`>
at no point does it say they are undiscarded when a file is grown, it explicitly says they appear as zeros infact, so you're double-plus-fucked
<zid`>
not just singularly fucked
<netbsduser`>
this is as i thought then
<netbsduser`>
it doesn't say whether the growth makes the mmap()'d region, beyond the point at which it was previously truncated, acceptable to use again
<zid`>
?
<heat>
sure does
<zid`>
That's precisely what it explicitly talks about
<heat>
"If the file size is increased, the extended area shall appear as if it were zero-filled"
<zid`>
literally says it's zeros, heat's pasted it twice now
<zid`>
and I referenced it three times
<heat>
also "Note that references beyond the end of the object do not extend the object as the new end cannot be determined precisely by most virtual memory hardware. Instead, the size can be directly manipulated by ftruncate()."
<heat>
they recomend extending the file with ftruncate
<netbsduser`>
if i mmap() a file which was 1mib long, i map 1mib worth of it, i truncate it to 512 kib, then i extend it again, well, as you yourself said, there is nothing said about un-discarding the pages of the mapped region beyond the previously truncated point
<heat>
it's an Austin Group(tm) Certified solution
<heat>
what?
<nikolar>
If I mmap a region larger than the file, does that count as extending
zetef has quit [Ping timeout: 260 seconds]
<heat>
they tell you everywhere it's 0s, they recommend this solution
<heat>
i don't see the undefinedness
<heat>
nikolar, no, mmap does not truncate
<netbsduser`>
heat: well i simply don't see what bearing the file having zeroes in it now has on the fact that trying to touch the previously "discarded pages" trigger SIGBUS
<nikolar>
What's the behavior then
<nikolar>
Just zeros that don't end up in the file if you write there?
<heat>
you get SIGBUS if the MMU can catch it, 0s in general
Arthuria has joined #osdev
<heat>
netbsduser`, MAP_SHARED is required to be up-to-date AFAIK
<netbsduser`>
and it doesn't necessarily matter that you re-extended the file, in so far as i can tell
<heat>
if the file says 0s, the mapping is 0s
<heat>
the only leeway you have wrt coherency is msync for writeback
<netbsduser`>
i am fairly confident on these semantics because they are true of the old windows posix subsystem
<netbsduser`>
i proved it in tests
<heat>
posix certification is fucked
<heat>
my nameitests found problems in UNIX certified os/x
<netbsduser`>
if you map a file and then truncate it, you may see some old pages still. it only SIGBUSes if you didn't touch that page
<netbsduser`>
but i didn't try the full thing with re-extending again. though my intuition is that it will not magic away the old pages
<heat>
that's clearly wrong
<heat>
given that the wording says ftruncate will *discard* those pages
<netbsduser`>
i am speculating that this is a new addition
<Ermine>
I have two questions for macos: 1) why would they certify their system as posix, if their target audience doesn't care, 2) why are they certified even there are clear violations of posix?
<netbsduser`>
their target audience did care before
<heat>
certification is a scam
<netbsduser`>
os x used to be the hacker's choice
<heat>
basically you pay the open group and they give you the POSIX(r)
<Ermine>
C O R R U P T I O N
<nikolar>
Us government had a requirement of only running POSIX systems for some stuff
<nikolar>
The the macos certification and POSIX subsystem for windows
<kof673>
^ and other certifications
<nikolar>
Sure
<kof673>
CYA -- meet the checkboxes
<netbsduser`>
what surprises me hugely is that they even prescribe SIGBUS for the post-truncated area, as in many areas i remembered posix as being outrageously liberal
<Ermine>
And us govt will probably use the bestest AIX for that
<kof673>
i just mean then there is someone to blame
<nikolar>
That's why POSIX exists actually, it was made because the us government wanted to be able to get software for any Unix working on their systems
<netbsduser`>
like the C spec, guaranteeing nothing so that ridiculous toys for LISP machines can claim to be compliant despite being almost unrecognisably unix or c respectively
<nikolar>
So they made all unices follow a standard
<heat>
the ibm aix guy was right, it is the superior system
<kof673>
> Another interesting emulator is nevermore, a lisp machine emulator for the TI-Explorer > The irrepressible Daniel Seagraves has done some good work with another TI-Explorer lisp machine emulator, meroko > Brad Parker’s usim is a nice C-language emulator for the first Lisp Machine first broadly produced, the MIT-CADR > vsedach/Vacietis: C to Common Lisp compiler > CLiCC: Common Lisp to C Compiler
<kof673>
and so forth lol
<kof673>
it is in a ti-explorer subdir ...
<nikolar>
Heh
<kof673>
also: > Nevermore." And the Raven, never flitting, still is sitting, still is sitting. On the pallid bust of Pallas just above my chamber door
<kof673>
if you cross-reference corvus and pallas...story checks out in alchemy land lol
troseman has quit [Quit: troseman]
xFCFFDFFFFEFFFAF has joined #osdev
Arthuria has quit [Remote host closed the connection]
<zid`>
when are we prting terraria to pdp so that nikolar will play with me
<chiselfuse>
i once found a document showing types of debugger software and what each uses to carry out functions of a debugger. i can't find this info anymore
<zid`>
that sounds like a neat doc
<chiselfuse>
zid`: i thought it was common knowledge, i vaguely remember it saying that some used some feature meant to debug programs while some others emulated the whole thing without using that and so on.. can you give me some keyword i can google of this?
<zid`>
not a clue
<GeDaMo>
CPUs provide a variety of debugging facilities
<mjg>
> Fearless concurrency is real. The occasional awkwardness of the borrow checker pays off in making parallel programming practical.
<mjg>
fuck me
<zid`>
In C I'm sometimes reluctant to split files or use libraries, because it affects inlining and requires micromanagement of headers and symbol visibility.
<zid`>
so we can confirm all these tests are with LTO disabled then
<zid`>
so we're behind gcc 6
<zid`>
MUCH MORE MATURE LANGUAGE THAN C
<zid`>
this guy is on so much crack I figure he's currently ODing
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
<childlikempress>
mjg: i will say that one thing there is legit
<childlikempress>
which is that people definitely do tend to roll suboptimal handcrafted data structures in c where something like rust would make it easy to use a decent off-the-shelf one
<zid`>
Yea that's why C loses any benchmark ever
<zid`>
They just didn't write it fast enough
<zid`>
it's 100% 'on you'
<mjg>
totes agree
<zid`>
rather than just "call numpy and hope it's fast *enough*" or whatever other people have to do
<childlikempress>
you shouldn't have to specialise shit by hand when it could be done for you
<zid`>
Then why write C
<zid`>
It's the language for doing that in
<zid`>
If you're not going to, use python
<childlikempress>
'why not just stay in my false dichotomy of local maxima forever?'
<mjg>
note i'm qouting feazlezzznezz of concurrency
<immibis>
the language with the off-the-shelf data structures is called C++
<mjg>
or rather lack thereof
<immibis>
the language that specializes shit automatically is called C++
<childlikempress>
mjg: yeah definitely not disagreeing with the concurrency point
<childlikempress>
immibis: yeah but c++ is c++. it's disqualified by default
<immibis>
C++ is the language you want if you're asking these questions about C
<immibis>
"why can't C do X?" -> "C++ can do X"
<immibis>
forall X
<immibis>
... then you are like "I diaqualify languages that do X"
<immibis>
disqualify*
<childlikempress>
c++ opens up a _world_ of new possibilities of ways to shoot yourself in the foot
<childlikempress>
the goal is to _reduce_ foot-shooting potential
<mjg>
hey i like to fearlessly shoot myslef in the foot
heat has joined #osdev
<heat>
the goal is to linux kernel
<heat>
zid`: what if ancient rome had twitter
<heat>
maybe no civil war yes??
<kof673>
"the goal is..." "the goal is" /me sees jit-oborus shed a tear
Gooberpatrol66 has joined #osdev
<immibis>
childlikempress: the foot-shooting potential is because of all these things you requested
Arthuria has quit [Ping timeout: 256 seconds]
<heat>
that and C++ is a glue-sniffing language
<heat>
how tricky do you want it? yes? great!
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<immibis>
because of all the things you requested
<immibis>
(mostly)
<zid`>
as per my last messenger
d5k has quit [Ping timeout: 252 seconds]
<zid`>
nikolar: it is getting late are you still not home wtf
dude12312414 has joined #osdev
dude12312414 has quit [Remote host closed the connection]
op has quit [Remote host closed the connection]
goliath has quit [Quit: SIGSEGV]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Burgundy has left #osdev [#osdev]
<nikolar>
FEARLESS CONCURRENCY
<zid`>
nikolar.
<zid`>
hnkona
<immibis>
FEARLESS CRYPTOCURRENCY
<immibis>
FEAR LESS CRYPTOCURRENCY
<heat>
invest in my new cryptocurrency
<immibis>
invest less in cryptocurrency
<heat>
$SCAM.RS
<zid`>
dollar-cam.rs
<mjg>
rug.pull().expect("riches");
<mcrod>
hi
xFCFFDFFFFEFFFAF has joined #osdev
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
xFCFFDFFFFEFFFAF has joined #osdev
<Ermine>
web-cam.rs
<mcrod>
i am doing the osdev thing
<heat>
finally on topic
<mcrod>
maybe
nikolapdp has joined #osdev
<nikolapdp>
pdp11's back baby
<zid`>
I'm sat here waiting for the terry area
<zid`>
and you're fucking old pcs
<nikolapdp>
well i had to reconnect
<mcrod>
wtf are you two doing
<heat>
dating
<heat>
lots of old couple vibes from those two
<zid`>
dating
<mcrod>
i, frankly, don't think zid is the dating type
<zid`>
you just think that because I do it rough
<zid`>
some people like that
<mcrod>
the date would say something mildly incorrect and he'd say "no you're wrong" and then go into a long winded explanation not realizing his date already left him at the table
<mcrod>
but hey, doing it rough is ok
<gog>
hi
<zid`>
heat: There, found out for you, you can stop asking, he likes it rough
<mcrod>
hi gog, may I pet you
<gog>
yes
* mcrod
pets gog
* gog
prr
<heat>
i never asked if mcrod likes it rough
<heat>
it's very obvious he does
<mcrod>
well
<mcrod>
rough sex is nice.
<gog>
i have cheese
* gog
fascinated
<heat>
there we go, we have a direct quote
<heat>
we are so on topic
<gog>
the most on topic chanell
<nikolapdp>
how woukd you know mcrod
<nikolapdp>
you're clearly a nerd like the rest of us
<mcrod>
i have sex
<gog>
this guy fucks
<heat>
SEX
<gog>
i do osdev
<mcrod>
it is possible, in fact, to do osdev, and/or be a nerd, and have sex
<heat>
did yall know disney spelled SEX in one of their movies with stars and shit
<heat>
follow me for more disney subliminal satanic message videos
<heat>
mcrod: do you think NASA, when they were faking the moon landing
<mcrod>
no
<heat>
did they never think about the stars?
<mcrod>
fun fact
<heat>
did they completely forget about the stars while faking it
<mcrod>
i was told someone at my old job was hired
<mcrod>
full blown moon landing conspiracy theorist
<mcrod>
he went to COLLEGE, too
<heat>
you don't get it
<heat>
the moon rocks
<heat>
they had numbers and letters
<heat>
NASA even left us easter eggs and some people just don't get it
<mcrod>
if I ever get to the moon
<mcrod>
i'll write "#osdev" in the dirt
<heat>
we'll all be dead by then
<mcrod>
indeed
<heat>
we're all 70+
<mjg>
moon rocks rock
<mjg>
do you think spacex would have landed on the sun by now if they used rust?
<heat>
they would've landed on the sun had they used solaris
<mjg>
this is where they are going wrong then innit
<netbsduser`>
what data structure do the members of this channel prefer to associate cached pages with a file?
<nikolapdp>
linked lists
<netbsduser`>
how?
<netbsduser`>
by no metric have they desirable properties for this use case
<nikolapdp>
i am joking
vai has quit [Ping timeout: 260 seconds]
<netbsduser`>
well it wasn't very funny
<nikolapdp>
well sorry
Left_Turn has quit [Read error: Connection reset by peer]