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
Likorn has quit [Quit: WeeChat 3.4.1]
Likorn has joined #osdev
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
Brnocrist has quit [Ping timeout: 248 seconds]
Starfoxxes has quit [Ping timeout: 240 seconds]
kingoffrance has joined #osdev
Starfoxxes has joined #osdev
<Griwes> Turns out that spending last late evening on getting shit done on my OS made also able to actually progress on getting shit done for work
<gog> i have not done anything in weeks :D
<gog> p busy with other things and don't really have the wherewithal to code
<Mutabah> Griwes: It gave you the feelgoods to lift yourself out of a funk
<Mutabah> (Well... that seems to happen with me)
<Griwes> Yeah
<Griwes> Just another reason I'll never work for a company that insists it must own all code I write in my own time
<geist> Oh woot getting things done
<geist> Just had a day of meetings today, looking forward to doing some osdev this evening
<heat> i've done a lot of tcp work today
<heat> added ipv6 support, full-duplex connection closing
<heat> now I just need TIME_WAIT, then I'll move on to getting connections
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
Likorn has quit [Quit: WeeChat 3.4.1]
Ali_A has joined #osdev
Brnocrist has joined #osdev
srjek has joined #osdev
gog has quit [Ping timeout: 260 seconds]
elastic_dog has quit [Ping timeout: 248 seconds]
elastic_dog has joined #osdev
<geist> ooooh fun
<geist> whatcha gonna do about the udp4/udp6 and tcp4/tcp6 split?
<geist> trying to unify the code or fork?
<geist> was vaguely pondering the notion of doing it in C++ and using a template specialization to avoid *too* many ifs
<geist> but really depends on what the delta is
<heat_> udp has some templating on the sending side because it's super simple
<heat_> I realised tcp is way more complex and because of that I just eat the if(effective_domain() == AF_INET) do_this(); else do_that();
heat_ is now known as heat
<heat> templating it all would not be fun
<heat> and as far as I can tell, linux agrees with me (udp6 is copied from udp4, but they share most of the tcp and have a tcp_ipv4 and tcp_ipv6)
<heat> the way I designed my sockets, my tcp stack only really needs to branch on sending and calculating the checksum
<heat> i abstract a lot of details with my proto_family (which is implemented by inet and inet6)
<heat> a side effect is that v6's proto_family needs to route a lot of functions to v4 because of the hybrid ipv6 stack
srjek has quit [Ping timeout: 256 seconds]
<heat> i feel like these old rfcs are really hard to read
<heat> very obtuse
<geist> heat: good to know. i honestly haven't really looekd much into it
<geist> may simply be if nothing else because udp is simple enough there's not enough shared code by volume
<geist> but tcp most of the complexity is stuff that's the same since it's far more complex than udp
<heat> yah udp can just be a dumb thing that prepares a udp datagram and sends it to the next layer
<geist> also haven't looked into thed rtails but i guess with lack of fragmentation at the ip level and whatnot things may be different a bit there (with udp)
<geist> right, udp being basically ip + port
<heat> my way of dealing with the lack of fragmentation is that I just don't
<heat> path mtu detection is complicated and I haven't found a non 1500 mtu yet
<kazinsal> iirc PPPoE sometimes uses an MTU of 1492
<geist> yah eactly, because of some vlan stuff. i actually used to have a smaller mtu at my house because of precisely that
<geist> i remember having some problem once with something as a result
<geist> it's because the pipe coming in my house was a vlan + pppoe on top of it
<geist> both of those together chewed up some of it
<kazinsal> PPP over ATM is much nicer because you don't have to worry about that since it uses AAL5, which lets you do variable length packets over ATM cells
<heat> actually pmtud doesn't look that complex
<geist> yah i remember looking into it and that was basically why it was delivered pppoe into the house. the fiber -> ethernet box on the outside of the house was basically deframing ATM and plonking it on an ethernet interface
<geist> it used different vlans because i think there was a possibility of other vlans for video and voice
<heat> i still have a lot on my plate though. basically a decent implementation of rfc793 and then I'll go through 1122 and see what I'm missing
<kazinsal> IP fragmentation is just a nightmare that really only works properly in the context of classic internet protocol end-to-end philosophy
<geist> nice, someone installed some sort of ADT security system on their house and used my email address for notifications
<geist> so i get stuff like 'your upstairs window is open'
<heat> and then all the other rfcs. this osdev thing is hell and will never end
<kazinsal> it doesn't work well with stateless firewalls, it doesn't work well with NAT, it doesn't work well with policy based routing, it doesn't work well with ECMP
<geist> heat: but we like it because we're all masochists
<heat> amen
<heat> "when will you end your OS?" "N E V E R"
<heat> kazinsal, you do need to fragment though
<heat> stupid protocols like udp need it
<kazinsal> and it sucks
<geist> that's a diff of udp6 though right? since ip can do it, you simply return error if you tell it to do something that can't be fragmented?
<kazinsal> when SSLVPNs started using DTLS it became a friggin nightmare
<heat> ipv6 can do it too
<heat> the only difference is that *routers* can't fragment your packets
<geist> hmm, i thought fragmentation wasnt part of the ip layer?
<geist> ah
<geist> but is it assumed to reassemble at the other end as a single udp packet?
<kazinsal> yeah
<geist> you know i guess it has to anyway, because of ethernet level fragmentation/reassembly
<geist> which modern nics do out the wazoo
<geist> so you need at least the ability for things to get fragemented and reassembled there
<geist> and thus there has to be enough infos in the ip4/6 header
<kazinsal> I'm not 100% sure if IPv4 routers are allowed to look at datagrams that need to be fragmented and go "lol do it yourself" and send back an ICMP Fragmentation Needed
<kazinsal> that's what you're supposed to do if DF is set
<kazinsal> but if it's not set I'm unsure as to whether or not that's a legal action
<heat> lets see
<geist> for some reason i'm thinking no, down to some sort of minimum mtu of 512 iirc
<heat> 576 is the minimum mtu for ipv4
<geist> is that with or without headers?
<heat> kazinsal, they're not
<heat> rfc1812 says "Fragmentation, as described in [INTERNET:1], MUST be supported by a router."
<heat> geist, including headers
<kazinsal> unsurprising
<geist> heat: yeah smells like 512 payload plus some overhead of something
<kazinsal> I think 60 bytes is the maximum allowed IP header size
<geist> does remind me i was thinking of implementing SLIP so i can talk to my 68k board
nyah has quit [Quit: leaving]
<geist> which has a second serial port
<kazinsal> 20 bytes + up to 40 bytes of options
<geist> yah 512 + 60 + 4 would get you 576
<geist> maybe the 4 is some sort of slip header or whatnot at the time
<geist> since i think most inter computer interconnects at the time were some form of serial
<kazinsal> yeah, lots of weird little things like that
<geist> or say 2 bytes of length + 2 bytes of checksum + data
<heat> "For example, this size allows a data block of 512 octets plus 64 header octets to fit in a datagram."
<heat> The maximal internet header is 60 octets, and a typical internet header is 20 octets, allowing a margin for headers of higher level protocols."
* geist throws your octets on the ground
<heat> oh no not my octets
<geist> i'm not part of your SYSTEM
<kazinsal> ICMP's minimum header size is 4 bytes
<kazinsal> so that makes sense
<heat> these really old rfcs really insist on the octet thing
<klange> _byte_ isn't/wasn't defined as an octet, and when you're talking about bits on the wire it's important to specify
<geist> yah totally. really important for 9 or 12 or whatnot bit systems
<heat> by 1989 (rfc1122) they kinda gave up
<geist> which does raise the point if you had a non 8 bit multiple system, what was the usual encoding for this stuff
<heat> 18 mentions of octet vs 11 "byte"
<geist> like pdp10 was a big machine with lots of internet stuffs on it. 36 bits
<geist> i had read somewhere that AOL was one of the last ones still using it pretty late in the game (or was it compuserv?_
<geist> )
<geist> i vaguely remember at Danger we had some trouble talking to the AOL instant messenger servers for our whole proxy thing for the Hiptop
<klange> depending on how late in the game, compuserv _was_ AOL
<geist> because turns out i think we were talking to some sort of bespoke user space net stack they were running and our Solaris machines were having trouble with their tcp/ip 'stack'
<geist> but they weren't used to holding network connections to peer servers outside of their cluster
<geist> so even by the early 2000s they were still using TOPS-20 or something like that
<kingoffrance> ^ yeah you can research where early tcp started, what os and machines
<kingoffrance> or precursors perhaps, dont know details
<kingoffrance> "testbeds"
<kingoffrance> they couldve called them dollars, pieces of eight
* kingoffrance gets yanked off stage by cane
<geist> make sure you tip the staff
<geist> randomly rediscovered this: https://despair.com/collections/all i love these
<geist> i always think about the meeting one all the time https://despair.com/products/meetings
<heat> haha i love it
<klys> so I am now curious about doing math with tables (for example a ~1kb trig table that translates fixed point radians to sin/cos), or 1/x tables, or larger mul/div tables, and am curious if anyone here has seen such tables smployed in code
<heat> >math
<heat> >tables
<heat> that's my cue to leave
<heat> screw dem tables
<klys> pretty sure that's how your fpu does trig, with a hardwired slide rule
<Mutabah> I've definitely heard of the concept
<geist> i think it was super common in the day to precompute sin/cos to say 1000 units (or 250 and mirror) and then just lerp between
<Mutabah> ^
<geist> for games and whatnot where it's not that important it be super accurate, but fast
<geist> x86 cpus at least that implement them in hardware (dont think any other modern cpu has trig functions in hrdware) i think use a combination of tables + an interative method
<klys> so actually may be looking for examples of such tables
<geist> was thinking a bug in one of the tables was part of the pentium debacle?
<klys> ah familiar
<geist> ah yes, FDIV. something to do with some internal look up tables https://en.wikipedia.org/wiki/Pentium_FDIV_bug
<bslsk05> ​en.wikipedia.org: Pentium FDIV bug - Wikipedia
heat has quit [Ping timeout: 260 seconds]
<geist> might be interesting to see if someone did a deep dive of precisely what that algorihm was
<geist> heh i wonder if pentiums with the bug are collectors items now
<bslsk05> ​www.rcollins.org: P54C Erratum 23 (FDIV bug).
Ali_A has quit [Quit: Connection closed]
<geist> yah i remember at the time it was basically a non issue for the vast majority of people, but intel botched it and turned it into a much bigger issue
<klys> well the author of this got me going on it: https://i.imgur.com/i23i7St.mp4
<bslsk05> ​'Imgur' by [idk] (--:--:--)
<bslsk05> ​web.archive.org: BYTE.com
<klys> there's a plot of the results of intel's fdiv bug
<geist> yep
<geist> ah that was back when byte magazine was actually a thing and was good
sicrs has joined #osdev
sicrs is now known as stosby
<klys> if you were using a lib for fixed point math, I'm sure you would expect the author to provide a tool to generate the table, when compiling the lib
Burgundy has joined #osdev
stosby has quit [Quit: WeeChat 3.5]
Ali_A has joined #osdev
<klys> check page 269/278 for sure
zaquest has quit [Remote host closed the connection]
fwg has joined #osdev
zaquest has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
Ali_A has quit [Quit: Connection closed]
Burgundy has quit [Ping timeout: 276 seconds]
bliminse has quit [Quit: leaving]
meisaka has quit [Ping timeout: 250 seconds]
meisaka has joined #osdev
xenos1984 has joined #osdev
meisaka has quit [Ping timeout: 260 seconds]
meisaka has joined #osdev
haliucinas has joined #osdev
Likorn has joined #osdev
eroux has joined #osdev
eroux has quit [Client Quit]
haliucinas has quit [Quit: haliucinas]
haliucinas has joined #osdev
eroux has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
meisaka has quit [Ping timeout: 276 seconds]
meisaka has joined #osdev
fkrauthan has quit [Ping timeout: 272 seconds]
fkrauthan has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
pretty_dumm_guy has joined #osdev
bgs has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
bgs has joined #osdev
<mrvn> When you have encapsulation, like pppoe, the mtu can get smaller so the encapsulated frame is still 1500 byte. The problem with pppoe is/was that the commercial routers did NOT do fragmentation. So any frame over 1492 byte got just dropped. So under linux you would clamp the IP mtu discovery to the physical MTU of the ppp0 device (1492) forcing servers on the internet to never send you too large frames.
<kazinsal> rewriting my internal API standards etc before I get too deep into porting/adapting/rewriting my kernel as a 64-bit portable one. think I'm still going to keep the PfxOperationObject format for function names as I rather like it
<mrvn> PfxOperationObject format?
<kazinsal> the Windows API function naming convention with a 2 (if possible) letter prefix, then a verb-noun function description
<j`ey> NetTransferIPv4
<j`ey> BlkSubmitSCSI
<kazinsal> DbgCrashSystem
<j`ey> idk if they're correct examples :P
<mrvn> Pfx, Net, Blk? I count 3 there, not 2.
<kazinsal> the original intent in the Windows API was to always use two letter prefixes like Mm or Ke or Io or Ps
<mrvn> By the way, the vowel shortness of the last millenium has past.
<mrvn> I would probably call the functions: Net::IPv4::transfer, SCSI::submit_block
<mrvn> or Block::SCSI::submit
<kazinsal> that would require using C++ and I am not using C++
<kazinsal> or I suppose Rust uses that notation but I do not know Rust
<mrvn> ahhh, namespaces, the best thing since sliced bread.
rorx_ has joined #osdev
rorx has quit [Ping timeout: 256 seconds]
amit1 has joined #osdev
rorx_ is now known as rorx
amit1 is now known as dayimproper
<geist> because __func__ wasn't already long enough
<kazinsal> also think I'm going to still aim to write a companion design and architecture book to go with the system so I have two reasons to finish and release it ;)
Jmabsd has joined #osdev
<Jmabsd> Guys, on ARM, can you set the page size to a really small value like 128B or 64B?
<mrvn> nope
<Jmabsd> what's the smallest? on Intel apparently there's a trick to get 128B
<mrvn> 4k
<Jmabsd> aww :-( on intel the trick is EPT
<mrvn> European Poker Tour?
<kazinsal> Extended Page Tables
<kazinsal> basically intel's implementation of nested paging
<mrvn> how does that get you below 4k page size?
<kazinsal> it includes a sub-page RO bit thing that lets you split a 4KiB guest page into 128-byte subpages for toggling R/W access
<kazinsal> it's not a full implementation of sub-4KiB pages but it gives you more granular access control
<kazinsal> I don't believe it incurs any translation penalty either
<mrvn> ARM lets you have smaller page tables though.
<mrvn> it's actually kind of screwy with the second level page tables being 1k in size.
xenos1984 has quit [Ping timeout: 248 seconds]
gog has joined #osdev
pretty_d1 has joined #osdev
pretty_d1 has quit [Client Quit]
pretty_dumm_guy has quit [Ping timeout: 276 seconds]
pretty_dumm_guy has joined #osdev
Likorn has joined #osdev
GeDaMo has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
pretty_dumm_guy has quit [Ping timeout: 248 seconds]
pretty_dumm_guy has joined #osdev
Jmabsd has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
Burgundy has joined #osdev
xenos1984 has quit [Ping timeout: 250 seconds]
nyah has joined #osdev
alpha2023 has quit [Quit: No Ping reply in 180 seconds.]
alpha2023 has joined #osdev
dennis95 has joined #osdev
pretty_dumm_guy has quit [Ping timeout: 260 seconds]
grange_c has quit [Quit: The Lounge - https://thelounge.chat]
pretty_dumm_guy has joined #osdev
pretty_dumm_guy has quit [Ping timeout: 276 seconds]
pretty_dumm_guy has joined #osdev
<j`ey> why does ldd show 'not a dynamic executable' but file says its dynamically linked?
<clever> j`ey: is it for the right arch?
<clever> [clever@amd-nixos:~]$ file result/bin/hello
<clever> result/bin/hello: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /nix/store/r2lmrk1l3pxb8ivx2yhnhxas7nqxd3vh-glibc-2.33-56/lib/ld-linux-aarch64.so.1, for GNU/Linux 2.6.32, not stripped
<clever> [clever@amd-nixos:~]$ ldd result/bin/hello not a dynamic executable
<clever> i can reproduce the error when i try to ldd an aarch64 on an x86 system
<j`ey> that's what I was originally thinking, it seems to be in the sysroot so it should be fine..
<clever> the thing with ldd, is that it works in an incredibly non-obvious way
<clever> ldd is a bash script, that runs the host ld-linux.so on the target binary, with a magic env var set
<clever> so in my case, it ran an x86 ld-linux.so on an aarch64 elf binary
<clever> [clever@amd-nixos:~]$ LD_TRACE_LOADED_OBJECTS=1 ls
<clever> this is the magic variable, and uses the correct ld-linux.so, from the elf headers of ls
ckie has quit [Quit: off I go~]
<j`ey> well I guess I believe file/readelf then!
<clever> readelf can also print the DT_NEEDED
ckie has joined #osdev
<clever> the main thing ldd is throwing into the mix, is actually searching for the needed libs, recursively, using the host path
<j`ey> lol I get a segfault when using LD_TRACE_LOADED_OBJECTS=1
Dyskos has joined #osdev
<j`ey> I was trying to build a dynamically linked aarch32 binary to run on aarch64, but of course now I need a 32 bit ld-*.so
<clever> ahhh
<zid> nm works in a sane way at least :P
srjek has joined #osdev
<mrvn> ldd can also execute code so it isn't exactly save.
<mjg> it will do it by default
Likorn has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
elastic_dog has quit [Ping timeout: 248 seconds]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
zid has quit [Read error: Connection reset by peer]
Likorn has joined #osdev
zid has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
<gog> mew
heat has joined #osdev
ns12 has left #osdev [bye]
xenos1984 has joined #osdev
dennis95 has quit [Quit: Leaving]
xenos1984 has quit [Ping timeout: 256 seconds]
mahmutov has joined #osdev
mahmutov has quit [Client Quit]
mahmutov has joined #osdev
simpl_e has quit [Remote host closed the connection]
simpl_e has joined #osdev
janemba has quit [Ping timeout: 260 seconds]
srjek has quit [Quit: Leaving]
janemba has joined #osdev
Likorn has joined #osdev
srjek has joined #osdev
dude12312414 has joined #osdev
srjek has quit [Ping timeout: 260 seconds]
sonny has joined #osdev
kingoffrance has quit [Ping timeout: 260 seconds]
janemba has quit [Ping timeout: 256 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
xenos1984 has joined #osdev
sonny has quit [Remote host closed the connection]
sonny has joined #osdev
dude12312414 has joined #osdev
* geist pets gog
* gog prrs
* mjg suggests you guys get a room
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<zid> I think you two should split up for a bit, don't worry it will only make your relationship stronger I'm sure
sonny has quit [Ping timeout: 252 seconds]
GeDaMo has quit [Remote host closed the connection]
mahmutov has quit [Ping timeout: 276 seconds]
* geist throws a tantrum
* dminuoso catches it
<geist> today is oneo f those days where i have been failing to adult
<geist> gotta get my shit together and try to recover the afternoon
<psykose> nah
<psykose> just need more pets
<mjg> getting shit together is for the weak
<mjg> take a nap instead
<geist> okay, so 3rd day of testing crashy server: removed 10gbe card, ran it for 36 hours, eventually crashed
<geist> so it's not the presence of the card
<zid> I've got a small cough
<geist> will probably switch back to the old vid card next
<zid> but a small cough in the way that I know when I wake up tomorrow it will be a terrible cough
<zid> that hurts
<geist> ugh coughs are the worst
<zid> so I've got that going for me, which is nice
<geist> re: small page sizes from before, the smallest i've seen in reasonably modern hardware is 512 bytes. that's what the VAX does
<zid> You just need to stretch reasonably modern
<geist> as a curio at least. 4K seemed to generally become the defacto standard in the early 80s, more or less simultaneously by second generation paging systems
<geist> oh i think it's reasonably modern. 1977, just before the era of x86 and 68k
<zid> So reasonably modern as in, relative to humanity
<zid> rather than say, iphones
<geist> and they were clearly inspired by it since it was the defacto standard for paged big systems in the early to mid 80s
<geist> fine anyway. 512 bytes. there ya go
<zid> 512 seems nice
<zid> it's small enough that you could just.. allocate right out of it
<geist> seems reasoably sized for machines of the era at least. where say 4MB of ram was a pretty serious machine
<zid> with a gig of ram, 512 bytes is a really nice granularity for malloc blocks imo
<geist> 4K paging you only have 1024 pages in that case
<zid> go for a super thin OS that just uses the page tables directly :P
<geist> vax page tables were interesting too: allocated linearly. no indirection, simply 0-N entries, where you can dynamically set N in the control register that sets the base
<geist> so based o how big your process is you picked an N
<geist> so i think when systems started getting biggr and bigger in the 80s, where say 128 or 256MB was starting to become more normal on a big VAX that was starting to get pretty large
<geist> what i dunno is if vms or unices at the time on vax had some sort of notion of how big the process was, or if it was expected that the kernel would grow the page table over time by spilling over and then needing more of it
<jimbzy> Alo
<geist> hiys
<jimbzy> Just got back from an eye exam and my vision is a little wonky from the tests. "Stare into the camera flash!"
<geist> oh yeah
<geist> reminds me, i need to set up an appointment too. about that time
<jimbzy> Yeah, I try to get mine done every 1-2 years depending on how the glasses hold up. Everything was just about the same, but my near-sightedness improved a bit.
<geist> yeah sadlky i've hit the age where my eyes are progressively getting worse every year
<geist> the doc said last time that sometimes that stabilizes after a few years, but so far nope
<jimbzy> Mine go a little bit each year, too, but it as actually slowed down in recent years.
<geist> now i an fairly strongly far sighted
<geist> not toooo bad for getting around, but can no long focus on any detail, especially up close
<jimbzy> Thank Odin for polycarbonate lenses, amiright?
<geist> i guess nice thing is if i squint really hard i can focus on something up close, so worst case if i lost my glasses or something i could survive for a while, just not productive at any computer tasks or whatnot
<jimbzy> I can read fine without my glasses, but everything past about 2' is a blur.
<geist> like i'd need to lean in and put my eye like 4 inches from the screen kinda squint
<jimbzy> That wouldn't be much fun.
<jimbzy> I wore contacts for about a year and it was too weird for me not having my vision framed.
<geist> yah strange huh? i'm thinking about fiddling with contacts again this year
<geist> that's the oddest thing is suddenly having this peripheral vision your brain has otherwise just filtered out
<jimbzy> Haha yep.
<jimbzy> Driving was the worst. Like everybody was gonna hit me.
<heat> lasik?
<sbalmos> ah yes, early middle aged eyesight plateau. not fun.
<jimbzy> That would be even worse imo. I've been wearing glasses since I was like 8 years old.
<geist> sbalmos: yep and i ws already farsighted, so i started falling off that plateau about 6 years ago and it just gets worse and worse
<geist> the doc things i might hit the bottom soon but dunno
<sbalmos> lasik still makes me pause. everyone who sits at a screen almost all day and got lasik done always ended up with far worse dry eye condition, etc
<zid> do it in one eye
<sbalmos> I'm on year 3 of about 5 or so plateau-wise
<zid> wear an eye-patch at work if you end up needing to
<geist> alas can't do much with lasik for far sighteness
<heat> sbalmos, hm really?
<zid> yea it's one of the known complications I think
<zid> dry eyes
<jimbzy> How old if you don't mind sharing? I just turned 39 two days ago.
<sbalmos> zid: personally I can't do that. almost certain that would disqualify my medical clearance for my pilot's license.
<geist> that being said i've talked to mutiple folks that had lasik and i think everyone had pretty good things to say
<sbalmos> jimbzy: I'm 40 in less than a month. ;)
<zid> sbalmos: Oh, two eye-patches then.
<geist> yay oldies!
<sbalmos> zid: oh, well, flying fully on instruments. I like!
<heat> "Although it is usually temporary, it can develop into chronic and severe dry eye syndrome. Quality of life can be severely affected by dry-eye syndrome."
<heat> that sucks
<zid> Just train your inner ear, that's never a failed a pilot before and made them nose hard down
<jimbzy> Yeah. I figured it was around there.
<sbalmos> My eye doc says I'll be transitioning to bifocals by 43
<geist> i was actually wondering this: if you have bifocals (top is distance, bottom is for reading) how does one operate the switches and whatnot on top of an airplane cockpit?
<jimbzy> That reminds me of Dewey Cox learning to play guitar by ear since he was smell-blind.
<geist> or do pilots wear different types of bifocals for that situation?
janemba has joined #osdev
<geist> i have the problem that there are a few lights on the top of my subaru for control random stuff and i can't focus on them at all
<sbalmos> geist: no real idea, probably trifocals but with two strength
<zid> crash into the ground, I think, geist
<geist> yah maybe a third zone on the top of the lens
<sbalmos> geist: middle would be distance, but low and high would both be the near strength?
<geist> yah dunno
<zid> cylindrical lenses
<zid> so just pretend you have astygmatism
<heat> reject vision
<sbalmos> zid: Is that why the Flight Management System keeps screaming "Retard! Retard!"
<geist> sbalmos: also 43 is about when i started bifocals
<zid> sbalmos: no, that's because I keep pressing the wrong buttons
<sbalmos> zid: no comment
<geist> maybe a couple years earlier. it's not too bad, but it takes a few weeks to get used to. amazing what your brain can filter out once you let it get used to it
<jimbzy> Are they invisible line ones?
<geist> yah it's a smooth progression
<geist> but i *do* find myself doing the old person thing of tilting my head around a lot more
<jimbzy> Yeah, my MIL has those and I thought it was pretty slick.
<geist> but most of the time i am wearing a second set of computer glasses, set with a fixed focal distance of about 20"
<sbalmos> geist: don't worry about it until you've gone full-snobbery raising head and looking down your nose at something
<geist> and they're fantastic
<sbalmos> ;)
<zid> geist: I picture you as an old man looking down at his fancy electronic telephone screen at arm's length while peering down his nose
<sbalmos> zid: dammit!
<geist> sbalmos: yah alas that's precisely what you end up doing, but it's not beacuse you're a snob, it's because your glasses make you do that
<jimbzy> What's wrong with that, zid?
<zid> do you think something's wrong with it?
<sbalmos> geist: I'll stick with snobbery. Better fits my snarky smartass personality at work. ;)
<geist> noice
<jimbzy> Hell no. I do it quite a bit myself when my lenses have gone full-dark outside
<geist> but yeah with the bifocals you dont have to hold it at arms length at least, but you do have to hold it down
<zid> sbalmos: You're still flying one of *those*?
<geist> the part that was hardest to get used to with bifocals is stairs
<zid> I'd make a great elistist, the problem is just the trivial fact that I don't know anything
<sbalmos> zid: yer darn tootin'! I reckin'...
<geist> that takes a while to get used to. the first few timse you'll feel like you'r going to teeter off into a void
<Griwes> It's amazing what the brain can get accustomed to, whenever I get new glasses it takes me a couple of days to get accustomed to the warping of vision at the edges, but then at least a couple of weeks after that to get accustomed to *not* having the new warping when I take them off
<geist> precisely
<jimbzy> That's how i was with contacts. It was just like "Why is this all so clear!?!"
<zid> I mean hell, after a few days you can completely flip your vision
<geist> only bummer is when you get headaches or whatnot for a whie, but that usually goes
<zid> upside down mirror glasses
<sbalmos> ironically I can see and perceive the lense distance when I'm wearing my glasses vs contacts
<zid> Do you guys see things like a 3D movie
<geist> what i dont understand is if/how they do bifocals with contacts
<zid> with red and blue separation around everything
<sbalmos> geist: different power per eye
<zid> vary the material same as regular lesnses
<zid> ?
<geist> i vaguely remember different per eye
<geist> and alas i dont think that'll work for me, because my left eye sucks balls
<jimbzy> No, but I also can't watch 3D movies without getting a massive headache.
<geist> basically lazy eye, but not in the looks off into the corner thing
<Griwes> I should try contacts at some point
<zid> That has a name I asked someone
<geist> but because it's so much worse my brain doesn't really 'use' it
<Griwes> Even if just to see how different they are
<zid> but I forget what they answered
<sbalmos> geist: yeah that's the interesting part in the next few years. my left eye is horrific. neither one is *bad bad*, but the left is comparably much worse. And astygmatism.
<geist> right
<geist> i have an eye patch that i fiddled with for a while, covering my right eye
<geist> but i think you have to do that seriously for like months to maybe see some sort of improvement
<zid> one of my eyes is marginally worse than the other, but neither bad enough to warrent mechanical assistance
<heat> argh matey
<zid> unless it's a mech suit
<zid> I'd always opt for an evangelion if given the chance
<sbalmos> I'll go for the nano-screen contacts that're bluetooth'd to the phone or my PC
<geist> alas gotta start the meeting train today
<geist> see yas!
<zid> geist always meeting trains, I think he might be an anorak
<sbalmos> Abandon all hope, ye who enter
<zid> especially with those lenses he wears
<Griwes> Hmm, I used to be able to see a color perception difference between my eyes, but I don't think I can anymore
<zid> one of my eyes has a different whitebalance to the other
<geist> very high index lenses can sometimes have a prism effect, but i think they're pretty darn good now
<zid> paper looks a slightly different shade eye to eye
<jimbzy> I don't actually know what the deal is with mine. I think it has something to do with CI if I'm not mistaken.
<geist> can only see it mich f you look at a point light in a very dark light
<Griwes> I definitely had my weaker eye see bleaker colors at some point. Not massively, but bleaker, and also without glasses
<geist> i have seen stuff like a single tricolor led across the room in a dark room appearing to move substantially when displaying red green blue
<geist> but especially red and blue. presumably that's some sort of effect based on the light bending differently
<zid> chromatic abberation
<zid> and yea, it's the mismatched focal length
<zid> because of the prisming
<geist> right
<zid> blue already doesn't focus correctly in our eye
<geist> anyway off to meetings
<zid> Blue seven segment LEDs are damn near impossible to focus on
<jimbzy> Cheers, geist
<sbalmos> I'm about to wrap up for the day. then PIC season finale (ugh, from what I've read) and SNW ep 1
<zid> The PIC season finale is when you finish all the soldering?
srjek has joined #osdev
<sbalmos> it's when Professor Q reveals his latest lesson to humanity
<zid> I still have no idea what PIC is in your context fwiw
<heat> position independent code
<zid> small shit micro
<sbalmos> Picard ;)
<sbalmos> could've been Pilot In Command too
<zid> I can't decide which is more topical here
<zid> PIC, PIC or PIC
<Griwes> Poorly Instrumented Code
<sbalmos> PIC
<Griwes> A show about bad implementations of sanitizers
<heat> sansan
<heat> sanitizer sanitizer
<sbalmos> cancan?
<Griwes> san san is a go term
<sbalmos> Canonical CAN bus?
<Griwes> (the other go)
<zid> 3 3?
<Griwes> ye
<zid> oh right, the point on the corner
<zid> I GET IT
<zid> I've watched a couple of go videos
<heat> what go?
<heat> the weird chess thing?
<Griwes> the weird chess thing is shogi :'D
<zid> I tried to play shogi
<zid> but the software client I was using treated illegal movies as a resignation
<zid> I did not make much progress
<psykose> lmao
<Griwes> go is the thing where you place black and white stones on intersecting lines
<jimbzy> I'd rather play fan-tan
<zid> never heard of that one
<sbalmos> what about LOGO?
<zid> sounds chinese, I don't know anything about china unless it's filtered through japanese popular culture first
<jimbzy> It is.
<zid> The only reason I even know about lu bu and crap is japanese video games etc
Dyskos has quit [Quit: Leaving]
<geist> i did watch the new Captain Pike show last night. liked it
<zid> I watched te first bit of the first one, I liked it until all the star trek happened
<zid> the murder mystery about why she's an assassin or whatever
<geist> anyway
gildasio has quit [Ping timeout: 240 seconds]
gxt has quit [Ping timeout: 240 seconds]
gxt has joined #osdev
gildasio has joined #osdev
<bslsk05> ​reviews.freebsd.org: ⚙ D35134 Correctly measure system load averages > 1024
<mrvn> Is there something like "valgrind --track-fds=yes" that can attach to a running pid?
<moon-child> gdb, break on open and close? :P
<moon-child> (or, more likely, strace; but same idea)
<mrvn> won't work, I need to have it run for days and when I see it leaking FDs I want a backtrace where the specific FD was opened.
<mjg> hfm
<mrvn> To clarify the server runs already and I can't restart it. But next time it leaks an FD I want a backtrace.
<mjg> i guess what you can do is use ebpf to track all fd alloation/close calls
<mjg> with user backtraces
<mjg> and then look for the disrepancy
<mjg> which, chances are, wont be difficult
<mrvn> No idea how to do that
<mjg> give me a minute
<mrvn> if I can get a backtrace for every opened FD I can filter the log myself for one of the leaked FDs later.
<mjg> sudo bpftrace -e 'kprobe:__alloc_fd { @[ustack()] = count(); }' -p $pid
<mjg> hm, actually you may want to: sudo bpftrace -e 'kprobe:__alloc_fd /pid == 726312/ { @[ustack()] = count(); }' -o craplog
<mrvn> That doesn't output anything until I quit the process
<mjg> you can kill it any time
<mjg> and then it prints
<mjg> if you want rolling output you can print as opens happen
<mjg> but i don't know the right printf invocation
<mjg> give me a minute
<mjg> key with the above is that it aggregates for you
<mjg> in fact you should be able to spawn 2, one which aggregates and another one which prints as events happen
<mrvn> I kind of need to see at least the FD number returned
<mrvn> @[ __GI___open64+87 0x6c
<mrvn> ]: 3
<mrvn> I'm not sure there is any code at 0x6c that would call open()
<mjg> to be fair ebpf is still kind of experimental :-P
<mjg> works fine on my ubuntu 20.04 fwiw
<mrvn> I attached it to bash can run "cat foo" and get like 40 garbage backtraces
<mrvn> s/can/and/
Burgundy has quit [Ping timeout: 256 seconds]
<mrvn> oh, and ls. my bad. Just "cat" gives just 2 backtraces __pipe+7 0xffffffffffffff88
<mjg> what distro are you running
<mrvn> Debian
<mrvn> Linux ryzen 5.7.0-0.bpo.2-amd64 #1 SMP Debian 5.7.10-1~bpo10+1 (2020-07-30) x86_64 GNU/Linux
<mjg> that's a bummer. it shuld work (tm), i would prod debian people about it
<mrvn> The backtrace doesn't look like the user space stack
<mjg> kernel stack is stack()
<mjg> you can @[stack(), ustack()] = count(); to get them combined
<mjg> the top looks like glibc-side call point
<mjg> it just fails to do unwind for whatever reason
<mrvn> stdin:1:36-43: ERROR: Unknown function: stack
<mrvn> kprobe:__alloc_fd /pid == 15972/ { @[stack(), ustack()] = count(); }
<mjg> sorry, i meant kstack()
<mjg> stack() is dtrace
<mrvn> kernel stack looks find, shows the do_pipe2() calls. ustack is just garbage after __pipe+7
<mjg> well talk to debian folk
<mjg> although, how are you compiling your prog? in particular do you -fomit-frame-pointer?
<mjg> i have to admit i don't know how thei unwinder works, but i'm guessing not making its life harder could be one way to go
<mrvn> The server runs on Ubuntu focal. Maybe it works there. Can say how it was compiled.
<mjg> it is plausible installing debug symbols for dwarf crap will also solve it
<mjg> anyhow i have to go in 5
<mrvn> Should it resolve addresses using the debug symbols from the binary and libs?
<mjg> the crapper should be able to do it on its own
<geist> yah i think the current state of the art is to rely on dwarf/etc instead of frame pointers
<geist> on multiple architectures, in general
Vercas has quit [Quit: Ping timeout (120 seconds)]
Vercas has joined #osdev
<klys> $ make ARCH=68k_64 menuconfig
<geist> nice
<klys> {M} Omit frame pointer?
<mrvn> huh? 64bit 68000?
<klys> (yeah)
<geist> that'd be a fun exercise: design a 64bit extension to 68k
<geist> had it continued on that would have been inevitable
<mrvn> where can I get one?
<klys> I would suggest getting an Altera-style FPGA from Intel for starters
<geist> google suggests that at least one company built a 64bit extension to 68k: http://www.apollo-core.com/index.htm?page=features
<bslsk05> ​www.apollo-core.com: APOLLO 68080 - High Performance Processor
<geist> looks like an actual amiga accellerator card too
<geist> mrvn: there you go
<klys> they have lots of LUTs and you don't have to use the proprietary Xilinx stuff, you can get openocd or nextpnr
<mrvn> No boards for an A4000
<geist> ah i see how they did it: looks like they add 24 more 64bit registers
<geist> E0-E23 and then a bunch of operations that can work o that
<geist> so it's kinda a half-64bit extension
<mrvn> I wonder how they extended to 64bit. I didn't think the opcode size bits had space for .b, .w, .l, .ll
<kazinsal> dug an old laptop out of storage, still charges and boots fine despite being 24 years old
<geist> ie, the addressing modes are all the same, D0-D7/A0-A7 are still 32bit etc
<geist> so my guess is they just added more modes to existing instructions that operate on the E registers
<mrvn> so more like the FPU
<geist> actually possibly they did it actually as a coprocessor...
<mrvn> Make sense to use one of the two reserved 4bit prefixes.
<mrvn> (the other one being used by the FPU)
<geist> yah looks like they maybe call the new instructions AMMX which have a suite of load/store/math routines
<mrvn> kind of like SSE
<mrvn> any register to register transfer? mov D0, E0?
<geist> i dunno. feel free to look at their page yourself
<geist> its annoyingly structured
<geist> like i just want a damn doc but i only get hypertext
<geist> and it doesn't say 'this is new' it just gives a list of instructions and whatnot
<mrvn> 16 64-Bit Address registers (A0-A15)
<mrvn> 8 64-Bit General Purpose Data registers (D0-D7)
<mrvn> 8 64-Bit FPU registers (Fp0-Fp7,)
<mrvn> 24 64-Bit General Purpose Data registers (E0-E23) which can be used by both ALU and FPU.
<geist> yah and then i the few tabs over it talks about instructions, but id ont see in the general integer tab any real mentio of the E registers
<geist> but over in the AMMX stuff i think those are all E register based
<geist> so it really looksl ike '64bit' means 'packed 16 * 4 instructions'
<geist> anyway no doubt it's powerful for some things
<mrvn> AMMX seems to all be vector opcodes
<geist> it's 64bit in the way pentium mmx is 64bit
<geist> (which i vaguely remember some folks used to say back in the day)
<geist> unrelated: i have an action item to run through https://wiki.osdev.org/Sparc_Barebones and see what's broken about it
<bslsk05> ​wiki.osdev.org: Sparc Barebones - OSDev Wiki
<geist> someone here reported they were not having any success a few weeks back
<geist> have had the tab open since
<mrvn> I can't find anything that uses 64bit for Dx/Ax
<geist> yah
<geist> that being said it's probably pretty fast as an upgrade to an 030 or 040
<geist> by just pipelining things deeper, adding more cache, branch prediction, etc theres a lot of headroom there
<mrvn> if it does register renaming for the 48 registers then it will do even better if you only use the original 16.
dude12312414 has joined #osdev
<mrvn> hehe, the 68000 had "Selfmodify support". I guess that means you don't have to invalidate the non-existing I-cache when you write/load code to memory.
<mrvn> I'm still angry that motorola removed the 64bit mul/div in the 68060.
<geist> yah so the general strategy was to just trap n emulate?
<geist> and thus be slow as heck?
<mrvn> ssh login takes 2+ minutes
<mrvn> (10 years ago where keys where short)
<geist> hmm, i wonder if gcc effectively avoids using them if you compile for 060
<geist> probably, should just consider them unavailable
<mrvn> Should. Fixed code that doesn't use them only takes a second to log in via ssh
<geist> since any fallback software version by default is faster than trapping and emulating
<geist> and yeah ssh is always fun to use on older architectures. i usally enable telnetd on machines running old stuff like that
<mrvn> Still sucks that you need 4 16x16=32 muls and some adds to emulate it.
<geist> logging into an old sparc or vax box takes a minute or so, yeah
<geist> and then burns ilke 30% of the cpu in ssh just to watch top or so
<mrvn> makes you miss telnet
<geist> and forget using it for rsync or whatnot
<geist> used to be in the day you could specify the none cipher in ssh, but i think nowadays the best you can do is arcfour, which i measured at some point as being the fastest you can get on old hardware
<mrvn> Is blowfish or so really that slow on sparc?
<geist> yah, or really any old say 50mhz machine you feel it
<geist> it's enough that you can use it as a shell, for sure, but its burning a fairly large amount of cpu to do it
<mrvn> The login has to handle the full 4096 bit key and that is really slow. But the session keys aren't that big.
<geist> may be say 100KB/sec if you try to rsync throough it or whatnot
<mrvn> ouch
<geist> OTOH, those machines usually had 10mbit eth anwyay, so it's not like you were going to get much past 1MB/sec
<mrvn> I think my 68060 was quite a bit faster.
<geist> maybe. i think a 50mhz supersparc or whatnot would be competitive
<geist> and at least had 64bit muls
jack_rabbit has quit [Quit: ZNC 1.8.2 - https://znc.in]
<geist> it's more like modern ciphers just are very heavyweight for old machines. blows their i/dcache etc
knusbaum has joined #osdev
<mrvn> I have a 10MBit card with BNC. So I need my 10MBit HUB with BNC and TP ports.
<geist> yah i keep around one old 10mbit hub for exactly this purpose
<geist> but all old 10mbit nics i have in old machines one way or another have at least an AUI port, so i tend to just use one of those
<geist> i'mn not sure where my old bnc cables are anymore
<mrvn> At least I think it is a HUB. It only has the BNC and one TP port in use.
<geist> might just be a bnc to tp bridge basically
<mrvn> AUI? As in those big, wide 25pin connectors with thick cable?
<geist> AUI as in the little i dunno 8? 10? pin connector that you plugged a box into with TP on it
<mrvn> That's how I use (used) it. It has 1 BNC and 8 TP ports.
<geist> ie, you provide the PHY in a little box. about the size of a cigarette pack
<geist> i have precisely that model that i grabbed off ebay for the vaxstation
<mrvn> Last time I used AUI was at university wiht thick ethernet in the corridor and then AUI outplets in the rooms. You remember thick ethernet where you had one long cable and then jam a spike into it to connect to the wire in the middle anywhere you needed?
<geist> yah. i dont remember it, but i do know they existed
<geist> thicknet ethernet i think, vs thinnet which is the bnc based one
<mrvn> Nice big colliusion domain
<geist> only place i ever had thinnet is we had some bnc with T joints at the Be office for one of the rows of cubicles
<geist> even at the time (1999) it was cheesy, but someone had laid it down before and you could plug into it if you wanted
<geist> but there was also some rj45 dragged along the wall later
<mrvn> With BNC don't forget to ground it at exactly one place. A 300m cable with 12V charged up gives you quite a jolt when you touch it.
<mrvn> Somehow all the NICs always leak electrons onto the wire.
<geist> yah