terminalpusher has quit [Ping timeout: 246 seconds]
<kof123>
ACTION stares at PapaFrog, then stares at ancient code and http://wiki.osdev.org/Memory_Map_%28x86%29 0x00000500-0x00007BFF 30464 bytes RAM, guaranteed free 0x00007C00-0x00007DFF 512 bytes where this code is loaded 0x00007E00-0x0007FFFF 492032 bytes RAM, guaranteed free <-- "into memory from 0x10000 to 0xa0000" is that guaranteed free? i see: 0x00080000 0x0009FFFF 128 KiB EBDA (Extended BIOS Da
<kof123>
Area) partially used by the EBDA
<bslsk05>
wiki.osdev.org: Memory Map (x86) - OSDev Wiki
antranigv has quit [Ping timeout: 245 seconds]
netbsduser has joined #osdev
<netbsduser>
is anyone else here targeting the 68k series?
<kof123>
some day i hope to fit into various places, not today: The multi-processor Atari Jaguar console [...] Sega Saturn console used the 68000 as a sound co-processor
<kof123>
i mean, it is more, hopefully can run on limited RAM systems than anything else perhaps
<kof123>
"run" used loosely
antranigv has joined #osdev
goliath has quit [Quit: SIGSEGV]
<PapaFrog>
kof123: Thank you
<PapaFrog>
I guess I am loading 480kB
<netbsduser>
kof123: i have the benefit of mine not being memory-limited
<netbsduser>
128mib of fastram
vdamewood has joined #osdev
<kof123>
well 1) write interpreter 2) ... 3) write drivers 4) write applications that actually do things. maybe will clarify. so 1) does not need any hardware things really, printf is enough lol
simpl_e has joined #osdev
lg has quit [Remote host closed the connection]
Hammdist has joined #osdev
apokryptein has quit [Quit: Leaving]
saberia has quit [Ping timeout: 256 seconds]
netbsduser has quit [Ping timeout: 244 seconds]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TkTech has quit [Ping timeout: 260 seconds]
<Hammdist>
tracked down a difficult bug today. I had a "circular" queue in my code where I accidentally left off the masking/mod operation. at runtime it would overwrite code, but if I enabled assertions everything would work, probably because the critical parts of the code were moved farther from the queue backing array. likewise if I added a uart print
<Hammdist>
statement here or there even with assertions disabled it would appear to work. for a time I suspected a compiler bug, but it wasn't that fortunately
stolen has joined #osdev
troseman has quit [Quit: troseman]
freakazoid332 has joined #osdev
bradd has quit [Remote host closed the connection]
saberia has joined #osdev
duderonomy has joined #osdev
bgs has joined #osdev
stolen has quit [Quit: Connection closed for inactivity]
bradd has joined #osdev
gog has quit [Ping timeout: 240 seconds]
bradd has quit [Ping timeout: 248 seconds]
bradd has joined #osdev
stolen has joined #osdev
TkTech has joined #osdev
GeDaMo has joined #osdev
orccoin has joined #osdev
MarchHare has joined #osdev
zxrom has quit [Ping timeout: 250 seconds]
zxrom has joined #osdev
<PapaFrog>
kof123: The real problem I was having was crossing a 64k boundary.
<PapaFrog>
For some reason, I was overwriting the status code before I saw it.
goliath has joined #osdev
alexander has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
alexander has joined #osdev
[itchyjunk] has quit [Ping timeout: 246 seconds]
[itchyjunk] has joined #osdev
MarchHare has quit [Ping timeout: 246 seconds]
PapaFrog has quit [Read error: Connection reset by peer]
LostFrog has joined #osdev
stolen has quit [Quit: Connection closed for inactivity]
gog has joined #osdev
wootehfoot has joined #osdev
wootehfoot has quit [Max SendQ exceeded]
wootehfoot has joined #osdev
Jari-- has joined #osdev
netbsduser has joined #osdev
saberia has quit [Remote host closed the connection]
saberia has joined #osdev
saberia has quit [Remote host closed the connection]
heat has joined #osdev
<heat>
windows kern
<sham1>
no
<heat>
why
<sham1>
windows bad
<mjg>
no
<heat>
no
<mjg>
windows in on millions of computrs
<heat>
yes
<heat>
freebsd is on no computers
<mjg>
which tautologically means it does not contain crap
<heat>
who's laughing now
<mjg>
ask kazinsal
<heat>
openbsd is on trillions of routers
<mjg>
in fact it tautologically means it is a good product
<mjg>
heat: that was a year ago
<mjg>
heat: now it is on 1 googol
<heat>
oh wow
<sham1>
Oh yes, software quality is a popularity contest
<sham1>
I forgot
<mjg>
ask kof123
<mjg>
ops
<mjg>
ask kazinsal
<mjg>
kof123: sorry mate :)
<kof123>
no i was a sysadmin and programmer once. it is about money and marketing yes lol
<mjg>
what are you now? a manager?
<sham1>
eugh
<mjg>
A DEVOPS?
<sham1>
EUGH
<kof123>
worse...hobbyist lol
<sham1>
Make it stop
<sham1>
Oh, that's fine
<mjg>
on level of disdain you land between a webdev and a manager
<mjg>
so not /worse/ in my book!
<mjg>
you underselling yourself here mate
<netbsduser>
windows has an interesting kernel
<netbsduser>
the windows book is worth reading
<mjg>
that may be true
<sham1>
Oh it's interesting alright, but still, Windows bad
<mjg>
but the usual caveat definitely applies: don't take claims of "good" at great value
* mjg
can point at unix books claiming something is great, when it is not
<mjg>
or at least impying it
<froggey>
ugh.pdf is the only unix book you need
<mjg>
chapter 1: not written in LISP innit
<mjg>
:X
<mjg>
(i promise this was the last time)
<froggey>
lol
<sham1>
ugh.pdf can be both "not written in LISP innit" and "it's not VMS"
saberia has joined #osdev
<kof123>
mjg: that doesn't matter, what is the least pessimal position?
<kof123>
i need to know the ladder here
<kof123>
it would be geezer profiling to only take 3 relative positions, without any scaling of weighting
<mjg>
the real zen is to go be a farmer away from all tech mate
saberia has quit [Ping timeout: 240 seconds]
<mjg>
but if you engage in tech i honestly can't say what is the least bad option
<kof123>
code is data data is code...farming is tech
<Ermine>
gog: may I pet you
<kof123>
(well in this definition, old definition tech was applying area a to area b, cross-field)
<Ermine>
So openbsd has beat java on popularity scale?
<kof123>
to twist around and paraphrase "network" movie, you think they don't pull out their little scales and measure egg efficiency and so forth?
saberia has joined #osdev
<gog>
Ermine: yes
* Ermine
pets gog
<Ermine>
I was one step from petting gpg
<kof123>
somewhere right now, a farmer is examining his flamegraphs
saberia has quit [Remote host closed the connection]
saberia has joined #osdev
saberia has quit [Remote host closed the connection]
SGautam has joined #osdev
<mjg>
ey mofoz, who has a reasonably recent amd cpu and could cpuid for me
<heat>
gog
<heat>
thou ist needed
* gog
prr
<gog>
heat: what
<mjg>
specifically i want to know if it has either enhanced REP MOVSB/STOSB or fast short REP MOV
<bslsk05>
www.itprotoday.com: Inside the Cache Manager | ITPro Today: IT News, How-Tos, Trends, Case Studies, Career Tips, More
<bslsk05>
github.com: darwin-xnu/bsd/kern/ubc_subr.c at main · apple/darwin-xnu · GitHub
<sham1>
Only ponies and userspace have magic
<heat>
nestorr, im not incorrct, darwin shares netbsd's shit, and i don't care about windows
<heat>
windows plays stupid tricks and is slow
<heat>
linux has no tricks and is much faster
<nestorr>
What kind of clown kernel doesnot map memory like its meant to 😂😂😂
<nestorr>
"Sorry i cant map a file here, i am a clown kernel 🤡"
<Ermine>
it news site is the most reliable source of kernel insights
<heat>
i don't get if you're trolling so i'll err on the safe side
<heat>
hi Ermine how are you
<Ermine>
I'm fine
<Ermine>
Want to build onyx, but I need to get home first
<nestorr>
You either map the file or you do something stupid like this: User program requests to write data, you manually iterate over each page in the cache, map that page temporily with special trick, and copy data to or from it, then unmap it
<nestorr>
Its exactly the same like mapping a file for a user except it's in the kernel space
<heat>
and its suboptimal for many reasons
<heat>
and its tricky for many reasons
<heat>
and you don't manually iterate over each page
<heat>
that's not how things work, the fastest page cache out there does not map anything
<nestorr>
If its so suboptimal then Windows and MacOS would not do it
<heat>
mjg, help me
<sham1>
Why would you map a file (a fundamentally userspace concept) instead of a disk block
<nestorr>
File is not a userspace concept
<heat>
they map pages
<heat>
ranges of pages
<Ermine>
how are you heat?
<heat>
im fine
<nestorr>
They have kernel life in Windows as a File and its Section object or on MacOS as a Vnode and its VM Object. I studied them carfully
<heat>
had my first good night of sleep in over a week
<sham1>
Files very much are a userspace thing, an abstraction created by the kernel for the benefit of the user process
<Ermine>
That's poggers heat
<heat>
macOS and windows are high performance kernels and other lies you can tell yourself
<heat>
Ermine, yeah it's cool
<nestorr>
You dont deal with disk blocks anymore because thats a physical block cache which is outdated and has been replaced with virtual-block caching which are aligned with pages
<heat>
algarve was nice but our house sucked and it was much too hot
<heat>
and the bed sucked ass
<nestorr>
sham1: You are incorrect, they are kernel objects both Windows and MacOS
<sham1>
They are kernel objects, sure, but they aren't opaque in the kernel. They represent for example an inode in a filesystem or a handle from FUZE
<Ermine>
It's rather cold where I am so I'd prefer home hotness
<heat>
vilamoura was pretty nice and i instantly wanted to become a brit
<heat>
but i was only there for half a day
<sham1>
A file in the userland is an opaque handle to these kernel objects
<heat>
Ermine, bruv it was impossible
<sham1>
They're not the same thing
<heat>
probably 40-something at night *inside*
wblue has joined #osdev
<Ermine>
Ah, that hot
<heat>
yep
<Ermine>
Brutal
<nestorr>
On Windows the FIle object is opaque outside of IO manager. On MacOS the Vnode is not opaque but both of them you get generic operations like "Read" "Write" "Map"
<nestorr>
Obviously they must be useable by the kernel because how will the kernel load the first process executable. It has no user process yet to do it
<nestorr>
You are arguing something which is not even a argument its just a fact.
<sham1>
A kernel doesn't need to be the one loading the first process executable. Microkernels are a proof of that
<nestorr>
heat: If not by iterating pages or mapping it how does Linux do a write to the file cache.
<sham1>
A kernel need not know anything about files or filesystems
<nestorr>
sham1: I dont care about microkernels, they can load up a module passed by Multiboot for all I care. They have nothing to do with the opearting systems we talking about.
<Ermine>
heat: was it only angarve or the whole Portugal?
<sham1>
Well the operating systems we're talking about suck, yes
<sham1>
That's not exactly news
<nestorr>
And what great operating system that doesnt suck are you thinking about it.
<nestorr>
Does it have a book to learn about it like "OS X Internals" or "Windows Internals"
<Ermine>
heat: was it hot only in angarve or in the whole Portugal?*
<nestorr>
heat: That can not be faster than doing it the normal way with a mapping
<sham1>
No it doesn't
<heat>
sure it can
<heat>
trivially
<sham1>
Doesn't exactly need a book
<heat>
Ermine, oh it was hot all around portugal but algarve is its own beast
<nestorr>
With Windows Cachemanager or MacOS Unified cache the pages are already mapped in the ideal case and may even still be in TLB
<nestorr>
No need to go datastructure diving
<heat>
in the ideal case
<heat>
Ermine, cuz its down there so it takes african/mediterranean temps like crazy
<sham1>
That doesn't prevent Windows nor MacOS from sucking
<nestorr>
sham1: If there is nothing to learn about it from then I cant speak about it
<sham1>
Both are proprietary pieces of crap
<heat>
whereas here around lisbon we also get influence from the atlantic
<nestorr>
Source code is not a replacement for documentation
<heat>
sham1, darwin technically isn't closed-source btw
<nestorr>
heat: In the worst case you can just map them in, it's easy to do
<sham1>
Darwin by itself is also useless
<nestorr>
Its nomore useless than GNU+Linux by itself
<sham1>
Had you said just Linux I would have agreed
<sham1>
But GNU Coreutils make it useful
<sham1>
"
<sham1>
*insert RMS copypasta here*
<sham1>
Or alternatively the stack Android uses
<heat>
nestorr, best case the *mapping* is already there and everything is perfectly faulted in
<nestorr>
Darwin is XNU kernel plus libc plus other corelibs plus all the standards Unix programs like ls, grep, make, ld, wc, and so on
<heat>
average case the mapping isn't there and/or the page isn't there so you end up mapping pages in, touching the TLB and doing a global TLB shootdown over who-knows-how-many-threads
<heat>
worst case nothing is there and it's super slow
<heat>
also most files are read sequentially, no need to keep huge caches in memory
<heat>
mapped
<nestorr>
No need for global TLB shootdown, the cachemanager in Windows 7 and later gates accesses behind functions to check whether there needs to be tlb flush on this CPU for that map region
<nestorr>
Its composed of 256kib windows of files and they are replaced by LRU
<heat>
linux has a very simple logic. O(1) lookup, needs 3-4 pointer indirection, and you're there
<heat>
no tricky page faults, no slow page faults, no TLB fuckery
<heat>
just simple
<nestorr>
Page faults are fast
<heat>
and blazingly fast
<heat>
haha yea sure they are
<heat>
have you profiled?
<heat>
anything?
<nestorr>
I dont profile the kernel
<heat>
you're in no position to debate this then
<nestorr>
What you described is that Linux has to iterate page-by-page through its prototype pagetables for each page of a file to be accessed
<nestorr>
Sorry but I dont want anything to do with this socalled "religion"
<Ermine>
Funny company
SGautam has quit [Quit: Connection closed for inactivity]
<nestorr>
I hate all cults, once my friend was seduced by one, a socalled "church" but in fact nothing but a fraud to thief money and posessions from its victims
<kof123>
read the mt xinu link nestorr, it was a bsd (xinu == unix backwards)
<kof123>
otoh if you are making a bsd joke about "cult" carry on
<nestorr>
So I check FreebSD
<nestorr>
It seems they also use the weird way for cached read and write where they iterate over the VM Object pages
<nestorr>
I dont understand why they would use this when you can just do the easy thing and map views of the file like Windows, MacOS do
nestorr has quit [Quit: KIRC Client 6.0.14]
<heat>
because its worse and slow
<sham1>
Left
<sham1>
They left
Hammdist has quit [Ping timeout: 246 seconds]
eddof13 has joined #osdev
<heat>
right
<heat>
they right
<Ermine>
Oh, I found onyx copy_to_user
<heat>
its PESSIMAL btw
<heat>
i've been meaning to take advantage of my OPTIMAL memcpy_impl stuff
<heat>
just needs the exception handling really
<Ermine>
So far it uses assembly-written copy_to_user_internal
<heat>
oh you're looking at riscv64?
<Ermine>
at x86-64
<Ermine>
I'm not familiar with riscv
<heat>
there's no_internal there
<Jari-->
I have an SSE3 optimized memcpy
<Ermine>
Ahhhh
* Ermine
can't read
<mcrod>
hi
<Ermine>
hi mcrod
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<heat>
rep stosb (%rdi)
<heat>
mjg in shambles
<heat>
anyway why are you looking at that?
<Ermine>
Do you mean c++ exceptions or cpu exceptions?
<Ermine>
I looked at sendmsg
<heat>
those are all cpu exceptions
<Ermine>
Then I scrolled down and saw copy_to_user
<heat>
page faults/GPFs really
eddof13 has joined #osdev
<heat>
yeah sendmsg will use that
<heat>
from_user
<Ermine>
Seems like to_user is in recvfrom
<Ermine>
recvmsg*
<heat>
yep
<heat>
recvmsg will need both actually
netbsduser has quit [Ping timeout: 255 seconds]
wootehfoot has quit [Quit: Leaving]
wootehfoot has joined #osdev
<mjg>
heat: total time it takes is longer than page faults it gnerates
<mjg>
heat: for the kernel build
<heat>
which build?
<mjg>
-j 192
<heat>
ok but that's not the point
<mjg>
this being slow lessens pressure on the stuff which contends in smp
netbsduser has joined #osdev
<heat>
we were talking about the great operating systemzzzzzzzzzzzzz doing page cache lookups using mmap-like shit
<heat>
like UBC does and windoze
<mjg>
oh wait, you asked smoeone else? :d
<mjg>
17:43 < heat> mjg in shambles
<mjg>
17:43 < heat> anyway why are you looking at that?
<heat>
and SVR4
<mjg>
i just came back from afk
<mjg>
i must have misread
<heat>
oh lol
SGautam has joined #osdev
<mjg>
apologies!
<mjg>
(well i don't feel sorry, but it is the custom, innit)
<heat>
friendliest polska
<mjg>
so what is the flame
<heat>
we were flaming about page caches and UBC/windows having mapped windows and page faulting
<heat>
then i self-flamed my crappy copy_to/from_user
<mjg>
oh no
<mjg>
that ubc stuff in *netbsd* is utter shite
<mjg>
they literally temp map pages as needed and tlb shootdown after
<mjg>
:D
<mjg>
as you can imagine it is PESSIMAL af
<sham1>
The guy didn't believe that it's not good
<sham1>
Just kept arguing for it because muh Windows/macos
<mjg>
> 16:43 < nestorr> If its so suboptimal then Windows and MacOS would not do it
<mjg>
i see
<heat>
yes thats why i tagged you
<mjg>
paragons of perfomarnce these two, aren't they
<heat>
<mjg> windows in on millions of computrs
<heat>
<mjg> which tautologically means it does not contain crap
<zid>
The question is, heat, how many chips did you eat this week
<mjg>
someone patched that netbsd thing but i think it is disabled by default
<mjg>
cause of deadlocks vs funny users
<mjg>
[that's the state from 2019, maybe someone fixed this?]
<mjg>
the new me is not going to look at that though
<heat>
zid, some
<mjg>
but maybe heat would check for lulz
<mjg>
it was guarded by ubc_direct or something
<heat>
ok let me check for the lulz
<heat>
71 /* XXX disabled by default until the kinks are worked out. */
<heat>
72 bool ubc_direct = false;
<mjg>
:d
<mjg>
welp
<heat>
the guy mentioned windows plays some tlb trickery there
<heat>
which i wonder if it makes it any more acceptable
<mjg>
we would know what happenes if someone with windows could profile
<heat>
yeah they go play rocket league
<mjg>
must be a genz
<mjg>
good for them!
Hammdist has joined #osdev
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wblue has quit [Quit: wblue]
<clever>
heat: the 8350 is currently on a shelf, i'm debating using it for my nas
<mjg>
you may wonder what's up with the crazy commit count for obsd
MarchHare has joined #osdev
<mjg>
there is one guy spamming one-liners
<heat>
ILLUMOS UBER ALLES
<mjg>
solaris was already a complete system by the time oracle bought sun
<mjg>
so i don't know what are they even changing11
<netbsduser>
i like dragonfly bsd but it did seem to be very much a one-man band for the most part
<heat>
GNU/kIllumos
<mjg>
for any serious kernel stuff it is
<netbsduser>
i understand that dillon himself was solely responsible for instigating most of what makes it unique
<netbsduser>
that sounds like an accusation of criminality
<heat>
arrest dillon
<netbsduser>
but i mean his radical opposition to the trend in freebsd of building concurrency by lots of finely-grained mutexes with intricate ordering, his HAMMER and HAMMER 2.0 FS, etc
<heat>
RADICAL OPPOSITION
<heat>
THESE DARN RADICALS
<heat>
i mean what's the alternative to finely-grained locks?
<heat>
rcu trickery?
<netbsduser>
dillon seems to like replication per-cpu and sending messages across cores to ask them to do the needful, in place of serialisation
<heat>
that's only an option in certain cases
<heat>
also, tricky
<heat>
defaulting to mutexes/spinnies is fine
<mjg>
netbsduser: that's not happening
<heat>
if you need something better, you'll notice
<mjg>
he has spinlocks like everyone
<heat>
is it called mutex_enter?
<netbsduser>
replication has been on the move for decades
<mjg>
i'm confident it will never materialize
<netbsduser>
just look at allocation in most kernels, both at the slab level and at the page level
<heat>
yes
<heat>
heavily used contended stuff needs heavy tricky optimizations
<netbsduser>
bonwick describes per-cpu caches in his paper on vmem which is implemented in netbsd, i think also in linux and freebsd and dragonfly
<mjg>
or RUST
<heat>
and onyx
<heat>
dont forget onyx
<mjg>
per-cpu caching allocations is an idea so pedestrian i find it embarassing there is a paper
<netbsduser>
i need to try rust again some day but i do wonder how well it would mesh with certain elements of my kernel
<heat>
onyx gets more kernel commits than dragonflybsd
<mjg>
heat: that was full repo stats fwiw
<netbsduser>
e.g. the lifetime of a vnode is unusual because when it's about to be unreferenced for the last time, instead of unreferencing it the inactive() vop is called, which may have to e.g. acquire the mountpoint's inode number-to-vnode cache lock and remove the vnode from it
<heat>
>vnode
<heat>
>vop
<mjg>
>net*bsd*user
<netbsduser>
this solution came straight out of the Solaris book
<heat>
this is so BSD im getting sick
<mjg>
this naming is fine bro
<heat>
no
<mjg>
it's the linux one which sucks000rz
<heat>
struct file, struct inode, struct dentry
<mjg>
__kurwa
<mjg>
_____innit
<heat>
d_name
<netbsduser>
linux calls vnodes inodes instead of calling the generic structure something else like the rest of us did
<mjg>
they don't have a separate thing just for vnodes though
<heat>
yeah well it turns out that if your design requires inodes they really are just inodes
<heat>
i don't see how you would stat on a "non-inode"
<mjg>
as in old unixes allocate a vnode and an inode, then point to the latter from the former
<netbsduser>
hp-ux or aix or something like that calls vnodes 'gnodes' and has them also incorporate the incore inode by making them variably-sized
<heat>
what's the ino_t st_ino for taht?
<mjg>
in linux there is one buig allocation
<heat>
good
<heat>
less allocations are good
<mjg>
meh
<mjg>
i mean i mostly agree
<mjg>
but there is a partial point where it made /some/ sense
<mjg>
well they wrote themselves into a corner with fs stacking
<netbsduser>
i am carrying out aggressive refactoring, i wouldn't rule out folding per-FS inode structures into a variably-sized vnode instead
<mjg>
and separate vnode allocs damage control the bullshit
<netbsduser>
i will grant separate spinlocks is a bit nicer
<mjg>
lmao rcu_read_lock
<netbsduser>
on netbsd you create a mutex and depending on whether you specify passive or elevated IPL at creation time it's either a spinner or a sleeper
<heat>
mjg stick your epoch_enter up your *rse
<heat>
WE'RE USING QSBR BAYBEEEEEEEEE
<netbsduser>
rcu patents are now expiring and would be fun to pilfer
<heat>
i implemented them and just LGPL'd it
<netbsduser>
even windows is now reported to have begun experimenting with it
<heat>
that's very risky
<heat>
unless they're willing to also LGPL it
<heat>
(but they're not)
<heat>
hard to know what things are and aren't patented
MrBonkers has quit [Remote host closed the connection]
<heat>
and new ones keep coming out
MrBonkers has joined #osdev
<mjg>
mutexes posing as spinlocks is a braindead solaris-isms
<mjg>
it actively reduces performance
<mjg>
for example in their own code they need 2 atomics to acquire the spinlock
<heat>
pthread_mutex_lock vibes
<mjg>
first is guaranteed to fail
<mjg>
and that's how they know it's a spinlock
<netbsduser>
i have to admit that i don't see the merit of them looking the same
<mjg>
even they had seen the light and added a dedicated entry point for spinlocks
<mjg>
i'm guessing they had to keep the old behavior for compat
<heat>
aren't mutexes larger too?
<netbsduser>
the netbsd manpage does reveal that the alternatively spinner or sleeper mutexes were borrowed from solaris
<netbsduser>
heat: this is something that was bugging me
<heat>
you can implement a simple ticket lock with like, 8 bytes
<heat>
ticket spinny that is
<mjg>
free net and open locking models were taken from oslaris
<netbsduser>
my mutexes are 32 bytes or something like that
<netbsduser>
while spinlocks are word sized
<heat>
mutexes will always be naturally larger
<netbsduser>
i want to add priority inheritance which threatens to enlarge them further
<heat>
you need at least a "word" (smaller will do) + a thread queue (head + tail = 2 words)
<mjg>
i suspect the mixed thing came from how they introduced smp
<netbsduser>
but solaris has turnstiles which i think keeps the mutex small until it's contended
<heat>
that sounds shady
<heat>
i feel like an mjg rant is coming any second now
<mjg>
turnstiles are an ok idea
<mjg>
they just did it poorlish
<mjg>
at least on paper they have priority propagation from userspace locks all the way down to kernel mutexes
<gog>
it's locks all the way down
<heat>
it's gogs all the way down
<mjg>
so in principle they can guarantee there will be prio problems
<mjg>
... except their rw locks break the scheme
<mjg>
and they have other hand-rolled locks which also do it
<heat>
break all the schemes
<heat>
disrupt, do not standardize
<mjg>
the funniest shit in this area is lack of a lock ordering verification tool
<mjg>
freebsd has one
<mjg>
openbsd has one
<mjg>
netbsd has one
<heat>
LINOX HAS ONE
<mjg>
fucking LINUX HAS ONE
<heat>
LINUX LOCKDEP BAEBEEE
<mjg>
but solaris, the supposed multicore king, does not
<netbsduser>
i could use one
<mjg>
hippies in linux have one, but serious engineers in solaris don't
<mjg>
think about it
<netbsduser>
how the times have changed
<netbsduser>
linux torvalds said in 2001 or so that he was opposed to kernel debugger or any other debuggability niceties because it makes the programmers soft
<mjg>
linux is more than torvalds for about 2 decades
<heat>
kernel debuggers suck ass
<heat>
i've never seen a useful kernel debugger
<mjg>
depends when you mean by debugger
<heat>
the freebsd one didn't even work for me
<heat>
could not get input
<netbsduser>
i have been thinking of adding one now that i target amiga 68k
<mjg>
i had great use for post-portem analysis
<heat>
yeah so just fucking coredump
<netbsduser>
the amiga emulators have low-quality debuggers and my actual amiga has none
<mjg>
live debugger? i had 0 use for
<heat>
even gdb falls apart
<heat>
when faced with highly concurrent programs
<heat>
aka a fucking kernel
<mjg>
you can make it work for certain bugs
<netbsduser>
i had a terrible nightmare yesterday trying to boot on my a2000 w/ 68060 for the first time which turned out to be caused by mapping the pages in which page tables are stored as write-back cacheable
<heat>
i've only used it to get backtraces
<netbsduser>
i am always needing to print out the state of objects and such
<mjg>
careful heat, osmeone is going to call you an elitist
<heat>
i am an elitist
<mjg>
are you a gatekeeper?
<heat>
yes
<mjg>
aight
<heat>
you're not a real kernel dev if you know gdb commands by heart
<mjg>
i'm a protected kernel dev
<heat>
you know what I find really annoying?
<heat>
kernel devs and firmware devs that don't know how to write userspace code
<mjg>
millenial humor?
<mjg>
bro fimrware devs don't know how to write any code
<heat>
accurate
<heat>
EFI has a shit printf interface that does not match printf semantics
<heat>
i've warned them that they should change it, they don't really care
<gog>
i wrote my own printf so it's not a problem
<heat>
doesn't help ship products does it
<mjg>
:D
<netbsduser>
uefi almost as controversial as uefa in some communities
<heat>
they were complaining about some warnings and asked me if we could get EFI printf toolchain support
<heat>
like fucking hell
<heat>
are you joking
<heat>
do you know how to print a uefi size_t? a "UINTN"?
eddof13 has joined #osdev
<mjg>
what is their freakin' printf doing
<heat>
YOU CAST TO UINT64 and use %lx
<heat>
YES
<gog>
smh my head
<heat>
LX PRINTS FUCKING 64 BITS
<gog>
i know it's because of microsoft and intel's influence, but they really, really fucked up by not just shipping a libc interface in their official libefi code
<gog>
it would've been so easy
<gog>
the standard was already there
<gog>
maybe less of it than today
<gog>
but still
<heat>
gog have you seen SetMem?
<gog>
yeah
<heat>
it's hilarious
<gog>
it's fuckings tupid
<heat>
huge source of bugs there
<heat>
for the uninitiated, SetMem has the args backwards from memset
<gog>
tbf
<gog>
the ysignal that by rearranging the "set" and "mem"
<heat>
SetMem(VOID *Buf, UINTN Size, UINT8 Val)
<gog>
so you know to reverse order
<gog>
it's simple logic
<heat>
yeah but CopyMem isn't like that
<gog>
i'm joking
<gog>
it's stupid either way
<heat>
i know
<heat>
fwiw the tianocore tree has like 10 different implementations of C intrinsics and standard library functions
<heat>
all of them kinda suck
<gog>
enterprise code
<geist>
yeah they shipped the org chart
<geist>
each team has their own versions
<heat>
oh yes it's all very overridable
<gog>
and none of them talk to one another
<heat>
so you need a PhD in tianocore build systems to know which one you're using
<geist>
hough it all requiring ucs2 probably didn't help
<Ermine>
oh, uefi talks
<geist>
since that probably triggered half the programmers to decide to write their oewn
<mjg>
:]]
<Ermine>
ucs2 == utf-16?
<gog>
not quite
<mjg>
klasik innit
<geist>
gog: see i usd the right one!
<gog>
:D
<geist>
i knew i'd get called out on it if i said utf16
<Ermine>
Why the hell they're using ucs2
<geist>
because MSFT
<Ermine>
when we have utf8
<gog>
and it was defined in like 1997 or smth
<geist>
yah and NT was/is UCS2 based
<geist>
because before utf16
<Ermine>
That almost make me scream
<mjg>
weird, i heard it was utf
<heat>
guy who created IBI (EFI precursor) was an ex-NT dev
<gog>
i think that was before wide charact3er stuff was standard
<mjg>
win nt
<geist>
i see the logic honestly. if you dont need to worry about >64k codepoints (which didn't exist at the time) there is something kinda nice about just ripping off the bandaid and declaring chars 16 bit (or 32bit)
<geist>
mjg: folks tend to toss around ucs2 and utf16 interchangeably, though they're not exactly the same thing
<nortti>
looks like utf-16 was introduced in unicode 2.0 in 1996
<mjg>
if i had to write a graphical program in college i would do something like that
g0shfuckingdarn1 has quit [Remote host closed the connection]
MarchHare has quit [Ping timeout: 245 seconds]
<gog>
yh
linear_cannon has joined #osdev
<gog>
the solitaire game is only draw 1 klondike
<gog>
the one on the exercise bike at the gym is only draw 3
brynet has joined #osdev
troseman has joined #osdev
troseman has quit [Client Quit]
<Ermine>
Situation around those keys is shitty
<Ermine>
In my understanding, either root of trust is read-only and provided by the vendor, and user depends on the vendor
<Ermine>
Or you can enroll your own, you can use any system you want, but those key don't provide any security against adversary with sufficienlty advanced tools (e.g. state adversaries)
Burgundy has joined #osdev
<gog>
all my adversaries are state adversaries anyway