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
ElectronApps has joined #osdev
nyah has quit [Ping timeout: 268 seconds]
<zid> The pleasures of the web being ran on 4 datacenters
<klange> aVoId SiNgLe PoInTs Of FaIlUrE
bauen1 has joined #osdev
mahmutov has quit [Ping timeout: 268 seconds]
* kingoffrance couldnt figure out ZombieChicken, but think he is a zelda3 character now
<dormito> interesting, it kind of looks like the wiki lacks a page on dns (which IMHO is kind of supprising).
<gog> eh i think that goes outside of the scope of osdev
<gog> maybe not entirely because you have to have some way to resolve domain names in your os
<dormito> libc handles DNS requests
<dormito> so I would imagin it would fall in scope
<klange> Network protocols are pretty well documented outside of OSdev.
<gog> just port glibc and call it done
bgs has quit [Ping timeout: 240 seconds]
<dormito> klange: definetly true, but when I'm looking for technical details of some stuff I've found the wiki to often be helpful :). Anyhow time to start reading RFCs
<kazinsal> network stuff higher level than "NIC driver" becomes its own whole field
bgs has joined #osdev
<geist> yah, that being said, the fact that libc contains dns is IMO a huge mistake
<geist> that should be its own lib with its own service, etc. i think the fact that it made it into libc over time was just convenience and a lack of planning at the time
<geist> i dont know what the C or posix spec says about it, if it says it must be present in libc or if it's okay to be a secondary lib
<geist> my guess is there are higher level sockets apis that i just cant think of off the top of my head that do name resolution automatically, and thus must depend on whatever the dns resolver code is, etc
<geist> so you end up with a dependency
<kazinsal> it's not standard in the ANSI C library but it is in POSIX
<geist> also yay macbook came in. nice touch unboxing: opening the lid automatically plays the bing sound and powers on
<klange> I don't believe POSIX actually specifies what library anything appears in, only the existance of particular headers with particular functions.
<gog> could be trivial enough to carve it out then
<clever> klange: some man pages say to add things like -lm
<clever> yeah, `man cos` says that
<klange> man pages are not the same as the POSIX spec, which is considerably more vague.
<kazinsal> yeah I guess you could technically implement the stuff in <sys/socket.h> and friends in a separate library
<geist> yah the fact that libc goes and looks at etc/resolv.conf and whatnot is really lame. IMO dns resolution should IPC over to some service that deals with it
<clever> good point
<gog> yeah keep that mess seperate
<clever> geist: on most modern systems, libc talks to nscd, which acts as a system wide cache
<Arsen> klange: indeed, all of posix could be emulated in libc and still compliant
<geist> and of course lots of systems do exactly that. yah. macos, windows, probably systemd, etc
<klange> Looking at resolv.conf is absolutely not at all in POSIX, as POSIX does not specify the existance of any files and except a couple of things in /dev
<Arsen> clever: that's glibc
<geist> klange: cool. didn't know of resolv.conf was or not
<clever> Arsen: yeah, the glibc implementation of a dns client does that
<kazinsal> yeah glibc is just libbloat.so
<Arsen> geist: systemd indeed does
<clever> nixos also relies on nscd to deal with the dns plugins
<Arsen> via nss-resolve
<Arsen> though the old standard GAI API is frankly garbage
<zid> It is infact, super awkward to have sockets not be able to do DNS though
<klange> POSIX doesn't specify how anything actually exists, just how it appears to work.
<klange> Everything in libc could be a service call through a message passing API, including the math functions.
<zid> it maybe should be such that getaddrinfo does its own local socket to a dns daemon
<zid> but that's not *too* disimilar to how it actually works
<Arsen> dial() is an alright api
<gog> everything could be a service call through a message passing API
<gog> literally everything
<Arsen> not the go version, that one is significantly worsened from the plan9 one
<gog> microkernel gang rise up
<zid> *crickets*
<klange> The spec for getaddrinfo, for example, only mentions DNS as an example of how resolution may happen.
<zid> hence getaddrinfo doing local socket to a DNS daemon
<zid> rather than libc having any actual capacity to do DNS
<Arsen> p9s dial is one of the very few things p9 actually does better
* Arsen raises with the microkernel gang... alone
<zid> but honestly, I wouldn't mind if the OS had stuff for this
<zid> because then you could easily do things like rate limit applications, block them from various ports etc on a much more natural level
<zid> API for 'connections' rather than API for 'sockets', as it were
<zid> thinking like, the windows sound mixer
<Arsen> sockets are connections
<zid> a socket is a type of connection
<zid> not all connections are sockets
<kingoffrance> a series of.....tubes^H^H^H^H^H connections
<Arsen> I can't think of counter examples
<zid> a counter example to a conversation that doesn't happen over a socket?
<Arsen> yeah
<Arsen> or rather, can't
<zid> serial, i2c, files, shared memory
<Arsen> I'm sure many implementations choose not to
<zid> they get turned into sockets which then the application abstracts into a 'connection'
<zid> rather than just turning it straight into a 'connection'
<Arsen> lift those into sockets
<Arsen> I guess I am missing an understanding of the distinction you're wanting to make
<zid> There's a billion programs out there that care deeply about ip, tcp, packets, etc because they're using the bsd socket interface
<zid> when all they end up doing is wrapping that up into an internal api which is more like
<zid> conn_get() and conn_send()
<Arsen> but... that's bsd sockets too
<klange> So, you want everyone to use libcurl.
<Arsen> heck, read and write work on those too
<Arsen> (that's why inetd worked)
<zid> libcurl is http specific
<Arsen> it's not actually
<zid> but it's not too far off the mark conceptually
<Arsen> curl does a looot
<klange> libcurl is absolutely not http specific
<zid> s/specific/specialized
<zid> most of what it cares about is http
<klange> It's not specialized for HTTP either.
<klange> Most of what people _use_ it for is probably HTTP.
<zid> nod
<zid> but yea, something *more* like curl's api and less like 'raw sockets lol'
<zid> and then sysfs or whatever your OS has can give me much better pokeables on each connection
<zid> as normally at best what I get is.. raw socket data, and I have to use something like libpcap and wireshark and shit to reconstruct it into useful data, and wireshark can't *impact* the connection really, just snoop it
<Arsen> that's what nftables are for
<zid> I can ls my files, I can rm them, I can ionice the programs using them etc, best I have for connections is smash it with the giant `tc` hammer
<Arsen> implementing higher level protocols intrinsically in the kernel sits quite wrong with me
<zid> I love tweakables and the lower level the most common api, the worse the tweakables are, basically :P
<Arsen> especially due to tls
<zid> doesn't have to be 'in the kernel'
<zid> see: windows
<zid> where a *lot* of stuff is just through a standard dll injected into every process
<zid> the syscall interface is *very* rarely used and counts imo as a failure of the platform to provide useful high level functionality
<zid> but windows them uses that power to basically hide all the nice tweakables rather than expose them again :(
<Arsen> s/kernel/base system/
<clever> at one time, buffer size checks where done in userland with the dll wrapper
<Arsen> same idea
<clever> and using the syscall directly would let you buffer overflow the kernel
<Arsen> lol
<zid> I'm sure that bug crops up a fair amount
<Arsen> I am currently failing to generally abstract userspace protocols
<zid> also happened on the Wii firmware a lot
<Arsen> it seems more reasonable to expose a standard way to expose tunables
<zid> You have to get people to use your chokepoint if you want the tunables to do anything though
<zid> another good example is that basically every application has to have its own menu for implementing SOCKS
<zid> my torrent client has one, web browser has one, etc
<zid> if I choke them all through a slightly higher level api than 'sockets lol' I can just have a control panel for it
<kingoffrance> choke is another way of saying interceptor pattern :)
* kingoffrance sides with zid
ZetItUp has joined #osdev
bgs has quit [Read error: Connection reset by peer]
bgs has joined #osdev
<kingoffrance> i dont know how i feel, but that seems to be resolv.conf is as well
<kingoffrance> *to be what
jborgner has quit [Quit: WeeChat 3.2]
<kingoffrance> "on a normally configured system this file should not be necessary. the only name server to be queried will be on the local machine, the domain name is determined from the host name, and the domain search path is consturcted from the domain name"
<kingoffrance> you of course still have NIS domain names, or windows stuff, etc. the nice thing about domains is there are so many "domains" to choose from
<kingoffrance> manpage says 4.3 BSD
<kingoffrance> so normally it would "IPC" to local name server
sdfgsdfg has quit [Quit: your partner prefers dildos]
Burgundy has quit [Ping timeout: 256 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
_xor has quit [Read error: Connection reset by peer]
<kingoffrance> then all configuration files are stored in hesiod and call it a day :D
_xor has joined #osdev
Lugar has quit [Ping timeout: 256 seconds]
vdamewood has joined #osdev
<kingoffrance> yo dawg, i heard you like dns so much, i put your resolv.conf so you can dns to dns
<kingoffrance> *put your resolv.conf in dns
<gog> it's name service queries all the way down
<vdamewood> I run a DNS server on my laptop.
<zid> I run a DNS server on a bunch of other people's computers for free, suckers
gog has quit [Quit: byee]
<zid> Guys can we switch to base 13, baker's dozenal
<vdamewood> Uh, no.
<vdamewood> Having a prime base for your counting system is a terrible idea.
<clever> vdamewood: doesnt base7 have the same problem? and i'm pretty sure ive seen base7 used in a few places
<zid> I said
<vdamewood> clever: Yes, it's a terrible idea. I've only seen it in one place.
<clever> remote refid st t when poll reach delay offset jitter
<clever> * .PPS. 1 u 932 1024 377 80.863 2.173 0.756
<clever> vdamewood: ive seen it in at least 2, chmod bits, and the reach field of ntp
<vdamewood> permissions are base 8
<clever> ah right, 0-7 is 8 symbols, damn fencepost errors
<clever> then ntp is also base8, lol
<vdamewood> Yeah, the only place I've seen base 7 is in a conlang and it had an in-universe explanation for being base 7.
<clever> reach is a history bitmap, each bit represents if a poll happened or not, so 376 would mean the last attempt to poll failed, and 375 means 1 poll failed but then one passed
therufuser has quit [Ping timeout: 250 seconds]
ElectronApps has quit [Ping timeout: 250 seconds]
ElectronApps has joined #osdev
pretty_dumm_guy has quit [Quit: WeeChat 3.4]
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
<geist> vdamewood: hmm, what's the one sentence reason why prime bases are a bad idea?
<geist> i'm sure it's just known, but not by me
<vdamewood> geist: There are no non-repeating fractional values.
<vdamewood> Well, except for the ones that are only powers of the base.
<geist> aaah like 1/7th, etc
<vdamewood> Yep, and 1/49, but not 1/3 or 1/5.
<vdamewood> So, you have to balance how many factors you get with how many values you get per digit. More factors is better, but more values per digit isn't. I find 12 to be the best balance of the two.
<vdamewood> 2 and powers of 2 are fine for computers for special reasons, though.
<zid> yea but
ElectronApps has quit [Remote host closed the connection]
ElectronApps has joined #osdev
sdfgsdfg has joined #osdev
ElectronApps has quit [Remote host closed the connection]
lkurusa has quit [Quit: I probably fell asleep (or went out). Who will ever know.]
Burgundy has joined #osdev
srjek has quit [Ping timeout: 240 seconds]
the_lanetly_052_ has quit [Ping timeout: 250 seconds]
[itchyjunk] has quit [Read error: Connection reset by peer]
lkurusa has joined #osdev
lkurusa has quit [Client Quit]
sdfgsdfg has quit [Quit: your partner prefers dildos]
eau has quit [Ping timeout: 256 seconds]
edr has quit [Ping timeout: 256 seconds]
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
paulusASol has quit [Quit: Client limit exceeded: 20000]
eau has joined #osdev
edr has joined #osdev
sdfgsdfg has joined #osdev
lkurusa has joined #osdev
lkurusa has quit [Quit: Textual IRC Client: www.textualapp.com]
the_lanetly_052_ has joined #osdev
ThinkT510 has quit [Quit: WeeChat 3.4]
<klange> hm, I can't seem to find an equivalent in qemu-system-aarch64 of the `info mem`/`info tlb` monitor commands, best I can do is gva2gpa which is... annoying.
paulusASol has joined #osdev
<j`ey> yes I dont think there is one
<klange> I've redone my boot process a bit so that I have a stub ELF that loads at 0x40100000 and does some gnarly page mappings so it can then load the actual kernel off of a fw-cfg entry at -2GB.
<zid> same
the_lanetly_052_ has quit [Remote host closed the connection]
GeDaMo has joined #osdev
ElectronApps has joined #osdev
dormito has quit [Quit: WeeChat 3.3]
ThinkT510 has joined #osdev
amine0 has joined #osdev
<geist> klange: there is not
<geist> i've thought about adding it, but the arm64 page tables are somewhat more complicated, which is probably why no one has written those commands yet
<geist> do you have the page tables working otherwise? using the TTBR1 and whatnot?
<geist> the split page table thing is *really* nice once you get the hang of it. really cleans up an annoying design issue on x86 (and riscv, and 68k, etc)
amine has quit [Ping timeout: 256 seconds]
amine0 is now known as amine
<klange> Yeah I've got basic stuff to do a handful of gigabyte mappings to start putting stuff where I want it to be.
<geist> yah those are nice too
<geist> it's fun to watch someone else bootstrap themselves up on this sort of thing
<geist> and speaking of arm i got my new macbook today
<geist> a few weeks early, which is what i was hoping for
<kazinsal> the M1s are pretty impressive eh
<geist> getting used to the eyboard which has a slightly different key throw, or key spacing or something that's fouling me up a bit
<geist> yah this is a m1 pro, so looks like 10 cores. i'm guessing cores 0 and 1 are the weaker one since they seem to generally sit around fairly utilized when background stuff is running
<geist> they really seem to earn their keep in the system
<kazinsal> yeah, I've just got one of the first gen M1 airs but I noticed the same, the little cores are doing most of the work and the standby battery life is impressive
<kazinsal> think the air's battery is something like 54 Wh and I seem to get about 9-10 hours of active use + a week of standby on a charge
<geist> also since it's a bit over a year in it seems that most of the apps i use now have native arm versions
<bslsk05> ​en.wikipedia.org: Apple M1 Pro and M1 Max - Wikipedia
<geist> yah this is a 2+8 14 gpu variant
<geist> no wait, 2 + 8.16
<kazinsal> the GPU cores are pretty good too
<kazinsal> my 4+4/7 holds a solid 60+ FPS at medium-high settings and native res in League of Legends
<kazinsal> and that's even running through Rosetta
dormito has joined #osdev
<geist> hmm, i forget precisey why i got the 16 vs 14 core variant
<GeDaMo> Is all the RAM on the CPU chip or is some external?
<geist> i think it's either stacked or immediatley next to it
<kazinsal> it's LPDDR5-6400 so it's fast as all get out either way
<geist> i think the m1 pro and m1 max bandwidth is even more ridiculous than the original m1
<geist> somethingl ike 300GB/sec or so
<GeDaMo> " 200 GB/s for the M1 Pro and 400 GB/s for the M1 Max."
<kazinsal> yeah, it's internally like an 8-channel DDR5 bus
<kazinsal> absolute overkill
<geist> yah
<geist> looking back at the anandtech article
<geist> i think there's a question as to how you can actually utilize the 400 from the cpu alone, but apparently they were able to push it north of 250GB from a cpu
<geist> but i thik you can saturate the m1 pro though
<geist> basically the dram dies are right next to it
<kazinsal> dear AMD: please do something ridiculous like this so I can put together a firewall with 400 GB/s of memory bandwidth
<j`ey> kazinsal: or port to arm :P
<kazinsal> I still gotta finish up "port to x86-64"...
<geist> i'm stil pretty fixated on larger page sizes too
<geist> apple is using 16K here, so things get fun
<geist> adn i have to dig up my old chaet sheet: https://newos.org/txt/arm64_pages.txt
<j`ey> and their iommu doesnt support 4k page sizes
ElectronApps has quit [Remote host closed the connection]
the_lanetly_052 has joined #osdev
nyah has joined #osdev
ElectronApps has joined #osdev
gareppa has joined #osdev
gareppa has quit [Remote host closed the connection]
warlock has joined #osdev
dennis95 has joined #osdev
<sham1> That's an odd choice
gog has joined #osdev
Oli has joined #osdev
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
fwg has quit [Quit: .oO( zzZzZzz ...]
dude12312414 has joined #osdev
srjek has joined #osdev
<bslsk05> ​en.cppreference.com: assert - cppreference.com
<gog> star trek reference spotted
Matt|home has quit [Remote host closed the connection]
Oli has quit [Ping timeout: 240 seconds]
Oli has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
ElectronApps has quit [Remote host closed the connection]
Oli has quit [Ping timeout: 260 seconds]
Oli has joined #osdev
[itchyjunk] has joined #osdev
the_lanetly_052 has quit [Ping timeout: 250 seconds]
dude12312414 has joined #osdev
mahmutov has joined #osdev
Matt|home has joined #osdev
pretty_dumm_guy has joined #osdev
Oli has quit [Ping timeout: 240 seconds]
dennis95 has quit [Quit: Leaving]
Oli has joined #osdev
fwg has joined #osdev
[_] has joined #osdev
[_] has quit [Remote host closed the connection]
h4zel has joined #osdev
pyzozord has joined #osdev
<pyzozord> hey, how do daemons work and how are they different from normal processes?
h4zel has quit [Ping timeout: 240 seconds]
Oli has quit [Quit: leaving]
<kazinsal> strictly speaking they're just processes that aren't attached to a tty or similar and just live in the background chugging away. usually they have some IPC mechanism as well for being controlled by an interactive process
<pyzozord> oh so there is no special kernel support for them, they just don't have stdin attached to tty?
<pyzozord> so in that sense are all gui processes daemons?
<kingoffrance> :/
<kingoffrance> a daemon was a messenger/helper "guardian angel" of sorts. ITS had "dragons" SAIL had "phantom". foldoc free online dictionary of computing "daemon"
<kingoffrance> it is more complicated now...
<kingoffrance> because x depends y depends on z ....hence systemd or whatever
<kingoffrance> *depends on
<pyzozord> that was actually another question I had, how do daemons relate to systemd services
<kingoffrance> ^^^
<kingoffrance> i am being vague and handwavey, but yeah thats the thing...roughly different OS, use different words for similar things
<kingoffrance> *different OS, use different words for roughly similar things
<kingoffrance> "server" is perhaps another word
<bslsk05> ​man7.org: daemon(7) - Linux manual page
<kingoffrance> a "server" has "client(s)"
<kingoffrance> yeah, 4.4BSD has daemon(3) function says netbsd manpage
<kingoffrance> i mean, unless someone finds an older use, that seems about as "canonical" as you are going to get
<kingoffrance> "detach from controlling terminal, run in background" uses fork()
h4zel has joined #osdev
<zid> usually you have to mess with the parent process and parent them to /bin/init too as part of some interactions that posix cares for
srjek has quit [Ping timeout: 240 seconds]
h4zel has quit [Ping timeout: 250 seconds]
diamondbond has joined #osdev
terminalpusher has joined #osdev
diamondbond has quit [Client Quit]
h4zel has joined #osdev
mahmutov has quit [Ping timeout: 250 seconds]
CaCode has joined #osdev
<pyzozord> GeDaMo: thanks, that's a great man page
<pyzozord> I need to look at section 7 more
pyzozord has left #osdev [#osdev]
<kingoffrance> ive heard it said apple (launchd i believe) and systemd were somewhat supposedly to be more dynamic. i.e. a web server or database server or what have you, may start up daemons at startup. this is arguably different use case than plugging in a mouse and a daemon starts, disappears when you unplug, things of that nature -- that are more dynamic
<kingoffrance> not arguing for or against that, and perhaps doesn't change what a "daemon" is, just they might come and go more rather than start at boot, restart if dies, always running
<kingoffrance> or: is an inetd service really a server?
<kingoffrance> on-demand, ad hoc "server"
<gog> it's a service server
<gog> or a server service?
<zid> I'm a server servicer
<zid> I remove all the RGB lighting for them
<kingoffrance> if a server falls in a forest, does it make a sound if noone was using it?
<kingoffrance> sound of one heartbeatd clapping
GeDaMo has quit [Remote host closed the connection]
fwg has quit [Quit: .oO( zzZzZzz ...]
fwg has joined #osdev
Teukka has quit [Read error: Connection reset by peer]
Teukka has joined #osdev
sdfgsdfg has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
terminalpusher has quit [Remote host closed the connection]
biblio has joined #osdev
sdfgsdfg has quit [Ping timeout: 256 seconds]
dormito has quit [Quit: WeeChat 3.3]
h4zel has quit [Quit: WeeChat 3.0.1]
dude12312414 has quit [Ping timeout: 276 seconds]
sortie has quit [Read error: Connection reset by peer]
sortie has joined #osdev
fwg has joined #osdev
dude12312414 has joined #osdev
srjek has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
fwg has joined #osdev
dormito has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
biblio has quit [Quit: Leaving]
fwg has joined #osdev
Lugar has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
CaCode has quit [Quit: Leaving]
<klange> github go boom
<gog> website seems to be up in EU
<klange> Consistent 500s here.
kingoffrance has quit [Quit: Leaving]
kingoffrance has joined #osdev
<kazinsal> 500s here as well
<moon-child> works for me signed out, but not signed in
<klange> Similar experience.