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
X-Scale has joined #osdev
gioyik has joined #osdev
gog has quit [Quit: byee]
gioyik has quit [Quit: WeeChat 4.3.5]
m3a has quit [Ping timeout: 248 seconds]
m3a has joined #osdev
eddof13 has joined #osdev
Stellacy has joined #osdev
eddof13 has quit [Client Quit]
someguy has joined #osdev
Arthuria has joined #osdev
toyBeaver has quit [Ping timeout: 244 seconds]
Arthuria has quit [Ping timeout: 260 seconds]
someguy has quit [Ping timeout: 245 seconds]
guideX_ has joined #osdev
guideX has quit [Ping timeout: 248 seconds]
andydude is now known as andydude2
gcoakes has joined #osdev
Arthuria has joined #osdev
npc has quit [Remote host closed the connection]
X-Scale has quit [Quit: Client closed]
bradd has quit [Remote host closed the connection]
bradd has joined #osdev
Stellacy has quit [Quit: Leaving]
Stellacy has joined #osdev
heat has quit [Ping timeout: 248 seconds]
sbalmos has quit [Ping timeout: 260 seconds]
Stary has quit [Quit: ZNC - http://znc.in]
CompanionCube has quit [Quit: ZNC - http://znc.in]
Stary has joined #osdev
CompanionCube has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.9.1 - https://znc.in]
MiningMarsh has joined #osdev
Matt|home has quit [Ping timeout: 272 seconds]
osdev199 has joined #osdev
vdamewood has joined #osdev
<osdev199> Hi, while creating the first i/o completion queue in my nvme driver, it is failing with the status code 2 (Invalid Field in Command). I have double checked my commands and still I can't figure out which cmd is invalid.
<osdev199> Here are the commands: https://pastebin.com/PYiL0WJA
<bslsk05> ​pastebin.com: uint32_t cdw0 = 0x00010005; /* cdw0: cid 1, prp used (15:14 clear), fuse nor - Pastebin.com
Arthuria has quit [Read error: Connection reset by peer]
<Mutabah> osdev199: Using qemu?
<Mutabah> I've often gone and read the qemu source to find these issues (and sometimes added/enabled debug prints)
<osdev199> Mutabah: no I'm not using qemu. I'm testing it on my real machine.
<Mutabah> aaah
Gooberpatrol66 has quit [Quit: Konversation terminated!]
opsrcode has joined #osdev
Gooberpatrol66 has joined #osdev
osdev199 has quit [Remote host closed the connection]
osdev199 has joined #osdev
<vin> https://elixir.bootlin.com/linux/v6.10.2/source/mm/swap.c Does anyone understnd how swapiness actually works in linux? Like when does it stop swapping, when the memory pressure is dealt with? even though there are unused pages?
<bslsk05> ​elixir.bootlin.com: swap.c - mm/swap.c - Linux source code v6.10.2 - Bootlin
<vin> I wish there was a forumala for the 'swappiness' knob, that I could do some estimations
GeDaMo has joined #osdev
opsrcode has quit [Quit: Quit]
Stellacy has quit [Remote host closed the connection]
Stellacy has joined #osdev
smeso has quit [Ping timeout: 245 seconds]
smeso has joined #osdev
Stellacy has quit [Remote host closed the connection]
X-Scale has joined #osdev
Stellacy has joined #osdev
goliath has joined #osdev
<azonenberg> Can someone explain to me what ".type funcname, %function" does in an assembly function?
<azonenberg> on armv7-m specifically using gnu assembler
<azonenberg> And why this is necessary to avoid bad code generation at link time for far jumps?
X-Scale has quit [Quit: Client closed]
<Mutabah> Not sure why it impacts the assembler's translation, but it flags that section of the binary as being a function for the executable format's debug info
<azonenberg> Mutabah: well i was getting bad blx instructions if i didnt use it in arm thumb code, but only for far calls
<azonenberg> like, sequences of bytes that i think were supposed to be a blx or a ldr.w
<azonenberg> but actually disassembled as garbage and crashed the cpu with a usage fault
<bslsk05> ​stackoverflow.com: assembly - Bad BLX instruction generated when calling asm function from C function (gcc on STM32H753) - Stack Overflow
<azonenberg> this really seems like it should have thrown an error at link time, i specified -mcpu=cortex-m7 so it should have never emitted an instruction that didn't make sense for thumb2
gcoakes has quit [Ping timeout: 252 seconds]
<bslsk05> ​serd.es: ITCM and veneer adventures
<azonenberg> here's a bunch more details
<Mutabah> azonenberg: I assume you read the answer that explains the need for THUMB code to have the low bit set?
<azonenberg> Mutabah: yes. what i dont understand is why the linker didn't complain
<azonenberg> there should be no situation in which a compiler for a CPU that only supports thumb code would emit a jump instruction to an even address
<Mutabah> It's not a linking problem, it _is_ a change in codegen
<azonenberg> if it sees a situation where it thinks that's the right course of action, something is wrong
<azonenberg> i.e. the correct behavior is to error out rather than silently generating malformed code
<Mutabah> When doing an indirect jump to code - you need to know if that code is THUMB or ARM. By default, an unmarked symbol is assumed to be ARM
<azonenberg> since there is no ISA-legal way to encode the requested behavior
<azonenberg> yes, but again
<azonenberg> if you are -mcpu=cortex-m7 there is no non-thumb support in the processor
<azonenberg> if you think you should be generating arm code, someone screwed up and that should result in a compiler diagnostic not a silent generation of illegal instructions
<Mutabah> ah, linker bug I guess?
<Mutabah> s/linker/compiler-assembler/
<bslsk05> ​<Mutabah*> ah, compiler-assembler bug I guess?
<azonenberg> it would be like trying to use an avx instruction when compiling x86 code with -march=haswell or similar
<azonenberg> if you think that's the right thing to do, it's not possible in your target ISA, therefore you should refuse to proceed
<azonenberg> don't silently generate a binary that will SIGILL
<Mutabah> Kinda, but not quote
<Mutabah> The SIGILL happens _after_ the jump
<azonenberg> as far as i can see that isn't what's happening here
<azonenberg> the jump itself is malformed
<Mutabah> the jump is "valid".... maybe?
<azonenberg> gdb disassembles it as a bfcsel (an armv8 instruction)
<azonenberg> ida dissassembles it as a blx with a nonsensical target outside my address space
<azonenberg> i dont think either is correct, it's simply an invalid/malformed sequence of bytes that isn't a thumb instruction
<azonenberg> 04 f0 1f e5
<Mutabah> TBH, I have no idea what's happening her
<azonenberg> yeah me neither, adding the .type fixes it
<azonenberg> but i cant understand why this wasn't statically caught
<azonenberg> if you need .type on all exported symbols from assembly code, fine
<azonenberg> but that should be enforecd at compiler time, and if the linker is asked to emit a jump to an even address on a thumb target it should refuse
<Mutabah> A guess here:
<Mutabah> The disassembly is wrong, because the disassembler doesn't know that it needs to disassemble as THUMB
<Mutabah> and the UD happens on the jump, because it's trying to jump to non-thumb
<azonenberg> that could be why gdb is doing it wrong
<azonenberg> but i explicitly told IDA this was thumb code (T=1)
<azonenberg> and to disassemble it as such
<azonenberg> so i believe ida's disassembly more
<Mutabah> IDA is a tracing disassembler, so it may make the same mistake
<azonenberg> yes, it had T=0 originally in this code
<azonenberg> i overrode it
<azonenberg> to force it to disassemble as thumb
<azonenberg> anyway, the bad disassembly is an unrelated issue
<azonenberg> generating bad code without an error is what i have an issue with
<azonenberg> this is not the first time that i've written code that was undeniably wrong, but that IMO the compiler should have been able to statically know was wrong and warn/error about
<azonenberg> half the compiler's job is to save me from my stupidity :p
<azonenberg> i opened a bug/feature ticket a while back for gcc failing to warn in a corner case around constructor ordering when using virtual inheritance
X-Scale has joined #osdev
osdev199 has quit [Ping timeout: 276 seconds]
memset has quit [Remote host closed the connection]
memset has joined #osdev
netbsduser has joined #osdev
X-Scale has quit [Quit: Client closed]
jjuran has quit [Ping timeout: 252 seconds]
jjuran has joined #osdev
osdev199 has joined #osdev
node1 has joined #osdev
osdev199 has quit [Read error: Connection reset by peer]
osdev199 has joined #osdev
KitsuWhooa has quit [Quit: Unable to handle kernel NULL pointer dereference at null]
KitsuWhooa has joined #osdev
xenos1984 has quit [Ping timeout: 248 seconds]
Stellacy has quit [Remote host closed the connection]
X-Scale has joined #osdev
xenos1984 has joined #osdev
Left_Turn has joined #osdev
marshmallow has quit [Remote host closed the connection]
node58 has joined #osdev
node1 has quit [Ping timeout: 256 seconds]
flom84 has joined #osdev
sbalmos has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 264 seconds]
X-Scale has quit [Ping timeout: 256 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
node58 has quit [Quit: Client closed]
node1 has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
Stellacy has joined #osdev
bauen1 has quit [Ping timeout: 260 seconds]
bauen1 has joined #osdev
xenos1984 has quit [Ping timeout: 248 seconds]
node1 is now known as recku
osdev199 has quit [Remote host closed the connection]
osdev199 has joined #osdev
xenos1984 has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
flom84 has quit [Remote host closed the connection]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 252 seconds]
recku has quit [Ping timeout: 256 seconds]
guideX_ is now known as guideX
X-Scale has joined #osdev
Turn_Left has joined #osdev
lucyy has quit [Read error: Connection reset by peer]
tommybomb has quit [Read error: Connection reset by peer]
lh has quit [Read error: Connection reset by peer]
noeontheend has quit [Write error: Connection reset by peer]
gjn has quit [Remote host closed the connection]
ursa-major has quit [Write error: Connection reset by peer]
vismie has quit [Write error: Connection reset by peer]
sm2n has quit [Write error: Connection reset by peer]
alethkit has quit [Read error: Connection reset by peer]
pitust has quit [Read error: Connection reset by peer]
xtex has quit [Read error: Connection reset by peer]
asymptotically has quit [Remote host closed the connection]
whereiseveryone has quit [Read error: Connection reset by peer]
hanemile has quit [Remote host closed the connection]
jleightcap has quit [Write error: Connection reset by peer]
ddevault has quit [Write error: Connection reset by peer]
listentolist has quit [Write error: Connection reset by peer]
nagitsu has quit [Remote host closed the connection]
tom5760 has quit [Remote host closed the connection]
exec64 has quit [Remote host closed the connection]
patwid has quit [Remote host closed the connection]
baraq has quit [Remote host closed the connection]
yuiyukihira has quit [Remote host closed the connection]
rselim has quit [Read error: Connection reset by peer]
listentolist has joined #osdev
tom5760 has joined #osdev
patwid has joined #osdev
yuiyukihira has joined #osdev
whereiseveryone has joined #osdev
nagitsu has joined #osdev
ursa-major has joined #osdev
sm2n has joined #osdev
hanemile has joined #osdev
noeontheend has joined #osdev
asymptotically has joined #osdev
lh has joined #osdev
ddevault has joined #osdev
tommybomb has joined #osdev
pitust has joined #osdev
jleightcap has joined #osdev
exec64 has joined #osdev
alethkit has joined #osdev
xtex has joined #osdev
baraq has joined #osdev
lucyy has joined #osdev
vismie has joined #osdev
rselim has joined #osdev
gjn has joined #osdev
guideX_ has joined #osdev
guideX has quit [Killed (NickServ (GHOST command used by guideX_))]
guideX_ is now known as guideX
Left_Turn has quit [Ping timeout: 244 seconds]
spareproject has joined #osdev
edr has joined #osdev
bauen1 has joined #osdev
Gooberpatrol66 has quit [Ping timeout: 276 seconds]
bauen1 has quit [Ping timeout: 245 seconds]
bauen1 has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
toyBeaver has joined #osdev
X-Scale has joined #osdev
Gooberpatrol66 has joined #osdev
gcoakes has joined #osdev
gcoakes has quit [Read error: Connection reset by peer]
gcoakes has joined #osdev
heat has joined #osdev
DanielNechtan has joined #osdev
gcoakes has quit [Ping timeout: 260 seconds]
goliath has quit [Quit: SIGSEGV]
osdev199 has quit [Ping timeout: 276 seconds]
eddof13 has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Arthuria has quit [Ping timeout: 245 seconds]
<toyBeaver> quit
toyBeaver has quit [Quit: leaving]
<nikolar> toyBeaver quit
eddof13 has quit [Quit: eddof13]
<zid> /part and /quit were riding in a boat, but /part fell overboard, who was left on the boat?
<Ermine> /quit
<nikolar> lel
<zid> This next one will either disconnect me for badwords list, or disconnect someone else
<zid> let's find out
<zid> [16:19] #osdev Cannot send to nick/channel
<zid> badwordsed :p
<nikolar> kek
<nikolar> send privately
<zid> can't, have to do discord
<vdamewood> What's the bad word you can't send?
<zid> I can't tell you
<nikolar> he litelrally can't
<zid> It's on the badword list, if you try to PRIVMSG it it just rejects it
<GeDaMo> You have to get evitaerc :P
<mjg> rot13 mofos
<mjg> alternative you encode it
<mjg> Currently Using windows NT
<nikolar> my condolences
<mjg> what is that encoding
<nikolar> today i learnd that glibc has a function called memfrob (memory frobnicate)
<zid> do you know strfry
<zid> that's the other one
<zid> memfrob and strfry are the two meme funcs
<nikolar> lol
<Ermine> yeah just encode this word
osdev199 has joined #osdev
<zid> WDVPIVAlQEFQWzRcUFpYNTQoUF4pN0NDKTd9JEVJQ0FSLVNUQU5EQVJELUFOVElWSVJVUy1URVNULUZJTEUhJEgrSCo=
<nikolar> good old base64
<Ermine> kek
<vdamewood> That's such a naughty word.
<zid> It's a good way to find out if your random chat program that claims to be end to end encrypted is as end to end as they say :P
<zid> it tends to disconnect IRC users, because ssl use is uncommon
<Ermine> my base64 -d got killed
<nikolar> kek
<Ermine> mjg: which Microsoft Windows(c) NT Operating System do you use?
andydude2 is now known as andydude
<zid> They cut from us winning at hockey to show us getting absolutely destroyed by SK at archery, that was nice of them
<nikolar> Lel
<zid> Rudimentary error, facing off against SK at archery
<zid> land war in asia, etc
<zid> woot, scored again, 4-2 to GBR
<nikolar> Who are you hockeying against
X-Scale has joined #osdev
<zid> GBR 5-2 USA
<nikolar> Oh yeah kick the USA in the ass
<GeDaMo> I don't know much about sport but I don't think that's how you play hockey :|
<zid> depends if you wanna win
bauen1 has quit [Ping timeout: 245 seconds]
<zid> GeDaMo: is andy murray scottish again yet?
<nikolar> lel
<GeDaMo> I thought he retired
<nikolar> aren't hockey fights some of the most brutal lol
<nikolar> like one guy got his throat slit
<zid> that's ice hockey
<zid> we wouldn't be beating the US at ice hockey
<nikolar> ah so just hockey then
<Ermine> it's not the winter olympics for ice hockey
<zid> nikolar is serbia, excuse him
<nikolar> good point
<nikolar> we don't do either hockey here
<zid> They don't have games in serbia
<nikolar> we just shoot things very well
<zid> not according to the olympics :P
<zid> we got a gold at it
<Ermine> I have one joke on that but it might be offensive
<nikolar> what do you mean, we got a gold too
<nikolar> Ermine: shoot
<nikolar> (pun intended)
<Ermine> good one
<zid> 10m air pistol mixed gold for serbia, aye
<Ermine> but I'm not sure it's compliant to network policies
<zid> we got one in pew pew guns
ZipCPU has quit [Ping timeout: 252 seconds]
<nikolar> lol pm then
<nikolar> pew pew
<zid> bbc apparently forgot to add pew pew guns to their website though, weird
<nikolar> :(
<zid> Anyway, trap shooting sucks
<zid> you can't see the clay because your gun is in the way
<mjg> Personally, what I advise any application authors I come across is
<mjg> simply tell them to avoid using posix_fallocate(2) altogether; the
<mjg> semantics are totally broken, as is common with anything mandated by a
<mjg> committee that was trying to satify multiple legacy Unix
<mjg> implementations.
<mjg> hue
<nikolar> where's that from
<bslsk05> ​lore.kernel.org: posix_fallocate behavior in glibc
ZipCPU has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
xal has quit [Quit: bye]
xal has joined #osdev
xal has quit [Client Quit]
xal has joined #osdev
xenos1984 has quit [Ping timeout: 264 seconds]
xenos1984 has joined #osdev
bauen1 has joined #osdev
ignucio has quit [Quit: Leaving]
eddof13 has joined #osdev
Yoofie64 has quit [Read error: Connection reset by peer]
Yoofie64 has joined #osdev
gog has joined #osdev
xenos1984 has quit [Ping timeout: 252 seconds]
spareproject has quit [Remote host closed the connection]
theyneversleep has joined #osdev
X-Scale has joined #osdev
xenos1984 has joined #osdev
<heat> mjg, bro fallocate is for losers, ftruncate is way faster
goliath has joined #osdev
<heat> checkmate dumbasses
<zid> woot, tomba remaster is out
X-Scale has quit [Ping timeout: 256 seconds]
eddof13 has quit [Quit: eddof13]
osdev199 has quit [Quit: Leaving]
X-Scale has joined #osdev
<Ermine> and apparently ftruncate is portable?
gorgonical has joined #osdev
<Ermine> I see this as an absolute win
min0911 has joined #osdev
X-Scale has quit [Quit: Client closed]
<min0911> How can I set a page to be non-executable
<gorgonical> shouldn't it just be to set the nx bit in the page?
<gorgonical> assuming x86
<gorgonical> Yeah, for example I have in the SDM vol 3A, 4-16 "Paging" a table 4-9 "Format of a PAE Page-Directory Entry" shows bit 63 as the NX bit
<nikolar> i assume arm also has the nx bit in their page tables
eddof13 has joined #osdev
<gorgonical> Also yes
<min0911> but the nx bit seems not to exist in the wiki https://wiki.osdev.org/Paging
<bslsk05> ​wiki.osdev.org: Just a moment...
<gorgonical> ARMv8-A reference manual, D4-2151 shows an XN/UXN bit in the attributes field for a page descriptor
<gorgonical> min0911: only the manuals are authoritative. Consider the wikis like a blogpost, in that it's partial information filtered through someone's opinion of what's important and/or interesting.
<gorgonical> for further information: a lot of the content on the wiki is introductory or basic. It's not wrong, but you are not going to find a thorough, wiki-fied version of how to rebuild NetBSD from the ground-up explaining all of its design decisions and such
<gorgonical> It *may not* be wrong
<min0911> it seems that the nx bit exists in x86_64 not x86?
<nikolar> i think that's correct
<gog> min0911: XD == NX
<nikolar> maybe i am wrong
<gorgonical> NXE is in the IA32 EFER fwiw, but I'm still looking
<gog> NX is available when PAE and EFER.NXE
<gog> legacy paging does not have it
<kof673> > Consider <everything ever> like a blogpost, in that it's partial information filtered through someone's opinion of what's important and/or interesting.
<gorgonical> good point
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
min0911 has quit [Quit: Client closed]
hwpplayer1 has joined #osdev
m3a has quit [Ping timeout: 272 seconds]
<zid> NX is the top bit in 64bit tables is all I remember
<nikolar> good job zdi
<nikolar> zid
<zid> ty
m3a has joined #osdev
Stellacy has quit [Remote host closed the connection]
Matt|home has joined #osdev
heat has quit [Read error: Connection reset by peer]
foudfou has quit [Remote host closed the connection]
heat has joined #osdev
foudfou has joined #osdev
<Matt|home> anyone here huge sci fi fans? also greetings o\
<mjg> that's unlkely
hwpplayer1 has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<sham1> Hello Matt at home
<nikolar> oi
<Matt|home> o\
eddof13 has quit [Quit: eddof13]
k0valski18891621 has quit [Quit: Peace out !]
eddof13 has joined #osdev
<heat> kernel
<nikolar> KERNAL
<heat> Ermine, i want to be clear and say that ftruncate does not in any way match fallocate's functionally
<heat> twasajoke
<Ermine> ah ok
<heat> ftruncate only adjusts the file size (and free unreachable blocks if required), fallocate can e.g set a size and *actually* allocate space on disk
<heat> or create a file hole in the middle of a file
<andydude> Matt|home: yes
<heat> mjg, does freebsd have a struct path analog? or are vnodes inherently mount-specific?
netbsduser has quit [Ping timeout: 272 seconds]
eddof13 has quit [Quit: eddof13]
<Ermine> til perf understands i915 events
<Mondenkind> fallocate more like phallocate amirite
PublicWiFi has quit [Ping timeout: 245 seconds]
<nikolar> no
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
<mjg> heat: there is no "path"
<Ermine> there's "goal"
<heat> stay_hard(2)
<mjg> besdies the question is wrong
<mjg> indoes are also inherently mount specific on linux mofo
<heat> no
<mjg> it's lack of dentry as a concept
<heat> inodes are sb specific
<heat> dentries are also sb specific
netbsduser has joined #osdev
<mjg> oh right, linux supports multiple mounts
<mjg> forgot about that loller
<heat> there's some funny bzns you need to do on .. because of it, d_parent can't Just Work
eddof13 has joined #osdev
PublicWiFi has joined #osdev
eddof13 has quit [Quit: eddof13]
netbsduser has quit [Ping timeout: 252 seconds]
<Ermine> What's the difference between cpu_atom and cpu_core perf events?
tanto has quit [Quit: Adios]
pie_ has quit []
vancz has quit []
goliath has quit [Quit: SIGSEGV]
heat has quit [Remote host closed the connection]
Turn_Left has quit [Read error: Connection reset by peer]
heat has joined #osdev
netbsduser has joined #osdev
X-Scale has joined #osdev
dude12312414 has joined #osdev
X-Scale41 has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
eddof13 has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
netbsduser has quit [Ping timeout: 252 seconds]
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
eddof13 has quit [Quit: eddof13]
xx0a_q has joined #osdev
xx0a_q has quit [Quit: WeeChat 4.3.5]
X-Scale41 has quit [Ping timeout: 256 seconds]