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
<mjg> moon-child: i meant there is no rant from The Man
<heat> mjg, but anyway I think that kernel problems should be more interesting for a kernel position
<mjg> that was the warmup mofo
<heat> like "implement a hashtable"
<heat> which you would tear to shreds :v
<mjg> that is a bad problem mate
<heat> is it?
<mjg> i had a design question, afair for inotify-like solution
<heat> sure, but that's a design question
<mjg> the problem with 'hasthable' is people have no idea what they are doing
<heat> with my problem I'm asking you if you know how the kernel works and its constraints
<mjg> and even someone otherwise competent would do it poorly
<heat> like: you start allocating memory for nodes
<mjg> you can also easily derail yourself into how to resolve xconflicts
<heat> also something like a binary tree, where the naive userspace solution would be to use a bunch of recursion
<mjg> or the birthday paradox
<heat> IMO any of these problems because you can easily understand who understands the kernel and who doesn't
<heat> s/problems/problems are interesting/
<heat> if you understand that data structures and algos should be simple, mem allocation should be avoided and the stack is finite, that lgtm
lucartc has quit [Remote host closed the connection]
<moon-child> recursion for tree should be ~ok if you can keep it balanced and so bound height
<mjg> heat: in that spirit you already failed by not asking about requirements
<mjg> should this have bounded capacity and if so how much is it
gorgonical has joined #osdev
<mjg> what about multithreading
<mjg> what are you going to push onto the stack
<mjg> is it opaque objs?
dutch has quit [Quit: WeeChat 3.8]
<mjg> maybe they can contain linkage?
<heat> what are you talking about?
<heat> the stack problem?
<mjg> yea
<heat> if so, everything is detailed on the little interview website thing
<heat> you can ofc ask questions
<gorgonical> Quick question just to make sure I'm understanding: in ARM paging terms, a "page" is the smallest unit defined by your granularity (4, 16, 64kb), and is always the last level of the page tables. A "block" is when you use an intermediate level of the tables to map a larger region. E.g. what is usually called "large" or "huge" pages. Have I got that right?
<heat> gorgonical, yes
<gorgonical> That's what I thought, but the manual sure does not make that very clear. Thanks
<heat> the manual makes nothing clear
<mjg> it is clear to people on discord
<mjg> disclaimer: not a serious comment
<heat> freebsd discord when?
<mjg> there already is one
<heat> jk does freebsd even have a native discord
<geist> specifically the 4k/16k/64k is called a 'page granule' in arm64
<mjg> lemme show you something
<geist> ie, it'sthe smallest unit, larger pages can be made up of multiples of that
<heat> oh no not your penis again
<mjg> heat: there was a #freebsd channel on some network (efnet i think?)
<heat> i think there's one on libera?
<mjg> heat: fbsd wiki page had it listed as 'infested by teenagers, avoid'
<mjg> :d
<gorgonical> heat: I understand there's some savings in decoder circuits, but the idea that the table descriptor must have the first two bits as 11, but block descriptors must have 01, and then pages must have 11 again, is very confusing
<geist> gorgonical: ytou may also bump into it but there's a notion of a contigous run of pages at a level that's also a valid single unit of page
<geist> ie, between a leaf page and a block
<heat> gorgonical, yup
<gorgonical> insane
<heat> i did fall into that
<gorgonical> The manual doesn't even tell you what those bits do. The diagram just has the bits and their values for the format
<moon-child> https://wiki.freebsd.org/Discord awww, seemingly gone now
<bslsk05> ​wiki.freebsd.org: Discord - FreeBSD Wiki
<heat> "oh, pages surely are also a "block""
<geist> contiguous pages iirc
<heat> the arm arm is nuts IMO
<geist> gorgonical: not really going to help but FWIW i have a little table i put together here at https://newos.org/txt/arm64_pages.txt to remember it
<heat> needs a lot of digesting and going back on forth
<gorgonical> I am running into issues turning on the MMU with my kernel in secure state and I am figuring it's probably something to do with ifetch and the page talbes being wrong
<geist> ie, what all the intermediate page sizes are given the 3 different base page granules
<gorgonical> geist: thank you. I love collecting reference materials. Half of osdev for me is having the right docs
<geist> yah dunno what the quality of the wiki is on arm64
<geist> unrelated: https://youtu.be/KR3TbL3Tl6M 8 hours of defragging
<bslsk05> ​'8 Hours of defrag | hard disk defragmentation ASMR | Hard Disk Sound Effect | HDD sounds' by 8 Hours of (08:00:00)
<heat> oh god
<heat> >mechanical hdd sounds
<heat> i have some sort of ptsd after 8 years of using windows 10+ on mechanical 5400rpm hard drives
<geist> this is reasonably pleasant sounding disk, at least no spindle whine, but it does have a lot of fan noise
<heat> took 40 minutes to boot to desktop
<heat> it was nuts
<heat> i still don't understand how windows 10 grew so anti-mechanical-hdd
<heat> is this a kernel thing? idk
<heat> surely the boot process didn't get that much more complicated
<geist> yeah i have wondered about that. there must be some sort of non linear response to the size of the system going up for the boot stampede of more and more paralell processes all starting at once
<geist> you'd think, if a system is 50MB and it has to demand load it all n from a disk with high seek time it'd take X time, and if it grew to 100MB it'd be X*2
<heat> yeah maybe it did grow so parallel it's hard for mechanical hard drives to make progress
<geist> but it's almost like there's something non linear there
<geist> yah
<geist> i *do* remember in the 7 and vista days there was a lot of investment in boot time prefetching and whatnot, which iirc did help pretty noticably
<heat> if you have 20 threads all doing IO through a disk the seek times just goes through the roof?
<heat> s/goes/go
<geist> but i'm guessing everything modern just gives up and lets SSD deal
<geist> heat: yeah like there's some sort of performance collapse there because it's more likely when any given read request comes through the head is already moved somewhere else
<geist> vs it being a fairly linear progression of read requests for a single thread
<heat> yeah
<geist> but that's a pretty simplistic reduction of the problem. dunno what the real numbers are
<heat> which makes me wonder if this is a kernel problem? did the kernel just stop trying to make hdds happy?
<heat> because a hdd boot drive still feels a lot slower in general system operation, not just booting
<mjg> hm
dude12312414 has quit [Remote host closed the connection]
gxt has quit [Remote host closed the connection]
<heat> tbf linux was and still is absolutely fine on mechanical
gxt has joined #osdev
<geist> i think tats where it greatly =depend son what you're booting on linux
<geist> ie, booting on a hdd to a full modern gnome desktop or something is definitely pretty slow when on say a slow USB stick
<geist> can take a good minute to a working desktop. in as much as that's somewhat of an analogue to a slow HDD, it seems to stand
<heat> yeah maybe a USB stick or an sd card
<epony> phones boot slow too
dude12312414 has joined #osdev
<heat> I remember my desktop took like 40 seconds - 1 minute on that hdd
<epony> still faster than a smartphone
<geist> and to be honest, 40seconds to a minute is pretty fast
<heat> absolutely, it took 40 for a full boot in windows
<geist> for most of my usage of early windows machines in the 90s and early 2000s, that'd be average easily
<epony> you can do development in a VM but you have to setup your timings for real HW
<geist> a minute or so was pretty common
<heat> having used shitty computers for most of my life (including now) I can easily tolerate some wait time
<mjg> 2 minutes was standard man
<heat> but a full hour? I wanted to tear my hair out
<mjg> i remember an article from a magazine from the time period with ideas what to do during the 2 minutes
<mjg> like lol
<epony> even feature phones boots slow, and your car boots slow now
<heat> the whole system also locked up consistently in ways I didn't think was imaginable
<epony> the insta-on is for real HW
<heat> I even suspected disk controller failure
<epony> your broadband modem boots slow
<epony> and the TV decoder too
<epony> someday your monitor will boot slow too
<epony> just the battery shorts fast
<epony> windows can boot fast too, over network with virtualisation but there are some wait times here and there
<geist> all that boot time was what really made all the constant windows reboots that much more painful
<epony> a good design boots faster when it can but goes as much as needed when it has to on start up times of various deviecs and cues them up properly early on with a staggered mode
<geist> now it's less of a big deal, but back when you had to boot 5 times in a row on XP to install some thing was a super drag
<epony> yep Win9x was crashing every 50 hours or so, and more frequently
<epony> for the time Windows boots, normal people reinstall from scratch the entire OS with a fresh new snapshot
<epony> and boot at the same finish time
<mjg> now i'm curious what windows 95 was doing on boot
<epony> in naive sequential ordering (without fake parallelism)
<mjg> and let's be real, a lot of it was probably stupid
<epony> windows has always been stupid with the "registry"
<heat> geist, i still don't understand why windows itself needs multiple reboots to install itself
<epony> and it's anti-disassebmly and copy-protection stupidity
<epony> which goes to waste with the prick of a virus
c2a2 has joined #osdev
<epony> it's designed in the same way "experience" as Apple shitware is
<epony> that's consumer software in a nutshell
<epony> games do the same
<epony> and office programs and browsers and cad/ide
<geist> heat: i think the classic issue was the fact that DOS and later windows would not let you replace a file that was open and in use. so for stuff ike system dlls and whatnot you'd find that there was an error copying it into place, so it would register a pending file move on the next boot
<geist> may be more complicated problems now with services restarting, etc, but classically that was the case
<epony> you'd fall from the chair if you calculate the net losses in finance and time lost of copy protection and anti-decompile measures
<geist> the problem didn't really exist in DOS per se, because you werent really running more than one program and at a time
<heat> yes that would make sense in normal system operation
<geist> multiple reboots, i dunno
<heat> but when installing windows? kinda weird ngl. although I don't know how the windows installer itself works
<epony> reordering and "instantiation" of records and databases, decompile and decrypt parts etc
<epony> it's a large pile of many such details
<heat> i assume it runs itself in the boot media directly so installing would just be a matter of creating a new partition and setting things up, copying shit and rebooting
<geist> yeah probably going through a few install phases
<epony> you think, but that's not how it goes when the business interests speak over the technical operations
<geist> well, it might then boot into itself, run more setup, download patches, then reboot after that, etc
<epony> download patches in the win9x epoch was not it
<epony> that's way way late after XP even
<epony> you'll see it in the system requirements and activation details
<epony> remember product activation ;-)
<epony> and how late networking setup is part of that process
valerius_ has joined #osdev
<epony> and that Win9x install can not proceed without an actual floppy device in the system
<epony> even if it's not used
<epony> so the reboots are also for adding devices and frameworks for drivers, not just some drivers
<epony> it's a lot of these unreported events that are happening that make people lose patience and trust in the system, and not being aware what has been happening in the last 20 years of their computing life ;-)
<epony> desktop environments on Linux achieve the same level of stupidity easy and even surpass it
<epony> but at least you have some 'say' in it or some ability to 'view' logs / find out
<c2a2> twm ftw
<epony> the event logging was added for that reason
<epony> in windows systems but checking that and figuring it out is not the easiest of tasks with the primitive system view tools
<epony> so a large set of the management and control tooling is not available to consumers even in the "advanced" versions / releases
<epony> it's a very deep convolution guide how not to design systems for engineering and how to do it for consumer control and remote reproducible sequences
spikeheron has joined #osdev
thinkpol has quit [Remote host closed the connection]
<epony> the TLDR in NTLDR stands for "a lot of crap"
<clever> lol
thinkpol has joined #osdev
<epony> that concept of "overlay" (ovl files) is deep ingrained in how these things unrolled
<clever> what exactly was it overlaying?
<clever> binary patches to code?
<epony> system extensions
<epony> and to make things a bit more excellent, there are alternative terms and terminology used for comcepts which are similar but implemented differently and used as de-factore terminology standard, which is not always correct as separation and definition
<epony> notable examples of these are related to memory, file systems and "paging"
<clever> ah yes, calling swap "virtual memory"
<epony> that and keeping previous generation legacy and not validating the system components when such is possible is a major deficit in the Windows systems in their 3.x 9x and NT epoch
<epony> at the same time making sure to mangle the boot records frequently as there can be only one ;-)
nyah has quit [Quit: leaving]
<mjg> you guys mentioned defrag
<mjg> this triggered somethin' https://www.youtube.com/watch?v=gY2RlnYcWY0
<bslsk05> ​'w3sp strafes [HD][Quake3 DeFRaG movie]' by xajjA (00:12:12)
<heat> ok im bored out of my mind looking at linux compile
<heat> poll: arithmetic on void *, yes or no?
gxt has quit [Ping timeout: 255 seconds]
<epony> the long term imprintment in brain-memory of the wait times for defragmentation to reorder reading from disk only to go to waste quickly after wring and copying things around, and also totally obliterated by decryption and copy protetion techniques that make everything slow
<geist> i personally thin you should be able to do it
<geist> but of course the spec says otherwise
<heat> geist, oh yeah quick q, on x86 it's not defined to set present and only then RW on a page table entry right?
<epony> or the "system trolling" like, we'll throw in a built-in defragmenter now that we've made sure it's useless for 10 years already
<epony> (same with the 'defender' and sysinternals)
gxt has joined #osdev
<epony> (the other form of "application trolling" being the registry and hive databases and 'accessories' in place of something that actually works)
<moon-child> it's annoying to have to cast to char* and back, so I say yea probably. But it's definitely somewhat sticky
<epony> android and mac/i/os is doing the same
<epony> and if you believe arm does not have the same quirks as x86..
<epony> try running wondows on arm and android on x86 and spot the differences
<clever> epony: now imagine a no-mmu kernel, that can defrag ram!
<epony> muh copy protection is better than yours (apple protests and starts hitting itself on the head in successive product releases)
<epony> the RAM defragmentation is called JVM or LLVM
<clever> epony: both palmos and the rpi firmware do it, they call it a relocatable heap, and its exposed at a c level api, not a bytecode
<epony> maybe because they have to dump it on eMMC fast without reordering there
<clever> nope
<epony> cause you know NAND flash is shoddy
<clever> on palmos, its bacause there is no mmu, and if you fragment the free space, you cant allocate large objects
<epony> ah, like the overlay depot of wisdom
<clever> its worse on palmos, because its a multi-app environment
Left_Turn has joined #osdev
<clever> the rpi is a single-app env, but has to deal with allocating contiguous 1080 frames
<epony> so.. like 80ies 8bit PCs hardware with 90ies 16bit PCs software
<clever> yeah
<epony> I knew it!!!
<epony> but the SoC are like 10-20x 8bit PCs really in functional blocks
<clever> on both palmos and the rpi firmware, the allocate function returns a handle
<epony> and has accelerators and power management and entire small OSes in the SoC
<clever> the lock function locks an object, and returns its current physical addr
<clever> the unlock function unlocks it, and you must not use the phys addr again, until you lock and get a new one
<epony> getting away from the premises of RISC's register-register operation is not fun
<clever> any unlocked object, is free to be moved by defragmentation
Turn_Left has quit [Ping timeout: 265 seconds]
<clever> and an object can be locked multiple times, so you have some refcnts going on
<clever> on the rpi version, there are also flags when you unlock
<clever> so you can tell the system, the data doesnt matter, but keep the buffer reserved
<clever> that makes defrag faster, it moves the allocation around, but doesnt bother with the memcpy()
<epony> mhm, fast ;-) tell that to Winders
<heat> ugh
<heat> can speculative accesses create tlb entries?
<geist> yes
<heat> thank mr geist
<heat> the people who wrote this don't know what they're doing :////
<geist> that's one of the fundamental reasons speculation based attacks exist: you can use speculation to get TLB or cache or branch prediction entries and then observe their creation
<epony> transient execution is/was not supposed to mean it's a transitional phase of 15 years of failures that will pass..
<heat> what's with people employed by x86 vendors and not knowing how to write MMU code
<epony> i/o is not immune from this either
<clever> epony: firewire says hello, lol
<clever> who thought that was a good idea??
<epony> the people writing drivers
<epony> for its time it was an improvement, much like caches and lookup tables
gog has quit [Ping timeout: 246 seconds]
<epony> how correct and reliable / fine grained that is implemented makes the difference
<epony> and arm has the same problems
<epony> they are not unique and the result of intentional bad designs, just need more precision and separation
isaacwoods has quit [Quit: WeeChat 3.8]
<epony> there are some "generational" things that are better skipped than tried and cried, like 386/486 and HW-virtualisation-v1 the first 15 years of great speculation
<epony> eXpecially when it's advertised as a 'security concept' a'la (P|Q)ubes
<epony> and "enter-priCe" cloud services (*aaS)
<epony> "we delayed our containers to give virtualisation a chance" -LieUNIX
<epony> sparc whizzing around with ldoms and jvms for decades
c2a2 has quit [Quit: leaving]
<bslsk05> ​github.com: edk2/VirtualMemory.c at master · tianocore/edk2 · GitHub
<heat> this is a fucking trash fire
xenos1984 has quit [Read error: Connection reset by peer]
<heat> C bit fields, union type punning, setting present bits and then other *required* bits, duped code after duped code
<heat> this file is then copied to other places in edk2 where they fuck it up even harder
ZombieChicken has joined #osdev
mimmy_ has joined #osdev
fedorafan has quit [Ping timeout: 246 seconds]
fedorafan has joined #osdev
<epony> basic i/o systems are advanced now
<epony> have interpreters and compilers and "overlays"
<epony> and databases and tables for hw enumeration and addressing
xenos1984 has joined #osdev
mimmy_ has quit [Ping timeout: 268 seconds]
smeso has quit [Quit: smeso]
smach has quit [Remote host closed the connection]
[itchyjunk] has quit [Read error: Connection reset by peer]
smeso has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
mimmy_ has joined #osdev
heat has quit [Remote host closed the connection]
mimmy_ has quit [Ping timeout: 272 seconds]
heat has joined #osdev
fedorafan has quit [Quit: Textual IRC Client: www.textualapp.com]
mimmy_ has joined #osdev
asecretcat has joined #osdev
wikan has joined #osdev
wikan has quit [Client Quit]
heat has quit [Ping timeout: 252 seconds]
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
dude12312414 has quit [Ping timeout: 255 seconds]
dude12312414 has joined #osdev
srjek has quit [Ping timeout: 272 seconds]
mimmy_ has quit [Ping timeout: 260 seconds]
<geist> hmm, i forget, was somewhere here talking about the Zig programming language?
<kof123> i thought the creator used to hang here back on freenode </not helpful or relevant>
<geist> yeah that's what i was thinking
<zid> Take off every zig programming language
ZombieChicken has quit [Quit: WeeChat 3.7.1]
<geist> ah andrewrk rings a bell
<geist> i say this because someone at work was chatting about hacking with zig over the holidays and falling somewhat in love with it, pointing out i'd probably dig it
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 264 seconds]
<klys> anyone know how to shop for a psu with pmbus?
<zid> first I am hearing of it
<zid> my psu does all th pmbus stuff but just over usb instead
<klys> should feature an spi connector to the bmc for ipmi
<zid> oh wait, it does have pmbus
<klys> my most recent psu purchase is 1800w, though could use one with some access to stats
<zid> it has both
<zid> 1800w? geez
<klys> I have a 1800w ups also
<zid> wait maybe it'ss omething else, is pmbus 4 or 5 pin dupont
<klys> probably 4pin with three connected wires out of the four
<zid> https://images.anandtech.com/doci/9625/CRRMix_17.JPG left side under 'corsair link digital' logo
<zid> I use the usb instead because I have a gajillion internal usb ports free and no pmbus
Left_Turn has joined #osdev
<klys> i found that supermicro does pmbus, for their 1u proprietary removable rigs that do go up to 1800 or 2000, though i'd hate to be working with this dealy: https://www.ebay.com/itm/304120762970
<bslsk05> ​www.ebay.com: Supermicro PDB-PT216-2824 23-Pairs Power Distributor Assembly for SC216 Chassis | eBay
<zid> yea does't surprise me that anything saying supermicro on it has cool server features
Turn_Left has quit [Ping timeout: 256 seconds]
<klys> right so best bet is corsair ax1600i i guess
<zid> where do the pmbus pins go, super i/o?
<bslsk05> ​www.servethehome.com: Gigabyte MZ72 HB0 ASPEED BMC - ServeTheHome
<zid> ye, chip on the left is probably a graphics
<klys> that's actually the bmc
<zid> dunno what the lattice chip is
<zid> fpga!?
<klys> well i thought it was
<klys> lspci does list aspeed graphics yes
<zid> You're missing a chip near the piezo speaker, scammed
<klys> hmm, this board doesn't do well at realtime audio as per the benchmarks
<zid> My board's prosumer gaming nonsense so it has fancy optoisolated audio
xenos1984 has quit [Read error: Connection reset by peer]
<zid> with a red led in the isolation channel
<klys> the cpu however will compile a full-fledged linux in a bit under 3 minutes, however.
<zid> does your gigabyte do that? I thought not.
<klys> supremefx?
<zid> asus's hda in a can as far as I know
<zid> graphic: aspeed AST2600
xenos1984 has joined #osdev
<zid> it's always aspeed
<klys> i gather the bmc is running a kernel of some sort, arm-style
<zid> I want a combined superio bmc and graphics chip
<zid> we could call it the southrbridge or something
asecretcat has quit [Ping timeout: 260 seconds]
craigo has joined #osdev
craigo has quit [Client Quit]
craigo has joined #osdev
fedorafan has joined #osdev
heat has joined #osdev
scoobydoo has quit [Ping timeout: 268 seconds]
scoobydoo has joined #osdev
fedorafan has quit [Ping timeout: 246 seconds]
klys has quit [Quit: Lost terminal]
klys has joined #osdev
fedorafan has joined #osdev
<raggi> geist: you probably would, the stdlib is a bit weak, but the language is decent. the builtins/intrinsics are a bit slow, but i think the toolchain is quite nice to work with (I've not done that much fancy wiht it yet)
heat has quit [Ping timeout: 256 seconds]
gorgonical has quit [Remote host closed the connection]
GeDaMo has joined #osdev
heat has joined #osdev
<bslsk05> ​lwn.net: Support for Intel's LASS [LWN.net]
<heat> this is legitimately cool
<heat> even if absolutely boring and obvious
<heat> tldr with lass the cpu never accesses kernel addresses from user mode and user addresses from kernel mode, even when speculating
<heat> page table permissions be damned
<heat> it just uses the top (sign) bit as the kernel vs user bit
<moon-child> is there anything keeping you from putting the kernel in positive space and userspace negative?
<heat> with lass or without?
<moon-child> with lass
<heat> yes
<heat> A user-mode data access causes a LASS violation if it would access a linear address of which bit 63 is 1. It is
<heat> expected that the operating system will configure paging so that any such address is a supervisor-mode address.
<heat> A supervisor-mode data access may cause a LASS violation if it would access a linear address of which bit 63 is 0.
<heat> It is expected that the operating system will configure paging so that any such address is a user-mode address.
<moon-child> :\
<heat> i assume this is just simpler to implement
<heat> also, why would you ever
<moon-child> negative addresses means that you can do nantagging and don't have to fix up the pointers before dereferencing
<moon-child> now, I will say that I don't really like nantagging
<moon-child> but
<heat> normal codegen is very little compatible with the negative space
<heat> -2GB is a nasty hack
<moon-child> huh? How so?
<moon-child> why would it care?
<heat> -mcmodel!=kernel will break on -2GB
<heat> or any part of the address space for that matter
<heat> although I think PIC/PIE still work
<heat> normal toolchain tooling also breaks
<moon-child> good enough. Stuff is moving to pic-by-default anyway
<heat> ubsan for instance thinks any pointer op overflows
<moon-child> I mean not surprised if some stupid stuff depends on it. But doesn't seem like it should be that hard to fix. And addresses can still fit in 32 bits eg
<heat> yes but 1) why 2) stop
<heat> do you need more compelling arguments?
<heat> 3) intel is going to break your stupid setup in the future
<heat> 4) if that didn't move you, move to itanium or something
<heat> if mjg doesn't get it killed in the kernel in the meanwhile
<heat> mjg the murderer of the best architecture ever
<moon-child> :<
<moon-child> how could he
<heat> he, torvalds, tony luck and ardb are conspiring against the best thing to ever come out of intel
<heat> and the great venerable users of ia64, debian and gentoo CI
<moon-child> yeah I saw the thing
<heat> they've killed the second greatest debian feature before (GNU/kFreeBSD), don't let them take the best
<heat> the deep state also killed intel mpx before
<heat> those monsters
<heat> and the intel upgrade service
<heat> this is an amd-and-arm-consortium-led conspiracy I tell you
<heat> instead of removing ia64 they should remove intel 64 and ia-32e and x64
<zid> seems fairly defeatable though?
<zid> the lass thing
<zid> hmm maybe not
<zid> my idea was dumb
[itchyjunk] has joined #osdev
<mjg> so i spawned perf to p-g on my laptop
<mjg> top -g
<mjg> about 11% user and 3 % sys time
<mjg> who can guess what's the top of the profile
<geist> heat: re that LASS thing, i think ARM has something specific in one of the v8.x features
<mjg> it was perf itself, accounting for 8 percentage points of user time
<geist> something that basically lets you set a hard rule that stuff in TTBR1_x is not visible from user and hard stop here, before allowing anything to speculate
<geist> iirc it's a bit in TCR
<geist> s/specific/similar
<mjg> heat i 'm going to ask intel to donate itanium support to openbsd
<mjg> that should sort it out
gog has joined #osdev
<heat> geist, do you know what that mitigates against, exactly?
<heat> intel hasn't said yet
<heat> mjg, that sounds good to me
<heat> seriously, while I understand no one wants to maintain ia64 because it's silly and stupid, it's a venerable architecture that is silly and positively stupid
<Mutabah> heat: completely eliminates meltdown
<heat> meltdown yes, but the other ones?
<heat> "LASS seemed really cool when we were reeling from Meltdown. It would *obviously* have been a godsend five years ago. But, it's less clear what role it plays today and how important it is."
danilogondolfo has joined #osdev
terminalpusher has joined #osdev
_xor has quit [Read error: Connection reset by peer]
<epony> I like the transient execution faults that let you listen to the radio while reading other processes tokens and executing instructions on their return vectors they did not expect, do not know about and never find out what happened (or get the execution vector again, after they've been executed)
<epony> Intel would likely tell you that it donated support for OpenBSD in Windows.
<epony> and that Itanium was made for HP and it ran for 20 years there without you having access
<epony> so, not for you ;-)
_xor has joined #osdev
<gog> me
<zid> til that gog
<heat> gog
<heat> gog go go gogo gog gog
<gog> heat heat heat
<gog> bazel
<heat> 🅱️🅱️🅱️🅱️🅱️🅱️🅱️
<heat> decipher this
<gog> bazinga
<heat> you have deciphered my military grade encryption scheme
<heat> i must warn the NSA
<gog> it's cool they already know about me
<epony> but not only they know
<epony> the Chinese authorities, most of the American controlled international drug cartels and the thought police know too
<ddevault> hrm
<ddevault> if I set DAIF to 0b1111, why am I still getting IRQs from EL1 => EL1
<clever> ddevault: are you trying to service IRQ's in EL0?
<ddevault> yeah
<clever> i wasnt aware that was even an option, but the armv8 docs do imply it is
gxt has quit [Ping timeout: 255 seconds]
<ddevault> err, no
<ddevault> I want to service IRQs in EL1, but only while in EL0
<ddevault> I don't want interrupts from EL1 => EL1
<clever> ah
<clever> so you basically dont want pre-emption of any kind while in kernel mode
<ddevault> yeah
<ddevault> except for kernel faults, which just panic
<clever> and faults wouldnt respect the I bit
<ddevault> right
<ddevault> I have a lead, let me tug on it a bit and get back to you
<clever> i would think, just use the I bit to mask interrupts in the EL1 version of the reg, but in the saved reg that eret restores, have them unmasked
<clever> so whenever you eret back to EL0, irq's get unmasked, and it may go back to EL1 immediately
gxt has joined #osdev
<ddevault> so the issue is that I was writing to the wrong bits of DAIF
<ddevault> adding a shift stops the interrupts from happening in EL1
<ddevault> but... also breaks syscalls after jumping to EL0. But SPSR_EL1 is 0
<ddevault> oh, no, I'm dumb
xenos1984 has quit [Read error: Connection reset by peer]
<ddevault> it didn't break syscalls
<ddevault> it just caused interrupts to fire in EL0
<ddevault> which goes to my as-of-yet unwritten infinite loop of an IRQ handler
<clever> ah, so it worked as intended?
<ddevault> yep
<clever> just recently, i got nerd-sniped into some GBA coding, ARM7TDMI, even older and more crippled then the armv6 from the rpi1, lol
<clever> it doesnt even have a VBAR, so irq's always go thru the "bios" rom
gxt has quit [Remote host closed the connection]
<clever> but after a bunch of messing around, i was able to get vsync irq's working
gxt has joined #osdev
<clever> had to enable irq's at 4 different layers
<clever> hmmm, i assume this has a user vs kernel mode...
<clever> yeah, it does
cultpony has quit [Quit: ZNC - https://znc.in]
cultpony has joined #osdev
SGautam has joined #osdev
Turn_Left has joined #osdev
tibi has quit [Quit: Leaving]
Left_Turn has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
elastic_dog has quit [Ping timeout: 260 seconds]
elastic_dog has joined #osdev
<ddevault> bizzare, ELR_EL1 is always my userspace entry point regardless of when the interrupt occurs
<ddevault> ah, now it's not, but...
<ddevault> when gdb is attached
<ddevault> timer weridness?
<ddevault> no clue where IRQ 33 comes from
<ddevault> what kind of manual includes things like this https://l.sr.ht/szYL.png
<j`ey> i think irq33 is the timer..
<ddevault> is 27
<ddevault> maybe I'm EOI'ing wrong
<ddevault> I get 27 if the timer is enabled, 33 if not
<j`ey> oh ok, I knew it was in a similar range
<ddevault> I read IAR from GICC, & 0x3FF to mask out reserved bits
<ddevault> then write that number to GICC_EOIR
<ddevault> which are respectively defined as 0x000C and 0x0010
<clever> i believe its up to the implementor of the chip, to assign those numbers
<clever> so you would need to find the docs for the soc your running on
<ddevault> qemu virt
<clever> ah, then you can either read the source for qemu, or just parse the DT it gives you
* clever looks
<ddevault> but yeah, it looks like the actual interrupts vary
<ddevault> what's interesting is
<ddevault> the device tree shows it as IRQ 1 (i.e. IAR == 0x33)
<ddevault> which fires if I don't enable the timer via CNTV_CTL_EL0
<ddevault> but if I do enable the timer, I get interrupt 27 instead
<ddevault> i.e. IAR == 27
<ddevault> maybe I'm getting both but 27 is a higher priority and I am not EOI'ing it properly
<bslsk05> ​github.com: qemu/virt.c at master · qemu/qemu · GitHub
<clever> ddevault: this generates the DTB for the timers, and fills in 4 irq numbers
<ddevault> ack
<ddevault> I have the qemu dts in front of me
<ddevault> in any case I don't really care which IRQs are firing
<ddevault> what I want to know is why I can't ack them properly and get userspace back online
<bslsk05> ​github.com: qemu/virt.h at master · qemu/qemu · GitHub
<clever> the header says the timers are irq 11, 13, 14, and 10
<ddevault> the non-secure IRQs, yeah
<clever> secure el1 is 13, according to these names
<clever> ah, and that example dts exactly matches what qemu appears to be using
<ddevault> figured out 27
<clever> ddevault: some interrupts are also level triggered, so until you clear the cause (like resetting a timer), it wont stop
<ddevault> I need to reset TVAL or else it'll just continuously fire
<clever> what was 27?
<ddevault> that causes 27 to fire at 100 Hz, the desired behavior
<clever> ah, so my last hint was spot on!
<ddevault> but now I have to figure out 33
<clever> ah, close
<ddevault> yeah, good call :)
<ddevault> 33 is the timer from the dts
<ddevault> so... how do I shut that idiot off
<clever> ive run into similar problems before, the timer compare reg defaulted to 0, and i had the irq unmasked
<clever> after ~70 minutes, the 32bit timer reg overflowed, rolled back to 0, and fired an irq
<clever> hard to debug a weird fault, when it only faults after 70 minutes of uptime!
<ddevault> I bet
<clever> ideally, you should mask every irq your not prepared to deal with
<clever> thats a bug i found in linux on the rpi, it assumes irq's are already masked off
<ddevault> yeah
<clever> and the instant it enables irqs, it gets stuck in an infinite loop
<clever> with an event it cant clear
<clever> so my bootloader has to go thru, and mask off every irq, before passing control on
<ddevault> masking the IRQ is Good Enough for now
<clever> ddevault: https://youtu.be/_j2L6nkO8MQ?t=1061 hellord is better! :D
<bslsk05> ​'Minicomputer Part 11: Running Real Centurion Code off the DIAG Card!' by Usagi Electric (00:24:28)
<ddevault> hah
<ddevault> now the annoying part, does it work on hardware
<ddevault> works on real hardware :D :D :D
<clever> :D
<ddevault> praise be to qemu
<epony> and Prometheus
<bslsk05> ​'The Doors - Light My Fire' by TheDoorsVEVO (00:09:23)
<heat> yoooooo the arm people are here today
<heat> can't believe it
<heat> i though this was a riscv channel now
<heat> thought*
<heat> you'll see, when I work for sifive i'll make the meanest pentium 4 you'll ever see
<heat> you'll tremble with your cortex
<ddevault> I object to being called arm people
<ddevault> in 2 weeks my relationship with arm will be put on hold and I'll be back to x86_64
<ddevault> just a little fling, you see
<heat> does arms people work or do I need to mention your legs and core too
<ddevault> don't forget my fingers
<heat> i lost my fingers writing C
<heat> now I got little boot stubs
<epony> that's good enough for Python
<ddevault> need to rework this so that the yield syscall works properly
<ddevault> then I think I can fire up my kernel test suite and see how much of it works
<ddevault> then implement fault handlers and I think that the aarch64 port is complete, pending polish
<ddevault> oh I guess I still need to set up device memory capabilities and generalize IRQs
<ddevault> can cheese that for the demo though
nyah has joined #osdev
dude12312414 has joined #osdev
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<kaichiuchi> hi
<ddevault> that was easy
fedorafan has quit [Ping timeout: 252 seconds]
fedorafan has joined #osdev
mimmy_ has joined #osdev
<ddevault> + the skipped test https://l.sr.ht/NbBj.png
<ddevault> 41 days from zero to all tests passing on aarch64 :)
fedorafan has quit [Ping timeout: 260 seconds]
<clever> ddevault: nice
fedorafan has joined #osdev
bauen1 has quit [Ping timeout: 265 seconds]
bauen1 has joined #osdev
mimmy_ has quit [Ping timeout: 272 seconds]
mimmy__ has joined #osdev
gxt has quit [Read error: Connection reset by peer]
foudfou has joined #osdev
<mjg> heat: you you srs abut itanium
<mjg> no matter how good or bad an arch is, there is a time where it needs to be let go
<mjg> maintenance burden is a real thing
foudfou_ has quit [Ping timeout: 255 seconds]
gxt has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
mimmy has quit [Killed (NickServ (GHOST command used by mimmy__!~mimmy@]
mimmy__ is now known as mimmy
mimmy_ has joined #osdev
<zid> mjg: itanium has no maintainacen burden
<zid> only maint ecxtascy
<mjg> of all the things you can be high on
<mjg> itanium?
<mjg> ddevault: oh i missed your message above, nice work man, provided the tests actually owrk :p
<zid> alpha
<zid> who needs memory ordering when you have an lapah
<zid> ddevault: what was your fucky wucky bug in the end?
<mjg> alpha is too mainstream
[itchyjunk] has quit [Read error: Connection reset by peer]
fedorafan has quit [Ping timeout: 256 seconds]
fedorafan has joined #osdev
srjek has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
bauen1 has quit [Ping timeout: 272 seconds]
bauen1 has joined #osdev
mimmy has quit [Ping timeout: 252 seconds]
mimmy_ is now known as mimmy
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 272 seconds]
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 246 seconds]
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 272 seconds]
_whitelogger has joined #osdev
mimmy_ has quit [Ping timeout: 272 seconds]
wootehfoot has quit [Client Quit]
spikeheron has quit [Quit: WeeChat 3.8]
<heat> mjg, i know it needs to be let go but like, sadge :((
<mjg> if you want to larp an arbitrary era from the past get netbsd
corank has joined #osdev
wootehfoot has joined #osdev
* geist yawns
<mjg> 'unsigned' is just int, innit?
<gog> yeh
<Ermine> unsigned innit
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
mimmy_ has joined #osdev
danilogondolfo has quit [Remote host closed the connection]
mimmy_ has quit [Ping timeout: 260 seconds]
<sham1> typedef int innit
<mjg> #define itanium deadanium
<mjg> also known as itanic, heat
dutch has joined #osdev
nj0rd has quit [Quit: WeeChat 3.7]
nj0rd has joined #osdev
<heat> geist, he's making fun of our architecture
<heat> ban pls
<geist> :(
<heat> i've heard fuchsia only supports 64-bit architectures
<heat> turns out you've only been supporting 48-bit architectures these past few years
mimmy_ has joined #osdev
<geist> eeeyo!
<geist> or more specifically 49 bits and 48, arm and x86 respectively
<mjg> "our"?
<mjg> you are into itanium geist?
<geist> well, i'm into it as much as i'm into sparc or alpha or pa-risc or whatnot. neat things, used to even own one, but obviously not relevant to modern stuff
<mjg> whoa
<geist> itanium is a smorgasbord of crazy ideas that's fun to know about
<mjg> that i agree with, i had a glimpse
<mjg> in a way i'm happy it did not pan out tho :p
<mjg> cpus are pretty wonky perf-wise as is
<mjg> you never know what will set them off
<heat> "cpus are wonky, so make them pretend they're still a glorified 8086 so they run a PDP-11 programming language well"
<Ermine> where did I read this
mimmy_ has quit [Ping timeout: 260 seconds]
<mjg> geist, he's making of our language
<mjg> ban pls
<mjg> fun*
* geist bans all of you
<heat> fun pls?
* mjg goes to discord
<mjg> i bet they have scalable kernels and hookers
<heat> only if you're in the illumos discord
<mjg> that fucking system
<mjg> fuck
<mjg> one of these days i'm going to do a long writeup why it does NOT scale
<geist> oh really? i
<mjg> on era-appropriate hardware
<geist> i've totally not heard of this before
<geist> you mean solaris, not scaling? wow!
<mjg> :]
<mjg> once i do it i'll only have to link
<geist> i bet you'll even get 10s of clicks too!
<mjg> i'll send it to tuhs man
<geist> hackaday will link it and then you'll get a wall of comments: 'lulz what is solaris?'
<mjg> maybe that will clickbait as rust is the hotness
<heat> zfs save-my-neglected-marriage
<theWeaver> lol i remebmber one time i did a wargaming challenge on a vm running an old version of solaris, and you could root it via LD_PRELOAD env var when executing setuid binaries
<theWeaver> most easiest root i ever did do
<mjg> theWeaver: oh ye they had a few of those
<mjg> but so did the gnu land, so....
<theWeaver> mjg: lol for real?
<mjg> yea
<geist> oh huh never occurred to me that you could LD_PRELOAD a setuid. makes totally sense
<mjg> one of these was partially courtesy of /proc
<heat> mjg, fyi netbsd doesn't really support ia64
<geist> obviously i guess it has to ignore LD_PRELOAD in that case?
<theWeaver> i only ever encountered that on solaris
<theWeaver> geist: i guess
<heat> geist, yes, you should ignore a bunch of env vars on AT_SECURE = 1
<mjg> theWeaver: oh sorry, it was not LD_PREALOD specifically, but a different LD_ var
<theWeaver> mjg: ah okay
<mjg> theWeaver: the loader would check if the dir pointed to it is owned by root and if so it would trust the content
<heat> glibc also ignores a bunch of things regarding their plugin system(s)
<theWeaver> yeah the solaris one i came across was literally LD_PRELOAD
<mjg> theWeaver: the problem is /proc/self/fd will be owned by root for root setuid, so they got fucked
<theWeaver> mjg: :o
<geist> i think the real problem was setuid, though i guess it simply solves a whole pile of problems
<theWeaver> hahhaa
<theWeaver> nice
<geist> (and adds a bunch of new ones)
<mjg> the real problem is need for setuid
<geist> right
<mjg> this does not have to exist today
<mjg> with allmighty init you could literally talk to init to change your password 'n shit
<theWeaver> mjg: so how do we deal with it, do admin shit with services that were already running as root?
<heat> i don't have a better alternative
<heat> doing creds over unix sockets? weird
<theWeaver> heat: how else u gonna play tho
<heat> and then a program ran under sudo would not be under its parent, etc
* mjg laughs in ptrace
<mjg> to solaris credit, that's the one unix which implements ptrace without reparenting the tracee
<geist> yah fuchsia side steps all of this stuff by just going in a completely different direction
<mjg> that i know of anyway
<geist> that probably has a completely different set of unknown unknowns
<heat> mjg, linux ptrace reparents?
ZombieChicken has joined #osdev
<theWeaver> geist: fuchsia, is that the weird google shit?
<geist> indeed.
<heat> lol
<Griwes> lmao
<theWeaver> i think i heard rumours about it
<geist> pretty good summary heh
<mjg> heat: yea
<mjg> heat: this is why you even get ->real_parent in struct task
<mjg> fucking ptrace is part of why task management on linux does not scale
xenos1984 has quit [Read error: Connection reset by peer]
<heat> mjg, no? I think real_parent is for thread groups
<Ermine> I'm not a fan of Google, but I want Fuchsia to succeed
<theWeaver> i used to work with some google peeps
<theWeaver> and went to visit them at the london google office at tottenham court road or something
<theWeaver> apparently they have masseurs/masseuses in the office building
<theWeaver> where you can spend massage points
<theWeaver> if you do good work enough to earn said points
<theWeaver> good enough*
<heat> seems like they have 3 offices in london :P
<Ermine> GGG
<geist> theWeaver: this is all true, though you generally earn massage points by a simple passage of time
<heat> geist, time to ask why the seattle office doesn't have massages
<heat> the real uncomfortable questions
<geist> because the seattle office is somewhat scrappier
<theWeaver> geist: i also had coffee there
<theWeaver> made by one of the in-office paid baristas
<geist> the london office near kings cross station is really nice
gxt has quit [Ping timeout: 255 seconds]
<theWeaver> i was like wuuuut
<theWeaver> y'all even have fuckin baristas
<geist> we do
<theWeaver> geist: oh yeah so thi sone chick was also mega proud of the snack matrix
<theWeaver> a four by four matrix of draws
<geist> <- works at google, and also on fuchsia just to come clean
<theWeaver> with two types of snack per drawer
<theWeaver> geist: yeah i know where you work
<mjg> heat: no
<geist> okay, just making sure
<theWeaver> i also know you work on fuchsia
<theWeaver> geist: lets just say a lil kitty told me
<heat> so that weird google shit was just a potshot?
<geist> no that's fine, i just dont recognize your nick, so as far as i know you just popped in today 5 minutes ago
<theWeaver> geist: reasonable
<theWeaver> heat: indeed
gxt has joined #osdev
<heat> mjg, have you seen that weird freebsd shit
<geist> it is indeed weird google shit, i will not deny that
<heat> they're all nuts!
<theWeaver> geist: i was majorly against google when i had to work with some of your people in my previous job
<theWeaver> but liiiiiike
<theWeaver> this was all google adds/google smart shopping/shopping ads on google/whatever crap
<theWeaver> and im very against all of this
<heat> esp. this guy "mjg" that likes going on and on and on about optimization and performance and pessimal sync primitives
<mjg> which one
<theWeaver> mjg: you, mofo
<mjg> OH
<geist> theWeaver: fair. yeah. i've worked at google for 11 years but never touched any part of that business
<heat> no? why would it be mjg
<mjg> the keyboard mofo
<mjg> heat: which weird shit in freebsd, motherfucker
<mjg> cause i can name some LSD products no problem
<heat> why don't you join gnuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu slash linux
<theWeaver> geist: the funny thing was like before i started my first industry job i was like 'i dont wanna work for facebook, or FAANG, or do any *ads* shit' and then i join a small german ecommmerce company, and once i start i discover our first project was to integrate 'google smart shopping' into our backend
<mjg> you can't escape fangs
<theWeaver> and spent a year working on tihs bullshit and having weekly calls with google reps
<theWeaver> mjg: apparently not
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
<heat> i fail to understand how some/most #osdev'ers don't work in low level land
<theWeaver> heat: im only here cuz one of my gfs and some friends of mine hang out here, and when i was like 13 i wrote some C/ASM code for x86 machines that could boot off a floppy and set up memory mapping tables/long jump from 16bit to 32bit execution mode
<theWeaver> i am not really much of an osdevver, truth be told
<theWeaver> rn i work with Python in a team consisting mostly of machine learning peeps
<mjg> oh no
<theWeaver> mjg: indeed
<mjg> do you think they have people like this on discord?
<mjg> i think not!
<theWeaver> mjg: they probably do tho
<mjg> no man, discord is so much better
<mjg> trust me, i'm a guy on irc
<theWeaver> hey, i aint your man, buddy
<heat> discord people are either 12 year olds or geist
<theWeaver> i am in fact a female weaver
<heat> literally
<mjg> not my man or man ing eneral
<Ermine> heat: this requires actuall skills
<mjg> theWeaver: mild apologies
<heat> Ermine, what does?
<theWeaver> i prefer sincere ones but i'll take it
<mjg> theWeaver: i already handed off those ones earlier today
<Ermine> heat: working in low level land (esp. OSes)
<theWeaver> mjg: oic
mimmy_ has joined #osdev
<mjg> bad timing
<theWeaver> well, I'll live
<mjg> theWeaver: serious question though
<theWeaver> yeah?
<heat> Ermine, the other work also does?
<mjg> theWeaver: do you consider 'dawg', however informal it might be, to be male-only?
<theWeaver> i mean thats a tricky one
<heat> obviously you need to say 'dawgess'
<Ermine> heat: much less of it I think
<heat> Ermine, hard disagree
<theWeaver> but as someone who is annoyed by the catgirl tropes and strongly identifies as not-a-cat
<theWeaver> i think i can handle just being 'dawg'
<Ermine> Doing websites is easier
<mjg> i'm looking for an informal way to address someone
<mjg> which is gender-neutral
<heat> mjg, comrade
<theWeaver> mjg: pal
<theWeaver> buddy
<GeDaMo> Hey, you :P
<theWeaver> fren
<mjg> lad
<Ermine> Shitposting in #osdev is much more easier
xenos1984 has joined #osdev
<heat> also goes well with the eastern europe
<theWeaver> mjg: no lad is very much gendered
<theWeaver> no,
<mjg> pal is not?
<theWeaver> pal is not gendered
<mjg> i thought that's literally 'guy'
<theWeaver> a pal is merely a friend
<theWeaver> nope
<heat> pal is gendered
<theWeaver> heat: not it fuckin isn't
<heat> as much as dude is
<heat> absolutely
<Ermine> is ntsc gendered
<theWeaver> dude is very much gendered
<theWeaver> pal isn't
<heat> dude is not gendered
<theWeaver> definition of pal is simply: a friend
<heat> well, its only gendered if you want to
<theWeaver> definition of dude is: a man; a guy
<GeDaMo> «Borrowed from Angloromani pal (“brother, friend”), from Romani phral (“brother”), from Sanskrit भ्रातृ (bhrātṛ, “brother”).» https://en.wiktionary.org/wiki/pal
<bslsk05> ​en.wiktionary.org: pal - Wiktionary
<mjg> how about an irc acquiantance
<theWeaver> GeDaMo: aaaaaaaaaaah god damn it really
<mjg> what word would that be
<heat> fuckface
<theWeaver> why can there not be ungendered friend words
<GeDaMo> I also thought it wasn't gendered
<mjg> friendess
<theWeaver> ffs
<mjg> theWeaver: are you from an english speaking country?
<theWeaver> mjg: yea
<theWeaver> i grew up in england
[itchyjunk] has joined #osdev
<GeDaMo> You could always just use «friend» :P
<theWeaver> GeDaMo: i guess so yeah
<theWeaver> im just kinda bummed that pal isn't as gender neutral as i thought
<GeDaMo> 'friend' is how some robots in Asimov's stories refer to each other
<mjg> i identify as a pal
<heat> pal is also new-york-gendered
<theWeaver> heat: lmao
<heat> how to sound like an italian guy in new york 101
mimmy_ has quit [Ping timeout: 272 seconds]
<theWeaver> lol
<geist> i'd say pal is probably as gendered as buddy
<mjg> how to sound like a non-italian guy in new york: quote italian mobsters from sopranos
<geist> which is to say slightly gendered, but mostly because it's a thing you expect guys to say to each other
<heat> what's the texas "pal"?
<heat> brooooooooother?
<theWeaver> geist: i also didn't really see buddy as very gendered
<mjg> can texans even hear words over all the gunshots?
<mjg> perhaps i should stick with "hello friends"
<heat> i told you, comrades
<theWeaver> i mean i usually use 'folks'
<geist> well there's the obvious 'yall' but that's different context
<heat> suits your eastern europeanness just fine
<GeDaMo> Hello, UTF-8 generators :P
<geist> yah folks probably
<theWeaver> but 'comrades' is pretty gender neutral too
<theWeaver> geist: yea i use 'yall' a fair bit as well
<Ermine> heat: what does suit eastern europeanness
<geist> somewhat gendered but thing i heard a lot in TX: 'hoss'
<heat> comrades
<theWeaver> at my work in my team peopl eoften say 'guys' to refer to the team which annoys me and three of us are women, and even tho many people say 'guys' is gender neutral i fkn hate it
* Ermine now has soviet march playing in head
gxt has quit [Remote host closed the connection]
<geist> yah guys is so easy but i'm really trying hard to not use it at work. i am successful like 90% of the time
<theWeaver> Ermine: my ancestors are from soviet lands
<theWeaver> or half of them are at least
<heat> last diversity training I've went to suggested 'yall' as an alternative
<heat> i am NOT saying yall
gxt has joined #osdev
<heat> NO
<heat> absolutely fucking no way
<theWeaver> heat: too redneck for ya?
<geist> aww why not? yall is nice
<mjg> a'int that somethin
<heat> i'm too european for yalllllllll
<geist> look go back to middle english and bitch at those folks for removing a good second person plura
<mjg> theWeaver: heat *is* a european redneck
<Ermine> theWeaver: my all ancestors are all from there
<geist> thou, thine, etc
<theWeaver> Ermine: nice
<theWeaver> mjg: european... redneck?
* theWeaver does the calculations
<Ermine> idk whether I agree
<mjg> theWeaver: the equivalent
<mjg> but perhaps that's another mismatch in uderstadning the term
<heat> mjg, european redneck is literally poland
<mjg> heat: that is redneck central
<theWeaver> poland is pretty redneck yeah
<theWeaver> that makes sense
<theWeaver> next one is probalby uk
<mjg> if you consider russia as not present in europe
<heat> russia got cancelled from europe
<theWeaver> mjg: i think that ship has sailed
* mjg squats
<mjg> lemme find the video
<heat> adidas tracksuit?
<geist> okay, come on now
<Ermine> heat: :<
<bslsk05> ​'XS Project - Bochka, Bass, Kolbaser [Bass Boosted] (Russian Special)' by Manne Bass (00:03:05)
* geist tries to gently steer things back towards nice place
<theWeaver> bslsk05: HELL YEAH
<heat> bslsk05, bslsk
<heat> geist, is dang ol' really that common or is it just king of the hill
<mjg> ok, want something technical, i need a good name for a variable
<mjg> 100% serious
<geist> dang is. dang ol is not unheard of but most of that is very specifically a Daleism
<heat> mjg, variable for what?
<mjg> access() checks a bunch of stuff to find out if it needs to create new creds for the call
<theWeaver> mjg: fuckin tune
<mjg> but this can be pre-computed
<geist> dang is just a nicer version of damn really. like darn
<mjg> the q is how to name the precomputed var
<heat> both of those are southisms aren't they?
<mjg> vfs_access_need_new_cred does not really work, does it
<geist> well name it what it is
<heat> generic new york italians don't say darn
<mjg> geist: that result in a name so long it spans another repo
<heat> mjg, need_new_cred
<mjg> heat: but this is conditional on EACCESS being passed
<heat> whatevs
<mjg> aka vfs_need_new_cred_if_not_eaccess
<geist> i think some of that is because there's an undercurrent of politeness int he south, so in general you try to avoid curse words in general
<mjg> which i'm not rolling with
<Ermine> mjg: if you drink Jaguar you'll dance like this
<geist> so there's usually a whole pile of non curse word equivalents
<mjg> Ermine: i dance like this sober
<mjg> geist: bless your heart!
<heat> mjg, ncred, nc
<mjg> i hear that's like the worst insult you can get
<geist> exactly, though you can argue that's a midwestern thing too
<heat> nnc
<heat> all very BSD names here
<geist> heat: oh reminds me i think you were complaining about const arguments to functions. i've started to do that some too
<mjg> if the syscall was named differently at least therw ould not be this clash
<mjg> geist: complain or add const :)
<geist> though generally only in c++. it's a googleism that's slipping into my own code
<heat> geist, whyyyy
<geist> same as a const local variable
<theWeaver> geist: those google bastards
<geist> if you're not modifying it, mark it as const
<heat> it's way more unreadable and also "WHO CARES"
<heat> the caller doesn't. so why is it cluttering the argument list
<geist> you dont need it in the prototype, i only put it in the local
<heat> you don't?
<heat> is that entirely defined?
<geist> yah it doesn't leak out to the prototype
<geist> good question, but i suspect it is
<heat> that sounds saner but still, meh
<geist> what i dont precisely know is if it's well defined in C or if that's a C++ism that leaks over
<heat> i'm not really const-strict when it comes to local vars and whatnot
<geist> but yeah i dont like how it pollutes the arg list locally
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<geist> i wasn't either, but i'm starting to come around to it. i think it's rust also leaking in to google work lately
<heat> int num = calculation(); and not const int num
<geist> being that rust is const by default
<Ermine> geist: you mean people use Rust idioms in C code?
<geist> oh absolutely
<heat> i use crates in C
<theWeaver> heat: who doesn't?
<heat> it's called "libtool"
<heat> great utility, every one should use it
<theWeaver> pog
<geist> i can't off the top of my head think of another one, but lots of consts is one of them
<geist> i think in C++ you see a lot more trait like C++ stuff, which i still dont 100% grok
<heat> lots of consts is also a C++ thing
<geist> yah definitely consting args to things that need to be is obviously a C++ thing
<theWeaver> aint everythin const in rust unless it's mut :^)
<geist> ie pointers to const stuff
<geist> where i've been burned a lot by lack of const in a function is things like
<geist> foo (int len) { some loop { len -= N; } return len; }
<geist> stuff where there's a loop or somethig that mutates the args and ruins the general assumption that the args are the same in the entire body
<geist> by marking it const in the arg list you have to make a copy, but it also gives you a guarantee that it isn't modified anywhere
<heat> yeah
<geist> so i've started to use it in cases like that, but not everywhere. just places where it'd generally be a trap that i or some future maintainer might do
<heat> word of the day "Eigenständigkeitserklärung"
<heat> lmao
<theWeaver> :3
mimmy_ has joined #osdev
mimmy_ has quit [Ping timeout: 272 seconds]
wootehfoot has quit [Ping timeout: 256 seconds]
Terlisimo has quit [Quit: Connection reset by beer]
mimmy_ has joined #osdev
Terlisimo has joined #osdev
PapaFrog has quit [Ping timeout: 265 seconds]
<heat> mjg, is stress-ng a good stress tester?
<mjg> heat: i don't know
<mjg> heat: i do know stress2 from LSD is good
<heat> hmmm
<heat> ok thanks
<mjg> but in your case i would simply start with multithreaded vfsmix
<mjg> it's probably enough to crash
<mjg> ... and repro
<heat> i have done vfsmix and it doesn't crash, member?
<mjg> i rmeembert you said your write support is fucked
<mjg> and that you did not want to run it
SGautam has quit [Quit: Connection closed for inactivity]
mimmy_ has quit [Ping timeout: 255 seconds]
<heat> on non-tmpfs sure
<heat> but I don't want to work on fs stuff
<heat> not now at least
<heat> i wanted to take a good look at cranor's thesis to see if I get some good ideas out of it
<heat> i assume there's at least a passing mention of writeback
terminalpusher has quit [Remote host closed the connection]
mimmy_ has joined #osdev
<mjg> heat: remember mapple syroup will-it-scale regression?
<mjg> ./mmap1_threads -t 48
<mjg> 94.20% [kernel] [k] osq_lock
<mjg> 1.64% [kernel] [k] rwsem_spin_on_owner
<mjg> 0.28% [kernel] [k] rwsem_down_write_slowpath
<mjg> :d
mimmy_ has quit [Ping timeout: 272 seconds]
<heat> mjg, whats osq_lock?
invalidopcode has quit [Remote host closed the connection]
<mjg> it's their hand-rolled mcs which they can reak from
invalidopcode has joined #osdev
<mjg> bottom line is this is time spent spinning wiating
<mjg> yo moferz what's your non-ubuntu distro
<heat> arch linux
<heat> btw
<mjg> can you grep /boot/config* | grep -v 'not set'
<heat> yes
<heat> /boot/config isn't standard btw
<heat> these days you can just use /proc/config.gz
<mjg> whatever the name you got there
<heat> wait what exactly do you want?
<heat> the config?
<mjg> oh wrong oneliner, sorry
<mjg> grep CONFIG_DEBUG ... | grep -v 'not set'
<mjg> or '^CONFIG_DEBUG", whatever the fuck
<mjg> i just found that ubuntu config comes with quite a few
<mjg> pro tip use dpaste.cm or somethin' kthx cool
<mjg> thanks though
<heat> idc
<mjg> this is not discord@!
<heat> no one's using this right now
amjx7 has quit [Quit: ZNC 1.8.2 - https://znc.in]
<heat> anyway what lock are they spinning on?
<heat> and how did it regress from the sleepable rwsem it was using before
cln has joined #osdev
<mjg> i would have to boot that kernel
<mjg> point is, they are most likely doing some funky stuff single-thraded
<mjg> which can be avoided
<mjg> and which makes contention so much worse
mimmy_ has joined #osdev
<heat> what kernel?
<mjg> according to my perf top over 7% is memset alone
<mjg> 6.2-rc3
<heat> i'm on 6.1.5
<heat> does this work?
<mjg> not if you want to bench multithreaded
<mjg> on your setup
<mjg> which is liek 8?
<heat> yeah 8
<heat> i'm obviously not going to stretch it :v
<mjg> not much of a team player uh?
<heat> giv me new cpu
<mjg> lemme try some telepathy
<mjg> did anything materialize on your desk?
<heat> doesn't seem like it no
<heat> the warszawa school of wizardry is a scam
<LittleFox> does anyone happen to have a spec for PE/COFF relocation types for RISC-V?
<heat> should be in the microsoft doc?
<LittleFox> trying to add support for COFF + RISC-V to LLVM
<LittleFox> heat, sadly not
<LittleFox> there are three defined in edk2, but without any docs
<heat> *shrug*
<mjg> heat: looks like theo got a new server instead
mimmy_ has quit [Ping timeout: 252 seconds]
<heat> mjg, btw 67.23% mmap1_threads [kernel.vmlinux] [k] osq_lock ◆
<heat> 11.06% mmap1_threads [kernel.vmlinux] [k] rwsem_spin_on_owner ▒
<heat> 1.92% mmap1_threads [kernel.vmlinux] [k] rwsem_down_write_slowpath ▒
<heat> on 8 threads
<bslsk05> ​learn.microsoft.com: PE Format - Win32 apps | Microsoft Learn
<LittleFox> but not in the section where I looked first: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#type-indicators
<bslsk05> ​learn.microsoft.com: PE Format - Win32 apps | Microsoft Learn
<mjg> heat: well ye of course it is going to contend on 8
<mjg> heat: my point was the original report was 52 threads
<mjg> different scale
<heat> well the point is it's already very visible on 8
<mjg> contention is, but you dn't know how much it regressed at that scale
<mjg> it would be much less
<heat> mjg, doesn't seem like it's taking advantage of rcu
<mjg> it probably can't for modifications
<mjg> what it could possibly do is rangelock
<bslsk05> ​gist.github.com: mmap-test1-linux-maple.svg · GitHub
<mjg> anyhow my point is that they are most likely doing single-threaded work which is not needed, all while holding the problematic lock
<heat> i just gave you the fg
<heat> enjoy
<mjg> and this where the massive slowdown showed up
<heat> i'm sure the maple tree needs a lot more memory allocation
<heat> the rb tree vm had the nodes completely embedded in the vm areas
<mjg> so mapple syroup is doing 256 byte-sized memsets
<mjg> A LOT
<heat> memset_erms btw :))))
<bslsk05> ​dpaste.com <no title>
<heat> just a plain rep stosb
<mjg> so now the q is if they have to be this big
<mjg> but more importantly
<mjg> @[ memset+5 getname_flags.part.0+48 getname_flags+69 vfs_fstatat+67 __do_sys_newfstatat+43 __x64_sys_newfstatat+32 do_syscall_64+93 entry_SYSCALL_64_after_hwframe+114
<mjg> , 4096]: 260
<mjg> why the fuck is getname_flags doing a page-sized memset
<mjg> is it some debug or wtf
heat has quit [Remote host closed the connection]
heat has joined #osdev
<mjg> aha
<mjg> looks like attempted hardening(?)
<heat> it's kzalloc
<mjg> include/linux/fs.h:#define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL)
<mjg> this does not inherently zero
<heat> result = kzalloc(size, GFP_KERNEL);
<heat> this does
<mjg> where
<heat> kzalloc
<mjg> file + line please
<heat> kernel zero alloc
<mjg> where do you have getname doing it
<heat> fs/namei.c 171
<heat> in 6.1.6
<mjg> dude that's a fallback
<mjg> if (unlikely(len == EMBEDDED_NAME_MAX)) {
<mjg> zeroing i'm talking about is coming from getname
<mjg> disasm does not show memset, so i'm guessing it got tail called frmo the allocator
<mjg> slab_post_alloc_hook(cachep, objcg, flags, 1, &objp, init,
<mjg> cachep->object_size);
<mjg> here
<mjg> commit 6a9b88204cb00da2140afda27848b5d17a7402a3
<mjg> Author: David Windsor <dave@nullcore.net>
<mjg> Date: Sat Jun 10 22:50:30 2017 -0400
<mjg> vfs: Define usercopy region in names_cache slab caches
<mjg> In support of usercopy hardening, this patch defines the entire cache
<mjg> object in the names_cache slab cache as whitelisted, since it may entirely
<mjg> hold name strings to be copied to/from userspace.
<mjg> i'm guessing 'whitelisted' here means literally zeroed out
<heat> i don't know if it does
<heat> whitelisted here means that you can copy to/from user on these slabs