klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
rpnx_ has quit [Ping timeout: 244 seconds]
sonny has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
isaacwoods has quit [Quit: WeeChat 3.6]
carbonfiber has joined #osdev
netbsduser has quit [Quit: Leaving]
\Test_User has joined #osdev
zaquest has quit [Remote host closed the connection]
<geist> gcc 12.2 is apparently out
<geist> for those that follow along
<geist> As well as qemu 7.1
zaquest has joined #osdev
orccoin has joined #osdev
<zid> I don't think the release notes are up yet though?
<zid> oh they are
<heat> gcc minor releases are boring
<zid> .1 and .2 are worth reading
<heat> major releases spike my blood pressure to 200000000000 though
<heat> also, llvm 15 is out
<heat> llvm releases spike my blood pressure to 2^48
<heat> (as in, oh boy, here we go again porting my patches)
<zid> gcc 12 supports 0b for C now with -std=c2x
<heat> I don't know how gcc is doing it but clang supports a new switch to disable void f() -> variable arguments
<heat> so you can disable those without using c2x
<zid> big analyzer upgrades maybe I should test them
<bslsk05> ​discourse.llvm.org: LLVM 15.0.0 Release - Announcements - LLVM Discussion Forums
<zid> oh the plugin the kernel people is now baseline too
<zid> for auto-initializing locals
<zid> -ftrivial-auto-var-init=pattern
<zid> ooh a typo, I can ping for that and get into the gcc credits
<heat> "long time gcc developer and expert"
<heat> ftrivial-auto-var-init is a funny switch
<heat> clang has a -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang that you need to add before being able to use it
<heat> because, erm, reasons
<zid> I get the feeling that every single gcc release notes from now on is going to have this line
<zid> RISC-V: New ISA extension support for ...
[itchyjunk] has quit [Remote host closed the connection]
<moon-child> the 'trivial' part is just for c++ right
<moon-child> (ie in c everything is 'trivial' from a c++ standpoint?)
<zid> yea
<zid> trivial means non-constructed I think basically
jack_rabbit has quit [Ping timeout: 268 seconds]
Bonstra has quit [Quit: Pouf c'est tout !]
Bonstra has joined #osdev
lg has quit [Ping timeout: 268 seconds]
lg has joined #osdev
<geist> yah for whatever reason gcc doesn't seem to put up release notes for point releases, just for an entire series
<zid> after .3 it gets hard to spot the changes unless you have both and a diff
saltd has quit [Ping timeout: 260 seconds]
pieguy128_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
xenos1984 has quit [Read error: Connection reset by peer]
pieguy128 has joined #osdev
saltd has joined #osdev
xenos1984 has joined #osdev
sonny has quit [Quit: Client closed]
tarel2 has quit [Ping timeout: 252 seconds]
arch_angel has joined #osdev
scoobydoo_ has joined #osdev
scoobydoo has quit [Ping timeout: 252 seconds]
scoobydoo_ is now known as scoobydoo
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
scoobydoo_ has joined #osdev
<heat> you got me to start upgrading my toolchains again
<heat> yay
scoobydoo has quit [Ping timeout: 252 seconds]
scoobydoo_ is now known as scoobydoo
<heat> i started with llvm because gcc is always a bitch when it comes to its own libsanitizer, which is pretty much compiler-rt but slightly forked at a random point in time
<heat> they keep upgrading it but not in such a way that I can transparently apply the LLVM compiler-rt patch to it
<zid> I might as well install 12.2 and try the new analyzer changes, see if it just prints "depth too deep" a thousand times and does nothing or not
<heat> i havent used the analyzer yet
<heat> is it any good?
<zid> .it just prints "depth too deep" a thousand times and does nothing or not
<zid> is my full experience so far
<moon-child> it found a couple of trivial places where I forgot to check for alloc failure
<moon-child> so that's something. Not very much, though
<heat> is it better or worse than clang-tidy?
<moon-child> idk, haven't used that
<moon-child> dmalcolm is cool though
<zid> I assumed clang-tidy was a formatter
<zid> it's an oldschool linter?
saltd has quit [Quit: joins libera]
scoobydoo has quit [Ping timeout: 268 seconds]
scoobydoo has joined #osdev
<heat> zid, clant-tidy is a linter + static analyzer
<heat> s/clant/clang/
<heat> clang-format is the formatter
<zid> yea oldschool linter
<zid> that was to provide warnings
<zid> not to format
<zid> linters these days just warn about formatting
moberg1 has joined #osdev
moberg has quit [Ping timeout: 255 seconds]
<zid> Okay it took me 10 minutes but I figured out how to merge gcc 12.2
<zid> I had forgotten how my distro worked
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
carbonfiber has quit [Quit: Connection closed for inactivity]
<heat> gentoo bad, arch lunix good
<zid> how do you pull things that aren't "out" into your system set in arch?
<heat> i either compile them manually or if I really want to I'll go to the trouble of grabbing the PKGBUILD and changing some stuff up
<heat> but erm, this is super rare
<heat> arch rolls very quickly so
<heat> i already have 12.2
<heat> as well as qemu 7.1
<moon-child> there is also aur
<zid> I have 12.2 it just isn't official yet
<zid> i.e the base set doesn't include it, it includes 11.3
<zid> important that they build the entire ecosystem with 12.2 for a few weeks first
jjuran has quit [Ping timeout: 268 seconds]
orccoin has quit [Quit: Leaving.]
jjuran has joined #osdev
jjuran has quit [Remote host closed the connection]
jjuran has joined #osdev
orccoin has joined #osdev
<geist> man, been staring at the qemu page table code for arm64 and i just dont see where it implements the A and D bit writeback logic
<geist> despite declaring that it deoes implement it
<heat> but does it?
<heat> >qemu page table code for arm64
<heat> big mistake staring at it
<geist> far as i can tell https://github.com/qemu/qemu/blob/master/target/arm/ptw.c#L1294 is where it just unilaterally fires off an access fault
<bslsk05> ​github.com: qemu/ptw.c at master · qemu/qemu · GitHub
<heat> looking at qemu arm page table code is like staring directly into a solar eclipse
<zid> Have you considered self-flaggelation? it's quicker
<geist> kinda
<geist> it's possible it decloares it has the feature but then just doesn't implement it
<geist> and all the existing systems simply deal with it by using the software fallback
<heat> the best kind of feature is the one that isn't there
<zid> Makes it much easier to program
<zid> saves a whole bunch of work
<zid> oh shit I didn't notice that, I'm down to 16GB of ram
<zid> no wonder I don't have any left
<zid> It's detected but the NUMA domains aren't set up
<zid> so I only have #0
<heat> your motherboard is only alive based on vibes
<zid> it works fine I just can't *configure* it :(
heat has quit [Ping timeout: 260 seconds]
carbonfiber has joined #osdev
<zid> I am very good at computer
xenos1984 has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
xenos1984 has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
gog has quit [Ping timeout: 252 seconds]
<geist> a computar is you
<zid> I am not a computer, gcc 12.2 crashed during build
<zid> no computing happening
<zid> kswapd used all my cpu then the build failed, at least
<zid> I assume it ran out of memory somewhere
<zid> ah yea, cc1plus tried to use 17GB of ram
<jjuran> I'm not a computer! I'm a human being!
<dminuoso> You should start Haskell development. You'd have 32GiB RAM minimum.
<zid> how does that work dminuoso?
<dminuoso> GHC is a memory hungry monster. If it had existed longer, you'd be telling kids stories about the "Glorious Memory Consumer" from Glasgow.
<dminuoso> But we dont tell kids stories anymore, so...
<zid> do you mean "need"?
<dminuoso> Heh. Yeah
epony has quit [Read error: Connection reset by peer]
<zid> That makes a *lot* more sense.
<clever> dminuoso: i once hit a brick wall just LINKING firefox on a 32bit machine
<clever> it needed >3gig of ram, and with a 32bit virtual space, it aint happening
<jjuran> Is it still free as in freedom if you can't build it, but merely have the /right/ to build it?
<zid> 3GB? cute
<zid> chrome needs like 40
<clever> zid: last i checked, electron needed ~30gig of DISK SPACE just to checkout its source, lol
<zid> rust needs about that
<zid> 10-30 somewhere, that's why my VM has another drive
<clever> because the tooling keeps the .git's for everything
<zid> because I have to mount /dev/sdc1 over /var/db/portage/packages/sys-devel/rust/work
<zid> to add enough disk space to the machine to get rust to build
<geist> hmm, really unclear how to tellk in linux if it's using accessed faults or not on arm64
<geist> i see no mention of it in dmesg, and there doesn't seem to be a counter
<clever> geist: bit 55 in /proc/PID/pagemap maybe? "pte is soft-dirty"
<clever> Documentation/admin-guide/mm/soft-dirty.rst and admin-guide/mm/pagemap.rst in the linux source
<geist> well, its not whether or not the upper level code has an accessed bit, it's if its using the hardware a-bit or emulating it with accsseed faults
<clever> ah, yeah, this wont tell you if its faked with ro pages, or if the hw is editing pagetables for you
<clever> you would have to dig deeper into the source
* dminuoso needs about 16GiB to compute the entire nixos closure of his mail setup (16 machines)
<dminuoso> Memory has become just a resource that is cheaper to waste and buy than to conserve
<kazinsal> RAM that doesn't contain anything is wasted
<kazinsal> free RAM means you're not getting your money's worth
<clever> i often see rpi users complaining on the forum when `free -m` reports very little free
<clever> kazinsal: and then exactly what you said is posted as a reply
<dminuoso> kazinsal: That argument is two fold. If your program uses much physical memory, that reduces available memory for buffers/caches, and it increases thrashing.
<dminuoso> It's not necessarily about whether ram is used, but how much ram is used by a particular process
<clever> yeah
<kazinsal> my desktop (windows machine) is at ~23380 MB in use, ~220 MB modified (about to be paged out), ~8890 MB cache, and I don't even see a "free" bar
<dminuoso> Besides, the more developers are liberal, the more frequent you have to upgrade hardware. :(
<clever> dminuoso: if your swap looks like https://i.imgur.com/4kKGeIU.png, you got problems
<dminuoso> clever: Wow that's hefty. What's the cause here?
<dminuoso> Forgot to install memory? :>
<kazinsal> part of that first bit is also 3400 MB of compressed in-use that's 10700 MB uncompressed
<clever> dminuoso: chromium and about 4000 open tabs, 32gig of ram, 64gig of swap
<kazinsal> windows LOVES swap
<kazinsal> it's great
<kazinsal> I've got 38 GB of swap in use but I don't care because my system is fast and I boot from NVMe
<zid> windows has always loved swap very much
<kazinsal> people are always like "ugh why do you need a swapfile so big" and it's like, because the system is faster when it can page your bajillion porno tabs out in favour of doing useful shit
<zid> It used to page my audio drivers out
<dminuoso> clever: Ah yes. I recall having extreme memory problems since firefox introduced their new site isolation.
<zid> they thankfully got a *little* better about it
<clever> dminuoso: one example, discord leaks memory, its up to 1.8gig for that single tab
<dminuoso> It stopped my behavior of just collecting tabs all week long
<zid> discord doesn't leak memory
<kazinsal> haha yeah at some point Microsoft started saying "please mark your code segments as non-pageable if you're writing drivers"
<zid> images and videos etc are just fucking big
<clever> zid: then why is it using 1.8gig?
<zid> it's literally just a chrome tab
<zid> it uses as much memory as chrome would, with all your servers/channels open in a tab each
<kazinsal> yeah that's just CEF/electron doing big honkin cache stuff
<clever> zid: this IS a chrome tab, in chromium, its not electron
<kazinsal> iirc chromium/CEF lets you set a specific fractional limit for your app
<dminuoso> clever: It's 1.2GiB of npm dependencies. Half of that by all possible versions of left_pad coexisting.
<zid> Mine's often using 2-3GB if I click a bunch of channels with heavy images etc in them
<clever> after hitting refresh, that tab is down to 400mb used
<dminuoso> /s
<clever> dminuoso: then why is it using 400mb after a refresh?
<zid> realloc :P
<kazinsal> my Electron!Discord is 992 MB right now
<clever> did it magically loose 1.4gig of dependencies?
<dminuoso> clever: It was a humerous remark. :)
<clever> or was it leaking 1.4gig worth of html elements?
<kazinsal> post-refresh it's actually gone up!
<zid> images are *big*
<zid> like genuinely fucking huge
<kazinsal> ooh, nitro gets 500 meg files now
<clever> zid: yeah, but it should free those when its done
<kazinsal> thanks for reminding me to refresh discord
<zid> when is it "done"?
<clever> when they arent visible anymore
<zid> It'd be a bad look if it redownloaded every image every time you changed channel
<zid> they're always visible
<zid> potentially
<kazinsal> again, caching is important
<clever> thats what the cache is for
<kazinsal> free ram is unused ram
<clever> why does it have to keep it in ram?
<zid> so why complain that it's caching
<kazinsal> and unused ram is wasted ram
<kazinsal> speed!
<zid> because hdds are fucking dick slow and 2GB is nothing in the real world
<kazinsal> people want shit now now now now now
<clever> zid: its not caching it in the network cache, its caching the uncompessed image
<zid> yesand?
<clever> i say it shouldnt :P
<clever> i have nvme, my disk isnt dick sow :P
<zid> use irc then
<clever> slow*
<clever> zid: a far bigger problem i have, is that many tasks in chromium depend on the master process, and its very easy to deadlock it
<zid> you can also turn off images I think
<kazinsal> while I am thoroughly on team "broadband internet to the masses was a mistake" I cannot change the past so I am also on team "faster is better and caching is great if I don't have to suffer for it"
<zid> "Developers should not have SSDs" is my motto
<kazinsal> and y'know what? I don't suffer for discord using 800 megs of RAM while I'm watching Irish people try Carolina Reaper candies
<zid> They should have 5400rpm laptop drives
<zid> Until your program runs nicely like that, don't darken my doorstep :P
<clever> lol
<kazinsal> oh man 5400 rpm drives
<kazinsal> I haven't seen those in a while
<zid> My mother's laptop had one
<zid> it was running windows *10*
<zid> It took 10 minutes to boot
<kazinsal> yeah I think my family is all off spinning rust at this point
<clever> that reminds me, my dads desktop, i dont know his rpm, but its horid slow
<zid> I installed w7 on it and now it boots in 30 seconds
<zid> cus w7 knows what a hdd is
<clever> last time i visited, the hdd ldd was just permanently on, for HOURS
<mats1> whats your mom's phone number
<clever> i then found out why, avg had an update waiting for a reboot
<zid> w10 just expects to be on an ssd so touches millions of tiny files at boot
<kazinsal> I have spinnies for mass data storage but like, we don't even sell that kinda thing at work anymore
<clever> and for some reason, that makes avg spin and use 100% cpu and disk io
<zid> mats1: I don't know it and that's inappropriate
<kazinsal> AFFs are just so fuckin common and cheap now
<clever> rebooting made it instantly stop
<zid> yea I use spinnie rust for torrents
<zid> I snagged 4TB for £30 recently, bargain
<mats1> i'm just going to tell her i work for msft and she has a virus
<kazinsal> when I do my next desktop build I'm going to grab another bunch of 4s or maybe a set of 8s, depending on pricing
<zid> smaller drives are way less price efficient in my experience
<zid> I wanted another 1TB for my machine a few years ago, and it was like, £100 for 1TB, £120 for 2TB, etc
<kazinsal> because new desktop CPU/mobo/RAM will replace the 8700K/Z370/DDR4 and that will replace the E5-2650/nightmare custom mobo/DDR3
<zid> so I just gave up cus I couldn't afford 8TB and everything else felt bad :P
<zid> kazinsal: Still got the nightmare ram? :P
<mats1> what's the point of hoarding torrents
<zid> ratio
<zid> and anti-snatch
<mats1> amateur
<kazinsal> yeah, it's 64 GB ECC DDR3-1333 I think
<kazinsal> it's still in the machine
<zid> on certain trackers if you don't reseed for a monh it counts as a snatch
<zid> ah damn I can't use rdimms I don't think, only urdimms / udimms
<mats1> i pay for the month long freeleech and then rent a feralhosting box
<kazinsal> I'm planning on upgrading this thing around Christmas I think
<mats1> comes to like $40 for 15+tb
<kazinsal> that should be when I get the incoming promised fat raise and bonus
<zid> kazinsal: you're just going to have to buy me a new PC then, sorry
<kazinsal> and Zen 4 should be out and BIOSes for it should be less buggy by then
<mats1> its more price efficient, and you don't waste electricity keeping a box going 24h a day
<mats1> take notes
<zid> I can't turn my desktop off though
<kazinsal> my SAN is also my firewall
<zid> my idle games give me faster rewards if they're running
<kazinsal> and I live in magical canuckistan where we have cheap hydroelectricity
<kazinsal> liquid cooled? nah man my compute is liquid powered
<mats1> is hydro still cheap during these heat waves
<mats1> buncha dams in teh news are down like 70% output
<kazinsal> oh yeah
<kazinsal> all our dams are on the main rivers of the pacific northwest
<kazinsal> shit's all gotta go through us before it gets to the PNW states
<kazinsal> I pay about 0.09 CAD/kWh
epony has joined #osdev
<kazinsal> so that's like 0.07 USD/kWh
<kazinsal> over 90% of electricity generation in BC is hydro
<mats1> sounds good for mining bitcorns
<kazinsal> the rest is a mix of geothermal and some natgas and diesel up in the frozen wastes
moberg has joined #osdev
<zid> we're about to hit $1/kwhr :D
<zid> and it's only price gouging
<mats1> that's the price we pay to hurt the muscovites
moberg1 has quit [Ping timeout: 252 seconds]
<mats1> long live the anglo empire
<kazinsal> damn shouldn't have shut off all those tasty tasty atoms
<kazinsal> this post brought to you by: CANDU gang
epony has quit [Ping timeout: 252 seconds]
<zid> except it's literally nothing to do with russia here
<zid> it's 100% price gouging
<kazinsal> also her, wait, sorry, his majesty's imperial credits of the realm have tanked in value
<zid> germany's problem is that they fucked up their power market on purpose
<zid> ours is tories
<kazinsal> solution: we outlaw conservatives
epony has joined #osdev
<zid> kazinsal that's disgraceful how could you suggest such a thing
<zid> We put them into industrial furnaces and at least get some use out of them.
<kazinsal> the arch-conservative is gone, we just need to remove her underlings
<zid> wat
<kazinsal> the queen is dead, not sure if you heard
<zid> yes
<zid> why is she the arch conservative
<kazinsal> tories love the monarchy
<zid> she's not the one selling me out to corporations
<zid> that's the PM, head of government, queen is head of state, completely different job
<zid> she greets foreign diplomats and has tea
<zid> 300 times a year
<kazinsal> (I'm wondering if the canadian mint will attempt to just put actual canadians on the coins instead of charles or if tories will just immediately block that)
<kazinsal> put friggin terry fox on the money goddammit
<zid> I'm expecting a lot of countries to no longer have our monarchy
<zid> and for it to slowly die here
<kazinsal> september 8th will be a national holiday for like, 70% of the planet
<kazinsal> the next 72 hours or so are gonna be one giant party all over the place
<kazinsal> at least one news station in I think Argentina popped champagne
<zid> liz was amazing, nobody will be able to compete, and there's a chance that charles/etc will just be actually incompetent
<zid> and kill the monarchy off
<zid> The only people who have a legitimate (ish) beef with ER2 were the irish
<zid> everyone else is just being mean to a nice old lady
<kazinsal> liz somehow managed to be non-inbred enough to be sociable
<zid> in order to posture against the UK
elastic_dog has quit [Ping timeout: 268 seconds]
elastic_dog has joined #osdev
carbonfiber has quit [Quit: Connection closed for inactivity]
freakazoid333 has quit [Ping timeout: 244 seconds]
m5zs7k has quit [Ping timeout: 252 seconds]
<zid> where's heat when you need someone to translate .pt
m5zs7k has joined #osdev
vdamewood has joined #osdev
pie_ has quit []
vancz has quit []
pie_ has joined #osdev
vancz has joined #osdev
elderK has quit [Quit: Connection closed for inactivity]
<zid> okay they fixed the typo I found
GeDaMo has joined #osdev
* vdamewood makes an better typo
opal has quit [Remote host closed the connection]
opal has joined #osdev
netbsduser has joined #osdev
<epony> if only someone knew what the monarchy is used for..
<zid> head of state + tourism
<zid> could have googled that yourself
<epony> running continents as a service, and feeling noble of course, more than the ohers, important and "superior" majestic
<GeDaMo> A distraction from government incompetence
<zid> That'll be the tory plan currently
<zid> And the americans won't stop fucking memeing about her dying because they don't know shit
<epony> feodalism is a form of tourism too by that logic
<zid> we're about to get fucking *hosed* by the tories not having to show up in the news
<GeDaMo> Have you seen anything about the actual unit rate / standing charge rather than this "average £2500" on energy bills?
<epony> so the defender of the common people lives in several castles with the most riches and excesses of the world now, and feels compassionate, for which they are awarded the estates of centuries old captive peasantry owners
<kazinsal> we have a completely different set of issues in the New World
<epony> but the same economic and political (feodal) system
<GeDaMo> I'm pretty sure they're the same issues just wearing a different hat :P
<kazinsal> wherein we have all the water north of the 49th parallel and the desert nation of America has little of it
<zid> GeDaMo: it's typical tory propaganda, it's a tax cut for the rich, fucks the poor, and phrased as an amazing idea
<GeDaMo> We have the same issue in Scotland :|
<zid> but they won't have to defend it now
<GeDaMo> I'm just reading that with parliament suspended the freeze might not happen before October
<zid> or anything, for like, a month, then for a month or two after that it will be "Let's not get bogged down in politics in these trying times"
<kazinsal> I expect by 2025 I will either be living in the forest fighting off fascist militias stealing the water of Kootenay Lake or I will be a subject of the American Occupancy Governance
<zid> then a few months after that they will turn on the monarchy and claim the root of all the country's woes are how much the monarchy cost
nyah has joined #osdev
<zid> it'd be funny if it weren't so depressingly sad
<epony> too much scare, too little fair
<GeDaMo> "If we wait a bit longer the poor will have died off and the problem will have solved itself" :|
<epony> there is enough for everybody, if the few were not holding it all for them, the many would have had for them too
<zid> Thankfully the people who die first in cold snaps are their voting bloc, pensioners
<epony> https://en.wikipedia.org/wiki/Charles_Dickens#Social_commentary : Karl Marx asserted that Dickens "issued to the world more political and social truths than have been uttered by all the professional politicians, publicists and moralists put together".
<bslsk05> ​en.wikipedia.org: Charles Dickens - Wikipedia
orccoin has quit [Ping timeout: 244 seconds]
mykernel has joined #osdev
Ali_A has joined #osdev
Ali_A has quit [Quit: Client closed]
foudfou has joined #osdev
foudfou_ has quit [Quit: Bye]
sebonirc has quit [Ping timeout: 248 seconds]
sebonirc has joined #osdev
mykernel_ has joined #osdev
mykernel has quit [Ping timeout: 252 seconds]
elastic_dog has quit [Ping timeout: 248 seconds]
epony has quit [Remote host closed the connection]
elastic_dog has joined #osdev
<mykernel_> my code works on qemu, bochs, my i5-7200, but it triple faults on my other two machines (old intel atom and amd a4-4020). the triple fault occurs on same instruction on both cpus - modifying page table lvl2. is there a problem modifying page tables directly? the instruction is located at early stages of initialization while memory mapping framebuffer, so my debbuging options are limited :(
<mykernel_> this started happening on my switch from x86 higher half (3gb+1mb) to x86_64 higher half (-2gb+1mb)
[itchyjunk] has joined #osdev
pitust has joined #osdev
<Mutabah> TLB invalidation?
<mykernel_> i loaded cr3 with new page directory 1000 lines before that
<mykernel_> that invalidates all caches ifaik
<Mutabah> ... 1000 lines?
<pitust> if CR4.PCIDE is clear then move to cr3 invalidates pcid 0x0000
<mykernel_> i meant the memory i am using for page tables are mapped correctly
<pitust> it sounds like a tlb thing i agree
<pitust> put something like `asm volatile("mov %%cr3, %%rax;mov %%rax, %%cr3" ::: "rax", "memory");` before that part
\Test_User has quit [Quit: e]
smach has joined #osdev
epony has joined #osdev
\Test_User has joined #osdev
<mykernel_> still triple faults
<pitust> also put it right after that
<pitust> then run in qemu
<pitust> also WHAT instruction is that even
<pitust> and what error code
<mykernel_> cant get error code because this only happens on some hw :(
<pitust> i can't see what "only happens on some hw" has to do with "print the error code in the exception handler"
<mykernel_> please read what i wrote up here
<mykernel_> i cant write because this exception happens during mem mapping framebuffer
<pitust> ah okay
<pitust> uh
<\Test_User> print the error code to the tripple fault exception handler? doesn't work out well...
<pitust> |Test_User: well obviously not the triple fault handler
<pitust> write all the debug text to memory, reboot and read out the results in the bootloader?
<\Test_User> if what's noticed is tripple fault, then which handler should it be
<pitust> hmm
<pitust> ~~smm handler~~
<pitust> what if you ran the os in kvm on those machines
<mykernel_> pitust: i will try this rn
<mykernel_> this one cpu does not have virt support :(
<pitust> both of them?
<mykernel_> i do not have linux on the other one
<pitust> oh okay, they sound pretty old so it wouldn't have virt probably anyway
<pitust> are you doing 32bit?
<mykernel_> they are 64bit machines both
<pitust> ...
<pitust> is your OS 32bit?
<pitust> or 64bit
<pitust> also what boot protocol
<pitust> also can you send the source code
<pitust> also bios or uefi
<mykernel_> https://pastebin.com/KW95HCjS 64bit, multiboot2, works on bios/uefi
<bslsk05> ​pastebin.com: void map_addr(uint64_t virt, uint64_t phys, uint32_t flags){virt -= virt % - Pastebin.com
<pitust> do those laptops use bios or uefi?
<pitust> also what bootloader
<mrvn> pitust: why are you using rqx?
<mrvn> pitust: why are you using rax?
<mykernel_> grub for bootloader
<pitust> mrvn: whatever scratch register really
<pitust> rax is the first one
<mrvn> pitust: so just tell the compiler to use a register.
<mrvn> %1 and "r"
<mrvn> or give it a name
<pitust> yeah i know but its handier to just use rax
<pitust> and it doesn't matter THAT much really
<pitust> the compiler can just reshuffle registers to fit my choice
<mykernel_> it does not depend on bios/uefi -> working on: i5-7200 that uses bios, not working: intel atom uses that bios and a4-4020 that uses uefi
<pitust> okay
<pitust> does kalloc return aligned addresses?
<mrvn> pitust: how should we know that?
<mykernel_> yeah 4096B
<pitust> mrvn: *he* should know if it returns aligned addresses
<mrvn> mykernel_: are your page tables mapped with the global bit?
<pitust> mykernel_: can you send all the code (or at least the part that deals with the memory map and kalloc)
<pitust> also how does the memory map look like
<bslsk05> ​pastebin.com: paging.c:#include <types.h>#include <paging.h>#include <heap.h>#includ - Pastebin.com
<mykernel_> no global bit lol
<mykernel_> why it works on some hw and does not on other
<pitust> it could be for a lot of reasons
<pitust> it well be a dodgy memory map
<pitust> which is why im asking for the memory map and pmm
<bslsk05> ​pastebin.com: heap.h#ifndef HEAP_H#define HEAP_H#include <types.h>#include <kernel_v - Pastebin.com
<pitust> physical memory manager?
<mykernel_> i just hard coded phys addr lol
<mykernel_> but i have checked manualy and every pc has free space 1mb+
<pitust> that doesnt sound so good
<pitust> 1mb is not safe
<pitust> not on uefi anyway
<pitust> just as an aside
<pitust> 2mb is safe(r)
<mykernel_> i am just using first // 16mb kernel + 32mb heap
<mykernel_> 1mb blank + 15mb kernel + 32mb heap
<mykernel_> first 48mb of phys mem
<pitust> okayyy, i mean i wouldn't rely on that but sure
<mykernel_> i can send you ss of memmap for every pc i used
<pitust> nah thats fine
<pitust> your code is pretty damn convoluted
<pitust> this is my impl for plzz_gib_pte_for_addr (aka "arch_follow_va") https://git.sr.ht/~pitust/ixOS/tree/trunk/item/src/kern/vmm.c#L16
<bslsk05> ​git.sr.ht: ~pitust/ixOS: src/kern/vmm.c - sourcehut git
<mykernel_> wym convoluted
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
<pitust> pt_lvl3 = (uint64_t*)((uint64_t)pt_lvl3 - (uint64_t)pt_lvl3 % 4096);
<pitust> you can just do & ~0xfff
<mykernel_> lol
<pitust> also i think this is a great moment to shill limine which is a great bootloader puts you straight into 64bit mode and it maps the framebuffer and shit
<pitust> now with arm
<pitust> *arm64 support
<pitust> as opposed to certain protocols i could name which are x86-only and dont really work all that well on 64bit either
<bslsk05> ​limine-bootloader/limine - Modern, advanced, portable, multiprotocol bootloader. (93 forks/833 stargazers/BSD-2-Clause)
<pitust> also has a cool terminal which can support vim and nano and shit
<mykernel_> sounds bloated
<pitust> you know what sounds really bloated? having a fucking network stack in a bootloader
<pitust> and a gdbstub
<pitust> and oh my god i dont even know what else grub has
<pitust> limine is really small actually
<pitust> bios stage3 is 130k, uefi is 170k (x86/x64) or 140k on arm64
<bslsk05> ​limine-bootloader/limine-barebones - A simple Limine-compliant kernel and build system example/template. (3 forks/24 stargazers/0BSD)
scoobydoo has quit [Read error: Connection timed out]
<pitust> its a lot smaller in v4 than v3 because no ntfs
xenos1984 has quit [Read error: Connection reset by peer]
scoobydoo has joined #osdev
mykernel_ has quit [Quit: leaving]
mykernel has joined #osdev
<pitust> mykernel: did you figure it out?
bauen1 has quit [Ping timeout: 244 seconds]
<mykernel> no :(
xenos1984 has joined #osdev
bauen1 has joined #osdev
mykernel has quit [Quit: leaving]
mykernel has joined #osdev
<mykernel> pitust: my code works for -O1, -O2, & -O3, but does not work for -O0 hahahahhaahah
scoobydoo has quit [Read error: Connection timed out]
<mjg_> mykernel: good thing you are shipping -O2 then!
<mjg_> still, how did you manage that?
scoobydoo has joined #osdev
<mykernel> lol idk
<mykernel> i mean with -O0 code does not work anywhere lol but with -O1 -O2 -O3 it still does not work on these two pcs
<geist> that's pretty common. did you figure out why it doesn't work for O0?
<geist> my first thought is the stack usage goes through the roof and you get a stack overflow
<geist> since most kernel shave relatively small stacks
<mjg_> i thought everyone rolls with 16
<mjg_> which is rpetty big for a kernel
<geist> well for fuchsia, for example, we run with 8, but O0 blows that instantly
<mjg_> why 8?
<geist> because 4 isn't enough
<mjg_> i mean why not 16
<geist> bvecause 8 is enough
<mjg_> some bofh vibes in here :)
<geist> what's bofh?
<mjg_> did you implement swapping out kernel-side stacks or do you plan to do it?
<bslsk05> ​en.wikipedia.org: Bastard Operator From Hell - Wikipedia
<mjg_> weird feature which keeps fcking people over
<geist> gosh no
<geist> so being that kernel stacks are permanently wired, and fuchsia has a relatively high number of stacks, reducing the size of the stacks is paramount
<geist> actually to be fair, it's not really 8k. it's per arch. on arm64 it's 8k stack, 4k call stack
<geist> on x86-64 it's 8k stack + 8k safe stack. so i'm being kinda cheesy
<mjg_> why high number?
<geist> but on the arm side it is basically 8k, since the call tack is not used much
<mjg_> you are doing something nasty there?
<mjg_> i mean does it differ from thread count
<geist> wait, what number?
<mjg_> > fuchsia has a relatively high number of stack
<mjg_> s
<geist> oh, lots of threads i mean
<mjg_> ok
<geist> sorry, i've only partially woken up
<geist> just starting to drink my morning coffee
<geist> so yeah on x86 we are effectively using 16k tacks, but the usage is not distributed evenly between both 8ks
vdamewood has quit [Quit: Life beckons]
vdamewood has joined #osdev
pieguy128 has quit [Ping timeout: 244 seconds]
pieguy128 has joined #osdev
frkzoid has joined #osdev
pieguy128_ has joined #osdev
pieguy128 has quit [Ping timeout: 252 seconds]
pieguy128_ has quit [Ping timeout: 260 seconds]
arch_angel has left #osdev [Leaving]
xenos1984 has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
<mjg_> re stack swapping, it is still a thing on some systems i'm not going to name
<mjg_> and as you can imagine adds funny complexity where there shuld be none
saltd has joined #osdev
pieguy128 has joined #osdev
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
selene_ has joined #osdev
<mjg_> wut? dtrace on windows?
<bslsk05> ​docs.microsoft.com: DTrace on Windows - Windows drivers | Microsoft Docs
saltd has quit [Remote host closed the connection]
selene_ has quit [Quit: WeeChat 3.6]
\Test_User has quit [Read error: Connection reset by peer]
Guest9682 has joined #osdev
Guest9682 has quit [Client Quit]
saltd has joined #osdev
saltd has quit [Remote host closed the connection]
\Test_User has joined #osdev
alpha2023 has joined #osdev
selene_ has joined #osdev
saltd has joined #osdev
Ram-Z has quit [Ping timeout: 248 seconds]
Ram-Z has joined #osdev
selene_ has quit [Client Quit]
selene_ has joined #osdev
saltd has quit [Remote host closed the connection]
selene_ has quit [Client Quit]
xenos1984 has quit [Ping timeout: 248 seconds]
FreeFull has joined #osdev
xenos1984 has joined #osdev
gog has joined #osdev
torresjrjr has quit [Ping timeout: 268 seconds]
torresjrjr has joined #osdev
saltd has joined #osdev
saltd has quit [Remote host closed the connection]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
saltd has joined #osdev
Ram-Z has quit [Ping timeout: 268 seconds]
<mrvn> pitust: how should we know that?
<mrvn> ups,
<gog> hi
<zid> i
<gog> i closed all my tickets this week
<geist> wow!
<mrvn> you don't have enough users
justache is now known as justJingo
Ram-Z has joined #osdev
heat has joined #osdev
<bslsk05> ​'Bruce answering prayers' by Justin (00:02:00)
<sbalmos> gog: Just putting a comment of "closing, reopen if this persists" and closing everything doesn't exactly count. ;)
<gog> :')
<gog> nah it was a sort of shakedown of whether i could solve the types of issues and implement the features
<gog> boss said not to stress that he wasn't expecting them to be done this week but i did them all :D
<gog> ah shit did i set a high bar
<gog> i always do that i get so enthusiastic and i do a good job and then they expect a good job forever
smach has joined #osdev
<heat> web dev bad
<heat> when u workin for canonical or red hat or collabora
<heat> i can sense you're perfect to make linux desktop become true
<gog> do you even know me
<heat> no
<mrvn> I need to prepared dinner, I don't want to.
<gog> come over to my house we're having seitan
<heat> but i know what you're capable of
<heat> #alphamindset
<gog> nah
<gog> #sigmagrindset
<gog> (sigma balls)
<heat> you dont even play by the rules
<heat> respect
<mjg_> STAY HARD
<heat> I AM ROCK HARD RIGHT NOW
<mjg_> gnu/simp
<heat> CuckBSD
<gog> beta soyboy cuck OS is mac
<gog> sigmas use Haiku
<heat> sigmas use BeOS
<gog> same thing
<heat> no its not
<mjg_> real chads write their own systems!
<heat> one of those does not have geist
<gog> whatever nerd
<mjg_> wait, does not work on this channel, does it
<moon-child> fuck redhat
<mjg_> moon-child: OH!
<heat> fuck redhat
<heat> i dont know why but fuck em
<heat> fuck everyone
<gog> geist is the most sigma of them all
<mjg_> heat: freel free to be mad at rh for systemd
<heat> mjg_, i like systemd
<moon-child> geist: wait, you have separate call/data stacks? What?
<mjg_> heat: OH
<heat> how about that one soyboy
<moon-child> heat: OH
<gog> systemd is good actually
<mjg_> listen you omega cuck
<mjg_> in that case you probably should not be writing 'fuck red hat'
<heat> fuck em anyway
<gog> yeh
<moon-child> all I know about systemd is that they're responsible for coredumpctl
<moon-child> which is literally the stupidest thing ever
<gog> i think that's what was filling my root partition on my old system
<geist> moon-child: on arm64 yes. callstacks are pretty nice there
<gog> pretty sure i have several gigs of core dumps
<moon-child> I mean coredumps are good
<moon-child> but why do you need a fscking coredumpctl
<gog> make a ctl for everything
<heat> it's super useful
<heat> just sayin
<moon-child> gogctl pet
* gog prrr
<heat> geist, isn't the shadow stack just for big objects/buffers?
<moon-child> hmmm? I thought shadow stack is for cfi
<moon-child> geist: cool. I approve
<bslsk05> ​clang.llvm.org: ShadowCallStack — Clang 16.0.0git documentation
<heat> sorry, the opposite
<geist> heat: two different things. there's a shadow stack, and then there's a shadow call stack
<geist> er safe stack and shadow call stack
<geist> on x86 we use safe stack, on arm64 we use shadow call stack
<heat> yeh
<heat> i get the two confused frequently
<heat> (and I don't get why each one doesn't support the other arch)
<geist> you can't easily do a shadow call stack on x86 because of cal/ret, but on arm64 it's fairly natural becaus eyou just have to stuff lr on x18
<geist> so the codegen for it isn't really bad at all. you just have to burn a register (x18 in this case) to hold the call stack
<geist> it even grows upwards!
<heat> cringe
<geist> you can do safe stack on arm64, but i think the idea is shadow call stack is most of the win, so you dont really need *both* at the same time
<heat> stacks that grow upwards are like, not cool man
<moon-child> shadow callstack is pretty easy on x86, _if_ you give up backwards compatibility
<moon-child> rsp is 16-byte records; 8-byte ret, 8-byte framepointer
<geist> moon-child: easy but maybe not fast, because of call instruction
<moon-child> rbp is current framepointer
<moon-child> that's fast
<geist> call already dumps the return address on the stack, you hvae to then pop it off, etc
<moon-child> but clang thing wanted to keep compatibility with existing debug tools and unwinders
<moon-child> actually, hmm, could you be fast and keep compat? I think you'd need three words per activation record in rsp: one for ret, one for previous rsp, and one for previous rbp, and then it would just work
<froggey> use rsp as the shadow call stack and steal another register to act as the normal data stack, abi be damned
<heat> yeah that's what I was thinking of
<heat> screw compat
<geist> i think there's some effort underway for that
GeDaMo has quit [Quit: Physics -> Chemistry -> Biology -> Intelligence -> ???]
<geist> but the idea is it probably wont be as efficient on x86. probably something like call, and then a separate instruction inside to copy off the main stack to the shadow call stack
<geist> and then return via that
<geist> such that it's there, but you can't hack it to return
<moon-child> why wouldn't it be as efficient?
<geist> because of the extra steps, and probably defeating the return call stack
<moon-child> there's no need to copy anything; you just leave the return address on rsp
<heat> does it need to be efficient though? these are just sanitizers
<geist> since there wouldn't be a corresponding ret instruction
<moon-child> nothing else aliases rsp, so there's no danger of overhead
<heat> and yes, I know fuchsia compiles regular code with em
<geist> heat: oh no nota t all, the whole point of the shadow call stack is to keep code from doing return-address-hacks
<geist> it's not a sanitizer, it's a ROP avoidance thing
<moon-child> err, no danger of overflow
<geist> same with the safe stack, etc. you can't overrun a local variable and hack the return address
<heat> why not CET»
<heat> ?
<geist> what is CET?
<heat> intel CET
<geist> on what hardware is it available?
<heat> tl;dr CFI
<geist> and is it available on ARM?
<heat> doesn't arm have something similar?
<geist> if so, what is it and what variant of arm is it avilable in? (hint: no)
<geist> point is, yes maybe at some point hardware will ubiqioutously have it, but not right now
<geist> so given a software solution, the point is to avoid ROP exploits
<geist> by keeping the return address off the same stack as any local vars that can be overrun
<geist> also, and somewhat more importantly, these are already existing solutions in clang/llvm and dont change the abi, so they're nice
<heat> true
<geist> the arm shadow call stack doesn't even destroy the return address cache, because you just pop it off of x18 back into lr before running a regular ret instruction
<geist> this is a case where the ISA helps you
saltd has quit [Read error: Connection reset by peer]
saltd has joined #osdev
ephemer0l has joined #osdev
<mrvn> moon-child: if you know where the stack and the shadow stack is then can calulate how much to overflow your local variable to corrupt the return address. It just a bigger offset.
<moon-child> yes but you don't know where the call stack is
<moon-child> put it at a randomised address, and you never have any pointers into it (aside from rsp)
<mrvn> That's what she said. :)
* moon-child trouts mrvn
ThinkT510 has quit [Quit: WeeChat 3.6]
<mrvn> Has anyone found a bug where the shadow stack address leaks yet?
ThinkT510 has joined #osdev
potash has quit [Quit: ZNC 1.8.2 - https://znc.in]
smach has quit []
bauen1 has quit [Ping timeout: 252 seconds]
bauen1 has joined #osdev
saltd has quit [Remote host closed the connection]
<geist> yah that's the key, there's no way to programmatically get ahold of the shadow call stack, except via actually directly reading the register (x18)
<geist> but if you can do that you have to either be corrupting the text segment, or compiling code itself. and it's not there to protect against code that is being compiled
<geist> it's to protect against attacks against existing code
<mrvn> Huh? I thought you had to compile for shadow stack. Do you mean existing source?
<geist> sure, but what i mean is it's not intneded to protect against code that is compiled with it
saltd has joined #osdev
<geist> ie, you can still write inline assembly that just reads x18 and trashes the call stack
saltd has quit [Read error: Connection reset by peer]
<mrvn> No, just mitigates accidental buffer overflows.
<mrvn> (accidentaly by the author, not the attacker)
Matt|home has quit [Quit: Leaving]
wxwisiasdf has joined #osdev
<wxwisiasdf> good morning Operatives in Developing a Sus system
<wxwisiasdf> When an IRQ fires it **should** disable interrupts, right?
<clever> wxwisiasdf: yeah, i believe most arches do that
xenos1984 has quit [Read error: Connection reset by peer]
<clever> and the status reg which holds that flag, is also saved automatically before doing so
<clever> so when you restore the status reg+pc, you turn it back on
saltd has joined #osdev
<wxwisiasdf> Yeah
<wxwisiasdf> it **should** normally do that...
<clever> on x86, i think the pc+status get pushed to a stack automatically?
<clever> on arm, they get copied to a pair of registers
<clever> bbl
<wxwisiasdf> so I am using the tss hw switch feature on x86, and normally the irq would be like: fire, handle, iretl, however here it's doing some pretty wacky shit
<wxwisiasdf> it's doing: fire handle, fire handle, fire handle
<wxwisiasdf> i already cleared the task-switch flag to prevent autoswitch on iret
<wxwisiasdf> but no avail
<wxwisiasdf> i also went out of my way and cli'd the saved flags that iret pops, no avail
thatcher_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<wxwisiasdf> It's the PIT IRQ firing constantly, however if any other irq fires it softlocks the system
saltd has quit [Remote host closed the connection]
thatcher_ has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
xenos1984 has joined #osdev
<pitust> geist: where are "ports" (or whatever equivalent IPC mechanism zircon has) implemented in zircon?
<wxwisiasdf> zircon moment
<netbsduser> sockets and channels seem to be zircon's analogue
saltd has joined #osdev
saltd has quit [Read error: Connection reset by peer]
mykernel has quit [Quit: leaving]
<wxwisiasdf> Ah shit i realize i did the stupid
<geist> pitust: depends, what do you mean by ports? there are multiple ipcs in zircon, each with a different use case
<geist> there isa ctually a 'ports' in zircon, but it might not be what you want
<geist> but that being said, most of the high level 'object' code in zircon is around https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/zircon/kernel/object/
<bslsk05> ​fuchsia.googlesource.com: zircon/kernel/object - fuchsia - Git at Google
<geist> more or less one of those per types of object you can have a handle to, and the dispatcher objects sometimes implement the entire functionality, or sometimes call through to another piece of the tree
<geist> so channel_dispatcher.cc for example implements basically the channel ipc mechanism, though it's built on top of a lower level message queue object implemented elsewhere
saltd has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alpha2023 has quit [Quit: No Ping reply in 180 seconds.]
alpha2023 has joined #osdev
davidrg has joined #osdev
<wxwisiasdf> enabling IRQs for PS2 causes the 8 irqs after it to fire
<wxwisiasdf> eg, if PS2 is at IRQ e9, it is firing E9 to F3
<wxwisiasdf> hmmmm :/