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
mpetch has joined #osdev
sortie has joined #osdev
sortie has quit [Remote host closed the connection]
sortie has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
Celelibi has quit [Read error: Connection reset by peer]
mpetch has quit [Quit: Client closed]
Matt|home has quit [Ping timeout: 276 seconds]
Matt|home has joined #osdev
guideX_ is now known as guideX
heat has quit [Ping timeout: 246 seconds]
Celelibi has joined #osdev
Turn_Left has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]
housemate has joined #osdev
housemate has quit [Remote host closed the connection]
housemate has joined #osdev
goliath has quit [Quit: SIGSEGV]
emntn has quit [Quit: WeeChat 4.4.2]
qubasa has quit [Ping timeout: 252 seconds]
x64S has quit [Quit: Leaving]
Arthuria has joined #osdev
housemate has quit [Quit: Nothing to see here. I wasn't there. I take IRC seriously. https://files.catbox.moe/4e9k81.pdf]
mpetch has joined #osdev
leon has joined #osdev
netbsduser has quit [Ping timeout: 244 seconds]
craigo has joined #osdev
mpetch has quit [Quit: Client closed]
mpetch has joined #osdev
hwpplayer1 has joined #osdev
hwpplayer1 has quit [Remote host closed the connection]
the_oz has quit [Ping timeout: 260 seconds]
karenw has joined #osdev
craigo has quit [Ping timeout: 248 seconds]
hwpplayer1 has joined #osdev
Arthuria has quit [Ping timeout: 252 seconds]
housemate has joined #osdev
hwpplayer1 has quit [Remote host closed the connection]
housemate has quit [Read error: Connection reset by peer]
emntn has joined #osdev
Gooberpatrol66 has joined #osdev
housemate has joined #osdev
the_oz has joined #osdev
mpetch has quit [Ping timeout: 240 seconds]
lte678 has joined #osdev
housemate has quit [Ping timeout: 272 seconds]
housemate has joined #osdev
Ermine has quit [Read error: Connection reset by peer]
Ermine has joined #osdev
theyneversleep has joined #osdev
lte678 has quit [Remote host closed the connection]
chiselfuse has quit [Ping timeout: 264 seconds]
karenw has quit [Ping timeout: 272 seconds]
housemate has quit [Ping timeout: 248 seconds]
cloudowind has quit [Ping timeout: 272 seconds]
GeDaMo has joined #osdev
cloudowind has joined #osdev
benlyn has joined #osdev
benlyn has quit [Remote host closed the connection]
benlyn has joined #osdev
guideX__ has joined #osdev
guideX has quit [Ping timeout: 252 seconds]
guideX__ is now known as guideX
housemate has joined #osdev
housemate has quit [Quit: Nothing to see here. I wasn't there. I take IRC seriously. https://files.catbox.moe/4e9k81.pdf]
goliath has joined #osdev
netbsduser has joined #osdev
edr has joined #osdev
Dead_Bush_Sanpai has quit [Quit: Dead_Bush_Sanpai]
_ngn has joined #osdev
<_ngn> is there a way to do a long jump using the segment value stored in a register? something like "jmp ax:whatever"?
<zid`> push 0x7202; push ax; push whatever; iretq
hwpplayer1 has joined #osdev
<_ngn> zid`: i see, is it possible to do the same with retf? do we need the eflags?
<zid`> does lret exist? does it exist in long mode? :P
<_ngn> wut
<zid`> looks like it does nt
<_ngn> idk wut your talking abt
jedesa has joined #osdev
<_ngn> ok retf works i think
<_ngn> thank you
Left_Turn has joined #osdev
remexre has quit [Ping timeout: 252 seconds]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
mpetch has joined #osdev
mpetch has quit [Ping timeout: 240 seconds]
mpetch has joined #osdev
housemate has joined #osdev
jedesa has quit [Quit: jedesa]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 246 seconds]
housemate has quit [Quit: Nothing to see here. I wasn't there. I take IRC seriously. https://files.catbox.moe/4e9k81.pdf]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
heat has joined #osdev
mpetch has quit [Quit: Client closed]
remexre has joined #osdev
mpetch has joined #osdev
theyneversleep has quit [Remote host closed the connection]
xenos1984 has quit [Ping timeout: 252 seconds]
xenos1984 has joined #osdev
theyneversleep has joined #osdev
zenmov has quit [Ping timeout: 252 seconds]
zenmov has joined #osdev
Matt|home has quit [Quit: Matt|home]
xenos1984 has quit [Ping timeout: 246 seconds]
zenmov has quit [Ping timeout: 252 seconds]
xenos1984 has joined #osdev
Arthuria has joined #osdev
mpetch has quit [Ping timeout: 240 seconds]
arjun has joined #osdev
arjun has quit [Quit: Leaving]
Arthuria has quit [Ping timeout: 276 seconds]
<immibis> why wouldn't retf work?
mpetch has joined #osdev
hwpplayer1 has quit [Quit: see you later]
Dead_Bush_Sanpai has joined #osdev
Dead_Bush_Sanpai is now known as Qichao_Xiong
Qichao_Xiong is now known as Qichao_Xiong{rm7
Qichao_Xiong{rm7 is now known as Qichao_Xiong
flx has joined #osdev
Qichao_Xiong is now known as Dead_Bush_Sanpai
Dead_Bush_Sanpai has quit [Quit: Dead_Bush_Sanpai]
Dead_Bush_Sanpai has joined #osdev
Arthuria has joined #osdev
mpetch has quit [Quit: Client closed]
netbsduser has quit [Ping timeout: 246 seconds]
cow has quit [Remote host closed the connection]
<geist> lret does exist in long mode
<geist> yeah retf/lret (two different names)
<geist> note in 64bit mode there *is* a `jmp constant:whatever` but it only works on intel hardware
bauen1 has quit [Ping timeout: 276 seconds]
<geist> so even if you have a constant segment to jump to, you still should use lret/retf
<heat> surely you mean ljmp
<heat> we dont speak of intel syntax in this channel!
bauen1 has joined #osdev
netbsduser has joined #osdev
<zid`> intel's manual is insane for ret
cow has joined #osdev
<zid`> it says ret, c3, ret cb (far), ret imm16 c2 iw, ret imm16 ca iw (far)
<zid`> so.. how do you pick between near and far, intel?
<zid`> maybe it says way earlier in a generic manner to postfix opcodes with 'far' in some intro paragraph?
<zid`> nope literally just writes far ret etc everywhere
<zid`> gives 0 hints
<geist> someone at work actually lamented us not using intel syntax in disassembly
<zid`> That's why nasm syntax is a thing, it's what you get if you actually use intel syntax in anger
<geist> i was flabberghasted. i have honestly never actually bumped into someone outside of osdev just learning x86 from the manuals that like intel syntax
<zid`> I like nasm syntax, does that count
<geist> but i guess it probably has to do with if you do a lot of windows programming
<zid`> or just.. don't mess with gnu assembly
<geist> yah
<geist> depends on which side of the world you come from
<zid`> AT&T syntax skews old
<heat> 1337 UNIX HAXXOR vs enterprise win32 developer
<geist> well skews open source unix
<zid`> us zoomers all use intel
<zid`> like I said, old :p
<zid`> rms isn't getting younger, he's bringing the average with him
<geist> i had this whole conversation with someone at work the other day that was just really sitting down and learning x86
<geist> trying to describe the two syntaxes
<zid`> I'd say "I hack on gnu software that uses assembly" is a rare subset of a rare subset
<zid`> compared to say "I write C++ game engine code and sometimes it crashes and I need to read mov eax, [rsi+0x84]"
<heat> AT&T syntax isn't GNU syntax
<geist> i guess you could sort of say it's the syntax that by default a lot of gnu tools use as well as non gnu tools that are compatible with gnu tools (llvm)
Left_Turn has joined #osdev
leon has quit [Ping timeout: 252 seconds]
<geist> and since unixy oses (and some that aren't) use those tool sets they also tend to use those syntaxes
<geist> but really to me it's just some silly detail of x86, which is an architecture that has tons of silly details.
<geist> but when first learning it's a major silly detail i guess
leon has joined #osdev
<heat> well yes but most importantly AT&T syntax is older than GNU
<zid`> zoomers have never heard of AT&T syntax
<heat> i'm pretty sure AT&T syntax was already used by SVR4
<heat> i'm a zoomer
<zid`> spiders heat
<GeDaMo> Damned kids, get off my LAN! :P
Turn_Left has quit [Ping timeout: 248 seconds]
<zid`> GeDaMo how cold is it in lapland today
<heat> spiders? where
<GeDaMo> It's a bit chilly :P
<zid`> heat: gis for spiders georg
<geist> heat: yeah fair point, i was going to make that point but didnt really know for sure
<geist> would be i guess kinda interestig to see where AT&T first showed up
<geist> i'll ask roland at work, he probably remembers
<heat> apparently they tried to port really old UNIX to the 8086 in 78
<zid`> and they got stuck arguing about syntax for the assembler to write first
<zid`> until their mom came home and said "Right that's it, I'm sick of this, we're just going to use VAX syntax"
<geist> well at that point i dont think intel had much of a syntax. and iirc they were litiguous about formats at the time
<geist> hence why z80 for example, being a clone + new features of the 8080 uses a completely different syntax
<zid`> I'm going to say that intel doesn't actually specify a full syntax in their manual to this day
<geist> but that was because a competitor company was doing it, so intel was pissy about it
<zid`> given the far/near/etc stuff being missing, they only publish opcode listings
<zid`> the code samples are purely pseudocode
<geist> side note, i discovered that you can put () around labels in x86 AT&T syntax, which i think is far more readable, and 'fixes' one of the most annoying misfeatres of AT&T syntax, IMO
<geist> ie, `mov foo, %rax` -> `mov (foo),%rax`
<zid`> I discovered that GAS accepts 'dword' as a keyword, and it means '4'
<geist> totally identical, but the latter is at least consistent with all the other addressing modes which involve putting () around the base part
<zid`> someone came in with a bug nobody could find for hours
<zid`> because the like mov esi, dword [edi] or whatever just got looked straight through
<zid`> it turned it into 4[edi] which it turned into 4(%edi)
<geist> a little surprised, figured it'd require a . in front of it
<geist> https://godbolt.org/z/Wc41qoq9x huh it doesn't do exactly what you say, but it actually doesn't complain about the keyword
<bslsk05> ​godbolt.org: Compiler Explorer
<zid`> it doesn't take 4 ptr though, so idk what the hell is going on
<zid`> geist: I think if you link it, it turns into 4
<zid`> cus of some symbol somewhere
<geist> oh sure that's standard syntax
<geist> you can do label(register)
<geist> that's how you get rip relative: `label(%rip)`
<zid`> yea, we figured it out between us
<zid`> explains everything
<zid`> but yea, if it had been exported with address 0 not address 4 nobody would have even noticed :P
<zid`> It'd have just been using the wrong encoding
<geist> but yeah that whole foo(stuff inside, sometimes with commas) is pure DEC
<geist> vax/pdp style
<geist> as well as left to right
<zid`> nod
<zid`> and also the indirect call nonsense too I think
<zid`> they just took the vax assembler codebase, and changed the register names
<zid`> "0.1 of x86 assembler done!"
<geist> yeah *%reg is weird
<heat> i found a weird bug in my kernel. i didn't know this was possible. i thought i was perfect
<zid`> dang heat
<zid`> We're going to have to take you out back and shoot you now
<geist> i guess it's because `jmp (%rax)` would be ambiguous, is it dereferencing the address at rax and then juming to it?
<geist> though i guess `jmp %rax` would be sufficient
<zid`> dw we'll tell everybody else you went to a farm in spain
<heat> i do want to mention that WARN_ON is based and BUG_ON is based and i should get BUG_ON eventually
<heat> crashing is lame
<geist> we did end up adding a WARN style thing in zircon at some point
<geist> an assert style thing that doesn't crash, but we otherwise pick up in our automated testing and generate a report
<zid`> I'd pay so much money for a dmesg for the windows kernal and WARNs
<heat> yeah, BUG_ON is a little more controversial
<zid`> if a piece of hardware starts acting funny you just have to plug it into a linux machine to know what the fuck
<geist> word. when i fiddle with non linux i realize how much we got with dmesg plus all the styff exposed in /proc and /sys
<geist> it's really quite nice
<heat> but i think still okay if you want to get something out of the error/want to sync the filesystems/whatever
<heat> everything is a file btw
theyneversleep has quit [Remote host closed the connection]
<heat> also dont forget ftrace and bpftrace and the tracing subsystem in general
<heat> why write a debugging patch and rebuild and reboot when you can get a bpftrace one-liner to do it for you
<kof673> that's what dtrace was said to be...
<kof673> also: > Damned kids, get off my LAN! <shakes fist at cloud, muttering stream of curses in boomhauer-like/kyle yelling at visitors fashion>
<nikolar> linux masterrace
<netbsduser> zid`: i thought using intel syntax was more of a baby boomer thing than a baby zoomer thing
<nikolar> i am a zoomer and i use at&t
<heat> hi5
<nikolar> ye
<netbsduser> just look at the assembler that has a cult following among predominantly gen x eastern europeans
<heat> intel syntax stans are too busy praying and fasting for intel to reply here
<netbsduser> fasm
karenw has joined #osdev
<Ermine> can confirm that
<cloudowind> happy weekends osdev people
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<the_oz> sockets aren't files unless master race nein plan
<the_oz> neun?
<the_oz> happy now
Left_Turn has quit [Ping timeout: 245 seconds]
<heat> sockets are technically files due to being fds
<the_oz> oh sure except it acts nothing like
<heat> yes it does?
<the_oz> if it looks like notafile
<heat> sockets support every file operation
<zid`> except the good ones
<the_oz> acts like notafile
<heat> it acts 100% like a file
<the_oz> you know how I know?
<the_oz> because I've used ACTUAL socketfies
* zid` ftruncates all of heat's so
<heat> truncation is invalid for a lot of Real Files
<zid`> Real Fake Files
<heat> just because it's a stream of data doesn't mean it's not a file, it's kind of a big deal in UNIX
<heat> see: pipes
<zid`> Everything is treated like a sort of subset of file is just less punchy
<heat> linux pseudo filesystems lie all the time about their sizes too, procfs commonly says 0, sysfs files say 4096
<the_oz> maximal cope
<heat> truncate /sysfs/bus/pci/00:00.0/config makes no sense
<nikolar> loller
<nikolar> you're the one coping mate
steelswords94 has quit [Quit: The Lounge - https://thelounge.chat]
<heat> im watching paint dry
<heat> in the form of building cmake repeatedly
steelswords94 has joined #osdev
<the_oz> what do they prefer you build cmake in? gnu make?
<heat> cmake has a bootstrap script that creates a mini cmake to cmake itself with
<zid`> nice
<the_oz> of course
<heat> they also bundle like... 6 or 7 separate projects
<heat> libuv is a cmake dependency but it builds with cmake :)
<the_oz> damn, I thought they were sensible to solve chicken/egg instead of INTRODUCING it
remexre has quit [Ping timeout: 276 seconds]
<zid`> That's why I keep saying if your project needs cmake, you have to bundle the cmake source and build it with gnu make
abitw has joined #osdev
Left_Turn has joined #osdev
gb_away has joined #osdev
fedaykin has quit [Quit: leaving]
fedaykin has joined #osdev
abitw has quit [Ping timeout: 260 seconds]
chiselfuse has joined #osdev
gb_away has quit [Quit: gb_away]
<nikolar> yuck cmake
<nikolar> good luck
<heat> i have cmake but basically im just stuck packaging a bunch of shit
<heat> i have the cmake rpmbuild practically building
<heat> now im dealing with vim because apparently the cmake package depends on vim indirectly, woooo
<nikolar> why the heck would cmake depend on vim
<nikolar> is it xxd or something
karenw has quit [Remote host closed the connection]
<heat> it installs some vim integration files i think
<heat> packaging is such a mess
<heat> fedora/rhel vim depends on perl, python3, ruby
<nikolar> great
<zid`> have you considered
<zid`> gentoo
<the_oz> vim bindings! which has bindings in every language!
<zid`> you get USE flags
<heat> yeah you have USE flags here too
<heat> well, depends if whoever wrote the specfile gave a shit
<zid`> [ebuild R ] app-editors/vim-9.1.0366::gentoo USE="X acl crypt nls -cscope -debug -gpm -lua -minimal -perl -python -racket -ruby (-selinux) -sound -tcl -terminal -vim-pager" LUA_SINGLE_TARGET="lua5-1 -lua5-3 -lua5-4 -luajit" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11" 0 KiB
<zid`> mine has X acl crypt nls cscope gpm lua perl python racket ruby sound tcl as optional deps
<zid`> what does yours have as optional deps
<zid`> mine isn't even build with perl or python apparently lol
<heat> gui, default_editor, selinux, gpm, libsodium_crypt, netbeans, vimspell, hunspell, lua, perl, ruby, python3
<heat> and i think that's it
<zid`> so why are you complaining, build it without lua perl or ruby
<heat> i am
<heat> just saying it is a packaging mess
<zid`> isn't that.. how packaging SHOULD work?
<heat> core packages depend on core packages that depend on core packages that depend on not-so-core packages
<heat> it is quite literally a cyclic graph
<zid`> my cmake only needs ncurses
<zid`> optionally, lemme see what it needs forreals
<heat> that's because it bundles everything else
<heat> quite literally bundles libuv, a random http library, curl
<zid`> 210 packages
<zid`> ez
<heat> 20 different compression format libraries
<heat> always, randomly, lua
<zid`> gnuconfig, libintl, ncurses, libiconv, openpgp, baselayout, libffi, sgml-common, mpdecimal, python, python, mime-types, autoconf, gperf, root, xattr, re2c, automake, portage, python, c-ares, pkgconf, tzdata, pkgconfig, python, portage, readline, bash, bzip2, bzip2, unzip, gzip, libcrypt, acl, awk, locale-gen, ninja, meson, yacc, docbook, lex, half of perl
<zid`> zlib, xz-utils, libunistring, libpcre2, gdbm, perl, openssl, linux headers, libtirpc, another half of perl
<heat> beautiful
<zid`> zstd, gmp, mpfr, mpc, glibc, libxcrypt, pam, acl, gcc, libidn2, findutils, libcap, gawk, grep, diff, gpep517, autoconf, automake, libtool, tcl, libb2, sqlite, python, flit-core, libxml2, gettext, m4, texinfo, libgpg-error, bison, flex, libgcrypt, lixslt, python, more perl, h2lpman, ninja, 20 more python, sed, ca-certs, make, patch, libseccomp
<zid`> popt, passwd, e2fsprogs, libassuan, rhash, jsoncpp, libuv, sandbox, 10 more python, libksba, npth, nettle, gtk, libpsl, file, rsync, libarchive, pluggy, nghttp2, nghttp3, curl, getuto, gemato, gpgme
<zid`> pretty easy dep chain imo
<the_oz> SPAM
<the_oz> ;_; why do you hate me chain maze minotaur
<the_oz> bramblehedgetreebush
<zid`> for realies though, it seems to need, libarchive, rhash, expat, jsoncpp, libuv, curl, zlib, pkgconfig
<zid`> everything else is a dep of a dep
mpetch has joined #osdev
<kof673> that's a good name, minotaur package manager
<the_oz> you're the minotaur in the maze dependency hell graph
<the_oz> I, etc, we all are ... trapped by it.
<heat> zid`, this spec file also requires xz, zstd, bz2, lzma, cppdap (whatever the fuck that is?), ncurses, sphinx by default, vim, emacs integrations too
<zid`> rip
<heat> X11 if you opt in for cmake gtk (what the fuck is this???)
<heat> not gkt, qt
<heat> even better
<zid`> yea mine has a big block for qt?
Left_Turn has quit [Read error: Connection reset by peer]
<heat> ok vim packaged and built, hopefully this is it