2021-05-23 01:46 klange, hey 2021-05-23 01:48 hey, thanks for the org reg, we got our last op finally - he was on vacation during the ruckus 2021-05-23 01:48 PM? 2021-05-23 01:48 Can do! 2021-05-23 01:57 ... I left the date in that URL, oops. 2021-05-23 02:05 who owns the logger site? 2021-05-23 02:06 whitequark, very trusted person 2021-05-23 02:06 so not here right now 2021-05-23 02:07 do you know if the logs are downloadable from there? 2021-05-23 02:07 Yes, not someone who would join the channel directly. I will inquire on how we can ingest them for pisg. 2021-05-23 02:07 thanks 2021-05-23 02:08 I have read this written int: 02:08 This logger supports retrieving complete channel archives in text via lftp. Use lftp -c 'mirror https://libera.irclog.whitequark.org/$CHANNEL/index/'. 2021-05-23 02:08 ​libera.irclog.whitequark.org: 401 Authorization Required 2021-05-23 02:09 in* 2021-05-23 02:09 ez pz 2021-05-23 02:10 klange: nm, front page of site explains how 2021-05-23 02:11 I think it needs auth so might need to ping whitequark again anyway. 2021-05-23 02:11 oh 2021-05-23 02:17 yeah, per the code it should be /osdev/index/YYYY-MM-DD.txt 2021-05-23 02:20 thanks 2021-05-23 04:15 klange: are you changing the topic over there? 2021-05-23 04:16 I was going to wait, but I figured with the return of our "friend" now's a fine time to +m the whole place... so, yeah, I'll update the topic. 2021-05-23 04:21 Do you consider a good idea to expand who is the person you mention about, and why do you consider a good idea for the other channel to be muted, for context? 2021-05-23 04:22 The last message sent to that channel is by a routine spammer who shows up every so often to ping a bunch of people to annoy them and spout insults and such. They are solely responsible for at least two thirds of that channel's banlist. 2021-05-23 04:22 I am okay with using here, however I feel curious about why the move is now forced, if it is worth to be disclosed. 2021-05-23 04:22 I understand. 2021-05-23 04:22 He is either unmedicated or an AI. 2021-05-23 04:23 The channel is being muted to encourage interested users to centralize on this channel. 2021-05-23 04:23 And if the latter, not a particularly sophisticated one. 2021-05-23 04:23 Thank you for replying at my inquiry. 2021-05-23 04:26 I feel content about the article on the web page at this URL: https://wiki.osdev.org/Chat#IRC now points here: Now I haven't a substancial reason to stay at both places. 2021-05-23 04:26 ​wiki.osdev.org: Chat - OSDev Wiki 2021-05-23 04:28 shame about losing CrystalMath though, according to the statistics they were in the top 10 most active. 2021-05-23 04:29 why did we lose CrystalMath? 2021-05-23 04:30 I will miss the contributions of our fellow retro operative system developer. 2021-05-23 04:30 air: well, they said they're very very pro-freenode 2021-05-23 04:30 so i expect they'll not be dropping by. 2021-05-23 04:32 well, we still have #1 ;) 2021-05-23 04:33 And I appreciate much him being around. 2021-05-23 04:33 It is so nice to read about all the knowledge doug16k shares. 2021-05-23 04:34 had to clean my computer radiator 2021-05-23 04:35 apparently it doesn't just keep working forever all by itself by being water cooling :P 2021-05-23 04:35 hehe, I had to clean mine yesterday 2021-05-23 06:09 made a little tool to analyze how fast every pair of cpus can spin on and ping pong a cache line: https://pasteall.org/media/3/1/31b83343e1b4cca35906062100b91ff4.png https://github.com/doug65536/xcpuperf 2021-05-23 06:09 ​doug65536/xcpuperf - Detect cache line pingpong latency (0 forks/1 stargazers/MIT) 2021-05-23 06:10 that's my output on 3950x 2021-05-23 06:11 with 2400 memory clock 2021-05-23 06:12 one thread spins until it's even, then increments it, other spins until it's odd and increments it 2021-05-23 06:12 affinity forced onto every pair 2021-05-23 06:16 so the worst time is 10x worse than best time 2021-05-23 06:16 almost 2021-05-23 06:17 8.5 2021-05-23 06:17 hm 2021-05-23 06:18 png link is output of github repo 2021-05-23 06:18 each pair of cpus changing the line as soon as other thread changes the line 2021-05-23 06:19 and measure how long the ping pongs took 2021-05-23 06:19 oh, makes sense. 32 threads, 8 per CCX, 2 CCXes per die, 2 dies. 2021-05-23 06:19 yeah 2021-05-23 06:19 and the second 16 cpus are the hyperthread 2021-05-23 06:20 right 2021-05-23 06:25 haha you could delete all but line 1 of the makefile and it would still work right? 2021-05-23 06:26 https://github.com/doug65536/xcpuperf/blob/main/Makefile 2021-05-23 06:26 ​github.com: xcpuperf/Makefile at main · doug65536/xcpuperf · GitHub 2021-05-23 06:26 builtin rule would figure out to make it from xcpuchk.cc right? 2021-05-23 06:27 oh it wouldn't say pthread. oh well 2021-05-23 06:27 I think you'd still need -pthread 2021-05-23 06:28 read your mind 2021-05-23 06:29 :) 2021-05-23 06:31 I can't believe I only found out this week that with just something.cc and nothing else, you can type `make something` and poof, it builds `something` with c++ compiler 2021-05-23 06:31 CFLAGS ? 2021-05-23 06:31 I mean even no makefile 2021-05-23 06:31 i like taking advantage of such patterns in makesfiles, makes it much harder to make mistakes 2021-05-23 06:32 this is with gmake? 2021-05-23 06:32 I mean gnu make 2021-05-23 06:32 g++ is the default compiler 2021-05-23 06:32 yeah I call gmake gnu make 2021-05-23 06:32 I wasn't sure so I was fully specific 2021-05-23 06:32 actually I'm surprised libstdc++ doesn't link against pthread 2021-05-23 06:32 but can be changed with the env var CXX 2021-05-23 06:34 yeah gnu libraries are still going as far as the non-reentrant libc code being default 2021-05-23 06:34 it 3/4 expects you to not even use threads at all 2021-05-23 06:35 strtok for example 2021-05-23 06:35 it doesn't even work with threads on right? 2021-05-23 06:35 just dont use it in any other thread? :D 2021-05-23 06:36 not that I have a lot of pity for strtok callers 2021-05-23 06:36 but my libc strtok is thread safe. if you are calling it, I want to help 2021-05-23 06:37 errno is already using TLS in 50,000 places. screw it, strtok is completely thread safe 2021-05-23 06:38 the very first instruction in my crt0 stores the thread id lol 2021-05-23 06:38 in TLS! 2021-05-23 06:39 cue do it live clip 2021-05-23 06:41 the linear search in strtok will touch one pointer sized tls. big deal 2021-05-23 06:41 touch once on entry 2021-05-23 06:42 If I create a ".section multiboot" for elf do I need to specifiy something for it to link properly? I have my entrypoint in there and it just disappears (objdump gives bogus start) 2021-05-23 06:43 no but you might want to wrap KEEP() around what's in there 2021-05-23 06:43 to take removing it off the table 2021-05-23 06:43 KEEP(*(.whatever)) 2021-05-23 06:44 even if you tell ld to go nuts with gc, it'll keep that stuff 2021-05-23 06:44 Well it removes both the table and the global entrypoint (it is the elf file entrypoint as well) 2021-05-23 06:44 In that case 2021-05-23 06:45 if it is something that you know looks unused to the linker, you should put KEEP around it 2021-05-23 06:45 the linker is convinced nobody references it, ever 2021-05-23 06:45 KEEP says yes I do 2021-05-23 06:46 Will try that a mom 2021-05-23 06:46 ld says really, oh sorry! 2021-05-23 06:48 It did nothing 2021-05-23 06:48 the other thing it could be is that ld decided to put it too far away from the beginning of the executable 2021-05-23 06:49 try adding -Wl,-z,max-page-size=4096 2021-05-23 06:49 can you show objdump -p -h your-kernel in a pastebin 2021-05-23 06:50 Sure 2021-05-23 06:51 I have a feeling you didn't give any section flags, and it hasn't a clue whether it is executable or writable or what and didn't do the right heuristics to fix it up 2021-05-23 06:52 www.pastebin.com/kBW1ZfRK 2021-05-23 06:52 ​www.pastebin.com: objdump -p -h mytestmytest: file format elf32-i386Program Header: - Pastebin.com 2021-05-23 06:52 Yes doug16k something like that 2021-05-23 06:52 why does it load to zero 2021-05-23 06:53 I wouldn't even try to load that 2021-05-23 06:53 where the heck is your .text segment 2021-05-23 06:53 you should not have a separate multiboot output section 2021-05-23 06:54 you should practically put a gun to its head and put your input sections at the start of the .text section 2021-05-23 06:54 it will have no choice but to put it close to the start 2021-05-23 06:54 then if you put max page size 4K it is highly likely .text will go first 2021-05-23 06:54 I'm more concerned about the complete lack of .text/.data/.rodata/.bss in that section list 2021-05-23 06:55 * clever gets example 2021-05-23 06:55 they mentioned earlier that their entry point is in multiboot section 2021-05-23 06:55 https://github.com/librerpi/lk-overlay/blob/master/platform/bcm28xx/bootcode.ld#L4-L18 2021-05-23 06:55 ​github.com: lk-overlay/bootcode.ld at master · librerpi/lk-overlay · GitHub 2021-05-23 06:55 I agree it is weird 2021-05-23 06:55 :stonk: 2021-05-23 06:55 in my case, the 512 byte vector table should be at the start, and _start should be right after 2021-05-23 06:55 kazinsal: I haven’t specifies anything for them 2021-05-23 06:55 so i put _start into .text.start, and poppped that at the start of .text 2021-05-23 06:55 Do you want the makefile as well? 2021-05-23 06:56 yeah do what clever said 2021-05-23 06:56 you emit the stuff to a special named input section in the source, then in linker force that into a particular place in an existing output section 2021-05-23 06:56 that's the best approach 2021-05-23 06:56 the linker script i linked, ensures that .text contains .text.start .text and .text.*, in that order 2021-05-23 06:57 yeah I just throw the .multiboot and entry stuff at the start of the text segment and call it a day 2021-05-23 06:57 kazinsal: removing .section gives me a .text though 2021-05-23 06:57 sginsberg, what's wrong with .text 2021-05-23 06:57 I like it when my elf contains a .text 2021-05-23 06:57 if you fight ld, you will lose 2021-05-23 06:57 that means it has code in it 2021-05-23 06:57 ld will beat you 2021-05-23 06:58 ld is the train man 2021-05-23 06:58 send neo flying 2021-05-23 06:59 no seriously though, ld has heuristics that make it do the right thing for standard section names 2021-05-23 06:59 I got my stuff working with tcc 2021-05-23 06:59 download and compile two cross-compilers (one for efi) in seconds--it's really nice 2021-05-23 06:59 except tcc's linker doesn't understand linker scripts, so I still have to use ld 2021-05-23 07:00 :/ 2021-05-23 07:02 if you don't use the normal sections, then all the onus is on you to always say the section flags correctly in the source code to say executability and writability and to place it into an explicit output section with compatible section flags 2021-05-23 07:02 sorry place it in an explicit program header 2021-05-23 07:03 So I tried putting multiboot into text 2021-05-23 07:03 https://github.com/librerpi/lk-overlay/blob/master/platform/bcm28xx/start4/start4.ld 2021-05-23 07:03 ​github.com: lk-overlay/start4.ld at master · librerpi/lk-overlay · GitHub 2021-05-23 07:03 with compatible flags 2021-05-23 07:03 doug16k: i should probably fix this up then? 2021-05-23 07:03 doug16k: for reasons outside of my control (closed-source bootloader), those sections must be named as such, in the elf headers 2021-05-23 07:03 what does objdump -p say 2021-05-23 07:03 Start address is still wrong though 2021-05-23 07:04 clever, if program headers cover it all ok, it's good enough 2021-05-23 07:05 clever, you could "help it" by doing asm like this: .section .text.bootloader_state, "x" to make the input section say it wants executable flags 2021-05-23 07:05 doug16k: `objdump -p` doesnt really mention it, its between .text and .data, and the whole load is one LOAD entry 2021-05-23 07:05 both are data 2021-05-23 07:05 if objdump -p doesn't mention it then it won't be loaded 2021-05-23 07:05 LOAD off 0x00001000 vaddr 0xc4000000 paddr 0xc4000000 align 2**12 2021-05-23 07:05 filesz 0x000247f0 memsz 0x000270c0 flags rwx 2021-05-23 07:05 why would it be loaded 2021-05-23 07:05 www.pastebin.com/0QipV6d3 2021-05-23 07:05 ​www.pastebin.com: objdump -p mytestmytest: file format elf32-i386Program Header: - Pastebin.com 2021-05-23 07:05 this is all that `objdump -p` said 2021-05-23 07:06 Ah 2021-05-23 07:06 Nvm 2021-05-23 07:06 c401d774 g O .text.bootloader_state 00000010 bootloader_state 2021-05-23 07:06 clever, yeah that covers c4000000 thru that plus 0x270c0 2021-05-23 07:06 doug16k: and those custom sections, are within the range 2021-05-23 07:06 yep 2021-05-23 07:07 then you are fine 2021-05-23 07:07 i think the only "problem", is that .rodata is writable, and .rodata+.data are executable 2021-05-23 07:07 thing is it can be that you don't have any flags and it doesn't put it in any header 2021-05-23 07:07 but i dont know how to block those at runtime anyways 2021-05-23 07:08 but for the standard section names, it just knows the flags 2021-05-23 07:08 even if you didn't help 2021-05-23 07:08 .text.firmware_rev is an uint32_t[4] of flags, to advertise what this .elf file supports 2021-05-23 07:08 I wish I knew exactly when it does weird stuff like that 2021-05-23 07:08 if the flags arent compatible, the bootloader will refuse to execute it 2021-05-23 07:08 like not including something in any program header 2021-05-23 07:09 .text.bootloader_state is slightly more bi-directional, if it contains a magic#, the firmware will insert a pointer to a tagged list in the [1] slot 2021-05-23 07:09 so your .text.bootloader_state section is mutated by the bootloader during loading 2021-05-23 07:09 (I think I somewhat solved it by putting the entry outside of the .multiboot) 2021-05-23 07:10 sginsberg, put your stuff in the appropriate normal named output section and you will have happy linking 2021-05-23 07:11 What I don’t understand is it fails silently to link the entrypoint 2021-05-23 07:11 do you have a linker script? 2021-05-23 07:12 I am trying both with and without one 2021-05-23 07:13 doug16k: https://gist.github.com/cleverca22/2ea8c5ad903239e2e00030859a59ac90 ah, -S shows a lot more 2021-05-23 07:13 ​gist.github.com: gist:2ea8c5ad903239e2e00030859a59ac90 · GitHub 2021-05-23 07:13 ya objdump -h shows that 2021-05-23 07:13 pretty sane order 2021-05-23 07:15 gist updated with a -h output 2021-05-23 07:15 www.pastebin.com/ekJyUpwS I know I know this is my first attempt ... 2021-05-23 07:15 ​www.pastebin.com: ENTRY(entry)PHDRS{ headers PT_PHDR PHDRS; text PT_LOAD FILEHDR PHD - Pastebin.com 2021-05-23 07:15 Wait 2021-05-23 07:15 Wront file 2021-05-23 07:16 32 bytes* 2021-05-23 07:16 doug16k: most odd part in my gist, is that there is 32bits of writable sections, between 2 read-only sections 2021-05-23 07:16 Ignore the bss entry I got nothing in there yet 2021-05-23 07:16 clever, if I were a broken bootloader I would be all broken from permission changing without page alignment between .text and .text.bootloader_state :D 2021-05-23 07:16 Copy pasta 2021-05-23 07:16 went from readonly to readwrite in middle of page right? 2021-05-23 07:17 doug16k: yep, and not even 16 byte aligned! 2021-05-23 07:17 doug16k: with that ^ script entrypoint is gone again 2021-05-23 07:17 but there is no MMU on this arch, so pages dont mean much 2021-05-23 07:17 clever, ya but ld is obsessed with mmus 2021-05-23 07:19 something that harmless could mean it being weird and showing dwarf errors or something 2021-05-23 07:19 ive not done much with the debug info yet 2021-05-23 07:20 does it think max page size is 1 2021-05-23 07:20 can you do that? 2021-05-23 07:20 how would i know? 2021-05-23 07:20 I try not to piss ld off nowadays 2021-05-23 07:21 probably fine 2021-05-23 07:21 the most adventurous ive been, was trying to make a .elf where the _start symbol, was 0x200 bytes into the .elf binary itself, and the linker also knows its at 0x8000_0200 2021-05-23 07:21 so i could run the .elf without an objcopy -> .bin step 2021-05-23 07:22 but it broke easily 2021-05-23 07:22 I am superstitious from multiple times where I did something unusual and it made the debug info all screwy and I later was able to fix the code and fix it 2021-05-23 07:23 gdb never ever crashes or asserts out for me 2021-05-23 07:23 gdb doesnt even support this arch 2021-05-23 07:23 and no gdb stub exists, and the jtag isnt documented 2021-05-23 07:23 it's almost as if they don't want a clever person reversing it 2021-05-23 07:23 :D 2021-05-23 07:24 i think the debug info is still mostly standard, they released an unstripped file by accident once 2021-05-23 07:24 and ghidra could understand the debug info 2021-05-23 07:24 it was extracting debug info on structs 2021-05-23 07:25 you can force objdump to dump the debug info 2021-05-23 07:26 neatest is dumping the decoded-lines 2021-05-23 07:26 --dwarf-start ? 2021-05-23 07:26 you get line number vs start address list 2021-05-23 07:26 --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames] etc... 2021-05-23 07:27 there are 3 or 4 more lines of other = things 2021-05-23 07:27 ah, just scrolled up and found that one 2021-05-23 07:27 decodedline is awesome 2021-05-23 07:27 I extract that for my perf top 2021-05-23 07:27 for display of course 2021-05-23 07:27 [nix-shell:~/apps/rpi/lk-overlay]$ vc4-elf-objdump --dwarf=decodedline -d build-rpi4-start4/lk.elf | less 2021-05-23 07:28 data collection is just a silly number of pc snapshots 2021-05-23 07:28 ip, rip, instruction pointer 2021-05-23 07:28 yep, this looks like what you might use when mapping a PC back to a line# 2021-05-23 07:28 previously, i just ran `objdump -S` and looked the PC up manually 2021-05-23 07:28 so my profiler gathers line level perf top 2021-05-23 07:29 systemwide 2021-05-23 07:29 same way - perf counters and NMI 2021-05-23 07:29 NMI so I can get samples in a spinlock or something 2021-05-23 07:29 something that cli 2021-05-23 07:30 I did the crazy stuff to make that guaranteed swapgs right 2021-05-23 07:30 sadly, decodedline finds nothing at all in the official firmware 2021-05-23 07:32 ah okay 2021-05-23 07:32 i was away but i see the moved channel 2021-05-23 07:32 sure. for lack of anyone else doing something, klange moved on it and go klange! 2021-05-23 07:33 2021-05-23 02:40:10 sorry for the PM, but if you want to remain on freenode and talk about OS development, please join ##osdev 2021-05-23 07:33 and others are trying to hijack the community in PM 2021-05-23 07:34 ya -S way is fine 2021-05-23 07:34 decodedline is more for when you want to brute force get all the line number info 2021-05-23 07:35 might be worth updating the topic 2021-05-23 07:35 dunno. i'll just follow where the center is, and it's clearly here now so there ya go 2021-05-23 07:35 no interest in politics 2021-05-23 07:36 doug16k: trying to make sense of --dward=frames now... 2021-05-23 07:36 ah, frames-interp looks more readable 2021-05-23 07:37 tells you at each starting point in the code, how do you put it back to caller's state (restore callee saved stuff) 2021-05-23 07:37 to unwind or stack trace 2021-05-23 07:38 doug16k: it starts out with `r0 + 0`, and from knowing the asm, i know that nothing needs to change on that line 2021-05-23 07:38 each point is an accumulation of the effect of everything above it up to the startproc 2021-05-23 07:38 doug16k: on the line of asm where `add sp, sp, -4` gets ran, the debug info claims `r0 + 4` 2021-05-23 07:38 why is it saying r0 and not sp? 2021-05-23 07:38 they assign numbers to the registers for the dwarf info 2021-05-23 07:39 they can be weird? 2021-05-23 07:39 that could be it 2021-05-23 07:39 there is also an `add r6, sp, 0` which just copies sp->r6, and the debug info is claiming `r0+8` now 2021-05-23 07:39 frame info is obsessed with the stack pointer and where you put callee stuff relative to that, mostly anyway 2021-05-23 07:39 it would make a lot of sense to make that 0 2021-05-23 07:40 r6 is used as a frame pointer in this toolchain 2021-05-23 07:40 but neat thing about frame info is, you can be all weird and use anything for the frame pointer 2021-05-23 07:40 and even go weird and say stuff is saved in a register, not stack frame 2021-05-23 07:41 like the return address is in some weird register 2021-05-23 07:41 stack unwind would use it 2021-05-23 07:41 doug16k: and for the official firmware, it is reporting such state, and in more depth too 2021-05-23 07:42 you know how x86_64 puts return address in rcx? my frame info says the caller's rip is in rcx and gdb says no problem and understands completely 2021-05-23 07:42 syscall 2021-05-23 07:42 neat 2021-05-23 07:44 then at some point I put it down on the stack and then emit a cfi that says no from here on get it relative to the cfa memory 2021-05-23 07:44 wherever I feel like putting it 2021-05-23 07:45 in the cfa region 2021-05-23 07:45 the stack 2021-05-23 08:01 hmm, now i gotta remember what I think Mutabah was doing to get the server to show up in the status bar of irssi 2021-05-23 08:08 ah i see it 2021-05-23 08:08 18:38 < Mutabah> in the config file, under `statusbar` `window = "{sb $winref:$tag/$itemname{sbmode $M}}";` 2021-05-23 08:10 lemme see 2021-05-23 08:11 okay, yeah that worked, neat 2021-05-23 08:47 looks like you can register multiple nicks via nickserv group 2021-05-23 10:00 air: regarding downloading of logs, there's some kind of issue with the queries used to do that with postgres specifically; i had to require authentication on that endpoint unfortunately 2021-05-23 10:00 that might no longer be a problem with recent postgres, needs to be checked though 2021-05-23 10:27 nope, still a problem 2021-05-23 10:28 it's super frustrating because it's specifically *generating the index page* that's a problem, not serving the logs themselves, which you'd think would be computationally far worse 2021-05-23 10:29 ok 2021-05-23 10:29 I think our primary purpose for raw access is for the pisg processing, so if the logs can be served without the problematic index... 2021-05-23 10:29 also, weird 2021-05-23 10:30 (also thanks for stopping by to check in on things ;) ) 2021-05-23 10:30 klange: you can directly access https://libera.irclog.whitequark.org/osdev/2021-05-23.txt for example 2021-05-23 10:30 are you able to use .htaccess to only auth the index? 2021-05-23 10:30 (just fixed that so that it actually works) 2021-05-23 10:31 (there was an issue with a sinatra upgrade some time earlier) 2021-05-23 10:31 yay :D 2021-05-23 10:31 you can also do it monthly https://libera.irclog.whitequark.org/osdev/2021-05.txt 2021-05-23 10:31 or omit joins/parts https://libera.irclog.whitequark.org/osdev/2021-05.txt?quiet=1 2021-05-23 10:31 air: there's no htaccess, it's configured in nginx 2021-05-23 10:32 (hmm, the .txt file are served without a character set so I see UTF-8 mojibake) 2021-05-23 10:32 so the index is redirecting to avoid issues? 2021-05-23 10:33 oh, hm 2021-05-23 10:33 XgF: Content-Type: text/plain; encoding=utf-8 ? 2021-05-23 10:33 or something? 2021-05-23 10:33 something like that 2021-05-23 10:33 charset=utf-8 it seems 2021-05-23 10:34 XgF: where are you testing this? 2021-05-23 10:34 whitequark: Firefox! Maybe the dev tools being odd? 2021-05-23 10:34 XgF: no like, which url? 2021-05-23 10:34 https://libera.irclog.whitequark.org/osdev/2021-05-23.txt 2021-05-23 10:35 wait, that has unicode in it? 2021-05-23 10:35 nvm found it 2021-05-23 10:36 snake messages, generally, we don't speak too many other languages here so it's usually just midline dots from webpage 2021-05-23 10:36 * XgF ensures some more Unicode £€ 2021-05-23 10:37 ಠ_ಠ 2021-05-23 10:37 damn, we've moved permanently 2021-05-23 10:37 It was a surprisingly unanimous decision, though the timing was decided by _other_ outside factors. 2021-05-23 10:39 Content-Type: text/plain; charset=utf-8 2021-05-23 10:39 yep, the dots are now dotty 2021-05-23 10:40 hurrah :-) 2021-05-23 10:40 Oh key klange, can I get flags for #osdev please? 2021-05-23 10:40 klange: what is "pisg" by the way 2021-05-23 10:40 let me see, libera's chanserv is a different implementation 2021-05-23 10:40 sortie: ⚑ 2021-05-23 10:40 whitequark: ancient irc log scraping thing that generates stat pages 2021-05-23 10:40 and has a funny name 2021-05-23 10:40 Yo there air 2021-05-23 10:40 ahh 2021-05-23 10:40 How are you? 2021-05-23 10:40 I have coffee and a fresh ircd port 2021-05-23 10:41 yay, one more channel i can leave to free up space on chatzilla's space-limited channel bar. (Anyone have client suggestions? chatzilla is a pretty much exactly what I'm looking for, except for this one problem) 2021-05-23 10:41 it's an initialism... I hope, though I read it as an acronym: Perl IRC Statistics Generator 2021-05-23 10:41 oh god the server is lagging hard 2021-05-23 10:41 I clicked the log and I read messages a solid 10-20 seconds before they hit my client 2021-05-23 10:42 immibis, I use hexchat, works fine 2021-05-23 10:44 sortie: okay you should have all the bits I can give 2021-05-23 10:44 klange: Woohoo :) 2021-05-23 10:45 klange: Ah neat, y'all went ahead with a +m move to libera.chat after all 2021-05-23 10:47 It was a sudden action as one of our "old friends" showed up. 2021-05-23 10:47 And there was general agreement on it, so, it happened. 2021-05-23 10:47 oooooohhhhhhh 2021-05-23 10:47 lol 2021-05-23 10:47 ok, hopefully the logs will download and generate stats when today ends 2021-05-23 10:47 Oh geez which old friend? The GPU markov bot or much, much worse? 2021-05-23 10:47 Yes! 2021-05-23 10:48 I wonder if he's going to continue spamming freenode #osdev 2021-05-23 10:49 or at least trying to, that is 2021-05-23 10:49 klange: Well then I am almost entirely off freenode besides a corp channel I didn't forcibly move just yet and an inactive topical channel where I talk to the idlers every few eyars 2021-05-23 10:49 and http://osdev-logs.qzx.com redirects to new site 2021-05-23 10:49 ​redirect -> bespin.org: #OSDEV on Libera 2021-05-23 10:52 I am out of everything except #osdev which I'm monitoring - want to see if it gets captured - and a channel that has moved but we need to make sure one particular members gets the message. 2021-05-23 10:53 captured? 2021-05-23 10:53 yeah 2021-05-23 10:53 Lee has apparently been reclaiming channels that move. 2021-05-23 10:53 like they did with that hacker news channel 2021-05-23 10:55 I think it wouldn't be terrible if they "took" #osdev back, it's a general purpose topic! 2021-05-23 10:55 Not going to operationally interfere, but taking channels that move? perfect. 2021-05-23 10:55 makes sense, you don't want a channel with a topic redirecting users to another network 2021-05-23 10:55 Freenode has always had 'this channel has moved' channels 2021-05-23 10:56 but not this many all at once 2021-05-23 10:56 j`ey: it's not so much the hijacking of the channel, they try to hijack the community 2021-05-23 10:56 fragmentation bad :( 2021-05-23 10:56 Affliction: to different networks, or just names? 2021-05-23 10:56 networks 2021-05-23 10:57 I've run into a few over the years 2021-05-23 10:57 Fragmentation _is_ bad, which is why we're all moving here :) 2021-05-23 10:57 except cyrstalmath :P 2021-05-23 10:57 oh no! 2021-05-23 10:57 anyway 2021-05-23 10:57 Well if he trusts the crown prince more than me, he's free to stay with him. 2021-05-23 10:58 He can make his own ##osdev, with blackjack and deposed Korean royalty. 2021-05-23 10:59 Well even if they reclaim these channels, the core of the community has already moved 2021-05-23 10:59 Anything left will be a poor imitation 2021-05-23 10:59 Totally the right move to not fragment the community though :) 2021-05-23 10:59 most people get to "here" from the wiki page anyway, and it has been updated appropriately and I have been sure to express the full context of the situation to the best of my abilities. 2021-05-23 11:01 maybe a forum post would be nice? 2021-05-23 11:02 I can post one in the announcements board, sure. 2021-05-23 11:03 need to sort out libera and oftc znc entries then... 2021-05-23 11:03 i thought this channel wasnt associated with the wiki/forums, thats what people have said :P 2021-05-23 11:04 We've gone from "coincidentally has overlap in staff" to "now connected, but still not the same entities". 2021-05-23 11:05 eg. #osdev is not "osdev.org's IRC channel" or the reverse, but we're in a commited relationship and go to movies and eat dinner together 2021-05-23 11:06 j`ey: yeah but I was thinking it might be nice to let non-regulars know 2021-05-23 11:21 so what is third network choice if osdev is reclaimed and libera dies? 2021-05-23 11:22 oftc got mentioned a bunch 2021-05-23 11:22 If all goes sour, I'll just start up my own server again. 2021-05-23 11:24 The problem with "reclaiming" channels is: channels, nicks, etc all have exirations if unused, but thats tampering with the services to fullfill ones own goals, which mean theres no reason to trust any of the services there now. 2021-05-23 11:25 k. Now I just need to implement dynamic linking. 2021-05-23 11:26 You should do that, and do it correctly following all the rules unlike me. 2021-05-23 11:28 heh, i only noticed this channel on this network ( by overlap with other channels i usually frequent that have moved ) ) 2021-05-23 12:09 * gog meows 2021-05-23 12:16 sortie: port another dynamic linker and be done with it 2021-05-23 12:17 dynamic linking is hard :( 2021-05-23 12:17 heat: Why dynamically link a set of built in modules when I can just haxxx and static link them :) 2021-05-23 12:17 Introducing fake dlopen that just has a table of ‘modules’ that are already statically linked into the program 2021-05-23 12:19 ahhhhhh 2021-05-23 12:19 can you even do that without actual linker hacks? 2021-05-23 12:23 I mean I gotta link the .a files onto the executable 2021-05-23 12:37 oops I made literally zero progress on my network stack this weekend because I was too busy trying to fix multicore synchronization issues and dealing with this IRC nonsense 2021-05-23 12:43 I feel like the are some obvious-to-me-but-not-quite-sure-how-to-fix-them issues remaining, which I guess is good? 2021-05-23 12:44 The further I get with debugging, though, the harder it gets... you fix the obvious issues and now you've got some one-in-a-million event happening you can't build a test case to reproduce... 2021-05-23 12:47 So in my kernel I am in protected mode, can I trigger a breakpoint under QEMU/GDB. Like INT 3, or do I need to set this up in my code. E.g. when my code gets to a CLI;HLT, I can break in via gdb and see my stack/registers. But I'd prefer a bp and resume 2021-05-23 12:47 I'm stuck with an asan issue because I'm too lazy to fix it 2021-05-23 12:48 and I can't progress in other areas too because I'm scared all this code is wrong 2021-05-23 12:49 OK ircd made it to the mainloop 2021-05-23 12:50 wooohoo 2021-05-23 12:50 But seems to be stuck in some sort of 100% CPU usage loop 2021-05-23 12:50 Alas I don't have strace.. 2021-05-23 12:51 i have a broken strace 2021-05-23 12:51 * heat should get a ptrace-like interface going and switch to that 2021-05-23 12:53 my backlog of things that I want to work on is impressively big and my lazyness is even bigger 2021-05-23 12:57 OK neat it seems to spend most of the CPU time in the kernel 2021-05-23 12:57 sortie: is this the original WiZ ircd? 2021-05-23 12:59 klange: State of the art solanum 2021-05-23 13:00 sortie: you going to donate a seerver running sortix to libera? :P 2021-05-23 13:02 not if onyx gets there first 2021-05-23 13:08 My gut feeling is that there's something wrong with the main loop's polling 2021-05-23 13:22 hm, i should get solanum running on sgi irix :> 2021-05-23 13:29 Ugh it was testing for the non-standard sys/poll.h instead of the standard poll.h so it wasn't using poll(2) but select(2).. 2021-05-23 13:38 do you not have select? 2021-05-23 13:38 select is for weenies 2021-05-23 13:39 heat: I do have select but it's awful and I only emulate it in terms of poll(2). Might've been slightly wrong with the timeout or something. 2021-05-23 13:39 It now power idles correctly and the main loop isn't busy. New connections get disconnected without reason after a second now tho. 2021-05-23 13:39 oh 2021-05-23 13:40 i thought about that but it seems really slow in user space so I just did it in the kernel 2021-05-23 13:40 thankfully my poll backend is flexible enough that it worked out really smoothly for select too 2021-05-23 13:43 Mine is... possibly still the cause of some of my multicore issues. 2021-05-23 13:43 Though I did fix most of it. 2021-05-23 13:49 Linux says the apicid for the second physical core on my t410 is 4... so I guess I'll have to fix the 1-1 mapping I was using temporarily in qemu... easy enough, something to do tomorrow. 2021-05-23 13:49 If I can get two cores up on that thinkpad I'll have a little party 2021-05-23 13:49 But for now, good night! 2021-05-23 14:55 I have arrived! 2021-05-23 14:58 Welcome, jimbzy! 2021-05-23 14:58 And good night, klange! 2021-05-23 15:04 we all have arrived :3 2021-05-23 15:10 Yay 2021-05-23 15:42 the gang's all here 2021-05-23 15:53 can anyone recommend material to read about writing portable c 2021-05-23 15:59 posix, or maybe the relevent C standard are the first that come to mind. 2021-05-23 16:28 I was about to mention about this C book and link to one, and checking it, realized it was a traditional Chinese version of the one I was thinking about linking here. 2021-05-23 16:29 I recommend to read The C Programming Book's second edition, by Brian W. Kernighan and Dennis M. Richie: They are the creators of this book are also the creators of the C programming language. 2021-05-23 17:57 https://www.devever.net/~hl/freenode_abuse - expect freenode staff to put the osdev channel back on freenode at some point 2021-05-23 17:57 ​www.devever.net: Freenode IRC operators now engaging in routine abuses of power 2021-05-23 18:03 I saw this earlier https://github.com/freenode/web-7.0/pull/513/commits/2037126831a84c57f978268f090fc663cf43ed7a 2021-05-23 18:03 ​github.com: policy update by realrasengan · Pull Request #513 · freenode/web-7.0 · GitHub 2021-05-23 18:04 GeDaMo: yeah, they basically just changed the rules, so what immibis pasted wouldnt be a violation 2021-05-23 18:04 https://news.ycombinator.com/item?id=27256843 Freenode removes hate speech rule 2021-05-23 18:04 ​news.ycombinator.com: Freenode removes hate speech rule | Hacker News 2021-05-23 18:05 GeDaMo: and what i didnt notice at first, is that on your diff, they also removed the rules about hate-speech 2021-05-23 18:05 so hate-speed is now allowed on freenode, lol 2021-05-23 18:05 I'm sure that's just a coincidence :| 2021-05-23 18:06 https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/jfutPHxbkOpoQKoeBBujjYRB 2021-05-23 18:06 GeDaMo: ive also seen other reports, claiming that both sides where over-reacting to the other side 2021-05-23 18:07 X did Y, take away his powers 2021-05-23 18:07 oh no, i lost my powers, its a hostile take-over! 2021-05-23 18:07 no, your hostile!! 2021-05-23 18:07 GeDaMo: but that snowball doesnt explain the rapid rule changes.... 2021-05-23 18:11 oh yay you can post porn on freenode node 2021-05-23 18:11 just what it was missing honestly 2021-05-23 18:12 Yes, this is how to modernize IRC :| 2021-05-23 18:14 clever: since hate speech is now on-topic on freenode I took the liberty of registering ##transphobia, ##homophobia, and ##nazis. don't know what to do with that since i'm not a homophobe, transphobe, or nazi, but eh 2021-05-23 18:14 :D 2021-05-23 18:16 immibis: that's probably squatting but who cares it's gppd 2021-05-23 18:16 also /me knows who will probably ask freenode staff for the channel 2021-05-23 18:17 lol 2021-05-23 18:17 i don't even have any nazi friends to invite while I get popcorn. which is a good thing, of course, not having nazi friends 2021-05-23 18:17 immibis, merge them together into a chat session only rivalled by a youtube live chat stream 2021-05-23 18:18 (##osdev has so far flopped, maybe a forced redirect will bring it to life? ;p) 2021-05-23 18:18 ##osdev exists? 2021-05-23 18:18 you forgot ##covidsfake 2021-05-23 18:18 Can you have them re-direct to each other in a circle? 2021-05-23 18:18 flopped? the freenode one was shut down by ops 2021-05-23 18:18 chanops not network ops 2021-05-23 18:18 this is now the only osdev channel 2021-05-23 18:20 also, where's ##themoondoesntexist and ##iseedeadpeople 2021-05-23 18:20 i think the other one is +m. Not as serious as ##hamradio, which was set to a limit of 1 user and then everyone was kicked 2021-05-23 18:20 those aren't hate speech 2021-05-23 18:20 someone decided to make it a thing, someone mentioned it here, i joined because why not 2021-05-23 18:21 ? 2021-05-23 18:21 There's also Cordless that might work on OpenBSD. It's a TUI client. But it's best to not use Discord at all :-) 2021-05-23 18:22 i like discord 2021-05-23 18:23 maybe i'll go back to freenode and sit in ##transphobia and cyberbully transphobes 2021-05-23 18:24 but that loses its appeal fast 2021-05-23 18:24 it's empty :((( 2021-05-23 18:24 lol good 2021-05-23 18:25 don't feel like being subjected to "40% lol two genders attack helicopter kek" 2021-05-23 18:26 what about ##terf 2021-05-23 18:26 ##gendercritical pls 2021-05-23 18:26 what's terf? 2021-05-23 18:26 terf is a slur 2021-05-23 18:26 :p 2021-05-23 18:26 Trans-Exclusionary Radical Feminist 2021-05-23 18:27 huh 2021-05-23 18:31 it's not actually a slur, that's just what terfs say when you rightly accuse them of being terfs 2021-05-23 18:31 but that's way off topic and i won't get into the weeds about it :p 2021-05-23 18:39 terfs are what we call "acceptable targets" 2021-05-23 18:42 ^ 2021-05-23 19:33 i heard qcow2 has some kind of version/state saving feature. do people actually use that. 2021-05-23 19:33 i guess it's called snapshotting 2021-05-23 19:34 as opposed to just something like fedora.~1~, fedora.~2~, etc 2021-05-23 19:39 Phew. FINALLY got the lawn mowed after 2 weeks of rain. 2021-05-23 19:46 johnjay: yah i use it actually 2021-05-23 19:46 you can actually snapshot from inside the console too 2021-05-23 19:46 snapvm i think? 2021-05-23 19:46 qemu console you mean? 2021-05-23 19:47 i just want to keep a base system i can access for testing. 2021-05-23 19:47 it's like saving a game. if you die you can respawn at the checkpoint (snapshot) 2021-05-23 19:47 so it might be easier to just do debian.qcow2 and debian2.qcow2 2021-05-23 19:48 right, there's basically two ways to do it: explicitly set up a qcow2 as a reference to another one 2021-05-23 19:48 and then you can commit changes from the second to the first explicitly 2021-05-23 19:48 or you can use the snapshot feature inside it and make as many as you want and delete old snapshots 2021-05-23 19:48 the former is neat, but it can't be done while the vm is running 2021-05-23 19:48 i see 2021-05-23 19:48 wait what do you mean commit changes? 2021-05-23 19:48 qemu-img commit i believe 2021-05-23 19:49 i just want a snapshot that doesn't change then work and update or whatever in the second one 2021-05-23 19:49 it copies changes in the second qcow to the firstone 2021-05-23 19:49 ok 2021-05-23 19:49 sure. that sounds like you want to create a qcow reference to the frist one 2021-05-23 19:49 johnjay, in qcow2's slang, it is named as copy on write: One can create a qcow2 copy on write image of an existing qcow2 image, using the next qemu-img command: qemu-img create -f qcow2 -o backing_file=original.qcow2 copy_on_write_file_for_original.qcow2 2021-05-23 19:49 Pro tip: If you have to mow a wet lawn spray the bottom of your mower with PAM cooking spray and marvel as nothing sticks. 2021-05-23 19:50 i think it's just s qemu-img create with a ... yeah what Oli said 2021-05-23 19:50 that's cool, ive just been copying some .qcows around recently 2021-05-23 19:50 also SkyZ discovred me on discord 2021-05-23 19:50 skyz is resourceful :P 2021-05-23 19:51 also note if you're using btrfs or zfs or something you can just let the fs do the snapshotting for you 2021-05-23 19:51 I tried the experimental zfs in ubuntu 20. snapshots every apt update 2021-05-23 19:52 i more or leess use btrfs on all my linux boxen now and use subvolumes fairly regularly 2021-05-23 19:52 or just reflink copies. if you'e smart about it you can do some neat stuff with it 2021-05-23 19:52 I was wondering what happened to SkyZ 2021-05-23 19:52 Nothing, apparently :p 2021-05-23 19:53 we had kicked him eventually 2021-05-23 19:53 for some reason my images are .img not .qcow2 is that wrong? 2021-05-23 19:53 since he just wouldn't stop 2021-05-23 19:53 but he hasn't yet discovered this 2021-05-23 19:54 but while i was reading the wiki page in the freenode channel link i stumbped upon the discord osdev thing 2021-05-23 19:54 which i hadn't checked in a year or two 2021-05-23 19:54 and then skyz discoveed me there 2021-05-23 19:54 geist: can you give an example in simple terms so i can understand? what sort of neat stuff? 2021-05-23 19:54 johnjay, if they are flat images you can use qemu-img convert 2021-05-23 19:54 geist, Just write their OS for them and let them put their name on it and they'll leave you alone. 2021-05-23 19:54 doug16k: no they are qcow but they are named .img for some reason 2021-05-23 19:55 ah 2021-05-23 19:55 jimbzy: well i dont want to diss on it too hard, there seems to be some actual discussions going on there, but there's some sort of air of... i dunno 2021-05-23 19:55 crass? 2021-05-23 19:55 hard to describe. like it's younger folks, which are fine. everyone is young 2021-05-23 19:55 but there's more likely to have shitposts or random rants in the channel topics or whatnot 2021-05-23 19:56 I can't say nothing because I am the master of the offtopic rant, but shitposting isn't my thing. 2021-05-23 19:56 also it's generally an asset to discord and slac and whatnot, but sometimes having 30 channels to cover a topic seems like it spreads things too thin 2021-05-23 19:57 geist: discord is more wild and crazy yes. simply for the reason it was founded as a gaming platform and has image/video thumbnail sharing. 2021-05-23 19:57 it also makes creation easier so more people have them 2021-05-23 19:57 whereas in irc it's less likely for me to have my irc server and you to have yours 2021-05-23 19:57 yah i dont really mind it except for all the usual reasons if will it be around in 5 years, etc 2021-05-23 19:57 I tried discord. then realized it was a "post pictures of questionable food all day" chat system 2021-05-23 19:58 You folks don't have your own IRC servers? 2021-05-23 19:58 well. probably not. but that is a high bar to pass 2021-05-23 19:58 actually i was wondering just last night if libera is connectable with old, unencrpted clients 2021-05-23 19:58 time to brush off my old irc client from my first OS 2021-05-23 19:58 I'm not 6667 2021-05-23 19:58 erm I'm not using encryption. Port 6667 2021-05-23 19:59 My hands are kinda sore from the vibration. 2021-05-23 19:59 discord (not that specific one) also seems to have a slight air of being careful not to annoy the discord admins, because they will just delete your whole "server" (guild) 2021-05-23 19:59 which is where you end up with harsh rules instead of just saying "use common sense please" 2021-05-23 19:59 immibis: yeah, exactly. the admin stuff is less distributed, so you're at the mercy of a few 2021-05-23 20:00 yea you can connect unencrypted 2021-05-23 20:00 the one that immediately sets me off a teensy bit is the osdev discod has a channel for beginners and then for more advanced osdev 2021-05-23 20:00 an the topic has a huge bold thing like DONT ASK ABOUT PAGING HERE!!!!11 2021-05-23 20:00 hahahaha 2021-05-23 20:01 almost certainly a joke and totally harmless, but it seems, i dunno 2021-05-23 20:01 "OS development centric discussions. || DO NOT ASK HOW PAGING WORKS HERE OR ANYTHING TRIVIAL RELATED TO PAGING. GO TO #beginner" 2021-05-23 20:01 this discord guild has rules like: editor war = ban. language war = ban. advertising = ban. not english = ban. anything against discord rules = ban. 2021-05-23 20:01 and you know that because they are not discord admins, they will take a broad view of what might be against discord rules 2021-05-23 20:01 in order to avoid missing anything that the actual admins don't like 2021-05-23 20:02 ah i see skyz just discovered the same discord channel 2021-05-23 20:02 started posting random links to pdfs 2021-05-23 20:02 doing the usual skyz topic drop thing 2021-05-23 20:02 Hehehe 2021-05-23 20:03 well anyway. i kinda feel sorry for him, tried to help but i suspect he has severe ADD or something 2021-05-23 20:03 i'm in several minecraft modding guilds and because one of the discord rules is "no video game cheating", any time someone asks for help and accidentally reveals they have a cheat installed, you must stop helping them immediately 2021-05-23 20:04 he just flits around between topics but can't actually stop and do the work he needs to do 2021-05-23 20:04 I got that, too, geist. ADD or ADHD or something. My ToDo lists are deeply nested. 2021-05-23 20:05 It could just be part of parenting a child with autism, too. Little nerd doesn't understand things like "Give me a minute" 2021-05-23 20:06 yah 2021-05-23 20:08 now im curious about the discord server 2021-05-23 20:08 lets see 2021-05-23 20:09 heat: i tried to give it a good try last year but it just seemed like the overall expertise level was too low 2021-05-23 20:09 and more importantly trying to help i didn't get a lot of serious uptake 2021-05-23 20:09 hard to describe but it didn't seem like folks asking for help really wanted it... i guess 2021-05-23 20:10 woah so many people 2021-05-23 20:10 but obviously there are good olks and so 2021-05-23 20:10 They want easy answers. 2021-05-23 20:10 yah i dont want to brush everyone with the same color, but it seems like the overall level of discourse is just lower than i think a good day here 2021-05-23 20:12 It is exactly how I feel about. However, they have a channel dedicated to sharing resources, and feel entices about taking a look at once I find a good time for. 2021-05-23 20:12 geist: i guess the level of discourse is set by many factors. discord does have the feeling of being a causal thing for gaming or like watching a movie with friends 2021-05-23 20:12 that's what i use it for 2021-05-23 20:12 enticed* 2021-05-23 20:13 like it would be weird to go into a common area and say hi want to talk about how to assemble ikea furniture? like you could but it's not really part of the "vibe" 2021-05-23 20:13 yeah I see what you mean 2021-05-23 20:13 yah i am on like 10 different discord servers 2021-05-23 20:14 but to a certain extent that's the problem. i dont have enough hours in the day to stay on top of all of them 2021-05-23 20:14 so i typically just ignore most of them most of the time 2021-05-23 20:16 just left the server, kinda meh 2021-05-23 20:16 but I did find geist though, so 10/10 2021-05-23 20:16 can you send me a couple of them to join? 2021-05-23 20:17 heat: yah i think i saw you but didn't send message 2021-05-23 20:17 LLVM is on discord now 2021-05-23 20:17 we went around as to where the officialy fuchsia channel is supposed to be on. i think we actually internally settled on zulip, which no one has ever heard of 2021-05-23 20:17 so thus no one uses, and the second 'official' channel is irc, which we just bounced to oftc 2021-05-23 20:18 j`ey: compiler internals being discussed in discord sounds fun lol 2021-05-23 20:18 I would bet most of it is "hurr durr code doesn't work help" 2021-05-23 20:18 lol 2021-05-23 20:19 I asked some linker questions there, and got some anwsers at least! 2021-05-23 20:20 really aside from the centralized ownership, will it be around, connecting from weird clients, and everything i can totally admit that slack/discord/etc are superior technically 2021-05-23 20:20 What's weird is FOSS projects being on Discord, which is known to be a botnet 2021-05-23 20:20 but there's something about irc just being a lowest common denominator that generally speaking sticks around 2021-05-23 20:20 cmrg: why? 2021-05-23 20:20 It just works. 2021-05-23 20:20 And it does just enough to be useful. 2021-05-23 20:20 probably because text Just Works 2021-05-23 20:21 because if you have a FOSS project, you have to use FOSS everything I guess? 2021-05-23 20:21 heat: Because Discord has nothing to do with the FOSS philosophy 2021-05-23 20:21 yeah for things like hanging out with friends and more casual stuff I like discord, it's a way funnier experience, but for technical stuff yeah, IRC is nice 2021-05-23 20:21 cmrg: you called it a botnet 2021-05-23 20:21 heat: https://spyware.neocities.org/articles/discord.html 2021-05-23 20:21 ​spyware.neocities.org: Discord — Spyware Watchdog 2021-05-23 20:22 "Further reading" has some more interesting articles 2021-05-23 20:22 nothing about it being a botnet tho lol 2021-05-23 20:22 interesting, i assumed the connection requirements to discord would make it too hard to botnet 2021-05-23 20:22 lol that's bullshit 2021-05-23 20:22 but i guess if you can roll a new login at any time its no big deal? 2021-05-23 20:23 in fact there's lots of illegal activity going on in discord that they literally can't ban 2021-05-23 20:23 geist: Good thing is that you can use Discord without a registered account, so I give them that 2021-05-23 20:24 nooo jimzy was killed! 2021-05-23 20:24 rip jimzy 2021-05-23 20:24 jim killed jimbzy 2021-05-23 20:24 hes dead jim 2021-05-23 20:24 what a monster 2021-05-23 20:24 jim on jim 2021-05-23 20:25 The Return of Jim 2021-05-23 20:25 jim 2 2021-05-23 20:25 also a big advantage of discord is that you can enforce 2FA, which is absolutely lovely 2021-05-23 20:25 didn't even need defibrillator 2021-05-23 20:25 no weird spammers like in IRC 2021-05-23 20:25 heat: There are spammers in IRC 2021-05-23 20:25 s/IRC/Discord/ 2021-05-23 20:25 the jimmassacre 2021-05-23 20:25 Hopefully, that won't be much of an issue after Tuesday when they install my new 1gbps service. 2021-05-23 20:25 cmrg, never met them 2021-05-23 20:25 well that's true. back in 2010 when #osdev was being completely slammed with He Who Shall Not Be Named 2021-05-23 20:25 I have, usually through DMs 2021-05-23 20:25 i was pretty much ready to give up irc 2021-05-23 20:26 eugh, yeah, that was the Bad Year 2021-05-23 20:26 was fairly convinced the whole thing couldn't sustain anything newer 2021-05-23 20:27 side note: double check that nickserv here and other new channels you were on isn't making things public you dont want 2021-05-23 20:27 i learned a while ago that oftc nickserv by default publishes your email, etc 2021-05-23 20:27 not that i care, but others might 2021-05-23 20:28 yeah, check your irc client realname as well 2021-05-23 20:28 might be blasting your gecos field to the world 2021-05-23 20:28 too bad IRC doesn't have an @everyone for PSAs like that 2021-05-23 20:28 yah i noticed i can get a cloak in oftc by checking a box but.... then nickserv info just goes ahead and shows the last ip address ic onnected from 2021-05-23 20:29 huh. bizarre 2021-05-23 20:29 seems pretty self-defeating 2021-05-23 20:30 wallops? 2021-05-23 20:33 afaik, there is a message type in irc that's directed at everyone in a channel 2021-05-23 20:34 geist: You can use nickserv and set "secure", "enforce" and "private" 2021-05-23 20:34 Some staff on #oftc said the default changed today, so 2021-05-23 20:34 ah good. i switched to private, though i realy dont care if folks know my email address 2021-05-23 20:34 it's all over github 2021-05-23 20:35 * gog meows 2021-05-23 20:36 exactly 2021-05-23 20:36 @everyone meow 2021-05-23 20:36 a few weeks ago I got emailed by a random dude that wanted me to teach him osdev 2021-05-23 20:37 That's nice. Was he arc4random? 2021-05-23 20:37 skyz dm'd me about a week ago 2021-05-23 20:37 * meisaka nyans 2021-05-23 20:37 sortie: no he used srand(time(NULL)); rand() 2021-05-23 20:37 OK. I went to a concert and am now three beers drunk and making noodles and it is time to pull an all nigher and wake up tomorrow with a Sortix IRC network. 2021-05-23 20:37 kircd 2021-05-23 20:38 yay 2021-05-23 20:38 i'm 0.5L beers drunk and I found a bug 2021-05-23 20:38 this makes me work so much better 2021-05-23 20:38 i'm sober and everything is terrible 2021-05-23 20:39 meisaka: that would be called a plain old message? (aka PRIVMSG) 2021-05-23 20:39 oh no everything is still terrible but with a taste of guinness in my moth 2021-05-23 20:39 mouth* 2021-05-23 20:39 My next opponent is sendmsg(2) failing because it's called on something that's not a socket (ENOTSOCK) 2021-05-23 20:40 sortie: the ircd is failing that way/ 2021-05-23 20:40 ? 2021-05-23 20:40 immibis: i thought was something else, but maybe my memory fails me 2021-05-23 20:41 kazinsal: Solanum, also used by libera.chat :) 2021-05-23 20:42 dormito: Yup. Gonna debug 2021-05-23 20:43 I had cl-ircd running yesterday, but too lazy to punch ports through my router, so no public access 2021-05-23 20:44 Woot go go froggey 2021-05-23 20:45 I get ENOTSOCK sometimes when getting dressed, due to the holes in it 2021-05-23 20:46 it's no longer a sock/ 2021-05-23 20:46 bah dieing laptop keyboard 2021-05-23 20:46 with a big enoug hole any sock becomes a leg warmer 2021-05-23 20:46 well, maybe only an ankel warmer 2021-05-23 20:47 doug16k: i'm gonna get you a pair of programmer socks 2021-05-23 20:48 they increase coding ability 2021-05-23 20:48 I need those 2021-05-23 20:48 OH 2021-05-23 20:48 God dammit 2021-05-23 20:48 find the issue already/ 2021-05-23 20:48 Y'all will NEVER believe why send(2) works on a TCP socket but sendmsg(2) doesn't 2021-05-23 20:48 Do they stack? 2021-05-23 20:49 ... I only implemented send(2) in tcp(4) and forgot to implement sendmsg(2) 2021-05-23 20:50 why are they different? 2021-05-23 20:50 Buncha extra parameters and iovec stuff 2021-05-23 20:50 I don't think I have ever called sendmsg in my entire life 2021-05-23 20:51 all my write/read/send/sendto/recv/recvfrom are implemented on top of sendmsg 2021-05-23 20:51 assuming you have a working sendmsg(2), it's only for unix sockets? 2021-05-23 20:51 I have a working sendmsg(2) for UDP 2021-05-23 20:52 oh 2021-05-23 20:52 https://github.com/heatd/Onyx/blob/master/kernel/kernel/net/socket.cpp#L1005-L1044 2021-05-23 20:52 ​github.com: Onyx/socket.cpp at master · heatd/Onyx · GitHub 2021-05-23 20:52 sendmsg is cool 2021-05-23 20:52 sendmmsg is much cooler 2021-05-23 20:52 yet to implement though 2021-05-23 20:53 And Unix sockets 2021-05-23 20:53 i thought you also needed sendmsg to provide datagram guarantees? 2021-05-23 20:58 is that MSG_CONFIRM ? 2021-05-23 20:58 what the heck does MSG_CONFIRM mean? 2021-05-23 20:59 reprobe via what ARP request? 2021-05-23 20:59 wait until it gets an ack? (well only on TCP) 2021-05-23 21:00 that would be kinda useful i guess: send this part of the socket and dont return until it has been fully acked by the other side 2021-05-23 21:00 s/socket/tcp stream/ 2021-05-23 21:00 geist: speaking of github, is there a way to reformat it or something? 2021-05-23 21:00 oh is this to quickly notice disconnections? 2021-05-23 21:01 johnjay: reformat what? 2021-05-23 21:01 oh wait nevermind 2021-05-23 21:01 ah I see they explain in arp(7), my bad 2021-05-23 21:01 well i went to my page and the icon i chose is huge but i chose small pixel size so it looks like crap 2021-05-23 21:02 but i went to klange github and his icon is also overly large 2021-05-23 21:03 i guess it's just the github site itself then 2021-05-23 21:21 I found a visualization of modern software running on modern hardware: https://www.shadertoy.com/view/4tGGW1 2021-05-23 21:21 ​www.shadertoy.com: Shader - Shadertoy BETA 2021-05-23 21:23 oh that's neat 2021-05-23 21:23 is that the clown from SS13? 2021-05-23 21:23 or are they both based on some well-known clown? 2021-05-23 21:24 just look at how that sprite is encoded 2021-05-23 21:26 this one is way beyond me how it works: http://glslsandbox.com/e#56547.0 2021-05-23 21:26 ​glslsandbox.com: GLSL Sandbox 2021-05-23 21:27 sort not math postdoc 2021-05-23 21:27 sorry not* 2021-05-23 21:28 I mean how do you make him look around like that and tween everything. geez 2021-05-23 21:31 * *** Checking Ident 2021-05-23 21:31 * Disconnected (Remote host closed socket). 2021-05-23 21:31 OMG 2021-05-23 21:31 geist2 is me as well, going to try irccloud for a bit and see how well it works for me 2021-05-23 21:31 sortie: this is your irc server you just wrote? 2021-05-23 21:31 he's porting 2021-05-23 21:31 geist2: solanum powering this pristine network 2021-05-23 21:32 slowortix? 2021-05-23 21:32 ? 2021-05-23 21:32 oh you know how folks used to say 'slowaris' when talking about solaris 2021-05-23 21:33 I've never actually had anyone talk to me about Solaris and meant it 2021-05-23 21:33 yah a bygone era really 2021-05-23 21:33 since solaris hasn't mattered in 10 years or so 2021-05-23 21:33 This irc did have a comment where someone raged against solaris stdio 2021-05-23 21:34 i remember way back in the day (say around 2000) it was kinda the gold standard of unix implementations 2021-05-23 21:34 we'd spend much more time in osdev circles talking about 'what does solaris do in this case' 2021-05-23 21:34 the gold standard of unix implementations is sortix 2021-05-23 21:34 lol no 2021-05-23 21:34 Though I have started to actually try 2021-05-23 21:34 sortix: not written in the 90s 2021-05-23 21:35 bsd: written in the 90s 2021-05-23 21:35 see a trend? 2021-05-23 21:35 doug16k The webbrowser I am using, min, freezes with that animation a bit of time in: It looks demo-y; and am definitely saving it and figuring out how to watch later: Thank you for sharing it! 2021-05-23 21:36 there are a lot of shaders on that site, not all so gpu intense as that 2021-05-23 21:38 that one is in my "oh my, how?" list though :) 2021-05-23 21:40 just the head movement and independence of head, the blinks are perfect, and how right the neck is, etc 2021-05-23 21:41 heh this M1 mac chews this one up 2021-05-23 21:41 can you link one that's particularly expensive? 2021-05-23 21:41 yeah 2021-05-23 21:41 selfie girl i guess 2021-05-23 21:41 https://www.shadertoy.com/view/WsSBzh 2021-05-23 21:41 ​www.shadertoy.com: Shader - Shadertoy BETA 2021-05-23 21:42 this gets about 4fps on the mac 2021-05-23 21:42 Ok. I think I got this setup right. 2021-05-23 21:42 https://www.shadertoy.com/view/MdX3Rr 2021-05-23 21:42 ​www.shadertoy.com: Shader - Shadertoy BETA 2021-05-23 21:42 brutal one 2021-05-23 21:42 though i guess the size of the viewport matters a lot 2021-05-23 21:43 oh the mac does fine on this one 2021-05-23 21:43 It reminded me about this whole 3:35 intro with music, in 4KB: https://www.youtube.com/watch?v=jB0vBmiTr6o 2021-05-23 21:43 good 30fps at 1280x720 2021-05-23 21:43 ​'elevated by Rgba & TBC | 4k intro (FullHD 1080p demoscene demo)' by Demoscene High-Quality Videos (Annikras) (00:03:36) 2021-05-23 21:44 oh the mountain one falls over if i go full screen on hte mac though 2021-05-23 21:44 at 4K 2021-05-23 21:44 Oli: Good eye, Inigo Quilez was involved in both 2021-05-23 21:46 Wait 2021-05-23 21:47 try this one: http://glslsandbox.com/e#5935.3 2021-05-23 21:47 ​glslsandbox.com: GLSL Sandbox 2021-05-23 21:47 I posted it before even visiting doug16k link LOL 2021-05-23 21:47 it will say your shader compiler rules or sucks 2021-05-23 21:47 Nice coincidence 2021-05-23 21:47 more mindreading today 2021-05-23 21:48 it renders "sucks" if your compiler precision isn't right 2021-05-23 21:49 it likes nvidia and intel 2021-05-23 21:50 it says "rules" on some amd I hope? 2021-05-23 21:50 it likes my amd on linux too 2021-05-23 21:50 on my machine at least 2021-05-23 21:51 Hmm, need to allow anonymous auth with my ircd 2021-05-23 21:51 ok for a sec I thought it might not be a legit test 2021-05-23 21:52 on my phone it's just "YOU GLS COM" and then some garbage. Seems legit 2021-05-23 21:53 the shader code comment mentions horrible floating point implementations that use 16 bit mantissa and throw zeros in the low 7 bits of result mantissa 2021-05-23 21:55 Anything for that throughput, right? 2021-05-23 21:55 yeah, and you can get away with pretty crap precision for graphics 2021-05-23 21:56 so much going on you can't notice a 2^-16 difference or smaller in the value 2021-05-23 21:57 maybe seams that flicker are worst thing, that's why you share the verts though and don't have t junctions: they all use the incorrectly calculated vertex coords :P 2021-05-23 21:59 I wonder if that causes trouble when porting e.g. the HDR rendering pipeline in unreal engine - or if they just give up and use LDR 2021-05-23 21:59 Like, tone-mapping ends up a bit wonky 2021-05-23 22:00 can be that big gpu doesn't have half precision and little one does and that makes it look worse 2021-05-23 22:01 Hmm I think my ircd can sendmsg(2) now but it doesn't seem to hear clients 2021-05-23 22:01 newest ones will have float16 though 2021-05-23 22:02 gotta half float16 so you can quote the stupidly high TFLOPS for it on the box :P 2021-05-23 22:02 have* 2021-05-23 22:03 sortie, recvmsg? 2021-05-23 22:03 sortie: bringing up irc on your own OS? libc? 2021-05-23 22:04 heat: Yeah I implemented it, although the program doesn't seem to be using it 2021-05-23 22:04 Might be a poll thing 2021-05-23 22:04 jaevanko: Yeah ircd and got my own libc 2021-05-23 22:04 sick 2021-05-23 22:05 a lot of servers like poll(2) 2021-05-23 22:05 servers usually don't like poll 2021-05-23 22:05 epoll is better ;) 2021-05-23 22:05 or, if you're a weirdo, kpoll 2021-05-23 22:05 excuse me, kqueue 2021-05-23 22:06 meisaka: Heck this thing here is even powered by an evolved version of the net stack you once contribed :) 2021-05-23 22:06 don't open this link unless your gpu is powerful: http://glslsandbox.com/e#45232.1 extremely difficult shader if you put it on "1" divisor at top 2021-05-23 22:06 ​glslsandbox.com: GLSL Sandbox 2021-05-23 22:07 probably slowest one I have 2021-05-23 22:08 I remember these shaders 2021-05-23 22:08 I ran across them when I was researching SDFs 2021-05-23 22:09 sortie: scary thought :P 2021-05-23 22:10 meisaka: It does.. uh have some scary TODOs left in the device driver parts 2021-05-23 22:11 I mean I totally reworked most of your contribution beyond recognition but the driver stuff semantics remains 2021-05-23 22:12 i feel so stupid 2021-05-23 22:12 posix reads like legalese 2021-05-23 22:12 "The value of the pgid argument is valid but does not match the process ID of the process indicated by the pid argument and there is no process with a process group ID that matches the value of the pgid argument in the same session as the calling process." <-- what the fuck does this mean 2021-05-23 22:14 The ARM manuals are similar for similar reasons. 2021-05-23 22:14 that is statement isn't it? 2021-05-23 22:15 There's a difference between the Intel-style "Describe what you've done" manuals and the "This describes how to implement it such that you don't end up screwing it up." 2021-05-23 22:15 I believe both the ARM manuals and the Posix standard are similar in that way. 2021-05-23 22:15 I agree it is hard to map that to a sensible interpretation 2021-05-23 22:15 It sounds like a description of matching up arguments with kernel state. 2021-05-23 22:16 where is the rest of the sentence though. is that really it? 2021-05-23 22:16 yes 2021-05-23 22:16 :O 2021-05-23 22:16 it's part of an errno 2021-05-23 22:17 https://pubs.opengroup.org/onlinepubs/009695399/functions/setpgid.html 2021-05-23 22:17 ​pubs.opengroup.org: setpgid 2021-05-23 22:17 that sounds to me like, you try to set a process group, but you're in the wrong session for it 2021-05-23 22:17 oh it returns EPERM in that case, that adds a ton of sense to the fragment 2021-05-23 22:17 ... I mean, that's telling you the conditions for a specific error. 2021-05-23 22:17 In that case, it makes a ton more sense. 2021-05-23 22:17 "If the following is true, return EPERM." 2021-05-23 22:18 It's not the most readable thing on the planet, but it is basically a legal document. 2021-05-23 22:18 https://man7.org/linux/man-pages/man2/setpgid.2.html 2021-05-23 22:18 ​man7.org: setpgid(2) - Linux manual page 2021-05-23 22:18 "To implement Posix, you must have this behavior." 2021-05-23 22:18 compare with the man7 page 2021-05-23 22:18 the difference is ridiculous 2021-05-23 22:20 they never specify the behaviour for a non existent pgid, or a pgrp without a leader 2021-05-23 22:20 I expect everyone to assume it does what linux does 2021-05-23 22:20 setpgrp() is even better, they say "If setpgrp() creates a new session, then the new session has no controlling terminal." but it's never specified whether or not it creates a session 2021-05-23 22:21 "It is unspecified whether this function behaves as setpgid(0,0) or setsid() unless the process is already a session leader. Therefore, applications are encouraged to use setpgid() or setsid() as appropriate." 2021-05-23 22:21 ?????????? 2021-05-23 22:21 it did in the predicate 2021-05-23 22:21 if it creates a new session 2021-05-23 22:22 no it doesn't, it never says whether or not it creates it 2021-05-23 22:22 If setpgrp() creates a new session, then... 2021-05-23 22:22 heat: I implemented this stuff correctly in Sortix I believe 2021-05-23 22:22 what part am I missing 2021-05-23 22:22 setpgrp does not make a session 2021-05-23 22:22 setpgrp is essentially UB 2021-05-23 22:22 you can implement it as setpgid(0, 0) or setsid() 2021-05-23 22:22 OK don't listen too much to me 2021-05-23 22:23 which one? who fucking knows 2021-05-23 22:23 heat: Don't implement setpgrp and getpgrp. 2021-05-23 22:23 Only setpgid and getpgid are sensible and portable 2021-05-23 22:23 it's implemented in the libc 2021-05-23 22:23 so it's currently doing what linux does 2021-05-23 22:24 Linux? How retro 2021-05-23 22:24 (setpgid) 2021-05-23 22:25 sortie: i think your setpgid is non-compliant 2021-05-23 22:25 you can setpgid a process group leader 2021-05-23 22:26 Oh no 2021-05-23 22:26 heat: I'm too much in the zone of my own deranged madness to think about progress groups right now :) 2021-05-23 22:27 don't worry I'm in my own deranged madness 2021-05-23 22:49 haha seeing if some old github code I have up still works, noticed my usb headset supports 32 bit float sample format lol 2021-05-23 22:49 8 16 24 32 formats! 2021-05-23 22:49 cuckoo 2021-05-23 22:52 as if it is saying, "let's see you find some audio code so stupid it doesn't work" 2021-05-23 22:52 good luck 2021-05-23 22:53 signed unsigned or float 2021-05-23 22:53 never seen sound device that overboard before 2021-05-23 22:54 it sounds like they covered all the bases 2021-05-23 22:54 stops at 48000. doesn't go to some ludicrous sample rate like some motherboard ones 2021-05-23 22:55 ugh, not even 88k? 0/10, not worth buying 2021-05-23 22:55 they are trying to cheat by hearing enemy footsteps in the game better 2021-05-23 22:56 if they want to cheat they should get quad speaker - 2 rear 2021-05-23 22:56 total cheat 2021-05-23 22:56 you can hear exactly where they are 2021-05-23 22:57 i'm sure anyone trying to use their sound card as a signal generator for electronics purposes appreciates high sample rates 2021-05-23 22:58 s16le@48khz or bust 2021-05-23 22:59 yeah, sane person usually throws it on that or 44.1 if even more timid 2021-05-23 23:00 1/65536th is small enough increment for mechanical thing pushing air around 2021-05-23 23:01 what if you are trying to run it at 1/6553 volume? Then you only have 11 steps of pushing. Can you hear it? no idea 2021-05-23 23:01 humans will dynamically compensate for the quiet and crank up their sensitivity 2021-05-23 23:01 I think 16-bit has _technically_ slightly less range than human hearing, but...doubt it ever matters in practice 2021-05-23 23:02 immibis: this is for the hw interface. When mixing you can use 24-bit or 32-bit formats 2021-05-23 23:02 (f32 is effectively 24-bit fixed-point) 2021-05-23 23:03 at the end of the day ya it is 24 bit sample 2021-05-23 23:03 with capability to have unusably high precision for lower numbers 2021-05-23 23:03 and handle input that is way past clipping and have volume scale it down before it is ruined 2021-05-23 23:07 you might be just mixing sine waves in iDCT or something and it can handle whatever scale, whatever sample rate, and is float already. 2x bandwidth of 16bit sample though 2021-05-23 23:10 I wish I had more lifetime totals known. like total disk read DMA, total keypresses, mouse distance, total number of sound card irqs, total sound card bus master TLPs 2021-05-23 23:11 imagine how many times a soundcard fetched data from ram just for you? 2021-05-23 23:11 a lot 2021-05-23 23:12 sound card is crazy one because humans need super tight latency 2021-05-23 23:12 we can hear where you are from sound that bounced off rocks man 2021-05-23 23:13 OK, looks like my ircd port is able to receive from and send to clients. The auth doesn't quite seem to be working or something. 2021-05-23 23:13 when you come to kill us 2021-05-23 23:13 Feels like a good time to give up before it's suddenly 3-4 AM 2021-05-23 23:15 I don't usually know when to give up on projects, which is why I get no sleep 2021-05-23 23:27 Knowing when to stop is a skill in its own right... 2021-05-23 23:28 I have a project called "Fast"SpectrumAnalyzer and UI update perf sucks in gnome lol 2021-05-23 23:29 on 3950x + 2060 super, somehow 2021-05-23 23:30 when I named it it was smooth as glass on windows qt :P 2021-05-23 23:31 How is that possible? 2021-05-23 23:32 perf top blames memcpy 2021-05-23 23:32 I guess I should gprof it 2021-05-23 23:32 That just blows my mind. 2021-05-23 23:32 it should be 60fps near zero cpu on athlon64 800MHz 2021-05-23 23:33 with 2d accelerator 2021-05-23 23:33 That's bad. 2021-05-23 23:34 Wanna get drunk about it? 2021-05-23 23:34 lol 2021-05-23 23:34 ;) 2021-05-23 23:37 I should go all the way and put an opengl 3.3 renderer in there 2021-05-23 23:37 stutter that! 2021-05-23 23:43 is there a way to check for debug info sanity? 2021-05-23 23:43 objdump -S the whole thing - it'll whine about dwarf to stderr 2021-05-23 23:43 that'll get some anyway 2021-05-23 23:44 I have made it screw up the debug info and it spammed a bunch of complaints about "abbrev" things 2021-05-23 23:45 for instance 2021-05-23 23:45 i do have a dwarf error 2021-05-23 23:45 I'm not sure if it's ok though 2021-05-23 23:45 likely ok. depends on whether you have gdb blowing up or asserting or disconnecting or it's fine 2021-05-23 23:46 i'm getting this thing where gdb gets completely screwed up when debugging my clang-built kernel 2021-05-23 23:46 works fine with gdb 2021-05-23 23:46 err, gcc 2021-05-23 23:46 for a while there were a couple of spots I couldn't step. it went away after I improved something in the link 2021-05-23 23:47 it didn't know line number info 2021-05-23 23:47 one region actually of assembly 2021-05-23 23:47 my assembly has full source level debug info 2021-05-23 23:48 I was getting those abbrev complaints 2021-05-23 23:48 I think it was having things that it thinks *must* be writable and they aren't 2021-05-23 23:49 hard to imagine how that causes it though 2021-05-23 23:49 I gave up and let stupid things like init_array be writable 2021-05-23 23:50 gonna write that eh? lol 2021-05-23 23:50 got too 2021-05-23 23:51 it is absolutely convinced you will write the got 2021-05-23 23:51 it doesn't know you are god 2021-05-23 23:52 you said "let the got be initialized" earlier, when it wasn't paying attention 2021-05-23 23:53 i am god 2021-05-23 23:54 *pets gog* 2021-05-23 23:55 i am gog 2021-05-23 23:55 doug16k, yeah I assume I might be screwing up the linker script and that is screwing it all up 2021-05-23 23:56 I would try to put it all nicely going with the flow and see if it goes away. no weird writable in readonly or funny business 2021-05-23 23:57 and never use align before/after : in output section 2021-05-23 23:57 always play with . before, then let it lie 2021-05-23 23:58 ld might go "no actually it needs to be even more aligned" if you play with dot before. with it in output section declaration you are a crazed guy that pulled a gun and ld says "ok ok!" 2021-05-24 00:03 forcing it to violate the input section's request(s) 2021-05-24 00:06 at gunpoint 2021-05-24 00:06 you shouldn't pull your gun in ld script :P 2021-05-24 00:08 to be clear: .text ALIGN(4K) : { *(.text); } <-- bad. good --> . = ALIGN(4K); .text : { *(.text); } 2021-05-24 00:09 omg talking to skyz again is so frustraing 2021-05-24 00:09 yeah I don't do that 2021-05-24 00:09 it's like he switches topics in the middle of a sentence 2021-05-24 00:09 says some random thing and then you ask what he means and he switche sto some other random thing 2021-05-24 00:09 not worth imo 2021-05-24 00:10 i know it isn't. it's just like this AI that's trying to frustrate you 2021-05-24 00:13 probing for a way to get you really interested in answering? 2021-05-24 00:14 what is it you can't resist responding to 2021-05-24 00:14 well, now he's taling to me about fuchsia 2021-05-24 00:14 like asking me questions but then switching topics halfway 2021-05-24 00:15 i ask for clarification and then he just asks another question or makes some random statement 2021-05-24 00:15 ah I hate that when I get a technical question and they don't even want the answer 2021-05-24 00:15 this is on discord, he discovered me there because of the discord osdev server presumably 2021-05-24 00:16 now he's telling me we should scrap fuchsia because he doesn't like the 'theme' 2021-05-24 00:16 then i ask him what theme means and he switches to something else 2021-05-24 00:17 it's the wallpaper /s 2021-05-24 00:17 i guess he doesn't like the color or typing the word or something 2021-05-24 00:17 people have some pretty wild ideas of what is happening in a computer 2021-05-24 00:17 the great thing about fuchsia is that you learn to spell fuchsia 2021-05-24 00:17 yah and i'm usually very willing to help someone bootstrap themselves 2021-05-24 00:17 as if the render of the desktop is anything that matters at all to the project 2021-05-24 00:18 heat: yeah right? took me about a year to really nail the word 2021-05-24 00:18 they have to be capable of being helped though 2021-05-24 00:18 and some people just... aren't. 2021-05-24 00:18 if skyz hadn't at least demonstrated some sort of ability to follow a tutorial and actually get some sort of hello world thing... 2021-05-24 00:18 most of the time it's really an unwillingness, but in that particular case I think it's something a little bit less worth speculating on 2021-05-24 00:18 in the entire project block diagram, I find it hard to picture the tiny little box where the theme is 2021-05-24 00:18 but they occasionally have some sort of focus, but otherwise it's just like a random noise generator 2021-05-24 00:19 anyway sorry. had to rant a little bit 2021-05-24 00:19 upgraded from markov chain to tensor grid maybe 2021-05-24 00:19 Hah 2021-05-24 00:20 only a matter of time before they discover this channel though 2021-05-24 00:20 so be ready 2021-05-24 00:20 * kazinsal hands out the +5 warhammers of +b 2021-05-24 00:20 ban? 2021-05-24 00:20 worked great last time around 2021-05-24 00:20 yep 2021-05-24 00:21 yeah, it's going to have to be ban + ignorelists 2021-05-24 00:21 also while i was digging through my irssi config i had a ignore list a mile long. guess i should try ditching that and see what happens 2021-05-24 00:21 most of them are aholes from years past that popped into osdev 2021-05-24 00:22 and were generally just noise makers but not really ban level 2021-05-24 00:23 ah yes, anyone remember Mathis? 2021-05-24 00:23 early to mid 2000s i think i eventually jsut ignored him 2021-05-24 00:23 Yea 2021-05-24 00:24 he had good knowledge but had some UI issues 2021-05-24 00:24 I'm pretty sure I saw them in a math channel I hang in. 2021-05-24 00:25 had the classic 'belittle the person that doesn't already know something' issue 2021-05-24 00:26 Well, that would explain why they're not in there anymore. That sort of thing usually doesn't fly. 2021-05-24 00:26 right eventually it gets toxic enough that no one comes around anymore 2021-05-24 00:27 That's how the world was before the internet, geist. 2021-05-24 00:28 what before everyone had a soapbox to spread their toxicity? 2021-05-24 00:28 guess i better go mow the damn lawn. it wont mow itself 2021-05-24 00:29 moon-child: If your software volume is 1/6553 then the output of the mixer still needs to have enough precision, and I hear the human ear has very good dynamic range 2021-05-24 00:29 and it's gonna start raining again 2021-05-24 00:29 No, the whole "My knowledge > Your knowledge" thing 2021-05-24 00:29 The trades are like that in a lot of ways. 2021-05-24 00:29 geist: eh, I've just had to accept mowing in the rain. Never seems to be enough dry days in PNW 2021-05-24 00:29 TIL clang has -Wdocumentation, checks doxygen documentation 2021-05-24 00:30 Nothing worse than being trained with just enough information to do your job poorly so the managers are always on your back. 2021-05-24 00:30 Just spray your mower deck with PAM Cooking Spray. 2021-05-24 00:30 No more clumping under the deck :) 2021-05-24 00:30 or get out the 6' finish mower for the tractor 2021-05-24 00:30 immibis: yes, that's why the mixer _mixes_ at higher precision. Once it's done mixing, it requantizes to whatever the hardware supports 2021-05-24 00:31 kc8apf, That'd be great for an urban lot. One pass and you're done. 2021-05-24 00:32 heat: you are not gog 2021-05-24 00:33 moon-child: and then all your nice 24-bit values in the range 0-2550 get rounded to the nearest value between 0 and 10, giving you a 3.5-bit sound output? 2021-05-24 00:33 * heat meows 2021-05-24 00:33 I am gog. 2021-05-24 00:33 (after division by 256) 2021-05-24 00:33 (just estimating the numbers) 2021-05-24 00:33 you're not even a reasonable facsimilie of me 2021-05-24 00:34 you could be tho... 2021-05-24 00:34 google tells me the human ear has a dynamic amplitude range of 100000x, so you could hear both sounds that go from 0 to 65535, and sounds that go from 0 to 1, but the latter will have hardly any precision 2021-05-24 00:34 (of course you couldn't hear both at the same time) 2021-05-24 00:35 (so the human ear hears in floating-point) 2021-05-24 00:35 immibis: so what's your proposed solution? Again, the dag only supports s16le 2021-05-24 00:35 *dac 2021-05-24 00:36 well if the dac only supports 16-bit then of course you can't improve that - you can just tell the user to adjust their volume. But I hope that illustrates why someone might want a better format. 2021-05-24 00:36 I don't think 24-bit DACs are practical, much less 32, but you could have a 16-bit one with a varying reference voltage, i.e. native floating-point 2021-05-24 00:36 doug16k's headphones support 32-bit output 2021-05-24 00:37 for real or for marketing? 2021-05-24 00:37 they can output precise nanovolts? 2021-05-24 00:37 no idea 2021-05-24 00:37 immibis: I think some of that 100000x range is dependent on the ear drum tightening in loud environments to attenuate somewhat, so I don't think you get all of that dynamic range at the same time 2021-05-24 00:39 no it won't be extra precise. funny that you can use that format though, it accepts it 2021-05-24 00:39 as if 16 bit isn't good enough 2021-05-24 00:39 come on 2021-05-24 00:39 chances are the masters were 24-bit and then what was actually released was 16-bit so if you're shoving that back into a 24-bit or 32-bit DAC you're actually listening to the computer making noises up 2021-05-24 00:40 yeah the extra bits give you good sound when it is really quiet part 2021-05-24 00:40 movie sound I agree, 16 is barely enough 2021-05-24 00:40 16 bits plus a decent dither is plenty 2021-05-24 00:42 good to have a few more orders of magnitude to deal with human ability to hear in near silence and thundering noise 2021-05-24 00:43 like the blackness in tv screens. crazy about how black it can be. it is also black when it is off :P 2021-05-24 00:44 they used to think that if they made it bright enough to cause eye damage, everyone would have to buy it 2021-05-24 00:45 I sure would love to have more oled screens in my life 2021-05-24 00:48 I should make the cache line ping pong measurement repeat the measurement and keep the best time, to try to get rid of noises 2021-05-24 01:08 omg I just realized what units those results are in 2021-05-24 01:08 that is how many nanoseconds for it to pingpong a line 3 MILLION times 2021-05-24 01:09 seems too fast 2021-05-24 01:09 45 nanoseconds to pingpong value 3 million times? in nearby core? 2021-05-24 01:10 yah doesn't sound right 2021-05-24 01:10 is that believable? 2021-05-24 01:10 think of it, if it ping ponged at 1ns it'd only be able to do 45. if it was running at 10ghz it'd only be able to do it 450 2021-05-24 01:11 er i mean ping ponged every clock at 1ghz 2021-05-24 01:11 yeah I must be canceling out 3M somewhere 2021-05-24 01:11 oh duh it divides 2021-05-24 01:11 45 *per bounce* actually seems more right, i think 2021-05-24 01:11 ya it's per bounce 2021-05-24 01:12 i believe i've seen numbers in that range, especially on Zen which i think is still somewhat behind intel when it comes to low level cache stuff like that 2021-05-24 01:12 https://github.com/doug65536/xcpuperf/blob/main/xcpuchk.cc#L14 2021-05-24 01:12 ​github.com: xcpuperf/xcpuchk.cc at main · doug65536/xcpuperf · GitHub 2021-05-24 01:13 good part line 75 2021-05-24 01:13 er, 70 2021-05-24 01:14 ya but way more cache on the zen 2021-05-24 01:14 easy for smaller cache to have less latency 2021-05-24 01:14 also depends on if we're talking about bouncoing L1s between cores on the same zeppelin, across zeppelins, etc 2021-05-24 01:15 and if pre zen 3 which half of the zeppelin 2021-05-24 01:15 you saw my result matrix right? 2021-05-24 01:15 iirc i remember something like 10ns for close L1s and something like 70 or so for ones far away 2021-05-24 01:15 nein. 2021-05-24 01:15 https://pasteall.org/media/3/1/31b83343e1b4cca35906062100b91ff4.png 2021-05-24 01:15 anandtech has some matricies too 2021-05-24 01:15 ah yeah 2021-05-24 01:15 this is my 3950x - low end of what you expect because 2400 mem 2021-05-24 01:15 yours is better 2021-05-24 01:16 I was curious what this says for a numa with far away cpus 2021-05-24 01:16 actually a little surprised cores on the same SMT pair aren't basically instant 2021-05-24 01:16 kinda implies that 45 may be some sort off floor? 2021-05-24 01:16 they are taking turns I guess 2021-05-24 01:16 45 number has SMT thread off 2021-05-24 01:17 going full speed 2021-05-24 01:17 and then the pair seems to be 100ish 2021-05-24 01:17 108 number has two threads fighting over execution 2021-05-24 01:17 yah 2021-05-24 01:17 i thin the anandtech matrices have that factored out somehow, or they leave SMT out of it because it just generates noise 2021-05-24 01:17 but the data is not all perfectly regular like you would expect 2021-05-24 01:17 they have similar graphs but i think the numbers are about half or so 2021-05-24 01:18 must be some multihop network 2021-05-24 01:18 so maybe they're /2 2021-05-24 01:18 well yeah remember your zen 2 16 core is two zeppelins each with 2 sets of 4 2021-05-24 01:18 so there's stuff on the same L3, stuff on a nearby L3 and stuff on a faraway L3 2021-05-24 01:18 ya it's 4 quad cores with pairs of quads per die 2021-05-24 01:18 zen3 integrated it so that each zeppelin is at least one big L3 2021-05-24 01:19 ya this is 3950x (zen2) 2021-05-24 01:19 anyway, afk for a few 2021-05-24 01:19 each quad core has its own 16MB L3 2021-05-24 01:20 64MB L3 all together 2021-05-24 01:20 wooh 2021-05-24 01:20 zen3 one makes it two 32MB L3s on 5950x 2021-05-24 01:20 one bit L3 for 8 cores 2021-05-24 01:21 one big 2021-05-24 01:21 spent half day using Visual Basic, kept adding ; at the end of the line until it drove me insane, now im back to C and im not putting ; at the end of lines :P 2021-05-24 01:22 I tend to do that when going between python and javascript 2021-05-24 01:25 hehe :D 2021-05-24 01:26 shoot me if C++ ever gets automatic semicolon insertion 2021-05-24 01:27 being able to skip it in js drives me nuts 2021-05-24 01:28 on parse error, back up to last newline and try again with a semicolon there 2021-05-24 01:28 cuckoo 2021-05-24 01:30 yee 2021-05-24 01:43 i think you could shorten that to 2021-05-24 01:43 on javascript ... drives me nuts 2021-05-24 01:45 become a javascript interpreter 2021-05-24 01:45 run code in your brain 2021-05-24 01:46 then immediately observe the brain rot set in? 2021-05-24 01:47 do you think that is a feasible approach for most websites? 2021-05-24 01:47 using a text based browser 2021-05-24 01:47 some* websites 2021-05-24 01:47 have user attempt to manually interpret javascript and reparse website 2021-05-24 01:48 so if they have something they care about, they can do that 2021-05-24 01:49 I wrote a text based browser which does that 2021-05-24 01:49 you don't have javascript interpreter so user has to interpret javascript manually 2021-05-24 01:49 geist, so you aren't switching to just throwing npm modules into a project until it's done. got it 2021-05-24 01:51 you edit raw html then reparse using a keybinding 2021-05-24 01:51 all vi keybindings + all vi features 2021-05-24 01:51 something simple like ajax request can be changed into link that you open in new tab 2021-05-24 01:52 trying to use this web browser full time 2021-05-24 01:54 $ npm install bare-metal 2021-05-24 01:55 its also possible to write a script for websites that you need but require javascript that allows you to possibly simulate javascript 2021-05-24 01:55 seL4: That sounds painful and error-prone 2021-05-24 01:55 What do you script in? 2021-05-24 01:56 vimscript 2021-05-24 01:56 Is the whole thing a vim plugin? 2021-05-24 01:56 ZombieChicken: yes but thats why you do it only for important sites 2021-05-24 01:56 no not a vim plugin 2021-05-24 01:57 seL4: No site is important enough for me to parse JS mentally (which would require me to learn JS to begin with), then try and run a loosely-types, dynamic language in my head. I have enough headaches as it stands... 2021-05-24 01:58 One big advantage: if you don't like what the JS on the site does, you can just pretend it does something else 2021-05-24 01:58 my school website requires js but is an ajax request so I just manually parse or script it 2021-05-24 01:58 yeah, you can do that 2021-05-24 02:01 doug16k: honeslty i've written like zero javascript 2021-05-24 02:02 i'm just parroting the usualc omplains 2021-05-24 02:06 I started js in netscape navigator 2021-05-24 02:06 win3.1 trumpet winsock :P 2021-05-24 02:07 omg my js code I saw from then is hideous 2021-05-24 02:07 there was no ajax it was so bad 2021-05-24 02:07 contraptions to reload the page for everything and reconstruct state somehow, lol 2021-05-24 02:08 hilariously easy today 2021-05-24 02:16 or even make something change on the page without reloading, once you are super elite 2021-05-24 02:16 now you just laugh and put a 3d matrix somewhere and whole site flies around 3d 2021-05-24 02:19 tween a bunch of animations of hierarchical transformations 2021-05-24 02:55 now I made it so it recalibrates itself to make the test run take 1ms, then takes best of 100 runs. if it catches an iteration under 1ms it recalibrates for that and starts over 100 iters: https://gist.githubusercontent.com/doug65536/47a34e6701f7f222f79923441a72abd5/raw/2051826f3cf75662b0634dd30e0d028fc373d773/gistfile1.txt 2021-05-24 02:55 per number of output 2021-05-24 02:55 that should be right 2021-05-24 02:57 took the tape hiss out of the data 2021-05-24 03:04 hi all :) 2021-05-24 03:05 I guess if you just looked at the cache cpuids you could be told this information, but not the absolute latency 2021-05-24 03:06 just vague relative idea 2021-05-24 03:21 man gcc is doing a thing where the first step of a function is the return at the end, then step starts stepping the function. really? 2021-05-24 03:22 I'm like, oh returning eh? thinking... and it isn't 2021-05-24 03:22 stupid 2021-05-24 03:44 hmm am i just being stupid right now, messing around with 64bit int and i just did this for testing and, there must be an easier way to achive that? 2021-05-24 03:44 https://pastebin.com/Y8vz6akn 2021-05-24 03:44 ​pastebin.com: uint64_t blank = DEFAULT_TEXT_ATTR | 0x20; blank <<= 16; blank |= ( - Pastebin.com 2021-05-24 03:45 one multiply will do it 2021-05-24 03:45 uint64_t blank = (DEFAULT_TEXT_ATTR | 0x20) * 0x0001000100010001; 2021-05-24 03:45 cpu will gobble it up 2021-05-24 03:46 oh cool 2021-05-24 03:47 thanks! 2021-05-24 03:50 it's also entirely likely the compiler will just figure it out if you do it the slow way 2021-05-24 03:50 it'll just movabs a constant and be done 2021-05-24 03:50 if it was 1999 I might say: uint64_t blank = (DEFAULT_TEXT_ATTR | 0x20); blank |= blank << 16; blank |= blank << 32; 2021-05-24 03:50 which is still probably the fastest way to get bottom 8 bits into all the bytes 2021-05-24 03:51 for memset, etc 2021-05-24 03:52 doug16k: i am going a bit daft though, the mul by 0x00010001... that broadcasts it across the register? 2021-05-24 03:52 yes 2021-05-24 03:52 assuming the lhs is not too wide 2021-05-24 03:52 if wide then carry makes a mess 2021-05-24 03:52 in all my years of programming i've never considered using a mul like that as a broadcast 2021-05-24 03:52 then it'd have more 0 in the rhs 2021-05-24 03:53 I guess just doing software mul on 8 bit made me realize 2021-05-24 03:53 i guess it's ecause tradtionally doing the mul and getting the constant in registers and wahtnot have not been faster than shift and or 2021-05-24 03:53 of doing big mul with fragments of not so big mul 2021-05-24 03:53 or* 2021-05-24 03:54 most arches i've seen dont have a mul by immediate eitehr, so you have to first get the thing into a register 2021-05-24 03:54 ya 2021-05-24 03:54 (except for mul by small immediate via shift, etc) 2021-05-24 03:55 you won't beat the mul with shifts on ooo x86s 2021-05-24 03:56 same 2021-05-24 03:56 fewer instructions with mul 2021-05-24 03:56 less backend resources 2021-05-24 03:57 should be 2 cycle latency if you use low half and 3 if you use whole thing. this uses low half only 2021-05-24 03:58 you get low half in 2 but can't get high half until 3 2021-05-24 03:59 you might end up where it could issue shifts sooner than a mul 2021-05-24 03:59 so it depends like always 2021-05-24 04:03 all else being equal, fewer instructions helps emulation 2021-05-24 04:03 and translation 2021-05-24 04:16 rest are muxed to add zero 2021-05-24 04:16 or whatever optimizer did that is same 2021-05-24 04:17 64 adders that may or may not add lhs shifted by an amount to the total 2021-05-24 04:18 where "an amount" is 0 thru 63, one for each bit of rhs 2021-05-24 04:18 if that rhs bit is 1, it is added 2021-05-24 04:19 that's the theory of * 0x0001000100010001's operation 2021-05-24 04:21 adds it once at << 0, once at << 16, once at << 32, once at << 48 2021-05-24 04:22 starting at rightmost bit 2021-05-24 04:22 I should have said 48 32 16 0 2021-05-24 04:22 same thing 2021-05-24 04:25 blows me away that mul is essentially a chain of 64 64bit adders and 2 cycle latency 2021-05-24 04:26 gives you an idea how easy "add" really is 2021-05-24 04:27 add two numbers is a waste apparently 2021-05-24 04:27 could do way more work in that cycle 2021-05-24 04:43 add is like being given an hour to do something you could do in two minutes, right? if mul can stack 32 of them in 2 cycles? 2021-05-24 04:44 er 64 of them 2021-05-24 04:45 they don't naively stack them of course. they ingeniously optimize it, but still, the spirit is still there 2021-05-24 06:54 yay! now can flick uefi to use my fat32 and iso impl in bootloader using block apis instead of uefi, or switch it to use the uefi fs. had to do all my utf8 or utf16 handling tricks (tchar) in fs since usable in uefi now 2021-05-24 07:09 well, mul is also an example of 'dont look at how the sausage is made' 2021-05-24 07:09 as in sooo much hardware 2021-05-24 07:09 serial adder... but that's probably not the fastest implementation 2021-05-24 07:12 shift 2021-05-24 07:12 gg'moin 2021-05-24 07:12 Hello, I want to intercept COM1 interrupts with an x86 vmx hypervisor. What are the right & reasonably efficient settings in the VMCS to do so? 2021-05-24 07:14 Also, mixed feelings about the libera move -- as a very casual irc user these days I wish there was a web client for libera like webchat.freenode.net 2021-05-24 07:14 how can you even stand to use a web client 2021-05-24 07:15 native one feels way better 2021-05-24 07:15 any second web client is going to find some excuse to make you not in the room 2021-05-24 07:15 ​kiwiirc.com: KiwiIRC - The webIRC client 2021-05-24 07:15 radens: https://kiwiirc.com/ 2021-05-24 07:15 doug16k: I only use irc to ask questions in this channel. My only machine on 24/7 these days is behind a corporate firewall, so there isn't much to lose. 2021-05-24 07:15 Kiwi's always been okay if you want a web client. There's no reason for Libera to self-host one, and there was no reason for Freenode to do so. 2021-05-24 07:16 neatg 2021-05-24 07:16 -g 2021-05-24 07:16 yeah. Might be worth endorsing it though 2021-05-24 07:16 officially 2021-05-24 07:16 Libear actually links to Kiwi. 2021-05-24 07:16 https://libera.chat/guides/clients 2021-05-24 07:16 ​libera.chat: Choosing an IRC client | Libera Chat 2021-05-24 07:16 Kiwi is good. I just appreciated the freenode hosted web client. It made it easier to get into irc especially considering the aforementioned corporate firewall 2021-05-24 07:18 Anyway, anyone have any advice re the vmcs config? 2021-05-24 07:34 24.9.3 ? 2021-05-24 07:36 enable "external-interrupt-exiting" 2021-05-24 07:38 26.7.5 2021-05-24 07:38 klange: do you know why the logs are no longer available? 2021-05-24 07:38 for download 2021-05-24 07:43 doug16k: yeah, so I enabled that, and I'm not sure how I'm supposed to know which interrupt I got. Also, frankly I'm a little fuzzy on the correlation between IOAPIC register table number and IDT vector and ISR number, and maybe the PIC is involved in all of this too? 2021-05-24 07:43 1st one I mentioned 2021-05-24 07:43 you know where pic is? 2021-05-24 07:44 pic is a special delivery type 2021-05-24 07:44 Special delivery type? 2021-05-24 07:44 one sec let me see where to look in manual 2021-05-24 07:46 pic is exint 2021-05-24 07:47 10.5.1 2021-05-24 07:48 not seeing anywhere you get that 2021-05-24 07:49 pic goes into LAPIC yeah 2021-05-24 07:49 special delivery type 2021-05-24 07:50 it doesn't do anything with it. must be level assert deassert or something 2021-05-24 07:50 doesn't latch it in IRR or whatever I mean 2021-05-24 07:50 no EOI 2021-05-24 07:50 you sidestep LAPIC to EOI it directly into it 2021-05-24 07:51 presumably that sends a level deassert to LAPIC 2021-05-24 07:51 This damn architecture 2021-05-24 07:51 or platform? 2021-05-24 07:51 Hell where does one end and the other begin? 2021-05-24 07:51 doom for dos works on 3950x 2021-05-24 07:51 in dos 6.22 2021-05-24 07:52 that's why 2021-05-24 07:54 People want doom for dos to run, but they don't actually care if it secretly runs in dosemu 2021-05-24 07:54 I will hold a vigil when dos 6.22 doesn't work on an x86 processor 2021-05-24 07:56 I will hold a candle and then stop off at the bar to rejoice on the way home 2021-05-24 07:58 I want the compatibility to hold long enough that one fetch cycle can get the entire function for at least 75% of doom's functions 2021-05-24 08:09 klange: nm, he fixed it, stats are working now 2021-05-24 08:16 you should see how it runs though. timedemo is hilarously fast on baremetal 2021-05-24 08:17 probably due to literally 100% cache hit rate 2021-05-24 08:18 it's practically cache-as-ram in DOS 2021-05-24 08:18 dos thinks one of my 4 16MB L3 is a lot of ram 2021-05-24 08:19 so you run smartdrv with large cache 2021-05-24 08:20 now smartdrv is L3. so now it's disk-as-fast-as-l3 2021-05-24 08:20 doug16k: do you know the right way to figure out which interrupt triggered the vm exit if I use the execution control bit you recommended? 2021-05-24 08:20 so you sit there at 100% hitrate and your disk I/O is basically an L3 backed ramdisk 2021-05-24 08:21 There's a bunch of field which look promising, but they are all set to zero when an interrupt occurs. 2021-05-24 08:23 yes that was the 1st thing I pointed to 2021-05-24 08:23 24.9.3 Information for VM Exits That Occur During Event Delivery 2021-05-24 08:24 are you already reading the vectoring information field? 2021-05-24 08:25 I think so, but let me do a build which explicitly prints it out 2021-05-24 08:26 external-interrupt-exiting is 1 2021-05-24 08:26 right? 2021-05-24 08:26 yep, because my basic exit reason is external interrupt 2021-05-24 08:26 ok 2021-05-24 08:26 There's another one which is named similarly but is also 0 2021-05-24 08:26 let me see here 2021-05-24 08:27 you get the vmexit even if they are in cli 2021-05-24 08:27 in case you didn't know 2021-05-24 08:27 makes sense right? 2021-05-24 08:27 24.9.2 2021-05-24 08:27 (also 0) 2021-05-24 08:28 guest rflags is 202 2021-05-24 08:28 But yes I will need to enable interrupt window exiting and cache interrupts which come in while IF=0 2021-05-24 08:30 yes and manually reinteject them right? 2021-05-24 08:30 I think I will need an array of like 255 counters for that, and I may need to consult the ioapic to see if the cpu which received the interrupt is program to actually service it? Not really sure, I don't understand the interactions between the lapic and ioapic and vmcs 2021-05-24 08:30 doug16k: yes, that's the plan 2021-05-24 08:30 you play cpu and poke their interrupt frame in and put them in the ISR? 2021-05-24 08:31 I don't think they get an interrupt frame unless I inject it, right? 2021-05-24 08:31 idk 2021-05-24 08:31 And I can't inject it if it's zero, right? 2021-05-24 08:31 eflags.if? right 2021-05-24 08:32 guest rflags is 202 2021-05-24 08:32 I think I'm in "read the bochs source" territory here 2021-05-24 08:32 1st 2 is if=1 2021-05-24 08:32 yup 2021-05-24 08:32 cue beetles number 9 weird song 2021-05-24 08:33 bea* 2021-05-24 08:33 Good morning osdev! 2021-05-24 08:33 uh doug16k is your bochs fork on github? Just want to browse reasonably up to date bochs source on the interwebs 2021-05-24 08:33 It is I. sortie. In this new beautiful libera realms of ours. 2021-05-24 08:34 g'mornin' sortie 2021-05-24 08:34 radens, not sure how up to date but not bad and has best long mode debugger functionality 2021-05-24 08:34 most of my debugger fixes and improvements went into main bochs but not all 2021-05-24 08:35 you don't have to quote everything 2021-05-24 08:35 you can just say lb somefunction 2021-05-24 08:38 https://github.com/doug65536/bochs 2021-05-24 08:38 ​doug65536/bochs - GitHub clone of SVN repo http://svn.code.sf.net/p/bochs/code/trunk/ (cloned by http://svn2github.com/) (is fork /0 forks/0 stargazers) 2021-05-24 08:38 and if you breakpoint close enough to be uniquely one match, that's good enough 2021-05-24 08:39 lb somefu would work if it matches one 2021-05-24 08:39 blist shows the actual names 2021-05-24 08:39 if it matched 2 nothing happens and it fails 2021-05-24 08:40 and when failing list all the matches 2021-05-24 08:40 so you know how far you need 2021-05-24 08:41 you can generate bochs symbols from screwing around with objdump output 2021-05-24 08:42 then bochs says good names for functions and stuff 2021-05-24 08:42 decodes names of global variable accesses, etc 2021-05-24 08:43 rip relative shows operand name if it has a symbol 2021-05-24 08:44 r attempts to symbol lookup every register value and shows some names sometimes 2021-05-24 08:44 info idt shows entry point names if it can 2021-05-24 08:44 I think 2021-05-24 08:46 added "trace ram" which is like trace on but don't show it if ip is within 0xa0000-0xfffff 2021-05-24 08:46 hides bios code 2021-05-24 08:46 you don't want to look at bios code trace instructions ever 2021-05-24 08:47 added option to make serial output "turbo" so no matter how fast you write it, it's good 2021-05-24 08:48 transmitter holding register is empty forever. it's a perfect vacuum in transmitter holding register, not even one virtual particle 2021-05-24 08:49 normally bochs would not be joking and would bottleneck you to 115200 or whatever 2021-05-24 08:50 hi 2021-05-24 08:51 Hi vai :) 2021-05-24 08:53 I may have touched something to do with 5 button ps2 mice 2021-05-24 09:10 acknowledging interrupts is not the same as an EOI, right? 2021-05-24 09:16 radens, depends on what context 2021-05-24 09:16 eoi is acknowledgement of an irq 2021-05-24 09:16 it means unmask that irq and all lower priority ones being masked by it being in service 2021-05-24 09:17 it is guaranteed to be the lowest set bit in ISR register 2021-05-24 09:17 being "acknowledged" 2021-05-24 09:17 in either PIC or LAPIC that is true 2021-05-24 09:17 lapic just has giant 256 bit ISR register 2021-05-24 09:18 okay, when talking about virtual interrupt acknowledging on vm exit, I thought that meant automatically acknowledging an irq when a vm exit occurred 2021-05-24 09:18 if you are handing interrupt vector N, then you are implicitly masking everything that would cause vectors N-255 to execute 2021-05-24 09:19 eoi means stop doing that 2021-05-24 09:19 but I don't think it does, I think it means telling the interrupt controller that the VMM will handle it/re-inject it 2021-05-24 09:19 make that happen for next one in service 2021-05-24 09:19 or none 2021-05-24 09:19 which eoi where do you mean 2021-05-24 09:20 sorry I see "talking about virtual interrupt acknowledging" 2021-05-24 09:21 ya I see what that means 2021-05-24 09:21 you want that on. it means, accept that interrupt vector from the PIC 2021-05-24 09:21 that is how it loads value into those exit structures 2021-05-24 09:22 Yeah, exactly, I thought it meant do an eoi, not accept it 2021-05-24 09:22 means it is ok do the extint bus cycle to get pic vector number 2021-05-24 09:23 Okay, so the interrupt came in on vector 0x68. I want to handle interrupts which come from com1, which is like isr4 or something, right? 2021-05-24 09:23 So what vector number am I like actually looking for? 2021-05-24 09:23 yeah so they meant the implementation detail that the cpu bus cycle protocol at one point got the vector number from that acknowledgement cycle 2021-05-24 09:23 pic protocol 2021-05-24 09:24 you have to know where their pic is if they are using pic 2021-05-24 09:24 you can bet on com1 being irq4 2021-05-24 09:25 you have to know what the vector means 2021-05-24 09:25 you can know the ioapic inputs and pic inputs and isa and all that and figure it out, lol 2021-05-24 09:26 do you know pic base? 2021-05-24 09:26 ioapic addrs? 2021-05-24 09:26 how does that part work 2021-05-24 09:26 By pic base you mean a port address and iopic base you mean a physical address, right? 2021-05-24 09:27 no pic base means base vector number 2021-05-24 09:27 it's that aligned-to-8 number to that plus 7 vector number mapping 2021-05-24 09:27 It's a uefi guest, and I might be able to get it to tell me, but that might change when the host boots and does exit guest services and reprograms them 2021-05-24 09:27 low and high 8 are separate 2021-05-24 09:28 like mapping irq0-irq15 to vector 0xf0-0xff 2021-05-24 09:28 you map pic1 to 0xf0 and pic2 to 0xf8 2021-05-24 09:28 0xf0 is pic base 2021-05-24 09:28 that's what I mean 2021-05-24 09:29 Okay, so I need to peer into the guest and decide: 0. Where are the pic & ioapic? 1. is the guest using ioapic & lapic, or pic? (How do I do this?) 2. Is the interrupt in question masked by the appropriate interrupt controller? 3. Is IF=0? and decide weather to cache the interrupt or not. 2021-05-24 09:29 then in their IDT, the [240] to [255] entries are irq0-irq15 2021-05-24 09:30 you aren't even trapping and emulating yet right? 2021-05-24 09:30 :P 2021-05-24 09:31 I am for CRs and simple ins and outs 2021-05-24 09:31 nice 2021-05-24 09:31 rep insd is trapped but not emulated 2021-05-24 09:32 I think you can read back the vector thing 2021-05-24 09:32 the field you found here? 24.9.2 Information for VM Exits Due to Vectored Events 2021-05-24 09:33 It gives me a vector, but I don't quite understand what sort of a vector. IDT vector? IRQ vector? Something else? 2021-05-24 11:51 * gog meows 2021-05-24 12:03 * meisaka nyans 2021-05-24 13:13 why exactly do ELF binaries contain the path to the dynamic linker? 2021-05-24 13:15 mallow: 32bit and 64bit need a different dynamic linker 2021-05-24 13:15 each different abi needs a own dynamic linker 2021-05-24 13:16 it also allows things like arm and x86 binaries to co-exist on a single /, with different dynamic linkers, and qemu-user makes it "just work" 2021-05-24 13:17 nero: sure, but don't you have a unique ABI in your platform? 2021-05-24 13:17 unless using qemu / static binary translator / etc 2021-05-24 13:17 both musl and glibc on same system 2021-05-24 13:18 yes but they both target x86-64 ABI (on x86-64 platforms) ? 2021-05-24 13:18 filemagic of binfmt 2021-05-24 13:19 they are not fully compatible. 2021-05-24 13:52 Your move #osdev: https://pub.sortix.org/sortix/screenshots/sortix-irc-network-demo.png 2021-05-24 13:54 That's right, come join the new home for #osdev at irc.sortix.org 2021-05-24 13:55 I just have the network running and no services and probably might not leave it up if people aren't coo :) 2021-05-24 13:56 I expect ELF binaries contain the path to the dynamic linker because otherwise the system would have to assume one, right? 2021-05-24 13:57 and the kernel doesn't want to be responsible for that sort of policy? 2021-05-24 13:57 (IMO embedding that policy into the kernel is still better than hardcoding it in every single binary...) 2021-05-24 13:57 immibis: darwin rejects any binary where the dynamic linker path doesnt match the approved one 2021-05-24 13:57 due to that "feature" you cant use a custom dynamic linker, and you cant have static binaries 2021-05-24 14:01 You reminded me of the environment variable "CC" I have seen used to specify a C compiler on source build systems, offering the liberty to override at, may one desire to use a GNU C compiler, Clang, or otherwise. 2021-05-24 14:02 the nix package manager will point CC to a cross gcc automatically, so basic things (blindly using $CC and $LD) will magically cross-compile without any fuss 2021-05-24 14:03 An conceptually-similar LD environment variable feature offers a nice liberty in my mind 2021-05-24 14:03 For ELF binaries* 2021-05-24 14:04 Security concerns come to mind by that approach, however. 2021-05-24 14:06 As any could set a LD environment variable, and point to any script of executable; but Linux filesystem permissions can work it out if set precautively 2021-05-24 14:07 if an attacker can set env vars, your already screwed 2021-05-24 14:07 many vars can be used as an exploit chain 2021-05-24 14:23 clever: well, that's apple being apple. comply or perish 2021-05-24 14:26 yep 2021-05-24 14:26 What is this "Apple" you speak of? 2021-05-24 14:27 jimbzy: i hear it looks like this: https://youtu.be/b4taIpALfAo?t=167 2021-05-24 14:27 ​'Delta Heavy - Ghost (Official Video)' by DeltaHeavyVEVO (00:04:05) 2021-05-24 14:30 sortie, is it down now? :( 2021-05-24 14:32 sortie, again, that's pretty damn sweet. the amount of bits you'llve had to implement to get it working that far. :-) out of curiosity, is your os open source? 2021-05-24 14:32 yeah it's open source 2021-05-24 14:32 https://gitlab.com/sortix/sortix 2021-05-24 14:32 ​gitlab.com: sortix / Sortix · GitLab 2021-05-24 14:34 heat, he said he had to restart it to fix a printf bug 20 minutes ago, I don't think it's back up yet 2021-05-24 14:38 sad :( 2021-05-24 15:20 heat: alexander: jstoker: Alas, something went wrong, perhaps due to the load or luck. The connections of mine seemed to time out because the ident check + host lookup took too long for some buggy reason (need to debug) plus the solanum process seemed to disappear for some reason (either exited or crashed, likely some bug) 2021-05-24 15:21 I'll focus on a few other things and then after dinner perhaps see if I can't bring it back online again 2021-05-24 15:21 reposting here because someone said someone here was familiar with the secure c coding books; 2021-05-24 15:21 from Modern C: "Many of the functions in the C library are vulnerable to buffer overflow C if they are called with an inconsistent set of parameters." [...] "C11 addressed this sort of problems by deprecating or removing some functions from the standard and by adding an optional series of new interfaces that check consistency of the parameters at runtime. These are the bounds-checking interfaces of Annex K of the C standard." [...] "This mechanism was (and still 2021-05-24 15:21 is) open to much debate, and therefore Annex K is an optional feature. Many modern platforms have consciously chosen not to support it. There even has been an extensive study by O’Donell and Sebor [2015] that concluded that the introduction of these interfaces has created much more problems than it solved." -> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1969.htm 2021-05-24 15:21 wat do? 2021-05-24 15:21 the field experience was published in 2015, taking a superficial look at the CERT C coding standard book (2016) and "secure coding in c and c++" (2013), those appear to recommend using annex k 2021-05-24 15:21 ​www.open-std.org: N1969 — Updated Field Experience With Annex K — Bounds Checking Interfaces 2021-05-24 15:22 jstoker: Absolutely, soooo many of work pieces that I've done over the years went into making this relatively easy to do. It's the fun part of osdev where crazy infrastructure things become plausible :) The sources are up there yeah, although mind that this particular version runs on a ton of non-merged stuff to master 2021-05-24 15:23 Totally should, uh, keep finishing my stuff instead of (checks notes) spontaneously porting an ircd 2021-05-24 15:23 I do hope this inspires more folks to self-host their infrastructure 2021-05-24 15:24 I think very few operating systems actually both self-host their website and chat 2021-05-24 15:25 https://github.com/heatd/Onyx/issues/13 2021-05-24 15:25 ​github.com: Port an IRC client and ircd · Issue #13 · heatd/Onyx · GitHub 2021-05-24 15:25 on it ;) 2021-05-24 15:25 Excellent 2021-05-24 15:26 Niiiiice. :D 2021-05-24 15:26 I wrote my own hacky irc client btw which I used in that screenshot 2021-05-24 15:26 I do like that Pine is hosting their web infrastructure on their boards. 2021-05-24 15:26 I wonder if gnu.org runs on hurd 2021-05-24 15:26 Even if it's a bit erratic. 2021-05-24 15:26 I found https://tools.suckless.org/sic/ which seems to be really simple 2021-05-24 15:26 ​tools.suckless.org: tools | suckless.org software that sucks less 2021-05-24 15:26 I self-host my website at http://sortix.sortix.org/ 2021-05-24 15:26 ​sortix.sortix.org: The Sortix Operating System 2021-05-24 15:28 seems fishy, nmap says you're linux 5.0-5.4 2021-05-24 16:53 i wonder how many hobby OSes implement USB 2021-05-24 17:04 meisaka: ive done a bit of usb gadget in my fork of LK, but ive not attempted usb host yet 2021-05-24 17:06 suggestions on how to test that my TCP stack works correctly with packet reodering? 2021-05-24 17:06 it would be nice if I could cause Linux to do some packet reordering 2021-05-24 17:07 catern: its relatively simple to create a TUN based interface, ive made my own vpn from scratch... 2021-05-24 17:08 https://github.com/cleverca22/toxvpn/blob/master/src/interface.cpp#L15-L36 2021-05-24 17:08 ​github.com: toxvpn/interface.cpp at master · cleverca22/toxvpn · GitHub 2021-05-24 17:09 catern: in theory, you could just open 2 TUN interfaces at once, then have some userland logic to delay each packet a random amount 2021-05-24 17:09 or wait for 2 packets, then send #2 + #1 2021-05-24 17:09 ah here we go https://man7.org/linux/man-pages/man8/tc-netem.8.html 2021-05-24 17:09 ​man7.org: tc-netem(8) - Linux manual page 2021-05-24 17:09 tun or tap. Tap is ethernet layer so it might be able to test more of your network stack 2021-05-24 17:09 although it probably makes no difference at all 2021-05-24 17:10 so idk why i mentioned it 2021-05-24 17:21 and this tc netem stuff even works in an unprivileged netns, a m a z i n g 2021-05-24 17:23 so I'll set up an unprivileged netns, run my TCP stack against a TAP inside the netns, set some packet loss options on the TAP with tc-netem, then connect to my stack with regular Linux AF_INET sockets and start speaking some protocols 2021-05-24 17:25 netem was crucial when writing the zephyr os TCP stack 2021-05-24 17:25 can't recommend enough 2021-05-24 17:26 heat: OK irc.sortix.org is back up 2021-05-24 17:28 "irc.sortix.org[0.0.0.0/6667]" 2021-05-24 17:28 very interesting IP address :P 2021-05-24 17:28 heat: Means it's listening on all interfaces 2021-05-24 17:29 heat: Inside the VM it's 10.0.2.15 (qemu slirp) 2021-05-24 17:29 hmm, libera's irqd gives me an actual IP 2021-05-24 17:29 ircd** 2021-05-24 17:30 heat: Depends on ircd.conf, what interface/IP it's configured to listen on 2021-05-24 17:56 sortie: what os is that? :^) 2021-05-24 17:56 (asking here instead of #solanum) 2021-05-24 17:57 Arsen: That's my sortix.org operating system hosting it :) 2021-05-24 17:57 that's quitee interesting 2021-05-24 17:58 https://pub.sortix.org/sortix/screenshots/sortix-irc-network-demo.png is a screenshot of it in action :) 2021-05-24 17:58 This is all unofficial prerelease magic that's not merged to master but super fun to play with on my last day of vacation :) 2021-05-24 17:58 that's neat 2021-05-24 17:58 you should fuzz the netstack 2021-05-24 17:59 the internet is a scary, dangerous place 2021-05-24 18:00 Arsen: Heck I should finish.. code reviewing my netstack. It's a key reason why it's not merged to master 2021-05-24 18:00 hah, fair 2021-05-24 18:00 Arsen: This demo and the other httpd one are both proxied via Linux host into the qemu VMs, so that at least rules out IP/TCP level trickery 2021-05-24 18:01 how do you fuzz a network stack? 2021-05-24 18:01 Normally 2021-05-24 18:01 you send random data at it on various layers 2021-05-24 18:01 nmap? 2021-05-24 18:01 sending random data isn't particularly useful 2021-05-24 18:01 unless you also have coverage data and do something like syzkaller 2021-05-24 18:01 first you dump random data onto L1, then L2, then random IP packets, then random TCP/UDP packets, then random ICMP stuff 2021-05-24 18:02 it *works* but you don't touch every code path 2021-05-24 18:02 well, yes, random meaning guided 2021-05-24 18:02 so it's not really fuzzing as it is throwing shit at the wall and seeing what sticks 2021-05-24 18:02 that's what fuzzing is :^) 2021-05-24 18:02 a good test is to throw packets at it that it may need to fragment or adjust in some way 2021-05-24 18:02 not really 2021-05-24 18:03 a good strategy to fuzz a network stack is to mutate only fields that would ultimately be used to index some memory 2021-05-24 18:03 fuzzers try to touch every code path you have and have some sort of logic behind it 2021-05-24 18:03 something the stack needs to manipulate instead of just look at 2021-05-24 18:03 yeah 2021-05-24 18:03 not just for(int i = 0; i < size; i++) buf[i] = rand(); 2021-05-24 18:03 so don't really send only random garbage, be a bit smarter with what you'll mutate 2021-05-24 18:05 another good candidate are things like TCP flags. you can capture for instance a TCP connection hanshake, some data flowing both ways, and the tear down of a connection, and fuzz flags for instance, just to see how your stack reacts to unexpected flags 2021-05-24 18:06 make sure to send it stuff that's clearly invalid, too, short packets, fragmented tcp packets (which the spec forbids), stuff like that 2021-05-24 18:06 yeah, there are lots of things you could do. test all assumptions in every state of the TCP machine for instance 2021-05-24 18:07 Arsen: fairly sure you can fragment TCP packets at the IP layer 2021-05-24 18:07 it's just less good 2021-05-24 18:07 heat: you can, but TCP says that you must not, and that all tcp packets must have the NF flag 2021-05-24 18:07 Hey kazinsal, come join us :) 2021-05-24 18:07 (since TCP does path mtu discovery and adjusts according to that etc, all of that goes down the toilet if you fragment) 2021-05-24 18:08 hm, really? 2021-05-24 18:08 I don't remember that 2021-05-24 18:08 it's possible that's something outside the RFCs that modern stacks implement, though 2021-05-24 18:09 if you tcpdump your traffic right now and get some IRC msgs you'll see the DF flag 2021-05-24 18:09 I've sent fragmented TCP packets and everything works 2021-05-24 18:09 https://twitter.com/sortiecat/status/1396890390888861703 2021-05-24 18:09 probably because it's the sane thing to do 2021-05-24 18:09 ​twitter: I ported solanum ircd (used by libera) to Sortix and set up the http://irc.sortix.org port 6667 test network without services running on Sortix x86_64 on a cloud VM. https://pbs.twimg.com/media/E2LARp9XsAIJwln.png 2021-05-24 18:10 the IP layer shouldn't have to look at the packet type 2021-05-24 18:10 the TCP layer is the one that should be discarding it, if that's the desired behavior 2021-05-24 18:10 I'm not 100% sure the spec forbids it, I know most implementations don't fragment TCP segments, though 2021-05-24 18:10 sortie: transparent terminal windows. fancy. 2021-05-24 18:10 sure but that's because of Path MTU which you can disable 2021-05-24 18:11 acidx: Tiny details to make it seem powerful when it's really really simple and dumb lol 2021-05-24 18:13 ah, just remembered: one thing that helped me debug some issues with the zephyr tcp stack was to validate each state transition. it's pretty easy, just a uint32_t[MAX_STATE] array, where each element has the nth bit set if transitioning from a state to another is expected 2021-05-24 18:14 it's simple and efficient and helped me find a couple bugs 2021-05-24 18:14 useful if you end up fuzzing 2021-05-24 19:06 * geist yawns 2021-05-24 19:07 i just woke up, slept over 13 hours wth 2021-05-24 19:08 yah happens huh. guess you had some hours saved up 2021-05-24 19:09 ye probably, had music on my phone also, and i dreamt that my headset broke and i tried to fix it, screwed it apart and still it was playing music, was furious, woke up and the music was still there hehe 2021-05-24 19:22 hooray, first dose acquired. also, ow, my arm 2021-05-24 19:22 nice 2021-05-24 19:22 congrats on your civic duties 2021-05-24 19:23 bizarrely the actual shot was one of the least painful I think I've ever gotten 2021-05-24 19:23 Heyyo klange 2021-05-24 19:23 Feeling good? 2021-05-24 19:23 yeah once in a while it's a nurse that gave infants needles for years :D 2021-05-24 19:24 sortie: I see you have a new IRC network 2021-05-24 19:24 I have had ones I almost could feel 2021-05-24 19:24 kazinsal: which vax? 2021-05-24 19:24 couldn't 2021-05-24 19:24 geist: moderna 2021-05-24 19:24 yay. high fives 2021-05-24 19:24 kazinsal: Hostile takeover freenode shame on you, me not hostilely replacing libera shame on me 2021-05-24 19:24 moderna club 4 eva 2021-05-24 19:25 kazinsal: Come hang :) 2021-05-24 19:25 kazinsal: No trouble getting the next dose? :) 2021-05-24 19:26 Yeah, apparently they'll just send me a text message in a couple months 2021-05-24 19:26 it's supposed to be 4 weeks for moderna 2021-05-24 19:26 then back to the same arena-turned-immunization-clinic for dose 2 2021-05-24 19:26 yeah, we're going with extended time between shots up here because apparently that can increase efficacy or something 2021-05-24 19:27 whats up here :) I am watching YouTube / Nostalgia Nerd, and a document on Cyrix 2021-05-24 19:27 and/or a way to deal with the shortages 2021-05-24 19:27 yeah, we had some gnarly shortages for a while and then all of a sudden we started getting more moderna shots per day than we were previously able to vaccinate per day total 2021-05-24 19:27 kazinsal: if you have the same experience i have with moderna. shot doesn't hurt at all, in about 12h your arm will be very sore for about 24h then drops fairly quickly 2021-05-24 19:27 china has more percent vaccinated than canada. it's a joke 2021-05-24 19:27 so now we're cranking through the population and are at like 70% immunization average 2021-05-24 19:27 shot #2 in about 12h you feel like you got hit by a car for about a day 2021-05-24 19:28 BC is going absolutely wild on shots now 2021-05-24 19:28 much stronger than most people feel with pfizer 2021-05-24 19:28 yeah, that's what I'd heard 2021-05-24 19:28 that's precisely what i experienced. i slept for like 14 hours that day 2021-05-24 19:29 look at all these antibody-havers bragging. tch. I gotta wait two more weeks for my first dose 2021-05-24 19:29 then it just turned off. within a handful of hours basically felt okay again. so was just your immune system going nuts for a short while 2021-05-24 19:29 I'll aim to take a vacation day or two afterwards 2021-05-24 19:29 not a bad idea 2021-05-24 19:30 kazinsal: Automatic text message sounds good :) 2021-05-24 19:30 Unclear how the booking system works here... very very last in line 2021-05-24 19:30 froggey: oof. in BC it's being done strictly by age bracket and I registered on the first day they opened it up to the 25-29 group. still had a week and a half between signup and appointment 2021-05-24 19:30 (by govt policy, I am the wrong age) 2021-05-24 19:30 The 30-34 group here is way at the end 2021-05-24 19:30 oh interesting 2021-05-24 19:31 yeah, same here (UK). registration for the 32+ group opened up a few days ago and I registered right away 2021-05-24 19:31 well grats 2021-05-24 19:31 they opened registration for all 18+ a few days after they opened the 25-29 bracket 2021-05-24 19:31 I look forward to my improved cell reception and brunch capabilities in two to three weeks 2021-05-24 19:31 brunch capabilities check 2021-05-24 19:31 actually kind of annoyed, cause I *just* missed getting a place for my local center, two minutes walk away, now I gotta travel 20 miles :( 2021-05-24 19:31 the #osdev mimosa club 2021-05-24 19:32 so i've heard here in seattle the restaurants (the ones that survived) are starting to all get booked up 2021-05-24 19:32 aw dang. the local health authority is using a WHL arena about a mile from my apartment as a mass immunization clinic 2021-05-24 19:32 froggey: yah when it opened up here i jumped on the first slot i could find anywhere, because i had no idea if there was going to be a huge run on limited supplies 2021-05-24 19:32 then not 12 hours later appointments opened up like literally walking distance from my house 2021-05-24 19:33 but i already had it booked, so... ended up driving 20 miiles 2021-05-24 19:33 I was hoping to walk to and from it this morning but nope, I live in the PNW so it's raining 2021-05-24 19:33 you just put on your north face gear cmon 2021-05-24 19:33 rain doesn't stop PNWers 2021-05-24 19:37 haha 2021-05-24 19:50 Just want to double check -- for x86 vmcs, if the external interrupt exiting vm executing control field is set, and the acknowledge interrupt on exit vmcs control field is set, but the guest has rflags.if = 0, then the vmm has to cache the interrupt signal and enable vm interrupt window exiting, right? 2021-05-24 19:51 How many interrupt signals do I need to cache? And I should deliver the signals in priority order, right? Also, does the cache need to be per-core, or global? 2021-05-24 19:51 Or is the per-core/global scope interrupt dependent :/ 2021-05-24 19:58 radens, that's probably covered in the "implementation notes" chapter of SDM3 on the VMCS. 2021-05-24 19:58 Is gorgonical around? I think he's messed with that sort of thing. I've never had to deal much with interrupt routing with VMCS. 2021-05-24 19:58 I would assume the cache would be per-core, as you can have both internal interrupts from the APIC as well as the global stuff routed in from the IOAPIC. 2021-05-24 20:00 Really wish there was an external interrupt exiting bitmap so I could handle just the interrupt I care about and let the guest take care of everything else 2021-05-24 20:00 but it seems like there are architectural reasons why this would be hard 2021-05-24 20:01 That stuff is mostly external to the CPU, though. 2021-05-24 20:02 ... sort of. :/ 2021-05-24 20:02 Used to be, historically, even if it's on die now-ish. 2021-05-24 20:03 in my experience interrupts get a lot easier to handle when they're edge triggered instead of level triggered 2021-05-24 20:03 don't have to worry about finding what bits to twiddle or what obnoxiously slow ISA I/O ports to frob in order to deassert things 2021-05-24 20:26 sortie: the topic in the old country should probably specify the new channel name too, seems a bit obvious but better to be clear 2021-05-24 20:30 * gog meows 2021-05-24 20:32 * froggey pets gog 2021-05-24 20:33 Hey gog come join irc.sortix.org. We have fish and no volcanoes! 2021-05-24 20:33 We're gonna make a federation of hobbyist OS ircds bolted together into a dubious quality IRC network 2021-05-24 20:34 hmm. I don't think cl-ircd supports linking 2021-05-24 20:35 solanum that I'm using definitely does since it's powering some big nets 2021-05-24 20:35 I wonder how compatible ircds needs to be to be linked 2021-05-24 20:35 i found this cursed thing: https://github.com/Jigsy1/mIRCd 2021-05-24 20:35 ​Jigsy1/mIRCd - An IRCd written in mIRC scripting language (mSL) and more or less based on ircu IRCds. (0 forks/1 stargazers/Unlicense) 2021-05-24 20:38 sortie: damn, I'm gonna have to get ports forwarded and actually figure this out. it's such a terrible idea I can't resist 2021-05-24 20:38 :D 2021-05-24 20:39 i'm gonna write a kernel that's an irc daemon 2021-05-24 20:39 its only purpose 2021-05-24 20:39 well also the network stack 2021-05-24 20:39 and some means of persistent storage 2021-05-24 20:39 hm 2021-05-24 20:41 froggey: How feasible is it for you? :) 2021-05-24 20:41 forwarding ports? easy. bodging link support in? no idea 2021-05-24 20:41 Yeah 2021-05-24 20:42 I got a VM in a data center running this, the host Linux qemu doing some quick port forwarding 2021-05-24 20:43 relevant: 'The TS6 protocol is an extension to the Internet Relay Chat protocol for server to server communications developed initially by the developers of ircd-ratbox. It has been extended by various IRC software and has the feature that proper implementations of TS6 can link to each other by using feature negotiation—even if features are disparate. ' 2021-05-24 20:43 features: none 2021-05-24 20:44 CompanionCube, neat 2021-05-24 20:45 https://github.com/charybdis-ircd/charybdis/blob/master/doc/technical/ts6-protocol.txt 2021-05-24 20:45 ​github.com: charybdis/ts6-protocol.txt at master · charybdis-ircd/charybdis · GitHub 2021-05-24 20:45 Yeah I think charybdis got forked into solanum 2021-05-24 20:46 I did ponder about the interserver protocol 2021-05-24 21:08 iirc it's basically the same as the client protocol? 2021-05-24 21:08 i guess a naieve implementation just rebroadcasts all the messages to all of the peers and the servers are responsible for filtering and delivering to the right clients 2021-05-24 21:09 gog: so a unikernel linked with some off-the-shelf IRC server? 2021-05-24 21:10 Unreal IRCd in a kernel running in unreal mode? 2021-05-24 21:10 It's pretty unreal, Bitweasil. 2021-05-24 21:11 * Bitweasil worked out that something like 5% of my house power goes to the internet connection now. :( 2021-05-24 21:11 At least during low use times. 2021-05-24 21:11 er, low power use. 2021-05-24 21:12 once you get down to really low electricity use, most of bill is delivery and you might as well not suffer too much and don't worry too much about things being on 2021-05-24 21:13 ... no, the stupid Starlink dish pulls 100W, 24/7. 2021-05-24 21:13 I don't draw that little power. 2021-05-24 21:13 ah 2021-05-24 21:14 your power like 8-9 cents/kWh? 2021-05-24 21:15 ~9 cents every 10 hours right? 2021-05-24 21:15 Somewhere in that range, yes. 2021-05-24 21:15 So about $100/yr in power for the dish alone. 2021-05-24 21:17 WinXP SP3 runs really neatly on AMD Quad Core & VirtualBox on top of Ubuntu 20.x 2021-05-24 21:17 that's about what I pay, doug16k. 2021-05-24 21:17 I imagine! 2021-05-24 21:17 allocated 768 megabytes of my 8 gigabytes host system to XP 2021-05-24 21:17 RAM 2021-05-24 21:17 It varies between 0.07 and 0.11 depending on the time of day. 2021-05-24 21:18 lucky you. I am still on weird covid time of day where it is same rate all 3 times lol 2021-05-24 21:19 can't complain I guess. 8.5 no matter what time 2021-05-24 21:19 It's actually a bit cheaper here than my old location, but the service is 100% better. 2021-05-24 21:19 I have no idea what I pay for electricity :| 2021-05-24 21:20 We'd have an unexpected outage or two per month there, but it's rock solid here. We have our own municipal natgas plant, our own solar farm, and a plant at the landfill. 2021-05-24 21:21 vai, amd always had pretty good virtualization 2021-05-24 21:22 there were times when it was way better than how intel did it early on 2021-05-24 21:23 the biggest issue I have with virtualisation is graphics stuff 2021-05-24 21:23 always so slow 2021-05-24 21:24 I thought that, went crazy optimizing my blitting, and realized it didn't need to be that good at all 2021-05-24 21:25 (I mean desktop linux/windows stuff, not my own OS) 2021-05-24 21:25 it's full ram bandwidth fillrate 2021-05-24 21:25 ah 2021-05-24 21:26 i went so nuts that I will try to use ssse3 if it helps that pixel format and you don't have avx, lol 2021-05-24 21:27 it's 2020-fucking-one and there's still no decent GPU acceleration out there 2021-05-24 21:27 Yup. 2021-05-24 21:27 I think a number of AMD cards allow for GPU virtualization now at least 2021-05-24 21:27 not sure how well it works though 2021-05-24 21:27 Intel does too, nVidia does if you pay through the nose, etc. 2021-05-24 21:27 you can passthrough sometimes but, well, you need to PCI passthrough 2021-05-24 21:28 Virtual device passthrough and such. 2021-05-24 21:28 It's designed for datacenter virtual desktops, not "home user desktop use" stuff. 2021-05-24 21:28 intel has that virtual device thing but it's broken as hell in linux at least 2021-05-24 21:28 *shrug* virtio isn't half bad if you can find drivers for it. 2021-05-24 21:28 find? 2021-05-24 21:28 broken as in, ubuntu livecd doesn't boot 2021-05-24 21:28 you want the redhat iso 2021-05-24 21:28 intel ...i...s broken as hell in linux... 2021-05-24 21:28 doug16k, does that have drivers as far back as XP? 2021-05-24 21:28 I know for Win10 it works for net/block/GUI. 2021-05-24 21:29 Bitweasil: is it? never had issues 2021-05-24 21:29 Oh, I'm still just bitter about Meltdown/Spectre/Foreshadow/L1TF/Plundervolt/RIDL/(etc). 2021-05-24 21:30 It's broken in Windows too. 2021-05-24 21:30 I don't actually *like* computers much anymore. 2021-05-24 21:30 I just like what I get paid to know them. :) 2021-05-24 21:30 lol 2021-05-24 21:30 brb, coffee. 2021-05-24 21:30 https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.171-1/ 2021-05-24 21:31 ​fedorapeople.org: Index of /groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.171-1 2021-05-24 21:31 just open that iso in windows, right click install every driver install 2021-05-24 21:31 shut down, switch stuff over to virtio, turn it on, bingo 2021-05-24 21:32 yes really far back 2021-05-24 21:33 tend to be several subdirs per os 2021-05-24 21:36 the cool thing about those exact drivers is, they are signed properly by redhat and windows kernel doesn't mind loading it in 64 bit 2021-05-24 21:37 if it weren't for that you might as well build them from source 2021-05-24 21:37 which i'm sure would take 10x as long just to get MSVC installed than actually compiling them 2021-05-24 21:37 ya I guess I was picturing cross compile from source :P 2021-05-24 21:38 yah also possible i guess it can compile from mingw o whatnot. but theres some specialness with compiling kernel code for windows 2021-05-24 21:38 dunno if gcc/etc has support for that 2021-05-24 21:38 it does 2021-05-24 21:38 it has funny /driver stuff in their special ld 2021-05-24 21:38 In Windows kernel you could also disable code integrity to load your signed drivers, or just your own self signed cert to the root cert store (: 2021-05-24 21:39 yes but it ruins the fun when you have to destroy all security to use the guest :D 2021-05-24 21:40 before they locked down the kernel, it was ridiculous. 32 bit drivers hack the kernel almost like malware, hooking into things. it was getting bad 2021-05-24 21:40 legit drivers did exactly what malware does 2021-05-24 21:41 antivirus! 2021-05-24 21:41 like virus, but anti! 2021-05-24 21:41 that leaves us open for antiantivirus and antiantiantivirus if the 1st idea doesn't pan out 2021-05-24 21:42 These issue still exist, but the attack vector has changed from hooking random things like SSDT, to hooking other WDM API related table. But then again when drivers can can r/w anywhere into system mem, all bets are off with security. 2021-05-24 21:45 imagine people were running a machine with some weird mix of badly written drivers patching a bunch of stuff in your kernel, then calling you for help to fix their blue screen? 2021-05-24 21:49 I can't imagine using Windows anymore. 2021-05-24 21:49 I've heard it's gotten better, but so many bad times. 2021-05-24 21:49 Same 2021-05-24 21:51 I've been using Linux in preparation for switching to Sortix. 2021-05-24 21:54 Linux often makes me angry and instead of fixing the problems I just put all the frustrations into osdev where those classes of problems can't even exist 2021-05-24 21:58 they did make it fairly rock solid as far as kernel crashing over last 15 yrs 2021-05-24 21:58 comes down to how good your hardware choices were, what stupid drivers do you load 2021-05-24 21:59 So it's like Linux in the 90's? 2021-05-24 22:00 when the driver is a binary and you can't do a thing, you get what you get 2021-05-24 22:01 pray for registry entry configurations to make it work right and turn off broken crap 2021-05-24 22:02 * doug16k waves at hardware encryption support on wlan 2021-05-24 22:03 Wow. I accidentally set some objects in my game as RigidBodies instead of StaticBodies and when I hit run they slowly accelerated out of view. 2021-05-24 22:04 It was kind of sad, actually. 2021-05-24 22:04 ;o 2021-05-24 22:04 physics engine bugs are fun 2021-05-24 22:04 you could bump something end end up spinning 18000 rpm flying away from it at 9000m/s 2021-05-24 22:04 Nah, the physics engine is pretty ok. 2021-05-24 22:05 I've had multi-part characters break apart at the joints doing that, doug16k. 2021-05-24 22:11 haha, neat. my bootloader heap puts 0xBAD11111 in the size field of the header that is going out of existence 2021-05-24 22:11 Hah 2021-05-24 22:12 in coalesce 2021-05-24 22:16 i just found out azure VMs use a weird hyperv networking device instead of any other sane NIC 2021-05-24 22:16 because why sanity 2021-05-24 22:16 when you can write a new d r i v e r 2021-05-24 22:19 it's not even in PCI because why fucking not 2021-05-24 22:19 wow 2021-05-24 22:20 acpi detection? 2021-05-24 22:20 all they have in PCI is a 3 bridges, an IDE, and an hyperv vga adapter 2021-05-24 22:20 I guess they have there own data passing methods betweens VMs, probably faster than PCI and PCI pass through if it's purely mem based? 2021-05-24 22:20 doug16k, weirder 2021-05-24 22:20 Arthuria, nic is just a bunch of dma. not much you can do to beat virtio or most nics 2021-05-24 22:20 https://elixir.bootlin.com/linux/latest/source/drivers/net/hyperv/netvsc_drv.c#L2463 2021-05-24 22:20 ​elixir.bootlin.com: netvsc_drv.c - drivers/net/hyperv/netvsc_drv.c - Linux source code (v5.12.6) - Bootlin 2021-05-24 22:21 nic driver is 85% "here's where to dma incoming packet into", "here, dma this out" 2021-05-24 22:22 it already is shared memory based 2021-05-24 22:23 fancy server offload stuff can make nic do way more though 2021-05-24 22:23 But for virtualization, I take it multiples levels of DMA may occur. VM1 DMA into some region, then VM2 has to move that data or DMA into where VM2 is expecting DMA for some driver. Multi level VMs may have lots of DMA levels though 2021-05-24 22:24 So maybe there own custom method of passing data between VMs, ends up at the exact VMn DMA region. Just a theory, I don't know, 2021-05-24 22:24 I expect kvm to dma my guest's pages when I tx 2021-05-24 22:24 and rx 2021-05-24 22:24 host nic dma into guest pages 2021-05-24 22:25 how else would you do it? 2021-05-24 22:25 That sounds right. 2021-05-24 22:25 I would be shocked if into buffer and memcpy'd 2021-05-24 22:26 nic is one click down from the simplest possible thing: a sound card 2021-05-24 22:26 sound card keeps streaming one ring forever. nic jumps around to different regions. 2021-05-24 22:27 it pretty much just shovels the bits into ram from ethernet port to dma rx buffer, and shovels bits from dma tx buffer to ethernet 2021-05-24 22:27 sequentially 2021-05-24 22:28 but it can jump to another place when this descriptor runs out 2021-05-24 22:28 it's almost hello world dma 2021-05-24 22:29 er, hello dma world 2021-05-24 22:29 there are nics so simple it isn't even hello dma world. can't cross page boundary 2021-05-24 22:31 half decent dma hardware can be given a list of base,size ranges and it will go get the pieces and do one big thing with it 2021-05-24 22:32 need the pieces because of paging 2021-05-24 22:36 put it this way: I have scatter gather dma in my little toycore project sd controller I am making for a laugh on fpga 2021-05-24 22:36 real device has zero trouble implementing it 2021-05-24 22:51 virtio is essentially a way to say "here send these memory regions to this channel" "put stuff coming from that channel here". devices are layered on top of that. nic device is basically that plus a mac address thing plus a multicast thing plus promiscuous mode 2021-05-24 22:52 all devices are essentially move memory to somewhere, or move something to memory 2021-05-24 22:52 except the GPU of course, that's moving memory + expensive calculator 2021-05-24 22:52 yeah, where atan per pixel is just fine 2021-05-24 22:58 if you showed a game dev from 1988 a modern shader they wouldn't believe it 2021-05-24 22:58 no amount of speed is enough for that 2021-05-24 22:59 I wonder if we could afford to run Doom's renderer once per pixel 2021-05-24 23:00 Maybe not at 1080p, but... 2021-05-24 23:00 With enough parallel processors, sure! 2021-05-24 23:01 <3 virtio, though. 2021-05-24 23:01 yeah virtio is great 2021-05-24 23:01 "You a hypervisor down there? Yeah, great, let's skip the whole 'pretending to be hardware' thing..." 2021-05-24 23:01 I think it's a good bit more secure than hardware emulation too. 2021-05-24 23:01 Some of the breakouts IIRC were in things like floppy controllers. 2021-05-24 23:01 (VM breakouts) 2021-05-24 23:01 Bitweasil: You could do a lot with 2 million 486s :D 2021-05-24 23:02 Brown out the power grid, for sure. 2021-05-24 23:03 Hey, the way things are going, random 486s are going to be pushed back into production, if you can't get newer chips. 2021-05-24 23:03 The whole "Oh, yeah, the entire semiconductor industry is coming apart..." thing has been interesting to watch. 2021-05-24 23:03 I'd love to see a 5GHz 486 missing the 4K cache like crazy, would be fun 2021-05-24 23:04 Can't get MCUs at work. Been a big pain 2021-05-24 23:04 "Memory? DRAM? You there? Please, can I have a byte? DRAM? Uh... hello?" 2021-05-24 23:04 jaevanko, I've seen a bunch of reports lately that things like SMT resistors/capacitors aren't available, voltage regulators are hard to find, etc. 2021-05-24 23:05 Yeah, thankfully most things are still available in the 10-100 unit quantities that I need for /my/ job, but yeah 2021-05-24 23:06 i want a gpu pls 2021-05-24 23:06 Don't we all :/ 2021-05-24 23:06 You US based, and how old are you willing to tolerate? :) 2021-05-24 23:06 there's definitely been a shortage of the stuff needed in order to make PCBs lately 2021-05-24 23:06 brother picked up a 780 recently 2021-05-24 23:06 somehow we eventually got some PCBs through and shipped here though (NZ, not US) 2021-05-24 23:06 Azure went down a path of using FPGAs as custom NICs with fancy offload capabilities. Not entirely surprised that has ramifications in presenting to guests. 2021-05-24 23:06 Woah, woah, a /780/? That's, like... what, $500? 2021-05-24 23:07 price wasn't good but no not that bad 2021-05-24 23:07 I've seriously debated selling a few of my old GPUs. 2021-05-24 23:07 They're going for stupid amounts lately. 2021-05-24 23:08 yeah my brother got it for less than it would usually be 2021-05-24 23:09 when I get my build this september I'll probably go for something like a gt710 if there are no GPUs yet 2021-05-24 23:09 just pure video output, nothing else 2021-05-24 23:09 yeah if I were smart I'd sell 2060 super for a fortune 2021-05-24 23:09 use 1060 2021-05-24 23:09 regular 2060s go for 600 euro/dollars 2021-05-24 23:10 Do it. 2021-05-24 23:10 If you don't use it... 2021-05-24 23:10 (if/when you find them / system integrators) 2021-05-24 23:11 it's the beginning of the end of gpu compute though 2021-05-24 23:11 In what ways? 2021-05-24 23:11 i'm hoping things get better these next months though 2021-05-24 23:11 There's more to GPU compute than just crypto... 2021-05-24 23:11 lets hope crypto crash and the vaccine lessens the shortages 2021-05-24 23:11 I think. 2021-05-24 23:11 they are crippling compute performance in next designs 2021-05-24 23:11 I believe that's only for Etherium and similar algorithms. 2021-05-24 23:11 Not "general purpose compute." 2021-05-24 23:11 Though I've not seen confirmation one way or another. 2021-05-24 23:12 yes 2021-05-24 23:12 Also, that's only nVidia. 2021-05-24 23:12 beginning of that arms race though 2021-05-24 23:12 they mention the hash rate 2021-05-24 23:12 they keep finding ways to trick the card into being useful again and they have to cripple it more 2021-05-24 23:12 last time they "tricked it" was because nvidia screwed up the driver 2021-05-24 23:13 this time it'll be in hardware 2021-05-24 23:13 This time...it's personal. 2021-05-24 23:13 what about the next workload that is nothing but single precision muladd 2021-05-24 23:14 cripple that? 2021-05-24 23:14 whole thing is stupid 2021-05-24 23:15 doug16k: the only thing they want to cripple is ETH because it's literally the issue 2021-05-24 23:16 you aren't wrong, I'm saying ok what if there's another compute workload that is practically impossible to gimp, like muladd 2021-05-24 23:17 gimping some bitwise operation it's not a real solution 2021-05-24 23:18 *shrug* 2021-05-24 23:18 they might just want to gimp this time around since we have an actual shortage 2021-05-24 23:18 and there are no GPUs for non-hashing 2021-05-24 23:20 must be nice to have so much demand that you are sitting at max production endlessly and come to the point of deliberately crippling your products to sour the milk enough to have availability go above zero 2021-05-24 23:21 like kicking out some customers and telling them they look stupid and don't come back, because there is too much of a queue at register 2021-05-24 23:21 picked up the kindle version of TCP/IP Illustrated volume 1 since my hardcover copy is... nearly 10,000 km away. 2021-05-24 23:22 klange, cool book, neat! 2021-05-24 23:22 gonna do this shit right, and with ipv6 2021-05-24 23:23 doug16k: those same customers use the GPUs for non-GPU purposes and purposefully hoard them 2021-05-24 23:24 heat, yes, it's bad 2021-05-24 23:24 while people that need a single GPU can't get one 2021-05-24 23:24 especially when nvidia markets the GPUs for "gaming", not crypto/compute 2021-05-24 23:24 weirdly accurate statement: my hardcover copy is 8,265.71km away. 2021-05-24 23:24 there is supposed to be so much supply you can't keep up with that 2021-05-24 23:25 no matter how many you try to horde, manufacturer outproduces your ability to buy them 2021-05-24 23:25 Maybe Intel can release all there 14nm+++++++ in warehouses out to the world (: 2021-05-24 23:26 silicon* 2021-05-24 23:27 they'll finally release their 7nm processors they've been hoarding for the apocalypse 2021-05-24 23:27 what they should do is make a specialized hashing accelerator that has some asics for some coins and put that in every card, and make it so it can do all hashing instructions in parallel all the way across all CUs 2021-05-24 23:27 did you really think intel couldn't make 7nm processors for all these years? lol 2021-05-24 23:28 in no time the hashing difficulty will be so high you cant use GPU 2021-05-24 23:28 They only just got 10nm working in Tiger Lake, I don't think they've got 7nm solved yet ha 2021-05-24 23:30 doug16k, the coins would crash first 2021-05-24 23:30 just make the next nvidia card specialized entirely for eth and just meet current performance for rendering lol 2021-05-24 23:31 classic nvidia 2021-05-24 23:31 drop the raytrace and make that all hashing insns 2021-05-24 23:31 just coasting 2021-05-24 23:32 you can put out a fire by throwing gas on it, if you do it just right 2021-05-24 23:32 you can also just wait for the bubble to burst 2021-05-24 23:32 hilarious 2021-05-24 23:33 "what do you mean, the value will stop going up?" 2021-05-24 23:39 * gog meows 2021-05-24 23:40 make it so game devs figure out ways to make their 3d shader more like a hashing algorithm so it can take advantage of the 4x issue bandwidth for hashing instructions :P 2021-05-25 00:14 that is what natural selection would do 2021-05-25 00:15 apparently people can't get enough hashing. who knew? 2021-05-25 00:17 I always wondered when there would be a workload where it was worthwhile for tons of people to use their spare compute power to make more than electricity cost 2021-05-25 00:21 would be nice if it were more tangible than currency thing 2021-05-25 00:22 folding@home 2021-05-25 00:22 I did some folding 2021-05-25 00:22 less shiny and lucrative, but way more important than literally using gigawatt hours of electricity for a money laundering tool 2021-05-25 00:22 yah i did some in the winter, figured i may as well have the computer being a space heater 2021-05-25 00:23 i've done it off and on for years 2021-05-25 00:23 not so much on anymore because i don't have 3 sizable computers running constantly 2021-05-25 00:23 it's so weird how certain programs run 100% full perfect speed, and others are severely affected, by the gpu load 2021-05-25 00:24 my favourite ide is severely affected by gpu compute 2021-05-25 00:24 it's nvidia with their software scheduler 2021-05-25 00:29 how many irq per sec on your machines? I'm at around 6000 and 15000/sec 2021-05-25 00:29 bit high no? 2021-05-25 00:30 dunno, depends on what's generating them 2021-05-25 00:30 seems a bit high if you're not doing anything, but if most of them are timers then it's possobly something chatty doing it 2021-05-25 00:31 quite idle it is hard to be under 4200/sec 2021-05-25 00:32 no videos playing. no sound going 2021-05-25 00:32 that's nuts right? 2021-05-25 00:33 I'm averaging 40000/sec on my windows machine with a bunch of tabs open doing stuff, a handful of open programs, and VLC paused but active 2021-05-25 00:33 cpu usage says 0 and it won't go under 4000 2021-05-25 00:34 ya in windows you can do that multimedia call to make timer resolution fine 2021-05-25 00:35 people trying to get good battery life hate that 2021-05-25 00:35 yeah probably a good chunk of these are VLC's media engine still timing things in the background 2021-05-25 00:35 why does it need a lot of irq though? 2021-05-25 00:35 but I don't feel like closing VLC and losing my spot in my playlist to check :P 2021-05-25 00:35 how does tons of irq help. can't it calculate timestamps between timer ticks? come on! 2021-05-25 00:36 in my kernel, priorities permitting, if you sleep for 17223 microseconds, I will do my best to return exactly 17223 microseconds from now 2021-05-25 00:36 maybe it wants really precise timers but also wants to relinquish some CPU time or something 2021-05-25 00:37 I am as fine as the apic timer essentially 2021-05-25 00:40 if it causes way more context switches, and stuff sat around ready to run all the way until the next tick, then sure 2021-05-25 00:40 I guess it is crap like that 2021-05-25 00:41 in mine if you resume a thread that has more right to run than what is running on that cpu right now, it sends the ipi right then and makes it run right now, or voluntarily switches to it on this cpu right now 2021-05-25 00:41 my kernel is obsessed with latency 2021-05-25 00:42 if dragging a window around with all cpus pegged isn't smooth as glass, it has completely failed, to me :P 2021-05-25 00:42 it should coffee spray when that usb mouse irq comes in 2021-05-25 00:43 omg the user wants something 2021-05-25 00:43 UI smoothness is very important 2021-05-25 00:46 iirc macos special-cases the audio server thread, and if the audio buffer is ever about to run out will preempt whatever's running and switch to it 2021-05-25 00:48 heh, i remember about a decade ago when pulseaudio was new. i was trying to play minecraft i think and pulseaudio was eating all of the cpu 2021-05-25 00:49 * gog shakes her cane "back in my day" 2021-05-25 00:50 pulseaudio _still_ climbs up to 100% cpu fairly frequently for me 2021-05-25 00:52 the first time i gave up on pulseaudio was when i moved from ubuntu 09.10 to 10.04 i think, and there was an issue where it would spew garbage on dosbox or something which i think i "fixed" by changing the buffer size... when i moved to the later version it was spewing garbage on schismtracker so it had to go 2021-05-25 00:52 yeah I have latency issues with pulseaudio in VMs. haven't had any with sndiod 2021-05-25 00:52 you don't need a VM to have latency issues with pulseaudio 2021-05-25 00:53 I am mildly amused by playing music over virt-manager remote console in a vm on my other machine 2021-05-25 00:53 works perfect 2021-05-25 00:55 who would have guessed people would end up loading all that code in a browser and downloading and running all that js, to play music 2021-05-25 00:55 and it calling that mountain of desktop / display accelerator stuff 2021-05-25 00:56 makes sense. it's a low barrier to entry on both the user and programmer side 2021-05-25 00:56 i just used to use mpc and mpd :p 2021-05-25 00:56 if it was a bochs "trace on" disassembly of every instruction though... 2021-05-25 00:56 the more cycles you have, the more you can blow on lowering the barriers to entry 2021-05-25 00:57 nobody would believe you would actually use that many instructions to play music 2021-05-25 00:58 yes I agree about using high level languages and environments for the right stuff 2021-05-25 00:59 js is several times faster than it needs to be already 2021-05-25 00:59 I'm sure `aucat -i nickelback_photograph.au` is a lot simpler than spotify 2021-05-25 01:00 js is also a lot more convoluted than it needs to be. If you wanna talk about lowering the barrier to entry 2021-05-25 01:00 and lacks tools for metaprogramming and abstractions that other languages have 2021-05-25 01:00 it's perfect for building interfaces to stuff 2021-05-25 01:01 and it's excellent at exposing access to the kinds of things that JS engines run inside 2021-05-25 01:01 please 2021-05-25 01:01 that's stockholm syndrome 2021-05-25 01:01 I don't write JS 2021-05-25 01:01 you can do hardcore data hiding where you can't even get to it with a debugger unless you stop it inside that scope 2021-05-25 01:01 doug16k: isn't that any language with closures though? 2021-05-25 01:02 right just saying that bit is part of explanation of how js started to be taken seriously 2021-05-25 01:02 you can make certain things utterly impossible 2021-05-25 01:03 I can't make anything utterly impossible in C++ 2021-05-25 01:05 I think js was taken seriously because of its popularity. Not because of any specific language feature 2021-05-25 01:05 https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript this looks more prophetic every year 2021-05-25 01:05 ​www.destroyallsoftware.com: The Birth & Death of JavaScript 2021-05-25 01:06 you could make libraries with interfaces that lock people out so well that they can't take dependencies on your implementation details 2021-05-25 01:06 even if they tried 2021-05-25 01:07 that's not really different in practice from private members or forward-declared structs 2021-05-25 01:08 yes you can memcpy or whatever, but you could also vendor the js library's source if you really needed to 2021-05-25 01:08 being able to have an interface boundary that controllable makes it a good language 2021-05-25 01:09 even if it has some stupid parts 2021-05-25 01:09 you have very low standards :) 2021-05-25 01:09 we're osdevvers. we catch as catch can 2021-05-25 01:10 I see the appeal of being able to have constraints that can't be violated 2021-05-25 01:11 I mean evan an idiot with memcpy can't violate it 2021-05-25 01:16 can't know, hidden in closure chain in a function object 2021-05-25 01:16 hopelessly inaccessible 2021-05-25 01:23 I should make a signal test where a thread single steps itself by setting TF in breakpoint handler and priming it with 0xcc, for a laugh 2021-05-25 01:24 as example of ridiculous level of ability you have to trace where it has something to memcpy it 2021-05-25 01:25 find code where there is known plaintext nearby pointer value 2021-05-25 01:25 bingo 2021-05-25 01:26 good luck constraining 2021-05-25 01:27 you can even open the maps and know when it will fault and not fault 2021-05-25 01:32 I only cheated in single player lol 2021-05-25 01:33 not that hard to find where a variable is and hack modify it 2021-05-25 01:40 people will take dependencies that crazy 2021-05-25 01:41 a person is completely sane. people are crazy though 2021-05-25 01:44 there were cases where microsoft's padding changed in the windows build and they had to fix it so it had the same value as the padding had before 2021-05-25 01:46 they had to make the undefined bits stay exactly like before 2021-05-25 01:49 anyone know off-hand what exactly the source of X/y in enpXsY is in udev on Linux? PCI slot? Thinking I'll do something similar. 2021-05-25 01:50 there was some video game that would free memory and then read from it right after. It broke on a newer version of windows where free would overwrite part of the memory freed 2021-05-25 01:50 The freedesktop wiki just says "physical/geographical location of the connector of the hardware" so I guess I have to dig if I want the detailed answer... 2021-05-25 01:50 so windows added a special case just for that game 2021-05-25 01:50 this https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/ch-consistent_network_device_naming 2021-05-25 01:50 ​access.redhat.com: Chapter 11. Consistent Network Device Naming Red Hat Enterprise Linux 7 | Red Hat Customer Portal 2021-05-25 01:50 I have an enp6s0, and it correlates to 06:00.0 so at least the 6 jives with my guess 2021-05-25 01:51 [P]ps[f][d] 2021-05-25 01:51 from link 2021-05-25 01:51 next page 2021-05-25 01:52 thanks, that was much more useful than the freedesktop wiki 2021-05-25 01:52 okay that particular scheme will be easy peasy then 2021-05-25 01:57 https://termbin.com/7mo3 2021-05-25 01:57 i hope you port s*stemd too 2021-05-25 01:58 I have no intention of porting anything close to it, but I do actually like the naming scheme from years of having eth* devices swap around 2021-05-25 02:00 a mapping of mac address to ifname along the lines of /etc/iftab would probably be good too 2021-05-25 02:02 when I look at the o and ps and x I can't help think is it all at once 2021-05-25 02:02 you put all of those there? 2021-05-25 02:03 I don't see why not 2021-05-25 02:04 so you can blindly open by mac and not care if its edge connector is a hole in the head? 2021-05-25 02:06 oh neat, the whole hub path is in usb nics 2021-05-25 02:07 port number at each hop 2021-05-25 02:08 15 chars max name 2021-05-25 02:08 if longer it drops it! 2021-05-25 02:09 admins building trees of hubs leading to usb nic will be mad :P 2021-05-25 02:14 funny thing is you'd probably get the full gigabit through all the hubs 2021-05-25 02:18 so when I read the vmcs field Primary processor-based VM-execution controls during a vm exit I get a nonsense value, and when I write that value back in and vmresmue I get a vmresume failure 2021-05-25 02:18 can that be? 2021-05-25 02:18 yeah exactly 2021-05-25 02:19 let me confirm that 2021-05-25 02:19 this is real machine running it right? 2021-05-25 02:19 https://pastebin.com/rhV2Wjp6 2021-05-25 02:19 ​pastebin.com: 140009ae6: b8 02 40 00 00 mov $0x4002,%eax 140009aeb: 0f - Pastebin.com 2021-05-25 02:19 yeah a real minnowboard turbot 2021-05-25 02:20 it can be that it was using stale tlb entry when it did weird thing, now that it has been 1.2 million years since, the tlb is now correct when you look 2021-05-25 02:20 That would be nuts in a world which is linearly mapped rwx for all of memory? 2021-05-25 02:20 Also, like all the other fields show up right? 2021-05-25 02:20 so the tlb is always right? 2021-05-25 02:20 I'm confused :P 2021-05-25 02:20 you dont use paging? 2021-05-25 02:20 I don't fuck around with paging at all, I use what uefi gives me 2021-05-25 02:21 ok then that cant be it 2021-05-25 02:21 (and exit boot services has not been called) 2021-05-25 02:22 whoa you mean you are using virtualization and you didn't even take over the computer yet? 2021-05-25 02:23 I have taken over everything except for building my own page tables 2021-05-25 02:24 I didn't know you could even do it without hacking the idt 2021-05-25 02:24 I did install my own idt on the host, gdt, etc. 2021-05-25 02:24 omg 2021-05-25 02:24 you went miles outside spec 2021-05-25 02:24 really? 2021-05-25 02:24 it's like memory is memory 2021-05-25 02:24 so now if it ever thought it could modify gdt, it would be making a fool of itself modifying memory not being used as gdt 2021-05-25 02:25 I'm confused by that statement 2021-05-25 02:25 the idt is not the same memory ? 2021-05-25 02:25 I have my own gdt, idt, etc. 2021-05-25 02:25 or you modified in place 2021-05-25 02:25 Not my own page tables 2021-05-25 02:25 and you didnt exit boot services 2021-05-25 02:25 no, this is a runtime service 2021-05-25 02:26 I think it is crazy to change the gdt or idt before exit boot services 2021-05-25 02:26 I don't change them 2021-05-25 02:26 you said you have your own 2021-05-25 02:26 I just set the host idt & gdt vmcs fields 2021-05-25 02:26 and then when I vmexit 2021-05-25 02:26 I use those 2021-05-25 02:26 and interrupts enables 2021-05-25 02:26 d 2021-05-25 02:27 what does your idt do with irq 2021-05-25 02:27 are there any? 2021-05-25 02:27 on the host no, in the guest yes 2021-05-25 02:28 so guest doesn't touch any real devices and cause any real irqs then 2021-05-25 02:28 well 2021-05-25 02:28 yes this is a passthrough hypervisor 2021-05-25 02:28 then you get the real irqs on host 2021-05-25 02:28 and do what, inject? 2021-05-25 02:28 yes 2021-05-25 02:29 If guest IF=1 2021-05-25 02:29 if not, I cache them in the scheme I mentioned earlier to reinject them later 2021-05-25 02:29 you have that acknowledgement cycle on 1 right? 2021-05-25 02:29 ? 2021-05-25 02:29 to get pic vector 2021-05-25 02:30 I am not touching the pic at all 2021-05-25 02:30 there's a weird bit that authorizes virtualization to do the bus cycle to get the vector number from pic 2021-05-25 02:30 yes you are 2021-05-25 02:30 guest does 2021-05-25 02:30 everything guest does, you did it 2021-05-25 02:30 yes 2021-05-25 02:30 the vmm is not, uefi is 2021-05-25 02:31 yes I think I am setting the interrupt acknowledgment vm execution control bit 2021-05-25 02:31 so why haven't you exited boot services? 2021-05-25 02:31 it's a runtime service 2021-05-25 02:31 for a passthrough hypervisor 2021-05-25 02:31 uefi doesn't get any surprise irqs? 2021-05-25 02:31 why not? 2021-05-25 02:31 surprise irqs? 2021-05-25 02:31 stays on your idt forever? 2021-05-25 02:31 so you ripped out the uefi implementation's idt 2021-05-25 02:32 the vmm has its own idt but will never hit it since it never clears its i flag 2021-05-25 02:32 yes, no uefi idt 2021-05-25 02:32 that is way more crazy than anything I would even attempt 2021-05-25 02:33 You know what I'm trying to build right? How would you do it? 2021-05-25 02:33 I am way more pessimistic apparently :D 2021-05-25 02:33 I may not be doing it right? 2021-05-25 02:33 I would exit boot services 2021-05-25 02:33 then I can just do handstands around the apartment and listen to stupid music 2021-05-25 02:33 everything becomes ok 2021-05-25 02:34 I want uefi to be able to load its own os 2021-05-25 02:34 this is a runtime service not a bootloader 2021-05-25 02:34 I want to assume as little about the guest as possible 2021-05-25 02:36 guess you need some sort of diagram or table concerning the split of responsibilities here 2021-05-25 02:37 you are trying to make virtualization work in uefi application and expect to exit back to shell and everyone is thumbs up? 2021-05-25 02:37 I would say you can't 2021-05-25 02:37 probably the 'simplest' way to do that would be to flip the tables: enter vm mode and run uefi as a guest itself 2021-05-25 02:37 then when you're done put it back 2021-05-25 02:38 total rug pull for guest to change hardware with impunity and still call uefi later 2021-05-25 02:38 okay, so hyperjacking hypervisors like Simplevisor install themselves as a driver, set up their own gdt/idt etc. (but not necessarily page tables!), and then vmlaunch into their caller, right? 2021-05-25 02:38 Works in ueif 2021-05-25 02:39 The goal is that, but I want a gdb stub which talks over com1 2021-05-25 02:39 So I need to intercept writes to com1 and the com1 interrupt 2021-05-25 02:39 you can make it enter the virtualization and work. I am saying crazy part begins when you return to uefi or call its apis at that point 2021-05-25 02:39 after guest swizzled hardware 2021-05-25 02:39 Oh, I stop calling uefi APIs in the VMM 2021-05-25 02:40 but the uefi shell is now our guest 2021-05-25 02:40 then why don't you exit boot services 2021-05-25 02:40 then you can stomp all over entire machine and it's good to go 2021-05-25 02:41 I don't want to set up the guest bootloader myself. I want to write a hypervisor not a bootloader. 2021-05-25 02:41 at that point, who else would be providing an idt. your idt is the only one 2021-05-25 02:41 what? 2021-05-25 02:42 There is a guest IDT and a host IDT. I wrote the host IDT. 2021-05-25 02:42 after exiting boot services it is fine to change everything 2021-05-25 02:42 before that, not fine 2021-05-25 02:42 I don't change any of that shit in the guest 2021-05-25 02:42 only in the host 2021-05-25 02:43 the host gets its own copy of everythign 2021-05-25 02:43 The guest keeps the old copy 2021-05-25 02:43 so uefi programs can just fiddle with all the hardware all the want then 2021-05-25 02:44 even move idt and leave it 2021-05-25 02:44 yes 2021-05-25 02:44 no 2021-05-25 02:44 should they is a different answer 2021-05-25 02:44 https://klange.dev/s/Screenshot%20from%202021-05-25%2011-44-13.png neato 2021-05-25 02:44 uefi drivers run as ring 0 2021-05-25 02:44 they are providing an environment and you have to play along with their memory manager and stuff to use the drivers it loaded from rom and stuff 2021-05-25 02:45 can't just stomp all over it and continue calling it 2021-05-25 02:45 you have to warn them to stay back and you can go nuts then, they watch with popcorn 2021-05-25 02:45 I don't stomp over it 2021-05-25 02:46 by exiting boot services 2021-05-25 02:46 ok I made my point 2021-05-25 02:48 Also despite having a difference between "applications" and "drivers", if you want to yield back to the firmware you have to manually relinquish everything you acquired from it :\ 2021-05-25 02:48 For a runtime service is that true?? 2021-05-25 02:48 This is not an application or a driver 2021-05-25 02:49 This is runtime services data which I never free 2021-05-25 02:49 so my runtimeservice can replace the idt too then 2021-05-25 02:50 point it to mine. I need idt 2021-05-25 02:50 I mean the hardware won't stop you 2021-05-25 02:50 you see why that can't be right though 2021-05-25 02:50 Runtime services are why regular applications need to free, but you'd think they'd do that for you if you mark yourself as an app... 2021-05-25 02:51 My EFI build of my interpreter repl just tries to allocate a huge chunk (trying progressively smaller until it succeeds) to throw its object heap at, and then frees that on exit. 2021-05-25 02:51 There are different types of uefi applications: apps, which just run in the shell and exit, like an exe, runtime services, which hang out being SMM drivers and stuff which the OS can call into potentially, and uefi drivers 2021-05-25 02:52 And OS loaders are a subset of the first one. 2021-05-25 02:52 I believe so 2021-05-25 02:52 Just instead of returning to the shell they call exit boot services :) 2021-05-25 02:52 yes 2021-05-25 02:52 I have 320KB heap in bootloader. 320KB ought to be enough for anyone 2021-05-25 02:52 so I structured this as a runtime service so UEFI tells the OS not to stomp on my shit 2021-05-25 02:53 doug16k: not enough for my object heap that wants to load files into Kuroko bytes objects :) 2021-05-25 02:53 yeah. I could make it giant in a second if I needed 2021-05-25 02:53 Right now I don't set up EPT to stop the guest from stomping on my shit, but I should, just one thing at a time 2021-05-25 02:53 Debating whether I should switch that to my own graphical terminal, but using the text services just feels more appropriate... 2021-05-25 02:54 Eventually it'll be the basis of my new loader, and I'll have an implementation of Multiboot in knock-off-Pyhton. 2021-05-25 02:57 but this network stack must come first, it is the one missing thing blocking an upstream merge. 2021-05-25 02:58 I don't really care about storage drivers or filesystems, since the tarball ramdisk stuff is working, SMP is good enough to at least merge and fix all the bugs later, but without a network stack and a package manager, it's not really ToaruOS. 2021-05-25 02:59 heat, here I am doing that section alignment thing I said not to do the other day in uefi linker script 2021-05-25 03:59 neat, objdump --dwarf calls out every inlining site pretty clearly: https://gist.github.com/doug65536/12576e806a5e4e8ef8aa09c5266088fc 2021-05-25 03:59 ​gist.github.com: gist:12576e806a5e4e8ef8aa09c5266088fc · GitHub 2021-05-25 04:01 yah i think it's really improved over the years 2021-05-25 04:02 which is why ealing with inlines is no longer a complete trash fire 2021-05-25 04:02 just mostly annoying 2021-05-25 04:04 you could figure out the actual call stack for a profiler result even if it were inlined to oblivion! 2021-05-25 04:05 not be all flattened down to top level of inlining 2021-05-25 04:05 the thing hosting all the inlines I mean 2021-05-25 04:13 ha! DW_AT_inline : 2 (declared as inline but ignored) 2021-05-25 04:29 So we are actually all migrated here? 2021-05-25 04:30 it tells you the offsets as plain as day https://gist.github.com/doug65536/8b2a44cc80b44c088c2cdf46152bea39 2021-05-25 04:30 ​gist.github.com: gist:8b2a44cc80b44c088c2cdf46152bea39 · GitHub 2021-05-25 04:32 Making figures for research is not easy 2021-05-25 05:08 gorgonical: for the most part. migrated 2021-05-25 08:06 Hello hello 2021-05-25 08:07 * geist waves at sortie 2021-05-25 08:07 your irc server is still up! 2021-05-25 08:15 what's supposed to happen if you did this: char f[] = "A🂡b🂡c"; char *x = strtok(f, "🂡"); totally screw up because of 4 byte 🂡 ? 2021-05-25 08:17 geist: irc.sortix.now and forever! 2021-05-25 08:17 (While kernel panics are in short supply. Offer void where prohibited.) 2021-05-25 08:18 I'm guessing 🂡 will make 4 delimiters, and randomly screw up any other multibyte stuff that happens to use same 0x80+x thing 2021-05-25 08:18 mbstok I guess 2021-05-25 08:24 well, doesnt answer your q, but there's always memmem() 2021-05-25 08:24 yeah I'd never call strtok 2021-05-25 08:24 huh. after all these years i've never seen that one 2021-05-25 08:24 I'd walk it with strcspn 2021-05-25 08:24 i've used strtok_r() though, which i think is pretty usable 2021-05-25 08:25 memmem apparently isn't standardized, first appeared in glibc according to netbsd manpage 2021-05-25 08:25 apparently fbsd and linux have it 2021-05-25 08:25 just realizing you could put a multibyte encoded character in the delimiter string. is it supposed to just screw up, or do a proper scan for that multibyte delimiter? 2021-05-25 08:26 I can imagine if the 2nd byte were 0x84 then it would go berserk and make every 0x84 utf8 encoded 2nd byte a delimiter 2021-05-25 08:27 which functions have to properly iterate through utf8? 2021-05-25 08:28 my guess is DONT_DO_THAT 2021-05-25 08:30 netbsd "see also"s bm(3) boyer-moore optimized string search based on frequency probability, but only singles -- another example of you can always cheat if you have metadata 2021-05-25 08:30 *only single-byte chars 2021-05-25 08:31 ya bm algo popped into my head when you mentioned memmem 2021-05-25 08:32 I was kind of looking forward to parsing out all the char32_t from the strcspn delimiter string and walk the string with utf8 parsing, lol 2021-05-25 08:38 ya this chops it: { char f[] = "Áx"/*c3 81*/; cout << strtok(f, "ā" /* c4 81 */); } 2021-05-25 08:39 can't I set the locale to enable some utf8? 2021-05-25 08:41 result is just c3, "81" is a delimiter (as half expected) 2021-05-25 08:47 << strtok(0, ","); 2021-05-25 08:47 oops 2021-05-25 08:53 the discarding consecutive delimiter thing pretty much wrecks strtok 2021-05-25 08:54 more like separator? 2021-05-25 08:55 not a delimiter 2021-05-25 08:56 it's neat to use separator like " \t\r\n" 2021-05-25 08:57 * gog meows 2021-05-25 08:57 wait yeah I have it backwards 2021-05-25 08:57 that is delimiter. separator that strictly separates is like csv 2021-05-25 08:58 space delimited would imply any number of spaces 2021-05-25 09:12 what does c11 standard mblen doc mean mean by this: The implementation shall behave as if no library function calls the mblen function. 2021-05-25 09:13 can you describe the difference between behaving as if they do call it and behaving as if they don't call it? 2021-05-25 09:14 doug16k: lol what a weird sentence 2021-05-25 09:14 > Each call to mblen updates the internal global conversion state (a static object of type mbstate_t, only known to this function). If the multibyte encoding uses shift states, care must be taken to avoid backtracking or multiple scans. In any case, multiple threads should not call mblen without synchronization: mbrlen may be used instead. 2021-05-25 09:14 maybe that was a hamfisted way of saying "this is not thread safe" 2021-05-25 09:14 gog: yes 2021-05-25 09:15 ah I see 2021-05-25 09:16 also says "until C23" which is exciting 2021-05-25 09:16 raw string support in C23 pls 2021-05-25 09:20 i had to look that up. c2 "It's a piece of cake in FortranLanguage 77, where all strings are raw anyway: " lol 2021-05-25 09:20 basically mblen is amateur hour and you should call mbrlen if you are not an idiot 2021-05-25 09:21 fortran77 predates \n \t etc. ? lol 2021-05-25 09:22 doesn't look like that's going to be on the agenda 2021-05-25 09:55 I have a strstr that uses an incremental hash for the scan. I could probably turn that into memmem 2021-05-25 09:58 https://github.com/doug65536/dgos/blob/master/libc/src/string/strstr.cc 2021-05-25 09:58 ​github.com: dgos/strstr.cc at master · doug65536/dgos · GitHub 2021-05-25 10:54 Hmmm https://klange.dev/s/image0_2021_05_25_19_54.jpg 2021-05-25 10:54 well that's not right ;) 2021-05-25 10:55 it's probably fine... 2021-05-25 10:55 lgtm 2021-05-25 10:55 its virtual memory, just allocate it!! 2021-05-25 10:55 (I got all four of my cores going, this is a symptom of SMP bugs) 2021-05-25 10:56 looks like ascii though, i wonder what it says 2021-05-25 10:56 :dc6Wf 2021-05-25 10:56 HELPME 2021-05-25 10:56 I don't think it's ascii, I think it's just a coincidence. 2021-05-25 10:58 I probably don't want to be debugging this stuff on real hardware, this was just a quick test, and this crash indicates it passed :) 2021-05-25 10:59 i decoded it to ":dcevip" 2021-05-25 11:00 hm, what do I need to log into the wiki? I have a phpbb account and I'm in the wiki group (I think), but wiki.osdev.org isn't taking my phpBB creds 2021-05-25 11:01 oh i dropped a nibble 2021-05-25 11:01 Arsen: let me check, can you link me your profile? 2021-05-25 11:03 on the forum? https://forum.osdev.org/memberlist.php?mode=viewprofile&u=25969 2021-05-25 11:03 ​forum.osdev.org: OSDev.org • Login 2021-05-25 11:03 oh, it's still showing freenode irc names 2021-05-25 11:05 yeah, that'll probably stay like that until chase shows up again 2021-05-25 11:05 Arsen: oh have you made any posts that have been approved? 2021-05-25 11:06 uh not sure, I've mostly been lurking the forums and hanging out on irc and discord 2021-05-25 11:06 Total posts: 0 2021-05-25 11:06 likely not actually 2021-05-25 11:06 yeah 2021-05-25 11:06 I think when the moderation queue was set up the wiki permissions were also updated to require you to be approved first. 2021-05-25 11:07 that's alright, the thing I wanted to correct is already fixed by someone else, I just wanted to see what I was missing 2021-05-25 11:07 :^) I'll try to be more active 2021-05-25 12:15 is there an invalid IP address that doesn't exist and is not part of the local network? 2021-05-25 12:16 currently I'm spamming data to a random google server but that's not very nice of me 2021-05-25 12:16 I remember reading about benchmarking/test ones in the local network but that doesn't work once ARP/NDP fail 2021-05-25 12:17 heat, you could try 127.0.0.2 or any other from 127.0.0.0/8 2021-05-25 12:17 but reading the other messages that might not be helpful 2021-05-25 12:17 and that should hit localhost no? 2021-05-25 12:17 https://en.wikipedia.org/wiki/Reserved_IP_addresses 2021-05-25 12:17 ​en.wikipedia.org: Reserved IP addresses - Wikipedia 2021-05-25 12:18 heat, yes that whole range is localhost, but most are not listening on all adresses in that range 2021-05-25 12:18 oh 2021-05-25 12:18 linux does, even when not configured .. so scrap that and sorry for spam 2021-05-25 12:19 LittleFox, not an issue 2021-05-25 12:19 Maybe some of those 240.0.0.0/4 ones? 2021-05-25 12:19 reserved, hm better not I guess? 2021-05-25 12:20 192.0.2.0 (test-net-1)? 2021-05-25 12:20 (/24) 2021-05-25 12:20 TEST-NET-2 and 3 look promising 2021-05-25 12:20 NET-1 not so much since it's in the local network 2021-05-25 12:21 is it? 2021-05-25 12:21 yes 2021-05-25 12:21 192.168.0.0/16 is local and 192.0.0.0/24 is local 2021-05-25 12:21 hm 2021-05-25 12:21 s/local/private network/ 2021-05-25 12:21 if you have control of your router, might set it to simply drop packets dested for the test nets (I've not looked at the RFCs so I don't know if internet routers are also supposed to drop those packets) 2021-05-25 12:21 right 2021-05-25 12:22 and test-net-1 has the advantage to _look_ normal, so easier to spot I guess? x) 2021-05-25 12:22 would be for me at least 2021-05-25 12:22 local-but-not-really 2021-05-25 12:22 I could also send those 127.0.0.2 since my OS doesn't listen for them and they're explicitly martian packets I think 2021-05-25 12:22 so the router would immediately drop them 2021-05-25 12:22 need one as destination, right? 2021-05-25 12:22 not source? 2021-05-25 12:23 yes 2021-05-25 12:23 basically I want a sinkhole 2021-05-25 12:23 that doesn't impact my future chances of employment by a big tech company ;) 2021-05-25 12:24 even 0.0.0.0/8 would work for that I guess - but technically that would be invalid 2021-05-25 12:24 "Addresses within the TEST-NET-1, TEST-NET-2, and TEST-NET-3 blocks SHOULD NOT appear on the public Internet" https://datatracker.ietf.org/doc/html/rfc5737 2021-05-25 12:24 ​datatracker.ietf.org: rfc5737 2021-05-25 12:24 hm should is a bit weak 2021-05-25 12:24 surprisingly weak 2021-05-25 12:24 all of these are technically invalid 2021-05-25 12:25 that's the point 2021-05-25 12:25 If they appear on the public Internet, it's someone elses fault :P 2021-05-25 12:28 GeDaMo, hm, yes, very true 2021-05-25 12:28 :D 2021-05-25 12:29 hm no heat, test-net-* is valid when used for testing - or .. no its not judging from that list, but was intended as that? 2021-05-25 12:29 .. just do IPv6 and I allocate you one IP for that? XD 2021-05-25 12:31 (oh V6 has a "discard prefix") 2021-05-25 14:25 0 2021-05-25 14:25 sorry, bad channel :p 2021-05-25 15:04 Morning? 2021-05-25 15:04 Man, either Libera is flakey, or my bouncer and it don't get along. :/ 2021-05-25 15:15 it's the former 2021-05-25 15:15 it's better today 2021-05-25 15:16 or rather, the server i connected to this morning has been stable 2021-05-25 15:23 Ok. 2021-05-25 15:23 My bouncer disconnects, then I come back with a conflict nick (Bitweasil-), and it won't auto-identify, so I get banned from channels and it's a pain to sort it out. 2021-05-25 15:24 Bitweasil: consider SASL auth, ZNC supports it 2021-05-25 15:25 Hm, ok. Does that auto-identify? 2021-05-25 15:25 I've just got the nickserv module enabled. 2021-05-25 15:26 Yes, it does, during the connection 2021-05-25 15:26 SASL talks to services directly and will identify you before you join channels 2021-05-25 15:26 Ah, good to know - I'll look into that. 2021-05-25 15:26 Half an hour to get the keys registered and such or so? 2021-05-25 15:26 you can use plain, which just takes your password 2021-05-25 15:27 you give the key fingerprint to nickserv, takes no time or human interaction at all 2021-05-25 15:27 if you choose ssl external that is 2021-05-25 15:28 Ok, I'll look. Sounds useful, thanks! 2021-05-25 16:02 Here is an URL that leads at a web page offering a guide I think may be relevant for, Bitweasil: https://libera.chat/guides/certfp 2021-05-25 16:02 ​libera.chat: Using CertFP | Libera Chat 2021-05-25 16:09 TEST-NET-{1,2,3} should only appear in examples and never be used but people do dumb things (see allocated v4 ranges that are used privately by the owner so non-owners got the bright idea to use them as RFC1918 spaces behind NAT which worked great until the owner started using the range publicly) 2021-05-25 16:14 kc8apf: TEST-NET-1,2,3 are very clearly stated as non-routable so you're pretty much safe using them 2021-05-25 16:14 it's not like you're using a non-allocated block of addresses 2021-05-25 16:15 yet someone will advertise them in their BGP config at some point 2021-05-25 16:15 It's a near certainty that someone is already using them as additional RFC1918 space 2021-05-25 16:16 then they shouldn't be surprised no traffic gets routed there :) 2021-05-25 16:16 heat: in the past, i used a vpn that had "claimed" the whole 5.x.y.z range, but many years later, that range began being allocated to real servers 2021-05-25 16:16 heat: i still had the vpn in my routing tables, so it took a bit to figure out why some new sites where just never loading 2021-05-25 16:18 saying something is reserved != saying something is an example block of IPs and explicitly non-routable 2021-05-25 16:18 if you want to break RFCs, it's your fault as a network operator 2021-05-25 16:18 yeah 2021-05-25 16:19 i dont know what the original state of the 5 block was 2021-05-25 16:19 so i'm not sure who was at fault 2021-05-25 16:19 wikipedia says reserved 2021-05-25 16:19 ah 2021-05-25 16:22 it was originally a packet radio network block 2021-05-25 16:23 in general, the answer to "is there an IPv4 address that is guaranteed to not be reachable" is "only if you are the network operator" 2021-05-25 16:23 kazinsal: still lots of arguing about that range being sold improperly 2021-05-25 16:24 if your network operator doesn't listen to the RFCs you might as well unplug your ethernet cable :) 2021-05-25 16:25 what else did they ignore? does the router translate SYNs to FINs and FINs to SYNs? who knows 2021-05-25 16:26 maybe all the packets are in little endian 2021-05-25 16:26 ports are floating point 2021-05-25 16:31 one of the biggest mistakes in network standardization and engineering was making the class E space a hard "reserved". means nothing accepts it, including older core routers, and if the core routers don't accept it, then you can't put it on the internet 2021-05-25 16:32 that's a whole /4 that just disappears into the aether because NOS implementers decided to interpret "reserved" as "verboten" 2021-05-25 16:32 this reminded me 2021-05-25 16:33 kazinsal: a quick google says that would only buy us ~18 months until we run out again 2021-05-25 16:33 i feel like it would take over 18 months to work out all of those bugs 2021-05-25 16:33 your better off just investing that effort into ipv6 2021-05-25 16:33 recently there was a linux patch that made .0 addresses available and routable 2021-05-25 16:33 (they were also broadcast for some reason) 2021-05-25 16:34 honestly I don't think we're going to get rid of IPv4 anytime soon. we'll just get more clever with NAT and routing 2021-05-25 16:34 remember 20 years ago when ipv6 was the future 2021-05-25 16:34 and it still is too 2021-05-25 16:34 I can imagine that at some point client access connections end up not having a single designated dynamic IP address 2021-05-25 16:34 maybe in another 20 years it'll be usable for normal people! 2021-05-25 16:35 even my last isp, local fiber provider, didn't have v6 end-to-end 2021-05-25 16:35 eg. your ISP NATs you to a random IP and random port 2021-05-25 16:35 for every stream 2021-05-25 16:35 kazinsal: they already do that, carrier grade nat 2021-05-25 16:35 the only thign that can stop a bad guy with a NAT is a good guy with a NAT 2021-05-25 16:40 heat: the war stories I've heard and shared with people who work on consumer devices that use IP...... 2021-05-25 16:40 ISPs do all sorts of horrible things to make their network design mostly function 2021-05-25 16:41 kc8apf: i once discovered that my pppoe modem, was on 10.0.0.1, when i had previously thought it was a dumb ppooe bridge 2021-05-25 16:41 i didnt discover that, until i was switching from 192.168 to 10.0.0, and ran into an unexpected ip collision 2021-05-25 16:41 it also had no config to change that, so my router wound up 10.0.0.2 2021-05-25 16:42 lol whoops 2021-05-25 16:42 gog: my current router, also silently ignores all requests to use a 10.0.0.x ip 2021-05-25 16:42 because that is part of the iptv subnet, over a 2nd uplink 2021-05-25 16:43 at my old client i was reconfiguring things (fireworks store, doing last-minute fixups on july 3) and i forgot to deny all but the MACs for the cash registers on the cash register VLAN and then the owner's oldest son plugs in a wifi router with DHCP enabled 2021-05-25 16:43 everything went to shit 2021-05-25 16:44 lol 2021-05-25 16:44 and i hadn't noticed that while i wasnt looking somebody hooked up the cable that went to the house to the cash register switch 2021-05-25 16:44 wrong port lol 2021-05-25 16:44 nb: don't let other people plug thigns in 2021-05-25 16:45 took me an hour to figure out what happened 2021-05-25 17:29 https://gyazo.com/eea613172fefde1bc205e2fa9913a682 me when im tired 2021-05-25 17:29 ​gyazo.com: Screenshot - eea613172fefde1bc205e2fa9913a682 - Gyazo 2021-05-25 17:30 ZetItUp: haha 2021-05-25 17:31 yeah, I've done the occasional "weird, why isn't make picking up my changes" 2021-05-25 17:32 forgot to fg and :wq 2021-05-25 17:32 :p 2021-05-25 17:32 I need to remember that `C-K S` in vscode is "just save friggin everything" 2021-05-25 17:33 worst thing i've done i think is not adding the actual .c file to the list of files to compile and wondering why everything compiled fine even after i added intentional errors :P 2021-05-25 17:34 mhm 2021-05-25 17:34 "why isn't this module load-- ah shit" 2021-05-25 17:36 that's why I spam ctrl+s 2021-05-25 18:03 I was sure x86 had a bit reverse instruction.. https://godbolt.org/z/ax79sh1cW 2021-05-25 18:03 ​godbolt.org: Compiler Explorer 2021-05-25 18:18 huh. I can't find options that get rustc to use SSSE3 for that. 2021-05-25 18:20 hmm, even using skylake doesnt do anything https://godbolt.org/z/5xx78GjE6 2021-05-25 18:20 ​godbolt.org: Compiler Explorer 2021-05-25 18:21 iirc there's no bit reverse macroinstruction 2021-05-25 18:21 but chances are a shr/adc loop gets microoptimized 2021-05-25 18:21 maybe i was just thinking of bswap then 2021-05-25 18:22 there's movbe 2021-05-25 18:23 but it's more like byte-swap than bit-swap 2021-05-25 18:23 right, there isn't a macroinstruction but rustc 1.52.0's codegen for this isn't the best 2021-05-25 18:24 blame llvm, not rust! :P 2021-05-25 18:25 unless it's not passing some features correctly, but i assumed skylake would have gotten that 2021-05-25 18:27 oh, it might not prefer SSSE3 in this case since you're only reversing a single u32 2021-05-25 18:49 so uh, I'm debugging my kernel right? I'm making interrupt handlers work and its throwing a GPF. So I try to attach GDB and step through it to see which line of code is causing it. Except... interrupts aren't exactly function calls, and I think it's getting confused when it gets to the interrupt handler wrapper (which is in ASM) and saying "Cannot find bounds of current function" 2021-05-25 18:50 so uh, how do I deal with this 2021-05-25 18:50 are you doing -d int with qemu? it spits out a lot but you can see the error code when it #GPs and slides into a #DF 2021-05-25 18:51 yeah 2021-05-25 18:51 wait 2021-05-25 18:51 error code 2021-05-25 18:51 where's the error code at 2021-05-25 18:51 lemme try 2021-05-25 18:51 on the stack 2021-05-25 18:51 oh right 2021-05-25 18:51 how do I get to that 2021-05-25 18:51 well also in the monitor output 2021-05-25 18:52 it should say err: 2021-05-25 18:53 I don't see an err 2021-05-25 18:53 can I paste the output and show ya 2021-05-25 18:53 https://paste.ubuntu.com/p/5QQXG4s6Qs/ 2021-05-25 18:53 ​paste.ubuntu.com: Ubuntu Pastebin 2021-05-25 18:54 https://i.imgur.com/X4RhMV2.png 2021-05-25 18:54 e= is the error code 2021-05-25 18:54 oh e 2021-05-25 18:54 it's...52 2021-05-25 18:55 where do I look up errors 2021-05-25 18:55 v=0xd? 2021-05-25 18:55 yeah 2021-05-25 18:56 check_exception old: 0xffffffff new 0xd 2021-05-25 18:56 1: v=0d e=0052 i=0 cpl=0 IP=0008:00100057 pc=00100057 SP=0010:00106fd0 env->regs[R_EAX]=00000000 2021-05-25 18:56 then again 2021-05-25 18:56 check_exception old: 0xd new 0xd 2021-05-25 18:56 2: v=08 e=0000 i=0 cpl=0 IP=0008:00100057 pc=00100057 SP=0010:00106fd0 env->regs[R_EAX]=00000000 2021-05-25 18:56 now the e is zero 2021-05-25 18:56 yeah 8 is double fault 2021-05-25 18:56 has no code 2021-05-25 18:57 for your GP though the error code is a segment selector 2021-05-25 18:57 a permissions thing? 2021-05-25 18:58 how do you know what the errors mean 2021-05-25 18:58 https://wiki.osdev.org/Exceptions#General_Protection_Fault 2021-05-25 18:58 ​wiki.osdev.org: Exceptions - OSDev Wiki 2021-05-25 18:58 for your #GP, the error code being 52 looks wrong 2021-05-25 18:59 so i'd examine your idt 2021-05-25 18:59 and make sure all the entries are set for PL=0 2021-05-25 18:59 ah 2021-05-25 18:59 with the kernel's segment selector 2021-05-25 19:00 ah I see 2021-05-25 19:00 thank you for the information :) 2021-05-25 19:00 I think I can read qemu output better now too 2021-05-25 19:00 :) 2021-05-25 19:04 Wow. My connection isn't dropping every 120 seconds. I don't know how to act, now. 2021-05-25 19:06 hey bb 2021-05-25 19:08 *jimbzy's connection drops* 2021-05-25 19:08 Hehehe 2021-05-25 19:31 nur: it says "Cannot find bounds of current function" because you don't have debug information on your assembly code 2021-05-25 19:32 jimbzy, more copulatory stares would be a start 2021-05-25 19:32 Hehehe 2021-05-25 19:32 please no staring hornily on main 2021-05-25 19:33 ಠ_ಠ 2021-05-25 19:33 how dare you i am a married woman 2021-05-25 19:34 "my wife and i saw you from across the bar and we hate your vibe. she's gonna kick your ass later" 2021-05-25 19:34 none of the exits are safe 2021-05-25 19:37 not even _Exit? 2021-05-25 19:39 _Exit just directly teleports you to the realm of being beaten up by gog's wife 2021-05-25 19:39 abort()? 2021-05-25 19:40 I think that's just drinking until you pass out 2021-05-25 19:40 when in doubt, brace yourself and ud2 2021-05-25 19:42 heat, is there a way to get that? I added -g to my compile flags for gcc 2021-05-25 19:42 is there one for the assembler too? 2021-05-25 19:43 nur: you need to write that yourself 2021-05-25 19:43 kazinsal: what if SIGABRT? 2021-05-25 19:43 the bar is on fire. if you're lucky, you'll get beaten up instead of suffering smoke inhalation 2021-05-25 19:43 abort is essentially just raise(SIGABRT) + a few failsafes 2021-05-25 19:44 heat, oh uh... that is beyond my current comprehension of how things work under the hood :-| 2021-05-25 19:44 nur: yeah, dont worry, you just need to stepi and whatnot 2021-05-25 19:44 you just don't have fancy debugging over that, which is OK 2021-05-25 19:45 * CompanionCube wonders how annoying writing the DWARF info your self would be. Probably very. 2021-05-25 19:46 note to self, I should probably give google more context when googling dwarf 2021-05-25 19:46 suddenly you're twelve tabs in and the credit card is out and you're buying a sharpened battleaxe 2021-05-25 19:46 lol 2021-05-25 20:00 mfw in the open file dialog in windows you can't type file.txt file.txt file.txt 2021-05-25 20:00 but it WILL open the same file multiple times if you type "file.txt" "file.txt" "file.txt" 2021-05-25 20:00 yeah, most windows UI stuff is intended to do the obvious-to-laypersons thing 2021-05-25 20:00 i thik it depends on how it's opened. iirc there's a large flags field that says things like multiple file selection, dir selection, etc 2021-05-25 20:01 instead of the obvious-to-grognards thing 2021-05-25 20:01 the average person thinks it's more likely to open a file called "profile history" than it is to open two files called "profile" and "history" at the same time 2021-05-25 20:01 for example 2021-05-25 20:02 i see 2021-05-25 20:02 most default win32 UI decisions are about ensuring the average user (who is not exactly a technical type) can do what they want to with the minimum of frustration 2021-05-25 20:03 the people who get frustrated the most at windows tend to be unix nerds and the elderly 2021-05-25 20:03 i suppose that explains it then 2021-05-25 20:03 CompanionCube: CFI directives 2021-05-25 20:03 that's one thing i like about emacs 2021-05-25 20:03 the former because we all expect the software to let us just do bizarre things, and the latter because they're hopelessly incompetent 2021-05-25 20:03 it has advanced settings turned off by default. BUT you can enable them and it asks you if you want to 2021-05-25 20:03 see all of doug16k's assembly code for examples on how to thorougly and painstakingly use it 2021-05-25 20:04 windows should have a setting like, "Really enable advanced settings and also read linux drives like an OS should do anyway?" 2021-05-25 20:04 there is an IFS for ext2/3 2021-05-25 20:04 haven't used it in years tho 2021-05-25 20:05 and it didn't do journaling 2021-05-25 20:05 so ext3 volumes were opened as ext2 volumes 2021-05-25 20:10 iirc you can mount ext4 volumes in WSL 2021-05-25 20:10 but that doesn't make them accessible in File Explorer :( 2021-05-25 20:10 oh wait, no, it does in WSL2 2021-05-25 20:12 `wsl --mount [-p ]` in a command prompt or powershell 2021-05-25 20:12 then it shows up as a device in /mnt/wsl and can be accessed in the Linux category of the sidebar 2021-05-25 20:13 that mounts them in linux in a VM and then windows talks 9p2000 to linux 2021-05-25 20:14 the 9p support in windows now is quite nice it seems 2021-05-25 20:18 (i wonder if i can get it to talk to plan 9) 2021-05-25 20:55 gog, even windows doesn't implement ext4? does anything except linux?! 2021-05-25 20:55 the backward compatibility of ext4 has screwed it out of anyone implementing it 2021-05-25 20:56 there's a third-party commercial macOS driver for ext4 2021-05-25 20:57 but that's about it 2021-05-25 20:57 idk i was referring to a (probably ancient and dead) native driver for ext2 2021-05-25 20:57 there's a fuse driver for ext4 on macOS but it's read only 2021-05-25 20:57 geist: looks like fuschehsia is shipping now, gg! 2021-05-25 20:57 which is baffling because ext4's reference implementation is open source 2021-05-25 20:58 does that mean my linux install probably not range based ext4 and is still using the ext2 radix tree thing? 2021-05-25 20:59 and ext4 isn't even ext4 2021-05-25 20:59 ext2 is probably the least crap of the linux filesystems 2021-05-25 21:00 higher versions of ext are not guaranteed to actually function as higher versions of ext by the spec 2021-05-25 21:00 btrfs eats your data 2021-05-25 21:00 reiserfs murders your wife 2021-05-25 21:00 lol 2021-05-25 21:00 oooooooooooooooooooooof 2021-05-25 21:00 i forgot about that until this very moment 2021-05-25 21:00 The last thing Hans Reiser commited was murder. 2021-05-25 21:01 much like his wife, hans reiser jokes never get old 2021-05-25 21:01 * jimbzy facepalms 2021-05-25 21:01 i'm gonna go hold my wife for awhile 2021-05-25 21:01 and NOT kill her you sicks 2021-05-25 21:01 sickos 2021-05-25 21:01 apparently they insta-denied him parole 2021-05-25 21:01 like, "try again later fucko" 2021-05-25 21:01 kazinsal, Yeah, I don't see him walking out of there honestly. 2021-05-25 21:01 gog, not UFC kind of hold though, right? 2021-05-25 21:02 no, doug, not that kind of hold 2021-05-25 21:02 ok good 2021-05-25 21:02 KFC, not UFC. You gotta hold her like a 10-piece bucket and sides. 2021-05-25 21:02 she might prefer i put her in a leglock 2021-05-25 21:03 (fried chicken is her biggest vegan weakness) 2021-05-25 21:04 anyhow, be back later probably 2021-05-25 21:12 it's still interesting that ZFSin exists. 2021-05-25 21:13 I'm trying to think of other native linux filesystems 2021-05-25 21:13 I guess JFS and XFS 2021-05-25 21:14 bcachefs? 2021-05-25 21:14 isn't XFS from AIX originally or something? 2021-05-25 21:14 can you boot from that? 2021-05-25 21:14 froggey: IRIX. 2021-05-25 21:14 JFS is originally AIX, XFS is SGI 2021-05-25 21:14 kazinsal: you can boot from anything with an initramfs. 2021-05-25 21:14 fair 2021-05-25 21:15 oh, you mean like has a native linux driver, not was developed specifically for linux? 2021-05-25 21:17 yeah, I guess if it has a native driver and you can boot from it it's a native FS 2021-05-25 21:17 and supports posix stuff 2021-05-25 21:18 so that excludes FAT32 2021-05-25 21:20 fat32 used to work 2021-05-25 21:20 haven't checked in a while 2021-05-25 21:20 you might have to turn on case sensitive mode (instead of only being case preserving) 2021-05-25 22:37 This is the point in osdev where I debug why openssl SSL_new returns null 2021-05-25 22:37 I'm this closed to xkcd 349 compliance 2021-05-25 22:57 didn't you use libressl? 2021-05-25 22:59 as all good developers should 2021-05-25 23:06 you can also pick one of the 300 OpenSSL forks there are 2021-05-25 23:06 and pray nothing breaks 2021-05-25 23:06 spoiler: it breaks 2021-05-25 23:08 er.. i thought OpenSSL was the defacto standard? idk it's been a while. never heard of "libressl" 2021-05-25 23:09 libressl is the OpenBSD foundation's fork of openssl 2021-05-25 23:09 oh wow openbsd uses it.. that must be the better version :p 2021-05-25 23:09 (not joking) 2021-05-25 23:09 emphasis on code correctness 2021-05-25 23:09 and simpler interfaces 2021-05-25 23:09 libtls is meant to be the newer, less obnoxious frontend to libressl than the usual openssl interfaces 2021-05-25 23:11 fair enough 2021-05-25 23:13 Matt|home: OpenSSL is the defacto standard and very few systems actually use libressl 2021-05-25 23:13 libressl is cute and all until stuff breaks 2021-05-25 23:15 One day, I will commit the grave sin of writing my own TLS implementation... 2021-05-25 23:15 that's a bit strange.. from what i remember of the openbsd team, they take auditing to extreme levels 2021-05-25 23:15 (And then sortie can use _that_ in sortix!) 2021-05-25 23:15 libressl works fine 2021-05-25 23:16 gets updated a lot too 2021-05-25 23:16 heat: Turns out it's well because I don't have AF_UNIX SOCK_DGRAM support and changing it to SOCK_STREAM means the message boundaries got fucked up so libssl didn't get init'd properly 2021-05-25 23:16 their base crypto library as part of it is really nice too 2021-05-25 23:16 klange! 2021-05-25 23:16 Come join us over at irc.sortix.org 2021-05-25 23:16 kazinsal: which linux distro uses libressl? 2021-05-25 23:16 basically all the crypto bits in -lssl separated out into -lcrypto 2021-05-25 23:16 yeah, exactly 2021-05-25 23:16 do you have cookies? 2021-05-25 23:16 THIS IS THE EU 2021-05-25 23:17 heat: none, because linux people tend to be stubborn idiots 2021-05-25 23:17 lol 2021-05-25 23:17 https://lwn.net/Articles/841664/ 2021-05-25 23:17 ​lwn.net: LibreSSL languishes on Linux [LWN.net] 2021-05-25 23:17 masturbatory ideological inertia stops actual meaningful change 2021-05-25 23:17 sortie: if you ever make an embedded version of sortix, please call it shortix 2021-05-25 23:17 kazinsal, you should read that 2021-05-25 23:18 it's good that openssl has managed to figure out how to write good code 2021-05-25 23:18 however its interfaces are still an atrocity 2021-05-25 23:18 they enable people to make massive mistakes in TLS implementations 2021-05-25 23:36 j`ey: yep! 2021-05-25 23:36 already rolling out to N devices 2021-05-25 23:36 do you guarantee your strerror_r is truncated because nobody's going to check for -1 ERANGE from it in a million years? 2021-05-25 23:38 or do people like error handlers so much, they add error handlers to their error handlers? 2021-05-25 23:38 musl's strerror_r returns ERANGE 2021-05-25 23:40 yes but I mean, you'd give them a null terminated "Unkno\0" if they called strerror_r(23847683, buf, 6) 2021-05-25 23:41 not Unknow then the following garage until lucky null 2021-05-25 23:43 * geist senses a disturbance in the sortix 2021-05-25 23:43 doug16k, musl handles that, yes 2021-05-25 23:43 also you don't return -1 ERANGE, you return ERANGE 2021-05-25 23:44 * gog meows 2021-05-25 23:44 ^,,^ 2021-05-25 23:46 sortie: I hope you're collecting valuable data with this experiment. 2021-05-25 23:47 Hey let me know if you get in 2021-05-25 23:47 sortie did this so he could kick us out from the server 2021-05-25 23:47 I got to hostname check and then it timed out. 2021-05-25 23:47 same 2021-05-25 23:47 Disconnected (Remote host closed socket) 2021-05-25 23:47 (on 6697) 2021-05-25 23:47 So it did handshake and do some TLSes for a bit. 2021-05-25 23:47 yah 2021-05-25 23:48 a little bit of TLS here a little bit of TLS there 2021-05-25 23:48 Did port 6667 work? 2021-05-25 23:48 you want us to connect to irc like common people? 2021-05-25 23:49 heat, man page says: The XSI-compliant strerror_r() function returns 0 on success. On error, a (positive) error number is returned (since glibc 2.13), or -1 is returned and errno is set to indicate the error (glibc versions before 2.13). 2021-05-25 23:49 return -1 then set errno to ERANGE is what I meant 2021-05-25 23:49 that's non conforming 2021-05-25 23:49 yeah? 2021-05-25 23:49 it says XSI compliant 2021-05-25 23:49 oh 2021-05-25 23:49 yes, but the -1 errno = ERANGE is non conforming 2021-05-25 23:50 I see 2021-05-25 23:50 that's why they fixed it 2021-05-25 23:51 sortie, oh wait I forgot to enable SSL for the server lol 2021-05-25 23:51 but yeah, still hangs 2021-05-25 23:51 Hmm I can get in via 6667 2021-05-25 23:52 libera worked for 6667 or 6697 for me i tested both 2021-05-25 23:52 johnjay, not libera, irc.sortix.org 2021-05-25 23:52 the best irc server in the world 2021-05-25 23:52 sigh. well at least i tried to be useful there 2021-05-25 23:53 but anyway has any news happened with freenode yet 2021-05-25 23:53 or is it still wait and see 2021-05-25 23:53 the freenode osdev channel is muted, so at least it's not forked 2021-05-25 23:54 meaning if it was taken over it would be unmuted? 2021-05-25 23:54 sortie, for proper ssl you should get a letsencrypt cert and use libgnutls30 2021-05-25 23:54 are a lot of channels doing that? 2021-05-25 23:54 dunno! 2021-05-25 23:54 lol gnutls 2021-05-25 23:54 arch did it too 2021-05-25 23:54 wont freenode admins force it unmuted eventually? 2021-05-25 23:54 i dunno! 2021-05-25 23:54 i guess that's the idea. if they do then it shows they are the bad guys 2021-05-25 23:54 i guess 2021-05-25 23:54 Best not to think about it. 2021-05-25 23:55 * geist2 senses a jedi mind trick through the internet 2021-05-25 23:55 like when you draw a line in the sand and say don't cross this line or i'll attack! then they cross the line. then you attack with some kind of justification you were in the right 2021-05-25 23:55 everybody is always right 2021-05-25 23:55 sortie: * Connection failed ((336130315) error:1408F10B:SSL routines:ssl3_get_record:wrong version number) <-- is this useful? 2021-05-25 23:56 thats what i got too 2021-05-25 23:58 heat: Hmm maybe 2021-05-25 23:58 Yeah, freenode admins are handing around +F to any folks who want to start taking care of channels which have been cleared out. 2021-05-25 23:58 it was a bit random btw 2021-05-25 23:59 usually it connects but hangs right after the hostname lookup 2021-05-25 23:59 Even # channels, which says a lot. 2021-05-26 00:01 so is the freenode #osdev channel just going to be crystalmath as OP talking to himself 2021-05-26 00:01 dunno, they were talking about becoming staff on freenode too, so quite possibly 2021-05-26 00:03 Not as long as klange is in there with his op hat on, anyway. They'd have to boot him, -m the channel, and re-grow it. Seems unlikely. 2021-05-26 00:03 they did it once... 2021-05-26 00:03 sortie, I get to "found your hostname" then it stops until timeout 2021-05-26 00:04 doug16k, yeah port 6667 seems to work 2021-05-26 00:04 I think somehow it's not hearing your client talk 2021-05-26 00:04 is 6667 serving tls? 2021-05-26 00:04 Plain text 2021-05-26 00:04 ah, well, you don't get points for that :) 2021-05-26 00:04 like a commoner 2021-05-26 00:04 ya now I get like heat, Connection failed. Error: (336130315) error:1408F10B:SSL routines:ssl3_get_record:wrong version number 2021-05-26 00:05 ah I see 2021-05-26 00:05 i can usually get the handshake going 2021-05-26 00:05 that only happened once 2021-05-26 00:05 that's what I got if telling my client to always use tls and specifying port 6667 2021-05-26 00:06 heat makes for sweaty handshakes. 2021-05-26 00:06 And melty milkshakes. 2021-05-26 00:06 doug16k, you're not getting TLS on 6667 2021-05-26 00:06 yeah, that's why I said "I see" 2021-05-26 00:06 it's plaintext 2021-05-26 00:07 hm, did I set up the toaru irc client to support tls with mbed... no, it does not look like I did... 2021-05-26 00:07 something to do in 2.0 i guess 2021-05-26 00:31 what the? { char buf[80]; strerror_r(42, buf, 1000000000); cout << buf; } says ��MZ�[\DEL] 2021-05-26 00:32 (seeing if they strncpy it :) 2021-05-26 00:32 it must be returning something 2021-05-26 00:33 what the hell? { char buf[80]; cout << strerror_r(2, buf, 1000000000) << ":" << buf; } says No such file or directory:���#�[\DEL] 2021-05-26 00:35 manpage says 'If the function stores a string in buf, then at most buflen bytes are stored' 2021-05-26 00:35 so presumably it doesn't have to use buf if it doesn't want to 2021-05-26 00:36 so it just invokes potential UB and makes it point to string literals with char * 2021-05-26 00:36 The whole put of the _r version is that it stores in buf, though; I think that statement means if it doesn't store _anything_ because the errno value is invalid, then the 'up to' doesn't mattter. 2021-05-26 00:37 2 is valid. that's ENOENT 2021-05-26 00:37 no such file 2021-05-26 00:37 billion is buf size. lying to see if they use strncpy 2021-05-26 00:37 it'd fill it 2021-05-26 00:37 'This [returned pointer] may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused)' 2021-05-26 00:37 doug16k, uses snprintf 2021-05-26 00:38 they also don't fill buf yeah 2021-05-26 00:38 buf is only filled for unknown errors 2021-05-26 00:38 https://elixir.bootlin.com/glibc/latest/source/string/_strerror.c#L36 2021-05-26 00:38 ​elixir.bootlin.com: _strerror.c - string/_strerror.c - Glibc source code (glibc-2.33.9000) - Bootlin 2021-05-26 00:39 note the xsi strerror doesn't return a string, so it has to fill buff 2021-05-26 00:39 and apparently you get it if you #undef _GNU_SOURCE and #define _POSIX_C_SOURCE 200112 2021-05-26 00:39 I guess it would have been 10x clearer if I said ENOENT instead of 2 2021-05-26 00:40 const thing isn't ub, it's only ub if you try to write to the result 2021-05-26 00:40 btw g++ implicitly defines _GNU_SOURCE 2021-05-26 00:40 *for some reason* 2021-05-26 00:40 I think that depends on your choice of -std 2021-05-26 00:40 yeah that's why I said potential ub 2021-05-26 00:40 And the whole suite defaults to the gnu* ones 2021-05-26 00:41 oh pointing to string literals with char *? that's classic C 2021-05-26 00:42 so glibc assumes it is dynamically linked or doesn't really care about executable size much 2021-05-26 00:42 seems I've got some catching up to do on this new network stack if I want to compete with sortix 2021-05-26 00:42 glibc absolutely assumes it's being statically linked and has entire subsets of functionality that do not work otherwise 2021-05-26 00:42 dynamically* 2021-05-26 00:42 fuck 2021-05-26 00:43 why do i have this bad habit of typing the exact opposite of what I meant to say 2021-05-26 00:43 it's like target fixation but for irc 2021-05-26 00:43 typing has become so automatic it goes fully autonomous sometimes 2021-05-26 00:43 "don't say literally the wrong thing, don't say literally the wrong thing-oh you said literally the wrong thing..." 2021-05-26 00:44 spoiled by discord where I can type first and think later 2021-05-26 00:44 yeah that's awful when you are trying to help someone escape being confused and you say the opposite by accident right before they get it 2021-05-26 00:48 so strerror_r is a trainwreck where you aren't quite sure if it uses buf or not or what TYPE it returns? wow 2021-05-26 00:49 yes 2021-05-26 00:50 fun fact: glibc supports statically linked dlopen 2021-05-26 00:50 "supports" is a stretch 2021-05-26 00:50 kinda works 2021-05-26 00:51 doug16k, why do you say it doesn't care about the executable's size? 2021-05-26 00:51 They don't "support" static linking at all any more, but if you do it there's some stuff in place so it can dlopen, which it needs to support some functions (eg. some socket stuff). 2021-05-26 00:52 1) it doesn't lol; 2) I don't see how that's related to strerror 2021-05-26 00:52 sledgehammering out a simple memcpy + itoa with snprintf 2021-05-26 00:53 riiiight 2021-05-26 00:53 chance that they use printf already is near 100%? sure 2021-05-26 00:53 but I want someone to get 4K .text maybe 2021-05-26 00:53 wrong libc homie ;) 2021-05-26 00:54 musl is very minimal 2021-05-26 00:54 rolling my own so far 2021-05-26 00:54 didn't give up yet 2021-05-26 00:54 you also have uclibc but the quality is way down compared to mus 2021-05-26 00:54 musl* 2021-05-26 00:54 I wonder if bionic is also tiny 2021-05-26 00:56 I think bionic is normal-sized 2021-05-26 00:57 based on bsd libc with some extra junk 2021-05-26 00:58 I felt bad when I duplicated a hex lookup table like static char const hexlookup[] = "0123456789abcdef"; 2021-05-26 00:58 and that 0 I don't need at the end! 2021-05-26 00:58 bionic is based on like 3 or 4 different libcs 2021-05-26 00:58 it's the macOS of libc's 2021-05-26 00:59 almost crazy enough to make it say { '0', '1', '2,' ... so there's no null terminator 2021-05-26 01:00 Given the variance in code size just from different optimization flags, shaving a single byte off a string by dropping its nil terminator is idiotic ;) 2021-05-26 01:01 yeah it won't help 2021-05-26 01:01 also, padding 2021-05-26 01:02 yeah it could be 4 to 7 bytes actually 2021-05-26 01:02 even 15 but doubt it 2021-05-26 01:04 it could be just enough to tip you over the edge and add 4K to the executable 2021-05-26 01:05 needing one more page to cover .rodata before .data begins, for example 2021-05-26 01:07 I guess the question is, does anyone care about what happens if you statically link anymore 2021-05-26 01:07 you can call everything from everything in the shared library 2021-05-26 01:07 w/ 25 2021-05-26 01:07 Gah. 2021-05-26 01:08 I mean, can without making anything bigger 2021-05-26 01:10 doug16k: you can just use char hexlookup[16] = "..." 2021-05-26 01:10 also compilers will do interning so you don't have to worry about duplicating 2021-05-26 01:14 moon-child, that appears to work actually, thanks 2021-05-26 01:15 no wait sorry 2021-05-26 01:15 it's an error: error: initializer-string for 'const char [32]' is too long [-fpermissive] 2021-05-26 01:16 that one is 32 because: static char const formatter_hexlookup[32] = "0123456789abcdef0123456789ABCDEF"; 2021-05-26 01:16 I have it on heavy pedantry 2021-05-26 01:17 huh. Works in c but not c++ 2021-05-26 01:20 not having designated initializers in C++ breaks my heart 2021-05-26 01:22 traded that in for locks that always unlock and memory that always frees and files that always close :P 2021-05-26 01:23 iirc there's a neutered version in c++20 2021-05-26 01:23 and vectors that vector, and strings that string 2021-05-26 01:24 I usually use macros for the raii stuff. with_mutex(m) { stuff guarded by m } 2021-05-26 01:24 what do you mean you don't have to use a realloc loop to have a dynamic array 2021-05-26 01:24 blasphemy 2021-05-26 01:24 if you returned it wouldn't work though right? 2021-05-26 01:24 or continue, or break 2021-05-26 01:24 yeah. Though there are hax to work around that 2021-05-26 01:25 yeah it has tolerable limitations 2021-05-26 01:25 there's also a gcc thing that will do what you actually want 2021-05-26 01:25 __attribute__((cleanup)) iirc 2021-05-26 01:25 yeah I use(d?) that at one point 2021-05-26 01:25 heat: you're just not macroing hard enough! 2021-05-26 01:26 monthly reminder that this(https://clang.llvm.org/docs/ThreadSafetyAnalysis.html) is a thing 2021-05-26 01:26 ​clang.llvm.org: Thread Safety Analysis — Clang 13 documentation 2021-05-26 01:26 heat, you missed my favourite: sets that set 2021-05-26 01:27 maps that don't require you to find a crummy implementation of a self balancing binary tree 2021-05-26 01:27 oooh, thread safety thing is cool 2021-05-26 01:28 self balancing binary trees are how you show off your big muscles though right? 2021-05-26 01:28 big muscles small cache 2021-05-26 01:28 oh reminds me, someone wrote a decent C self balancing tree in a fork of LK. need to bring that back 2021-05-26 01:29 geist, yes, that google thing right? 2021-05-26 01:29 you can make them have excellent locality 2021-05-26 01:29 heat: yeah, in trusty 2021-05-26 01:34 i should try to bring parts of the fbl to onyx 2021-05-26 01:34 good intrusive containers? oh my 2021-05-26 01:34 oh fbl is a different can of worms 2021-05-26 01:34 I have it so you can give it an allocator and it uses a page map backed bump allocator you can share among trees holding same type 2021-05-26 01:34 but i did manage to pull some of that too 2021-05-26 01:35 especially after I spent 2 days looking for an ASAN bug that didn't exist and it turns out I accidentally forgot to remove a process from a list_head in its dtor 2021-05-26 01:48 geist: so a random internet article tells me you guys are finally shipping? 2021-05-26 01:48 yep! 2021-05-26 01:48 already rolling out 2021-05-26 01:49 In retrospect, Nest really makes sense as a target platform. 2021-05-26 01:49 Like, duh, of course that's where you'd want a new OS focused on security that also has a shiny Flutter GUI... 2021-05-26 01:49 word. 2021-05-26 01:50 and about 5 years is about right to go from zero to a working OS 2021-05-26 01:50 it's actually what we pretty much said on day 1 2021-05-26 01:52 ready for everyone to take a dependency on everything? :) 2021-05-26 01:52 heh well 2021-05-26 01:52 FWIW the internal arch of fuchsia is far more distributed, so lots of cross deps are in the form of messaging 2021-05-26 01:52 so you can in theory replace services with different implementations 2021-05-26 01:53 much to my chagrin the number of processes and threads in somethig like the home device is much higher than i'd think 2021-05-26 01:53 but makes sense given that there are lots of little micro services 2021-05-26 02:02 what philosophy will it be? "never break anything ever", or, "no way we're keeping it like that"? 2021-05-26 02:03 what do you mean? 2021-05-26 02:04 where the os did something wrong, and they depend on that and you break their code when you make it do it right 2021-05-26 02:05 but their code worked for quite a while then broke because you fixed it 2021-05-26 02:06 This is a problem I avoid by not having anyone else write stuff for my OS. :headtap: 2021-05-26 02:06 oh i dunno. we generally have tried to build into the system a decoupling of APIs and versions so that we can evolve and not get stuck in particular patterns 2021-05-26 02:06 but time will tell 2021-05-26 02:07 as is always the case, dealing with 5 or 10 years from now will be the real interesting problem 2021-05-26 02:07 and definitely somethig that keeps me up at night 2021-05-26 02:07 os is the ultimate case of everyone taking crazy dependencies on weird details 2021-05-26 02:08 yep. there's a rule about that 2021-05-26 02:08 forget the name but the idea is if you make an api eventually everyone will write load bearing code against all the bugs and idosyncracies 2021-05-26 02:09 posix is a great example of 50 years later all these quirks still being load bearing 2021-05-26 02:10 At least with Posix there's a dozen implementations full of hardcore ~~goblins~~ users who will tear you apart, unlike that other OS full of load-bearing bugs. 2021-05-26 02:11 _It is dark and you have assumed something true on Linux applies to all Unix-likes. You are likely to be eaten by a FreeBSD user._ 2021-05-26 02:11 but yeah the syscall layer i drew a lot of lines in the sand over this or that 2021-05-26 02:11 based on the idea of projecting it forward N years and then how does this innoculous feature someone wanted work with all the other ones 2021-05-26 02:11 anyone that says "hey I'll try it and see what it does" potentially adds one more backward compatibility nightmare 2021-05-26 02:11 every time some new thing is added there's this matrix of interactions with other things 2021-05-26 02:12 idea is hold it still long enough that it solidifies, you get real code running against it, then release the grip a bit and see what really doesn't work 2021-05-26 02:13 https://fuchsia.dev/fuchsia-src/reference/syscalls if you're curious 2021-05-26 02:13 ​fuchsia.dev: Zircon System Calls  |  Fuchsia 2021-05-26 02:13 ugh, I completed my DHCP request and got an ACK but qemu gives me the same address on this other port... is my naive configuration making them separate networks... 2021-05-26 02:13 heh yeah i was just tooling up to fiddle with taking the cheesy net stack in LK up a notch so i can connect to sorties irc channel 2021-05-26 02:14 bummer he's not doing ipv6, since that's kinda what i'm interested in rght now, but so it goes. 2021-05-26 02:14 klange, usermode network would be isolated right? 2021-05-26 02:14 what kind is it? 2021-05-26 02:14 I just gave it two -netdevs and they are slirp, are they isolated from each other? 2021-05-26 02:14 should be 2021-05-26 02:14 I want to... not have them isolated - what incantation can give me that? 2021-05-26 02:14 that is two nats right? 2021-05-26 02:14 It must be, and in retrospect that does make sense. 2021-05-26 02:15 you need a host only network, then have nics connected to it 2021-05-26 02:15 I guess that's actually fine and I can configure the other one with a different address range... 2021-05-26 02:15 that is like having two vms on a lan together 2021-05-26 02:15 Or... learn how to deal with the fact I have two interfaces with the same IP in different networks? 2021-05-26 02:16 ya you can probably get it to work a few ways 2021-05-26 02:16 My old network stack didn't support multiple interfaces at all, the driver took over and handled all the network stuff, trying to fix that from the start here but the default setup qemu gives when I throw two devices at it is not to my liking :) 2021-05-26 02:17 my kernel half expects 128 nics :P 2021-05-26 02:17 I have my fresh new Kindle copy of TCP/IP Illustrated vol 1 'cause I want to do this right this time. 2021-05-26 02:17 yah the old newos one i wrote 20 years ago expected lots of nics and routing 2021-05-26 02:17 Userspace DHCP client, resolver in the libc (or in a separate lib dlopen'd by the libc, like glibc does it ;) )... 2021-05-26 02:17 but its pretty dated now so i've been hesistant to port it without basically rewriting with it as inspiration 2021-05-26 02:18 tbf, I hacked together toaru32's in two days with some work colleagues for an open hackathon. 2021-05-26 02:18 yah simple stacks are fun 2021-05-26 02:18 the current one in LK is called 'minip' for a reason :) 2021-05-26 02:18 The fact that it worked on a real piece of hardware is a miracle in its own right. 2021-05-26 02:18 basically good enough to slam some UDP packets are a high rate and then some basic TCP sockets for debugging/firmware updates 2021-05-26 02:18 was using it in some product at work 2021-05-26 02:19 geist, how min. window scaling is there right? 2021-05-26 02:19 of course not 2021-05-26 02:19 ok it is min 2021-05-26 02:19 it's minip! 2021-05-26 02:19 but it's really there for more embedded stuff, so tuning the socket receive buffer/etc is fun 2021-05-26 02:19 toaru32's was only good enough to offer bruteforce TCP sockets to userspace, and you better hope you were behind something smart enough to deal with the rest. 2021-05-26 02:19 trying to design stacks like that to work on embedded and scale up always makes it more complicated 2021-05-26 02:20 Happily I target something a bit newer - even my "ancient" test rig offers 4 cores and 4GiB of RAM to waste. 2021-05-26 02:20 s/newer/bigger/ 2021-05-26 02:21 the max it thinks about at once is one datagram I guess 2021-05-26 02:21 I have half a mind to do this stack in userspace, but I don't want to think about the IPC changes... 2021-05-26 02:21 hard to think like that knowing the normal windowing stuff 2021-05-26 02:22 well that's UDP 2021-05-26 02:22 TCP wise you can do a lot without window scaling 2021-05-26 02:22 you get a full 64k window. i wouldn't call that terrible 2021-05-26 02:22 oops I meant segment 2021-05-26 02:22 just hard to se.... oh 2021-05-26 02:22 oh it's not even tcp? 2021-05-26 02:22 just ip? 2021-05-26 02:22 wait hang on. 2021-05-26 02:22 what are we talking about? 2021-05-26 02:22 what _are_ we talking about 2021-05-26 02:23 nevermind me, proceed 2021-05-26 02:23 if we're alking about the minip think in LK it basically does UDP sockets plus tcp sockets but no fancy options 2021-05-26 02:23 ah so it does do tcp 2021-05-26 02:23 ie, no window scaling, SACK, etc 2021-05-26 02:23 of course. 2021-05-26 02:23 toaru32 has no fancy options, and doesn't even expose UDP :D 2021-05-26 02:23 then it's mintcpip 2021-05-26 02:23 sure. 2021-05-26 02:24 actually isn't it mintcpiparpdhcpethernet 2021-05-26 02:24 actually admission: it doesn't do the connect side of the state diagram 2021-05-26 02:24 toaru32 didn't even expose _listening sockets_, that net stack existed pretty much entirely to allow simple HTTP requests 2021-05-26 02:24 it only accepts incoming connectinos. need to implement that part 2021-05-26 02:24 then i can connect to irc sortix 2021-05-26 02:25 if i'd quit talking on irc i'd actualy get to working on it :) 2021-05-26 02:25 good luck with that 2021-05-26 02:25 even if you did it, you'd be back 2021-05-26 02:25 well yeah but in the form of on an irc client :) 2021-05-26 02:26 then i can flash it on a embedded board with ethernet and you have literally an irc device 2021-05-26 02:26 ya I still have a baffling bug in my bootloader I introduced recently 2021-05-26 02:26 (AKA a bot) 2021-05-26 02:26 irc thin clients 2021-05-26 02:26 the wave of 2021 2021-05-26 02:26 and or a node on a botnet i guess 2021-05-26 02:26 hey, we just sell the devices, it's fine 2021-05-26 02:27 ever had a bug where you don't have the slightest clue why or how it happens and when you step everything it's all perfect? 2021-05-26 02:27 usually you can home right in on it 2021-05-26 02:28 I have had some of the most interesting bugs in my OS over the years. 2021-05-26 02:28 yall are making me want to finish up a proper terminal implementation and sockets so I can connect to sortix IRC from the router I'm connected to sortix IRC through 2021-05-26 02:28 Like the time nyancat was showing up in the wrong places... 2021-05-26 02:29 for me the letter "x" is appearing perfectly in the initrd directory entry in the sector buffer, lol 2021-05-26 02:29 you'd think I'd just set a data breakpoint and poof. not helping 2021-05-26 02:32 it becomes the boy who cried wolf. you have to keep removing/recreating it or it will break at other innocent use of that location before then 2021-05-26 02:32 on each debug rerun 2021-05-26 02:36 you could figure out how to automate that with conditional breakpoint with commands 2021-05-26 02:44 always fun taking code and running it in a completely different environment with different architecture, with different string encoding :D 2021-05-26 02:45 bios 32-bit pmode utf8 vs efi 64-bit longmode 2021-05-26 02:45 ...utf16 2021-05-26 02:46 neat how much just works usually 2021-05-26 02:49 https://security.googleblog.com/2021/05/introducing-half-double-new-hammering.html woo more rowhammer 2021-05-26 02:49 ​security.googleblog.com: Google Online Security Blog: Introducing Half-Double: New hammering technique for DRAM Rowhammer bug 2021-05-26 03:02 good. 1st one doesn't work on my machine :D 2021-05-26 03:03 I mean days straight of running rowhammer-test 2021-05-26 03:04 ayyy 2021-05-26 03:06 my test is mean though, I have ecc so even if it could provoke it, it might correct it. edac-util reported no problems though 2021-05-26 03:07 being 64GB probably made it hard too. I guess that means, good luck rowhammering me right? 2021-05-26 03:08 just having a lot of ram mitigates it right? 2021-05-26 03:09 too hard to know for sure how the rows map to addresses 2021-05-26 03:10 in a thought experiment, sure, you activate exactly the neighbouring rows 2021-05-26 03:13 no github repro repo? 2021-05-26 03:15 if it needs to know 3 nearby rows, it probably has 1/3rd chance of working on my machine 2021-05-26 03:15 my Macbook M1 16gb arrived, thinking of grabbing some of the work Asahi Linux made and doing my own little aarch64 OS, I got uart over usb and memory mapping working so far 2021-05-26 03:15 well 2021-05-26 03:15 crystalmath will probably have #osdev soon enough 2021-05-26 03:15 freenode opers did a bulk sweep of takeovers and redirects 2021-05-26 03:17 atilla, are you allowed? :P 2021-05-26 03:18 doug16k: who cares, im in a 3rd world country they prob cant get me 2021-05-26 03:18 who is "they" 2021-05-26 03:18 the glowie 2021-05-26 03:18 s 2021-05-26 03:18 lawyers I thought 2021-05-26 03:18 whose lawyers? 2021-05-26 03:18 i will run them over if i see them during the night 2021-05-26 03:19 Apple actually seems to be perfectly happy to let people pursue ports to M1, and marcan's work is obviously getting upstreamed so it's all GPL 2021-05-26 03:19 Apple sure as shit isn't _helping_ anyone, but they aren't blocking anything. 2021-05-26 03:19 license agreement doesn't say anything about running macos? 2021-05-26 03:20 No? 2021-05-26 03:20 Yes they are basically "no help but go off" 2021-05-26 03:20 They even pushed the fact they weren't going to do anything restrictive with the boot setup so you could run "alternative OSes" 2021-05-26 03:20 could even send one booting into arch for repairs then 2021-05-26 03:23 well, let's not be hasty! 2021-05-26 03:24 geniuses all know how to use arch I heard 2021-05-26 03:24 isn't the repair place genius bar? 2021-05-26 03:25 I went to install arch and I was like, yeah right, why would you drag me through the boot installation like that, and never used it once 2021-05-26 03:28 it would be funny to make a fork of it called autoinstalled-arch so having arch won't mean you got past the installation barrier anymore lol 2021-05-26 03:30 I think people have done that 2021-05-26 03:36 I want to know how many total km of expansion+shrinkage a cpu die accumulates when bouncing between 45 and 55 all day over some years 2021-05-26 03:37 haha 2021-05-26 03:37 7nm temp sensor is a hardware accelerated RNG 2021-05-26 03:38 it's as quiet as a church mouse down to 38C then TURBO TO HELL!!!111 and spike to 55 2021-05-26 03:39 that's the desktop and software and stuff I guess 2021-05-26 03:39 it's what happens though 2021-05-26 03:41 I guess the spike is caused by being way below power limits for a while and accumulating a huge turbo budget 2021-05-26 03:42 thread wakes up and lives long enough to get to 4.4GHz or something 2021-05-26 03:46 the die is wondering when you are going to install the processing thing with no moving parts :P 2021-05-26 03:47 So osdev fully migrated to libera? 2021-05-26 03:48 Yes. 2021-05-26 03:48 ok 2021-05-26 03:48 officially, yes. 2021-05-26 03:48 osdev sans crystalmath :P 2021-05-26 03:48 because ##osdev on freenode doesn't even mention this channel... 2021-05-26 03:49 How do I suppress unused macro warnings for system headers? 2021-05-26 03:49 :170:9: warning: macro is not used [-Wunused-macros] 2021-05-26 03:49 #define __UINT16_MAX__ 65535 2021-05-26 03:49 Of course not, we have nothing to do with that. 2021-05-26 03:49 And you're not allowed to mention Libera on Freenode. 2021-05-26 03:49 It's against their new policies. 2021-05-26 03:49 ZombieChicken: Freenode mass-renamed channels earlier today 2021-05-26 03:49 They just banned thousands of channels for it. 2021-05-26 03:49 Side-effect, ##osdev is currently modeless 2021-05-26 03:49 radens, your define? 2021-05-26 03:49 *mod-less 2021-05-26 03:49 klange: Ah. Alright. Reason I ask is because #osdev there redirects to ##osdev, which is fun 2021-05-26 03:49 radens, built-in? how 2021-05-26 03:50 ZombieChicken: Yes, that was forced by Freenode, we have nothing to do with it. 2021-05-26 03:50 They stole the channel. 2021-05-26 03:50 radens: gcc docs say 'Built-in macros, macros defined on the command line, and macros defined in include files are not warned about' 2021-05-26 03:50 radens, is that -Weverything in clang? 2021-05-26 03:50 yes doug16k 2021-05-26 03:50 "everything" is insane. don't even use it 2021-05-26 03:51 Weverything exists to test warnings 2021-05-26 03:51 I think it's a joke 2021-05-26 03:51 clang doesn't even recommend using -Weverything 2021-05-26 03:51 klange, ah 2021-05-26 03:58 when I saw the output of everything, it made me think, "ok ok I get. I don't want *everything*" and seemed like a joke :P 2021-05-26 03:58 I guess it fills that role simultaneously 2021-05-26 03:59 i once used -Weverything and turned it off pretty much instantly 2021-05-26 03:59 but i did discover a bunch of useful warnings that I enabled 2021-05-26 04:06 yeah that is a nice idea 2021-05-26 04:06 put it on everything and note good looking ones [-fthing] 2021-05-26 04:07 er -W 2021-05-26 04:07 put it on and grep the lines it doesnt warn about as suspicious 2021-05-26 04:07 lol 2021-05-26 04:08 you mean the blank lines? 2021-05-26 04:08 what are they hiding, right? 2021-05-26 04:08 what made it really clear was when it warned about struct padding 2021-05-26 04:08 like... okay thanks 2021-05-26 04:08 be afraid of the person successfully hiding the gun, not the guy with a gun out :P 2021-05-26 04:08 ^ 2021-05-26 04:09 the poison labelled poison is not the bottle to worry about. 2021-05-26 04:15 isn't it dumb for linux to just leave the boot partition mounted forever? 2021-05-26 04:15 why? in case I update? that means put it in fstab?? 2021-05-26 04:16 ya let's leave the most sensitive and easy to exploit thing mounted forever 2021-05-26 04:17 it should be so worried that it worries about the pages from the disk accesses still being in the cache 2021-05-26 04:18 in bootloader update 2021-05-26 04:21 I guess signing covers a lot 2021-05-26 04:23 could you actually self sign a bootloader and enable secure boot and sign it and make firmware able to verify signing by putting in stuff? 2021-05-26 04:26 yes, you can do that 2021-05-26 04:29 see https://safeboot.dev/ 2021-05-26 04:29 ​safeboot.dev: safeboot 2021-05-26 04:30 encrypted disk is too far for me 2021-05-26 04:31 it might be funny to have the config so if someone stole it, they are totally screwed and it won't even boot normally without clearing cmos, lol 2021-05-26 04:32 there are a few projects that require a yubikey or similar to boot the system 2021-05-26 04:32 even put hard disk passwords so the hard drive doesn't even work right when they try to wipe it? lol 2021-05-26 04:34 hard disk password is surprisingly effective 2021-05-26 04:34 nevermind your data - thing is bricked when he wants to reuse it stolen 2021-05-26 04:35 doug16k: fwiw, Linux doesn't /have/ to have /boot constantly mounted; it's just that it's easy and most distros just pick the easy option 2021-05-26 04:35 https://www.nitrokey.com/news/2020/nitropad-secure-laptop-unique-tamper-detection 2021-05-26 04:35 ​www.nitrokey.com: NitroPad: Secure Laptop With Unique Tamper Detection | Nitrokey 2021-05-26 04:35 kc8apf: boot partition on a USB key works rather well 2021-05-26 04:35 imo, way to go if you're worried about boot attacks is to put the bootloader on a separate usb stick and unplug it as soon as you're booted 2021-05-26 04:35 bonus: protects against evil maid attacks too 2021-05-26 04:35 ubikey&co are a distraction 2021-05-26 04:36 moon-child: that's a fairly minor obstacle to get into a system 2021-05-26 04:36 I can bring my own bootloader 2021-05-26 04:36 (evil maid attacks--only if you also use fde) 2021-05-26 04:36 moon-child: Sorta. Still could mess with the BIOS or something 2021-05-26 04:37 well sure. It's never perfect. But I don't think any other solution beats that one 2021-05-26 04:37 Many systems have BootGuard setup incorrectly so you can modify PEI or similar 2021-05-26 04:38 Heads gets pretty far. It just requires fairly specific hardware since coreboot support isn't widespread 2021-05-26 04:38 heads? 2021-05-26 04:38 https://osresearch.net/ 2021-05-26 04:38 ​osresearch.net: About - Heads - Wiki 2021-05-26 04:39 ooh, neat 2021-05-26 04:39 I can pull off an evil maid attack in under 5 minutes including using spispy to exploit TOCTOU to break ACM 2021-05-26 04:39 is that a pun off of "tails" ? 2021-05-26 04:40 kingoffrance: it's a reference in taking an opposite approach 2021-05-26 04:40 :) 2021-05-26 04:40 that means yes :) 2021-05-26 04:42 I didn't know maids were so dangerous, I'll be careful around them from now on 2021-05-26 04:42 depends on your threat model 2021-05-26 04:43 breaking into people's hotel rooms during DEFCON is an unofficial sport 2021-05-26 04:43 were they maid first then evil, or evil first, then maid? 2021-05-26 04:44 yeah if someone wants to they can get past security 2021-05-26 04:44 always a way 2021-05-26 04:45 My day job includes designing threat models for enterprise hardware so I'm a bit more paranoid 2021-05-26 04:47 in my experience, you are guaranteed to lock yourself out with 2FA 2021-05-26 04:47 100% guaranteed 2021-05-26 04:48 usually sooner, maybe later 2021-05-26 04:48 at scale, someone in an org will lock themselves out regardless of technology 2021-05-26 04:48 account recovery is a necessity 2021-05-26 04:50 it's weird how that is though, I have zero problems with one factor auth at all 2021-05-26 04:51 I used 2FA every day and rarely run into a problem. I don't expect that to be the case for others. 2021-05-26 04:52 though HOTP is more error-prone than TOTP or U2F 2021-05-26 05:13 "scan-build: 0 bugs found." Too bad every command line says error: invalid value 'c++20' in '-std=c++20' 2021-05-26 05:14 my clang is old 2021-05-26 05:14 6.0 lol 2021-05-26 05:15 :-O 2021-05-26 05:16 nice, I can get -9 from package manager 2021-05-26 05:17 does that help? I need c++-analyzer updated 2021-05-26 05:17 doug16k: clang on slackware 14.2 is 3.8 2021-05-26 05:17 gorgonical, wow 2021-05-26 05:18 I don't like updating packages, lol. I have to use slackware-current for my desktop ("have to", heh) and I regret it constantly 2021-05-26 05:18 nice, I need clang-tools-9 2021-05-26 05:18 I don't stay up to date, as you can probably tell by my old dusty clang install 2021-05-26 05:19 I had to blow it out with compressed air before mentioning it in chat, in case you saw it 2021-05-26 05:19 scan-build-9 has way more horsepower than scan-build-3.8 right? :D 2021-05-26 05:20 probably dual overhead cam direct injection vs pushrod carb 2021-05-26 05:20 I should hope man. Do you have difficulties using these static analyzers? I tried to tool my hypervisor with one some time ago 2021-05-26 05:21 But all the inline assembly and wonky build flags made it really ugly 2021-05-26 05:31 a while ago clang analyzer worked almost perfect on my project 2021-05-26 05:31 even bios bootloader 2021-05-26 05:32 modules, efi, whatever. it seemed to not matter what environment 2021-05-26 05:32 it looked at what the code says 2021-05-26 05:32 right now it totally doesn't work 2021-05-26 05:34 not sure if it is my build's fault yet 2021-05-26 05:34 probably 2021-05-26 05:37 inline assembly was the main nice thing. clang was way more picky about them and even noticed wrong constraint 2021-05-26 05:37 gcc just obeys asm no matter how wrong 2021-05-26 05:38 it assumes you must be right 2021-05-26 05:38 I inherited a huge list of gcc flags for this project, one of which turns on "be angry about inline asm" which is nice 2021-05-26 05:39 But it isn't very good -- I spent some hours wondering why xsaveopt was just not working 2021-05-26 05:39 Turned out that I wasn't supposed to put the memory region in the output operands, but gcc didn't complain. Have to put it in input with m+ constraint 2021-05-26 05:40 can you make gcc nitpick asm now? 2021-05-26 05:40 I will check the flags and see if one stands out 2021-05-26 05:41 I say bring it on, my asm are perfect. with a jinx like that it'll definitely find something 2021-05-26 05:41 It must be due to -Wall, which has so many flags now 2021-05-26 05:43 since freenode took over #osdev 2021-05-26 05:43 I wonder if maybe it was the linker that was complaining at me... ? 2021-05-26 05:43 globbot says it stops logging when kicked...what happens when it DCs and can't join #osdev? 2021-05-26 05:44 According to discussion in other channels, it'll delete them 2021-05-26 05:44 That is a very important and strange choice 2021-05-26 05:44 It would just delete 15+ years of logs? 2021-05-26 05:44 gorgonical: not 15 2021-05-26 05:45 I am not sure how much it logs 2021-05-26 05:45 logbot was only in use since 2018 2021-05-26 05:45 Ah 2021-05-26 05:45 before that there was a different service 2021-05-26 05:45 clog iirc, whatever that was 2021-05-26 05:46 nice name 2021-05-26 05:46 see log? 2021-05-26 06:07 I guess the freenode channel is now properly dead 2021-05-26 06:08 Very likely. At least until an oper can recover it 2021-05-26 06:09 freenodecom is basically going across freenode disabling every channel for violating the policy of not having two hashtags, pound signs, what ever in their name 2021-05-26 06:10 throwing weight around? 2021-05-26 06:10 why piss everyone off, that's what I want to know 2021-05-26 06:17 I wonder if it's a political stunt 2021-05-26 06:17 feels more like a "it makes me uncomfortable that people are leaving in droves because of my bad decisions, so i will make more bad decisions" stunt 2021-05-26 06:24 whoa, i just saw the mass kick 2021-05-26 06:25 Where? 2021-05-26 06:25 on freenode, the #osdev channel 2021-05-26 06:27 is there anything actually happening on the ##osdev channel? 2021-05-26 06:27 That wasn't a mass kick 2021-05-26 06:27 it was a wipe of the banlist 2021-05-26 06:27 yah but also i dont seem to have op status anymore? 2021-05-26 06:27 and a redirect rule, and chanserv wiped 2021-05-26 06:28 ah. oh well, end of an era i guess 2021-05-26 06:28 o7 2021-05-26 06:30 ah you're right, it forwards you to the new channel ify ou try to join the old one 2021-05-26 06:30 huh. well okay 2021-05-26 06:30 anywa back to writing a tcp stack :) 2021-05-26 06:31 at least we can all finally leave the channel there 2021-05-26 06:32 yah solved that problem. end of an era 2021-05-26 06:32 now i just need to move my github irc bot poster things 2021-05-26 06:34 finally ##osdev will be relevant! ;p 2021-05-26 06:36 is it okay to have gcc 5, 6, 7, 8, and 11, all at once? I just realized my config is that 2021-05-26 06:36 something is screwed up, some builds error with Error: unknown .loc sub-directive `view' repeated 2021-05-26 06:37 one as. what could be wrong with binutils 2021-05-26 06:38 cc, c++, gcc, g++ all show expected v11.1.0 2021-05-26 06:40 Okay, so the LAPIC is per-core, and the 8259 PIC is global, what about the IOAPIC? Is that global or per-core? Or I guess specifically, can external IRQs be masked on a per-core basis? 2021-05-26 06:44 You know it's getting interesting when the good google search results are in Chinese 2021-05-26 07:15 radens, global 2021-05-26 07:15 radens, you can route ioapic irqs to a particular cpu 2021-05-26 07:15 it just translates wire irqs to message signalled 2021-05-26 07:16 each one 2021-05-26 07:16 each irq input can be whatever cpu you like 2021-05-26 07:16 okay thanks 2021-05-26 07:16 you give address and data value for interrupt message 2021-05-26 07:17 tldr: address encodes which cpu, data value encodes which vector 2021-05-26 07:17 address also says what delivery type, so how to react 2021-05-26 07:19 there might be multiple ioapics, but that just means you get to have more input pins for more interrupt wires 2021-05-26 07:21 not sure about really big machines with crazy amounts of i/o 2021-05-26 07:21 they would use message signalled more than ever, not more wire irqs, though 2021-05-26 07:24 interrupt wires are a bit silly when you can bus master 2021-05-26 07:24 utterly redundant waste of copper 2021-05-26 07:24 what's a message signaled interrupt? 2021-05-26 07:24 it's when the device writes a data value to some address 2021-05-26 07:25 you program that into the config space when you enable MSI 2021-05-26 07:25 (or MSI-X for pcie) 2021-05-26 07:25 it generates a store to wherever you said to send an irq 2021-05-26 07:25 the LAPICs are listening for accesses there. they see the store and pick up the IRQ 2021-05-26 07:26 they see if it is for them from address, what to do with it from address, and get vector to schedule for dispatch from data 2021-05-26 07:26 that's x86 anyway 2021-05-26 07:26 MSI in general is "it writes a value somewhere and something happens that causes an irq somehow platform specific" 2021-05-26 07:27 then no wires and infinite irqs that can be routed to any number of cpus on a whim! 2021-05-26 07:29 I see, so the memory controller or whatever translates physical addresses and dispatches them to devices will send some sort of a message over the system bus? Or ring interconnect? 2021-05-26 07:29 Or am I terribly confused? 2021-05-26 07:29 https://github.com/doug65536/dgos/blob/master/kernel/lib/irq.h#L114 2021-05-26 07:29 ​github.com: dgos/irq.h at master · doug65536/dgos · GitHub 2021-05-26 07:29 Also, dumb question, how do I write to a GPIO port? 2021-05-26 07:29 *pin 2021-05-26 07:30 do I just do like uh port io? Seems wrong 2021-05-26 07:30 what do you mean "GP" IO 2021-05-26 07:30 yes you just use I/O port instructions to access I/O ports. which thing exactly? 2021-05-26 07:31 Which chip is the GPIO on? 2021-05-26 07:31 Okay, so minnowboard docs say that I can blink the onboard LED with a GPIO port. There are lots of tutorials for doing this via the linux sysfs. 2021-05-26 07:32 But clearly I wouldn't be here if I was content to write to sysfs ;) 2021-05-26 07:32 what path on there 2021-05-26 07:32 Intel Atom 2021-05-26 07:32 https://github.com/MinnowBoard-Projects/minnow-max-extras/blob/master/onboard/d2-led.sh 2021-05-26 07:32 ​github.com: minnow-max-extras/d2-led.sh at master · MinnowBoard-Projects/minnow-max-extras · GitHub 2021-05-26 07:33 /sys/class/gpio/gpio$LED1/value 2021-05-26 07:33 have to look at the source of whatever is putting thing in gpio 2021-05-26 07:33 or at the documentation for the chip 2021-05-26 07:33 probably a driver symlink in there 2021-05-26 07:34 I'm looking for the right docs still, a bunch of stuff is falling off the internet. 2021-05-26 07:34 And I was hoping there would be a simple answer 2021-05-26 07:34 I haven't touched gpio class unfortunately, only hwmon 2021-05-26 07:34 I bet there is a kernel documentation for gpio 2021-05-26 07:35 https://www.kernel.org/doc/html/v4.17/driver-api/gpio/index.html 2021-05-26 07:35 ​www.kernel.org: General Purpose Input/Output (GPIO) — The Linux Kernel documentation 2021-05-26 07:35 sys class stuff is good 2021-05-26 07:37 https://www.kernel.org/doc/html/v4.17/driver-api/gpio/legacy.html#sysfs-interface-for-userspace-optional 2021-05-26 07:37 ​www.kernel.org: Legacy GPIO Interfaces — The Linux Kernel documentation 2021-05-26 07:38 cat everything in sys/class/gpio 2021-05-26 07:38 should be something in there indicating it is I/O port or something 2021-05-26 07:39 gpiochip properties 2021-05-26 07:39 ah you are doing virtualization project on atom? neat 2021-05-26 07:42 imagine being intel person having to test that? omg 2021-05-26 07:42 you could test it for a year and not have any idea whether it works right :P 2021-05-26 07:46 looks like they can be pci so they can be MMIO or I/O 2021-05-26 07:48 https://mjmwired.net/kernel/Documentation/acpi/gpio-properties.txt 2021-05-26 07:48 ​mjmwired.net: Linux Kernel Documentation :: acpi : gpio-properties.txt 2021-05-26 07:54 It looks like the linux GPIO subsystem can talk over MMIO, port IO or maybe even I2C? But I'm not sure how to talk to it from hardware 2021-05-26 07:55 if you know the MMIO or I/O it's trivial. i2c not so easy 2021-05-26 07:55 radens: i believe you implement a driver for the gpio, and linux calls a function in the driver to do the actual pin wiggling 2021-05-26 07:56 it has the driver already 2021-05-26 07:56 one of the rpi drivers, does gpio over an rpc to the firmware 2021-05-26 07:56 clever: okay, so how do I uh find the driver? 2021-05-26 07:56 it's in /sys/class/gpio already I think 2021-05-26 07:57 the sysfs interface i think is deprecated, it required writing a 0 or a 1 to a file, the gpiochip interface i think is ioctl based? 2021-05-26 07:57 the docs for the device say to use sysfs I thought 2021-05-26 07:58 both should work 2021-05-26 07:58 Right but I want to do this in like my own os 2021-05-26 07:58 https://www.irccloud.com/pastebin/LrSegkit/ 2021-05-26 07:58 ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/LrSegkit 2021-05-26 07:58 ahhh 2021-05-26 07:58 https://github.com/torvalds/linux/blob/ef1244124349fea36e4a7e260ecaf156b6b6b22a/drivers/usb/gadget/udc/pch_udc.c#L2952 2021-05-26 07:58 ​github.com: linux/pch_udc.c at ef1244124349fea36e4a7e260ecaf156b6b6b22a · torvalds/linux · GitHub 2021-05-26 08:00 ah I see, they are right there on the cpu package 2021-05-26 08:00 doug16k: sorry? 2021-05-26 08:01 the gpios are right on the atom 2021-05-26 08:01 Yes 2021-05-26 08:01 pins on cpu 2021-05-26 08:01 Yeah. Unfortunately I don't know how to wiggle them from software 2021-05-26 08:01 this? https://github.com/opencomputeproject/onie/blob/master/patches/kernel/3.2.69/driver-gpio-intel-sch.patch 2021-05-26 08:01 ​github.com: onie/driver-gpio-intel-sch.patch at master · opencomputeproject/onie · GitHub 2021-05-26 08:03 drivers/gpio/gpio-sch.c 2021-05-26 08:06 https://www.mouser.com/datasheet/2/612/atom-e3800-family-datasheet-1522396.pdf 2021-05-26 08:06 Looks like there are a lot of them? 2021-05-26 08:07 they are PCI 2021-05-26 08:07 table 45 2021-05-26 08:08 makes it easy 2021-05-26 08:08 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/pinctrl/intel/pinctrl-baytrail.c?h=v5.11.20 2021-05-26 08:08 PCI = extremely plug and play 2021-05-26 08:08 ​git.kernel.org: pinctrl-baytrail.c « intel « pinctrl « drivers - kernel/git/stable/linux.git - Linux kernel stable tree 2021-05-26 08:09 Okay slick 2021-05-26 08:09 you can probably go read the BAR and find the address 2021-05-26 08:12 Thanks for your help 2021-05-26 08:22 noice! i hacked enough TCP connect logic to connect to sortie's irc server 2021-05-26 08:23 and i didn't crash his net stack! 2021-05-26 08:24 geist: on which platform are you testing? 2021-05-26 08:24 wouldn't be nice to say you are fuzzing his net stack though 2021-05-26 08:25 yeah 2021-05-26 08:25 j`ey: at the moment i'm running.... qemu riscv64 supervisor mode + virtio-net 2021-05-26 08:25 was just the last project i had set, and riscv is picky about unalignment so it's a good test of the net stack 2021-05-26 08:26 cool! 2021-05-26 08:27 I have my bug narrowed down to a baffling thing where suddenly the call stack is broke and I don't see why. at least I know exactly where and when now 2021-05-26 08:27 interrupts are enabled in ovmf 2021-05-26 08:28 https://m1racles.com/ cute m1 cve 2021-05-26 08:28 ​m1racles.com: M1RACLES: M1ssing Register Access Controls Leak EL0 State 2021-05-26 08:28 assuming it wasnt posted yet 2021-05-26 08:28 and not magnets? 2021-05-26 08:31 geist: Woohooo no net stack crashes! (Also: The port is proxied by qemu so you don't talk directly to the IP stack) 2021-05-26 08:31 Gotta figure out bridged networking 2021-05-26 08:33 I'd join, but I don't trust your net stack not to fuzz my IRC client :-) 2021-05-26 08:33 sortie: awww 2021-05-26 08:33 i was impressed that your stack was that well behaved witha bunch of fancy option and whatnot 2021-05-26 08:33 should have known it was linux 2021-05-26 08:34 or at least qemu's user stack 2021-05-26 08:34 ya took a while here to bridge it. i had to create a local bridge and add a tun for qemu and a vlaned versino of my ethernet 2021-05-26 08:36 I'm quite scared to set up a bridge on my hetzner host.. the whole bridged if design frightens and confuses me, seems I have to replace the real interface with a fake one with a subone replacing the real one, and I'm afraid to loose connectivity to my server 2021-05-26 08:36 oh true that 2021-05-26 08:36 it was slightly less dangerous here since i was actually bridging it with enp5s0.10 2021-05-26 08:36 and if that gets all hosed it doesn't matter because that's my test vlan 2021-05-26 08:37 I wonder if my host can add more network controllers to my server 2021-05-26 08:37 Or maybe I should just try it and set up a fallback reboot if I don't act 2021-05-26 08:38 sortie: I'd connect your server to the host with a TAP device and then use iptables to forward the port 2021-05-26 08:46 XgF: I don't know what that actually means. I need a guide for absolute beginners that explains this stuff and walks me through example use cases. 2021-05-26 08:46 The guides that I found were mostly trash or depended on distro magic 2021-05-26 08:47 I.e. a bunch of steps and I have no idea what exactly is going to happen or what the risks are 2021-05-26 08:47 with modern tools i think you can do all of it with 'ip' and 'brctl' 2021-05-26 08:47 I'm tempted to implement bridged networks in Sortix and then I know how they work 2021-05-26 08:52 ip link add mybridge type bridge; ip link set qemutap master mybridge 2021-05-26 08:54 ah see, dont even need brctl even 2021-05-26 08:54 If you actually understand this stuff, consider writing a really nice guide 2021-05-26 08:56 ugh, this damn qemu ps/2 issue... i'm still not sure who's being stupider, but we're both wrong 2021-05-26 08:57 But I did finally find a workaround on my end... 2021-05-26 08:58 QEMU has this issue where there's a race between getting an irq1 or irq12 and reading the data from the PS/2 controller - normally you should be able to just read and you'll be getting the data for whichever interrupt tripped, right? That's how it's worked on all the real hardware I've used, and even virtualbox seems to get this right and I can play quake and move the mouse and mash keys all I want... 2021-05-26 08:59 sortie: i probably should do that 2021-05-26 08:59 But in QEMU... sometimes, nay - frequently - you can get the interrupt for one and read the other because when you read from the data port qemu will check its own bit to determine what is pending, but it can change that between sending the irq and you reading 2021-05-26 09:01 But I found a workaround... throw both interrupts at the same handler, turn off both ports, read the status byte and the data byte, and QEMU implements bit 5 to say there's mouse data. No mouse data? It's keyboard. Mouse data? It's the mouse. Both regardless of which interrupt you're in. 2021-05-26 09:01 And now finally I can wiggle and mash and nothing gets confused. 2021-05-26 09:01 re: bridges, maybe not 100% apples and oranges, i remember bridges were always advertised as letting you snoop/reroute/firewall without giving the bridge any ip ("transparent") https://man.openbsd.org/bridge.4 dunno if that's 100% the same terminology, but general, generic idea "This link between the interfaces selectively forwards frames from each interface on the bridge to every other interface on the bridge." "can act as a transparent filter 2021-05-26 09:01 for ip(4) datagrams" [allows to] " provide an IP firewall without changing the topology of the network." "Some chipsets have serious flaws when running in promiscuous mode" 2021-05-26 09:01 ​man.openbsd.org: bridge(4) - OpenBSD manual pages 2021-05-26 09:02 raggi: Like if it can explain to me how I can get my hetzner host with multiple IPs (I need to set that up) bridged so one of them refers to the main server and the other ones refer to the qemu VMs I have running that would be handy :) 2021-05-26 09:02 back when someone might stick a "bridge" of physical machine with mutiple interfaces to sit between other stuff :) 2021-05-26 09:02 I assume this is based on some faulty assumptions on their end about interrupt handling... like maybe it works if you set up gating correctly for nested IRQs... maybe? I suspect there's still a bad race there in the intervening instructions... 2021-05-26 09:03 oh, ipvlan yeah, someone really should write a good guide on that 2021-05-26 09:05 klange, so to repro it you mash keyboards while moving mouse a lot with PS2 both? I'll have to try that on my stuff 2021-05-26 09:05 sortie: if you want bridging, setup qemu to expose a tap device, and then bridge your ethernet connection and the tap device using brctl. you'll need to adjust the host's settings to refer to br0 instead of eth0 (or whatever your ethernet adapter used to be called) 2021-05-26 09:06 Previously they had a bug where they weren't asserting interrupts at all, and no one noticed for ages because it only applied to the regular, relative-mode PS/2 mouse. usbtablet? nope. vmware mouse? nope. 2021-05-26 09:06 That was fixed a few years ago, though. 2021-05-26 09:07 klange, using ioapic or pic? 2021-05-26 09:07 PIC 2021-05-26 09:07 XgF: I don't think you understand me at all. 2021-05-26 09:07 That's probably the other contributing factor to this, maybe it doesn't happen on IOAPIC. 2021-05-26 09:07 XgF: I need careful explained steps with theory and reassurances that my remote server isn't going to become unreachable. 2021-05-26 09:08 Though I'm still not sure, the way this is set up, the race seems like it would just always potentially be there... 2021-05-26 09:08 sortie: uh, i cannot reassure you of this. ...this is why I have IPMI access to my dedicated server :p 2021-05-26 09:08 XgF: Just telling me steps without knowing the theory, I won't even know what you are talking about let alone how to do it, and it's not helping me :| 2021-05-26 09:09 Its networking, it will probably go wrong and render your server unreachable :| Hopefully you haev some out-of-band management sytsem 2021-05-26 09:09 I barely understand bridge stuff 2021-05-26 09:09 i generaly only know the basics: make a bridge interface and bridge a bunch of physical (or taps) to it 2021-05-26 09:09 XgF: Exactly that's my fear. I can probably handle with a scheduled reboot I can cancel to restore boot settings 2021-05-26 09:10 yeah I can get virt-manager bridge to work, that's about it 2021-05-26 09:10 I really don't want a multi hour outage of my server :) 2021-05-26 09:13 klange, do you send those magic sequences to detect wheel and 5 button mouse? 2021-05-26 09:14 just wondering because I'd guess guests that don't do that are hardly tested 2021-05-26 09:15 just wheel, I don't do 5 button 2021-05-26 09:16 that's handled at a different level, though; the 'bug' is in the controller implementation and not related to the devices which are generic ps/2 stuff 2021-05-26 09:17 the packet size changes with magic sequences 2021-05-26 09:17 it could switch to completely different (tested) code when you switch to a larger one 2021-05-26 09:18 oh hey, gcc 11 was released a while back 2021-05-26 09:18 which byte you get in handler is the thing, how it delivers those bytes could change subtly 2021-05-26 09:18 wheel and 5-button are the same packet size 2021-05-26 09:18 and the codepaths are not packet-size-dependent, I have read them, that's how I figured out the workaround 2021-05-26 09:18 sorry 2021-05-26 09:20 strange how it works in the other guest oses with separate irq handlers 2021-05-26 09:32 I found my bug. stupid fat32 LFN struct has a misaligned fragment of the long name and I used char to make it not packed :( 2021-05-26 09:33 then later some pointer arithmetic went nuts thinking countof was sizeof/2 2021-05-26 09:43 yay my hypervisor interrupt interception works! 2021-05-26 09:43 I still need to figure out if the interrupt cache should be per core though? 2021-05-26 09:45 linux could move it to be sent to a different if that's what you mean, by irqbalance 2021-05-26 09:45 different cpu 2021-05-26 09:47 or the guest 2021-05-26 09:47 if they can access the real ioapic 2021-05-26 09:49 each cpu has a different set of pending irqs if that is what you mean 2021-05-26 09:50 irqs are sent and one cpu is selected and it sets request bit for that vector in that cpu's lapic 2021-05-26 09:50 okay, sounds like it might need to be per core then 2021-05-26 09:51 It means I'll have to allocate a vcpu struct with the interrupt cache and stick it in the fsbase, but that sounds like a tomorrow problem 2021-05-26 10:47 ooh, i booted with smp on my thinkpad and was able to run a bunch of demos _and_ listen to the fan wrrrrrrrr because the cores just spin waiting for input 2021-05-26 10:50 also my thinkpad has "real" ps/2 keyboard/mouse and it's super broken - it doesn't seem to reset some things properly on reboot 2021-05-26 10:51 My ps/2 driver has been using translation to legacy scancodes forever, so I tried switching it to not translating and enabling legacy scancode set, which worked... but then I rebooted into Linux and it was all messed up until a hard shut down 2021-05-26 10:53 Hello everyone! 2021-05-26 10:53 hello! 2021-05-26 11:12 doug16k: I can reproduce the issue on an Ubuntu live CD - but only if I turn off vmport as apparently they're shipping with support for 'vmmouse' now. 2021-05-26 11:12 they must be doing something better than me because vmmouse seems to not have any issues in Linux but I get occasional 7's out of the keyboard with it... maybe because of scancode sets? 2021-05-26 11:13 But the problem is there and I'm not crazy! 2021-05-26 11:15 the old sortix iso i have on hand also does it 2021-05-26 11:31 oh I think I see... so with the vmmouse the mouse itself can't be affected, but the keyboard sometimes gets 0x8 which confusingly is '7' 2021-05-26 11:31 and that or 0 are the only bytes that seem to show up... 2021-05-26 11:31 but on scancode set 2, 0x08 is nothing 2021-05-26 11:32 so with the vmmouse and an OS that actually uses scancode set 2 - eg. Linux - there are no apparent ill effects 2021-05-26 11:32 but switch to regular ps/2 mouse and now the mouse data is corrupted and KABOOM! 2021-05-26 11:34 whoopsie 2021-05-26 11:35 and I'm staring at these files in qemu's repo and most of this hasn't been touched in _years_, so this bug has probably been there a while 2021-05-26 11:38 tempted to detect qemu through one of the other backdoor methods and enable this there regardless, currently it's a kernel arg 2021-05-26 11:40 I swear I was just moving the mouse in a figure 8 pattern - no clicking, no jerking motions: https://www.youtube.com/watch?v=Qa3zi_noBf8 2021-05-26 11:40 ​'2021 05 26 20 26 17' by K Lange (00:00:48) 2021-05-26 11:56 this is rather old qemu, though... I'm building 6.0 to see if it happens there, but _also_ a cursory check of history on hw/input/ps2.c and hw/input/pckbd.c suggests nothing of substance has happened to either between the two releases 2021-05-26 11:57 ! It in fact does not happen on 6! 2021-05-26 11:58 hm, should I just switch to this build of 6... 2021-05-26 11:58 oh wait that had my patch enabled 2021-05-26 11:59 ... it still happens in 6 2021-05-26 11:59 ugh 2021-05-26 11:59 well at least I can file a bug report 2021-05-26 12:01 and confirmed same behavior in ubuntu as described above 2021-05-26 12:15 "Some game developer somewhere is going to try to use this as a synchronization primitive, aren't they. Please don't. The world has enough cursed code already. Don't do it. Stop it. Noooooooooooooooo" D: 2021-05-26 12:16 heat: it actually happened 2021-05-26 12:16 but not game dev 2021-05-26 12:17 game dev's aren't the only ones who do stuff without knowing *anything* about what they are doing... or even attempting to educate themseles. 2021-05-26 12:17 the worst code ive seen is embedded stuff (specifically routers) not game dev. 2021-05-26 12:17 yes but they frequently reimplement locking primitives and thatsthejoke.jpeg 2021-05-26 12:18 I feel personally attacked :| 2021-05-26 12:57 after much testing across different guest and host configurations... i have posted a bug report to the qemu gitlab 2021-05-26 12:57 and now I will go do other things 2021-05-26 14:17 this is weird.. clang (lld?) seems to be generating a .text section with SHF_WRITE 2021-05-26 14:29 j`ey, very weird 2021-05-26 14:29 what's the linker script? 2021-05-26 14:30 didnt think to look in the linker script 2021-05-26 14:30 I was thinking it would have been in a .c/.s file 2021-05-26 14:40 sortie: is irc.sortix.org dead? 2021-05-26 14:41 heat: Responds for me? 2021-05-26 14:41 You timed out tho 2021-05-26 14:44 sortie: I keep timing out 2021-05-26 14:44 heat: The existing connections are working. I think the /REHASH I did earlier caused the problem. 2021-05-26 14:44 https://i.imgur.com/vW2iQ6j.png 2021-05-26 14:44 2021/5/26 13.36 Cannot bind for TCP listener irc.sortix.org[0.0.0.0/6667]: Address already in use 2021-05-26 14:45 oh 2021-05-26 14:45 TIME_WAIT? 2021-05-26 14:45 heat: I think it's not even listening on 6667 anymore 2021-05-26 14:45 ah yes, using irc via wireshark lol 2021-05-26 14:46 OK I gotta restart it 2021-05-26 15:07 wtf my crappy wireless extender's ipv6 keeps dying 2021-05-26 15:17 Is there a good way to download the entire osdev wiki as a PDF of some sort? Trying to get this on an e-reader is a PITA and chrome doesn't seem to want to allow me to safe anything. 2021-05-26 15:20 I think there is a link to an offline archive on this page https://wiki.osdev.org/OSDev_Wiki:About 2021-05-26 15:20 ​wiki.osdev.org: OSDev Wiki:About - OSDev Wiki 2021-05-26 15:23 Thanks!! 2021-05-26 15:23 sortie: what ircd did you port to sortix? :p 2021-05-26 15:23 solanum 2021-05-26 15:33 It's part of my wider agenda to hostile takeover libera to run on Sortix 2021-05-26 15:49 Why my nick got so many undercores appended to it? 2021-05-26 15:50 lol 2021-05-26 15:51 because you're extra reserved identifier 2021-05-26 16:10 Super duper double secret squirrel private variables in a class! 2021-05-26 16:14 hello there 2021-05-26 16:14 Hi chocabloc0 :) 2021-05-26 16:15 i usually go by just chocabloc lol 2021-05-26 16:15 but it was taken 2021-05-26 16:16 anyways, what should i implement now that i have a basic ramdisk? 2021-05-26 16:19 filesystem code 2021-05-26 16:19 hmmmm 2021-05-26 16:19 do you mean things like fat32, or a vfs? 2021-05-26 16:19 vfs 2021-05-26 16:20 i already have one 2021-05-26 17:34 :/ Wow, it would be a lot simpler for freenode to just turn off the servers at this point. :( 2021-05-26 17:35 #osdev on the old server is invite only, it seems. 2021-05-26 17:36 There's now an ##osdev 2021-05-26 17:37 Freenode lost basically all good will it had 2021-05-26 17:37 Yeah. 2021-05-26 17:37 But I literally do not understand their endgame. 2021-05-26 17:37 "Drive everyone off." 2021-05-26 17:37 If you want to do that, just turn the servers off. 2021-05-26 17:37 Bitweasil: https://atheme.github.io/atheme-open-letter/ 2021-05-26 17:37 ​atheme.github.io: An open letter from Atheme’s developers and community | atheme-open-letter 2021-05-26 17:38 They don't control the servers 2021-05-26 17:38 they even alienated the dev team for the irc server software 2021-05-26 17:38 I think Korean Crown Prince and such miscalculated 2021-05-26 17:38 I just don't understand what one gains from driving people off freenode. 2021-05-26 17:38 Which is very clearly what the actions are doing. 2021-05-26 17:39 Andrew Lee did the same thing in Snoonet for example, and unlike with Freenode, a similar exodus didn't happen, although a lot of opers resigned. I suppose there might have been a bit of a hope for it to repeat with FN 2021-05-26 17:41 *sigh* Ok. Well, and IRC shrinks a bit more. 2021-05-26 17:47 Quality not quantity :P 2021-05-26 17:47 True. 2021-05-26 17:49 what the hell is going on at freenode 2021-05-26 17:49 I'm just going to quit that one 2021-05-26 17:50 nur: https://gist.github.com/joepie91/df80d8d36cd9d1bde46ba018af497409 2021-05-26 17:50 ​gist.github.com: freenode-faq.md · GitHub 2021-05-26 17:51 well that's it then, I'm closing that tab forever 2021-05-26 17:56 the essential problem is that lee is an entrepreneur and he tried to monetize a service that does not align with the values of entrepreneurs 2021-05-26 17:56 and in his hubris he believed he could align fundamentally opposed thing 2021-05-26 17:57 the corollary problem being his tendency toward egotism and self-aggrandizement 2021-05-26 17:57 :p 2021-05-26 17:57 gog: i don't think he's in it for the money 2021-05-26 17:57 you don't think so? 2021-05-26 17:58 he's in it because he has good memories of irc from his childhood 2021-05-26 17:58 heh so maybe i can just scratch off the first two points and leave the third 2021-05-26 17:59 that one is fairly obvious 2021-05-26 18:17 he's a fool, in the traditional "nothing can be foolproof because fools are so ingenious" sense 2021-05-26 18:19 So, best options for CollapseOS, in the coming future where we just have scavenged computers cobbled together? :D 2021-05-26 18:19 Maybe ship it with a copy of Wikipedia compressed or something. 2021-05-26 18:20 (sorry, my pessimist streak is being optimistic compared to reality lately) 2021-05-26 18:22 Bitweasil: You sound like my friend. 2021-05-26 18:22 no, noone needs information. you just need an archive of amiga mods. 2021-05-26 18:23 I need to know how to run a generator off of wood gas. 2021-05-26 18:24 Low Tech Magazine has some stuff on wood gasifiers with links to other pages on it. 2021-05-26 18:24 I've been generally less than optimistic for the past decade about things, but at this point, global supply chains are just broken. 2021-05-26 18:25 collapseos actually sounds awesome lol 2021-05-26 18:26 Heh. 2021-05-26 18:26 No. 2021-05-26 18:26 Er 2021-05-26 18:26 wait. 2021-05-26 18:26 *collapseOS* 2021-05-26 18:26 Not *collapse* 2021-05-26 18:26 Got it. 2021-05-26 18:26 i like offline databases that dont need connectivity 2021-05-26 18:26 Yeah, something that's not net-first. 2021-05-26 18:27 Framebuffer based Linux kernels would probably be reasonable for it. 2021-05-26 18:27 Don't bother with the weird hardware acceleration requirements, just the FB. 2021-05-26 18:27 It's good enough for a lot. 2021-05-26 18:27 https://collapseos.org/ <-- Got beaten to the punch, apparently. 2021-05-26 18:27 ​collapseos.org: Collapse OS — Bootstrap post-collapse technology 2021-05-26 18:28 Veronica/Gopher over packet radio! 2021-05-26 18:31 Ugh. Yeah. 2021-05-26 18:31 I need to get my HAM HF license. 2021-05-26 18:31 It's the only tech that doesn't rely on the internet for communication anymore. :( 2021-05-26 18:33 Bitweasil: i was just looking at some lora modems 2021-05-26 18:34 Bitweasil: oh yeah, and i found this weird thing a few months ago: https://www.sparkfun.com/products/17844 2021-05-26 18:34 ​www.sparkfun.com: Nebra Outdoor HNT Hotspot Miner (915MHz) - WRL-17844 - SparkFun Electronics 2021-05-26 18:34 I've not messed with them personally but a friend has for property area network. They look really promising. 2021-05-26 18:34 a crypto coin, based on running lora repeaters 2021-05-26 18:34 and it encourages you to run a repeater in an area without too much coverage 2021-05-26 18:34 so you cant just make a mining farm, you must spread the repeaters far and wide 2021-05-26 18:34 o.O That's interesting, and I believe entirely insane. 2021-05-26 18:34 I'll have to read up on it more. 2021-05-26 18:35 yeah, when i first saw it, i was like "wtf?" lol 2021-05-26 18:35 but reading it a bit, it solves a number of problems i thought of 2021-05-26 18:36 The "helium" stuff? 2021-05-26 18:36 not sure, forgot the finer details after reading it a few months ago 2021-05-26 18:37 I'll have to read, looks potentially useful as civilization comes crumbling down. 2021-05-26 18:37 Of course, you can't get the APs anymore... 2021-05-26 18:37 also, its just a CM3 module inside, so its basically just an rpi with a lora modem 2021-05-26 18:37 Ok. 2021-05-26 18:37 in theory, you could make a compatible node, using an off the shelf gps, lora modem, and rpi 2021-05-26 18:37 if the software is open 2021-05-26 18:38 > Using a system called Proof-of-Coverage, Hotspot Miners earn more HNT when they're in range of other miners, but need to be at least 300 metres apart. 2021-05-26 18:38 Yeah. I'll have to look. 2021-05-26 18:43 Bitweasil: i have to wonder, what kind of range could such a repeater network give, could they maybe incentivise you if your a critical link in joining 2 distant clouds? 2021-05-26 18:43 I don't know. I'll have to do some reading on it. 2021-05-26 18:44 I've thought about doing something less mesh, more standalone. 2021-05-26 18:44 Solar powered Pis with wifi, containing useful information. 2021-05-26 18:44 And I have friends out here who think the same way. 2021-05-26 18:44 I could even toss a node up in town, up halfway high. 2021-05-26 18:45 ... though I think we faraday'd that bell tower. 2021-05-26 18:45 I wonder what would happen with HNT if I am 1km from the nearest hotspot. 2021-05-26 18:46 I saw a good analogy the other day - industrial civilization is a car with a transmission that can only upshift, and we're cruising the highway in 5th. Except, we slowed down a lot for Covid. And now there's a hill. 2021-05-26 18:46 PapaFrog, the long range LORA stuff has a range of miles. 2021-05-26 18:46 Not fast, but it can do it. 2021-05-26 18:46 So hopefully it would do the right thing. 2021-05-26 18:47 The next nearest is about 5km. 2021-05-26 18:48 Bitweasil: not counting the hills, a 2km radius circle around my house covers a pretty large chunk of the town, 3km radius would cover the entire town 2021-05-26 18:48 and thats if i was to put the central node in a non-ideal location 2021-05-26 18:48 PapaFrog, is there a map of them? 2021-05-26 18:50 Oh, yes. Neat. 2021-05-26 18:50 where? 2021-05-26 18:50 https://explorer.helium.com/coverage 2021-05-26 18:50 ​explorer.helium.com: Coverage Map — Helium Explorer 2021-05-26 18:50 thanks 2021-05-26 18:50 ... wow, there are actually some out here! 2021-05-26 18:50 Not near enough to me to link, likely. 2021-05-26 18:50 I'm on the wrong side of a hill. 2021-05-26 18:51 I know where I can put two. :P 2021-05-26 18:51 195km to the next nearest hotspot for me 2021-05-26 18:51 Ok, how does one build these gizmos? 2021-05-26 18:51 judging from the gaps, it looks like these hotspots are likely using regular internet uplinks? 2021-05-26 18:51 This is very interesting, I'd not heard of it before. Thanks! 2021-05-26 18:52 I'm unclear as to if you can build your own hotspot. 2021-05-26 18:52 https://www.nebra.com/products/helium-indoor-hotspot-miner 2021-05-26 18:52 Oh, looks like it won't "mine" if you build your onw. 2021-05-26 18:52 :( 2021-05-26 18:52 PapaFrog: it would help if the explorer showed the range of a given hotspot, so you know how good the coverage actually is 2021-05-26 18:53 Yeah.. that would be nice. 2021-05-26 18:54 I'll have to look into it more, but if you have to buy $400 gizmos to participate, less interested. 2021-05-26 18:54 given that i am >100km from another hotspot, i would be the only consumer of its bandwidth 2021-05-26 18:54 I don't even care about the mining, just the "Is this a mesh that may actually work?" 2021-05-26 18:54 at which point, why should i even bother with this crypto chain? 2021-05-26 18:54 Yeah. 2021-05-26 18:54 at a glance, a repeater mints coins, which they can sell on an exchange 2021-05-26 18:55 and a end-user (leeching off repeaters) buys coins on an exchange, and spends them to pay for bandwidth used 2021-05-26 18:55 but if i am the only end-user of a repeater, i can just not partitipate, and then its free (ignoring eletricity cost) 2021-05-26 18:55 Interesting. I'll read up more on it later, fighting timers for now. :) 2021-05-26 18:55 And need more coffee. 2021-05-26 18:56 there are 3 repeaters a few hours drive away, that are 4km and 9km from eachother 2021-05-26 18:56 assuming they are in range, that covers a one of the bigger cities in the area 2021-05-26 18:57 > Hotspot has no nearby hotspots (within 2km) 2021-05-26 18:58 seems they are out of range of eachother 2021-05-26 19:01 https://intercom.help/heliumnetwork/en/articles/3140932-what-is-a-proof-of-coverage-challenge 2021-05-26 19:01 ​intercom.help: What is a Proof-of-Coverage Challenge? | Helium Support 2021-05-26 19:01 https://explorer.helium.com/hotspots/11apXBarWfA9KYCg2LjFZbpyE7N4Vc52Q8tEcYtcCSRq9evXQVp activity tab 2021-05-26 19:01 ​explorer.helium.com: Narrow Amethyst Deer | Hotspot — Helium Explorer 2021-05-26 19:01 clear 2021-05-26 19:02 Bitweasil: it looks like a random repeater (or collective?) will pick a random node at regular intervals, and challenge it to proove itself useful 2021-05-26 19:02 Bitweasil: the challenged node, must then broadcast an RF packet, and then will get bonus points if other repeaters witness receiving it 2021-05-26 19:02 but the actual enforcement, seems to be done entirely over the internet 2021-05-26 19:03 at a glance, this doesnt seem like its really a complete multi-hop mesh network 2021-05-26 19:03 its more about just having a lot of internet<->rf gateways, and wide coverage 2021-05-26 19:03 without the internet holding it together, it will rapidly fragment into 1000's of seperate nodes 2021-05-26 19:08 Bitweasil: for another hotspot, i can see witness records on the activity tab, where a node 2.3 and 3.4km away heard it 2021-05-26 19:21 Yeah, interesting... hrm. 2021-05-26 19:21 I'll have to look into it more. 2021-05-26 19:23 for a more populated area with witnesses, i could see it being an option 2021-05-26 19:23 but the 1st adopter, doesnt get much incentive to be first 2021-05-26 19:35 * geist yawns 2021-05-26 19:35 good afternoon folks 2021-05-26 19:35 * zhiayang yawns back 2021-05-26 19:35 zhiayang: didn't know ifyou were always idling but welcome back 2021-05-26 19:35 aloha 2021-05-26 19:35 havent seen you in some years? 2021-05-26 19:36 oh yea, i pretty much left znc running, totally forgot about irc, and idled for years 2021-05-26 19:41 well, still here 2021-05-26 19:43 geist: https://twitter.com/DrawsMiguel/status/1397303184788492288 2021-05-26 19:43 ​twitter: @tmandry at long last when i scream "OK GOOGLE TIMER FOR FIVE MINUTES" i know memory safety is on my side. the future is here 2021-05-26 19:43 i reference to fuschia 2021-05-26 19:43 hello, I was wondering how do drivers actually work. Is os mapping the device's IO on some memory addresses and that's it? Is it handled via irq/signals/syscalls? 2021-05-26 19:44 pyzozord, "It depends." On just about everything. 2021-05-26 19:44 Bitweasil: yeah that figures :) 2021-05-26 19:44 But, usually, yes. You'll have some chunk of the device mapped into some chunk of address space (or IO port space on x86), route interrupts, and you do what it needs. 2021-05-26 19:44 pyzozord: https://github.com/cleverca22/v3d2/blob/master/v3d2.c is a driver i wrote a while ago 2021-05-26 19:44 ​github.com: v3d2/v3d2.c at master · cleverca22/v3d2 · GitHub 2021-05-26 19:45 If it sends an interrupt, you do what it needs and clear the interrupt. if you want it to do something, you give it what it needs and poke it if required. 2021-05-26 19:45 And beyond that is going to be very device and OS specific. 2021-05-26 19:45 pyzozord: it does a number of things, writing to MMIO when requested, allocating large chucks of dma coherent ram, mmap'ing that ram into userspace, and reacting to IRQ's to schedule more actions with MMIO 2021-05-26 19:47 so it is essentially just reading/writing ram and IRQs? I'm sorry I'm not very knowelegable in the topic, I was just looking for a high level very oversimplified understanding 2021-05-26 19:47 basically yes 2021-05-26 19:47 Many drivers are just about that, yes. 2021-05-26 19:47 I'm not sure what is IO port space 2021-05-26 19:47 x86ism. 2021-05-26 19:47 it's an x86 specific thing 2021-05-26 19:47 A separate address space for I/O 2021-05-26 19:47 basically an alternate, small (64k) address space that's like ram but separate 2021-05-26 19:47 You register a handler for the IRQ, so if IRQ 123 fires, your IRQ handler gets called, and you go check the device. 2021-05-26 19:48 And then (usually) you have to clear the interrupt as well. 2021-05-26 19:49 ooh so io address space can be read and written like ram but it's not ram and it has it's own addresses? 2021-05-26 19:50 Its own instructions too https://www.felixcloutier.com/x86/out 2021-05-26 19:50 so it's like an alternative to mapping device's io to normal memory address space? 2021-05-26 19:50 ​www.felixcloutier.com: OUT — Output to Port 2021-05-26 19:50 Don't worry about port IO on x86. 2021-05-26 19:50 oh I see, ok 2021-05-26 19:50 Very little uses it anymore. 2021-05-26 19:50 You don't use the "memory" instructions, you use the "port IO" instructions. 2021-05-26 19:50 But most modern drivers won't need it. 2021-05-26 19:52 right, mostly legay devices like ps2 keyboard, serial ports, etc 2021-05-26 19:54 the memory/io address space will be mapped on actual pins on the device right? As in if I write a bit on a address it will literally send current to some pin to the device? 2021-05-26 19:55 Yes...ish. 2021-05-26 19:56 You can imagine that's the case, it's often just messages on a bus now, but that's the effect. 2021-05-26 19:57 with pcie entering the mix, everything is now packets 2021-05-26 20:44 i took the last 3 hours to figure out how linux does arp and now i'm disappointed it's surprisingly stupid and genius at the same time 2021-05-26 20:46 /me thought "hmm how do they wait for an ARP reply without blocking?" 2021-05-26 20:47 turns out they queue packets on a struct neighbour and then when it gets updated with the actual result, it outputs the packets 2021-05-26 20:47 freaking genius 2021-05-26 20:49 yeah, that's sorta what I do. packet gets tagged as "waiting for arp reply" with a pointer to the ARP request and once the request gets fulfilled anything waiting on that L3->L2 mapping gets thrown into the head of the appropriate output queue 2021-05-26 20:51 you're very good at networking, i'll tell you that 2021-05-26 20:51 it's not fair :( 2021-05-26 20:53 the real nasty thing I haven't sorted out yet is how to effectively traffic shape/police/queue 2021-05-26 20:54 basically, given a set of input parameters on what limitations you want to apply to traffic going through a box, mangle/requeue/delay/drop traffic appropriately 2021-05-26 20:58 iptables? 2021-05-26 20:59 it's more the backend implementation of protocol-based traffic classification and stuff that I need to sit down and graph out or something 2021-05-26 20:59 is your code open source? 2021-05-26 20:59 not presently 2021-05-26 21:00 :( 2021-05-26 21:00 I don't want to release anything until it's in a state where you can sit down and use it 2021-05-26 21:00 having a smaller networking-correct OS sounds pretty useful as a reference 2021-05-26 21:01 my final "is this usable" test is going to be "can I run it as my firewall at home without issues" 2021-05-26 21:30 * kc8apf digs into illumos drivers 2021-05-26 21:36 You're doing it backwards, kazinsal. 2021-05-26 21:36 You're supposed to release it with as many bugs as possible and then patch it up until the next major release. 2021-05-26 21:41 Talking about open source and software realease-related paradigms; I find myself reluctant about uploading my code to business-driven sites, while I feel very good about the idea of openly sharing the full code of projects of mine: I would feel way more comfortable about using an open, community-sustained public repository: I feel curious to ask you about: Which, may there be one for, consider the best 2021-05-26 21:42 approach for me in this case? 2021-05-26 21:43 Host your own website. :/ 2021-05-26 21:43 Github as about as community based as it gets, but didn't Microsoft purchase it? 2021-05-26 21:43 im a genious, disabled mouse and keyboard for the VM, my host lost them too then :P 2021-05-26 21:43 lol 2021-05-26 21:44 Microsoft purchased GitHub and their free packages got better, lmao 2021-05-26 21:44 Like, unironically, after getting big daddy redmond bucks behind them, basically everything in the pro tier plan was made free. 2021-05-26 21:46 Ok. 2021-05-26 21:48 Oli, who's paying for the open free idealistic service though? 2021-05-26 21:49 I'd rather burn microsoft's electricity than github's :) 2021-05-26 21:50 Hehehe 2021-05-26 21:50 https://codeberg.org/ not really looked into it 2021-05-26 21:50 ​codeberg.org: Codeberg.org 2021-05-26 21:51 commiehub.org should be a thing 2021-05-26 21:51 the people's code repository 2021-05-26 21:51 heat, I was playing Fallout 4 the other night and found a weapon called a Commie Whacker. 2021-05-26 21:52 modern fallout and classic fallout have some interesting aesthetic differences 2021-05-26 21:52 modern fallout is a lot more verhoevenian 2021-05-26 21:53 Never thought about it, but you're right. 2021-05-26 21:53 what's verhoevenian? 2021-05-26 21:54 in the style of paul verhoeven 2021-05-26 21:54 a filmmaker who is well known for making excellent dramatic satire films 2021-05-26 21:54 It is more of myself currently feeling that a community based project has it's heart on serving a community; a business may change the policies of hosted code or sell it to another who will, and data hosted by may be used for purposes I don't consent. Thank you so much for sharing about codeberg.org, j`ey, and all for your insights! 2021-05-26 21:55 eg. robocop, a cyberpunk-ish drama that satirically portrays a hypermilitarized corporate police state 2021-05-26 21:55 Total Recall? 2021-05-26 21:55 ah 2021-05-26 21:55 I haven't put money in my thought, albeit I understand how they relate to hosting, electric and storage services. 2021-05-26 21:55 and starship troopers, a sci-fi drama that satirically portrays a hypermilitarized fascist united earth in war against an "other" 2021-05-26 21:55 and yeah total recall 2021-05-26 21:55 Do you have what it takes to be a citizen, kazinsal? 2021-05-26 21:56 basically he takes source material, looks at it, goes "what the hell", and turns it into a really good satire 2021-05-26 21:56 jimbzy: I'm doing my part! 2021-05-26 21:56 Good stuff. 2021-05-26 21:57 I showed that movie to several friends when it first came out and they didn't get it. 2021-05-26 21:57 the classic Fallout games are exactly what they say on the tin - roleplaying games set in a post-global nuclear exchange america 2021-05-26 21:57 modern Fallout games are *also* RPGs set in a post-global nuclear exchange america, but they really lean heavily into the "people are trying to emulate the 1950s" aspect of it 2021-05-26 21:57 I've been playing it for years and still find new bits here and there. 2021-05-26 21:58 whereas that was just kind of a side note in the artists manual for the originals 2021-05-26 21:58 which is why in Fallout 3 you have things like Liberty Prime crushing communism 2021-05-26 21:58 It's in 4, too. 2021-05-26 21:59 I usually backstab the BoS, tho. :) 2021-05-26 21:59 and in the lore for I think 2 it's just mentioned that China was a participant in the nuclear war and was not on the same side as the US, and that they did some land grabs beforehand 2021-05-26 22:00 yeah, the BoS is another faction that is portrayed a bit differently between the two eras of Fallout (Interplay vs. Bethesda) 2021-05-26 22:01 kazinsal, Are you familiar with the industrial designer Viktor Schreckengost? I get his vibe from 3 and beyond. 2021-05-26 22:01 in the Interplay games they're nuts, but they have a goal that isn't just "techno-theocracy" 2021-05-26 22:02 jimbzy: name isn't familiar but googling it, some of his work is 2021-05-26 22:02 He never really got the recognition he deserved back in the day. 2021-05-26 22:04 I was turned on to his work by an artist blacksmith I trained with. 2021-05-26 22:04 hey 2021-05-26 22:19 Check our vector, Victor. Do we have clearance, Clarence? 2021-05-26 22:19 anyone here have an M1 macbook? tempted to get one 2021-05-26 22:20 I've got a M1 Mini. 2021-05-26 22:20 Wait right now, they're announcing new stuff soon. 2021-05-26 22:20 Which will either be worth picking up for the upgraded capabilities, or will lead to a glut of M1s on the used market. 2021-05-26 22:20 used one for a bit. mini is quicker than you might expect 2021-05-26 22:21 ended up having to use x86 emulation because arm didn't have some of the dependencies we used 2021-05-26 22:21 Rosetta is properly quick. 2021-05-26 22:21 in a website. can you believe website stuff that won't build on other cpu 2021-05-26 22:22 I can. 2021-05-26 22:22 I run on ARM boxes. 2021-05-26 22:22 Node is a CF. 2021-05-26 22:23 yeah, I'm liking the possibility of having a super fast arm64 laptop that can also actually run x86 code quickly 2021-05-26 22:23 not reaaaallly sure if I want to spend two grand on a 13" laptop but 2021-05-26 22:24 *shrug* 2021-05-26 22:24 Bitweasil: CF? 2021-05-26 22:24 WAIT. 2021-05-26 22:24 j`ey, Charlie Foxtrot. 2021-05-26 22:24 Clusterfsck. 2021-05-26 22:24 lol 2021-05-26 22:24 See what's announced. 2021-05-26 22:24 it' 2021-05-26 22:24 my dumb ass also wants an apple watch 2021-05-26 22:25 Either about the same coin will buy a 13" with more RAM and more external displays, or you can get one of the current ones lightly used. 2021-05-26 22:25 node is also compact fluorescent, but I understood :P 2021-05-26 22:25 but that's also an insanely large purchase and my $40 armitron works just fine 2021-05-26 22:25 kazinsal, for /what/? 2021-05-26 22:25 If you're going to drop a couple hundred on a watch, get something classy, timeless, and that doesn't need firmware updates. 2021-05-26 22:25 mostly the exercise features 2021-05-26 22:26 fitbit? 2021-05-26 22:27 already have an iPhone 12 so it's the apple health integration stuff that I was looking at 2021-05-26 22:27 The Apple Watch will notify you if you are in A-Fib. 2021-05-26 22:27 None of the other watches do. 2021-05-26 22:28 I think watch is an awful idea because I have seen what you get for UI on it. pretty rough 2021-05-26 22:28 yeah, real neat feature for folks with heart conditions (which, as far as I know, I don't have) 2021-05-26 22:28 But, I refuse to use an iPhone, so I won't buy it. 2021-05-26 22:28 expect to have to have phone anyway 2021-05-26 22:29 if you want health monitoring you'd probably be better off with one that is focused on that 2021-05-26 22:29 I went into a Telus store last fall and said "hey my plan is old and shit and my phone is dying, what can you do" and they offered a better plan for less money and an iPhone 12 on top so I rolled with it 2021-05-26 22:31 part of me wants to get a really beefy new M2 or M1A or whatever macbook and a multi-display thunderbolt KVM so I can switch my monitors/keyboard/mouse between my PC and the macbook really easily 2021-05-26 22:31 they made phones disposable by making it so you keep buying new phones forever with the phone bill 2021-05-26 22:32 makes me wonder how often people waste their still good phone and take the new one just because they might as well 2021-05-26 22:33 I buy sub $100 phones, use them until they break, and then just switch over my SIM card. 2021-05-26 22:33 the nexus 4 was the longest lasting flagship type phone I've ever had 2021-05-26 22:34 It seems like every Android update makes them run just a bit slower. 2021-05-26 22:34 I'm hoping to get three or four years out of this timphone 2021-05-26 22:34 jimbzy, that is exactly what it does. not even on purpose 2021-05-26 22:36 I also use prepaid service instead of an annual contract. 2021-05-26 22:36 when is there an update to make it way faster? never 2021-05-26 22:36 I can't think of an update where it was a performance boost 2021-05-26 22:36 https://i.imgur.com/pKMTRJf.jpg <-- True story 2021-05-26 22:37 I believe it 2021-05-26 22:37 I have a story that is hardly believable about how durable those nokia phones were 2021-05-26 22:38 I remember my boss had one of those and got so mad one day he threw it at the ground as hard as he could. As he started to walk back in the shop the freaking thing rang. 2021-05-26 22:38 chewed screen with hole in it from dog, broke case glass wide open, left fully immersed in puddle overnight. worked fine 2021-05-26 22:39 I pretty much stopped caring about phones when they went "smart" 2021-05-26 22:40 I like them as a computing platform, but they are worthless as a phone. 2021-05-26 22:42 I bet your boss didn't damage it 2021-05-26 22:43 No, it damaged him. He just sighed heavily and kept walking because he knew he had lost the fight. 2021-05-26 22:43 samsung isn't that good but they are pretty durable too 2021-05-26 22:43 I've had good luck with Motorola phones, too. 2021-05-26 22:44 My biggest gripe about cell phones these days is that nobody implements a codec that doesn't suck and works on multiple networks. 2021-05-26 22:45 for audio & music? 2021-05-26 22:45 kazinsal, they had one job, right? 2021-05-26 22:45 For calling. 2021-05-26 22:45 err video 2021-05-26 22:45 oh 2021-05-26 22:45 doug16k: Seriously! It's a telephone. It should make good sounding phone calls. 2021-05-26 22:45 The hardware is *more* than sufficient to encode, decode, transmit, and prepare media for fullband Opus voice. 2021-05-26 22:46 kazinsal, It sounds exactly like this https://youtu.be/FGBhQbmPwH8 2021-05-26 22:46 ​'Daft Punk - One More Time (Official Video)' by Warner Music France (00:05:21) 2021-05-26 22:46 hoping to find a way to charge a lot for that I guess 2021-05-26 22:46 Classic song, too. 2021-05-26 22:46 The actual microphone and speaker are much better quality than a GSM codec can provide 2021-05-26 22:47 And I know that wideband cell calling *works* because A) two phones on the Telus network will negotiate a wideband codec, I think G.711 2021-05-26 22:47 and B) I can make fullband calls via a SIP softphone over LTE 2021-05-26 22:48 But for some reason, inter-carrier cell calls even to someone I'm hypothetically standing right next to are crunched so hard that even an acoustic coupler would go "sorry mate, can't squeeze bits in and out of this" 2021-05-26 22:50 Ah, okay, so, Telus and Bell both implement G.722 2021-05-26 22:50 But Rogers seems to implement one of the incompatible *variants* of G.722. 2021-05-26 22:51 aliens will get here and say our music is nothing but screeching noise because they hear all the stuff the codec did :P 2021-05-26 22:51 I've often wondered how to effectively communicate something like "how to decode this audio stream I'm about to send you" from literallly no reference point 2021-05-26 22:52 there's never _no_ reference point 2021-05-26 22:52 the question is what is your reference point, and how much shared ground do you have 2021-05-26 22:53 eg. if you are in a spacecraft with a relatively powerful SDR transciever and you need to talk to someone else in a different spacecraft who speaks none of the same languages that you do but also has a relatively powerful SDR transciever, how do you establish communication 2021-05-26 22:53 Like, do you start by sending a clock signal, hoping that they receive it and understand that it's a clock signal? 2021-05-26 22:53 You fire a nuclear weapon across their bow. 2021-05-26 22:53 Porn. 2021-05-26 22:53 It's a whole sort of field of on-the-fly technolinguistics 2021-05-26 22:54 I use a Babelfish. 2021-05-26 22:54 tell them how many bytes are free then say ready 2021-05-26 22:54 Okay, say, you want to send your favourite pornographic image as first contact, because you're from the mirror universe 2021-05-26 22:54 kazinsal: godel escher bach ch6 talks about that 2021-05-26 22:54 How do you *establish* that you're about to send an image? 2021-05-26 22:54 there's also the voyager golden record thing, which is along similar lines 2021-05-26 22:55 I was really being flippant. 2021-05-26 22:55 How do you even begin to explain that you're about to modulate an image as a series of pixels represented as 32-bit integers onto a carrier wave 2021-05-26 22:55 That whole initial bootstrapping of first contact thing is incredibly my shit 2021-05-26 22:55 you don't have to say. if someone is decoding it they are looking for it 2021-05-26 22:56 That's one of those ultimate problems that would be just incredibly difficult to solve 2021-05-26 22:56 I wouldn't even think of anything but black & white at first. 2021-05-26 22:57 yeah it would be easy to communicate some things and almost impossible for others 2021-05-26 22:58 I guess maybe you could start establishing a basic modulation system and clock rate by pulsing out the fibonacci sequence in binary 2021-05-26 22:58 it would be funny if there were another voyager, and they explained the deflate algorithm so they could zip up a bunch of stuff :P 2021-05-26 22:58 Presumably any advanced enough species is going to recognized 1 1 2 3 5 8 13 etc 2021-05-26 22:59 and now you've established binary communication, of a sort, and math 2021-05-26 22:59 then you pulse out the frequency in Hz or whatever that you're on 2021-05-26 22:59 and then you establish something relatively understandable 2021-05-26 22:59 then again, Hz won't work because it's dependent on human seconds 2021-05-26 23:00 we have to assume they are more advanced and intelligent and/or have better tools than us 2021-05-26 23:00 So maybe establish how to represent exponents, and then pulse out your frequency in planck time per cycle 2021-05-26 23:00 we have had computers for a millisecond on galactic timescales 2021-05-26 23:01 this is one of those bizarre cases where there *is* no reference unit 2021-05-26 23:01 doug16k: maybe we're smarter than everyone else, and their rate of progress dragged along 2021-05-26 23:01 other than the speed of light 2021-05-26 23:01 I don't think we have to--or, indeed, can--assume anything 2021-05-26 23:01 we may have gotten really lucky and it's mostly a lot of natural habitat out there 2021-05-26 23:02 Fermi's paradox. If there's so much space, where is everyone else? 2021-05-26 23:02 Far away :) 2021-05-26 23:02 The most likely explanation is "there's a LOT of space" 2021-05-26 23:02 they all blow themselves up sooner or later after they figure out antimatter power 2021-05-26 23:03 'great filter' 2021-05-26 23:03 The most human-realist explanation is intelligent life tends to self-genocide before they can figure out how to go to the stars 2021-05-26 23:03 yeah, they are too good at blowing each other up 2021-05-26 23:04 It's unfortunate but we're never going to know really what's out there because we're too damn good at killing each other 2021-05-26 23:04 But not good enough to stop killing each other so we can go out there and kill new things 2021-05-26 23:04 it would be so great if we found certain proof of alien life. suddenly everyone else is just a human, not a "race" 2021-05-26 23:05 Well, if you managed to survive such a fate would you really cruise the universe trying to make friends? 2021-05-26 23:05 Travel the galaxy, meet facinating life forms, and kill them 2021-05-26 23:05 kazinsal, FMJ? 2021-05-26 23:05 Schlock Mercenary 2021-05-26 23:05 It reminds me of a quote from Full Metal Jacket ;) 2021-05-26 23:06 I think the greatest invention we could possibly suddenly have would be basically being able to build stargates 2021-05-26 23:07 Not only have you possibly solved FTL travel, but you've also solved FTL communication and surface-to-orbit costs 2021-05-26 23:07 How many shovel loads of coal would it take to power a stargate? 2021-05-26 23:08 Plonk a stargate on a space station and the other end on the ground and now you can get materials into orbit for the low low cost of "try not to vomit when you step through and are suddenly in freefall" 2021-05-26 23:09 (Of course, the "solution" to that is to put the stargate in a rotating hab, so now your cost is "try not to vomit when your inner ear suddenly has to deal with a whole new world of coriolis effect and your head is experiencing different gravity than your feet".) 2021-05-26 23:09 That doesn't sound pleasant. 2021-05-26 23:09 Yeah, there are some logistical/engineering issues with rotating habitats for artificial gravity 2021-05-26 23:10 You need to rotate them fast enough to "generate" "gravity" but not so fast that the coriolis effect screws with your balance. 2021-05-26 23:10 And if your habitat is too small in diameter, then the gradient of gravity is too steep 2021-05-26 23:10 You reminded me of this fantasy I have since reading magazines as a kid to communicate with an alien telephatically while I look at stars, and enjoy sharing together; I also by getting to experience both it's natural and technology-aided abilities. 2021-05-26 23:11 And if you have 1.0 g at your feet and 0.9 g at your head, your brain is going to be VERY upset with you. 2021-05-26 23:11 There's also an unsolved question of exactly how much gravity your body *needs* 2021-05-26 23:12 We know that prolonged microgravity causes bone density loss and muscle atrophy. 2021-05-26 23:12 But we don't know exactly how much gravity is required to make maintaining bone and muscle not take several hours a day. 2021-05-26 23:13 If it just takes a tenth of a gee or so then that's perfect, because a moon habitat will be livable with the assumption that you go for a walk every day. 2021-05-26 23:13 Much like the earth is livable with the assumption that you go for a walk every day. 2021-05-26 23:13 yay taking a walk 2021-05-26 23:14 By maintaining you do mean a body inherent function, or induced effort? 2021-05-26 23:14 Oli: star gazer! 2021-05-26 23:14 Kind of both. In full gravity, existing takes effort. 2021-05-26 23:15 In microgravity, it really doesn't, so you can just float from one side of the ISS to the other and back a hundred times with about as much effort as it takes to walk to your kitchen and back. 2021-05-26 23:16 The purpose of a rotating habitat drum or torus is basically causing everything in it to "fall" towards the outside surface of the habitat, thereby simulating gravity. 2021-05-26 23:17 So walking in a rotating habitat is in theory similar to walking on earth, and living in a rotating habitat in theory exerts similar forces on your body. 2021-05-26 23:18 * gog meows 2021-05-26 23:18 * kazinsal pats 2021-05-26 23:19 * gog purrs 2021-05-26 23:19 this exact exchange happened in another channel not two seconds ago 2021-05-26 23:19 synchronicity 2021-05-26 23:20 It's a glitch in the Matrix. 2021-05-26 23:20 * jimbzy gets ready to pop Elrond in the mouth. 2021-05-26 23:20 that reminds me, i should take the red pill tonight 2021-05-26 23:20 'cept it's more turquoise 2021-05-26 23:21 there's another group I'm in where my role appears to be designated catgirl headpatter too 2021-05-26 23:21 so in this case I'm at least used to it 2021-05-26 23:23 it's an important job 2021-05-26 23:24 true fact: catgirls die without headpats 2021-05-26 23:28 I am more curious what happens if you just live in 3 g acceleration continuously. does it all adjust so that is the new 1 g? 2021-05-26 23:29 That's another good one. Especially what happens if you live in higher gravity then come to Earth. 2021-05-26 23:29 I think muscularly that's what would happen. But your bones and bloodflow aren't as good at adjusting 2021-05-26 23:30 E.g. consider what happens when you strength train. At some point 200lbs squat is very hard, but once you can squat 300lbs, 200 is easy. I suppose it'd be like that 2021-05-26 23:30 I really liked the Expanse having people from Mars be able to function on Earth but having issues adjusting because things like a horizon that's dozens of km away and completely open air all the way to space is something that just doesn't compute when you're born under a dome in two fifths gravity 2021-05-26 23:31 yah i could see agoraphobia being a thing 2021-05-26 23:31 mars is a vacuum. there is negligible atmosphere 2021-05-26 23:32 was playing Mass Effect again the other day and Tali mentions something about 'your ship is so quiet! where i grew up (on a fleet of Quarian ships) a completely quiet ship means something serious has failed" 2021-05-26 23:33 In a sense I get that. Quiet in any place that I live in means the power's out 2021-05-26 23:33 If the half dozen various computer-y things aren't spinning, something's wrong 2021-05-26 23:33 yah. if you're on a ship and you dont hear anything means the engine is off and there's no air scrubber running, etc 2021-05-26 23:34 I dislike the idea that if something someone else built fails, I die 2021-05-26 23:34 In space, nobody can hear you scream at the guy who just overloaded the air scrubbers by vaping into them 2021-05-26 23:34 gorgonical, ever been in an apartment building? 2021-05-26 23:34 I am in one now, as a matter of fact. I dislike taking the elevator, too 2021-05-26 23:34 gorgonical: time for you to revert to agrarianism and hide in the woods 2021-05-26 23:35 if that fails you will be squashed like an insect 2021-05-26 23:35 Elevators have been "cut the cable while I'm standing in it" safe for literally almost a hundred and fifty years 2021-05-26 23:35 it won't though 2021-05-26 23:35 Correction: OVER a hundred and fifty years. 2021-05-26 23:35 Elisha Otis died in 1861. 2021-05-26 23:35 I have been conditioned by movies like alien to assume everyone they send into deep space will be unconscionably stupid and incompetent 2021-05-26 23:36 He demonstrated the predecessor to the modern elevator safety brake in 1853 by standing on an exposed elevator platform and cutting the cable holding it up with an axe. 2021-05-26 23:37 Elevators have been safe to an unreasonable degree for damn near two centuries. 2021-05-26 23:37 an engineer can make anything have any properties you want 2021-05-26 23:37 yah almost all elevator accidents are probably some hastily constructed temporary thing at a construction site, etc 2021-05-26 23:37 stuff in a building, no sweat 2021-05-26 23:38 "can't plummet" is a good one for elevators 2021-05-26 23:38 The only elevator I'm not a fan of is paternosters. 2021-05-26 23:38 But those are bizarre and antiquated and nobody builds them anymore 2021-05-26 23:39 even better are the hydraulic piston ones 2021-05-26 23:39 like those cant really fail catastrophcially really 2021-05-26 23:39 severing accidents concern me way more than falling accidents, with elevators 2021-05-26 23:39 My understanding is that they somewhat solve the shabbat elevator problem but since computerized elevators became a thing now elevators just have a shabbat mode 2021-05-26 23:40 Elevators are great! You can just buy elevator keys online. 2021-05-26 23:40 try not to let the elevator chop you in two, and you'll be fine 2021-05-26 23:44 anyways speaking of elevators and work and stuff it is no longer work time and it's still somehow not raining out there so I'm going to pack a bowl and go for a stroll 2021-05-26 23:45 Man I can't wait for Friday to come. I'm finishing up a paper and it sucks. Nice to see it all come together, though 2021-05-26 23:45 It probably won't even get in to this conference, but we can't just not try 2021-05-26 23:49 is there a way to force make to check vars? 2021-05-26 23:49 https://pastebin.com/ipEQzMAT 2021-05-26 23:49 ​pastebin.com: all: CROSS_CFLAGS := -DCROSS $(FREESTANDING_CFLAGS) $(COMMON_CFLAGS)dbg: CROSS - Pastebin.com 2021-05-26 23:49 say i do make all, that works, but then i need to make clean (delete all files) if i want to do make dbg 2021-05-26 23:50 not sure whats going on really hehe :P 2021-05-26 23:50 what do you mean check vars? 2021-05-26 23:51 oh i see what you mean 2021-05-26 23:51 I have it so I configure a debug build dir and another release build dir with their own generated make 2021-05-26 23:51 yah usually for that sort of thing i build it in another dir 2021-05-26 23:51 yah, exactly 2021-05-26 23:51 aah makes sense i guess 2021-05-26 23:52 good idea anyway to keep the build stuff in a subdir 2021-05-26 23:52 that way a make clean can just delete the top level dir 2021-05-26 23:52 well top level build dir 2021-05-26 23:53 yeah 2021-05-26 23:53 ZetItUp, idea is, why not keep around the object files for both so it's not a completely scratch build to move back and forth 2021-05-26 23:53 you an have other things that make it an oddball build too, like asan or other sanitizers 2021-05-26 23:53 alos i don't really switch between them that often so i don't see why i think it's an issue in the first place hehe 2021-05-26 23:54 also* 2021-05-26 23:55 well, if you do want to switch flags a tricky thing to do is write out a stamp file with all the clfags in it or whatnot 2021-05-26 23:55 and then have the whole build depend on the stamp file 2021-05-26 23:56 if you only update the file if the contents change you can have it dynamically recompile 2021-05-26 23:56 plan to support multiple architectures? 2021-05-26 23:56 alas, the logic for that is a little convoluted, but that's what i do for newos 2021-05-26 23:56 er LK 2021-05-26 23:56 doug16k nah 2021-05-26 23:56 you'll end up needing to clean to switch that. nice to be able to build them all without wipes 2021-05-26 23:57 not for the time being :D 2021-05-26 23:57 i do highly recommend putting everything in a build dir though *anyway* 2021-05-26 23:57 even if there's just one 2021-05-26 23:57 that way ou can just rm -r it 2021-05-26 23:59 or i could just add .debug or something at the end of the obj files and remove them too :D 2021-05-26 23:59 but yeah can get abit messy 2021-05-27 00:00 yah just do a separate build dir 2021-05-27 00:00 far easier to do 2021-05-27 00:00 build-all/ build-dbg/ etc 2021-05-27 00:00 only risk there and i've fallen to it many times, is you load the wrong one 2021-05-27 00:00 and you sit there and pull out your hair wondering why some change doesn't work 2021-05-27 00:01 i've made that mistake so many times i almost first thing just add a printf and see if i see it 2021-05-27 00:04 haha :D 2021-05-27 00:11 My build system remains a cobbled together mix of Make and Python but the Python is now mostly Kuroko... except the ramdisk build script since that still uses the `tarfile` module... 2021-05-27 00:14 I litter object files in my kernel/ and libc/, have one rootfs build dir that is shared with the sysroot for the toolchain, there's a hundred generated makefiles... but it all works. 2021-05-27 00:20 geist: re loading the wrong build: make a make target for that! 2021-05-27 00:20 'make qemu' or 'make qemu BUILD=debug' and it does the right thing 2021-05-27 00:20 hmm? 2021-05-27 00:22 'geist | only risk there and i've fallen to it many times, is you load the wrong one' 2021-05-27 00:29 well yeah but what do you mean make a make target precisely? 2021-05-27 00:31 a make target to do whatever 'loading' means. Presumably running an image in a vm 2021-05-27 00:32 oooh yeah 2021-05-27 00:32 yah totally, that's a good idea 2021-05-27 00:32 usually i write at least a script or a make target for that sort of thing, yeah 2021-05-27 00:32 though doesn't help when you're jtagging, etc 2021-05-27 00:41 find * -name '*.c' -exec sh -c "echo \"\\"{}\\"\", " \; <-- anyone knows why this doesn't work? 2021-05-27 00:42 https://klange.dev/s/image0_2021_05_27_09_41.jpg 2021-05-27 00:42 i'm trying to recursively glob all .c files and essentially do echo "\"$filename\"," 2021-05-27 00:43 find * -name '*.c' -exec sh -c "echo \\\"{}\\\", " \; 2021-05-27 00:43 try that 2021-05-27 00:44 though actually 2021-05-27 00:44 what's wrong with find * -name '*.c' -exec echo {} \; ? 2021-05-27 00:44 printf "%s\n" ./**/*.cc 2021-05-27 00:44 woohoo that works, thanks a lot klange 2021-05-27 00:44 er, .c 2021-05-27 00:44 find * -name '*.c' -exec sh -c 'echo \"{}\", ' \; # this should work too 2021-05-27 00:44 in the meanwhile I found -printf which should also work 2021-05-27 00:45 find * -name "*.c" -printf "\"%p\",\n" 2021-05-27 00:47 moon-child: doesn't wrap it in quotes and doesn't add the ',' 2021-05-27 00:49 oh you want shell quoted? printf "%q,\n" ./**/*.c 2021-05-27 00:50 relying on ** globbing is a dangerous game 2021-05-27 00:50 in source directory? 2021-05-27 00:50 but %q is magic and will handle weird-ass filenames, so that's nice 2021-05-27 00:51 _but_ it does specifically do shell quoting, so depends on where these quoted filenames are going? 2021-05-27 00:59 yeah it depends where you use it. for quick one off thing bash glob is less cumbersome than find 2021-05-27 00:59 test it with echo then throw it at the real thing 2021-05-27 01:40 the glob might exceed the command line though 2021-05-27 01:41 also fiddling with that here, the ** part of the glob doesn't seem to go more than one dir 2021-05-27 01:42 i'm only seeing it do the same thing as */*.c 2021-05-27 01:42 maybe a different shell? this is bash 2021-05-27 02:04 I believe you need an ext option to get it go deeper, which is one of the pitfalls of ** 2021-05-27 02:10 dumb question but does libera have the same policy of ## vs # channels? 2021-05-27 02:10 apparently both ##cooking and #cooking exist but the former has more users 2021-05-27 02:11 libera is not different from the way freenode used to be 2021-05-27 02:13 Libera's policy docs are a directly clone of the Freenode ones before Lee's changes. 2021-05-27 02:14 This was partly responsible for the union of #osdev and osdev.org for the operation of the new channel: we're a group registration with an extern project now, so have claim to single-# channel. 2021-05-27 02:19 oh word. 2021-05-27 02:19 was wondering that, because the freenode one was kinda grandfathered in, iirc 2021-05-27 02:21 Yeah, I wasn't just asking out for agreement on that out of personal interest ;) 2021-05-27 02:22 man my typing has gotten so bad lately 2021-05-27 02:48 For some reason I just thought maybe the plural of array should be arraies, not arrays. 2021-05-27 02:48 Wrote it and thought "that doesn't look right" 2021-05-27 02:50 you may be onto something here 2021-05-27 03:10 that reminds me i've never heard someone pronounce the word "trie" 2021-05-27 03:10 does it rhyme with "tree"? 2021-05-27 03:10 yeah 2021-05-27 03:11 it's supposed to be try technically 2021-05-27 03:12 i could see it pronounced like "tray" 2021-05-27 03:13 how do you get the A? 2021-05-27 03:15 klange: nah that's fine. i was happy to let you drive and be the decider 2021-05-27 03:16 i will not besmirch any decisions there because i did not take control of the vehicle 2021-05-27 03:16 I wasn't gonna just take the reigns without agreement, that would be... Lee-like ;) 2021-05-27 03:16 Should I reflash my t410 with coreboot... it's from the last generation of ThinkPads to ship with a real BIOS. 2021-05-27 03:18 well, guess the question is why 2021-05-27 03:19 and 'just to play with it' is a perfectly valid reason 2021-05-27 03:20 Pretty much. Weighing boredom against the difficulty of the task - I lack all the tools at the moment for chip flashing, and this bios chip requires complete disassembly of the unit to get to! 2021-05-27 03:20 Clearly it's for Kuroko as a coreboot payload 2021-05-27 03:59 should get klange to look at the world economy. probably fixed in a week 2021-05-27 04:02 would you like info tlb to be like this: https://gist.github.com/doug65536/61f7f2a9298502f28979878a5c6dda10 any feedback? 2021-05-27 04:02 ​gist.github.com: gist:61f7f2a9298502f28979878a5c6dda10 · GitHub 2021-05-27 04:18 the way it says the path is self explanatory enough? 2021-05-27 04:23 I think the one thing I'd like out of info tlb is if it could collapse ranges 2021-05-27 04:24 yeah I did add parameters to force a specific top level page (other process) and give start and end or start and length 2021-05-27 04:24 gigabytes of 2M entries all with the same bits? please don't make me scroll through all of that >_> 2021-05-27 04:24 like: info tlb $cr3 0xfeed0000 0xfeedffff 2021-05-27 04:25 ah... 2021-05-27 04:25 coalesce nice contiguous stuff 2021-05-27 04:25 'course probably only useful to a moron like me mapping a bunch of contiguous pages... 2021-05-27 04:26 yeah I see what you mean. like hexdump saying ** meaning repeat that row 2021-05-27 04:26 assume next page is next page 2021-05-27 04:27 what if a random scattering of them have A bit set and most dont. break the coalesce there? 2021-05-27 04:28 have to right? 2021-05-27 04:28 I would say definitely break on flags 2021-05-27 04:28 that reminds me i've never heard someone pronounce the word "trie" <-- i've always pronounced it the same as "try", not sure which is correct from wikitionary: https://en.wiktionary.org/wiki/trie 2021-05-27 04:28 ​en.wiktionary.org: trie - Wiktionary 2021-05-27 04:29 that's how i've pronounced it 2021-05-27 04:29 tree-eh? 2021-05-27 04:29 My love for configuration options says "break on discontiguous frame mappings by default, but have an option to ignore them; always break on flags because wtf are you using info tlb for if you didn't care about those" 2021-05-27 04:30 stux: My understand is it is actually supposed to be the same as "tree" because it comes from "retrieval", but we've all just agreed that's moronic and "try" was invented because duh. 2021-05-27 04:30 understanding* 2021-05-27 04:31 klange: that makes my argument for gif being pronounced different from the peanut butter weaker though 2021-05-27 04:32 unless japanese pronunciation were normative, then it would be tree-eh 2021-05-27 04:32 can't be j 2021-05-27 04:32 it's graphics interchange format, not jraphics 2021-05-27 04:32 exactly 2021-05-27 04:33 Truly choosy developers choose PNG anyway. 2021-05-27 04:33 apparently in japanese they say it like "try": 2021-05-27 04:33 トライ 2021-05-27 04:33 trai 2021-05-27 04:34 did my client really just send underscores? 2021-05-27 04:34 I wanted to call it the goofy encumbered format, too bad it's an e 2021-05-27 04:34 no, it's the "torai" hiragana you sent 2021-05-27 04:34 lol okay so extra borked terminal set up 2021-05-27 04:34 1) that's katakana 2021-05-27 04:34 classic 2021-05-27 04:34 erm, katakana 2021-05-27 04:34 2) it's more properly a トライ木 or if you want to avoid the issue a プリフィックス木 2021-05-27 04:35 "toraiki" 2021-05-27 04:35 > trie という名称は "retrieval"(探索、検索)が語源であるため、"tree" と同じ発音を用いる(リトゥリーヴァル)。しかし、ツリー構造との混同を避けるために「トライ」という読み方を奨励する人もいる。日本語では、「トライ木」という呼び方がほぼ定着している。 2021-05-27 04:35 font cache misses 2021-05-27 04:36 get kochi-moncho or something, doug16k 2021-05-27 04:36 mincho* 2021-05-27 04:37 half the fun of a cache is inserting stuff you aren't going to use again :P 2021-05-27 04:37 <'trie' comes from 'retrieval', which would be read as 'tree'. However, to avoid confusion with "tree", some people encourage the use of "try". In Japanese, it is generally called "torai-ki".> 2021-05-27 04:37 or something to that effect, I'm not a professional translator or anything, I just live here. 2021-05-27 04:37 thank you for your very pro looking translation 2021-05-27 04:39 meanwhile if you see something you don't recognize, jisho.org (click on "radical") is an excellent way to type new symbols from radicals 2021-05-27 04:40 this is now fully off-topic, but what is it about computer science people and japanese? 2021-05-27 04:41 there are not very many computer people learning e.g. dutch in their free time 2021-05-27 04:42 well the reason I am learning it is because there is a vowel after every consonant and that sounds really pretty in my hearing 2021-05-27 04:42 retrieval is an interesting word because it contains "ヴ" or "v" which isn't a commonly used letter 2021-05-27 04:43 I blame the 80s and 90s: NEC, Sony, Nintendo... today's computer nerds grew up on Japanese hardware. 2021-05-27 04:43 I think the first reaction is to blame anime, but increasingly I have foudn that to not really be a motivator for anyone that gets very far 2021-05-27 04:43 klysm: In this case the author of the snippet is likely going for a more direct representation of the phonetics, vs. many katakana words that follow certain rules with considerable disregard for how the word actually sounds in its native tongue. 2021-05-27 04:44 yes of course 2021-05-27 04:44 e.g. mcdonald's 2021-05-27 04:44 Now that one is... complex and regional. 2021-05-27 04:45 I only know of the difference between makku and makudonarudo 2021-05-27 04:45 Gotta fix my weechat 2021-05-27 04:46 Ah, then I must introduce you to makudo! because we must shorten everything but no not like _that_! 2021-05-27 04:47 hmm ever hear of makujitsu? 2021-05-27 04:54 There we are. I can actually read it now. Incidentally is makudo still doing that thing where after 5pm you get extra meat? 2021-05-27 04:55 you can do that https://godbolt.org/z/GaMqfbs8f (default function pointer parameter to some function) 2021-05-27 04:55 ​godbolt.org: Compiler Explorer 2021-05-27 04:56 line 9-15 are almost unreadable 2021-05-27 05:17 gorgonical: the art of the mac (マック術) 2021-05-27 05:19 doug16k, looks like you're trying to call routines from asm without caring too much what gets called? 2021-05-27 05:19 where 2021-05-27 05:20 oh actually it looks like you're just doing printf 2021-05-27 05:20 yeah 2021-05-27 05:20 that's the limited bootloader one 2021-05-27 05:21 have to handle utf16 for uefi case, I just slapped it on always utf16 on the godbolt 2021-05-27 05:24 I hate the debug output in uefi 2021-05-27 05:24 it makes a mess with terminal escapes that recreate screen updates 2021-05-27 05:25 does the uefi shell present an ansi terminal by default? 2021-05-27 05:25 yes it puts the screen on com1 2021-05-27 05:25 keyboard input from com1 too 2021-05-27 05:26 so if you use api calls that print at a particular place on the screen, it sends all the escapes and moves cursor around 2021-05-27 05:27 so where does log go then? 2021-05-27 05:27 going to have to set up a com2 and explicitly write serial output 2021-05-27 05:27 com1 is unusable, taken, by ovmf 2021-05-27 05:28 I appreciate what they did but it's bad too 2021-05-27 05:43 I wonder if I could open com1 and cut off that terminal thing 2021-05-27 06:07 did that work? 2021-05-27 06:13 not sure yet, still adding in API decls for serial (I didn't have them yet) 2021-05-27 06:29 nope, keeps drawing on com1 2021-05-27 06:29 I printed hello to every com port. (all 2) 2021-05-27 06:30 I LocateHandleBuffer every com port in the entire universe, HandleProtocol every one, and print "Hello" 2021-05-27 06:32 works, hello comes out 2021-05-27 06:32 it's probably printing to the same object as I got for com1 2021-05-27 06:33 the SIMPLE_TEXT_OUTPUT_PROTOCOL probably is 2021-05-27 06:45 in case you're curious, does this https://gist.github.com/doug65536/da96a0e47b3b9d95eddd6969288b6b37 2021-05-27 06:45 ​gist.github.com: efi_serial.cc · GitHub 2021-05-27 06:47 write isn't const correct declaration so I had to do that stupid buffer 2021-05-27 06:48 I'll modify the official declaration 2021-05-27 06:48 if write modifies the memory I hope it corrupts their entire hard disk 2021-05-27 06:51 where's const: https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Protocol/SerialIo.h#L197 2021-05-27 06:51 ​github.com: edk2/SerialIo.h at master · tianocore/edk2 · GitHub 2021-05-27 06:51 are they kidding? 2021-05-27 06:52 they couldn't possibly write that memory, right? 2021-05-27 06:55 I think 'IN' means const 2021-05-27 06:55 maybe? 2021-05-27 06:56 IN is for microsoft style static analyzer 2021-05-27 06:56 chances are IN/OUT/OPTIONAL are all defined as blank 2021-05-27 06:56 sure looks like it 2021-05-27 06:56 it's ostensibly for improving self-documentation of function prototypes 2021-05-27 06:56 you can do some of that in gcc finally 2021-05-27 06:57 really do it, the kind where it know which parameter is buf size 2021-05-27 06:57 you tell it 2021-05-27 06:57 the "access" attribute 2021-05-27 07:00 hey I should see if I can put some of those in my kernel string.h type stuff 2021-05-27 07:00 probably already knows the standard ones 2021-05-27 07:00 with builtin on I mean 2021-05-27 07:00 every once in a while I think about going and slapping in/out/optional/nonnull documentation modifiers in function prototypes 2021-05-27 07:02 it would be so neat if it checked your flow analysis against the builtin access attributes and saw that you violate them and warn you that you might need -fno-builtin-whatever 2021-05-27 07:04 follow that trail far enough and you end up with dependent types 2021-05-27 07:07 follow that trail far enough you end up with #pragma :) 2021-05-27 07:09 there is a CONST in EFI declarations 2021-05-27 07:11 EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetImage has this parameter: IN CONST VOID *Image, 2021-05-27 07:12 therefore EFI_SERIAL_IO_PROTOCOL.Write buffer not being CONST is a bug? 2021-05-27 07:13 I wonder what would happen if I made IN mean const 2021-05-27 07:13 would it go nuts? 2021-05-27 07:14 would make silly const parameters, like const int thing 2021-05-27 07:15 yep, if I make IN mean const I get tons of 'duplicate const' 2021-05-27 07:19 should I make the headers const correct and send a pull request? lol 2021-05-27 07:19 that's not the only one that isn't const correct 2021-05-27 07:22 the spec isn't const correct 2021-05-27 07:23 those headers are doing the nonsense the spec says 2021-05-27 07:36 stux: My understanding is it is actually supposed to be the same as "tree" because it comes from "retrieval", but we've all just agreed that's moronic and "try" was invented because duh. <--- oh that's interesting. And it would actually make sense so that it sounds different enough from "tree" to not make it confusing. 2021-05-27 07:38 the japanese stuff i can't read but I understand that there must be some Japanese influence in the design of the structure? 2021-05-27 07:56 funny how you can't really do anything with com port errors as debug log. you going to write it to the log? :) 2021-05-27 07:58 and panic is a bit excessive 2021-05-27 07:59 I had it recursing into itself when it tried to log write error. duh! 2021-05-27 08:00 not write error. I forget what 2021-05-27 08:01 just a message about something 2021-05-27 08:08 DUDE 2021-05-27 08:08 it is writing the screen to all com ports 2021-05-27 08:09 they can't be serious 2021-05-27 08:11 I just made the serial code use com2, and it worked, output came out, made chardev socket for com2, used `while true; do nc localhost 7789; done` to keep watching it. then the terminal drawing overwrote stuff and it put the progress bars up 2021-05-27 08:12 ovmf takes all the serial ports if you use simple text output protocol 2021-05-27 08:12 ...to draw on the screen 2021-05-27 08:13 hah oh no, i can't have my irc client join the channel because needs to be identified 2021-05-27 08:14 Could probably clear that flag... maybe 2021-05-27 08:14 (anyone know if there's current spam?) 2021-05-27 08:14 naw. i'm sure it'll turn into a bot spam fest 2021-05-27 08:15 need to just hack up some nickserv stuff 2021-05-27 08:15 anyway yay LK can now irc as well 2021-05-27 08:16 going to have to have a way to silence the simple text output stuff so I can do debugging run and get a log 2021-05-27 08:19 they figured they would be so nice and make every com port light up like a christmas tree with terminals that show the screen, then you can just stick it in any port and bingo? 2021-05-27 08:21 the kid in the matrix was wrong. actually there are no serial ports 2021-05-27 08:22 there is a spoon 2021-05-27 08:23 was right there 2021-05-27 08:23 I guess I have no choice but port e9 hack isa-debugcon 2021-05-27 08:26 or disable screen to get log 2021-05-27 08:33 hahaha, the irony. the bios bootloader can use serial API abstraction, and it's practically guaranteed to be 16550, and platform independent efi code will use x86 only usa-debugcon 2021-05-27 09:09 theres no parallel ports anymore are there? 2021-05-27 09:09 sure, just not on your computer 2021-05-27 09:09 my computer yes, but yeah :) 2021-05-27 10:02 ... why the flood? 2021-05-27 10:03 me? chanserv/nickserv auto-flood 2021-05-27 10:07 oh i think sortie's irc server went down 2021-05-27 10:07 i wonder if i broke it... 2021-05-27 10:07 Oh no 2021-05-27 10:08 The VM is dead jim 2021-05-27 10:08 ah that makes sense. it got into a weird state just while i was watchign it on tcpdump 2021-05-27 10:08 where it was acking packets i was sendig it but nothign else 2021-05-27 10:09 whcih in retrospect makes sense, because there's a MITM there with the qemu user net stack 2021-05-27 10:09 it was probably just buffering it up 2021-05-27 10:09 Qemu will listen(2) and accept(2) incoming connections and waiting on the VM to respond 2021-05-27 10:09 right, or even ongoing established connections it probably keeps soem amount of buffer 2021-05-27 10:09 Did you do anything out of the ordinary that might've destabilized it? 2021-05-27 10:10 The systemd service is set up to restart it but it doesn't have a watchdog that verifies the VM actually works 2021-05-27 10:10 i dont think so. it did hold a connection to irc for a few hours 2021-05-27 10:10 but haven't really toched it in the last bit 2021-05-27 10:10 the alst thing i saw you do is you bounced your connection 2021-05-27 10:10 it was just PING/PONGING for a whiel 2021-05-27 10:10 Yeah had to log in again, don't think it was that 2021-05-27 10:11 yah but it seemed to stop responding shortly after 2021-05-27 10:11 Interesting though 2021-05-27 10:11 This is the fun part of hosting infrastructure natively 2021-05-27 10:12 Ah I should've checked if the kernel responds to ping before I restarted it because both 22 and 6667 was unresponsive 2021-05-27 10:12 But if ssh went down, should definitely be a kernel panic 2021-05-27 10:13 It's stuff like this that worries me about making sortix.sortix.org the official version, like my OS might go down 2021-05-27 10:13 So need to build the watchdog infrastructure to check if it's up and restart otherwise 2021-05-27 10:14 Trouble is that these VMs are stateless. They have fresh live cd images rolled on startup every time. 2021-05-27 10:14 I need to get to a level of stability and feature completeness so I want to run a persistent harddisk installation.. and have them come back with minimal filesystem damage in practice fixed by fsck -p after an untimely reboot 2021-05-27 10:15 I don't trust fsck -p to fix untimely reboots in practice, so will need fsck -y for that and pray it works. 2021-05-27 10:15 Additionally the restarting process should also make sure the VM is upgraded to the latest nightly build 2021-05-27 10:16 So a bunch of fun infrastructure work to get a persistent cloud VM stable 2021-05-27 11:00 * kingoffrance summons ancient scrollback from ~10 hours ago 2021-05-27 11:00 find ./ -maxdepth 1 -name '*.c' -print0 | xargs -0 -I% -n1 echo '"%"' # im sure that unnecessary use of xargs, i just never bothered with find -exec for some reason, xargs defaults to "echo" and can even -P parallel; -n lets you pick how many inputs go to command 2021-05-27 11:00 * kingoffrance shoots ancient scrollback zombie in head 2021-05-27 11:19 kingoffrance printf is pretty much meant for this. 2021-05-27 11:19 xargs -0 printf '"%s"' 2021-05-27 11:20 oh you probably need a \n in there too 2021-05-27 11:20 also, reading through some of the old forum content is a trip down memory lane. 2021-05-27 11:20 https://forum.osdev.org/viewtopic.php?f=2&t=2970&sid=0a3df00c8a5b47642acec64261c7ccd7 2021-05-27 11:20 ​forum.osdev.org: OSDev.org • View topic - Test Beds 2021-05-27 11:20 yeah, true re: printf if you need fancy 2021-05-27 11:21 "8 gigabyte hard drive fully dedicated to testing" 2021-05-27 11:21 kingoffrance: yeah but you don't need -n1 or -I on the xargs for printf to work, so there's less process spawning overall and xargs will fit as many into the call to printf as possible, speeding up the overall execution time 2021-05-27 11:22 -n1 means "run the command once for every input" instead of the default behavior where xargs supplies the command with as many inputs as possible before exceeding the maximum command line length 2021-05-27 11:22 true, i usually do such things to meta generate a script to do real work 2021-05-27 11:22 yeah 2021-05-27 11:22 just a way to nab filenames 2021-05-27 11:23 FWIW I never use find's -exec or anything like that - the biggest reason is that it's not consistent across platforms >.> 2021-05-27 11:23 or, well, some of the other flags aren't at least. 2021-05-27 11:25 i dunno, seems some ppl avoid xargs i just find it puzzling 2021-05-27 11:30 I forget xargs exists :| 2021-05-27 11:36 i never use printf command but i am very much in favor of simple wrappers around lib functions, in the sense of give shell more options. that seems a "pattern' but ive never seen a name for it. a little hairy maybe, but if you know the invocation at one level, you somewhat know the other 2021-05-27 11:36 exposing innards, versus hiding away 2021-05-27 11:37 in a crude way, ffi or rpc-ish 2021-05-27 11:38 gives shell or whoever else a simple way to invoke 2021-05-27 11:43 POLA sort of thing even 2021-05-27 12:38 Hm, I set up a thing to send an IPI when a thread becomes available to schedule, which is supposed to wake sleeping APs, and it works in QEMU but not on the thinkpad... 2021-05-27 13:19 Hello. I was looking over documentation of sysenter & sysexit. It's said that sysenter clears the IF flag to make sure the ring 0 code isn't interrupted, but how should IF be set upon exiting? 2021-05-27 13:20 (Without causing a race condition by having with `sti \ sysexit` 2021-05-27 13:20 Excuse the grammar 2021-05-27 13:21 RFLAGS should be restored after sysexit 2021-05-27 13:22 although, let me examine the docs 2021-05-27 13:22 I could not find such a thing on sysexit, only on sysret 2021-05-27 13:49 ok. sorry, i haven't abandoned helping you, i just had to grab a snack 2021-05-27 13:49 digging in now 2021-05-27 13:58 Lol, it's okay. I'm in no hurry 2021-05-27 14:02 Mids_IRC: ok, i am finished with my research and i discovered that linux does sti; sysexit because there is a single instruction window where an interrupt will not happen 2021-05-27 14:02 so there is no race condition 2021-05-27 14:03 I see. That's pretty quirky 2021-05-27 14:03 yeah 2021-05-27 14:03 curious that the intel or amd manuals don't mention this fact 2021-05-27 14:03 Thanks for the help, I'll be using it shortly 2021-05-27 14:04 the intel manual does mention the behavior of sti though 2021-05-27 17:04 Sup nerds. 2021-05-27 17:11 * gog nerds on the floor 2021-05-27 17:13 No... gog, go clean those up! 2021-05-27 17:13 (not sure if the "Nerds" candy, little tiny hard tangy candies, exist there) 2021-05-27 17:13 https://twitter.com/AsahiLinux/status/1397963184959418370 this is cool 2021-05-27 17:13 ​twitter: Hello, world from macOS running on the m1n1 hypervisor! ␤ ␤ With one blazing fast efficiency core, and all graphics MMIO logged via USB! https://pbs.twimg.com/media/E2aP-bbVoAMEy3H.jpg 2021-05-27 17:13 (a box of those spilled on the floor is a royal pain) 2021-05-27 17:13 (my son tends to do it way more than I care for) 2021-05-27 17:13 i uh 2021-05-27 17:13 idk i think so 2021-05-27 17:13 i haven't had those in awhile 2021-05-27 18:40 hi divine 2021-05-27 18:41 * gog meows 2021-05-27 18:42 * kazinsal headpats 2021-05-27 18:48 * gog purrs 2021-05-27 19:16 hello, gdb remote protocol question, what is the packet type which corresponds to sending data to a debugee's stdin? stdout is "O" as in "$OhexEncodedData#checksum", but I don't see one for the other way 2021-05-27 19:26 surely you mean receiving _from_ stdin? 2021-05-27 19:43 Yeah the debug stub will be receiving from and gdb is sending to. Directions are confusing 2021-05-27 20:43 anyone seen freenode's osdev topic? 2021-05-27 20:44 no, did they do a takeover on us 2021-05-27 20:44 yeah 2021-05-27 20:44 cunts 2021-05-27 20:44 some people are just a waste of oxygen 2021-05-27 20:44 wait, you mean freenode's takeover, right? 2021-05-27 20:44 yeah 2021-05-27 20:44 and seems like they... banned everyone 2021-05-27 20:44 they've been +b-ing ops on channels and stuff 2021-05-27 20:45 > #osdev This channel has moved to ##osdev. The topic is in violation of freenode policy: https://freenode.net/policies 2021-05-27 20:45 ​freenode.net: The Policies - freenode 2021-05-27 20:45 seems that every channel that has "Libera.chat" is in violation of freenode's policy 2021-05-27 20:45 pretty much 2021-05-27 20:46 I saw it happen to a channel that had "sister channel on libera" in the topic, not even "we have moved to libera" 2021-05-27 20:46 maybe andrew lee's bitcoin coal emissions will choke him in his sleep 2021-05-27 20:46 god willing 2021-05-27 20:46 related: https://twitter.com/lattera/status/1397604645002960902 2021-05-27 20:46 ​twitter: #Freenode calling out cancel culture after cancelling hundreds of legitimate channels. https://pbs.twimg.com/media/E2VJw2LXoAI6qMP.png 2021-05-27 20:58 it redirects to ##osdev now 2021-05-27 21:06 yeah 2021-05-27 21:07 geist: wow i just read fuchsia got its first official release, congrats! 2021-05-27 21:07 yay thanks 2021-05-27 21:07 yah it's starting to roll out 2021-05-27 21:07 actually OTAing the device from linux to fuchsia. not sure that's ever been done anywhere 2021-05-27 21:07 whoa, yeah, that's new 2021-05-27 21:09 yah as someone said it's kinda like swapping out the drive train while barreling down the highway without the family in the car noticing 2021-05-27 21:12 the biggest downside of my name is that I sometimes get mentioned randomly 2021-05-27 21:20 geist, didn't know you guys had video of it up! https://www.youtube.com/watch?v=B_1bAnLqlMo 2021-05-27 21:20 ​'Saudi's Again Changing Wheels Tyres while driving!' by Imran shaik (00:04:53) 2021-05-27 21:20 should I add "0.0.0.0 freenode.com www.freenode.com" to my /etc/hosts file? :D 2021-05-27 21:20 ​redirect -> freenode.net: freenode 2021-05-27 21:21 I just want to know what kind of drivetrain abuse allows for that... maybe individual brakes on the left side? 2021-05-27 21:21 a more constructive and entertaining thing would probably be to call the EFF and see if we can sic them on freenode 2021-05-27 21:22 I guess an open diff and riding the brakes would work. 2021-05-27 21:24 Hrm. No, they rotate it while putting the front back on. 2021-05-27 21:24 I'm guessing a few drivetrain mods. 2021-05-27 21:25 Bitweasil, how can they be so stupid? 2021-05-27 21:26 something wrong with them 2021-05-27 21:26 Bored, sure. Doesn't look terribly stupid to me, as long as the driver's any good. 2021-05-27 21:26 having money in saudi arabia is a license to produce the world's most baffling video content 2021-05-27 21:26 Indeed. 2021-05-27 21:27 ya right, the guy standing on front suspension will be dismembered if it fell onto wheels 2021-05-27 21:28 ... "as long as the driver's any good." 2021-05-27 21:28 OH MY GOD YALL 2021-05-27 21:28 They all clearly have a lot of trust in that driver. 2021-05-27 21:28 And said driver appears to be, in fact, competent at the task. 2021-05-27 21:28 kazinsal, you just got gold star verified? 2021-05-27 21:28 Remember how a number of years ago there was this reddit fork for "free speech" people who were mad they couldn't post teenagers in skimpy clothing etc 2021-05-27 21:28 Voat 2021-05-27 21:28 (https://www.hummingfluff.com/lovelypeoplecomic.html) 2021-05-27 21:28 ​www.hummingfluff.com: www.hummingfluff.com | 520: Web server is returning an unknown error 2021-05-27 21:29 ... no? 2021-05-27 21:29 Okay well 2021-05-27 21:29 Turns out their irc TLS connection has the same cert as Freenode's new TLS cert. 2021-05-27 21:29 ok? 2021-05-27 21:29 Freenode is now owned by the same guy who runs an alt-right pedophile den 2021-05-27 21:29 [citation needed]? 2021-05-27 21:30 openssl s_client -connect irc.voat.co:6697 -showcerts -servername irc.voat.co /dev/null | grep "Server certificate" -A 1 2021-05-27 21:30 Returns *.freenode.net for me 2021-05-27 21:30 kazinsal: i mean 2021-05-27 21:30 the domain's been doing that for a number of days 2021-05-27 21:30 irc.bitcoin.com too 2021-05-27 21:31 CompanionCube: Amazing how brazen and stupid these people are 2021-05-27 21:31 apparently andrew reused IPs from one of his previous IRC adventures 2021-05-27 21:31 iirc it's the 'tower of chats' one 2021-05-27 21:32 K, it's a Let's Encrypt cert. 2021-05-27 21:32 IPs are different for freenode and voat. 2021-05-27 21:32 https://www.letstoc.com/ 2021-05-27 21:32 ​www.letstoc.com: Tower of Chats 2021-05-27 21:33 version with voat: https://web.archive.org/web/20200815013645/https://www.letstoc.com/ 2021-05-27 21:33 ​web.archive.org: Tower of Chats 2021-05-27 21:33 There's almost certainly a horde of user-genereated illegal materials on Andrew Lee's servers now lmao 2021-05-27 21:33 Ok. 2021-05-27 21:34 I've heard reasonably backed claims that the bitcoin full blockchain contains illegal stuff too. 2021-05-27 21:34 At least in some jurisdictions, if you look right... 2021-05-27 21:34 Imagine if Freenode disappears one night because the owner keeps reusing shit from the time that he gave voat safe haven lmao 2021-05-27 21:34 kazinsal: it might well disappear, but it won't because of reused things 2021-05-27 21:35 Opsec is hard. 2021-05-27 21:35 Especially if you don't care. 2021-05-27 21:35 note to would-be administrators: make sure the legal entity owning your domain won't get dissolved by the government 2021-05-27 21:35 And people who should care about opsec tend to be the worst at it 2021-05-27 21:36 I don't think that's a fair statement at all. 2021-05-27 21:36 Remember when the silk road got shut down because the feds pretended to be an arguing married couple in a library 2021-05-27 21:36 filing paperwork is not *that* difficult, you'd think he'd do it. 2021-05-27 21:36 If you're at the point where opsec matters, you probably have intelligent adversaries. 2021-05-27 21:36 Most people don't even try for opsec. 2021-05-27 21:36 kazinsal, yes that was a fucking genius operation 2021-05-27 21:37 DPR was... a bit special. 2021-05-27 21:37 Bitweasil: one of the crypto-current chains i work with, had some performance problems when people began encoding whole damn jpeg's into the destination address of a transaction 2021-05-27 21:37 they caught him with his pants down 2021-05-27 21:37 I'm still stunned that he didn't do what his name implied and hand the thing off. 2021-05-27 21:37 or his laptop lid up, whatever :P 2021-05-27 21:37 i had written a tool to find and display everything they had added, and luckily nothing too nasty turned up 2021-05-27 21:37 Catchain? 2021-05-27 21:38 I'm pretty sure they took out a couple pedophile rings with malicious javascript because the admins were too stupid to turn javascript off in the Tor browser 2021-05-27 21:38 * Bitweasil pulls out the proper OTP to convert cat pictures into something less appropriate. 2021-05-27 21:38 kazinsal, yeah, and browsers leak horribly. 2021-05-27 21:38 I think for a while webrtc would ignore proxies and such. 2021-05-27 21:39 Yeah, the whole web stack is basically a pile of security holes 2021-05-27 21:39 All of modern computing, really. 2021-05-27 21:39 one of the games i played online, would submit the .innerHTML of itself back to the admins 2021-05-27 21:40 so they could review it for mods that are against the rules 2021-05-27 21:40 A pile of security holes, teetering on a tower of complexity, built on top of leaking processors. 2021-05-27 21:40 reject fast calculator 2021-05-27 21:40 become monke 2021-05-27 21:40 the problem, is that the admin would just render that html, with admin cookies 2021-05-27 21:40 so the illegal mods, now have admin privs :P 2021-05-27 21:40 clever, ouch. Lol. 2021-05-27 21:40 heat, there are going to be a lot of random gentleman's farms in the decades to come. 2021-05-27 21:40 Run by former computer people. 2021-05-27 21:41 cookies are for trying to choke people that came down your chimney in December 2021-05-27 21:41 not web pages 2021-05-27 21:41 what's a gentleman's farm and why does that sound like an euphemism for farm strip clubs 2021-05-27 21:42 There is a 66-page thread in yospos (at 40 posts per page) called "bump this thread every time you just want to leave tech behind and wander off into the wilds" 2021-05-27 21:42 It gets bumped a lot. 2021-05-27 21:42 "I have enough money that I don't care if this makes any money, and I'm doing it because it doesn't involve any computers more complicated than some microcontrollers." 2021-05-27 21:42 heat: a strip club that employs farmers-daughter stereotypes from flyover states. brilliant! let's go into business 2021-05-27 21:43 That sounds like *way* more drama than some chickens, goats, and a cow or three. 2021-05-27 21:44 it's got drama, it's got C A S H, baby! 2021-05-27 21:44 dirty strip club ATM dollaz 2021-05-27 21:44 Yeah, but it probably also has a burning ring of fire, which is a bad thing in that context. 2021-05-27 21:45 we just need a funny reality show for it and we have ourselves a cash cow 2021-05-27 21:45 I'm good, no interest in dealing with a strip club. 2021-05-27 21:45 not a strip club, a strip farm 2021-05-27 21:46 totally different 2021-05-27 21:46 is there really no way to printf format a char16_t* or char32_t* ? 2021-05-27 21:46 Have you seen the various "Farm Series" shows out of the UK with older farms? 2021-05-27 21:46 Bitweasil, no 2021-05-27 21:46 I thought there would at least be a gnu extension 2021-05-27 21:46 doug16k, unicode stuff? Should be able to just %c%c%c%c them with the fragments, but... you'd have to break it up by byte. 2021-05-27 21:46 doug16k, I would guess no because the C library is horrible 2021-05-27 21:47 heat, t 2021-05-27 21:47 er 2021-05-27 21:47 t 2021-05-27 21:47 ... *stabs* 2021-05-27 21:47 https://en.wikipedia.org/wiki/BBC_historic_farm_series 2021-05-27 21:47 ​en.wikipedia.org: BBC historic farm series - Wikipedia 2021-05-27 21:47 Try that. 2021-05-27 21:47 doug16k: convert from char32_t to wchar_t then send it through wprintf I guess 2021-05-27 21:47 have you noticed that inside stdio there are way different styles for different stuff 2021-05-27 21:48 libc was grown, not designed 2021-05-27 21:48 fwrite has the FILE * as the last argument, fseek has it as its first argument 2021-05-27 21:48 rewind is named rewind because they forgot the f 2021-05-27 21:49 kazinsal, doesn't mean you can't keep consistency 2021-05-27 21:49 doug16k: there's %ls for wchar_t* 2021-05-27 21:49 i can't think of any function in POSIX that takes the fd first, and that was also grown 2021-05-27 21:49 I could type pun char16_t* to wchar_t* in EFI or char32_t* to wchar_t* elsewhere in the printf arguments 2021-05-27 21:49 yeah, %S also works for back compat 2021-05-27 21:50 but wchar_t could be 16 or 32 bit. in efi it is 16 2021-05-27 21:50 and everything is wchar_t 2021-05-27 21:50 it's windows, right? 2021-05-27 21:50 yeah. But you don't wanna do a ton in efi. Windows same thing 2021-05-27 21:50 wchar is useless 2021-05-27 21:50 change my mind 2021-05-27 21:50 so if you can just guarantee you're living in a 4=sizeof wchar abi, no problem 2021-05-27 21:51 the only times you want to use wide chars are when you really need to know the wideness of wchar 2021-05-27 21:51 my bootloader code has to work in both 16 and 32 bit wchar_t 2021-05-27 21:51 heat, yeah 2021-05-27 21:51 or, it's windows 2021-05-27 21:52 you don't need to care about the wideness of the arguments to CreateProcessW for example 2021-05-27 21:52 (but that's just a bad design) 2021-05-27 21:52 and it's weirder than that. in 32 bit bios boot it uses utf8 everything, and in efi it uses utf16 everything 2021-05-27 21:53 I do mean utf8. I fully OCD'd the conversions 2021-05-27 21:53 heat: on windows midipix provides utf8 versions of win32, and does the conversion for you 2021-05-27 21:53 and utf16 handles surrogate pairs 2021-05-27 21:53 moon-child, I remember reading somewhere that windows is slowly embracing utf8 more and more 2021-05-27 21:54 you have to handle utf16 regardless because of iso9660/joliet and fat32 2021-05-27 21:55 yeah 2021-05-27 21:55 ATA has some too IIRC 2021-05-27 21:55 it's a shame that EFI took that route 2021-05-27 21:55 now everyone's stuck with horrible garbage strings 2021-05-27 21:56 yeah, dragged utf16 way further into the future 2021-05-27 21:56 it is better for some languages though 2021-05-27 21:56 that's what I do to console myself when I get annoyed with it :D 2021-05-27 21:56 tell myself that :D 2021-05-27 21:57 I was told that some languages have stuff that is 2 bytes in utf16 but 3 in utf8 2021-05-27 21:57 " If the ANSI code page is configured for UTF-8, -A APIs operate in UTF-8. This model has the benefit of supporting existing code built with -A APIs without any code changes." 2021-05-27 21:57 I didn't find an example for myself though 2021-05-27 21:57 https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page 2021-05-27 21:57 ​docs.microsoft.com: Use the Windows UTF-8 code page - UWP applications | Microsoft Docs 2021-05-27 21:57 there it is 2021-05-27 21:57 I should write a UTF16ToSomethingUsable() function that increments a "why_the_fuck" counter every time it's called 2021-05-27 21:57 the win32 api supports native utf8 now 2021-05-27 22:00 That's because the entire world doesn't write in simple ASCII English. I've seen EFI shells and UEFI BIOS with Chinese/Japanese chars, hence why you need UTF16/32 support. 2021-05-27 22:00 qemu may have literally fixed the pckbd race yesterday 2021-05-27 22:00 just before I filed the ticket 2021-05-27 22:01 yeah, every codepoint from 0x800 to 0xFFFF is longer in utf8 than utf16 2021-05-27 22:01 sorry but localising everything is a mistake 2021-05-27 22:01 0xDC00-DFFF range doesn't really count - reserved for surrogate pairs 2021-05-27 22:02 anything that's not exactly user facing(read: technical) shouldn't be translated 2021-05-27 22:02 er, 0xD800-0xDFFF 2021-05-27 22:02 what do you gain really? 2021-05-27 22:02 what's a software/hardware engineer that doesn't know english? 2021-05-27 22:03 Grandma needs to be able to read the error message to the suport technician. 2021-05-27 22:03 really? wow. I only speak English and for some reason, I am happy to make programs handle every language 2021-05-27 22:03 my joke is "you can paste a zip file in the username field, and I could make it work" 2021-05-27 22:03 one thing is a program, but a kernel or firmware? 2021-05-27 22:04 things like localised error/log messages already cause enough grief 2021-05-27 22:04 program should be able to handle characters in its sleep 2021-05-27 22:04 unlimited alphabet. bring it on 2021-05-27 22:04 I have worked with enough engineers that, despite speaking what appears to be english, clearly cannot read or write the language 2021-05-27 22:05 A lot clearly in China, or very poor English. The company I work for, has teams in Taiwan, there English is terrible, source code comments for stuff in Chinese, yeah it's there job to maintain so whatever, but still. 2021-05-27 22:05 see, the real solution is to just sedate your boomers 2021-05-27 22:07 Arthuria, what happens if you need to touch that code? 2021-05-27 22:07 Variable names in Chinese, and the IDE find is completely broken lmao. Because the find only handles ASCII. 2021-05-27 22:08 Liability is on them to fix, if an issue comes up. And some PM or related who has better English, has to explain what they need to do, how they verify a fix and what not. There English is not level 0, they often know the basics 2021-05-27 22:08 But in there local teams they speak and write in their own local lang 2021-05-27 22:09 if someone ever handed me code that was documented in a different language I'd start looking on linkedin for a new job 2021-05-27 22:09 or I'd shove all the comments into google translate and commit whatever it spits out 2021-05-27 22:11 lol 2021-05-27 22:11 :/ 2021-05-27 22:12 i would never ever ever write any code/comments in non-english 2021-05-27 22:12 in js you can name variables θ Φ ρ etc, saw some great circle distance code being cute once 2021-05-27 22:12 and english is not my first language 2021-05-27 22:12 doug16k, ahhhhhhhhhhhh 2021-05-27 22:12 mathematicians should not be allowed near programming languages 2021-05-27 22:12 that's the most webdev thing I've ever heard 2021-05-27 22:13 I don't speak Chinese, but it's happened. Here's a screeni of a project file, I had to deal with a few months back. It happens. https://i.imgur.com/wjVaDgL.png 2021-05-27 22:13 var 😛 2021-05-27 22:13 yep, that is in need of some google translate 2021-05-27 22:16 However the above is translatable, when crap like this occurs and somehow the codepage has messed up. You're doomed https://imgur.com/a/XmnOOrU 2021-05-27 22:16 ​imgur.com: Imgur: The magic of the Internet 2021-05-27 22:16 Mmm, mojibake 2021-05-27 22:17 delicious fried tofu 2021-05-27 22:22 is there a way to get routes that don't have an mtu of 1500? 2021-05-27 22:23 i tried traceroute'ing a bunch of websites but I only get that (boring) value 2021-05-27 22:23 https://gitlab.com/qemu-project/qemu/-/commit/ff6e1624b33dc40545fb19cb751ea68a565036fe 2021-05-27 22:23 ​gitlab.com: pckbd: don't update OBF flags if KBD_STAT_OBF is set (ff6e1624) · Commits · QEMU / QEMU · GitLab 2021-05-27 22:24 klange: is that coincidental? or because of your report 2021-05-27 22:25 Coincidental. 2021-05-27 22:26 the qemu foundation is reading klange's brain 2021-05-27 22:26 those damn 5g towers 2021-05-27 22:26 Or they're reading my IRC messages, I've been complaining about this one for a while. 2021-05-27 22:26 klange: lol thats a cool coincidence 2021-05-27 22:31 heat, my mtu is 1492 2021-05-27 22:31 just set it in your router 2021-05-27 22:34 PPPoE takes 8 bytes 2021-05-27 22:35 yeah for the most part everything is 1500 now 2021-05-27 22:36 you mean even on pppoe? 2021-05-27 22:36 I mean once you're past the customer premises 2021-05-27 22:36 ah. if you say so about network thing, I believe it :P 2021-05-27 22:38 big optical trunks use SDH, which either uses 810 octet frames or 2430 octet frames 2021-05-27 22:38 and you can think of the 810 octet frames as sort of like a DS0 compared to the 2430 octet frames being a DS1 2021-05-27 22:39 SDH frames are a bit bizarre in that they're not really arranged linearly like ethernet frames 2021-05-27 22:40 they're arranged in columns and rows, with frame and link structure overhead and error correction information in the first nine columns and then the rest dedicated to payload 2021-05-27 22:41 it creates the same problem if you just set 1492 in your router, right? it'll force it to fragment, and is just as good repro as lower MTU all the way at remote server? 2021-05-27 22:41 yeah if you have your MTU set to 1492 you're going to see fragmentation or an adjusted MSS 2021-05-27 22:41 MSS adjustments are the key to dealing with non-1500 byte MTUs 2021-05-27 22:42 a lot of stuff doesn't really "renegotiate" path MTUs well so if 1500 byte MTUs weren't acceptable we'd see a lot more core networking failures 2021-05-27 22:42 it's really just with eg. PPPoE and VPNs where you start to get funky things happening 2021-05-27 22:43 ikr? 3/4 of the work of networking specifications is figuring out how to describe it so people won't make ridiculous implementations 2021-05-27 22:44 it's technically incorrect to assume that you can send a DF-bit 1500 byte IP packet from point A to point B but in the overwhelming majority of cases it works 2021-05-27 22:44 maybe I should get a shirt made: "I am so old my MTU was 576" 2021-05-27 22:47 Some of us had an MTU of 64. And we liked it. 2021-05-27 22:47 not that old 2021-05-27 22:47 Fun fact: the 576 byte MTU is equivalent to two T1 frames 2021-05-27 22:48 s/frames/superframes/ 2021-05-27 22:48 (T1 framing is a fucking nightmare; what you would expect to be frames are actually called superframes, and "frames" are a single octet from each channel plus a framing bit) 2021-05-27 22:49 That's TDM for you. 2021-05-27 22:49 And that doesn't go into the implications of bit robbing. 2021-05-27 22:50 So a T1 is 24 DS0s which means that a T1 frame is 24 bytes + a framing bit. 2021-05-27 22:50 A superframe is 288 bytes + 12 framing bits. 2021-05-27 22:51 An extended superframe is two superframes if all channels are used for data. 2021-05-27 22:52 Unless your T-1 is a PRI. 2021-05-27 22:53 Rate of frames never changes -- it's always eight kilohertz -- but your bandwidth changes based on whether or not you have robbed-bit signalling enabled. 2021-05-27 22:53 Every sixth frame in a superframe or ESF has its eighth bit repalced with signalling information if RBS is on. 2021-05-27 22:55 This is fine for digital voice because it basically means you have five 8-bit frames and then one 7-bit frame, which at 8 KHz is absolutely negligible data loss. 2021-05-27 22:55 Buuuuut for digital *data* it doesn't work. 2021-05-27 22:56 As far as *why* you would do this, it let AT&T multiply their existing trunk capacity by 12 without running new trunk lines. 2021-05-27 22:56 The same number of wires needed for two analog phone lines can run a T1. 2021-05-27 22:56 And the T1 will carry clearer voice than the analog lines will. 2021-05-27 22:57 i can't set the mtu on my router because I don't have admin 2021-05-27 22:57 fuck :( 2021-05-27 22:57 And, most importantly, you don't need any expensive (for 1960) frequency-division multiplexing gear 2021-05-27 22:58 TDM is cheap! Unfortunately for us modern folk, it also baked a whooooole bunch of legacy cruft into our networks. 2021-05-27 22:58 Fun fact: You can hear robbed-bit signalling on a completely clear line! 2021-05-27 22:58 It sonuds like a very faint 1333 Hz tone. 2021-05-27 23:07 hm, unreliable booting in qemu 6 (not just the git build) for toaru32... should I bother debugging that when this is going away soon... 2021-05-27 23:09 even my loader itself randomly fails after the menu but before it's printed loading messages 2021-05-27 23:14 heat_, http://174-138-201-201.cpe.distributel.net:8000/isoproj.html should be 1492 MTU right now 2021-05-27 23:14 ​174-138-201-201.cpe.distributel.net 2021-05-27 23:15 oh wait 2021-05-27 23:15 condolences on being forced to use distributel 2021-05-27 23:15 now should work with http://174-138-201-201.cpe.distributel.net:14500/isoproj.html 2021-05-27 23:15 ​174-138-201-201.cpe.distributel.net: Isometric transformation test 2021-05-27 23:16 :) 2021-05-27 23:17 reminder: point is PMTU on that should be 1492 2021-05-27 23:18 yah tracepath agrees 2021-05-27 23:19 doug16k, is this thing permanent? 2021-05-27 23:19 i might use it in the future if it is 2021-05-27 23:19 I have it up a lot 2021-05-27 23:20 I'll throw it in a screen session at boot if it helps at all 2021-05-27 23:20 usually I have doug16k.no-ip working so it follows me even 2021-05-27 23:21 router supports updating it automagically 2021-05-27 23:22 doug16k.ddns.net should work 2021-05-27 23:23 looks dead 2021-05-27 23:23 it's kinda disappointing that we still have PMTU issues with PPPoE in 2021 2021-05-27 23:24 you would expect manufacturers to remember that jumbo frames exist for this kind of reason 2021-05-27 23:24 i'm getting 100% packet loss to it 2021-05-27 23:24 EIP=000084c9 hm that's still me, this isn't halted, are we spinning on ATAPI... I don't have a symbol map for the loader >_> 2021-05-27 23:25 hmm. should I write a bootloader, try to jam an ethernet hub into 512 bytes, or play world of warcraft after I finish up work and smoke a bowl... decisions decisions 2021-05-27 23:25 heat, port 14500? 2021-05-27 23:25 I just tried ICMP 2021-05-27 23:25 ah 2021-05-27 23:27 yeah 14500 works 2021-05-27 23:27 is ICMP blocked on your network or something? 2021-05-27 23:27 that sounds troublesome 2021-05-27 23:27 hmm maybe. let me look 2021-05-27 23:27 my router settings think I am kazinsal 2021-05-27 23:28 we are all kazinsal 2021-05-27 23:28 I AM BECOME MANY 2021-05-27 23:28 ah yeah this is getting boned in ata_device_detect... hm... 2021-05-27 23:29 kazinsal can into multicast 2021-05-27 23:30 I need to find the manual for irssi and figure out what button to slap so it pings me for nick mentions that aren't at the start of the line 2021-05-27 23:31 [root@amd-nixos:~]# ping angeldsis.com -c 10 -s 1472 -M do 2021-05-27 23:31 thats strange, according to wireshark, this is creating 1514 byte packets 2021-05-27 23:32 ah, there we go 2021-05-27 23:32 ah, the ethernet header is 14 bytes extra 2021-05-27 23:32 clever, ethernet's mtu is 1514 bytes 2021-05-27 23:32 clever: plus four bytes of CRC at the end 2021-05-27 23:32 but those get stripped out by the NIC usually 2021-05-27 23:32 (including the header) 2021-05-27 23:33 yeah, so the limit is 14 bytes of ethernet header, 1500 bytes of ethernet payload (ip+more), and 4 bytes of ethernet crc 2021-05-27 23:33 so a full standard length ethernet frame is 1518 bytes 2021-05-27 23:33 a full tagged ethernet frame is 1522 bytes 2021-05-27 23:33 oh right, my internet comes in over a tagged vlan 2021-05-27 23:34 and a full double-tagged frame is 1526 2021-05-27 23:34 somehow, the above didnt exceed any MTU's 2021-05-27 23:34 yeah, as far as IP is concerned it's still only 1500 bytes 2021-05-27 23:34 yah because it's almost always 1500 2021-05-27 23:34 the dot1q and q-in-q stuff is a layer 2 problem, not a layer 3 problem 2021-05-27 23:35 802.1q i believe is what i have 2021-05-27 23:36 yeah, you don't see a lot of q-in-q stuff except inside big service providers 2021-05-27 23:38 did anyone ever figure out a way to get gdb to properly debug a 32-bit remote that's speaking 64-bit packets or should I just rebuild this qemu with the i386-softmmu target if I want to do this... 2021-05-27 23:38 kazinsal: hmmm, but tcpdump is still stripping the 802.1q headers 2021-05-27 23:38 klange, i386 is best 2021-05-27 23:38 alright >_> 2021-05-27 23:38 I can make it partially work but you have to use 64 bit initial executable, and you still can't see locals, only break/step 2021-05-27 23:38 clever: chances are the dot1q tag isn't even reaching the interface tcpdump is running on 2021-05-27 23:39 something is stripping it out before it reaches you 2021-05-27 23:39 I suspect both of these are issues are from my shoddy ATAPI drivers. 2021-05-27 23:39 kazinsal: i ran it on the main interface, but i had had issues with linux stripping them before 2021-05-27 23:39 it needs a special flag to capture them 2021-05-27 23:39 The EFI loader always gets to the kernel, but it's blocked on a port read - would like that stack trace to see where it is :) 2021-05-27 23:40 yeah at least on e1000-type NICs you turn on a VLAN Enable flag and now the NIC doesn't strip out the dot1q stuff (and usually also helpfully copies it to the RX descriptor) 2021-05-27 23:41 kazinsal: pretty sure the tag is reaching linux, because i have 3 vlans on that side, but it gets stripped before reaching tcpdump 2021-05-27 23:41 03:03.0 Ethernet controller: Intel Corporation 82545GM Gigabit Ethernet Controller (rev 04) 2021-05-27 23:41 sounds about right 2021-05-27 23:42 klange, put this in your gdb toolchain build: https://github.com/doug65536/dgos/blob/master/toolchain/build-crossgcc-gdb.patch#L29 2021-05-27 23:42 ​github.com: dgos/build-crossgcc-gdb.patch at master · doug65536/dgos · GitHub 2021-05-27 23:42 ugh I don't even build gdb 2021-05-27 23:42 well I guess I do for the cross toolchain but I don't use that build 2021-05-27 23:42 you should use cross gdb to attach to qemu 2021-05-27 23:42 bah, my host gdb is perfectly adequate :P 2021-05-27 23:42 I also patch gdb to not try to use the top of stack for code injection 2021-05-27 23:43 alrighty, i386 qemu built from the current git... 2021-05-27 23:43 your system one probably already does that part 2021-05-27 23:44 Build SDL and Quake for toaru64 is probably a better use of my time than debugging toaru32's ATAPI issues in newer QEMU. 2021-05-27 23:45 now where did I put my 32-bit OVMF... 2021-05-27 23:45 klange, -trace 'ide*' 2021-05-27 23:45 `~/Downloads/ovmf-ia32.bin` of course 2021-05-27 23:45 might tell you something 2021-05-27 23:47 port=0x177 oh right I'm dumb, I didn't even need the stack trace, that's clearly an i/o reg for ATA 2021-05-27 23:48 ugh, do I fix this horrid driver so toaru32 can at least continue to skate along, or do I just ignore it, write ahci drivers for toaru64, and move on... 2021-05-27 23:49 if it's not even bus master ide I'd say ya screw that crap and go straight to ahci with proper DMA and command queue 2021-05-27 23:49 i'm trying to test my network stack against Linux and it's (AFAICT) just ignoring my packets; I see them in tcpdump but it doesn't seem to bother to actually deliver them to the Linux sockets I have open, any suggestions on how to trace why Linux is ignoring my packets? 2021-05-27 23:49 catern: compare your packet to one sent by another linux machine, and make it match as closely as possible? 2021-05-27 23:50 I'm sorta purplexed on the bootloader ATAPI driver, that should be brute-force polling and it shouldn't have any opportunities for issues, maybe qemu broke something with legacy ATAPI. 2021-05-27 23:50 clever: I'd prefer something more like "run this command to make Linux print verbose logs on what it does with each packet" :) 2021-05-27 23:50 catern, did you try wireshark? 2021-05-27 23:51 Loader is kinda ugh, but at least with the EFI builds it uses OVMF and you can turn off the ATA/ATAPI drivers entirely from the menu. 2021-05-27 23:51 catern, are you trying to send packets to the qemu host? good luck with that 2021-05-27 23:51 doug16k: I'm sending them to a TUN/TAP device actually 2021-05-27 23:52 (I'm not actually running in qemu so I can't actually answer that question with "yes", but basically) 2021-05-27 23:52 aight, bowl smoked, what's next on the agenda 2021-05-27 23:52 from what then 2021-05-27 23:52 I wonder if this is just lazy detect code with no timeout failing to get a response from the secondary slave or something... 2021-05-27 23:53 Thankfully with a calibrated TSC as the main timing source misaka has way better opportunities to implement timeouts. 2021-05-27 23:53 doug16k: a regular Linux process with a userspace network stack 2021-05-27 23:54 (i mean, it can't talk to anything, because I can't get Linux to respond to the packets I send over the TUN/TAP, so is it really a network stack...) 2021-05-27 23:54 kazinsal, cancel WoW account 2021-05-27 23:54 catern: is the tun/tap bridged with the linux host? 2021-05-27 23:54 doug16k: but TBC classic launches on saturday 2021-05-27 23:54 if it isn't you're just talking to the void 2021-05-27 23:54 kazinsal: Write a Python clone, then obsess over it for three months. 2021-05-27 23:55 ah, I see we're doing linux networking. might duck back out and smoke another bowl 2021-05-27 23:55 how about WoW64? 2021-05-27 23:55 heat, that too 2021-05-27 23:55 geist: I have a listening socket on the TUN device, but Linux doesn't seem to be delivering my SYNs 2021-05-27 23:55 klange: but if I do that I'll need to stop using kuroko! 2021-05-27 23:55 write a kuroko clone 2021-05-27 23:55 hmm, if you tcpdump or wireshark the tun device do you see it? 2021-05-27 23:55 catern, same cause as what I said, except I assumed it was bridged networking nic in qemu 2021-05-27 23:56 usually when i'm doing this i'm working at a TAP 2021-05-27 23:56 in which case you're bridging a nic, yeah 2021-05-27 23:56 geist: yeah I can see it with tcpdump - I went up to just TUN because I thought it would be less to debug 2021-05-27 23:56 tun i think operates at L3 but i dont know precisely how that works 2021-05-27 23:56 (for now) 2021-05-27 23:56 i guess you hand it packets without eth? 2021-05-27 23:56 yeah, IP packets 2021-05-27 23:58 well, dunno. 2021-05-27 23:58 ¯\_(ツ)_/¯ 2021-05-27 23:58 sometimes also make sure it's 'up' 2021-05-27 23:59 i've seen cases where a bridge or tap or whatnot is not considered up so it just eats things 2021-05-27 23:59 good idea, yeah it seems to be up 2021-05-27 23:59 if it's like tap then you need linux to have an address assigned and wahtnot do it 2021-05-28 00:00 do you see any traffic on it? 2021-05-28 00:00 that's not yours 2021-05-28 00:00 heat: good suggestion to try wireshark, but same result, SYNs are showing up but Linux isn't responding 2021-05-28 00:00 generally speaking any active thing that linux is talking to will send ipv6 broadcast stff every once in a while 2021-05-28 00:00 geist: not sure what you mean - yeah linux sends me ICMPv6 stuff 2021-05-28 00:01 s/not sure what you mean// 2021-05-28 00:01 okay, that. sounds like it's alive then. interesting that it doesn't even RST your SYN 2021-05-28 00:01 that kinda implies it doesnt have an ip address bound to it 2021-05-28 00:01 or you're sending it to the wrong address 2021-05-28 00:02 or they're malformed some wya that it just drops it 2021-05-28 00:02 wireshark is pretty good at pointing out bad packets 2021-05-28 00:02 it doesn't catch some things though 2021-05-28 00:02 you have to enable checksum checks though 2021-05-28 00:02 martian packets for example 2021-05-28 00:03 might need to disable crc offload too 2021-05-28 00:03 if it's a tun then that should be all L2 2021-05-28 00:03 i have a devious plot to narrow it down though 2021-05-28 00:03 i've just started up two tuns and I'm connecting them to each other 2021-05-28 00:03 Linux can't possibly object to its own packets :^) 2021-05-28 00:03 word. 2021-05-28 00:04 sounds like tun don't work :) 2021-05-28 00:04 also this does have me wondering: is it possible to hook up a TUN to a qemu guest via some mechanism 2021-05-28 00:04 and skip the whole eth thing 2021-05-28 00:04 but yet it still doesn't respond to its own SYNs so something is still screwed up... 2021-05-28 00:04 catern: does ip addr show any address assigned to it? 2021-05-28 00:04 are these ipv4 or v6 packets? 2021-05-28 00:05 if it doesn't think it should e listening for an address it would presumably drop it 2021-05-28 00:05 I still need to write a `tarfile` implementation for Kuroko, but I really really need a gzip/deflate compressor fist... 2021-05-28 00:06 geist: yeah they have addresses assigned, 10.0.0.{1,2} http://catern.com/addr.txt 2021-05-28 00:07 huh. dunno 2021-05-28 00:07 how do you bridge two tuns like that/ 2021-05-28 00:07 ? can you assign them to a bridge? 2021-05-28 00:07 heh 2021-05-28 00:07 cat 2021-05-28 00:07 oh? they show up as a regular file? 2021-05-28 00:08 guess makes sense. taps probably do too 2021-05-28 00:08 no I just mean I'm running two cat processes with the tunfds as stdin/stdout (swapped for both directions) 2021-05-28 00:08 but yes, a regular file descriptor 2021-05-28 00:09 simpler to make a pair of fifos and use that no? 2021-05-28 00:09 well I need to connect the tun fds, right? I need something running in a loop to copy from one tun to the other 2021-05-28 00:10 ah if the goal is the tun and not a full duplex pair of fds 2021-05-28 01:11 best thing about doing a bunch of utf8 and utf16 crap with efi and non efi, is bugs where you get something like this: [0] base=0, end=1000, size=1000, type=䕒䱃䥁䅍䱂E噎S䅂D䱁佌䅃䕔D佂呏佌䑁剅一剏䅍彌䴲一剏䅍彌䜱 2021-05-28 01:13 lol 2021-05-28 01:15 I didn't make that up, that is from the debug run I am doing right this second :P 2021-05-28 01:15 i believe you 2021-05-28 01:16 I was getting away with %s meaning utf16, so when I passed it a utf8 once, without the 'ls' it acted as if utf16 input anyway 2021-05-28 01:20 hmm, wonder how hard it would be to generically templatize the inner printf routine to handle utf16 2021-05-28 01:21 no such thing as utf16 in printf 2021-05-28 01:22 all printf heard of is wchar 2021-05-28 01:22 if wchar is 16 bit, yeah, %ls is utf16 2021-05-28 01:23 I was hoping that wasn't right. I wanted to use the right format string for char16_t* and my conclusion was there is no such thing 2021-05-28 01:25 in efi I can use %ls because wchar_t is same thing if -fshort-wchar 2021-05-28 01:26 but I have to use wchar_t, %ls isn't even char16_t when fshort-wchar 2021-05-28 01:26 wchar_t is something else 2021-05-28 01:27 can you believe we still haven't figured out how to point to text in ram yet? 2021-05-28 01:28 i just remembered, the c64 was using a weird way of terminating strings in one of its lists 2021-05-28 01:29 the last char in the list, had the high bit set 2021-05-28 01:29 7 bit strings ya 2021-05-28 01:29 why waste a whole 8 bits on a \0 when you can pack the terminating flag into the last char! 2021-05-28 01:30 but a side-effect, is that the string compare routine, i think it was using xor 2021-05-28 01:30 and when the xor returns 255, you had a match, and your on the last char 2021-05-28 01:30 ah so a 'regular' printf just needs to support %ls and then it basically works fine? 2021-05-28 01:30 how about the output string format for sprintf or somethig? you'd need a wsprintf presumably 2021-05-28 01:30 but, the problem, is that it didnt care which string had the terminating flag 2021-05-28 01:30 because only the const string was supposed to have it 2021-05-28 01:30 I insist on being able to open a file named "🂡" in my bootloader, and print that to a utf8 serial log from utf16 format string. I don't care if I don't need to lol 2021-05-28 01:31 so if the 3rd char in your string had that bit set, it would abort comparing mid-way, and assume its all a match 2021-05-28 01:39 geist, yeah, your wchar_t would be full 32bit codepoints on anything other than windows/efi 2021-05-28 01:40 that explains why you hardly see wchar outside windows 2021-05-28 01:40 Reading a recent message from doug16k here, reminded me of the article on the web page this URL goes to: https://en.wikipedia.org/wiki/Mojibake 2021-05-28 01:40 ​en.wikipedia.org: Mojibake - Wikipedia 2021-05-28 01:42 neat 2021-05-28 01:42 was just thinking if i built an EFI app with my existing printf, etc 2021-05-28 01:42 what i'd need to do 2021-05-28 01:42 probably would just have some utf16-utf8 routines and move on 2021-05-28 01:42 I used C++ overloading to make variants of everything handle either char* or char16_t* 2021-05-28 01:42 strlen works on char16_t in my bootloader 2021-05-28 01:43 and i assume the endian of the char16_t is simply whatever 2021-05-28 01:43 ie, host 2021-05-28 01:44 yeah it's uint16_t essentially, but distinct 2021-05-28 01:44 I asked geordi, << is_signed::value 2021-05-28 01:44 as a side note, is char16_t a standard type? if so, is it signed? 2021-05-28 01:44 yah exactly 2021-05-28 01:45 false 2021-05-28 01:45 so are char8_t and char32_t 2021-05-28 01:45 they are c++ types 2021-05-28 01:46 I don't think C heard of utf anything yet did it? 2021-05-28 01:46 C++ has 8, 16, 32 string literals u8"" u"" and U"" 2021-05-28 01:47 C has char and wchar "" and L"" 2021-05-28 01:47 wchar_t* 2021-05-28 01:47 i only say that because of the char is signed/unsigned ambiguity 2021-05-28 01:47 and that being apparently defined in the typed versions 2021-05-28 01:47 doug16k: c has all of those too 2021-05-28 01:48 moon-child, then what's the printf format for char16_t const *? 2021-05-28 01:48 no printf formats. But it has the literals and the types 2021-05-28 01:49 wow 2021-05-28 01:49 how dumb is that? 2021-05-28 01:50 and what about multibyte string? nothing added either? all wchar_t ? 2021-05-28 01:50 dunno 2021-05-28 01:50 er. s/multibyte/wide/ 2021-05-28 01:51 blows me away that half assed stuff like that gets into standard 2021-05-28 01:52 it's not the slightest bit better than uint16_t if nothing has heard of char16_t 2021-05-28 01:52 I think they don't actually specify utf 8/16/32, just unspecified encodings of those widths. Hell they don't even mandate ascii for the base character sets 2021-05-28 01:52 (hence di/trigraphs) 2021-05-28 01:53 and yeah it's dumb, though I have gotten some milage out of the U'' character literals 2021-05-28 01:53 *mileage 2021-05-28 01:54 you need utf16be for iso9660 2021-05-28 01:54 the joliet 2021-05-28 01:55 because memcmp utf16le is nonsense result 2021-05-28 01:56 sorts them by codeunit % 256 then by codeunit >> 8 2021-05-28 01:59 I love how the path table works in cd format. that is awesome 2021-05-28 02:01 you just cheat straight to the directory containing the file 2021-05-28 02:02 but yeah, just having encoding-specific literals is a big improvement 2021-05-28 02:05 you just have to hope gcc is reading your source with the right encoding and wchar_t is 32 bit if you use L'🂡', but U'🂡' works regardless of wchar_t width 2021-05-28 02:06 L'🂡' screws up in windows or uefi 2021-05-28 02:06 it can't. doesn't fit 16 bits 2021-05-28 02:10 it is 0x1f0a1 2021-05-28 02:12 geist, since all the api calls in efi want utf16, I just adopted it so all my string literals and strings are tchar and all my string functions know how to use char16_t, and try to remember to countof when you would sizeof 2021-05-28 02:13 like win32 code that defines _UNICODE 2021-05-28 02:13 yah 2021-05-28 02:14 but all same code also runs in bios boot with all utf8 so it's the same tricks as _UNICODE thing happening 2021-05-28 02:15 and they need to force utf16 sometimes for iso/fat, so, a big happy encoding party 2021-05-28 02:23 usually you do it so you have tcschr tcscpy tcslen etc, to mean do the wide or not automatically, but I decided I might as well let function overloading do it, since C compatibility is moot in the bootloader code 2021-05-28 02:27 I don't do _T("whatever") like windows, I do: TSTR "whatever" 2021-05-28 02:27 TSTR is u"" 2021-05-28 02:28 author of _T(s) didn't know that "you " "can " "do" " this" to make one string literal, I guess 2021-05-28 02:30 I always hated putting that closing ) in 2021-05-28 02:31 in utf8 TSTR is "" it has no effect 2021-05-28 02:37 more like operator underloading, amirite? 2021-05-28 02:38 yes 2021-05-28 02:47 yah funny me 2021-05-28 02:50 I wish more languages adopted that so you don't have to + them together 2021-05-28 02:52 it isn't even possible to keep a makefile under 80 colums, is it? 2021-05-28 02:52 "concatenation" "like", "this" is such a footgun though 2021-05-28 02:54 it's possible, with lots and lots of \ 2021-05-28 02:54 I try. often it breaks it 2021-05-28 02:54 huh 2021-05-28 02:55 let me see if I can find example 2021-05-28 02:56 how can I get this line below column 80: https://github.com/doug65536/dgos/blob/master/Makefile.am#L2815 2021-05-28 02:56 ​github.com: dgos/Makefile.am at master · doug65536/dgos · GitHub 2021-05-28 02:57 maybe bad example, after shell should work 2021-05-28 02:58 better example: https://github.com/doug65536/dgos/blob/master/Makefile.am#L2714 2021-05-28 02:58 ​github.com: dgos/Makefile.am at master · doug65536/dgos · GitHub 2021-05-28 02:58 even possible to break in middle of argument and continue? have to start in 1st column of next line right? 2021-05-28 02:59 yeah, or break up into separate variables 2021-05-28 02:59 but yes I see your point. It's not that practical 2021-05-28 02:59 I do some of that for the really heavy ones 2021-05-28 03:07 I suppose when you are piecing together a ridiculously long qemu command line, you expect to have ridiculously long arguments 2021-05-28 03:08 universe being a fractal again 2021-05-28 03:12 launch for debug, numa config lol: https://gist.githubusercontent.com/doug65536/8717e1050577b70a05ba6c6eb603c79e/raw/fe09e56eed0f08b957486cb5ed28158d67fdfe3c/gistfile1.txt 2021-05-28 03:23 I wish char16_t were %hs - that would make sense, right? 2021-05-28 03:23 maybe %ls means wchar_t and %lls means char32_t ? 2021-05-28 03:24 in happy land I mean 2021-05-28 03:25 or could slot in with the new explicit width specifiers. %w16s is char16, %w32s is char32 2021-05-28 03:25 yeah 2021-05-28 03:26 even better 2021-05-28 03:38 ah I see why it's not warning me about screwing up %s, gcc can't check utf16 format strings 2021-05-28 03:41 I can't put attribute format printf on them 2021-05-28 03:41 the prototypes 2021-05-28 03:45 you could use a macro to pass through to a dummy function 2021-05-28 03:45 like 2021-05-28 03:45 #define wprintf(...) (fakeprintf(__VA_ARGS__),real_wprintf(L"" __VA_ARGS__)) 2021-05-28 03:46 where fakeprintf has the attribute 2021-05-28 03:46 yeah I almost thought of that but didn't think of empty one. thanks 2021-05-28 03:47 could even make it static inline so it is sure it can toss it 2021-05-28 03:48 could probably even attribute optimize to make it get optimized out in debug 2021-05-28 03:50 the v one is toast but it's toast already, it just validates the format string 2021-05-28 03:50 that takes va_list instead of ... 2021-05-28 03:51 yeah I guess why not that one 2021-05-28 03:51 same idea works there too 2021-05-28 03:53 assuming it is safe to pass a va_list as a parameter, not touch it, then use it after that returns 2021-05-28 03:53 hmm, by rights the v one should make sure you only call it from a function that has the printf attribute 2021-05-28 03:54 but not surprised if it doesn't 2021-05-28 03:54 if I was really paranoid I'd va_copy it to another one and pass that to fakeprintf :P 2021-05-28 03:55 sorry, fakevprintf 2021-05-28 03:56 I tippy toe around va_list 2021-05-28 03:57 they put the fear of death into you with va_end eh? 2021-05-28 03:57 how many children die if you forget to invoke va_end again? 2021-05-28 03:57 a lot 2021-05-28 03:58 they are all horrified because they know it might work if you don't :P 2021-05-28 03:59 I want to find out what it is that totally crashes platforms that absolutely need it 2021-05-28 04:02 man my cpu temperature is so weird. it'll go down to 40C and stay there for maybe 10-15 seconds, then jump up to 52C and fall back down to 40C in 5 seconds for another cycle 2021-05-28 04:03 minimum is too low 2021-05-28 04:05 I should play with min clock and see what that does to temperature 2021-05-28 04:06 not happy about the sawtooth temperature graph 2021-05-28 04:06 it's working as intended though 2021-05-28 04:49 hm, do I really need to be reading this mmio register twice... I suspect this is a bug... the real hardware didn't require that... 2021-05-28 04:49 which one? 2021-05-28 04:50 e1000e ICR, qemu isn't clearing the interrupts unless I read + mask + read + enable, but the hardwre seems to be fine with just one read; the e1000 emulation also just worked with one read and no mask flipping 2021-05-28 04:52 interesting 2021-05-28 04:52 i wonder if it's expecting me to be setting Interrupt Auto Mask for this chipset and the bug is around not doing that... 2021-05-28 05:10 klange: interesting. I'm also running into interrupt issues with e1000e, but on VMware 2021-05-28 05:16 I just wanted to switch to -M q35 by default since it more closely matches my hardware test rig, but that switched the emulated nic and the two implementations are completely different 2021-05-28 05:21 The machine emulated with -M q35 is from ~2008, so it's only 2~3 years older than the hardware in my ThinkPad. I have a slightly different model number on my NIC (which worked with my old driver in toaru32). 2021-05-28 05:22 yah q35 is really all about pci-e being the base thing 2021-05-28 05:25 definitely q35 by default if possible 2021-05-28 05:25 omg just waching a review of the new Army of the Dead movie 2021-05-28 05:25 and they picked out that one of the cameras (digital) they used to film it has a few dead pixels 2021-05-28 05:26 and they didn't catch it in editing. so some scenes has this little while pixel that moves around, and then they'll cut andi t'll go away 2021-05-28 05:26 haha, imagine how much that camera cost? 2021-05-28 05:26 yah totally. probably one of those $100k RED cameras or something 2021-05-28 05:26 i can see them using say 2 or 3 or so for the whole movie 2021-05-28 05:26 so based on where that one camera was that one day and what angle it was filming... 2021-05-28 05:29 the cameras they use are so good, it's almost impossible to make one 2021-05-28 05:29 seems like in the source footage before editing you could fix it 2021-05-28 05:29 or according to that movie review, fully impossible :) 2021-05-28 05:29 but maybe they just didn't catch it before doing the final edits 2021-05-28 05:29 yay digital cameras 2021-05-28 05:30 yeah, they can fix it incredibly well with some amazing ai pixel replacement algorithm 2021-05-28 05:32 lol ai pixel replacement, they can just hire an intern to flip through the frames and fix it 2021-05-28 05:34 have you tried schedutil governor? it's way better on non-intel 2021-05-28 05:34 lol it pretty much keeps it over 4.3 all the time but temp stays below 60 2021-05-28 05:35 4.5 sometimes 2021-05-28 05:38 so weird for it to be max turbo at 1% total cpu 2021-05-28 05:38 aliens will think we're nuts 2021-05-28 05:39 mwait never ran so fast 2021-05-28 05:40 apparently cfs says floor it 2021-05-28 05:49 ah I remember. if you want ide storage, I force q35 off and it's a piix, otherwise it is q35. then I have a way to instantiate an old thing 2021-05-28 05:51 I should put it on mbr, so mbr means piix, and hyb or gpt means q35 2021-05-28 05:52 but piix naturally has ide and q35 doesn't so I did it that way 2021-05-28 05:53 ide on x86_64 os is "you're kidding" territory 2021-05-28 05:54 ide might not exist on the board, at least no connector 2021-05-28 05:55 chances of an ide chip being there somewhere is very high 2021-05-28 05:56 we are near the point that sata is old because you should nvme 2021-05-28 05:57 ahci is almost old 2021-05-28 05:58 on emulator, sure, all that doesn't matter 2021-05-28 05:58 yah 2021-05-28 06:22 man, what a shitshow on freenode. 2021-05-28 06:25 Some nobody going by CrystalMath is trying to convince people that they want to fix stuff over there 2021-05-28 06:25 lolsuuuuuure 2021-05-28 06:26 they're still trying to work on it? 2021-05-28 06:26 Oh, they're legit trying to help fix things? 2021-05-28 06:26 Considering that dude was a biiiiig stallman defender, uh 2021-05-28 06:26 yeah, i had a long chat with them about the freenode thing trying to talk them down 2021-05-28 06:27 I'm thinking that dude might be a lost cause 2021-05-28 06:27 but eventually decided that seems that 90% of what they do is politically motivated one way or another 2021-05-28 06:27 and i just dont have any time to deal with it 2021-05-28 06:27 even osdev was all about 'i dont trust this' or 'all things must be built from individual atoms' etc 2021-05-28 06:27 sure, i get it, but.. jeez only so much time in the day 2021-05-28 06:27 I'm not even sure what their ideology is. Paranoid electroprimitivism. 2021-05-28 06:28 yah basically 2021-05-28 06:28 With a side dose of libertarian anti-regulation 2021-05-28 06:28 right 2021-05-28 06:28 I just log on to say hi to folks and it's like all of a sudden klaxons blaring about some schism. I wasn't really expecting that on freenode 2021-05-28 06:28 (or Big L Libertarianism, if you want to tie it to an affiliation) 2021-05-28 06:28 MarchHare: yah, sorry about that. at least you found us. most of the usuals migrated here within a day or two 2021-05-28 06:28 as did most other channels i hung out in. and by and large it's pretty much business as usual 2021-05-28 06:29 Yeah, I haven't been as super active lately anyway 2021-05-28 06:29 MarchHare: Definitely, I was expecting a "microsoft buys github" situation and not "the bitcoin billionaire crown prince of south korea turns freenode into an experiment in how long it takes to destroy an IRC network" 2021-05-28 06:29 Crown Prince Lol that guy really got full of himself, huh? 2021-05-28 06:30 random local band i stumbled upon literally on TV the other day: https://youtu.be/tQC3TnGlHgA 2021-05-28 06:30 ​'Industrial Revelation - The Lake - Live on Band in Seattle' by Band In Seattle (00:05:55) 2021-05-28 06:30 it's a stock chord progression but that drum/bass groove is smooth 2021-05-28 06:30 Seriously...most IRC users don't even concern themselves with high level server politics. If I have to fool with that stuff, count me out. 2021-05-28 06:30 My understanding is that for at least one branch of possible successors to a long-dead emperor, he is "crown prince" 2021-05-28 06:31 Oh, you mean an imperial dynasty that ended in 1911 or so? 2021-05-28 06:31 But that's like saying that because one of my three-greats grandfathers was a noble bastard, I'm the crown prince of Ireland 2021-05-28 06:31 heh or maybe the Kim family that happens to run NK 2021-05-28 06:31 Which got succeeded by two separate countries with officially recognized governments... 2021-05-28 06:32 yah totally. eing related to some distant monarchy just causes my eyes to involuntarily rotate 2021-05-28 06:32 We're all nth removed from someone important 2021-05-28 06:32 really any amount of rank-pulling i find to be completely distasteful 2021-05-28 06:32 like kevin bacon 2021-05-28 06:33 Six Degrees of Queen Elizabeth 2021-05-28 06:33 Kevin Bacon is imminently taseful! You take that back! 2021-05-28 06:33 ha 2021-05-28 06:34 oh heh i mean six degrees 2021-05-28 06:34 bacon is also very tastey 2021-05-28 06:34 I'm sure Kevin cooks a mean bacon 2021-05-28 06:34 Too late. Thems fightin words. We gonna fight now 2021-05-28 06:34 oh no 2021-05-28 06:34 are we going to netsplit the server now? 2021-05-28 06:34 everyone forced to take sides 2021-05-28 06:34 Our fight will split networks! It will be remembered for decades! 2021-05-28 06:34 pro-bacon, and rabidly-pro-bacon 2021-05-28 06:36 bacon.net:6667 2021-05-28 06:37 Come to think of it, I don't think I've seen a net split for several years now. Don't those still happen? 2021-05-28 06:38 Oh, yeah 2021-05-28 06:38 yeah i think a lot of clients just hide it 2021-05-28 06:38 We've had a few here since the network started, mainly when servers got too full and they had to spin up more 2021-05-28 06:38 eyah even freenode would netsplit every once in a while, restarting servers, etc 2021-05-28 06:38 any sort of rehubbing, etc 2021-05-28 06:40 I remember undernet used to split all the time. 2021-05-28 08:31 doug16k: do you know the gdb remote protocol well? It looks like the debugee can sent the equivalent of writes to stdout over to the debugger via O packets, but how does the debugger send data the other way? 2021-05-28 08:31 Maybe there's a packet type I overlooked? 2021-05-28 08:32 I don't think so 2021-05-28 08:32 :( 2021-05-28 08:32 there is a file transfer protocol you could use 2021-05-28 08:32 yeah 2021-05-28 08:33 If there isn't I was thinking of hacking something up where if the vm guest (the debugee), probes the data available flag, we send a file IO packet which is a read of one byte, anticipating that they will read the data immediately 2021-05-28 08:33 But I don't think we can guarantee that? 2021-05-28 08:34 so it's a read of one byte from the debugger's stdin 2021-05-28 08:34 but it's goofy because in posix you can't probe a pipe to see if data is available before doing a read 2021-05-28 08:34 so I'm not sure how to handle that because the debugger will block I think 2021-05-28 08:35 can't you do that with the aio stuff? 2021-05-28 08:35 poll should do it no? 2021-05-28 08:35 @moon-child the gdb file IO API surface is very small. It's basically open, close, read, write, seek 2021-05-28 08:36 goal is to send commands to a serial REPL from gdb? 2021-05-28 08:36 yeah 2021-05-28 08:37 you can make up your own command 2021-05-28 08:37 yeah I was thinking along those lines 2021-05-28 08:37 or just send the O command the wrong directoin 2021-05-28 08:37 but I'd need to teach gdb about that 2021-05-28 08:38 maintenance packet qmadeup.sendinput ls 2021-05-28 08:38 no you don't 2021-05-28 08:38 No? 2021-05-28 08:38 maintenance packet puts a gun to its head and sends a command you made up entirely 2021-05-28 08:38 qemu uses it 2021-05-28 08:39 qemu needed a way to control whether step masks hardware irq 2021-05-28 08:39 normally step will drive you nuts with irq enabled because by then the timer fired 2021-05-28 08:39 so it by default masks irq on step 2021-05-28 08:39 you override it with this command they made up: maintenance packet qqemu.sstep=5 2021-05-28 08:40 qqemu.sstep=5 is handled by the gdbstub 2021-05-28 08:40 so just make up a qwhatever.sendinput command 2021-05-28 08:41 oh shit 2021-05-28 08:42 you could wrap it in a macro to make it look nice 2021-05-28 08:43 gdb protocol is inherently extensible and forward compatible 2021-05-28 08:43 So if I do that does it turn into something like $qqemu.sstep=5#00 where 00 is the checksum? 2021-05-28 08:43 if you sent maintenance packet qlmfao.madeup=42 to a stub, it would just reply empty string 2021-05-28 08:44 nice 2021-05-28 08:44 okay let me go try that with wireshark running 2021-05-28 08:44 it turns into hex encoded 2021-05-28 08:44 iirc 2021-05-28 08:45 ah wait 2021-05-28 08:45 not sure with that command. might be raw 2021-05-28 08:45 yeah it should turn into what you said 2021-05-28 08:46 wireshark? 2021-05-28 08:46 you are talking to the person that sent the pull request that added gdbstub tracing to qemu 2021-05-28 08:46 -trace 'gdb*' 2021-05-28 08:46 yeah I was looking at the protocol under wireshark to make sure I understood it 2021-05-28 08:46 nice 2021-05-28 08:46 it will decode it to some extent 2021-05-28 08:46 I made the event names tell you a good bit 2021-05-28 08:47 can just poke at gdb's and see what happens 2021-05-28 08:48 I love how practical the protocol is 2021-05-28 08:48 yeah 2021-05-28 08:49 ah are you connecting to your own stub? 2021-05-28 08:49 I do think that the way it encodes everything in hex is kinda inefficient. It's very simple, but we're talking slow transports to slow devices 2021-05-28 08:49 Yeah, I'm writing the stub. 2021-05-28 08:49 do you have compression? 2021-05-28 08:49 I've written a bunch of it 2021-05-28 08:49 I see that there's run length encoding support 2021-05-28 08:49 yeah that 2021-05-28 08:49 Yeah, I haven't written that yet 2021-05-28 08:49 if you want speed, add range stepping 2021-05-28 08:50 range stepping? 2021-05-28 08:50 I don't know how fast what I have is 2021-05-28 08:50 goes from "oh man step is visibly slow" to "whoa just like local" 2021-05-28 08:50 frankly I haven't wired it all all up yet 2021-05-28 08:50 I mean over actual serial 2021-05-28 08:51 oh range stepping as in sADDRESS? 2021-05-28 08:51 range stepping gives gdb a way to say "step, but you better not stop until you are outside this range here" 2021-05-28 08:51 so gdb singlesteps, looks and realizes, uh oh, too soon, steps, and it repeats, until it is outside the range, THEN sends stop packet 2021-05-28 08:51 without it, it does an individual instruction and round trip where client steps again and again and waits for each step 2021-05-28 08:52 Yeah yeah, yikes 2021-05-28 08:52 so step at prologue could be 5 seconds 2021-05-28 08:52 in printf or something with insane prologue 2021-05-28 08:52 any stdargs 2021-05-28 08:52 but range step will tell it step over this whole pile of crap, and it's one round trip to next line 2021-05-28 08:54 thing of range step line an anti-breakpoint range. break everywhere *except* in this range 2021-05-28 08:54 I have code to handle it, but we're at an "it compiles" stage. I'm still figuring out how the protocol works and stuff. And I want to make the stub a reusable library which I can link into my kernel, and this hypervisor, but there are so many target specific actions that I'm winding up with an unwieldy API surface. 2021-05-28 08:54 entirely on gdbstub side 2021-05-28 08:56 do you send target xml? 2021-05-28 08:56 not right now 2021-05-28 08:56 I wanted a minimal feature set to do my thing 2021-05-28 08:56 but what is the target xml all about? 2021-05-28 08:56 it tells it how your register packets are laid out 2021-05-28 08:56 Does it rescribe the register layout or something? 2021-05-28 08:57 Ahh 2021-05-28 08:57 and creates those magic variables you can use from gdb, like $eflags, $rax, etc 2021-05-28 08:58 I sent a fix for broken register display and added a bunch of system registers 2021-05-28 08:58 I reverse engineered most of it via wireshark, and then looked at your stuff when I had this giant unknown block in the middle which turned out to be the floating point state 2021-05-28 08:58 And then found the target xml file in the gdb source you reused 2021-05-28 08:59 you can use $cr0, $cr2, $cr3, $cr4, $efer, $fs_base $gs_base, $k_gs_base to get at the stuff because I added them to the target description 2021-05-28 08:59 yeah I ask because in a way it seems like work, but in another way, it's easier 2021-05-28 08:59 Oh you did that? Thanks. 2021-05-28 08:59 doug is basically solely responsible for qemu being usable for debugging a guest OS 2021-05-28 09:00 damn thanks 2021-05-28 09:00 Yeah I was just reusing that structure, and then setting anything I didn't handle yet as xxxx like it says I can in the spec 2021-05-28 09:02 yeah, it's neat that the stub has a way to say "I don't know!" when reading a register 2021-05-28 09:03 Question: if I allocate a fat stack buffer for all of this, but then it turns out that qemu send too much data for me to unpack into the buffer, what's the right way to handle that? An empty response? 2021-05-28 09:04 if you fail hard, you should send a reply that begins with E (must be uppercase) 2021-05-28 09:04 if you have no idea what command that is, you send empty response 2021-05-28 09:05 okay, I need to clean that up then, I was sending empty responses everywhere. 2021-05-28 09:05 also, any hex in your replies must be lowercase, so it isn't confused with error E 2021-05-28 09:06 oh good point. I was using lower case hex, but wasn't sure if I needed to handle upper case 2021-05-28 09:06 let's say they want to add a hardware breakpoint, but maxed out. you reply E so gdb knows you didn't set it but you know how to set hardware breakpoints 2021-05-28 09:07 E then two digits 2021-05-28 09:07 which two digits? nobody knows 2021-05-28 09:07 I don't think it matters 2021-05-28 09:07 it looks like people try to send unix errno codes 2021-05-28 09:07 ah 2021-05-28 09:07 which is a nice convention even if those are a shitty interface 2021-05-28 09:10 yeah, usually you can pick an errno that is vaguely right 2021-05-28 09:16 eventually I should handle all of the multi threaded extensions because right now any core can receive these serial interrupts I think 2021-05-28 09:17 highly doubt it 2021-05-28 09:17 which means if you ask for the registers twice you may ask two different cores 2021-05-28 09:17 no on pic? 2021-05-28 09:17 what? 2021-05-28 09:17 Would the pic be configured to dispatch interrupts to just one core? Is that a sane thing? 2021-05-28 09:17 no 2021-05-28 09:18 why even use irqs? 2021-05-28 09:19 I don't think I want to be polling for packets constantly 2021-05-28 09:19 I mean, I could poll every vmcs timer exit 2021-05-28 09:19 constantly? you mean when the kernel is frozen in the debugger and nothing is running whatsoever? 2021-05-28 09:20 when the inferior is running it ignores serial 2021-05-28 09:20 That is a situation which doesn't sound as unreasonable as during the guest's steady state run 2021-05-28 09:20 that's why I dedicate a cpu to stub 2021-05-28 09:20 How do you break in with like ctrl+c? 2021-05-28 09:20 I route the serial IRQ to that cpu 2021-05-28 09:20 Why not have an irq driven design? 2021-05-28 09:20 Ah 2021-05-28 09:21 one of the reasons 2021-05-28 09:21 Well maybe I route that IRQ to the bootstrap core 2021-05-28 09:21 and then can send ipis over to the sibling cores when I need them to do stuff 2021-05-28 09:21 if it is PIC IRQ, it is going to bootstrap cpu, period 2021-05-28 09:21 if it is IOAPIC then you can pick which cpu it goes to 2021-05-28 09:22 right 2021-05-28 09:22 irq won't randomly go to whatever cpu 2021-05-28 09:22 you could make it do that. if it hurts when you go like that, don't go like that 2021-05-28 09:23 tbh I don't know which interrupt controller uefi is using now but edk2 has code to handle both. 2021-05-28 09:23 you know what? it would be way cleaner to put the guest on an AP 2021-05-28 09:24 then you can just use plain UEFI APIs to access com port 2021-05-28 09:24 I use NMI to break into other cpus and send them commands when they are frozen 2021-05-28 09:24 unstoppable 2021-05-28 09:24 okay yeah 2021-05-28 09:24 there is even an API in UEFI to launch a function on an AP 2021-05-28 09:25 yup that's how I take over the sibling cores when bringing up the hypervisor 2021-05-28 09:26 goes gdb know how to speak pdb? Clang is emitting a pdb for the uefi driver 2021-05-28 09:26 no 2021-05-28 09:27 the feasibility of making a tool to do that is way higher now, microsoft opened up the file format 2021-05-28 09:27 could probably get crappy symbols with line numbers, good luck converting enough to get locals/register variables 2021-05-28 09:29 you told clang to build a windows program? 2021-05-28 09:29 oh slick it looks like clang is already embedding dwarf info into the PE 2021-05-28 09:29 yeah clang is building the uefi app 2021-05-28 09:29 That way I don't have to use the MSVC toolchain on linux or osx 2021-05-28 09:29 use this to see if you have good info: objdump --dwarf your-kernel 2021-05-28 09:30 yup 2021-05-28 09:30 slick 2021-05-28 09:35 oh shit there are maintenance packets to read physical memory from the target 2021-05-28 09:35 damn 2021-05-28 09:35 I was missing that 2021-05-28 09:36 will make it much easier to debug when I fuck up my page tables again :P 2021-05-28 09:44 you can also use this command: monitor xp /42gx 0x42424000 2021-05-28 09:45 dumps 42 64-bit values (g) as hex (x) 2021-05-28 09:45 eXamine Physical 2021-05-28 09:46 also, monitor info tlb 2021-05-28 09:46 word. 2021-05-28 10:01 really need to get gcc cross built so I can put it on the thinkpad so I can debug my network utilities without having to reboot... 2021-05-28 10:04 Discover makes it out, offer comes in, request is getting lost, lots of wire traffic in between 2021-05-28 10:04 Yo klange 2021-05-28 10:05 yo sortie 2021-05-28 10:05 It's a beautiful day! 2021-05-28 10:05 it's okay, not fantastic, little cloudy 2021-05-28 10:05 It's a beautiful day! 2021-05-28 10:28 Ah, I see what I messed up. Now I get my ACK. 2021-05-28 10:29 Yay 2021-05-28 10:29 My irc network now has a watchdog to keep the cat contained in the VM 2021-05-28 10:29 It's been getting out instead of serving IRC clients 2021-05-28 10:30 Give me the weekend and I should be able to get my client connected on real hardware. 2021-05-28 10:31 Your time has been allotted. 2021-05-28 10:31 woot 2021-05-28 10:31 so it begins. i was working on getting telnetd working on LK now 2021-05-28 10:31 geist: https://twitter.com/raggi/status/1398062849491038209 ← Also this happened 2021-05-28 10:31 didn't completely get it working tonight but should be able to tomorrow 2021-05-28 10:31 ​twitter: @sortiecat You're making me want to stand up one on fuchsia, perhaps we should peer if I do :-) 2021-05-28 10:31 oh hella yeah. ircd on fuchsia FTW 2021-05-28 10:32 I might need a bit more than the weekend for solanum. 2021-05-28 10:32 * geist pokes raggi 2021-05-28 10:32 * sortie allocates klange another golden week 2021-05-28 10:32 Federation of osdev ircds 2021-05-28 10:32 Of course, the proper ToaruOS approach would be to write my own ircd... 2021-05-28 10:32 sortie: allocation failed, golden week exhausted 2021-05-28 10:33 j`ey: ulimit -G 2 2021-05-28 10:33 :3 2021-05-28 10:34 klange: that's kinda my point. LK/etc is very much 'dont port existing stuff, write new bits' 2021-05-28 10:34 so writing a new ircd is a bit more of an ask 2021-05-28 10:34 a client is one thing, an ircd is a bit more of a tall order 2021-05-28 10:34 Plus if we want to link 'em, well, they need to be powerful/compatible enough 2021-05-28 10:34 But whatever you prefer! It's about tinkering 2021-05-28 10:34 maybe i should write one in kuroko that stands a chance of being run anywhere 2021-05-28 10:36 yah possibly here too, but i'll probably just end up crashing your network 2021-05-28 10:36 but maybe can work up to that. would be fun to support a simple ircd 2021-05-28 10:40 morning all 2021-05-28 10:40 totally in for a network of janky homebrew ircds 2021-05-28 10:40 hey geist, congrats with the fuchsia 2021-05-28 10:43 oh thanks! 2021-05-28 10:43 just the first step, but its nice to finally get it out in the wild 2021-05-28 10:44 i was literally just checking my two home hubs to see if they got updated 2021-05-28 10:44 geist: how long were you working on fuchsia anyway? 2021-05-28 10:44 ... is it shipping to existing devices as an OTA update? 2021-05-28 10:44 oh i joined the project in mid 2015? 2021-05-28 10:45 klange: yep! 2021-05-28 10:45 probably the first time ever that an OS is literally being OTAed to a completely differnet OS 2021-05-28 10:45 That's kinda amazing. Are they running Android now? 2021-05-28 10:45 only a few news sites have picked up on that 2021-05-28 10:45 they're running castos 2021-05-28 10:45 it's linux based, but not android 2021-05-28 10:46 geist: oh right, right at the beginning sort of, nice 2021-05-28 10:47 ~.~. 2021-05-28 10:48 ssh trouble? 2021-05-28 10:48 heh yeah actually 2021-05-28 10:48 ~_~ 2021-05-28 10:48 well more specifically i just applied an update to one of my unifi switches 2021-05-28 10:48 and it didn't look like it recovered so i was trying to break out of ssh 2021-05-28 10:49 i eventually just closed the terminal and started a new one 2021-05-28 11:04 probably the first time ever that an OS is literally being OTAed to a completely differnet OS <-- Masterrcard OTAed ~60,000 servers in bank DCs around the world from Solaris to Linux a year back, so probably not quite the first time :-) 2021-05-28 11:06 (I wonder how large that system image was given that a bunch of them had to be upgraded over ~1mbit/s leased lines :-)) 2021-05-28 11:09 XgF: ah cute! 2021-05-28 11:10 interesting they must have been running on non Sun x86 boxes i guess 2021-05-28 11:10 or they switched to oracle linux or whatnoever that is? 2021-05-28 11:11 geist: Just a bunch of HP servers, from Oracle Solaris to Oracle Linux 2021-05-28 11:13 ah didn't know you were ever really allowed to run oracle solaris officially on non sun/oracle machines 2021-05-28 11:13 The x86 version is just licensed like a normal OS 2021-05-28 11:13 I guess at one point they were probably running SPARC boxes but some time in the relatively distant past they must have moved to Solaris/x86 2021-05-28 11:14 2021-05-28 08:13:32 [freenode] -!- mode/#osdev [-i] by lionman 2021-05-28 11:14 looks like staff are messing with the old #osdev 2021-05-28 11:14 he's not even in the room, and he is able to change modes 2021-05-28 11:15 it seems at least the founder was reset 2021-05-28 11:15 Thanks for the spying clever :) 2021-05-28 11:15 I totally cut off all my ties with freenode 2021-05-28 11:16 Who's the new founder? 2021-05-28 11:16 both air and Mutabah i believe 2021-05-28 11:16 That's something 2021-05-28 11:16 But the new regime won't allow redirections.. 2021-05-28 11:17 They're trying to save face by rolling back their idiocy from two days ago. 2021-05-28 11:17 and #freenode is now back to that special moderated mode 2021-05-28 11:20 Did you see the email that Andrew Lee sent to the Register? Scroll down to "Updated to add" https://www.theregister.com/2021/05/26/freenode_irc_takeover/ 2021-05-28 11:20 ​www.theregister.com: After staff revolt, Freenode management takes over hundreds of IRC channels for 'policy violations' • The Register 2021-05-28 11:22 sortie: Plan is that CrystalMath will set up a mirror bot 2021-05-28 11:22 If we're good with that here 2021-05-28 11:22 At the very least, the name #osdev will continue over there (with proper moderation) 2021-05-28 11:23 Honestly I think that's a terrible idea 2021-05-28 11:23 I agree, I think a split is just better 2021-05-28 11:24 I don't really want my messages sent back to the old regime 2021-05-28 11:24 Abolish the Korean Monarchy 2021-05-28 11:24 if they want to join, just join here 2021-05-28 11:24 it's not like matrix where there needs to be a bridge 2021-05-28 11:25 A point... 2021-05-28 11:25 we'll see how things go 2021-05-28 11:26 At least this is now the wiki-official place 2021-05-28 11:27 Freenode crossed a line when they mass stole channels by topic regex with false positives, no warning, no case by case consideration, not even reaching out to group registrations 2021-05-28 11:28 This is their abusive tactics 2021-05-28 11:28 i heard that one channel got banned for a topic of "not moving to libera" 2021-05-28 11:28 I'm in favor of whatever leaves that place scorched earth and lets users migrate here 2021-05-28 11:29 clever: Heck they even did it to our corporate channel for mentioning libera exists as an alternative 2021-05-28 11:29 corporate channel on freenode? 2021-05-28 11:29 You know, corporate FOSS 2021-05-28 11:30 for a particular project you mean? 2021-05-28 11:30 Yes 2021-05-28 11:33 ugh now there's #osdev and ##osdev over there 2021-05-28 11:34 with like 50-100 people. urgh. 2021-05-28 11:35 wait a mirror bot? like whatever we say goes to freenode #osdev? 2021-05-28 11:35 what about the other direction? 2021-05-28 11:35 i think they meant both ways 2021-05-28 11:35 ugh. no that's dumb 2021-05-28 11:38 ok, I assumed this had already been discussed 2021-05-28 11:39 Mutabah: I am not good with CrystalMath doing anything, actually. 2021-05-28 11:39 That's OK 2021-05-28 11:39 I guess I'm unwilling to let the good name of Freenode#osdev be sullied 2021-05-28 11:39 but All good with no bridge bot 2021-05-28 11:43 Mutabah: the good name of freenode itself is sullied :P 2021-05-28 11:44 yeah :( 2021-05-28 11:44 (maybe recovery wasn't the best idea... but it's done now) 2021-05-28 11:44 I think the best thing we can do for the "good name" of the channel is just accept that it is now here and be done with it. 2021-05-28 11:45 i think it's fine if they want to have a community over there too 2021-05-28 12:13 Freenode itself is sullied. Moving to libera is something almost every notable channel thus far has done. 2021-05-28 12:14 As long as the main site says libera, then the "good name" will have moved here. Not transformed, just moved. 2021-05-28 12:16 Unfortunately Andrew Lee has begun the process of scraping the nickserv/chanserv registries and taking over channels for whatever arbitrary "policy" he's implemented. This is exactly what the opers warned about :/ I'd rather see osdev here, not being a security threat to participants, and the active encouragement by the main site to move here, instead of potentially leading users astray into 2021-05-28 12:16 a server that is under malicious control all for nostalgia reasons. I think everyone is sad that Freenode is dying (dead) but that's no reason to keep using it if it's compromised. We wouldn't do that with anything else in the software world. 2021-05-28 12:16 Just my $0.02. 2021-05-28 12:17 +1 2021-05-28 12:31 junon: First I hear of messing with nickserv? 2021-05-28 12:59 klange: yeah, well I just switched server to libera and done... is there anything else to do ? 2021-05-28 13:01 nop 2021-05-28 13:10 hmm yes I can have multiple page directories 2021-05-28 13:10 seriously : thinking about mapping 0x8000 0000 to applications 2021-05-28 13:21 Woohoo I'm now self-hosting my irc.sortix.org IRC network with TLS on port 6697, signed by let's encrypt 2021-05-28 13:24 Hello, and congratulations, sortie! 2021-05-28 13:44 i disagree with the idea of keeping multiple channels on multiple servers, this will just diverge logs. I personally use the logs to checkout previous conversation/help. now we have two logs one at freenode and another in libera.chat 2021-05-28 13:45 + i believe that staying in freenode actually helps Andrew Lee believe what he is doing is right 2021-05-28 13:45 no we dont, globbot is dead 2021-05-28 13:48 seds: there are some people on andrews side. if we move here, i dont think we can have much say on what happens to that channel there! 2021-05-28 13:49 one problem i see, they are using total users, and total channels as metrics of health 2021-05-28 13:49 j`ey: yeah 2021-05-28 13:50 but a better metric, is the sum of how many channels a user is in 2021-05-28 13:50 some users (me), are leaving channels as they move, but have not 100% quit yet 2021-05-28 13:50 clever: i think a better metric would be the amount of messages a channel has, no? 2021-05-28 13:50 so i'm supporting the total-user metric 2021-05-28 13:50 seds: oh, thats also a good one 2021-05-28 13:50 bbl 2021-05-28 14:21 * gog meows 2021-05-28 14:23 Thanks Oli! 2021-05-28 15:38 sortie: opers on freenode sent out oper memos to all users to drop their nicks from the system before Andrew had full control of the databases to take emails/IP logs and whatnot as they suspected he might try to monetize the data or something of the sort. 2021-05-28 15:38 "oper memos" here isn't the right term, I forget what they're called - like MOTD but it goes out to all users as a notice across all channels. 2021-05-28 15:39 wall message? 2021-05-28 15:39 Yes, thank you - a wall message 2021-05-28 15:39 :D 2021-05-28 15:40 I can't remember what happened but chanserv was force-killed at least twice, too 2021-05-28 15:41 It was either by the now-libera staff in order to prevent it from being misused, or it was done by the new management for something malicious; can't remember, but that was the first sign things were going wrong. After that a bunch of people joined #freenode to see what was up, the staff sent their resignations out within the hour after that, and a few hours later libera was announced and the 2021-05-28 15:41 wall messages were going out. 2021-05-28 15:42 They warned andrew had intentions to scrape/modify/take over the services databases as they were the only centralized parts of the network and use the data for whatever he wanted. Now he's taking over chanserv and booting channels off and presumably has dumped nickserv as of a few days ago. 2021-05-28 15:49 dropping nicks would make no difference 2021-05-28 15:49 except you wouldn't log in so you wouldn't send your nickserv password in cleartext 2021-05-28 16:17 immibis: the concern was about data retention/privacy. Presumably, dropping your nick from nickserv meant your email would be purged and thus Andrew wouldn't have had that data to access after he took over - after which, there is little trust that he wouldn't mis-use, sell, etc. that data. 2021-05-28 16:17 When you register your nick you provide an email address. It also creates an association between email/IP address as well as your message content, etc. 2021-05-28 16:18 Considering the amount of spam I get, I think my public email address is thoroughly sold 2021-05-28 16:20 :D well I think the association is more valuable, especially to e.g. law enforcement. Remember that different people have different threat models, and IRC is one of the oldest forms of decentralized communication. Not everyone speaks in public channels, or in channels at all. 2021-05-28 16:21 I have always assumed that IRC channels are perpetually public, regardless of what the topic or +m status says 2021-05-28 16:23 A channel can be private or secret, depending on the level of secrecy the channel operator wants. Secret means it doesn't show up on /list, private means it cannot be /join'd without the password or without an invite (hence why /knock is a thing). Assuming there is no server-wide logging enabled, private channels cannot be snooped on without compromising the server/shard/network. 2021-05-28 16:23 Freenode (now Libera) staff claim Freenode didn't log private channels but that Andrew might start doing so, which violates a lot of peoples' threat models. 2021-05-28 16:24 you also need to ensure everyone is using ssl 2021-05-28 16:24 otherwise their connection could be mitmd 2021-05-28 16:24 but there's some channel mode you can use to enforce that 2021-05-28 16:24 yes that too, but generally speaking those individuals do that and IIRC there's a way to enforce it with a channel mode 2021-05-28 16:24 hopefully libera never gets compromised because i used my private email to register :/ 2021-05-28 16:24 i get no spam whatsoever on it lol 2021-05-28 16:26 I wonder if it's possible to snoop on service communications via a linked server. That would be cause for concern, because the second you query your own info to get the email on file, the malicious shard could sniff it potentially since IIRC your connection to the shard itself is over TLS but there's no e2e between you and the services. 2021-05-28 16:26 That's a good question actually. 2021-05-28 16:30 Okay just asked - yes leafs can see your messages in plaintext but all leafs are controlled by network staff. There is no third-party linking, idk why I thought they did that. 2021-05-28 16:31 So ring of trust is still with the libera staff to begin with. 2021-05-28 16:41 You can "fish" messages with a plugin, which would encrypt messages before sending them, and decrypt messages after receiving them to display; it works for direct messages, and if I recall correctly, I have been hinted at that it can work on channels too. 2021-05-28 16:43 andrew did say he wanted freenode to be federated.\ 2021-05-28 17:02 Any practical use for the cache disabled bit (feature) in the Page Directory Entry -structure? 2021-05-28 17:04 lol, I was thinking about the page table.. how paging worked.. I mistook it as a flat database of lengths :) 2021-05-28 17:04 actually it is more dynamic : a dynamic enough db 2021-05-28 17:04 but what happens if you map an area twice 2021-05-28 17:05 mmio? 2021-05-28 17:05 yeah, you cache-disable MMIO regions so whenever you read from or write to the MMIO you know you're *actually* doing a read/write on the device 2021-05-28 17:06 (though now that I think about it, maybe it's faster in some cases to leave caching on and clflush once you're done) 2021-05-28 17:06 (write-combining etc.) 2021-05-28 17:21 immibis: what andrew says and what he's doing are two very different things. 2021-05-28 17:21 caching mmio sounds like a recipe for disaster. I think I've seen MMUs with bits for write-through vs write-back cache though 2021-05-28 17:22 royalty tends to be not clear of mind due to genetic factors 2021-05-28 17:22 so you can at least know your writes are happening 2021-05-28 17:22 genetics are irrelevant when you bought your title 2021-05-28 17:24 he does apparently have blood relation to a historical korean royal family 2021-05-28 17:24 which does mean it's possible that he has an uncledaddy, knowing royalty the world over 2021-05-28 17:25 'related to' probably not it then. Hybrid vigour is a thing 2021-05-28 17:29 he's also the dude that ruined mt gox so 2021-05-28 17:43 thing about MMIO being cacheable is, even if it could work properly, the cpu can speculatively load from it when it shouldn't, whenever it feels like it 2021-05-28 17:44 even if program flow isn't even going to those instructions. could because of mispredict 2021-05-28 17:45 hmm good point 2021-05-28 17:45 though won't a mispredict cause a load anyway, even if cache is off? 2021-05-28 17:46 uc loads won't be dispatched speculatively 2021-05-28 17:47 cpu won't touch UC memory until it is 100% sure and all prior instructions retired 2021-05-28 17:47 ah cool 2021-05-28 17:47 I wonder if you could get around that by making an uncached mapping for reading and a cached mapping for writing? 2021-05-28 17:48 that would be UB I think 2021-05-28 17:48 some mixing of memory types screws up the cache coherency mechanism 2021-05-28 17:48 ah wait 2021-05-28 17:49 no that's for paging and mtrr conflicting 2021-05-28 17:49 in a not-fully-overlapped way 2021-05-28 17:49 yeah you can MTRR yourself into some bizarre situations 2021-05-28 17:50 cache disable on the page + non-writethrough on the page + write-combined on the MTRR is "probably write-combined, but who knows" 2021-05-28 17:51 there is a WT memory type to make it write thru, but cache loads 2021-05-28 17:51 PAT to the rescue 2021-05-28 17:51 if your cpu supports it ofc 2021-05-28 17:51 yeah I gotta start poking at PATs, preferably when I do my 64-bit core rewrite 2021-05-28 17:52 I don't *think* I'm losing much time if any to cache misses that could be fixed by twiddling caching bits but 2021-05-28 17:52 can't hurt to have the option available 2021-05-28 17:54 biggest jump you'll see is by mapping the framebuffer WC 2021-05-28 17:55 memory types are mostly for correctness, though 2021-05-28 17:57 I set mine up so when the PAT bit in PTE is 0, the PCD and PWT do what they are named to do. PAT bit on gets you access to WT and WC and WP 2021-05-28 17:58 yeah, I don't have a framebuffer so haha 2021-05-28 17:58 pfft. jraphics. 2021-05-28 17:58 then time spent in that will be close to zero :P 2021-05-28 17:58 * kazinsal lugs out a VT52 and yells 80X24 OUGHT TO BE ENOUGH FOR ANYBODY 2021-05-28 17:58 not zero though, quantum mechanics right? 2021-05-28 17:59 quantum framebuffer bit twiddling 2021-05-28 17:59 https://oxide.computer/ Looks interesting especially SmartOS+bhyve. But I don't see anything special about the rack or the "OS integration", opensource firmware is nice but am I missing something? 2021-05-28 17:59 ​oxide.computer: Oxide 2021-05-28 18:02 vin: <- works at Oxide 2021-05-28 18:02 that looks like someone came up with a nice HTML5 website to try to reinvent the concept of signed firmware and the intel management engine 2021-05-28 18:02 *sigh* I work at Oxide, not vin 2021-05-28 18:02 lol 2021-05-28 18:03 I guess maybe if they release their switch fabric ASIC drivers then it might give some other vendors a kick in the pants 2021-05-28 18:04 it's probably easier to think of an Oxide rack as an appliance that runs VMs 2021-05-28 18:04 wouldn't mind a somewhat modern switching ASIC being publicly documented 2021-05-28 18:04 kazinsal: I believe our intent is to make the switch stack open source including the P4 2021-05-28 18:05 the at cumulus are all "we're open source! look at us! it's a linux switch! no you can't see the ASIC driver, what are you, cheap?" 2021-05-28 18:05 kc8apf: nice 2021-05-28 18:05 kc8apf: whta do you do? 2021-05-28 18:05 j`ey: everything 2021-05-28 18:05 vague 2021-05-28 18:05 :P 2021-05-28 18:05 kc8apf: nice. I'm a network engineer, so being able to build actually functional whitebox switches is something I am interested in 2021-05-28 18:07 aren't those a thing that exist already? 2021-05-28 18:07 are they selling ones that don't work for people? 2021-05-28 18:07 you can buy whitebox switches but they only have one or two OS choices 2021-05-28 18:07 j`ey: well, I've done everything from decapping and REing LPC55 microcontrollers to validate their security claims before using them as a root of trust to designing auth federation w/ Active Directory to planning our overlay networking to fixing high CPU usage in Firefox caused by our website 2021-05-28 18:07 kc8apf: Nice. How is it different from having Mesos+ running on a bunch of blades? 2021-05-28 18:07 because nobody has ever open sourced or even open documented any modern switching ASICs 2021-05-28 18:07 kc8apf: oh yeah, i read the lpc55 blog post 2021-05-28 18:08 and as far as I'm concerned, "your choices are Dell's OS or Cumulus's OS" is not an open switch 2021-05-28 18:08 that's just vendor lockin from two angles instead of one 2021-05-28 18:08 if I wanted a linux based switch that I couldn't see the insides of, I'd buy a Cisco Catalyst 2021-05-28 18:09 btw, I loved On the metal. Looking forward to more episodes kc8apf 2021-05-28 18:09 not even if you pay them substantially? 2021-05-28 18:10 (that's not open obviously) 2021-05-28 18:10 i worked at a company that made blackbox switches using these asics 2021-05-28 18:10 vin: lots of ways. 2x100Gbps per node. Out of band management that works reliably and doesn't introduce dozens of security problems. Component-level fault detection and reporting. 2021-05-28 18:10 we had extensive but not very helpful datasheets. I don't think you could write an entirely free software stack even *with* all the datasheets. There's just too much damn complexity 2021-05-28 18:11 so there's this thing called the ONIE that is basically a busybox environment baked into some switches that you can use to install another OS. in theory you can install any OS you want, but in practice, there are two or three OSes that actually have ASIC drivers 2021-05-28 18:11 (however, you could use their sdk to write something that worked) 2021-05-28 18:11 like you could 100% install openbsd on an ONIE switch but it's not going to do anything and you won't even see any of the switchports 2021-05-28 18:13 while a lot of the Oxide team are ex-Sun, I come from Google's datacenter hardware group so I bring a lot of the hyperscaler thinking about operations and how that impacts hardware and software design 2021-05-28 18:13 even small switches seem to have tons of hardware registers and stuff. but that's probably the same as all hardware 2021-05-28 18:13 yeah thankfully everyone these days basically either shoves broadcom or mellanox ASICs in and calls it a day 2021-05-28 18:14 kc8apf: I am not selling HPE (diclaimer I used to work there) but https://h20195.www2.hpe.com/v2/GetDocument.aspx?docname=c04815113# Synergy+GreenLake provides the same features you described. 2021-05-28 18:14 ​h20195.www2.hpe.com: HPE Synergy 12000 Frame (QuickSpecs/c04815113.pdf) 2021-05-28 18:14 I think one of the only ones still doing some ASICs themselves is Cisco 2021-05-28 18:14 vin: yup. I know folks at HPE and we've looked at GreenLake 2021-05-28 18:14 and that's because they poured an enormous amount of money into UADP 2021-05-28 18:14 Except yes not an opensource firmware, but last I remember there were many internal projects that were looking to transition 2021-05-28 18:14 (fat lot of good the first version did though, the 3850 is the buggiest switch I've ever used) 2021-05-28 18:15 vin: we're aiming for a more public-cloud-like experience. We'll have an API with terraform provider, etc. 2021-05-28 18:16 more orgs doing disruptive stuff in the enterprise space is apprecaited 2021-05-28 18:17 hope y'all have some customers lined up already though because as someone who works in the enterprise space (albeit in canada, where our "medium-large enterprise" is america's "small enterprise"), a whole rack in one go is a hard sell 2021-05-28 18:18 kc8apf: Got it. Good luck! I hope to see more from Oxide in coming days. Because I believe the current iteration wouldn't be a strong enough challenge to enterprises that are already fighting for thin margins 2021-05-28 18:18 we've had a customer council since nearly the beginning and quite a few prospective 1st customers lined up. 2021-05-28 18:18 part of the reason why Tetration didn't really do so well is because it's a whole-rack private cloud system 2021-05-28 18:19 and selling someone on a drop-in replacement for their entire infrastructure is different than selling someone on a seven or eight-figure drop-in replacement for their entire infrastructure 2021-05-28 18:19 if anything, the hard part for a lot of enterprises seems to be extremely low power availability in their datacenters. We routinely hear 4-5kW max 2021-05-28 18:20 yeah, a whole Tetration rack is something like 24 kW 2021-05-28 18:22 (their documentation and model info sheets are crap too; quite pleased that oxide just lists "yeah this is how big it scales" on the front page) 2021-05-28 18:23 if it's 7763s then that's 7000 GHz total in a rack for 2048 cores 2021-05-28 18:23 one my coworkers was part of Nuova which became Cisco UCS so we've got a bit of that lesson around too 2021-05-28 18:23 that's pretty damn powerful 2021-05-28 18:23 haha, yeah, early UCS had some idiosyncracies 2021-05-28 18:24 current UCS does too, but the first few gens were weiiiiird 2021-05-28 18:24 will never forget the time that we were upgrading the OS on an FI and the AHCI controller went "no, I don't think I will" and scrambled the boot drive 2021-05-28 18:25 btw, if you _want_ to work on illumos, bhyve, firmware written in Rust, etc, we've been hiring a decent amount this year 2021-05-28 18:25 i do like rust 2021-05-28 18:25 and firmware 2021-05-28 18:25 kc8apf: I contributed to HPE OneView (UCS equivalent) long ago too ;) 2021-05-28 18:26 I try to keep my osdev at least directly separate from my work for conflict reasons. don't want to try to take something to market one day and have a handful of lawyers show up at my door 2021-05-28 18:26 kazinsal: yes, that's an issue for me too 2021-05-28 18:28 kazinsal: definitely understand. Oxide sold me on that not happening. 2021-05-28 18:29 we've all got our side projects with various level of intention of running them as businesses 2021-05-28 18:29 neat. eventually I do plan on releasing the NOS I'm working on, but it'll be a while before I can figure out if it's viable as a business or not 2021-05-28 18:30 currently it's performant enough for my own uses but I have a lot of work to do to get it usable in the wilds 2021-05-28 18:30 kc8apf: ah, y'all are running illumos? 2021-05-28 18:30 cool. Didn't know anyone was still using that for prod 2021-05-28 18:30 I am pursuing fulltime research right now. But the Oxide team line up differently seems like a fun bunch of people to work with. 2021-05-28 18:31 one of Oxide's components that is like more interesting to this crowd: https://github.com/oxidecomputer/propolis 2021-05-28 18:31 ​oxidecomputer/propolis - Rust-based userspace for illumos bhyve (7 forks/62 stargazers/MPL-2.0) 2021-05-28 18:31 *definitely 2021-05-28 18:32 I also am confident that I live in the wrong country to work for you :P 2021-05-28 18:32 kazinsal: we've got no restrictions on location, only working hours that somewhat overlap with US 2021-05-28 18:32 there is a very large, very guarded border (and the eldritch construction zone that is I-5) between me and the bay area 2021-05-28 18:33 one of these days I will managed to drive to Seattle without stopping in a construction area in Everett 2021-05-28 18:33 Only half the team is in the bay area. 2021-05-28 18:33 lol. I'm actually nearish Everett 2021-05-28 18:34 Ha! lots of PNWers here 2021-05-28 18:34 I'm in the frozen northern wastes of Vancouver 2021-05-28 18:34 no other icelanders here :( 2021-05-28 18:34 nice. I enjoy visiting B.C. 2021-05-28 18:34 or american-icelanders to be accurate :p 2021-05-28 18:35 after the borders open and we've all been jabbed sufficiently we're definitely going to need to hold an #osdev PNW meetup 2021-05-28 18:35 gog: i think me and froggy are the only UK ppl, since zid left 2021-05-28 18:36 kazinsal: hey I'm in vancouver too 2021-05-28 18:36 used to live near seattle though 2021-05-28 18:36 moon-child: wait, which vancouver 2021-05-28 18:36 (damn george and his multiple places being named after him) 2021-05-28 18:37 Anyone from midwest? 2021-05-28 18:37 kazinsal: canada 2021-05-28 18:37 oh cool 2021-05-28 18:37 I'm originally from NW Ohio ;) 2021-05-28 18:37 j`ey: heat too i think 2021-05-28 18:37 didn't know there were multiple YVRers here 2021-05-28 18:37 gog: hes Pt 2021-05-28 18:37 oh ok 2021-05-28 18:38 idk why zid left, we were just ribbing on him a little bit and he parted never to return 2021-05-28 18:39 Define "midwest". Does Idaho count? 2021-05-28 18:39 can't even remember what *caused* zid to leave tbh 2021-05-28 18:39 something similar happened in another channel I'm in. There were some harsh words on both sides, but it was not _that_ bad; and she left and hasn't been back since 2021-05-28 18:40 jiggawatts vs gigawatts 2021-05-28 18:40 junon: sorta? I mean, my coworker claims yes. 2021-05-28 18:40 idaho is in a quantum superposition of midwest and PNW 2021-05-28 18:40 ^ yeah okay, that's my impression as well, though when we think of PNW we think oregon/washington almost exclusively 2021-05-28 18:40 kc8apf: Depends who you ask. 2021-05-28 18:41 I think PNW eventually ended up expanding to cover northern california as well, which I'm okay with, because that implies that I'm geographically related to somewhere warm 2021-05-28 18:41 it's when people start including nevada in PNW that I start to wonder if they know what the word "pacific" means 2021-05-28 18:43 nevada is also in an awkward superposition of southwest and california 2021-05-28 18:45 don't let any Nevadans hear that 2021-05-28 18:48 i don't think i know any :p 2021-05-28 18:48 All the people I know who live in Nevada hate living in Nevada 2021-05-28 18:48 wait no there is a woman i'm casually acquainted with that lives in vegas 2021-05-28 18:49 but for one reason or another they are all trapped in Nevada 2021-05-28 19:00 Accurate. I hear "I escaped vegas" a lot. 2021-05-28 19:02 the only good things to come out of vegas are the killers and panic at the disco 2021-05-28 19:03 and fear and loathing in las vegas 2021-05-28 19:03 I have a friend who is a Vegas native, moved to Sacramento for work, and wants to go back to Nevada 2021-05-28 19:03 the buffet at the MGM grand is something that should be experienced at least once 2021-05-28 19:03 and at most twice 2021-05-28 19:04 gog: had to re-read that a few times 2021-05-28 19:04 lol 2021-05-28 19:04 i guess i'd like to go once just to see if my wife's betting system for roulette actually works :p 2021-05-28 19:04 although she prefers european style 2021-05-28 19:05 how can you have a system for a game that is entirely luck? or am I misunderstanding how roulette works? (casino games have never really interested me) 2021-05-28 19:06 roulette has enough different odds in betting that you can theoretically come up with good potential risk-rewards 2021-05-28 19:06 ^ 2021-05-28 19:06 really! interesting 2021-05-28 19:06 there are like 6 different types of bets you can make 2021-05-28 19:06 yeah, you're not just guessing a number, but also properties of that number 2021-05-28 19:06 column, row, cluster, color, even, odd 2021-05-28 19:06 even/odd 2021-05-28 19:06 two numbers nd one number 2021-05-28 19:06 Ohh I see 2021-05-28 19:07 so I suppose the more specific you are, the higher risk/reward 2021-05-28 19:07 yeah 2021-05-28 19:07 I didn't know that, figured it was just "32 black" like in the movies 2021-05-28 19:08 betting on a specific colour is a roughly 50% chance of winning (a little less beacuse of the house edge) 2021-05-28 19:08 same with eg. betting on the lower half of the numbers or on even 2021-05-28 19:08 but since you can bet, say, even black, then you have one bet on even and one bet on black 2021-05-28 19:08 and if it's a 32 then it's even, but it's red 2021-05-28 19:09 so you get a payout on the even bet but lose the colour bet 2021-05-28 19:09 so do you break even at that point? 2021-05-28 19:09 Or just lose a lot less? 2021-05-28 19:09 just slightly less than 50 because of 0 and 00 2021-05-28 19:10 0-only on european, both on american 2021-05-28 19:10 yeah, there's also the zero-pockets 2021-05-28 19:10 that's why my wife prefers european lol 2021-05-28 19:10 so on american tables your odds of winning a colour bet are actually 1 : 1-1/18 2021-05-28 19:10 er, on european tables 2021-05-28 19:10 on american it's 1 : 1-1/9 2021-05-28 19:11 gog: oy mate i'm from britain too innit bruv 2021-05-28 19:11 yes 2021-05-28 19:11 heat: chewsday 2021-05-28 19:11 the real test to see if someone's from britain is to gauge their interest in baked beans 2021-05-28 19:12 Nah, it's Jaffa cakes :P 2021-05-28 19:12 and ask what they think of teenagers being able to buy plastic butter knives 2021-05-28 19:12 makes sense 2021-05-28 19:12 w.r.t. roulette, I have no opinion on plastic butter knives 2021-05-28 19:12 99% of #osdev is north american and that's just a fact 2021-05-28 19:13 and also always awake for some reason 2021-05-28 19:13 sleep is a european thing 2021-05-28 19:16 I'm from Idaho but live in Berlin, I can confirm this 2021-05-28 19:17 wisconsin->reykjavik :p 2021-05-28 19:17 play ja ja ding dong!!! 2021-05-28 19:17 basically there are very few places that are open late and on weekends 2021-05-28 19:17 mostly restaurants and bars, few shops 2021-05-28 19:18 the nearest 24-hour grocery store is 3km away lol 2021-05-28 19:18 btw I've successfully set up a CMake + Clang cross-compilation configuration for osdev and remember that the wiki article was more or less empty for this, would that be something worth beefing up? 2021-05-28 19:19 I've not contributed to the wiki before so I wouldn't want to step on toes. 2021-05-28 19:19 * junon is shy 2021-05-28 19:19 can't hurt 2021-05-28 19:19 gog: Oo I am in southern wisconsin currently. Clearly the midwest cold wasn't enough :p 2021-05-28 19:20 i grew up west central 2021-05-28 19:20 closer to minneapolis than eau claire 2021-05-28 19:21 junon: cross compilation in general or for your own target? 2021-05-28 19:23 You're practically a Yooper. 2021-05-28 19:23 wrong side of the state 2021-05-28 19:23 heat: It's generic enough to be applicable to anything that would need to cross compile, namely the hello world kernel article and whatnot. 2021-05-28 19:24 It's certainly not trivial CMake config but it's not complex either. 2021-05-28 19:24 Ohhhh I'm thinking of Duluth for some reason :p 2021-05-28 19:25 junon, I also have a big OS-specific patch I've been thinking about doing a writeup on 2021-05-28 19:25 I've only been up there once, and that was enough :) 2021-05-28 19:25 on LLVM/clang 2021-05-28 19:25 that's still the wrong side of the state lol lol 2021-05-28 19:25 heat: I have a repo link if you want to peek. 2021-05-28 19:25 and duluth isn't even in wisconsin 2021-05-28 19:25 junon, sure 2021-05-28 19:26 here's mine: https://github.com/heatd/toolchains/blob/013d88714fd9c9fe0c8859a16e0d0f7086cb4524/llvm-project-12.0.0.patch 2021-05-28 19:26 ​github.com: toolchains/llvm-project-12.0.0.patch at 013d88714fd9c9fe0c8859a16e0d0f7086cb4524 · heatd/toolchains · GitHub 2021-05-28 19:26 yooper would be like north and east of green bay 2021-05-28 19:26 I enable every sanitizer and everything 2021-05-28 19:26 Ah I thought you said Minnesota hehehe 2021-05-28 19:26 oh lol 2021-05-28 19:26 duluth would be the "arrowhead" of minnesota 2021-05-28 19:27 I'm not going to run sanitizers, I'm actually in the process of incorporating full-on C verification as part of the build step 2021-05-28 19:27 Yeah, that's up there by the UP. 2021-05-28 19:27 yeah across a massive lake lol 2021-05-28 19:27 I suppose they could be enabled but the verifiers are the main show 2021-05-28 19:27 Well, it's as close as you can get without crossing into Cheeseville hehe 2021-05-28 19:28 the only notable thing I haven't implemented yet was sanitizer_stoptheworld 2021-05-28 19:28 _and_melt_with_you 2021-05-28 19:28 so /technically/ ASAN and friends don't work just yet 2021-05-28 19:28 the rest is there though 2021-05-28 19:29 My Family: "Hey, can I borrow your headphones so I can listen to this tabloid garbage on 11 without them?" 2021-05-28 19:30 heat: https://git.sr.ht/~qix/oro-kernel/tree/master/item/CMakeLists.txt closer to the end 2021-05-28 19:30 ​git.sr.ht: ~qix/oro-kernel: CMakeLists.txt - sourcehut git 2021-05-28 19:31 there's a bunch of cmake contrib stuff that isn't specifically related that's in another repo but yeah that's the gist of it. Can be simplified down quite a bit though. 2021-05-28 19:35 this has nothing to do with clang? 2021-05-28 19:36 It does - there's a clang check at the beginning. My config enforces compilation with clang for certain reasons. 2021-05-28 19:36 So the entire config assume clang. 2021-05-28 19:36 assumes* 2021-05-28 19:37 line 79 2021-05-28 19:38 I should eventually figure clang out 2021-05-28 19:38 ah 2021-05-28 19:38 maybe also de-gmakeify my makefiles 2021-05-28 19:38 i thought you were building it 2021-05-28 19:38 I've been saying that for several years now, kazinsal. 2021-05-28 19:38 define figure clang out 2021-05-28 19:38 Clang is a cross-compiler out of the box so there's no need to build it. 2021-05-28 19:39 wayyyyy easier to reason about than gcc imo. 2021-05-28 19:39 the big difference with clang is that you have --target= and then you specify the target you want 2021-05-28 19:39 (and pray it was built in) 2021-05-28 19:39 The Gordian Knot is easier to reason about htan gcc, junon. 2021-05-28 19:40 is i686-elf often built in? 2021-05-28 19:40 if you don't do --target it defaults to the host 2021-05-28 19:40 klysm yes 2021-05-28 19:40 I still have no clue how it all works, but it does so I use it. 2021-05-28 19:40 anything it supports is already built in 2021-05-28 19:40 klysm: probably one of the *nix i686's 2021-05-28 19:40 I don't think you can compile clang without support for certain targets. Certainly not the builds you get from official repos. 2021-05-28 19:40 * jimbzy is the worst os developer ever. 2021-05-28 19:40 They're all included. 2021-05-28 19:40 yes you can 2021-05-28 19:41 Oh okay, well there you go haha 2021-05-28 19:41 I disable them all except linux/mac and my own 2021-05-28 19:41 I hack on clang from time to time and have never seen the option for it, though the llvm clang config (well, the project structure as a whole) is anything but simple to understand. 2021-05-28 19:41 sorry, llvm cmake config* 2021-05-28 19:42 The community is very nice though, and always very helpful whenever you have to do something. 2021-05-28 19:42 also isn't the previous version of clang required in order to build clang? 2021-05-28 19:42 klysm: you can build it with gcc too 2021-05-28 19:42 you can build with clang or gcc. 2021-05-28 19:42 https://github.com/heatd/toolchains/blob/013d88714fd9c9fe0c8859a16e0d0f7086cb4524/llvm-project-12.0.0.patch#L158 2021-05-28 19:42 ​github.com: toolchains/llvm-project-12.0.0.patch at 013d88714fd9c9fe0c8859a16e0d0f7086cb4524 · heatd/toolchains · GitHub 2021-05-28 19:42 klysm, no 2021-05-28 19:43 junon: LLVM_TARGETS_TO_BUILD 2021-05-28 19:43 it's recommended that you use clang + lld to build it just because it's faster, not needed 2021-05-28 19:43 j`ey: interesting, thanks 2021-05-28 19:43 heat, it seems I came across something like that when attempting to install guix the first time 2021-05-28 19:43 heat: amusingly, gcc and clang are each faster when built with themselves than when built with the other 2021-05-28 19:43 i think they guarantee the previous version worked 2021-05-28 19:44 that could be it 2021-05-28 19:44 it would make sense at least 2021-05-28 19:49 moon-child: really? 2021-05-28 19:49 last time I tried to build gcc with clang it didn't even work 2021-05-28 19:49 Hey j`ey! How's things going with your project? 2021-05-28 19:50 What's the sitrep? 2021-05-28 19:50 h`ey j`ey 2021-05-28 19:50 jimbzy: well uh, not really going currently 2021-05-28 19:50 jimbzy: i want to work on a hypervisor a little 2021-05-28 19:50 heat: yeah https://wiki.alopex.li/LanguageCompilationSpeed#conclusions 2021-05-28 19:50 ​wiki.alopex.li: Wiki - LanguageCompilationSpeed 2021-05-28 19:51 Jobbing getting in the way? 2021-05-28 19:51 jimbzy: and just doing other hobbies 2021-05-28 19:52 I actually applied for a temporary position with the city here for the summer doing road maintenance. I need to replenish my vitamin D. 2021-05-28 19:52 I know that story, buddy. I've been messing around with the Godot Game Engine again for fun. 2021-05-28 19:53 and replrenish $$$ :P 2021-05-28 19:53 Yeah, that too. 2021-05-28 19:53 They pay morons like me pretty well to sweat our butts off all day ;) 2021-05-28 19:54 lol 2021-05-28 19:54 Im hoping I can re-use most, if not all, of the MMU code and the context switching code for my hypervisor 2021-05-28 19:54 That'd be sweet. 2021-05-28 19:54 right now it boots linux, but since I dont enable MMU, Linux can overwite my hypervisor 2021-05-28 19:54 I didn't know that. 2021-05-28 19:55 an hypervisor that can be overwritten is just a bootloader :P 2021-05-28 19:55 heat: :D 2021-05-28 19:55 ok, i wrote a bootloader, fine :P 2021-05-28 19:55 Whenever I read 'hypervisor' I think of my son wearing one of my golf hats. ;p 2021-05-28 19:55 lol 2021-05-28 19:59 "VxRail as Code: Empowering Customers with Cloud and IT Automation" christ these marketing seminars have the most buzzwordy fuckin names 2021-05-28 20:00 I would never be a great sales guy because I care about what things *mean* 2021-05-28 20:03 the serenityOS dude quit his day job 👀 2021-05-28 20:03 respect 2021-05-28 20:03 yeah, that's either an impressive level of dedication or a hell of a savings account 2021-05-28 20:04 kazinsal, lots of donations 2021-05-28 20:04 damn, didn't know there was a market for that 2021-05-28 20:04 me neither 2021-05-28 20:04 I think the videos got him really popular 2021-05-28 20:05 633£ a month on patreon and 150 github sponsors 2021-05-28 20:06 yeah 2021-05-28 20:06 so uh, probably not a massive salary 2021-05-28 20:07 yeah that'll cover a whole two thirds of my rent 2021-05-28 20:07 he did hit a goldmine of popularity though 2021-05-28 20:07 but he works on his OS, so that makes up for it :P 2021-05-28 20:08 reminds me I gotta check to see what my credit card bill is this month 2021-05-28 20:08 * kazinsal braces 2021-05-28 20:08 serenity OS has ~106x more stars than sortix 2021-05-28 20:09 and more than redox 2021-05-28 20:09 holy crap he defeated rust fanboys 2021-05-28 20:09 lol 2021-05-28 20:10 kernel features: survived the rust evangelism strike force 2021-05-28 20:10 serenityOS definitely has a lot of focus on UI type things 2021-05-28 20:13 which I think is what draws people in 2021-05-28 20:15 people love shiny UIs 2021-05-28 20:15 i do like serenity's windows d8 vibe 2021-05-28 20:15 98 2021-05-28 20:16 heat: Serenity doesn't have its own IRC network :) 2021-05-28 20:16 kazinsal: heh not a day goes by someone doesn't ask me or someone on the team why on earth zircon isn't written in rust 2021-05-28 20:17 as if there's an implicit assumptoin that of course you'd write it in rust 2021-05-28 20:17 well, why isn't it? 2021-05-28 20:17 exactly. 2021-05-28 20:17 at least some of fuschia is *_* 2021-05-28 20:19 “Frequently Asked Questions about SerenityOS” “Where are the ISO images? There are no ISO images. This project does not cater to non-technical users.” k 2021-05-28 20:19 shoulda named it grognardOS 2021-05-28 20:19 sortie: yeah, that was a bit sad 2021-05-28 20:19 it's that kinda implicit 'obviously rust is superior so why aren't you doing in rust' high and mighty that irks me 2021-05-28 20:20 like, christ, on a bike duder even openbsd provides an installation path that is so simple even my mother could work her way through it 2021-05-28 20:20 I mean, until fairly recently, "I want to Box this, but please return an error code if you don't have the memory for it" was not an API. 2021-05-28 20:20 there is no excuse for *any* open sores OS project to not have an ISO 2021-05-28 20:20 (and even now it's unstable) 2021-05-28 20:21 geist2: Right, without any effort to understand the constraints the project has 2021-05-28 20:21 I definitely believe in Rust for kernel development, but some things still need to be done. 2021-05-28 20:21 all I want in life are fuchsia images/ISOs 2021-05-28 20:21 maurer: I agree 2021-05-28 20:21 kazinsal: it doesn't make sense for all of them, come on. lots of embedded OSes out there where ISOs wouldn't make sense. 2021-05-28 20:21 kazinsal: (also, all the "library OS" type things.) 2021-05-28 20:21 okay but you can get an image of some sort for those 2021-05-28 20:21 heat: we can't publish those basically 2021-05-28 20:22 bandwidth is cheap, having my crappy laptop hack at a huge piece of software with 8 low powered CPUs is not 2021-05-28 20:22 hence why you wont see any official images. it's the downside of being a Big Company 2021-05-28 20:22 kazinsal: yeah, it's really silly. if you just want to play with it.. you dont want to spend hours getting a toolchain etc 2021-05-28 20:22 as far as I can tell serenityOS is lawyer-unencumbered 2021-05-28 20:22 geist2: :( 2021-05-28 20:22 there's some sort of implicit warranty or legalese if you actually publish an dev image, i think. not insurmountable, but not worth it right now 2021-05-28 20:23 so while it's within the serenityOS's guy's right to not publish prebuilt images, he's kind of a dick for not doing so 2021-05-28 20:23 if someone *else* does it i dont think there's an issue 2021-05-28 20:23 but honestly i may be talking out my ass there, but i think that's just a thing 2021-05-28 20:23 On the other hand, I'm unclear what you'd *do* with a fuchsia image if you aren't customizing it 2021-05-28 20:23 yah you can boot it and piddle with. but the main advantage is buiding and piddling 2021-05-28 20:23 tbh publishing prebuilt images is a bunch of effort and it's understandable not to if you're a small/single person dev team 2021-05-28 20:24 since it's not and end-user system in the tree 2021-05-28 20:24 that faq answer is uh dubious though 2021-05-28 20:24 froggey: yeah, but the qu.. 2021-05-28 20:24 yeah 2021-05-28 20:24 yeah 2021-05-28 20:24 froggey: I publish all my ISOs with CI 2021-05-28 20:24 and toolchains 2021-05-28 20:24 side note, SkyZ has apparently found us 2021-05-28 20:24 AH 2021-05-28 20:24 +b 2021-05-28 20:25 geist2: i assumed he would, he PM'd me right before joining 2021-05-28 20:25 why do I not get spammers? :( 2021-05-28 20:25 heat: I wonder if the serenityOS CI already makes an ISO 2021-05-28 20:26 yeah, they do some tests 'on target', so they probably have some ISOs they could publish :/ 2021-05-28 20:28 i would have no issue publishing an iso of my project or whatnot if i had anything to show off 2021-05-28 20:29 but like i said, i think if a *company* publishes and iso there's some implied warranty, etc 2021-05-28 20:31 maurer: that being said #fuchsia moved to oftc and i'd be happy to blab about it there 2021-05-28 20:31 i'm trying to be a bit more social media savvy and actually talk about the kernel and whatnot now that we're more public 2021-05-28 20:34 heat: you can make an imahe, just build then run `fx make-fuchsia-vol` against an image file of whatever size you want 2021-05-28 20:43 -void FreeNode(struct Node* node) 2021-05-28 20:43 +void LiberaChat(struct Node* node) 2021-05-28 20:43 Perhaps not what I intended 2021-05-28 20:44 0 2021-05-28 20:51 raggi: i know, but it takes lots of time here on my crappy laptop :( 2021-05-28 20:52 yeah, i'd like to play around with it too, but i dont want to build it 2021-05-28 20:54 it's the role reason why I can't try out the workstation product 2021-05-28 20:54 farthest I've built was core.x64 and that was painful 2021-05-28 20:56 "At the time of writing, I’m receiving a bit over $2000 in donations per month" serenity 2021-05-28 20:57 O_O 2021-05-28 21:05 heat: yeah i really wish it weren't so. 2021-05-28 21:18 geist2: you work on fu???a? (I can never spell it) 2021-05-28 21:18 yah 2021-05-28 21:19 * junon will have to remember to keep my anti-google remarks internalized :D 2021-05-28 21:20 I should download and build it 2021-05-28 21:20 see how long it takes on WSL1, I/O speed be damned 2021-05-28 21:20 kazinsal: forever 2021-05-28 21:20 I would upgrade to WSL2 but I tried that and it absolutely *ruined* VirtualBox performance 2021-05-28 21:20 because, yes, VirtualBox's hypervisor latency can get *worse* 2021-05-28 21:21 same. i had to make a binary choice there and decided to just remove all WSLs 2021-05-28 21:21 plus wsl2 + ssds apparently result in corruption 2021-05-28 21:21 that sounds like bullshit 2021-05-28 21:21 yep. hyperv and virtualbox and vmware do not work well together 2021-05-28 21:21 I dare not use it. WSL1 seems to work for me for the most part so I haven't felt the need to switch. 2021-05-28 21:21 they're *supposed* to but experience is it's not great 2021-05-28 21:22 I'm considering just running a dumb lightweight linux VM since sshfs and vscode apparently work together really well now 2021-05-28 21:22 so protip: dont reboot the switch your NFS server is sitting on while running VM disk images off another box on it 2021-05-28 21:23 oh man, yeah, I did that once 2021-05-28 21:23 ended up with a disconnected nfs connection which then resulted in all the VMs suddenly seeing RO disk images 2021-05-28 21:23 geist2: electric boogaloo? 2021-05-28 21:23 naw, i just had applied a unifi firmware update to my main switch 2021-05-28 21:23 "where did all these alarms from the netapp come fro-- ah shit." 2021-05-28 21:24 i mean what i *should* do is maintain a 10gbe network for the NFS box and put critical servers on a back network there 2021-05-28 21:24 which i might do some day 2021-05-28 21:24 then you hear the WHIIIIRRRRRRRRRRRR of a big core switch rebooting 2021-05-28 21:24 the fans in those 1U 40GbE switches are *loud* when the box boots up 2021-05-28 21:24 yah usually it's just a blip but since i'm using ehernet bonding on the nfs box it probably forgot that state and took a while to reestablish 2021-05-28 21:25 before the PWM controller is on and it's just shoving out "GO FULL TILT" until the POST is done 2021-05-28 21:25 yah you should hear this ARM workstation when it boots. takes about 3 minutes to post 2021-05-28 21:25 and the first 1.5m is all the fans running full tilt, and i think backwards 2021-05-28 21:25 oh wow, that's a long POST time 2021-05-28 21:25 it's like a loud vacuum cleaner 2021-05-28 21:25 some server grade stuff 2021-05-28 21:26 yah, it's baiscally a server mobo in a workstation case 2021-05-28 21:26 gotcha, gotcha 2021-05-28 21:26 it's doing stuff the entire 3 mintes, can watch te firmware on the serial port 2021-05-28 21:27 the first minute or two is it training the 16 DIMMs 2021-05-28 21:27 each gets about 8-10 seconds 2021-05-28 21:27 all this time the firmware hasn't been started on the PWMs... 2021-05-28 21:30 question: does anyone actually use Fedora? I have a copy of it in one of my VMs and it looks pretty slick 2021-05-28 21:30 but it's just such a different uiverse from the debian based distros i'm used to 2021-05-28 21:30 not since the Fedora Core era 2021-05-28 21:31 I think the biggest difference vs eg. Ubuntu is that Fedora doesn't include any blobs/proprietary drivers 2021-05-28 21:31 geist: was my daily driver until ~1 year go. pretty solid 2021-05-28 21:31 so if you need an nvidia thing you might be hosed unless nouveau/whatever is good now 2021-05-28 21:31 ah interesting 2021-05-28 21:32 not that i'm interested in changing, just curious 2021-05-28 21:32 it's a small thing but imo Fedora's installer is loads better 2021-05-28 21:32 i noticed, for example, that the software updater likes to reboot 2021-05-28 21:32 though it probably doesn't need to strictly speaking 2021-05-28 21:32 Ubuntu's graphical installer has always seemed to be in some way broken for me for fifteen friggin years 2021-05-28 21:32 but i guess it's not necessarily a *bad* thing if the users can tolerate it 2021-05-28 21:33 reboot, make sure all the libs are using the current version, etc 2021-05-28 21:34 iirc Fedora doesn't have an LTS either 2021-05-28 21:34 (sorry for the geist/geist2 stuff, giving irccloud a fair try here for a bit and see if i want to flip it over to my primary irc) 2021-05-28 21:34 presumably because they want you to use 2021-05-28 21:34 geist: Ampere? 2021-05-28 21:34 kc8apf: it's a cavium thunderx2 2021-05-28 21:35 ah, those are wonky 2021-05-28 21:35 basically one of the dual socket boards from supermicro 2021-05-28 21:35 in a workstation case, which is really mostly a like 3U server case on its side 2021-05-28 21:35 kc8apf: yah though totally great linux machine. what was your wonky experience? 2021-05-28 21:37 the individual cores are probably already outclassed by a new neoverse N1 or N2, but there are a lot of them and they're the only SMT ARM cores, and one of the few SMT4 cores anywhere 2021-05-28 21:37 so that's kinda interesting 2021-05-28 21:37 actually thinking about it I need to ask some of the Cisco folks what the plan is for UCOS 14.0 -- last I heard they were considering moving up to CentOS 8 but that's clearly not going to happen 2021-05-28 21:37 Less of a specific thing and more it just doesn't quite behave like anything else. ThunderX2 came around as EFI on ARM was starting to be a thing and Cavium did what they needed to to make it work 2021-05-28 21:37 kc8apf: yah thats true 2021-05-28 21:37 it does have a UEFI based award bios i think, but it seems a bit fiddly 2021-05-28 21:38 college friend of mine works on compilers at Cavium/Marvell. He knew the writing was on the wall for ThunderX3 2021-05-28 21:38 yah that makes me totally sad 2021-05-28 21:38 but i half expected the whole thing to be shut down the moment marvell got ahold of it 2021-05-28 21:39 we had a good relationship witht he cavium engineering folks. seemed like good people 2021-05-28 21:39 or seems. i dunno precisely what's going on over there right now except what's publically known, which isn't a lot 2021-05-28 21:40 the qemu monitor actually lets you save and load vm states from qcow2 files 2021-05-28 21:40 johnjay: yep! i was looking into that the other day 2021-05-28 21:40 this feeling of satisfaction.... it's so amazing 2021-05-28 21:41 unclear if you have multiple qcow2s which one it picks to save the VM memory image 2021-05-28 21:41 i guess the first one? 2021-05-28 21:41 and how it's stored, seems to be basically an unnamed section of the qcow2 alongside the snapshot of the existing disk image 2021-05-28 21:41 dunno. maybe the one it booted from? 2021-05-28 21:41 yah, possibly 2021-05-28 21:41 what happens with the TSC I wonder? 2021-05-28 21:41 that does remind me I need to figure out qemu networking 2021-05-28 21:41 one of the qcows definitely grows a bunch of data, approximately the size of a compressed memory image 2021-05-28 21:41 Octeon seems to have stagnated but then they come out with their new SSD controller which is all fancy 2021-05-28 21:41 and really just get back into using qemu in general 2021-05-28 21:41 kazinsal: that's something i've wanted to do since the first time i forwarded a port on it 2021-05-28 21:42 generally either i used user space networking for simple qemus or i create a tap for each one and bridge it with a host nic 2021-05-28 21:42 Feels like that whole generation of ARM server CPU vendors (Cavium/Marvell/Qualcomm) just gave up 2021-05-28 21:42 I need to basically have a 3-VM setup where one of them connects to the other two as well as the host nic 2021-05-28 21:43 so basically A <-> B <-> C, and also B <-> (real world) 2021-05-28 21:43 * heat can't bridge because he's on wireless 2021-05-28 21:43 kc8apf: yah the official word is they're focusing on vertical hyperscalars, but seems like most of the verital hyperscalars are just building their own cores, probably 2021-05-28 21:43 so kinda pinched in the middle there 2021-05-28 21:43 this lets me test A <-> C with B as the router, as well as A <-> (reality) and C <-> (reality) with B as the router 2021-05-28 21:44 so i dunno if that's all code for 'give up and blame the market' 2021-05-28 21:44 whereas i think ARM in the cloud world seems to be doing okay, it may go the way of apple and all big cloud/etc vendors just build their own silicon 2021-05-28 21:45 hyperscalers all tried to avoid building their own CPUs and all the vendors kept screwing up so badly the hyperscalers just bit the bullet and built cpu teams. 2021-05-28 21:45 which i guess i the ARM world isnt really new per se, since we've been dealing with ARM SOCs from tons of vendors for consumer hardware for ever 2021-05-28 21:46 There was a year or two where I was at Google looking at 3 different ARM processors and Microsoft was looking at the same parts. They were kinda promising until the vendors decided it wasn't worth it 2021-05-28 21:46 yah then the question in the hyperscalar space is do they make their own cores or license from ARM. in this case ARM is pushing hard by building a ton of server core designs 2021-05-28 21:46 so we'll see 2021-05-28 21:46 side note: they announced a pile of new cores last week, and i found manuals for most of them 2021-05-28 21:47 cortex-x2, neoverse n2, v1, cortex-a510, cortex-a710, etc 2021-05-28 21:47 that's something I love about the arm space and wish I had a reason to get into it 2021-05-28 21:47 suddenly, new cores! 2021-05-28 21:47 no big fancy gamer announcements or anything 2021-05-28 21:47 just, poof, here you go, play with these 2021-05-28 21:47 looks like their way of avoiding running out of numbers in te cortex-a space is to switch to a 3 digit system for the v9 cores 2021-05-28 21:48 geist: arm v9! 2021-05-28 21:48 arm gaming where? 2021-05-28 21:48 Cortex-X2 seems to be pushing toward FP performance. Ampere is moving away from ARM's cores to focus on integer performance. 2021-05-28 21:48 so they're starting over: cortex-a5xx and cortex-a7xx 2021-05-28 21:48 geist: also new mali GPUs! :D 2021-05-28 21:48 yah since v9 mandates SVE you'll start seeing more and more of these large vector units for better or worse 2021-05-28 21:48 HiSilicon has some interesting parts but they're impossible to get in the US 2021-05-28 21:50 shower question: does routing-specific software frequently use SIMD? 2021-05-28 21:51 network routing? 2021-05-28 21:51 yes 2021-05-28 21:51 kazinsal: yah and even more boring if you can see the sausage made in the arm partner meetings ad whatnot 2021-05-28 21:51 I guess maybe if a SIMD copy path is most efficient on a specific platform then it might but 2021-05-28 21:51 ARM plays a long game with all of this, which makes sense because it takes like 5 years to design a core 2021-05-28 21:51 being able to keep a single ipv6 address in a SIMD register has to have some obvious benefits no? 2021-05-28 21:51 so if you are privy to the roadmap it's all a matter of waiting years for things to show up 2021-05-28 21:52 not that I've seen. RIB->FIB is the computationally expensive bit 2021-05-28 21:52 or having going through 4 entries in a routing table in parallel 2021-05-28 21:52 so a lot of this is like 'ARM Finally mentioned that? yay now i can tal about it' 2021-05-28 21:52 geist: yeah. seems you get more actual computational bang for your buck, less marketing fanfare and more "here's this quarter's new tech, enjoy" 2021-05-28 21:52 yah so it's nice to see what things will lookl ike 5 years from now but it's all this huge pipeline of tech 2021-05-28 21:53 i think the GPU folks especially 2021-05-28 21:53 RIB->FIB isn't typically on the data path though so it doesn't get a huge amount of attention. Very unusual to be doing high rates of route updates. 2021-05-28 21:53 also huge pipelines in the cores :P 2021-05-28 21:53 but then it's also frustrating because low end vendors still punch out SOCs with 10 year old tech, so you have essentially this 10-15 year window of ARM tech that you have to think about or directly deal with 2021-05-28 21:53 the data path problem is usually solved with TCAMs 2021-05-28 21:53 is also why i'm generally so gung ho about ditching old ARM cores and moving on with life 2021-05-28 21:54 the next big hump for me personally is getting off of armv8.0 cores and onto at least v8.1 2021-05-28 21:54 TCAM and ASIC are the magic four-letter acronyms for "how do we make routing faster" 2021-05-28 21:54 but since socs still ship with cortex-a53 and -a72/-a73, nop. lots of v8.0 cores 2021-05-28 21:54 but they're also hardware jumps so 2021-05-28 21:55 * heat googles TCAM 2021-05-28 21:55 geist: yeah, seems to be the ARM equivalent to people still sitting on Sandy Bridge going "it's fine, it still clocks up to 4.5 GHz well enough" 2021-05-28 21:55 yah basically 2021-05-28 21:55 like sure but it's oooooooold 2021-05-28 21:55 what makes this faster? 2021-05-28 21:55 or nehalem 2021-05-28 21:56 heat: your routing lookup is now just "throw the address and netmask at the TCAM and the forwarding information comes back" 2021-05-28 21:56 v8.1 from an OS point of view brings new atomics (so you can rewrite all your spinlocs, etc) and stuff like A and D pagetable bits (though i think that's technically not an 8.1 thing) and stuff like PAN and whatnot 2021-05-28 21:56 its the new atomics that are a big thing, becaus now you need to choose to rewrite your spinlocks or patch or whatnot 2021-05-28 21:56 and it tends to be a big codegen switch 2021-05-28 21:57 kazinsal: not even your netmask. The T part of TCAM means you get don't care bits in the entries 2021-05-28 21:57 heat: instead of a binary lookup your options for each bit are 0, 1, or X 2021-05-28 21:57 where X is the "don't care", or a 0 in the netmask 2021-05-28 21:57 yeh 2021-05-28 21:57 kc8apf: yeah 2021-05-28 21:57 from quick glance v9 doesn't look like it's a huge deal breaker re: kernel forward compatbility. i *think* a v8 core would boot on it generally speaking without much trouble if any 2021-05-28 21:57 basically you're implementing the wildcard bits as a third ternary state 2021-05-28 21:58 i think the main reason for a v9 snapshot is the mandating of SVE, i suspect 2021-05-28 21:58 otherwise v9 is IIRC basically just v8.5 2021-05-28 21:58 TCAMs are just doing a 32-bit (v4) or 128-bit (v6) mask-cmp but doing it in parallel for every entry in the memory simultaneously 2021-05-28 21:59 build a TCAM large enough hold the full Internet routing table and you get single-cycle lookups for any address 2021-05-28 21:59 yep 2021-05-28 21:59 if you can't afford TCAM though your next best bet is a 256-way trie 2021-05-28 22:00 this will save you enormously on IPv4 but gets memory expensive in v6 land 2021-05-28 22:01 the good news is at that point you care enough to afford TCAM 2021-05-28 23:15 wow. if I do `objdump --dwarf kernel-generic >/dev/null` (using system objdump) I get 755 warnings like "objdump: Warning: There is a hole [0x10619 - 0x1061d] in .debug_loc section.", but if I use x86_64-dgos-objdump, no warnings. 2021-05-28 23:17 try your cross objdump before you start chasing system objdump warnings 2021-05-28 23:29 oh reminds me, i should try to build gcc 11 and see what happens 2021-05-28 23:30 * gog meows 2021-05-28 23:30 earth will explode 2021-05-28 23:30 no one shall build gcc 11.0 2021-05-28 23:31 * gog builds gcc 11 2021-05-28 23:37 build systems are horrible 2021-05-28 23:43 haha gcc 11 requires at least c++11 compiler, c++98 no good 2021-05-28 23:43 then gcc 11 is c++11 2021-05-28 23:50 building it too 2021-05-28 23:51 hunks failed :( 2021-05-28 23:52 hot 2021-05-28 23:55 * vdamewood gives gog a fishy. 2021-05-28 23:56 * gog chomps 2021-05-28 23:57 i didn't even know that standard C had standard attributes 2021-05-28 23:57 the square bracket kind like C++ got 2021-05-28 23:57 that's new 2021-05-28 23:57 C23 I think 2021-05-28 23:57 ok i thought so 2021-05-28 23:57 neat 2021-05-28 23:59 the way config.sub just blats out rows of names makes it hard to patch 2021-05-28 23:59 I have a mile long context, 7 lines. not even similar to 11 one 2021-05-29 00:01 | twizzler* screwed me up, he's after sortix 2021-05-29 00:24 my system is broken: /tmp/ccCaJAL3.s:29: Error: unknown .loc sub-directive `view' 2021-05-29 00:24 ^ I get that when I optimize and generate debug info on anything newer than gcc-7 2021-05-29 00:24 wish I knew how that happened 2021-05-29 00:28 omg something put `as` in /usr/local/bin 2021-05-29 00:30 fixed 2021-05-29 00:39 i feel so tempted to rewrite my rewrite of the build system 2021-05-29 00:44 what did you wish you did? 2021-05-29 00:45 i wish I never tried out gn 2021-05-29 00:45 it's cool and all but it's so fucking complex 2021-05-29 00:45 it lets you configure everything but you also need to configure everything 2021-05-29 00:50 all I want is a build system that's expressive and lets me depend on projects with other build systems 2021-05-29 00:52 hand made unified diff blocks are a fun to make 2021-05-29 00:59 I love forging things for some reason 2021-05-29 01:01 if you want your printout to look exactly like something, I love it 2021-05-29 01:04 I made payroll software and when I did the end of year documents (T4 in canada) I made it pixel perfect replica of the pdf you get off government site 2021-05-29 01:05 forgery is based 2021-05-29 01:06 they even had one of the field headings out of position a bit, I replicated that 2021-05-29 01:10 since then I have seen some other software's T4's, they look ridiculous 2021-05-29 01:11 so dumb the value in the field is touching the box enclosing it, and it's at far bottom left with a bunch of blank above and to right of text 2021-05-29 01:12 and box outlines are hairline - narrowest thing the printer can do apparently 2021-05-29 01:18 yay, 11.1.0 builds 2021-05-29 01:21 when I am going to try a new compiler, I always hope the warnings are better 2021-05-29 01:21 everything else is good enough 2021-05-29 01:28 it's too bad we hardly have a clue what the dimensions of a pixel are on most machines. on a printer you can do stuff with exact measurements 2021-05-29 01:29 and even when there is a field that says it, when you read it, you hardly believe it is correct anyway 2021-05-29 01:29 o 2021-05-29 01:29 it's there to just make you happy 2021-05-29 01:35 doug16k: oh god please tell me you didnt write ceridian 2021-05-29 01:36 didn't 2021-05-29 01:36 whew 2021-05-29 01:36 that friggin thing mangles my taxes every year 2021-05-29 01:37 is the t4 ugly? that'll tell you how much they care 2021-05-29 01:37 nah, it's pretty close to a real one 2021-05-29 01:38 ah they passed the 1st test of my gauntlet then :P 2021-05-29 01:38 not sure if it's perfect or not but the first time I saw it I went "huh, that's pretty good" 2021-05-29 01:38 you have seen the hideous ones right? 2021-05-29 01:39 it's like they just barely learned to put text in a position and draw horizontal and vertical lines 2021-05-29 01:39 default properties for everything. they select courier of course 2021-05-29 01:41 neat, building with gcc 11.1 breaks my efi bootloader. Load Error now 2021-05-29 01:42 yeah my previous job was like, heres some boxes in roughly the tight spots 2021-05-29 01:42 right* 2021-05-29 01:53 weird! suddenly my EFI bootloader loads at 0x140001000 instead of 0x400000 2021-05-29 01:54 oops, 0x401000 2021-05-29 02:07 no matter what I do, ld forces the base address of my efi bootloader above 0x200000000 2021-05-29 02:08 even .text 0x400000 : { ... doesn't do it 2021-05-29 02:08 you'd get 0x200400000 2021-05-29 02:10 interesting, actually above 4GB huh 2021-05-29 02:20 now I have to say -Wl,--image-base,0x400000 2021-05-29 02:21 haha new debug section names to delete, .debug_line_str .debug_rnglists 2021-05-29 02:22 whew. fixed 2021-05-29 02:32 not sure why but there seems to be some reason to do with address randomization to avoid preferred load address below 4GB 2021-05-29 02:33 on windows 2021-05-29 02:33 pep is windows emulation 2021-05-29 02:37 that's odd: 0 .text 0001784a 0000000000401000 0000000000401000 00000400 2**4 2021-05-29 02:38 funny file offset 2021-05-29 02:38 400 2021-05-29 02:38 why even be that aligned. might as well byte align it 2021-05-29 02:41 ah, must be 0x200 alignment, 512, sector 2021-05-29 02:44 good enough 2021-05-29 03:22 aww, I hate it when youtube starts getting mad and starts pausing stuff to see if I am watching 2021-05-29 03:22 don't worry youtube, I don't waste your bandwidth 2021-05-29 03:26 I've never had that happen 2021-05-29 03:27 it's from using it for music 2021-05-29 03:27 Not even when I fall asleep while watching on mobile, and wake up to it being much further down the playlist. 2021-05-29 03:27 maybe the ai thinks it is quite likely I am afk with music on 2021-05-29 03:28 it doesn't do it during interesting videos for me either 2021-05-29 03:28 hm 2021-05-29 03:29 polite music on youtube has a still picture and just uses sound bandwidth 2021-05-29 03:30 some videos would be entries into a dct artifact causing competition 2021-05-29 03:32 "let's make the entire screen change every frame" 2021-05-29 03:51 omg 2021-05-29 03:51 i do wonder if youtube has a special algorithm for encoding videos that are basically static 2021-05-29 03:52 or a short sequence of frames 2021-05-29 03:52 obviously can do keyframe + some number of deltas but seems like you could perpetually keep deltaing 2021-05-29 03:52 and ify ou seek, synthesize a new keyframe dynamically 2021-05-29 03:53 sounds like they should have something going on in that front 2021-05-29 03:53 internally, anywya 2021-05-29 03:53 there's a lot of videos that basically have one frame every 5 minutes 2021-05-29 03:53 maybe its' feature of the codec they use? 2021-05-29 03:53 possibly 2021-05-29 03:53 right, exactly. those static short loop things 2021-05-29 03:53 i'd be surprised if it's not optimised at all 2021-05-29 04:19 if you run it through the youtube music site or app they seem to just encode it as a regular ol' youtube video stream, just with no actual mp4 or vp9 in the stream. just AAC 2021-05-29 04:20 don't they use opus these days? 2021-05-29 04:20 At least the videos I pull with youtube-dl are almost always vp9+opus or h264+opus 2021-05-29 04:23 yah though question is does it serve the same stream in those cases 2021-05-29 04:33 stats for nerds says opus on this still frame music 2021-05-29 04:33 yeah, I get mp4a/aac in the music app 2021-05-29 04:33 so it's sending out a differently encoded stream for that 2021-05-29 04:34 ah I meant just youtube webpage on desktop on video that happens to be music with still video 2021-05-29 04:34 it transfers it in spikes, so it is difficult to say how much bandwidth it uses 2021-05-29 04:35 I think they use separate video and audio multiplexes, with DASH 2021-05-29 04:35 So, wouldn't surprise me if they just send an opus keyframe when the image changes 2021-05-29 04:36 er, vp9* 2021-05-29 04:36 and if the music app doesn't show video (I've not used it), they'd just request the audio stream 2021-05-29 04:37 watch the video, you'd get both. 2021-05-29 04:37 yeah 2021-05-29 04:37 youtube-dl -F can show you the list of streams 2021-05-29 05:12 oh wow, gcc 11 won't build the qemu source I have to info tlb prototype: ../qemu/util/qemu-thread-posix.c:520:5: error: ‘__sigsetjmp’ accessing 200 bytes in a region of size 72 [-Werror=stringop-overflow=] 2021-05-29 05:28 is this a new warning? 'int memcmp(const void*, const void*, size_t)' reading 12 bytes from a region of size 4 [-Wstringop-overread]' 2021-05-29 05:29 yah i saw something like that in LK too 2021-05-29 05:29 it's correct, I was cheating to look for GenuineIntel across 3 dwords by taking &cpuid_info.ebx 2021-05-29 05:29 haven't fixed it, but it seems more aggressive about spotting that sort of thing 2021-05-29 05:29 yah 2021-05-29 05:29 awesome 2021-05-29 05:29 was a piece of test code where via some path it ends up casting a smaller thing to a bigger thing. actually kidna surprised it never saw it efore 2021-05-29 05:31 I recently added a bunch of attribute((access(...))) stuff so I can't be sure if that helped or builtin memcmp knew enough 2021-05-29 05:32 ...and gcc upgrade made it work 2021-05-29 05:33 on that one, I have _access(read_only, 1, 3) _access(read_only, 2, 3) 2021-05-29 05:34 which expand to __attribute__((__access__(read_only, 1, 3))) __attribute__((__access__(read_only, 2, 3))) 2021-05-29 05:35 I think gcc 11 is responsible though 2021-05-29 05:41 3 memcmp will probably make codegen better anyway. probably just compares 2021-05-29 05:41 one for each of "Genu" "ineI" "ntel" 2021-05-29 05:42 so here's what i want: a packed attribute/pragma that also doesnt always mean 'assume you dont know the alignment' 2021-05-29 05:42 the two seem to be conflated in the compiler 2021-05-29 05:43 for eg. something that you know will always be packed but will also always be eg. word size aligned? 2021-05-29 05:43 yeah 2021-05-29 05:43 seems like it would be handy, yeah 2021-05-29 05:43 theoretically it might be misaligned it means 2021-05-29 05:43 so for example: riscv doesn't like unaligned stuff, fine. so for the tcp/ip stack i have to declare ip/eth/etc headers as packed 2021-05-29 05:44 fine. so i *could* for example just at the top of the function copy to a local versino of it that the compiler *knows* is at least aligned to something 2021-05-29 05:44 and then it can use somewhat nicer accessors 2021-05-29 05:44 like, for example reading a 32bit word that's 2 byte unaligned as two 16 bit words then reassembling them 2021-05-29 05:45 but short of literally redeclaring the structure with and without the packed attribute, and then manually copying between, and working with the unpacked ones 2021-05-29 05:45 i can't just copy one to another thats local (and alignde) 2021-05-29 05:45 the codegen still insists on doing everything byte at a time, always. 2021-05-29 05:46 are you saying riscv generates a sequence of byte accesses just because it is packed, even when aligned? 2021-05-29 05:46 yep 2021-05-29 05:46 oh no 2021-05-29 05:46 even when it *knows* it's aligned 2021-05-29 05:46 is the size aligned too? 2021-05-29 05:47 possible its jsut bad codegen on the compiler's case ndit just doesn't have the path to be smarter about it 2021-05-29 05:47 if the size isn't then packed makes it all misaligned 2021-05-29 05:47 but clang does the same thing, actually botches it worse 2021-05-29 05:47 yah but if i just make one struct locally, on the stack, the i'd assume it'd be smart enough to know the local alignment 2021-05-29 05:48 and override the 'i dunno how this is aligned' logic 2021-05-29 05:48 ah you mean the most trivial case is bad 2021-05-29 05:48 yah like struct { 16, 32 } __packed; 2021-05-29 05:48 it completely destroys that, byte at a time *every time* 2021-05-29 05:48 even if i declare one locally on the stack and use it 2021-05-29 05:50 it is thinking about the type, not the instance 2021-05-29 05:50 yah 2021-05-29 05:51 https://gcc.godbolt.org/z/q6njsjqGo behold 2021-05-29 05:51 taht's a simple pointer passed in, no idea 2021-05-29 05:53 this works(?): https://gcc.godbolt.org/z/osn6GMhvc 2021-05-29 05:53 2 helps too though 2021-05-29 05:54 that at least generates what i think it should 2021-05-29 05:54 alas, doesn't help because i can't control the alignment of the actual pointer but maybe can work with that 2021-05-29 05:54 then it really is bytes 2021-05-29 05:54 here's what i was hoping: soething like https://gcc.godbolt.org/z/xo1oPnj9c 2021-05-29 05:55 (which it doesn't do) 2021-05-29 05:55 but basically what if i made a copy to something local that it *knows* is 16 byte aligned and then work with it 2021-05-29 05:55 in this case it just optimizes away the memcpy 2021-05-29 05:55 that thing strikes again 2021-05-29 05:56 but.... -fno-builtin does what i want, because it forces the memcpy function 2021-05-29 05:56 https://gcc.godbolt.org/z/vaz4GT5hz 2021-05-29 05:56 don't have to go all the way to that. can -fno-builtin-memcpy 2021-05-29 05:56 note in tis case f2 = *f; also doens't work obviously, since it knows it's a copy and elides the second version 2021-05-29 05:57 yah this 'sees through the memcpy and uses the original pointer' is a real security issue. there's a story at work that something like that was found in 2021-05-29 05:57 ie, some ipc packet in shared memory was thought to be copied locally and used 2021-05-29 05:57 but compiler saw through the memcpy and accessed the shared buffer directly 2021-05-29 05:57 if it's shared then it should be _Atomic 2021-05-29 05:58 in which case the compiler would know it can't just access directly 2021-05-29 05:58 yah but you can't _Atomic an entire structure 2021-05-29 05:58 you added really_memcpy ? 2021-05-29 05:59 they* 2021-05-29 05:59 yep 2021-05-29 06:00 even https://gcc.godbolt.org/z/vaz3rMhxz doesn't work, because the compiler once again elides it 2021-05-29 06:01 OTOH this may not be a great case because to a certain extent it's still doing the bytewise copy. so it can't really simplify it that much 2021-05-29 06:01 there is (or, is proposed) memset_s, for zeroing out secrets. Maybe they should add an anologue for memcpy 2021-05-29 06:02 is there already constant-time strcmp and memcmp? 2021-05-29 06:02 are* 2021-05-29 06:02 I think not in std 2021-05-29 06:04 anyway you imagine my chagrin when looking at the codegen for this stuff 2021-05-29 06:04 it's no bueno. of coruse it's riscv's fault for not doing unaligned accesses, but it doesn't have to be *this* bad 2021-05-29 06:04 'risc is great for compilers' they said! 2021-05-29 06:07 it's tolerable when bad stuff like that is needed because it is really misaligned, but it could at least peek and see if it can drop the packed for a field access 2021-05-29 06:08 arm64 with the strict alignment switch on is about as bad 2021-05-29 06:08 except it has much nicer instructins for reconstructing the words 2021-05-29 06:08 https://gcc.godbolt.org/z/YYx8nvs67 2021-05-29 06:08 same as x86_64? nobody would turn on AC because compilers assume it is ok? 2021-05-29 06:09 (alignment check) 2021-05-29 06:09 well, -mstrict-align is a switch that tells the compielr to assume it can't 2021-05-29 06:09 the only real reason you'd do that on ARM is if you're running with the cache off 2021-05-29 06:09 I should try that on x86_64 2021-05-29 06:09 you can only alignment check user mode though 2021-05-29 06:09 so say you have some bootstrap code thats running pre-mmu or pre-cache, you'd compile it with this switch 2021-05-29 06:10 ah 2021-05-29 06:10 ocne you enable the mmu (and thus can enable the data cache) then youc an turn on full unaligned access on the cpu and never think about it again 2021-05-29 06:12 can't mstrict-align x86_64 2021-05-29 06:12 i think it's an arm64 specific flag 2021-05-29 06:12 seemed widely applicable enough. weird 2021-05-29 06:13 well, i guess it's on arm64 becausei t's mandatory in some cases 2021-05-29 06:13 on x86 it'd only be nice 2021-05-29 06:13 or interesting 2021-05-29 06:14 yeah, I was mostly curious to see what it would degenerate into 2021-05-29 06:17 ah, is it because back in the day you just fiddled with the bytes in an exception handler and said screw performance? 2021-05-29 06:17 I remember the thing being that they fix up misalignments in exception handler so it works, just hideously high overhead 2021-05-29 06:17 is that just specific to that 2021-05-29 06:17 hmm? 2021-05-29 06:18 whoops. built the toolchain in the wrong directory. time to do that again... 2021-05-29 06:18 geist, could you just throw misalignment at the kernel and it would emulate through it? 2021-05-29 06:18 some kernels did that, right? 2021-05-29 06:18 on what arch? 2021-05-29 06:19 68k? 2021-05-29 06:19 I think 2021-05-29 06:19 oh you mean generically. sure, but that'd probably be bad 2021-05-29 06:19 or alpha? 2021-05-29 06:19 but that's kinda the strategy for riscv now. the arch says 'a given implementation may or may not handle unaligned accesses, but it has an unaligned trap for it' 2021-05-29 06:19 which is pretty hand wavy way of saying 'dont do unaligned accesses' 2021-05-29 06:19 since trapping and emulating suuucks 2021-05-29 06:20 yes of course 2021-05-29 06:20 the trap means it makes it work at all 2021-05-29 06:20 when it would have failed 2021-05-29 06:20 traditinally classic ARM (pre armv5 or v6 or so) was actually worse 2021-05-29 06:20 an armv4 core (say arm7tdmi) would actually load the data around the address, swizzled 2021-05-29 06:21 according o a pattern. it was totally screwey, though of course folks used it as some clever byte swizzling thing 2021-05-29 06:21 basically it'd load the 4 byte word the start address was within, but i think put the byte yu were pointing to at the bottom of the register 2021-05-29 06:21 and then rotate around 2021-05-29 06:22 values near the pointer and values near the pointee? 2021-05-29 06:22 pointee 2021-05-29 06:22 ie, if you tried a 4 byte load at addrss 3 i think it'd fill the register with somethig like 2103 2021-05-29 06:22 or something weird like that 2021-05-29 06:23 ah 2021-05-29 06:23 anyway later arm revisions added a 'fault on unaligned access trap bit' and then later added a new bit to let you enable unaligned access 2021-05-29 06:23 that's an example of ARM playing a long game over the course of 10-15 years 2021-05-29 06:23 you have to handle it 2021-05-29 06:24 correction: if you want to say it is high performance you have to 2021-05-29 06:24 first add a chicken bit to disable the feature, then remove the feature, then add the anti featureenable bit, then in next revision make it mandatory 2021-05-29 06:24 by v7 the cores have to handle unaligned accesses except in specific cases (like the cache is disabled, or atomics) 2021-05-29 06:26 yah so i remember in around 2009 or so there was still a bit of a debate int he arm linux world if you should allow unaligned accesses in user space (ie, set the bit) or force user space to get their shit together 2021-05-29 06:26 i used to fall in the latter camp, but eventually linux kernel decided to default to the former and then it was all over 2021-05-29 06:27 more and more code just assumed it could unalign, and then you can't put it back in the bottle 2021-05-29 06:27 programs that do aligned accesses run faster 2021-05-29 06:27 you still win 2021-05-29 06:27 that was the idea, force code to do it right by causing a trap 2021-05-29 06:27 but linux decided to default to allowing unaligned code, so pretty quickly you get user code that doesn't work with strict alignment enabled 2021-05-29 06:28 yes 2021-05-29 06:28 so risc starting out the gate by making it implementation defined is of coruse going to be a problem eventually, but baby steps for them 2021-05-29 06:29 I remember trying alignment check on in windows 7. if you had a click for each misaligned access, it'd be a buzz 2021-05-29 06:29 never stops 2021-05-29 06:30 it's pointless to AC on x86 now 2021-05-29 06:31 nice thing though, -fsanitize=undefined strictly enforces it as much as hardware alignment check enabled 2021-05-29 06:31 it enables -fsanitize=alignment 2021-05-29 06:33 I had to fix multiple acpi things. seabios acpi has lots of misaligned stuff 2021-05-29 06:33 qemu U should say 2021-05-29 06:35 just taking the address of a structure that isn't aligned properly triggers it, don't even need to do an access 2021-05-29 06:35 using it in a pointer expression checks it 2021-05-29 06:36 it knows that can't happen. if that struct has an int in it, it's guaranteed addressof that struct is divisible by sizeof(int) 2021-05-29 06:39 geist, there is a warning for that. it can tell you every place it generates bad code. -Waddress-of-packed-member 2021-05-29 06:40 at least many places. maybe not every 2021-05-29 06:40 when you first mentioned it I thought you meant that, then realized you meant actual bad code from it 2021-05-29 06:40 from packed 2021-05-29 06:41 I avoid packed pretty hard now 2021-05-29 06:42 example: my 64 bit idtr struct is 3 16 dummy limits, then the real limit, then the base. no packed, pass addressof limit[3] if you know what I mean 2021-05-29 06:42 pass to cpu 2021-05-29 06:42 alignment isn't that hard. I wish more people understood it 2021-05-29 06:46 on past cpus it might take two accesses to access a dword so screw it, just 2 byte align. then you end up with stupid uint16 then uint32 struct 2021-05-29 06:50 if I ended up with uint16_t then uint32_t I'd see if I could pack pairs of them, so the two uint16's match the uint32 2021-05-29 06:51 fat12 does that :P 2021-05-29 06:53 You can always use access or functions that take byte arrays and spit out the proper unsigned type or whatever 2021-05-29 06:54 No need to fudge around with alignments while also allowing for structs to be clearer and without dummy values 2021-05-29 06:54 on riscv the compiler uses byte accesses on packed structs, regardless of whether that particular instance is aligned or not 2021-05-29 06:55 Classic Mac OS has 2-byte-aligned int32 fields all over the place 2021-05-29 06:56 Some on-disk formats are even 1-byte-aligned 2021-05-29 08:01 Woohoo, build server is up and running 2021-05-29 08:58 oh woot. anything special in your setup? 2021-05-29 09:06 nothing terribly special, no. though interestingly despite having fewer CPUs at less than half the clock rate, due to how slow WSL1's I/O is the build server VM is 50% faster than WSL1 2021-05-29 09:07 why not linux for a build server? if youre using WSl 2021-05-29 09:07 the build server is a linux box, yeah 2021-05-29 09:07 oh misread, got it 2021-05-29 09:07 replacing my previous WSL based build chain 2021-05-29 09:07 but it's still a VM? on a windows machine? 2021-05-29 09:08 nah, on an ESXi host 2021-05-29 09:08 cool 2021-05-29 09:08 so now I'm contemplating whether to go to bed (a smart idea) or continue fighting with this e1000e (a smart idea for later) 2021-05-29 09:09 e1000e from bed 2021-05-29 09:23 aha! I was punching the wrong rx tail into the thing. derf. 2021-05-29 10:17 kazinsal: stay up! keep at it 2021-05-29 10:17 never stop 2021-05-29 10:49 it's the weekend, no need to sleep 2021-05-29 12:55 good afternoon high intellect individuals 2021-05-29 12:57 :( 2021-05-29 12:57 thanks for excluding me 2021-05-29 13:29 good morning everyone 2021-05-29 13:29 >:O 2021-05-29 13:31 <:0 2021-05-29 13:40 everyone except gog of course 2021-05-29 14:48 i could be writing code and being productive but I'm stuck here looking at build systems ahhhhhh 2021-05-29 14:49 just use makefiles 2021-05-29 14:49 no 2021-05-29 14:49 makefiles are bad 2021-05-29 14:49 i know 2021-05-29 14:49 i will also never ever use autotools 2021-05-29 14:49 agreed 2021-05-29 14:49 autotools is very bad 2021-05-29 14:50 honestly i'm thankful that autotools exists 2021-05-29 14:50 do i want to write those autoconf files? hell no 2021-05-29 14:51 but it's really miraculous that i can go to some sparc system running 15 year-old solaris and still, `./configure; make all; make install` will work 2021-05-29 14:51 right now my options are: 1) GN, which I already more or less know how it works but is very googly and chromy; 2) Bazel, also very googly but simpler and way more widespread; 3) Meson, which is also used a bunch; 4) cmake, which is very widely used but fuck me the syntax is garbage 2021-05-29 14:51 what are you buildign 2021-05-29 14:51 my whole OS lol 2021-05-29 14:51 i tried cmake once and trying to massage it to build bare metal stuff is a little annoying 2021-05-29 14:51 hmm 2021-05-29 14:51 why have you just ruled out makefiles 2021-05-29 14:51 other than "makefiles are bad" 2021-05-29 14:52 because they are bad 2021-05-29 14:52 because...? 2021-05-29 14:52 very bare bones and solve absolutely nothing 2021-05-29 14:52 you're building an OS 2021-05-29 14:52 what do you need to solve 2021-05-29 14:52 he wants to depend on other build systems without knowing the details of the build system 2021-05-29 14:52 also that but 2021-05-29 14:53 if I want to add a package that depends on other packages, I'd like to do it seamlessly 2021-05-29 14:53 I want to add build targets without explicitly writing a whole bunch of boilerplate like you usually need to 2021-05-29 14:53 I want something 1) simple; 2) extensible; 3) scalable; 4) maybe ninja-capable 2021-05-29 14:54 i doubt you'll find something like that 2021-05-29 14:54 if you do let me know because i want it too 2021-05-29 14:54 as long as it doesn't start with "cm" and end with "ake" 2021-05-29 14:54 all the options I listed are more or less this 2021-05-29 14:55 cmake? simple? 2021-05-29 14:55 depends 2021-05-29 14:55 i despise cmake 2021-05-29 14:55 the only build system I listed that doesn't generate ninja files is bazel 2021-05-29 14:55 (what is GN btw) 2021-05-29 14:55 meson is really nice 2021-05-29 14:55 i can vouch for meson 2021-05-29 14:56 zhiayang: build system for chromium, v8, fuchsia, and a bunch of other build systems 2021-05-29 14:56 of other google projects I mean 2021-05-29 14:57 i see 2021-05-29 14:57 I wonder if scons would work for an OS 2021-05-29 14:57 i used scons in one of my very early experiments 2021-05-29 14:57 it was OK 2021-05-29 14:57 i was trying out going for gn but damn the complexity is overwhelming 2021-05-29 14:57 maybe i'm just old but i think make is a good level of abstraction sitting between "literally writing a shell script" and "the build system does everything for you" 2021-05-29 14:57 gog: i hated scons 2021-05-29 14:58 it's not great 2021-05-29 14:58 everything is so damn configurable but the issue is that you need to configure everything and I don't have insider access to gn nor chromium people 2021-05-29 14:58 the concern is that the "simpler" the build system gets, the more impossible it is to get it to do something that's not "normal" 2021-05-29 14:58 it was a little easier than cmake to get to make bare metal stuff 2021-05-29 14:58 but still suboptimal 2021-05-29 14:58 bazel is very samie in terms of syntax but way more widespread which is super nice 2021-05-29 15:03 Might not be exactly what you’re looking for but maybe xbstrap (https://github.com/managarm/xbstrap) can fill in at least a part of the role that you’re looking for. Managarm uses it to orchestrate the entire build process and afaik it works with all build systems (disclaimer, as a regular contributor to Managarm I might be slightly biased) 2021-05-29 15:03 ​managarm/xbstrap - Build system for OS distributions (7 forks/27 stargazers/NOASSERTION) 2021-05-29 15:07 MrBonkers: I would guess it mindlessly tries to rebuild every package? 2021-05-29 15:08 which is the only sane way the more I think of it 2021-05-29 15:09 wdym with mindlessly rebuild? 2021-05-29 15:10 you never get a "ninja: no work to do" 2021-05-29 15:10 Well no, if the package is already build it won’t rebuild it unless asked. On the ci server this is only the case when versions change, revisions are bumped or (for some packages, like the kernel and libc) a commit is pushed to master. Locally, that would only happen if the user requests it 2021-05-29 15:11 We do actually, managarm uses ninja for it’s own projects so unless reconfigured it will only rebuild what has changed 2021-05-29 16:48 i just had a great revelation: no bazel 2021-05-29 16:49 that requires java and fuck me if I need to port java to my OS 2021-05-29 16:52 heat: 1 down 2021-05-29 17:16 i hate this 2021-05-29 17:21 make is written in C (: 2021-05-29 17:22 though i suppose it isn't a lot of extra effort to get c++ 2021-05-29 17:22 i have C and C++ support lol 2021-05-29 17:22 my OS already exists 2021-05-29 17:22 i'm just trying to fix its deeply broken build 2021-05-29 17:23 are you looking for a build system to build your kernel or the whole distro? 2021-05-29 17:23 the whole thing 2021-05-29 17:24 right now I have a frakenstein of a thing that has the root build as a makefile, the kernel as a makefile, musl(libc) is a ./configure & make, large parts of userspace are gn but two or three big targets are really just wrappers around a PKGBUILD-like shell script that calls make 2021-05-29 17:29 i'd heavily recommend xbstrap 2021-05-29 17:29 it's the simplest way of building a custom distro 2021-05-29 17:30 it is in python tho but that also isn't too hard to port 2021-05-29 17:30 only one thing to do: write your own 2021-05-29 17:32 you can write your own script to generate a ninja script (you can also do that with make) 2021-05-29 17:32 that would be an unopinionated option 2021-05-29 17:32 Android had a Makefile -> Ninja thing 2021-05-29 17:40 Geertiebear, I would rather not depend on a custom tool that I don't control and is poorly documented 2021-05-29 17:41 heat: that's a fair point, documentation is lacking right now 2021-05-29 17:41 but properly building distro's is not too simple (to do elegantly) so in this case i'd much rather use xbstrap than roll my own 2021-05-29 17:59 https://i.imgur.com/5ITyiVI.png 2021-05-29 18:05 As far as bazel-likes go, Buck also requires Java. Pants v1 (https://v1.pantsbuild.org/) is fairly self contained and has moderate support for a variety of languages. 2021-05-29 18:05 ​v1.pantsbuild.org: Pants: A fast, scalable build system 2021-05-29 18:05 Then there is bitbake...... 2021-05-29 18:06 I've also seen Conda abused in all sorts of ways 2021-05-29 18:08 okay so I am still stuck on debugging this interrupt routine handler, a default one that just calls my printk... and I know it's not the IDT because it WAS working before I decided to try to pass the registers as a struct into the C function from an assembly function 2021-05-29 18:08 it's GPF-ing over and over 2021-05-29 18:08 code? 2021-05-29 18:08 hang on lemme paste it 2021-05-29 18:09 stack alignment? 2021-05-29 18:09 https://pastebin.ubuntu.com/p/DZyfCc5XYw/ 2021-05-29 18:09 ​pastebin.ubuntu.com: Ubuntu Pastebin 2021-05-29 18:10 I've sorted that out I think 2021-05-29 18:10 the whole stack alignment thing 2021-05-29 18:10 I've commented it as well 2021-05-29 18:12 void default_interrupt_handler(registers_t regs) 2021-05-29 18:12 { 2021-05-29 18:12 printk("Interrupt 0x20 called"); 2021-05-29 18:12 if(regs.int_no == 0x20) { 2021-05-29 18:12 } 2021-05-29 18:12 printk("This is the interrupt handler."); 2021-05-29 18:12 } 2021-05-29 18:12 push 0x0 does a null pointer deref 2021-05-29 18:12 this is my interrupt handler 2021-05-29 18:12 does that not push 0 onto the stack? 2021-05-29 18:12 no 2021-05-29 18:13 that would be push $0 2021-05-29 18:13 oh. 2021-05-29 18:13 woops 2021-05-29 18:13 OH. 2021-05-29 18:13 * nur ponders /nick nur_sucks_at_asm 2021-05-29 18:13 what you're doing in that function is possibly incorrect 2021-05-29 18:14 tip: 2021-05-29 18:14 do your pushad and all the other cute pushes everyone does, then align your stack and call your C code 2021-05-29 18:15 oh 2021-05-29 18:15 I honestly don't know how stack alignment works for stack-based argument passing so I can't help you there 2021-05-29 18:16 also, passing a pointer is way better than doing it by value 2021-05-29 18:16 but when the interrupt handler is called, the stack pointer could be anywhere 2021-05-29 18:16 why do the alignment after 2021-05-29 18:16 shouldn't it be before 2021-05-29 18:17 if you passed registers_t * to the interrupt handler, then you could easily realign the stack before calling it 2021-05-29 18:18 wouldn't the stack pointer need to point to where registers_t is at though 2021-05-29 18:18 pushstuff; mov %esp, %eax 2021-05-29 18:18 then align your stack and push %eax 2021-05-29 18:18 ^ 2021-05-29 18:20 you need it to be aligned after the argument push 2021-05-29 18:21 so I don't need to pad the struct then? 2021-05-29 18:21 no 2021-05-29 18:21 interesting 2021-05-29 18:21 easy way is to first make enough space for the most stack arguments you need, then AND esp with -16 to align it, then mov the arg to (%esp), then call 2021-05-29 18:21 let me try 2021-05-29 18:23 doug16k, I will of course need to save the original esp before I make this space right 2021-05-29 18:24 right 2021-05-29 18:24 in a callee saved register. ebx, esi, edi, or ebp 2021-05-29 18:24 handler will preserve it for you 2021-05-29 18:24 ah I was using eax 2021-05-29 18:25 and manually saving eax 2021-05-29 18:25 ebx is "safe"? 2021-05-29 18:25 if you pushed it 2021-05-29 18:25 well I can use eax too right 2021-05-29 18:25 why ebx, esi, edi or ebp? 2021-05-29 18:25 oh wait ebx is callee saved I think 2021-05-29 18:26 what is... callee saved 2021-05-29 18:26 a function that is called needs to preserve some specific registers to comply to the ABI 2021-05-29 18:27 where preserving means the called function pushes and pops it when it needs to use it 2021-05-29 18:27 ah and my called function is a C function that will do this 2021-05-29 18:27 yes 2021-05-29 18:27 NEAT 2021-05-29 18:27 I did not know this 2021-05-29 18:27 heat* 2021-05-29 18:27 well yes 2021-05-29 18:28 BUT I still need to push ebx before I use it in the interrupt handler because it might still be in use when the ISR was called 2021-05-29 18:28 and I can't just clobber it 2021-05-29 18:29 right? 2021-05-29 18:30 yes 2021-05-29 18:35 thanks 2021-05-29 18:35 let me try and wrap my head around why it might work 2021-05-29 19:14 question: does the frame pointer factor into this somehow 2021-05-29 19:20 no 2021-05-29 19:21 when the ABI says "the stack must be 16 byte aligned on function entry" it really means "the stack must be 16 byte aligned before the call instruction 2021-05-29 19:22 every function has an 8 byte(on 64-bit) stack-misalignment on its first instruction 2021-05-29 19:22 which usually gets fixed by the simple push %rbp 2021-05-29 19:23 on 32-bit the math is different but the concept is the same 2021-05-29 19:31 ah I see 2021-05-29 19:47 * gog meows 2021-05-29 19:50 * moon-child pets god 2021-05-29 19:52 don't touch god 2021-05-29 19:52 nur, you don't load ds or es with anything, and you forgot to cld 2021-05-29 19:53 user code could screw over that isr with this: xor %eax,%eax ; mov %ax,%ds ; mov %ax,%es ; std ; lol: jmp lol 2021-05-29 19:54 abi requires eflags.df=0 before call too 2021-05-29 19:54 and ds base == cs base == es base == ss base 2021-05-29 19:55 ds es usable 2021-05-29 19:55 * transistor meows 2021-05-29 19:56 need to move your kernel ds selector into ds and es and add a cld 2021-05-29 19:57 interrupt will have the right ss already. push will use ss automatically so it will work before you fix up ds es 2021-05-29 20:05 had a realization last night: in the summer if you dont live on the equator the moon is lower on the horizon when it's full than the winter 2021-05-29 20:06 had to ponder orbital mechanics a bit but it makes sense 2021-05-29 20:06 it's basically low enough on the horizon here that i dont really see the moon at my house when it's full because it's in the trees 2021-05-29 20:08 I'm far enough North that the sun is rising in the North East at the moment 2021-05-29 20:08 GeDaMo: oh? about how far north? 2021-05-29 20:09 i'm at about 47.5N so it's far enough that summer days are pretty darn long 2021-05-29 20:09 57°N 2021-05-29 20:09 though that's really no big deal compared to most of europe 2021-05-29 20:09 64.5°N 2021-05-29 20:09 geez 2021-05-29 20:09 sun makes most of a circle across the sky rn 2021-05-29 20:09 woot. gog: when is sunset there? 2021-05-29 20:09 geist: NaN 2021-05-29 20:09 :p 2021-05-29 20:09 well it sets, but i guess you never leave twilight 2021-05-29 20:10 you'd have to be within the artic circle for it to technically never set 2021-05-29 20:10 "Daylight 04:25 – 21:46 17 hours, 21 minutes" https://www.timeanddate.com/sun/uk/aberdeen 2021-05-29 20:10 ​www.timeanddate.com: Sunrise and sunset times in Aberdeen 2021-05-29 20:10 https://www.timeanddate.com/sun/iceland/reykjavik 2021-05-29 20:10 ​www.timeanddate.com: Sunrise and sunset times in Reykjavik 2021-05-29 20:10 ooooh which is 66.5N :) 2021-05-29 20:10 I am measly 43N 2021-05-29 20:10 so yeah you're right at the arctic circle huh 2021-05-29 20:11 civil twilight is the only twilight rn 2021-05-29 20:11 doug16k: oh you're in that part of canada that the US is actually higher than (ignoring alaska) 2021-05-29 20:11 43.54 2021-05-29 20:11 only about 4 hours worth 2021-05-29 20:11 yeah usa goes slightly north of that 2021-05-29 20:11 civil twilight, better than unruly twilight 2021-05-29 20:11 main part 2021-05-29 20:12 doug16k: right. most folks in the us dont realize that seattle, and in genera anything along the long border w/canada is more north than maine even 2021-05-29 20:12 and north of most of ontario, etc 2021-05-29 20:12 well the populated parts of ontario 2021-05-29 20:13 i like that little part of minnesota that juts over the border 2021-05-29 20:13 lake of the woods i think 2021-05-29 20:14 so there's a part of minnesota that technically can't be accessed by car without crossing through canada 2021-05-29 20:14 but anyway it never occurred to me that the position of the moon along the eliptic would put it very low on the horizon at night in the winter 2021-05-29 20:14 which makes sense, because when it's full, it's opposite the sun 2021-05-29 20:14 and thus is on the opposite part of the eliptic 2021-05-29 20:15 in the case of gog you'd just never see the moon presumably 2021-05-29 20:15 at best it'd just be under the horizon, opposite the sun 2021-05-29 20:16 we get 4 hours of moon time today 2021-05-29 20:16 23:58 to 03:58 2021-05-29 20:17 https://en.wikipedia.org/wiki/Midnight_sun the multiple exposure pic is cool 2021-05-29 20:17 ​en.wikipedia.org: Midnight sun - Wikipedia 2021-05-29 20:17 actually wait i don't think i understand this table 2021-05-29 20:19 the ones that visualize it best for me are those maps where it shows you the shadow across a mercaters projection 2021-05-29 20:20 dunno what the name for that kinda map is 2021-05-29 20:21 https://www.timeanddate.com/worldclock/sunearth.html this thing 2021-05-29 20:21 ​www.timeanddate.com: Day and Night World Map 2021-05-29 20:21 but you can see how anything north of the hump gets no night 2021-05-29 20:22 oh neat it visualizes where the moon is too, and since it's mostly full it's opposite (180 degrees east/west and on the opposite side of the equator) 2021-05-29 20:22 plus whatever +5 degree additional tilt the moon's eliptic is off of the earths, and i dont know what phase that is 2021-05-29 20:32 * kingoffrance queues today's/tonight's coding music https://modarchive.org/index.php?request=view_by_moduleid&query=36467 2021-05-29 20:32 ​modarchive.org: The Mod Archive v4.0b - A distinctive collection of modules - daylight all night - daylight.mod (MOD) 2021-05-29 20:33 you see sounds geist :) 2021-05-29 20:44 kingoffrance: nice. kinda makes me want to ebya one of those old 80s/90s roland midi things 2021-05-29 20:45 oh not bad. one on ebay for $139 2021-05-29 20:46 one of these: https://youtu.be/tzOsKCr64tA 2021-05-29 20:46 ​'Roland SC-88 Sound Canvas Demo' by Yappri Japan (00:02:17) 2021-05-29 20:48 oh it was the roland MT-32 I was thinking about. when i was little lots of games supported it (it was just general midi over a parallel port i think, or maybe serial) 2021-05-29 20:48 but it was the gold standard of game music on PC 2021-05-29 20:49 I think the MT-32 came out before General MIDI was defined 2021-05-29 20:50 yah funny, literally watching a video about it righ tnow 2021-05-29 20:50 yeah those are really cool 2021-05-29 20:50 excellent sound for the time 2021-05-29 20:50 I love those videos where someone hooks up a Sierra game from the late 80s/early 90s to like, a dozen different sound chips working their way up from PC speaker to MT-32 2021-05-29 20:51 yah 2021-05-29 20:52 looks like MT-32 was 1987 and general midi came along in like 91-92 2021-05-29 20:52 oh, not sure if you saw geist but I did end up fixing my e1000e driver last night :) 2021-05-29 20:52 cool 2021-05-29 20:53 turns out I had an off-by-one error this entire time and the non-e e1000s just silently accepted it. 2021-05-29 20:53 spent some time yesterday breaking apart some 'single console' assumptions in LK that i've been meaning to deal with forever 2021-05-29 20:53 i had 'fixed' it on some other branches but never made it back into mainline 2021-05-29 20:54 awesome 2021-05-29 20:54 but it's messy: one of the pros of the current solution is printf() works anywhere in the kernel, inside interrupt handlers, regular code, etc 2021-05-29 20:54 but. what i really need to do is properly redirect printf through a handle so i can run separate threads that redirect their output to a socket, etc 2021-05-29 20:54 but then that means i *probably* should grow something like kprintf vs printf an then basically demand low level deep kernel code use the former 2021-05-29 20:55 which is easy enough to mechanically do, but i dunno about all the folks downstream what their code will do 2021-05-29 20:55 so i'm trying not to excessively break folks that are using the codebase 2021-05-29 20:55 yeah, right now I have a similar issue; printf() implicitly writes using current_terminal->WriteBytes() but there's only ever one current_terminal across CPUs and it's pretty much assumed to mean "whatever's hooked up to the serial port" 2021-05-29 20:56 right. so what prompted this is i was doing some tcp/ip work and i want to bust out a quick n dirty telnetd 2021-05-29 20:56 so in theory it's fairly ready to shove into multiple terminals but the current_terminal is a global 2021-05-29 20:56 yeah 2021-05-29 20:56 which would start a new shell. no problem, can create a new shell, but i need printfs that are run as a by product under that shell or any threads it spanws to redirect back to the socket instead 2021-05-29 20:56 yah i just went through and set basically the current_terminal is a TLS thing 2021-05-29 20:57 not exactly a process or file descriptor per se, but this is within a single address space kernel, 2021-05-29 20:57 so it's kinda like a pseudo process 2021-05-29 20:57 and set it up such that new threads inherit the TLS pointers from the parent 2021-05-29 20:57 gotcha 2021-05-29 20:58 so i'm debating. i think i'll add a kprintf() that directly goes to the 'console' which will continue to be defined as 'whateer the platform feels like the console is' 2021-05-29 20:58 probably vga text and/or serial/etc 2021-05-29 20:59 then have the default stdin/stdout handle redirect to that, but if you printf inside some deep kernel code it will assert and tell you to use kprintf instead 2021-05-29 20:59 and hopefully i dont break too many people downstream 2021-05-29 21:00 they probably felt funny calling the other one and will be relieved to call something that seems reentrant 2021-05-29 21:00 the real question is whether or not the default stdout handle will attempt to dynamically fall back to kprintf like stuff or if it's an assert and fix code issue 2021-05-29 21:01 it does kinda makes sense though to have two levels of printf in a codebase like this: it's a single blob of code, but some stuff like panic messages or exception printfs or whatnot should not attempt to be fancy about getting their bits out 2021-05-29 21:02 I guess the best way I can quickly patch mine up would be to replace current_terminal with eg. active_tasks[my_cpu]->terminal 2021-05-29 21:02 but 'regular' printfs can be as part of some embedded app that's trying to just do stuff 2021-05-29 21:02 so that each task can be attached to its own terminal/file/whatever 2021-05-29 21:02 yah question is what is a task in your system 2021-05-29 21:03 I suppose i could do something like that: add some cheezy task_t that is nothing more than a collection of threads + some handles to stdout/etc 2021-05-29 21:04 and have a dynamic switch that says 'if i'm inside an int handler, use the global kernel task' 2021-05-29 21:04 ut if you simply ignore it new threads inherit the existing task and that's totally okay. hmmm... 2021-05-29 21:04 yeah, my architecture is a bit less normal. a CPU grabs the next task out of the queue and runs it until it returns. no preemption except in case of an exception 2021-05-29 21:05 there is a name for that. you can make posix do that 2021-05-29 21:05 under the assumption that you aren't going to be spending a bunch of time in a task. supposed to be doing things quickly like forwarding a packet or processing headers 2021-05-29 21:06 you only context switch when you have no other choice 2021-05-29 21:06 kazinsal: but d you reschudule on exception except? 2021-05-29 21:06 exit 2021-05-29 21:06 i suppose not 2021-05-29 21:06 depends on the severity of the exception 2021-05-29 21:06 if it's a "this task is corrupt", then the task is killed and the next one is grabbed out of the queue 2021-05-29 21:07 if it's a "this CPU is corrupt", then the queue is paused until the CPU is rebooted 2021-05-29 21:07 how can you tell if the cpu is corrupt? 2021-05-29 21:07 kazinsal, do tasks block and cause it to have to grab another task to run while blocked one is not done? 2021-05-29 21:07 usually reserved for MCEs, stack smashing, etc 2021-05-29 21:08 doug16k: user tasks yes, kernel tasks no 2021-05-29 21:08 kernel tasks are expected to operate on a given set of data 2021-05-29 21:08 Hello osdev 2021-05-29 21:08 hey sortie 2021-05-29 21:08 howdy 2021-05-29 21:10 I define it so the user can't block, they syscall, and kernel thread hosting that user code blocks. it's all kernel threads, a user thread is just a kernel thread that happens to be in user mode 2021-05-29 21:11 ah, yeah, that makes sense 2021-05-29 21:11 I have user mode tasks on their own CPUs 2021-05-29 21:12 Yo gog 2021-05-29 21:12 And yay kazinsal 2021-05-29 21:12 kernel tasks are specifically for things that need to be as performant as possible because they're operating on known factors 2021-05-29 21:12 osdeving much? 2021-05-29 21:12 Err that sounded a bit sarcastic and was more like a ‘what's up?’ 2021-05-29 21:13 sortie: oh, yeah. fixed my e1000 driver last night (well, technically at 2am) to not have a bug that was being ignored by 8254x chips but not 8257x chips so I now support a lot more NICs than I previously did 2021-05-29 21:13 not lately lol 2021-05-29 21:13 which is good because everything has 82574s in it now 2021-05-29 21:13 kazinsal: Oh wow that's excellent :) 2021-05-29 21:13 or some derivation thereof 2021-05-29 21:13 I'm writing a network stack :3 2021-05-29 21:14 I should learn from you, drivers still scare me 2021-05-29 21:14 it's okay, my driver format is *terrifying* 2021-05-29 21:14 ^W 2021-05-29 21:14 haha whoops 2021-05-29 21:15 also ended up improving a few bits in my build system to properly support my build server 2021-05-29 21:16 Sweet, like what? 2021-05-29 21:16 at least you have a build system 2021-05-29 21:17 a bit of static module support so I can drop in new modules by just adding a list of object files to a module name, as well as arch-specific ones if needed 2021-05-29 21:17 so now I can have it spit out multiple arches in theory with one build command 2021-05-29 21:18 * sortie spits out an arch 2021-05-29 21:18 That's excellent, love great scripting 2021-05-29 21:19 if you tell it to build an i686-generic target it'll go check what the modules for i686-generic are, then for each of those it'll build everything in the SOURCES_MODULE_ list and everything SOURCES_MODULE__ if exists 2021-05-29 21:19 this is making me very sadge 2021-05-29 21:19 today i lost all hope for a good build system 2021-05-29 21:19 wanna trade? 2021-05-29 21:21 if you pass the build script arguments like "arch i686 target generic modules foo,bar clean iso" then it'll do a make clean, set the arch and target, set the module list, build the kernel with the default modules for i686-generic, then build and link in the modules foo and bar, then spit out a live test ISO 2021-05-29 21:21 it'll also auto-detect how many threads to use for make -j 2021-05-29 21:22 and tell you if you're missing required programs and what package you should probably be able to find them in 2021-05-29 21:23 and as an extra cherry on top it now spits out a nice built-by string and throws that in the boot banner 2021-05-29 21:23 "[notice] Starting i686-generic ARE 0.9.4-dev+d34131e, built by troy@build.dev.araxes.net on May 29 2021." 2021-05-29 21:25 also discovered that the build server, despite having fewer cores at less than half the clock speed than my desktop, is faster at building the OS because WSL1's I/O speed is really *that* bad 2021-05-29 21:25 and while I was at it I threw together a couple scripts to scp a fresh ISO to both my desktop and my ESXi host for testing 2021-05-29 21:26 since Windows now just straight up supports sshd 2021-05-29 21:27 i watched the champions league final 2021-05-29 21:27 so much progress today 2021-05-29 22:09 kazinsal: side note: what esxi are you using? the freebie one? 2021-05-29 22:10 i endedup moving off of it to just using qemu on a host machine, but it was mostly because iw anted to consolidate to a single new machine 2021-05-29 22:14 geist: heh, i have a cron job running on it that resets the eval license every 24 hours so I have a perpetual eval license 2021-05-29 22:14 lol 2021-05-29 22:15 in the near future i'm going to grab a proper lab kit license since they're only 200 usd/year 2021-05-29 22:15 for the whole vmware stack 2021-05-29 22:15 yah that seems where it gets kinda powerful 2021-05-29 22:15 with just an esxi license you can't to the centralized vcloud or whatever it's called stuff 2021-05-29 22:16 which seems where it gets pretty nifty 2021-05-29 22:16 the free ESXi perpetual license is great but only supports 8 vCPUs per guest 2021-05-29 22:16 you're always doing stuff command line and via their fairly dinky esxi web ui 2021-05-29 22:16 and doesnt support forwarding guest serial ports to tcp on the host 2021-05-29 22:16 right 2021-05-29 22:17 i did remember it was fairly powerflly nice to be able to share disk images and routine serial ports between guests 2021-05-29 22:17 I wanted to be able to netcat to a port on the ESXi box and get the VM's serial console 2021-05-29 22:17 so you can sort of do it anyway by having your OS build server be on one guest, write out disk images to a shared disk image and then boot the second one 2021-05-29 22:18 but... iirc the serial port routing betweenVMs was extremely difficult to set up because of a bunch of undocumented implicitisms 2021-05-29 22:18 which you can configure in the UI with the free license but it just complains in the log when you boot the VM and just connects the com port to nothing 2021-05-29 22:18 took me hours to get it working 2021-05-29 22:18 yah exactly. a bunch of that kinda stuff,e venb etween vms 2021-05-29 22:18 yeah 2021-05-29 22:18 you give it a named pipe, doesn't work. named pipe has to be made in this order, named according to this pattern, etc 2021-05-29 22:18 stuff that's entirely undocumented 2021-05-29 22:18 another thing you can't do on the free license is vlan pruning on trunk ports 2021-05-29 22:18 as if it was intended to be driven by an external UI 2021-05-29 22:19 anyway it was a nice setup, but i eventually just decided to fuck t and switch back to manually running N qemu instances on a shared bridge 2021-05-29 22:19 if you tell it a VM has a vlan trunk on one of its ethernet cards it gets *every* vlan the host sees 2021-05-29 22:20 need the vSphere Distributed Switch feature to prune it down 2021-05-29 22:20 which really is meant for synchronizing VLANs and port groups and such across multiple ESXi hosts and datacenters 2021-05-29 22:21 yah 2021-05-29 22:22 another annoying thing is that vmware workstation chooses your NIC type for you 2021-05-29 22:22 based on what guest OS you tell it the VM is running 2021-05-29 22:22 yah agreed. i havea license to vmware workstation but it's not as nice as i'd like. it's a solid VM but more hard coded than i expected 2021-05-29 22:22 vs something like virtualbox which is not asnice VM but more configurable generally 2021-05-29 22:23 like virtualbox i think the real key is to hack the vm config file with a text editor 2021-05-29 22:23 and then i thnk you can make it do whatever you want 2021-05-29 22:23 yeah, and thats where the documentation gets thin 2021-05-29 22:24 also i remember being dissapoint that vmware workstation doesn't seem to have any TRIM support with its disk devices 2021-05-29 22:24 even virtualbox has that, though you have to jump through soem hoops 2021-05-29 22:24 what's really bizarre about virtualbox to me is that it supports three different 8254x cards but nothing newer 2021-05-29 22:25 though it does have virtio-nic 2021-05-29 22:25 (i think) 2021-05-29 22:25 yeah 2021-05-29 22:25 there's some weirdo stuff with virtio-blk and nvme on virtualbox.w here it's there but they dont recommend it 2021-05-29 22:25 need to sit down one of these days and read the virtio spec 2021-05-29 22:25 like, do they not recommend it because it's unsupported/unstable? 2021-05-29 22:25 or ... 2021-05-29 22:26 otherwise in general that's almost certainly the best potential emulated block devices 2021-05-29 22:26 yep. they seem really simple and effective 2021-05-29 22:27 yah virtio is nice to deal with. there's an up front cost of writing the basic virtio detection and ring code 2021-05-29 22:27 but once you ahve that you've got the bottom layer for a plethora of additional devices you can build out of it 2021-05-29 22:27 so i do recommend writing it as two layers like that 2021-05-29 22:28 cool, so theres a standard ring buffer system that you implement and everything else plugs into it then? 2021-05-29 22:28 yes that's more or less how I did it too 2021-05-29 22:28 basically yeah. tghe ring buffer just transfers buffers back and forth and has a doorbell and IRQ mechanism 2021-05-29 22:28 nice 2021-05-29 22:28 and then device drivers use one or more rings for their business 2021-05-29 22:28 might use that to test MSI support 2021-05-29 22:29 https://github.com/heatd/Onyx/tree/master/kernel/drivers/virtio 2021-05-29 22:29 ​github.com: Onyx/kernel/drivers/virtio at master · heatd/Onyx · GitHub 2021-05-29 22:29 I still don't fully trust my e1000e to flip it over to MSI 2021-05-29 22:29 shameless plug for my beautiful amazing code 2021-05-29 22:29 virtio-blk is one of the simplest actually since it's simple a series of transactions with a { header, data, response } transfer 2021-05-29 22:29 and data can either be read or write 2021-05-29 22:29 oh you just gave me a task 2021-05-29 22:29 fix my virtio-net and add blk 2021-05-29 22:30 yah i did blk first. net is a teensy bit more complicated because it uses two rings iirc 2021-05-29 22:30 though that's what you want: functionally two independent pipes 2021-05-29 22:31 virtio-gpu and virtio-serial are a bit more complicated because there's a second layer of messages and state machine to deal with 2021-05-29 22:31 and a few messages worth of handshake 2021-05-29 22:31 havent' looked into virtio-input. i suspect it just starts sending you formatted messages right off the bet 2021-05-29 22:31 i looked at virtio-gpu but I got disappointed once I realised vulkan support isn't quite there 2021-05-29 22:32 although they were working on it. dunno how that's changed 2021-05-29 22:32 well, it might be but may be outside the spec 2021-05-29 22:32 ie, virtio-gpu may simply be the transport for a higher level vulkan thing. somehow the fuchsia emulator punches vulkan through, but i honestly dont know precisely how and/or if it's standard 2021-05-29 22:32 https://www.phoronix.com/scan.php?page=news_item&px=VirtIO-GPU-Venus-Vulkan 2021-05-29 22:32 ​www.phoronix.com: Google's VirtIO-GPU "Venus" Vulkan Driver Merged Into Mesa 21.1 - Phoronix 2021-05-29 22:32 thanks google 2021-05-29 22:33 yah dunno if fuchsia emu is using that, or has anything to do with it? 2021-05-29 22:33 i am such a terrible graphics programmer that i wouldnt even know where i would start on gpu stuff 2021-05-29 22:33 opengl 3.3 is plenty 2021-05-29 22:34 can make a super high speed desktop with just that 2021-05-29 22:34 having opengl means you need opengl logic and I'm not so sure I'd want to handle that 2021-05-29 22:34 it can put buffers in the device. that is why it is fast 2021-05-29 22:35 porting mesa would work I guess? 2021-05-29 22:35 gimme that in kernel cuda 2021-05-29 22:35 write a firewall for a GPU 2021-05-29 22:37 virtio handles a lot of opengl for you 2021-05-29 22:38 you are at buffer and state change and draw call raw api level 2021-05-29 22:39 but it's still draw triangles or strips or whatever like opengl draw calls 2021-05-29 22:39 yah would be kinda fun to figure out te minimum you need to just jam some simple GL draw calls over it 2021-05-29 22:39 it's vir "gl" right? it's a wrapper around host opengl 2021-05-29 22:40 like 'i just wanna blit this' 2021-05-29 22:41 in opengl, the mindset is already that the renderer might be so far away it could even be over the network 2021-05-29 22:42 it is far away, through miles of pcie wires :P 2021-05-29 22:42 opengl is perfect for virtualization already 2021-05-29 22:43 that's X11, not opengl 2021-05-29 22:44 opengl has the render device and client decoupled just as much 2021-05-29 22:44 it's both 2021-05-29 22:44 X11: because everyone has really weird setups right? 2021-05-29 22:44 display list is the sequence of stuff you send over the network 2021-05-29 22:44 it's like the one piece of software that's optimised for the uncommon case 2021-05-29 22:44 that you avoid sending because it is a display list I mean 2021-05-29 22:45 my point is opengl is expecting the device memory to be in a far away land 2021-05-29 22:45 so it is a simple matter of wrapping kvm physical page access to let you use host opengl 2021-05-29 22:48 say if you write only map a buffer and host opengl actually points you at device memory, it could make your kvm page use what page host opengl wants you to write 2021-05-29 22:48 definitely simplifies some things 2021-05-29 22:49 it's more write-only than that though. mostly binding your buffers that you bound to things 2021-05-29 22:50 bind the vertex buffer and do draw triangles 2021-05-29 22:51 I need to finish all the regressions I caused and do the opengl part of my virgl driver 2021-05-29 22:51 partially done 2021-05-29 22:52 I think froggey got draw triangle working in lisp or another slightly esoteric language? 2021-05-29 22:53 in virtio-gpu virgl 2021-05-29 22:53 part of me wants to port or write an audio stack but there is no reason for a firewall to have one 2021-05-29 22:53 kazinsal, more klaxons needed 2021-05-29 22:54 unless i decided i really REALLY hate myself and want to write a voip solution 2021-05-29 22:54 network gear needs klaxons doesn't it? 2021-05-29 22:54 ICMP pings should trigger a sound 2021-05-29 22:54 haha, audible whoops when you send a command to blink the LEDs as an identify method 2021-05-29 22:55 "marco.... marco..." 2021-05-29 22:56 your fibre run gets cut and every bit of network gear in the dc screams in horror 2021-05-29 22:56 get some text to speech working and make it keep saying, "packet drop detected" with starcraft administrator voice 2021-05-29 22:57 "you require more throughput licenses." 2021-05-29 22:58 hey google, block any packets coming from 145.123.1.0/24 TCP port 22 2021-05-29 23:00 OK 2021-05-29 23:01 "you can do that in the app!" 2021-05-29 23:02 in other words, YOU do it 2021-05-29 23:03 no matter how amazing they make it, we'll still find things it doesn't handle 2021-05-29 23:16 alexa, make my network secure. *WAN port shuts off* 2021-05-29 23:18 open the pod bay doors alexa 2021-05-29 23:27 apparently they covered that, but what if you ask from space 2021-05-29 23:29 then, you can probably submit a bug report 2021-05-29 23:39 doug16k: even better, they have an intel gfx card driver https://github.com/froggey/Mezzano/blob/master/drivers/intel-gma.lisp 2021-05-29 23:39 ​github.com: Mezzano/intel-gma.lisp at master · froggey/Mezzano · GitHub 2021-05-29 23:48 hi all 2021-05-29 23:49 is it recommended to stick with 32bit architectures for a first project? i was planning on targeting the recent raspberry pi models which I only just realized are 64bit 2021-05-29 23:51 64-bit is fine 2021-05-29 23:52 32 bit arm is more difficult than 64 bit, I thought 2021-05-29 23:52 k thanks 2021-05-29 23:52 doug16k: how so? 2021-05-29 23:53 the ISA is probably way more dated 2021-05-29 23:53 32 bit has much more complicated things for you to know when handling interrupts/exceptions 2021-05-29 23:54 also arm64 has division, arm32 doesn't I think 2021-05-29 23:54 so that's all super crap 2021-05-30 00:19 riverdc, it's the same thing on x86 vs x86_64. x86_64 is actually easier 2021-05-30 00:20 doublefault and stack fault are clunky as hell on x86, easy on x86_64 2021-05-30 00:20 x86 nmi is also even more hell then x86_64 one 2021-05-30 00:45 ok, good to know. i'm pretty green in terms of assembly, didn't know that x86_64 was considered easier 2021-05-30 00:57 I wonder if it would be easier to write a new kernel core for x86_64 and port the modules into it than to try to clone the i686 core and change bits as needed until it works 2021-05-30 01:05 x86_64 has more warts... but they're easier to use 2021-05-30 01:06 [11:54:05] also arm64 has division, arm32 doesn't I think <-- ARMv7 i think has division which is 32-bit 2021-05-30 01:06 i know ARMv7-M has division and that's the cut-down thumb-only microcontroller version 2021-05-30 01:06 GreaseMonkey, probably, i'm not the biggest ARM fan here :) 2021-05-30 01:07 ARM can be a lot of fun but i want to see more RISC-V stuff 2021-05-30 01:07 kazinsal: if you wrote your paging well there are probably not too many changes you can make 2021-05-30 01:08 just use uint64_t and increase your paging levels 2021-05-30 01:08 ARMv7-A has division yes 2021-05-30 01:08 then there's the IDT and GDT which are slightly different but that's also a piece of cake 2021-05-30 01:09 the TSS is also slighly different 2021-05-30 01:10 for syscalls you probably want to use syscall but int works fine 2021-05-30 01:10 and yeah that's about it 2021-05-30 01:11 GreaseMonkey: riscv is FUN 2021-05-30 01:11 it's just so simple 2021-05-30 01:11 Mutabah: it's basically a better MIPS, another CPU which takes less than a day to make a basic user-mode-level emulator for 2021-05-30 02:18 is it just me or is virtio-blk crap? 2021-05-30 02:21 In what way? 2021-05-30 02:23 you need to create a separate virtio_blk_request header for each sector you want to read, and each sector is very much its own request 2021-05-30 02:24 Well, each request - you can read sequential sectors in one request 2021-05-30 02:24 * gog meows 2021-05-30 02:24 And you need something to tell the host what address to read 2021-05-30 02:24 you can? 2021-05-30 02:24 Yep 2021-05-30 02:26 ah, I take it back then 2021-05-30 02:26 virtio-blk is great 2021-05-30 02:40 you might fragment it because of scatter gather, but it might be one big range 2021-05-30 02:40 you can chain them together into one big command 2021-05-30 02:42 my read and write are largely wrappers around mphysranges 2021-05-30 02:42 the number of items there determine how many items in virtio ring 2021-05-30 02:46 if you look at the virtio config struct, it has size_max. use that to cap your scatter/gather fragment size 2021-05-30 02:46 I have virtio-blk driver 2021-05-30 02:47 it reminds me of usb block storage. almost impossible to be simpler 2021-05-30 02:49 virtio-blk blows away usb block storage for one reason: block storage is in order, virtio isn't 2021-05-30 02:49 each thing completes independently 2021-05-30 02:52 if you want a guarantee that something run after something else, then don't issue it until the other thing completes 2021-05-30 02:53 you already need to be able to stall to do a useful flush 2021-05-30 02:54 you need to be able to block issue from all threads, drain out the command until none are pending, issue the flush, and prevent issue until flush completes 2021-05-30 02:56 when you say flush you are saying flush what was issued so far. if it hasn't issued everything up to the flush, the flush doesn't flush everything before it 2021-05-30 02:56 the only way to be certain it was issued is to wait for it to complete 2021-05-30 02:57 both ahci and nvme need you to do that too 2021-05-30 02:58 if you just fling a flush in there you don't know for sure what it flushed 2021-05-30 02:58 not allowed to issue that command NCQ anyway 2021-05-30 02:59 already need to be able to stall until ncq commands drain, and transition to not-ncq 2021-05-30 02:59 it's like it's a tradition 2021-05-30 03:01 I wanted to add port multiplier support 2021-05-30 03:01 I love the idea of port multipliers 2021-05-30 03:02 one sata can handle 4 spinning drives no problem 2021-05-30 03:04 too late now, too old 2021-05-30 03:05 Something I've not thought of - do any hypervisors or emulators emulate them? 2021-05-30 03:08 doesn't look like qemu or vmware do 2021-05-30 03:08 I hope there is, I don't think so though 2021-05-30 03:10 I bet it's not even that much work to add it to qemu's ahci 2021-05-30 03:11 hardware's not that expensive, either 2021-05-30 03:11 but, my ONLY use for it would be testing my AHCI driver against it 2021-05-30 03:12 a friend almost went that route and went sas-to-many-sata instead 2021-05-30 03:13 he has an array of 7200 rpm drives that keep up with my 960 pro nvme in linear 2021-05-30 03:15 so much mechanical it keeps up with solid state :) 2021-05-30 03:16 way back in the day I wrote a FAT fragmenter, compare their performance after that treatment :) 2021-05-30 03:24 it's fun to have so much disk throughput, that you need to put the disk host controller in the video card slot so you can get x8 :P 2021-05-30 03:28 speaking of ludicrous disk throughput, does anyone know about directstorage? I've not been able to find a straight answer on if it's only useful for the GPU, or if it's useful on the CPU too. 2021-05-30 03:30 even now, all I can find is marketing. 2021-05-30 03:31 I go for storage so direct, I wrote the block driver and the filesystem and the syscalls and the libraries :P 2021-05-30 03:33 then everything is my fault 2021-05-30 03:35 fuzzing seems like an excellent idea on syscalls 2021-05-30 03:36 Well, the nvidia documenttion seems to be entirely GPU side. 2021-05-30 03:38 Dunno, maybe it provided a way to allow applications to map part of a BAR so they can access storage without going through the OS 2021-05-30 03:38 But that would require the disk to know about the filesystem 2021-05-30 03:39 newest pcie can map any size 2021-05-30 03:39 variable bar thing 2021-05-30 03:39 Which is something I've thought about - move the filesystem to the SSD controller, which can deal with allocating a bunch of numbered logical streams. The OS' filesystem can use some streams for metadata, others for content. 2021-05-30 03:39 goes all the way up to 64 bit 2021-05-30 03:40 Program wants to open a file, OS does permission checks, gives it a mapping to a page in one of the BARs that allows it to do read/write commands, without syscalls 2021-05-30 03:41 mmap gives it a BAR on the disk which can be read and written 2021-05-30 03:41 if hardware has that bank switching window thing, yeah 2021-05-30 03:41 oh you mean slide the bar up and down depending on access? 2021-05-30 03:42 that's probably not right, you aren't intended to be frequently modifying config space 2021-05-30 03:42 weird if they do that 2021-05-30 03:42 nah, the BAR could be a fixed sized multiple of the size of the disk. 2021-05-30 03:43 yeah just bank switch the one bar and not move it 2021-05-30 03:43 that way makes more sense 2021-05-30 03:43 the device just creates 'views' of logical streams 2021-05-30 03:43 it's EMS memory from DOS 6.22 day 2021-05-30 03:43 effectively, the device deals with fragmentation 2021-05-30 03:43 with nice big 16MB window 2021-05-30 03:44 something I kinda want to try with an FPGA, but I've never done anything with an FPGA 2021-05-30 03:44 seems a bit more complex than blinking a LED 2021-05-30 03:44 if you want to do that they have amazing stuff 2021-05-30 03:44 https://numato.com/product/aller-artix-7-fpga-board-with-m-2-interface/ 2021-05-30 03:45 ​numato.com: Aller Artix-7 FPGA Board with M.2 Interface | Numato Lab 2021-05-30 03:45 But, being able to read/write files with 0 syscall overhead 2021-05-30 03:45 M.2 fpga - your code can use pcie bus and do dma and stuff 2021-05-30 03:45 nice, hardware side sorted 2021-05-30 03:45 big ass artiz 2021-05-30 03:45 x 2021-05-30 03:46 1 RGB LED for custom use 2021-05-30 03:46 so I can blink the LED too :D 2021-05-30 03:46 that is amazing if you want to explore making pcie devices 2021-05-30 03:46 they give you an led I think lol 2021-05-30 03:46 just dma the blinking led into the framebuffer through peer-to-peer bus master stores 2021-05-30 03:48 no you're right, that one is for more advanced user. you can get friendlier fpga stuff 2021-05-30 03:50 At any rate, effectively building a filesystem in hardware is far above my skill level 2021-05-30 03:51 it has an led though 2021-05-30 03:51 you aren't even *allowed* to sell an fpga prototyping tool with no led are you? 2021-05-30 03:51 the led police make those people disappear 2021-05-30 03:51 Oh I'm sure I can blink the hell out of that LED :) 2021-05-30 03:52 maybe I can DMA "Hello World!" into the framebuffer! 2021-05-30 03:55 you could probably hijack control of the kernel from dma 2021-05-30 03:55 point it into an mmio window you made, which has code in it 2021-05-30 03:56 make the cpu jmp to the mmio window 2021-05-30 03:56 from there you take over easy 2021-05-30 03:57 Well, if you're booting from my disk, it can just load my code anyway! 2021-05-30 03:57 Unless you're signing your EFI loader 2021-05-30 03:57 if there is no iommu, there's nothing stopping you 2021-05-30 03:57 you can modify ram whenever you want 2021-05-30 03:58 anywhere 2021-05-30 03:58 Didn't the IOMMU hve a bit devices can set to ignore it anyway? 2021-05-30 03:58 Or at least, some versino of the spec 2021-05-30 03:58 Because, that makes sense. 2021-05-30 03:59 it could be behind something that doesn't support the remapping 2021-05-30 03:59 everything behind that can see the real thing when they do peer to peer 2021-05-30 04:01 I was sure there was a bit you could set in your DMA packets to say "nah, don't translate this address, it's completely harmless!" 2021-05-30 04:03 oh not sure what you can or can't do maliciously 2021-05-30 04:03 maybe it was in a draft 2021-05-30 04:04 that device I linked would allow the user to explore dma attacks 2021-05-30 04:04 I had my iommu on full paranoia. sync evict immediately after each I/O 2021-05-30 04:05 it was fine, but impacted game engines a bit 2021-05-30 04:05 iommu.strict 2021-05-30 04:08 I just played tf2, first time playing it in a while, and it was so weird to just sit at fps_max forever 299fps 2021-05-30 04:08 found it 2021-05-30 04:08 https://colinrothwell.net/thesis.pdf 2021-05-30 04:08 ^F for ATS 2021-05-30 04:08 anyway, gotta go, back in an hour or so 2021-05-30 04:09 nice 2021-05-30 04:10 I don't know why I find it so amusing to run older engines at breakneck speed 2021-05-30 05:07 now that I'm back, let's see what this is about... 2021-05-30 06:08 does the forum have an inline code bbcode? like ``code`` in rST? 2021-05-30 06:19 y'all remember colinux? 2021-05-30 06:20 it seems like a cool thing to use, but also wildly impractical to have to build or work with 2021-05-30 06:54 I know of colinux, though I've never run it, or looked into how it worked 2021-05-30 06:57 so it runs the kernel as a usermode process? 2021-05-30 06:58 alongside drivers to use resources from windows 2021-05-30 17:59 so quiet today 2021-05-30 17:59 * heat meows 2021-05-30 18:00 * meisaka nyans 2021-05-30 18:07 my clang build is about 60% faster than the gcc one 2021-05-30 18:08 impressive 2021-05-30 18:08 fsf in shambles 2021-05-30 18:19 * gog meows 2021-05-30 18:20 heat: i thought you said that clang was way slower to build 2021-05-30 18:20 i mean build my project 2021-05-30 18:20 not building the compiler itself 2021-05-30 18:20 ohh 2021-05-30 18:20 building the llvm toolchain is still ridiculously slower 2021-05-30 18:22 and my clang build isn't even LTO-enabled 2021-05-30 18:50 heat, yeah but how much percent faster does gcc compiled one run? :) 2021-05-30 18:51 ah you meant building clang itself 2021-05-30 18:51 ah I see 2021-05-30 18:51 hm? I mean compiling my project with gcc and clang 2021-05-30 18:51 clang is much faster 2021-05-30 18:52 (granted, clang + lld) 2021-05-30 18:52 vs gcc + gold 2021-05-30 18:53 heat: can you measure any perf in your kernel? 2021-05-30 18:53 no 2021-05-30 18:53 I checked clang vs gcc in my kernel. it was pretty much the same except gcc left clang in the dust with vectorized codegen 2021-05-30 18:54 that was a few versions back though, need to recheck 2021-05-30 18:55 I mean execution speed, not compilation 2021-05-30 18:55 i'm talking about build speed 2021-05-30 18:55 yeah 2021-05-30 18:56 my project is a mixed of moderate C++(my kernel, userspace that's written by me), heavier C++(google test and google benchmark), and lots of C(toybox, dash, musl libc, acpica) 2021-05-30 18:56 and clang is so much faster 2021-05-30 18:56 it compiles everything faster 2021-05-30 18:57 weird thing about the clang codegen too, it looked fine, the uglier code gcc generated ran faster 2021-05-30 18:59 yeah 2021-05-30 18:59 I can't tell you about that, I haven't looked at it 2021-05-30 19:12 what's a good way of collecting entropy from a NIC? 2021-05-30 19:13 you will receive ARP and DHCP traffic all the time 2021-05-30 19:13 the exact times it arrives are random 2021-05-30 19:14 assuming you have something with nanosecond level precision 2021-05-30 19:15 guess I'll have to dig into the precision timers then 2021-05-30 19:15 the register values at the time of IRQs can be a source of randomness 2021-05-30 19:16 collecting entropy from a NIC might not be a great idea though 2021-05-30 19:16 because they can reverse what it did to the encryption state? I'd like to meet them 2021-05-30 19:17 I want it to *a source* not the exclusive source 2021-05-30 19:17 https://lwn.net/Articles/283103/ 2021-05-30 19:17 ​lwn.net: Appropriate sources of entropy [LWN.net] 2021-05-30 19:19 some light reading XD, at least I won't be bored 2021-05-30 19:19 tl;dr linux thinks it's a bad idea and they don't do it 2021-05-30 19:20 I want to see a proof of concept where they got in because it used irq contexts to feed a stream cipher 2021-05-30 19:22 The Freenode situation is getting so much worse the more I'm hearing about it. 2021-05-30 19:22 Yet there are still people over there :| 2021-05-30 19:22 what's the news? 2021-05-30 19:23 you've all seen this already, right? https://isfreenodedeadyet.com/ 2021-05-30 19:23 ​isfreenodedeadyet.com: isfreenodedeadyet 2021-05-30 19:25 New staff are a bunch of horrible people basically. Signing the other RMS document to keep him in power. The other claims I have no proof for but one is apparently a massive tranphobe and has already banned trans people on the network. Another impersonates people and is harassing those who signed the RMS "stand down" document. And also there's something about making FN a "incel inclusive" server because incels are being banned on other 2021-05-30 19:25 networks. 2021-05-30 19:25 Lmao, they're masks off about being terrible "well, you see, in *thailand* the age of consent..." types 2021-05-30 19:25 oof 2021-05-30 19:26 I should delete my account 2021-05-30 19:26 wow 2021-05-30 19:26 if that crystalmath guy shows up here he's probably going to start bragging about freenode taking a stand about cancel culture 2021-05-30 19:26 I can feel the weirdo cryptolibre already 2021-05-30 19:27 Yeah I dunno how true the claims are. I'm just picking up comments on Twitter and server mods on other networks. 2021-05-30 19:28 Like https://twitter.com/mjg59/status/1397384190644002818 2021-05-30 19:28 ​twitter: Fucking incredible one of the new Freenode staff members is Chris Punches, who stole someone's identity in order to harass people who signed the petition asking for RMS to stand down: 2021-05-30 19:29 I'm generally inclined to believe the libera/oss-twitter people more than the freenode/bitcoin/darknets people 2021-05-30 19:29 can't ban the trans people that already fled :p 2021-05-30 19:29 also shame about crystalmath 2021-05-30 19:30 It would turn out to be pretty funny if the whole corporate takeover of freenode just turned out to be a bunch of the cancel cancel culture types / RMS did nothing wrong / "actually the age of consent is" types. 2021-05-30 19:31 the new owner is a bitcoin billionaire who has run IRCs for offsites started by people who were so atrocious they got banned en masse from reddit 2021-05-30 19:33 he was in charge of the voat irc for most of its existence (including reusing its TLS configs for new-freenode), well known as the place that hundreds of thousands of qanon cultists migrated to from reddit 2021-05-30 19:33 the man is basically an alt-right-tech financier 2021-05-30 19:34 anyone who defends freenode nowadays is as good as fertilizer to me 2021-05-30 19:34 lmao voat 2021-05-30 19:34 reddit is bad enough, i couldn't imagine having gone to voat 2021-05-30 19:35 neckbeard^2 2021-05-30 19:36 libdl is referring to libc stuff or gcc internals? the former right? 2021-05-30 19:37 yeah libc 2021-05-30 19:38 you get the dl* family of functions 2021-05-30 19:38 in glibc, that is. some libc's don't have a libdl or even libm, libpthread 2021-05-30 19:39 musl for example keeps everything in libc.{a,so}, even the dynamic linker is just a symlink to libc.so 2021-05-30 19:40 neat 2021-05-30 19:41 fun fact: glibc's libc.so.6 is executable 2021-05-30 19:41 why? 2021-05-30 19:41 because it is lol 2021-05-30 19:41 lol 2021-05-30 19:41 why not :P 2021-05-30 19:41 sometimes you just gotta do weird shit for the oss cred 2021-05-30 19:41 you get some info on the glibc's version and features and stuff 2021-05-30 19:43 yeah I keep thinking I should figure out symbol versioning sooner rather than later 2021-05-30 19:44 never used it before 2021-05-30 19:44 GNU C Library (Debian GLIBC 2.31-12) stable release version 2.31. 2021-05-30 19:44 Copyright (C) 2020 Free Software Foundation, Inc. 2021-05-30 19:44 haha it is 2021-05-30 19:47 haha, neat. TCG says it supports "self snoop" because you don't need to flush the cache when changing memory types 2021-05-30 19:47 I don't know of any that support self snoop in real life 2021-05-30 19:49 I put in an if (!cpuid_has_self_snoop()) cpu_flush_cache(); after setting PAT and it was surprisingly skipping the flush 2021-05-30 20:08 Is there anyway to make money with free software? 2021-05-30 20:09 sell support 2021-05-30 20:09 printf "int main(){}" > money.cc && make money 2021-05-30 20:09 Do you want to limit yourself to legal means? :| 2021-05-30 20:09 use free software to make a thing to sell 2021-05-30 20:09 if it's really good you could make movies with it 2021-05-30 20:10 Actually wanted to make a movie once on my own 2021-05-30 20:10 open-source plans for a 3d printer and pistol 2021-05-30 20:10 Realized that would be a colossal effort 2021-05-30 20:10 then rob a liquor store 2021-05-30 20:11 Does it actually have to be free software? 2021-05-30 20:11 Who heard of free cars or free houses? 2021-05-30 20:12 free as in freedom 2021-05-30 20:12 if you don't like it go sign up for adobe cloud and make a movie that way 2021-05-30 20:12 you are free to read it, modify it, and give modified version to your friends 2021-05-30 20:12 I see, free as in freedom is a good ideal 2021-05-30 20:13 a good motto 2021-05-30 20:13 so yeah, I am free to get a car, modify it, and give it to my friends 2021-05-30 20:13 Making money with prinf is considered counterfeit 2021-05-30 20:13 I don't trust that at all 2021-05-30 20:13 lol 2021-05-30 20:13 Would be nice idea though 2021-05-30 20:14 They had car kits 2021-05-30 20:14 making money with sortix though is the highest form of money making 2021-05-30 20:14 pinnacle of human development 2021-05-30 20:14 Sortix for US Treasury 2021 2021-05-30 20:14 Well, there's that guy who gave up their job to work on their OS full time 2021-05-30 20:14 printf("$100\n"); 2021-05-30 20:15 The high art of money making 2021-05-30 20:15 https://awesomekling.github.io/I-quit-my-job-to-focus-on-SerenityOS-full-time/ 2021-05-30 20:15 ​awesomekling.github.io: I quit my job to focus on SerenityOS full time – Andreas Kling – I like computers! 2021-05-30 20:15 he should work on sortix instead 2021-05-30 20:16 Living the dream slash nightmare :P 2021-05-30 20:16 Think about it. No performance reviews. No management. No corpspeak. 2021-05-30 20:17 hmmmm 2021-05-30 20:17 "corpspeak" sounds like corpspeak 2021-05-30 20:18 this is why we need klaxons 2021-05-30 20:18 m a t e r i a l d e s i g n 2021-05-30 20:18 a s t h e t i c s 2021-05-30 20:21 E L 0 S E C U R I T Y 2021-05-30 20:27 class money* bucks = new money( "$100", 100.0 ); printf( "%s", money.value() ); 2021-05-30 20:27 I just realized my code that sets PAT MSR needs to do way more stuff 2021-05-30 20:28 you have to freak out and disable cache fill, writeback/invalidate cache, flush tlb, then disable MTRR, then set it, then undo it back to normal 2021-05-30 20:29 s/\./->/ 2021-05-30 20:29 and the other cpu better nor be running anything beyond a spinloop also with its cache not filling and its MTRRs off 2021-05-30 20:31 that is easy to arrange though, I'll make the cpu that sends IPI go into no-cache before sending SIPI. it won't get notified of SMP ready until after the other cpu set its PAT 2021-05-30 20:32 AP ready I mean 2021-05-30 20:33 it's funny how utterly disabled the cache is. it isn't even trying to fill, and the MTRR being off makes all memory UC anyway 2021-05-30 20:34 What store would sell operating systems? 2021-05-30 20:35 Off-question/ 2021-05-30 20:35 SMP is something every os needs now 2021-05-30 20:36 skyz, a reseller for chips bought off digi-key 2021-05-30 20:36 the amount an OS needs to do grows naturally as more hardware needs to be shared and abstracted 2021-05-30 20:37 unless it has a driver system, unless you count drivers are part of the OS 2021-05-30 20:38 picking which thread to run and which page gets to be in ram is the main job of OS 2021-05-30 20:39 it boils down to fetching instructions that read and write data 2021-05-30 20:40 we expect lots of programs to be able to share the extremely powerful hardware we have now 2021-05-30 20:41 But what types of programs 2021-05-30 20:41 Toy applications? 2021-05-30 20:42 apps, databases, networks, systems, configurators, viewers, compilers 2021-05-30 20:43 I would be really interested to see a hobby os in a car 2021-05-30 20:45 yah it is kinda amazing how much things have changed in consumer world over the last 20-30 years re: multitasking 2021-05-30 20:45 i remember back when it was novel and neat to just be able to forward/background something in windows 3.1 or even a dos TSR 2021-05-30 20:45 though of couse someone will point out their amiga/unix machine/etc already did that 2021-05-30 20:49 https://en.wikipedia.org/wiki/List_of_car_manufacturers_of_the_United_Kingdom 2021-05-30 20:49 ​en.wikipedia.org: List of car manufacturers of the United Kingdom - Wikipedia 2021-05-30 20:49 I find it interesting how many car manufacturers they have 2021-05-30 20:51 Only a few are known 2021-05-30 20:51 most of them are small companies 2021-05-30 20:51 and many defunct 2021-05-30 20:54 doug16k: ive hit a bit of a roadblock with that vectorized softfloat, its getting too complex for me, combined with the fact that its not actually going to be any faster then non-vectorized hard floats 2021-05-30 20:55 doug16k: so i'm shifting gears, creating some portable c functions, that replicate the effects of the vector opcodes, limitations and all, to act like an SDK, and i could then use inlined functions to do the same task on a VPU 2021-05-30 20:56 clever: have you seen simde? 2021-05-30 20:56 moon-child: nope 2021-05-30 20:56 moon-child: for reference, this is what i have: https://github.com/librerpi/lk-overlay/blob/master/app/float-tests/float.c#L34-L59 2021-05-30 20:56 ​github.com: lk-overlay/float.c at master · librerpi/lk-overlay · GitHub 2021-05-30 20:57 clever, I like your plan though - making some intrinsics for yourself 2021-05-30 20:57 the biggest roadblock, is that my mult opcode, only accepts 16bit inputs 2021-05-30 20:57 https://github.com/simd-everywhere/simde it has pure-c implementations of all the simd intrinsics 2021-05-30 20:57 ​simd-everywhere/simde - Implementations of SIMD instruction sets for systems which don't natively support them. (115 forks/1087 stargazers/MIT) 2021-05-30 20:57 might be useful 2021-05-30 20:57 doug16k: yeah, the #gcc channel also said intrinsics would be better then proper vector spport, because gcc doesnt really understand a matrix 2021-05-30 20:57 moon-child: ahh, that sounds almost exactly what i want to do 2021-05-30 20:58 implementing the intrinsics twice, as both pure-c (portable) and inline asm (faster) 2021-05-30 20:59 the pure-c version, would then let people test out the algos, without needing a vpu toolchain and test target 2021-05-30 21:00 one question i have on planning, how should the intrinsics accept inputs? 2021-05-30 21:00 yah i think the general way of writing simd stuff is to use a huge pile of intrisics. it's kinda like assembly except the compiler is doing the busywork of register allocation and load/stores for you 2021-05-30 21:00 chunks of that could be reused in telling gcc how to use it natively 2021-05-30 21:00 should i give it a coordinate into the matrix, and a pointer to a matrix 2021-05-30 21:01 or should i just give it a vector of 16 elements? 2021-05-30 21:01 oh reminds me of SH-4: at the time (1999) it was the only cpu that had a straight matrix multiply instruction 2021-05-30 21:01 coordinates, would carry over more of the real limitations/power, but require the user to handle register allocations by hand 2021-05-30 21:02 though i *think* it was just a 1x4 * 4x4 -> 4x1 right? basically 4 of those in a row was a standard 3d transform 2021-05-30 21:02 i think the VPU can do a 16x16 matrix mult in ~4 opcodes, if i understand the formula right 2021-05-30 21:02 though actually i think it may have had a full 4 4x4 2021-05-30 21:02 smaller, would require loading some constants to mess with the per-lane condition flags 2021-05-30 21:03 maybe the matrix pointer, could just be TLS 2021-05-30 21:03 having the one matrix across a vector like that isn't true vectorization 2021-05-30 21:03 simpler api 2021-05-30 21:04 true vectorization would be N threads each doing scalar things, where N is vector width 2021-05-30 21:04 ah yeah FTRV instruction was a 4x4 * 4x1 it looks like 2021-05-30 21:04 doug16k: internally, the matrix is basically a uint8_t[64][64], and you give it a coordinate, to select either a 1x16 or a 16x1 slice 2021-05-30 21:05 yes but proper vector code doesn't slice anything 2021-05-30 21:05 everything is entire register, hardly ever swizzle 2021-05-30 21:05 so it would either span m[r][c] to m[r][c+15] or m[r][c] to m[r+15][c] 2021-05-30 21:05 you can basically treat it as a collection of 256 different uint8_t[16]'s 2021-05-30 21:06 with some built in rotation 2021-05-30 21:06 you want "whole vector, whole vector, ..." not "did that little piece of a vector, did that little piece of a vector, ..." 2021-05-30 21:06 the immediate encoding, doesnt allow you to pick a non-aligned slice 2021-05-30 21:06 so its almost a hard mapping on where those 256 slices fit 2021-05-30 21:07 when you bump up to 16bit, then there are only 128 uint16_t[16]'s that you can address 2021-05-30 21:07 iirc the SH-4 sttrategy is not to have vector registers but to treat the two banks of 16 single precision fpu registers as either 4 vectors horizontally or vertically, or a single 4x4 matrix 2021-05-30 21:08 doug16k: if you ignore its ability to rotate, then that is basically just 128 vector registers, each holding 16 x 16bit ints 2021-05-30 21:08 was kinda nice to work with 2021-05-30 21:08 doug16k: but knowing how the matrix works, lets you mix&match bit widths, do free high/low halfword slicing, and matrix rotation 2021-05-30 21:09 so you could treat each slice, as a self-contained vector reg, but then your loosing features 2021-05-30 21:09 what is the real width 2021-05-30 21:10 bit width or lane width? 2021-05-30 21:10 if you pipelined back to back mul add that are sufficiently independent, how wide before it all takes more cycles 2021-05-30 21:11 ya is it actually 4-wide or what 2021-05-30 21:11 my original speed test, basically did `a = a * 2;` in a loop, and measured it to be 2 cylces per set of 16 mults 2021-05-30 21:11 so thats 16 lanes wide, 2 clock cycles, with each mult directly consuming the previous result 2021-05-30 21:12 yes but there is a loop dependency 2021-05-30 21:12 you stall yourself until mul latency elapses each iteration 2021-05-30 21:13 ah, but this wasnt repeating right away 2021-05-30 21:13 it might have been able to fit two or three muls in between 2021-05-30 21:13 this was a REP64 opcode 2021-05-30 21:13 ah 2021-05-30 21:13 so it was more like doing an int[16*64] based mult, 16 at a time 2021-05-30 21:14 and it measured 128 cycles 2021-05-30 21:14 that's why I ask the real width. you would not generate crazy wide vectors if you were doing fully optimized AoSoA code 2021-05-30 21:14 all signs point towards it being 16 wide, because it can only ever operate on vectors of 16 elements 2021-05-30 21:15 256 bit seems good and reasonable 2021-05-30 21:15 it is capable of 32bit x 16, so each ALU input is 512 bits i think 2021-05-30 21:15 but only for adds and basic boolean 2021-05-30 21:16 writing up a pure-c implementation should serve as a much simpler way to document it all 2021-05-30 21:16 yeah, you will be an expert in the ISA by the time you fully debug C code that emulates it :D 2021-05-30 21:17 and get it to match real thing 2021-05-30 21:17 one tricky problem though, is generating the inline asm 2021-05-30 21:17 lets say i write a function/macro call like this: foo(1,2,3) 2021-05-30 21:17 how can it turn into asm volatile ("foo HX(1,2), 3"); ?? 2021-05-30 21:17 easy 2021-05-30 21:18 static inline. I have 100 or so in my project 2021-05-30 21:18 got a link? 2021-05-30 21:18 you can do compile time constants 2021-05-30 21:19 for the asm version, it needs to be a constant, that becomes a string literal 2021-05-30 21:19 did you mean registers when you said 1 2 3 2021-05-30 21:19 a literal 1,2 in the inline asm 2021-05-30 21:19 ok, yeah you can do that 2021-05-30 21:19 asm volatile ("v32or HY(2, 0), HY(2, 0), HY(4,0) IFNZ"); 2021-05-30 21:19 i need to generate inline asm like this, from function args 2021-05-30 21:19 but also accept those args as proper ints, so the pure-c version can index into the matrix 2021-05-30 21:20 https://github.com/doug65536/dgos/blob/master/kernel/arch/x86_64/cpu/control_regs.h#L229 2021-05-30 21:20 ​github.com: dgos/control_regs.h at master · doug65536/dgos · GitHub 2021-05-30 21:20 it injects the dr number 2021-05-30 21:21 should work for parameter if caller passes constant 2021-05-30 21:21 ahhh, the "i" part! 2021-05-30 21:21 for immediates in inline asm! 2021-05-30 21:21 yeah 2021-05-30 21:21 that should work out perfectly, and you solved my long-standing question of named args 2021-05-30 21:22 I am a named inline asm argument enthusiast 2021-05-30 21:22 does dr have to be a template arg? 2021-05-30 21:22 don't think so 2021-05-30 21:22 i'll try things both ways 2021-05-30 21:22 if you pass a constant and it is inline as hell like that, should work 2021-05-30 21:22 templating kinda makes things simpler, since i can use a std::pair 2021-05-30 21:23 one thing i didnt mention, is that matrix coords, have both an immediate, and a register component 2021-05-30 21:23 HX(0,0)+r0 2021-05-30 21:23 inline asm enthusiast is the scariest thing I've ever heard 2021-05-30 21:23 the immediate, must be aligned correctly to the bit-width, but r0 then contains a pair of 6bit offets, for the row/col, allowing non-aligned access 2021-05-30 21:24 that also allows programatic movement of the algo 2021-05-30 21:24 so i could have a function that operates on a 16x16 chunk of data, and then point it to a specific chunk at runtime 2021-05-30 21:27 doug16k: do other cpu's allow you to change what regs a vector op acts on, at runtime? 2021-05-30 21:27 yes 2021-05-30 21:27 there have been ones where you can just set an arbitrary number for vector width 2021-05-30 21:27 ah, so its not that special 2021-05-30 21:28 yeah, ive heard that the new arm specs, allow that 2021-05-30 21:28 it's very forward compatible 2021-05-30 21:28 yep, arm SVE and the new riscv vector stuff uses that sceheme 2021-05-30 21:28 someday when it is 1024-bit wide, it will run DOOM at 2400fps instead of 1400 2021-05-30 21:28 hardware supports vectors up to N, user spce can dynamically set the width U <= N and then do a series of ops 2021-05-30 21:30 actually one more level of abstraction: hardware has H bits, kernel enables K bits of it (whatever it's willing to context switch) and user space can set U width on the fly 2021-05-30 21:30 and U <= K <= H 2021-05-30 21:30 yeah, that makes sense 2021-05-30 21:31 (x/y/z)mm go brrr 2021-05-30 21:31 i forget f ARM has a scheme to remember the highest water mark user space has used since the last time it was cleared, for essencitally xsave-like-optimizations 2021-05-30 21:32 https://www.twitch.tv/asahigpu alyssa working on m1 gpu driver 2021-05-30 21:32 ​'asahigpu (live) 2021-05-30 21:32' by asahigpu (live) 2021-05-30 21:32 riscv i think might? it actually for FPU stuff has a nice 2 bit scheme to remember not only if user space touched the fpu but if they wrote to it 2021-05-30 21:33 4 states is think? disabled, clean, accessed, dirty or something like that 2021-05-30 21:34 j`ey, 0/10 not in a hot tub 2021-05-30 21:34 that matches up with how my kernel sees fpu exactly :) 2021-05-30 21:34 doug16k: yah it's nice. though *really* the read vs write states are kinda extraneous, but i guess they're basically 'free' to hardware so may as well 2021-05-30 21:34 heat: lol 2021-05-30 21:34 like, how often does user space code just read from the fpu and not write it 2021-05-30 21:34 possible on riscv it may be more than i think, like some access of some fpu condition register in a read only mode in some software patterns 2021-05-30 21:36 well, i guess it's less of a hardware point of view and more that read vs dirty states are useful f you dont want to lazy fpu save, but you'd at least like to know if user code never wrote to it 2021-05-30 21:37 so you can context restore it, set the 'read' state and then on the next context switch not bother saving it if they never wrote it 2021-05-30 21:37 i thought the standard was to not do any lazy fpu? 2021-05-30 21:37 but ou dont want to bother doing the classic scheme of leaving it disabled, trapping, and restoring it there 2021-05-30 21:37 heat: depends on the arch. classically speaking most arches have been lazy fpu saving forever 2021-05-30 21:37 it works correctly on amd 2021-05-30 21:37 intel kinda ruined it recently by having a spectre thing 2021-05-30 21:38 but... x86 also has the very rich and powerful xsave stuff which also hyper optimizes it so much that it's kinda 'free' 2021-05-30 21:38 I remember linux ditched lazy fpu for x86 in 2015, maybe 2016? 2021-05-30 21:38 not sure, but around that time 2021-05-30 21:38 possibly only if has xsave 2021-05-30 21:38 yeah they made xsave/xrstor lazy and able to know whole chunks of context are zeros 2021-05-30 21:38 or xsaveopt or whatever which one the current one is 2021-05-30 21:39 but then spectre says we cant have nice things so i think that nailed that particular coffin 2021-05-30 21:39 xsaves is best, with xsaveopt close behind 2021-05-30 21:39 but, on risc or pseudo risc arches like arm and riscv you have to do it all manually 2021-05-30 21:39 so you probably want at least one level of 'did user space even touch it?' fpu save 2021-05-30 21:40 defaulted to no-lazy for every x86 cpu in early 2016 2021-05-30 21:40 not necessarily full 'trap and lazy restore' but more like 'leave disabled, trap so i know its dirty' 2021-05-30 21:40 before that it was xsave-only 2021-05-30 21:40 heat: well okay then! 2021-05-30 21:40 doug16k: hmmm, another templating problem, i need 3 versions of a function, 8bit, 16bit, and 32bit, then need to pick the right uint8_t for internal usage, but also insert an 8/16/32 literal in the asm... 2021-05-30 21:40 doug16k: maybe sizeof(t)*8 as a const expr? 2021-05-30 21:40 you could use overload resolution 2021-05-30 21:40 do you have integral_constant 2021-05-30 21:41 no idea 2021-05-30 21:41 so on fuchsia for example we do a partial fpu lazy saveon arm. we dont leave old state from previous threads on it, so we always fpu save if dirty 2021-05-30 21:41 "It seems that, on any remotely recent hardware, eagerfpu is a win: glibc uses SSE2, so laziness is probably overoptimistic, and, in any case, manipulating TS is far slower that saving and restoring the full state. (Stores to CR0.TS are serializing and are poorly optimized.)" 2021-05-30 21:41 but i think we delay the loading until a trap 2021-05-30 21:41 and there's a TODO to see if that's even worth it 2021-05-30 21:41 right, it also has a lot to do with how user spae uses the fpu. so on x86 yah SSE is used like crazy so there's kinda no point 2021-05-30 21:42 arm64 i think the vector bits are used a bit less aggressively... 2021-05-30 21:42 OTOH last time i timed the full ector load/store on a recent ARM core it was pretty fast 2021-05-30 21:42 like 20 cycles or so? so really it's no big deal 2021-05-30 21:43 really blatting out a large chunk of sequential registers is what modern cpus crave so 2021-05-30 21:43 clever, https://github.com/doug65536/dgos/blob/master/kernel/lib/cc/type_traits.h#L28 then add a parameter integral_constant::type parameter to each variation, and call it with integral_constant::type() in that place 2021-05-30 21:43 ​github.com: dgos/type_traits.h at master · doug65536/dgos · GitHub 2021-05-30 21:43 is that what you mean? 2021-05-30 21:44 heat: i think the key would be something like avx512 vs SSE. *however* by the time you get cpus with avx512 you have xsave which can optimize for not saving/restoring more than was dirtied 2021-05-30 21:44 you could make it nice to read by typedefing the different sizes to use for that parameter that is just there for overload selection 2021-05-30 21:44 so it's all good 2021-05-30 21:44 doug16k: maybe, let me get an example ready... 2021-05-30 21:45 on something like ARM where SVE can end up with even more state, if there's not hardware tracking support for how much of the upper registers were touched, then it's back to some sort of trap-n-track solution again 2021-05-30 21:45 i can see a scheme where you report to user space that there are 512 byte vectors, but then disabling it to 128, and trapping when user space actually tries to use upper bits 2021-05-30 21:45 then, bumping some water mark on the thread, maybe allocating more state, and eenabling that much register 2021-05-30 21:46 sorry, integral_constant 2021-05-30 21:47 geist: i'm not entirely sure what linux does for avx512 but I would assume it's the Intel Sanctioned(tm) way to do fpu save/restore with it 2021-05-30 21:47 considering they probably had that in mind 2021-05-30 21:48 this does all kinds of song and dance to boil it down to being so many bits, then does the right l or ll nonsense: https://github.com/doug65536/dgos/blob/master/kernel/lib/bitsearch.h 2021-05-30 21:48 ​github.com: dgos/bitsearch.h at master · doug65536/dgos · GitHub 2021-05-30 21:48 maybe xsave is still crazy fast with 512? who knows 2021-05-30 21:49 like line 103 2021-05-30 21:49 heat: i think xsave just does what you want 2021-05-30 21:49 it tracks which parts of the registers are dirty, etc 2021-05-30 21:49 and code is encouraged to use xzeroupper/etc which xsave can pick up on 2021-05-30 21:50 linux doesn't do that though 2021-05-30 21:50 clever, line 176 magically calls the right one 2021-05-30 21:50 I think we had reached that conclusion 2021-05-30 21:50 really its all about having to allocate that much save state for each thread. one of the reasons we haven't added support for avx512 yet in zircon 2021-05-30 21:50 at least for vzeroupper 2021-05-30 21:50 it's aTODO task but 2021-05-30 21:50 heat: hmm, in what case? 2021-05-30 21:50 geist, on the syscall path 2021-05-30 21:51 i'm talking about a generic context switch. like you preempted user space and it was doing something 2021-05-30 21:51 doug16k: ah, one template, calling another template, but using sizeof to fill in the gaps 2021-05-30 21:51 yeah 2021-05-30 21:51 ah yeah but context switch works the same if it came out of syscall or a preemption 2021-05-30 21:51 and parameter type with unused value selecting which overload 2021-05-30 21:51 but you're right, you'd think linux would vzeroupper and they dont which is lame. 2021-05-30 21:51 doug16k: let me start the code, and try some things, then maybe ask for help... 2021-05-30 21:51 on syscall 2021-05-30 21:52 yeah only mentions vzeroupper on crypto code 2021-05-30 21:53 right, because that's the only real part where the kernel actively uses the vector bits 2021-05-30 21:53 otherwise it just 'passes them through' from user space 2021-05-30 21:53 and the context switch routine saves it as basically user state 2021-05-30 21:57 right but there is a long stall penalty for transitioning between 128 and 256 bit operation, if it is 256 maybe you should leave it 2021-05-30 21:57 sometimes that would help too though 2021-05-30 21:58 I think it has to wait for all the 256 bit aware vex stuff retire before it can begin the "assume upper is zero" code 2021-05-30 21:59 maybe zeroing upper wouldn't affect that actually 2021-05-30 21:59 would just cause better init optimization 2021-05-30 22:00 my stuff guarantees zero fpu on every syscall return 2021-05-30 22:00 i just remembered a weird situation i discovered many months ago 2021-05-30 22:00 if your syscall got preempted I don't save it 2021-05-30 22:01 a process was consuming 100% cpu, and strace said it was doing nothing at all 2021-05-30 22:01 and it remained like this for over 10 minutes 2021-05-30 22:01 after poking around with gdb and getting a backtrace, i found the cause 2021-05-30 22:01 compression 2021-05-30 22:02 it was ram->ram compression, with pre-allocated buffers, so it never had to do a single syscall 2021-05-30 22:05 Was a basic kernel a good idea 2021-05-30 22:05 or is c the only good choice? 2021-05-30 22:06 best thing is, when pthreads gives up and futex blocks, it doesn't save it. and when futex wait wakes up, it doesn't restore it 2021-05-30 22:06 subjective 2021-05-30 22:06 it zeros it on way back to user 2021-05-30 22:07 Do you use qemu? 2021-05-30 22:07 of course it does preserve fcw and mxcsr 2021-05-30 22:07 I do yes 2021-05-30 22:09 language doesn't matter 2021-05-30 22:09 if it mattered then we wouldn't be using the same one so widely for so long 2021-05-30 22:10 the one that stops you least wins 2021-05-30 22:11 it's like thinking we can make buildings never collapse if only we make the perfect way for architects to write the design down 2021-05-30 22:12 Well, I would like a job working on an OS 2021-05-30 22:13 but I'm kinda C-illiterate 2021-05-30 22:13 I can't write C code well 2021-05-30 22:13 Taking some classes to get it down 2021-05-30 22:14 As for what a user wants 2021-05-30 22:14 they want a GUI most of the time 2021-05-30 22:15 I'm thinking of writing some tutorials 2021-05-30 22:16 please dont. 2021-05-30 22:17 There's other things besides tutorials I can do 2021-05-30 22:17 I'm kinda emulating Fravia+ 2021-05-30 22:18 Wanting to see if there is an ultimate destination for applications 2021-05-30 22:18 I'll hold off 2021-05-30 22:18 what the heck is fravia? 2021-05-30 22:21 i was super confused 2021-05-30 22:21 turns out I /ignore'd skyz 2021-05-30 22:21 lol 2021-05-30 22:21 Making money with free software is like making money as a musician. It's possible, but most of the time it's not about the content so much as it's the celebrity. 2021-05-30 22:22 Well 2021-05-30 22:22 Open SOurce software doesn't have to be free software 2021-05-30 22:22 free as in free 2021-05-30 22:23 no, but you're even less likely to make money on non-free oss than on free oss 2021-05-30 22:23 Somehow I missed the point somewhere 2021-05-30 22:25 Fravia is a reverse engineer 2021-05-30 22:27 He is grey hat 2021-05-30 22:27 Been working on trying to do something that is for the protection of software 2021-05-30 22:29 heat: yah i had too 2021-05-30 22:29 but my other clients were seeing it and i was like oooh 2021-05-30 22:31 Skyz: Your continued endeavour of hopping from platform to platform, community to community, making zero sense and demonstrating zero knowledge of anything you are asking about has reached a new level of annoyance that my local authorities will doubtless qualify as harassment. 2021-05-30 22:31 No harassment intended 2021-05-30 22:33 when are .eh_frame and .eh_frame_hdr relevant? 2021-05-30 22:33 skyz is like the libyians in back to the future 2021-05-30 22:33 heat, stack traces and exception unwind 2021-05-30 22:33 you think you lose them and then he shows up in a vw van with a rpg 2021-05-30 22:33 doug16k: but in-process unwinding or debugger? 2021-05-30 22:34 _hdr provides a lookup table that speeds up lookup of relevant cfi records for a given pc 2021-05-30 22:34 debugger and in process if runtime unwinding like a fancy longjmp that calls landing pads, or full c++ landing pads 2021-05-30 22:35 you can make it so C can call C++ that has landing pads that calls C, and if that C longjmps right over C++ it will clean up 2021-05-30 22:35 _Unwind_ForceUnwind 2021-05-30 22:36 so yeah even C uses it 2021-05-30 22:36 I'm seeing zircon does -fno-unwind-tables and linux does -fno-asynchronous-unwind-tables 2021-05-30 22:36 but if you don't force unwind at runtime ever you could discard it 2021-05-30 22:36 i'm struggling to understand why 2021-05-30 22:36 yeah it is turning off support for what I described 2021-05-30 22:36 it means don't allow foreign exceptions to propagate through the code 2021-05-30 22:37 so generate potentially a lot less CFI 2021-05-30 22:37 what foreign exceptions? 2021-05-30 22:37 C++ exceptions? 2021-05-30 22:37 yes or any language 2021-05-30 22:37 the way the abi works, all languages can do their own thing and everyone can invoke it 2021-05-30 22:38 no-asynchronous-unwind means "please don't support full exception unwind as if I were C++" 2021-05-30 22:39 and -fno-unwind-tables? 2021-05-30 22:40 never heard of it 2021-05-30 22:40 all I want is to have so debug info for the debugger to look at, I don't want to use any at runtime 2021-05-30 22:40 then you want no asynchrous unwind fno-exceptions 2021-05-30 22:40 may be no-unwind-tables is stronger? i dont thnk it was inherited from Lk 2021-05-30 22:41 maybe arm exception abi thing? 2021-05-30 22:41 possible 2021-05-30 22:41 heat: is it in one of the two compiler paths and/or arch specific section? 2021-05-30 22:41 oh I found it 2021-05-30 22:42 unwind-tables means just generate the data but don't affect codegen with unwind 2021-05-30 22:42 geist, no 2021-05-30 22:42 https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/kernel/BUILD.gn;l=229 2021-05-30 22:42 ​cs.opensource.google 2021-05-30 22:42 oh well there's a whole comment about it 2021-05-30 22:43 says it keeps asynchronous unwind tables but discard eh_frame 2021-05-30 22:46 does actually remind me. after years of completely eschewing C++ exceptions 2021-05-30 22:46 how bad is it really? (codegen and usability) 2021-05-30 22:46 looks like making the unwind data not runtime data makes it go into .debug_frame 2021-05-30 22:46 doug16k: https://gist.github.com/79143cb23a50d572b9d527c9ea479492 my first pass, its only tested to compile, but the code looks like it should do what i intend 2021-05-30 22:46 ​gist.github.com: simple-test.c · GitHub 2021-05-30 22:47 doug16k, I tried both options and I still get huge eh_frames 2021-05-30 22:48 heat, look at the cfi records to see where they come from 2021-05-30 22:48 objdump --dwarf 2021-05-30 22:48 pc=fffff..... 2021-05-30 22:49 look up what 2021-05-30 22:49 ...in the disassembly 2021-05-30 22:49 sorry for speaking vertically 2021-05-30 22:49 having fno-unwind-tables or not makes no difference in the section's size 2021-05-30 22:50 no 2021-05-30 22:50 problem 2021-05-30 22:50 :) 2021-05-30 22:51 mine shows the stuff in .eh_frame first 2021-05-30 22:52 what you want is everything in .debug_frame 2021-05-30 22:55 those options seem to make absolutely no difference 2021-05-30 22:55 * heat tries with gcc 2021-05-30 22:55 doug16k: now i need to use templates like your example, to dedup this... https://gist.github.com/cleverca22/79143cb23a50d572b9d527c9ea479492#file-vpu-support-purec-h-L27-L57 2021-05-30 22:55 ​gist.github.com: simple-test.c · GitHub 2021-05-30 22:56 you can force instantiate each variation, so everyone can assume they can call the one instance, so it's as good as preprocessor hacking 2021-05-30 22:56 oh it works with gcc, not with clang 2021-05-30 22:56 is this gcc specific? 2021-05-30 22:57 you have -fno-exceptions ? 2021-05-30 22:57 clang never complains but the eh_frames are still huge 2021-05-30 22:57 yes 2021-05-30 22:57 that alone should go far to shut up with the cfi 2021-05-30 22:58 with gcc I have eh frames of size ~0x30 2021-05-30 22:58 my man clang only even mentions unwind in fexceptions 2021-05-30 22:58 compared to several hundred KB 2021-05-30 23:01 it isn't expected to even get touched if it is good program that uses exceptions correctly 2021-05-30 23:02 demand paging would be a good excuse to say screw it and generate it 2021-05-30 23:02 right it's all about disk usage in a demand paged system 2021-05-30 23:07 doug16k: first thing i notice, `movdqa 0xfb4(%rip),%xmm0`, gcc is vectorizing things for me! 2021-05-30 23:07 clever, yes, you can make it try hard with -ftree-vectorize 2021-05-30 23:08 doug16k: from the code in the gist i linked above, how would i select between MATRIX8_WRITE and MATRIX16_WRITE, based on the type of T? 2021-05-30 23:10 just throw in some dumb if statements maybe? if (sizeof(T) == 2), and let const-expr eliminate the negative cases? 2021-05-30 23:10 could do that 2021-05-30 23:10 and that could itself be another static inline 2021-05-30 23:10 with template 2021-05-30 23:10 in newer C++ you can force it to be compile time with constexpr if 2021-05-30 23:10 public static inline private constexpr 2021-05-30 23:12 v16ld and v8ld could even not be inline 2021-05-30 23:14 doug16k: what would i gain from not being inline? 2021-05-30 23:14 if it is C code, being inline wouldn't help nearly as much as if it is emitting a real vector instruction 2021-05-30 23:15 you might cause more cache misses than the call overhead saving 2021-05-30 23:15 the real vector instructions will be compact 2021-05-30 23:15 gist updated 2021-05-30 23:15 they should be inline 2021-05-30 23:16 i think its compiling down to just 2 vector opcodes right now, plus the normal prologue/epilog 2021-05-30 23:17 http://www.jaist.ac.jp/iscenter-new/mpc/altix/altixdata/opt/intel/vtune/doc/users_guide/mergedProjects/analyzer_ec/mergedProjects/reference_olh/mergedProjects/instructions/instruct32_hh/vc183.htm 2021-05-30 23:17 ​www.jaist.ac.jp: MOVDQA--Move Aligned Double Quadword 2021-05-30 23:17 movdqa 0xfb4(%rip),%xmm0 2021-05-30 23:18 doug16k: does the intel vs at&t plauge extend even to the mmx opcodes??? 2021-05-30 23:18 no that is the same as normal 2021-05-30 23:18 intel has movdqa 2021-05-30 23:19 according to the docs, the 2nd argument is the source 2021-05-30 23:19 usually you see movaps - single precision one 2021-05-30 23:19 but looking at the asm, the first thing it does, is save an mmx reg (it never write to), to ram! 2021-05-30 23:19 dqa is integer one 2021-05-30 23:19 clever: of course. itd be even weirder if they flipped styles for new instructions 2021-05-30 23:19 gotta at least be consistent 2021-05-30 23:20 the docs are intel syntax. the second argument is normally the source 2021-05-30 23:20 geist: so is the above a reg->ram or ram->reg operation? when looking at `objdump -d` with all defaults 2021-05-30 23:20 last arg is destination even for avx 2021-05-30 23:20 left to right in at&t, right to left intel 2021-05-30 23:20 though i think it's a bit more subtle 2021-05-30 23:21 more like A, B, C at&t 2021-05-30 23:21 C, A, B intel 2021-05-30 23:21 ah, so that plague does continue, and objdump doesnt agree with the intel docs i linked 2021-05-30 23:21 since most opcodes on x86 are 2 address, it's less obvious 2021-05-30 23:21 tell objdump to use intel syntax if that's a problem 2021-05-30 23:21 doug16k: yeah, checking the --help now 2021-05-30 23:21 otherwise just deal with it 2021-05-30 23:22 -M intel-mnemonic now says `movdqa xmm0,XMMWORD PTR [rip+0xfb4]` 2021-05-30 23:23 of course 2021-05-30 23:23 now it agrees with the docs, and is a bit more verbose 2021-05-30 23:23 says exact same thing as the at&t you said earlier 2021-05-30 23:23 just way longer 2021-05-30 23:23 yep 2021-05-30 23:24 movups XMMWORD PTR [rax],xmm0 2021-05-30 23:24 the assembler doesn't need your help knowing it is an xmmword ptr 2021-05-30 23:24 my first guess, looking at this asm, is that its just a 16 byte ram->reg->ram copy? 2021-05-30 23:24 where's on earth k thanks bye 2021-05-30 23:25 ndisasm uses 'oword' rather than 'XMMWORD PTR' 2021-05-30 23:25 which is a bit nicer 2021-05-30 23:26 movaps loads 128 bits yes 2021-05-30 23:26 so does movdqa 2021-05-30 23:26 loads or stores 2021-05-30 23:26 ah, so its more of a dumb uint128_t based mov, and how you interpret those bits, depends on what opcode you use later 2021-05-30 23:26 must be aligned. there are "u" variants that work unaligned 2021-05-30 23:27 right 2021-05-30 23:27 it's a bag of bits in movaps movdqa world 2021-05-30 23:27 i do wonder if o modern x86s the aligned/unaligned version make any different 2021-05-30 23:27 no difference 2021-05-30 23:27 is there an implied weak memory model on the unaligned stuff maybe? 2021-05-30 23:27 there's a cpuid bit to see if u is worse 2021-05-30 23:27 ah 2021-05-30 23:28 newer will handle aligned and unaligned the same. older are slower on unaligned 2021-05-30 23:28 doug16k: iirc movaps and movdqa function as a hint of some sort 2021-05-30 23:28 tells it which domain it is 2021-05-30 23:28 like if you're goign to actually do floating ops you should use the float instruction, or int ops you should use the int instruction 2021-05-30 23:28 but if you're just shuffling memory doesn't matter 2021-05-30 23:28 there is a 1 cycle penalty when transition between integer and float domain 2021-05-30 23:28 right 2021-05-30 23:29 oh so in that case it's probably better to prefer the *ps instructions to the others? 2021-05-30 23:29 because somebody else was most likely already using the simd regs for fp math, so you don't want to transition? 2021-05-30 23:29 what matters is what domain the upcoming instruction that uses the value is 2021-05-30 23:30 if you movaps then srli then it's not good 2021-05-30 23:30 uses the value, but doesn't matter if it writes to it? 2021-05-30 23:30 if you movdqa then addps it is not good 2021-05-30 23:30 like if I movdqa xmm3, whatever; addpd xmm3, xmm2, xmm1 does that pay the penalty? 2021-05-30 23:30 now to implement a vst function, and test dumping the matrix contents... 2021-05-30 23:30 yes 2021-05-30 23:31 so it is better to use the fp instructions for shuffling memory, assuming the fp instructions are generally more common 2021-05-30 23:31 oh it breaks the dependency though 2021-05-30 23:31 what matters is the latency between two things in a dependency chain 2021-05-30 23:31 wrong domain = 1 extra cycle of latency 2021-05-30 23:32 you can interleave the two domains no problem in instruction scheduling 2021-05-30 23:32 what matters is what domain that register is 2021-05-30 23:32 honeslty still surprised with ERMS that there's still some ability to moe data faster with AVX in some situations, or so i have heard 2021-05-30 23:32 seems like a proper erms internal implementation is just directly fed into the load/store unit 2021-05-30 23:33 there's a startup cost I think 2021-05-30 23:33 doug16k: hmm, can simd registers be renamed? 2021-05-30 23:33 thoguh i guess it still has to mess with the corresponding integer registers and whatnot because it can still be interrupted 2021-05-30 23:33 yes 2021-05-30 23:33 massively renamed 2021-05-30 23:33 then if you're just writing to the register in the wrong domain, couldn't you rename to avoid the penalty? 2021-05-30 23:34 template static inline void matrix_write(int x, int y, T value) 2021-05-30 23:34 how would i help gcc infer the return type? error: there are no arguments to 'matrix_read' that depend on a template parameter, so a declaration of 'matrix_read' must be available 2021-05-30 23:35 oops, for template static inline T matrix_write(int x, int y) { 2021-05-30 23:35 yah that can't be implicitly deduced because return type 2021-05-30 23:35 thought some of the newer bits with auto maybe can? 2021-05-30 23:36 i never know precisely how you can use auto in function declaractions, so i usually just try and see and soetimes it surprises you 2021-05-30 23:36 how would i specify it?, since i have the same T param one function call up 2021-05-30 23:36 you can force it like matrix_write(... 2021-05-30 23:36 2+2 would make int 2021-05-30 23:36 *bad_things would be bad_type_t 2021-05-30 23:37 reference? 2021-05-30 23:37 or const reference if bad_things is a pointer to const 2021-05-30 23:38 clever: I don't see how you could infer the return type. But you can make your call be matrix_write(whatever, whatever> 2021-05-30 23:38 that's why you see std::remove_reference::type 2021-05-30 23:38 dst[(stride*r) + i] = matrix_read(x,y+i); was accepted by the compiler 2021-05-30 23:38 you got it 2021-05-30 23:38 ah, matrix_read is also accepted 2021-05-30 23:38 it wasnt before, due to typos 2021-05-30 23:39 of course if you have it already, use it :) 2021-05-30 23:39 i prefer over dst[0], i want to give it a type, not a random element from an array of that type 2021-05-30 23:39 if it were auto and your code really didn't know, you could use my decltype trick to escape it 2021-05-30 23:41 vpu-support> include/vpu-support-purec.h:30:27: error: cannot bind non-const lvalue reference of type 'unsigned char&' to an rvalue of type 'unsigned char' 2021-05-30 23:41 vpu-support> 30 | return matrix[x][y] | (matrix[x][y+16] << 8); 2021-05-30 23:41 if you find yourself not having a clue what type, but you have an expression that is that type, you can use decltype 2021-05-30 23:42 yah decltype is pretty much always 'the type of whatever this is' iirc 2021-05-30 23:42 that's why I mentioned the remove_reference thing 2021-05-30 23:42 yeah, i think i see why that worked now, its just returning the T type back out of T*dst 2021-05-30 23:43 oh, i think i kinda see what the above problem is now 2021-05-30 23:43 the 16bit read, is being compiled, when T is 8bit 2021-05-30 23:43 and const-expr hasnt eliminated that branch yet 2021-05-30 23:44 the above, is under a case 2, of switch (sizeof(T)) { 2021-05-30 23:44 i need a constexpr flag, to make it entirely abort the other case sections? 2021-05-30 23:45 movdqa xmm0,oword [rel 0xfbc] 2021-05-30 23:45 use constexpr if you can yeah 2021-05-30 23:45 it authorizes open season taking all assumptions about it 2021-05-30 23:46 hmmm 2021-05-30 23:46 why would -O2 generate bad debug info? 2021-05-30 23:46 each newer version of C++ supports doing more impressive things in constexpr 2021-05-30 23:46 -O0 works fine 2021-05-30 23:47 `constexpr int s = sizeof(T); switch (s) {` didnt help 2021-05-30 23:47 same error as i pasted above 2021-05-30 23:48 heat, what does this say: your-cross-objdump --dwarf your-thing 2>&1 >/dev/null | wc -l 2021-05-30 23:49 doug16k, O0 or with opt? 2021-05-30 23:49 when bad debug info 2021-05-30 23:49 that asks for all complaints about dwarf data to be sent to wc 2021-05-30 23:50 1 2021-05-30 23:50 "x86_64-onyx-objdump: Warning: Location lists in .debug_loc section start at 0x180" 2021-05-30 23:50 mine is 0 2021-05-30 23:51 this problem only arises with clang 2021-05-30 23:51 on system objdump, loads of warnings 2021-05-30 23:51 gcc works okay 2021-05-30 23:51 ah 2021-05-30 23:51 I don't get a "oh this was optimised out and whatever", I just get garbage 2021-05-30 23:52 the stack trace is accurate, the other debug info isn't 2021-05-30 23:52 what if you use -g3 instead of -g 2021-05-30 23:52 when I switched on O0, I get good values 2021-05-30 23:52 or -ggdb 2021-05-30 23:52 hold on 2021-05-30 23:53 I have coerced screwy debug to work by plaing with -g 2021-05-30 23:54 nope 2021-05-30 23:54 -g3 gives me garbage still 2021-05-30 23:54 what if you turn off the fancy value tracking stuff 2021-05-30 23:54 so it doesn't try so hard to always see register variables right 2021-05-30 23:55 how do I do that? 2021-05-30 23:55 -fno-var-tracking -fno-var-tracking-assignments 2021-05-30 23:56 yeah, i'm just totally stuck 2021-05-30 23:56 turns off heroic attempts to track register variables 2021-05-30 23:56 no matter what i do, gcc refuses to let me do a <<8 with an uint8_t return type 2021-05-30 23:56 clever, anything << 8 is zero if uint8_t 2021-05-30 23:57 shift in 8 zeros from the right 2021-05-30 23:57 doug16k: it was the decltype! 2021-05-30 23:57 dst[(stride*r) + i] = matrix_read(x,y+i); compiled 2021-05-30 23:57 nope 2021-05-30 23:57 dst[(stride*r) + i] = matrix_read(x,y+i); failed 2021-05-30 23:58 doug16k: and that <<8, was in a `if (sizeof(T) == 2)` block, so it would never run for uint8_t 2021-05-30 23:58 but with decltype, it was being fussy 2021-05-30 23:59 that's probably why I do it with overloads 2021-05-31 00:00 I am not a fan of relying on optimizer to do what I didn't say 2021-05-31 00:00 use constexpr if if you have C++ 2021-05-31 00:01 it will do it at compile time and utterly discard the other case(s) 2021-05-31 00:01 it's the fix for that overload trick I mentioned 2021-05-31 00:01 that's one of the metaprogramming songs and dances 2021-05-31 00:01 ok, so after .... 2 hours, i have implemented 2 opcodes, lol 2021-05-31 00:07 but things are now working, and templated up the wazoo! 2021-05-31 00:08 https://gist.github.com/cleverca22/79143cb23a50d572b9d527c9ea479492#file-simple-test-cpp-L4-L28 2021-05-31 00:08 ​gist.github.com: simple-test.cpp · GitHub 2021-05-31 00:08 the matrix printing function is also using templates, to adjust the printf format string, and dump the right width from the matrix 2021-05-31 00:09 doug16k: it looks like it's a known llvm/clang issue 2021-05-31 00:11 https://cs.opensource.google/fuchsia/fuchsia/+/main:build/config/BUILD.gn;l=297?q=dwarf_version&ss=fuchsia%2Ffuchsia <-- fuchsia agrees 2021-05-31 00:11 ​cs.opensource.google 2021-05-31 00:18 https://i.imgur.com/BvNeVlP.png 2021-05-31 00:21 bytebill? 2021-05-31 00:22 storage unit currency 2021-05-31 00:22 geist: ah yet another wrinkle in using WSL. apparently the xfonts used by default Xorg are not installed by default 2021-05-31 00:22 xming forces you to download them separately for some reason 2021-05-31 00:23 i guess it can't use the ones from the WSL instance so... 2021-05-31 00:25 you might be able to use xfs if unix domain sockets are supported, just a thought. 2021-05-31 00:25 doug16k: vpu-support-vc4-elf> include/vpu-support-native.h:10:20: warning: asm operand 2 probably doesn't match constraints 2021-05-31 00:26 i dont think so, on windows anyway 2021-05-31 00:26 doug16k: when using the immediate constraint, the arg cant be a normal function arg, and i cant flag it as constexpr either 2021-05-31 00:28 if you __attribute__((__optimize__("O2"), __always_inline__, __flatten__)) it should 2021-05-31 00:28 that's how you jump up and down and scream at gcc to inline 2021-05-31 00:29 i think moving it to template params also worked 2021-05-31 00:29 `template static inline void vst` 2021-05-31 00:29 of course it does 2021-05-31 00:29 that's compile time by definition 2021-05-31 00:29 yeah 2021-05-31 00:30 next problem, i need to do H( HY( or HX(, based on the sizeof(T) 2021-05-31 00:30 how do i insert string literals into the inline asm? 2021-05-31 00:30 rather then int literals 2021-05-31 00:31 johnjay, [xfs font server over ipv4 2021-05-31 00:31 preprocessor 2021-05-31 00:31 #define FOO(x, y) "movandstuffkthx r0," #x "," #y 2021-05-31 00:31 doug16k: but can #if even know what T is? 2021-05-31 00:32 since its happening before c++ gets involved... 2021-05-31 00:32 actually ya, just drop the # 2021-05-31 00:32 they are already strings 2021-05-31 00:32 i think the only option is a switch-case, and implement it 3 times 2021-05-31 00:32 "you " "can " "go" " like" " this" 2021-05-31 00:32 and let const-expr discard 2 versions 2021-05-31 00:33 #if can't know anything about T 2021-05-31 00:33 types are way above #if's pay grade 2021-05-31 00:33 thats what i expected 2021-05-31 00:34 https://en.cppreference.com/w/cpp/language/if see constexpr ones 2021-05-31 00:34 ​en.cppreference.com: if statement - cppreference.com 2021-05-31 00:35 it was made for exactly what you are trying to do 2021-05-31 00:35 everyone wishes they could just use if 2021-05-31 00:35 they can with constexpr one 2021-05-31 00:36 debug build never heard of const elimination. when you explain it to it it says "oh no, I need the dev to be able to just put the instruction pointer in another case whenever they want" 2021-05-31 00:37 constexpr if means don't even compile unless you can decide at compile time 2021-05-31 00:37 and don't even look at the code in arms of the constexpr if that aren't true 2021-05-31 00:37 doug16k: hmmm, and can constexpr allow you to do `constexpr const char *bar = "a"; asm("foo" bar);` ? 2021-05-31 00:38 no but #define bar "a" then asm("foo" bar); would work 2021-05-31 00:38 except, i need to select between H/HY/HX, based on sizeof(T) 2021-05-31 00:39 then there are three overloads with different "a" 2021-05-31 00:39 above them is a dispatcher that selects overload with integral constant or something 2021-05-31 00:39 and it's all flattened away so it boils down to innermost asm statement and nothing else 2021-05-31 00:42 you could probably just have a few if constexpr ... if constexpr ... that have the variants 2021-05-31 00:42 don't even need to layer the dispatch if you have C++17 or newer 2021-05-31 00:43 that pattern I did in bit_lsb_set_n works all the way back to ancient templates 2021-05-31 00:43 and there is no inline asm immediate syntax, where a char* can be injected directly into the asm? 2021-05-31 00:43 haven't attempted to 2021-05-31 00:44 try what I did in that dr register thing with a string literal 2021-05-31 00:46 ah you can't asm constexpr, obviously 2021-05-31 00:46 how's the compiler supposed to run that at compile time 2021-05-31 00:47 more, the string i'm passing to asm, is a constexpr 2021-05-31 00:47 at compile time, it can fully compute what that string is, and just shove it into the .S file 2021-05-31 00:47 the assembler then just assembles whatever that string turned into 2021-05-31 00:48 you need to use overloads and have each asm case hardcoded 2021-05-31 00:48 https://gist.github.com/cleverca22/79143cb23a50d572b9d527c9ea479492#file-vpu-support-native-h-L3-L28 2021-05-31 00:48 ​gist.github.com: simple-test.cpp · GitHub 2021-05-31 00:48 this is what i have so far 2021-05-31 00:49 based on what your saying, i need to define 6 versions of ld and st 2021-05-31 00:49 is it 6 different mnemonics? 2021-05-31 00:49 and for every other opcode, 36 versions 2021-05-31 00:50 for ld and st, the operand has 3 types, H(0,0) HY(0,0) and HX(0,0) 2021-05-31 00:50 you can get it down to less than horrible with preprocessor 2021-05-31 00:50 and there is a variant with and without REP%d 2021-05-31 00:50 I have one ugly bit that does that. one sec 2021-05-31 00:50 so that is 6 versions 2021-05-31 00:50 for v32add, the destination can be - H HX or HY, and the 2 inputs can each be H/HX/HY 2021-05-31 00:51 plus optional REP 2021-05-31 00:51 so 4*3*3*2 combinations, 72!!! 2021-05-31 00:51 https://github.com/doug65536/dgos/blob/master/kernel/device/pci.h#L572 2021-05-31 00:51 ​github.com: dgos/pci.h at master · doug65536/dgos · GitHub 2021-05-31 00:51 oh, and the SETF, and IFNZ stuff 2021-05-31 00:51 you can preprocessor trick it down to nothing 2021-05-31 00:52 yeah, i see, the macro is just letting you write those 6 copies more easily 2021-05-31 00:52 yeah 2021-05-31 00:52 but when you get to 72 different versions ..... 2021-05-31 00:53 I could unroll it one more and put those in a macro and so on 2021-05-31 00:53 wait, more, ALU inputs can also be immediate 2021-05-31 00:53 if I had 10 of all 6 of those 2021-05-31 00:53 and more, if i want to allow runtime offsets 2021-05-31 00:54 I usually say don't preprocessor trick, but I say don't write 72 slightly different things even louder 2021-05-31 00:54 might be 128 different variants 2021-05-31 00:54 every time i stop, i think of another exception 2021-05-31 00:57 go look at mmintrin.h. it's fine to have a stupid number of variations, that's what you expect 2021-05-31 00:57 i see the expression "since C23" and I'm confused. lol 2021-05-31 00:58 clever, in mmx intrinsics, wherever they wanted a template parameter, screw it, it's part of the name 2021-05-31 00:58 sse avx same 2021-05-31 00:59 then you layer on top of that the template type auto dispatch magic stuff 2021-05-31 01:00 johnjay, i get confused every time I remember C17 is a thing lol 2021-05-31 01:00 clever, surely you have seen this: https://software.intel.com/sites/landingpage/IntrinsicsGuide/ 2021-05-31 01:00 ​software.intel.com: Intel® Intrinsics Guide 2021-05-31 01:00 * johnjay sweating gif 2021-05-31 01:01 zen4 is expected to have avx512 2021-05-31 01:02 okay i fixed toaru32's atapi drivers, they weren't detecting error conditions correctly for devices without a medium, so they were just spinning waiting for a ready bit. 2021-05-31 01:02 "AMD Zen 4 rumor suggests much faster Ryzen CPUs for 2022, and even a 24-core monster" ah fuck off 2021-05-31 01:02 I was looking at getting a 5950x this summer 2021-05-31 01:02 now I'm :/ 2021-05-31 01:03 I am preparing to merge Misaka into mainline, so I should do one quick legacy release with that fix and then I need to do a bit of hacking on the bootloaders again as I want to use them for Misaka until my new Kuroko-based EFI loader is ready... 2021-05-31 01:03 doug16k: this would be a ton easier if the assembler supported H32 instead of HY ..... 2021-05-31 01:03 klange: do you do most of the dev in qemu or would you test something like that on actual hardware? 2021-05-31 01:03 I think I want to replace this menu system with just a simple line editor so you can change the boot mode... 2021-05-31 01:03 doug16k: maybe i should just patch as instead? lol 2021-05-31 01:03 heat, it will never end though. you'll be very happy compiling on 5950x, I assure you 2021-05-31 01:03 johnjay: I test across QEMU and VirtualBox regularly, VMware occasionally, and I have a dedicated hardware test rig but that boots with grub. 2021-05-31 01:04 doug16k: i'd be ecstatic even with a 3950x like yours 2021-05-31 01:04 i see 2021-05-31 01:04 I recently discovered schedutil. it boosts like crazy all the time now 2021-05-31 01:05 there's almost always at least one cpu above 4.2 2021-05-31 01:05 doug16k: scratch that, as already supports H16 and H32, ok, that makes it far simpler! 2021-05-31 01:05 it's galaxy quest "press the turbo and hold it down!" 2021-05-31 01:06 I moved ramdisk decompression into the kernel with Misaka, so I should be able to hack together a much simpler BIOS shim loader... maybe do it "right" with BIOS reads instead the thing toaru32 shipped with which was jumping straight to protected mode and doing ATAPI - gods help you if were trying to put that ISO on something other than CD. 2021-05-31 01:08 klange: ipxe can do bios style booting from an iscsi mount, and will hijack the bios read routines, to read a iscsi dev 2021-05-31 01:08 that sounds like it would ruin your current bootloader 2021-05-31 01:09 it would just not work, rather than "ruin" it, but sure - pxe, et al., would be a good reason to actually use the facilities available in a legacy boot environment. 2021-05-31 01:09 you can just read CD with int 0x13. why doesn't it? 2021-05-31 01:09 klange: is a cd distinguished from a dvd in this context or are they the same 2021-05-31 01:10 same read api as hard disk 2021-05-31 01:10 toaru32's loader does a bunch of dumb stuff all so it can show a fancy menu that it shares with the EFI loader. 2021-05-31 01:11 And by "a bunch of dumb stuff" I mean jumps straight to protected mode without even asking what the boot medium was. It doesn't even do a second stage load as it's an El Torito payload so it's multiple sectors right off the disc. 2021-05-31 01:12 It also plays it rather fast and loose with memory layout... it _does_ at least ask the BIOS for the memory map before telling it to screw off. 2021-05-31 01:12 It was written pretty much entirely to check a box of having a CD with no third-party stuff. 2021-05-31 01:13 The EFI loader is slightly better, but the source for it is a mess. 2021-05-31 01:15 that's bound to happen with EFI applications tbh 2021-05-31 01:15 Mostly it's a side effect of sharing code with the bios loader - ELF parser, menu stuff. 2021-05-31 01:16 I managed to clean it up quite a bit when I was building Kuroko-EFI. 2021-05-31 01:16 heat: as an owner of a mere zen 2 i can tell you it's not a big deal. any zen is better than no zen :) 2021-05-31 01:18 zen2 might be slightly better than zen3 for compiles, if most of the time is parallel 2021-05-31 01:18 zen2 has the memory renamer :3 2021-05-31 01:18 zen2 has 4 L3s, zen3 has 2 2021-05-31 01:18 they got rid of it in zen3 2021-05-31 01:18 moon-child, where did you hear that? 2021-05-31 01:19 klange: speaking of kuroko, why are some files duplicated like rline.c and another one 2021-05-31 01:20 rline and the wcwidth implementation? Because Kuroko ships entirely separately from ToaruOS, and Windows doesn't provide a wcwidth so I provide the one I built for toaru's libc. 2021-05-31 01:22 doug16k: don't remember now 2021-05-31 01:22 zen3 would probably pull ahead just enough in configure steps and sequential crap to compensate for any contention it hit from having half as many L3s 2021-05-31 01:23 and since there is no magic, the bigger L3 in zen3 has slightly longer latency 2021-05-31 01:24 so don't feel bad at all for putting zen2 in a parallel workload 2021-05-31 01:24 hardly want zen3 for that 2021-05-31 01:24 i think compile.c was copied as well 2021-05-31 01:24 zen3 actually slightly traded off parallel performance for more singlethread 2021-05-31 01:25 well whatever i should look more closely 2021-05-31 01:26 zen3 gains a ton of performance from two stores per clock though. that's insane 2021-05-31 01:27 3 loads and a store or two loads two stores iirc, per clock 2021-05-31 01:27 push is 0.5 2021-05-31 01:28 because you can just push a pair, 128 bits at once, no problem 2021-05-31 01:29 cant 256+256 store though 2021-05-31 01:29 zen4 probably will 2021-05-31 01:30 doug16k: yeah zen 3 replaced the memory renamer thing with something more generic and powerful, basically 2021-05-31 01:30 i think it was mentioned on anandtech and then agner picked up on it 2021-05-31 01:30 nice 2021-05-31 01:31 and/or the load/store/cache/etc stuff is sufficiently more uber such that the complexity of the memory renamer thing became moot 2021-05-31 01:31 since it was basically a heuristic based hack makes sense it can be eventually outclassed by something more generic 2021-05-31 01:32 re: two stores or two loads per clock, how cute 2021-05-31 01:32 I did notice that debug builds ran awfully fast 2021-05-31 01:32 (obligatory 'M1 is even more uber' comment) 2021-05-31 01:32 even zen2 one I mean 2021-05-31 01:33 it is creating the worst nightmare - constantly store-to-load dependency when one line writes out the variable update and next line reads it from memory 2021-05-31 01:33 because O0 2021-05-31 01:34 oh https://dougallj.wordpress.com/2021/04/08/apple-m1-load-and-store-queue-measurements/ has some good infos 2021-05-31 01:34 ​dougallj.wordpress.com: Apple M1: Load and Store Queue Measurements | dougallj 2021-05-31 01:38 doug16k: and just for some extra fun, i tossed a `cycles_spent += 2;` into my pure-c implementation, to track how much time it would have cost on an actual vpu 2021-05-31 01:38 clever, neat 2021-05-31 01:38 so you can not only verify the algo is doing what you expected, but how fast it would run 2021-05-31 01:41 m1 seems to have a harmless expoit 2021-05-31 01:41 oh neat the same guy seems to have mapped out the general port diagram https://twitter.com/dougallj/status/1373973478731255812 2021-05-31 01:41 ​twitter: And a little more... big changes to the LDQ/STQ sizes, and new 'coalescing retire queue' theory and sizes. ␤ ␤ (Using long-latency FP instructions to probe the load/store pipeline, the same way I used long-latency loads to analyse the int and FP pipelines.) https://pbs.twimg.com/media/ExFVZoiU8AAfeH6.jpg 2021-05-31 01:41 seems like m1 is standing up for itself 2021-05-31 01:42 would seem to indicate how it can actually make a stab at consuming 8 instructions/cycle 2021-05-31 01:43 enough ALU units and load stores to probably keep a standard stream of instructions moving 2021-05-31 01:47 There must be a way to distinguish what's useful or not 2021-05-31 01:53 8/instructions per cycle is an improvement 2021-05-31 02:02 I was looking at Access2 today 2021-05-31 02:02 I've been looking at it for a while 2021-05-31 02:02 It's by someone who is here 2021-05-31 02:02 Matabah 2021-05-31 02:03 Seems robust 2021-05-31 02:04 mutabah, rather 2021-05-31 02:05 Yeah and klys right, you showed me multiboot 2021-05-31 02:05 yeah 2021-05-31 02:06 this was just line 8 and 28 before. oops https://gist.github.com/doug65536/0de9e1540f974fe91d06d24d88c9dc49#file-configure_pat-cc-L28 2021-05-31 02:06 ​gist.github.com: configure_pat.cc · GitHub 2021-05-31 02:06 almost looks like it is for arm processor :P 2021-05-31 02:07 how's that for a diff? https://github.com/klange/toaruos/commit/b35f7ac8c94f7c5dde8b9755d94c010a32ba5a28 2021-05-31 02:07 ​github.com: misaka: initial merge · klange/toaruos@b35f7ac · GitHub 2021-05-31 02:07 WHO DARES DISTURB MY SLUMBER 2021-05-31 02:07 > 317 changed files with 12,122 additions and 24,175 deletions 2021-05-31 02:07 Skyz: Oh hey, cool 2021-05-31 02:08 There's really no deadlines for anything that hobby 2021-05-31 02:08 klange, do you feel guilty for making it one big commit though? 2021-05-31 02:08 So it just seems like things go on forever 2021-05-31 02:09 That's why I like it, you can just work on something if it interests you 2021-05-31 02:09 I have an insane size commit coming 2021-05-31 02:10 doug16k: eh, the history is all in an archived repo elsewhere, and I tried to make sure that one huge commit wasn't all that bad 2021-05-31 02:10 I think this is way better than what I did when I merged NIH and had two roots. 2021-05-31 02:11 also I can just move this .git directory from where I did the merge over to where I've had the checkout of the new repo and... it recognizes everything perfectly. 2021-05-31 02:11 So now I suddenly have the real repo history and I don't need to mess with my sysroot stuff or rebuild gcc :) 2021-05-31 02:13 Misaka is a big update :D 2021-05-31 02:13 Every OS needs SMP 2021-05-31 02:14 it's so fun to get some smp stress test that keeps failing to pass overnight run 2021-05-31 02:14 git managed to detect most of the moves from drivers that went from modules to kernel components, I get the small app fixes and they're just tiny diffs, the worst thing in here is the readelf diff because I rewrote that from scratch, and a handful of core stuff in the kernel didn't get picked up as moved because it was reordered too much. 2021-05-31 02:17 amazingly the "about 80k lines of C" statement in the README is still true, but that's probably because of the handful of drivers that got lost in the move :) 2021-05-31 02:19 The Plan 9 system manuals look really nice 2021-05-31 02:21 Skyz: I'm curious, anything in particular you were looking at in the Acess source? 2021-05-31 02:22 It's well put together 2021-05-31 02:22 The binary part seemed interesting 2021-05-31 02:22 VFS as well 2021-05-31 02:24 Brings back memories, not worked on it in ages 2021-05-31 02:24 Barely looked at it actually... even when it would help in debugging newer code :) 2021-05-31 02:24 Yeah noticed 2021-05-31 02:24 Seems like these OS projects are conceptual 2021-05-31 02:25 It's fun to learn and implement... less so to polish out the bugs into something day-to-day usable 2021-05-31 02:25 ... unless you're klange 2021-05-31 02:29 is java that hard to port? 2021-05-31 02:29 if you have a working libc and whatnot 2021-05-31 02:29 probably not that bad but it probably touches a lot of apis all together 2021-05-31 02:30 it's like a small version of the browser problem. it uses so many apis it is hard to get one working 2021-05-31 02:34 and there we go, now it's the master branch 2021-05-31 02:35 if you dropped all the standard libraries, it's probably pretty easy to get java running 2021-05-31 02:35 sortie had a mono port, if you want Microsoft-brand Java. 2021-05-31 02:36 [that's a joke in case it's unclear] 2021-05-31 02:36 I like C#. it's the microsoft compiler team's FTFY for Java 2021-05-31 02:37 C# = Java + generics that aren't stupid 2021-05-31 02:37 jvm still runs circles around .net though 2021-05-31 02:37 esp. once they add value types 2021-05-31 02:37 and you can use scala/kotlin/whatever 2021-05-31 02:38 So far POSIX is a good system, not sure if one can break compatiblity with something else yet 2021-05-31 02:40 Rust OS seems to be coming up with something 2021-05-31 02:40 mutabah 2021-05-31 02:40 But yeah me coming up with a different protocol is purely speculative 2021-05-31 02:44 ? 2021-05-31 02:44 Literally a question mark 2021-05-31 02:51 Imagine, you got to use the os and try to vm it in windows / linux / mac 2021-05-31 02:51 and you can't 2021-05-31 02:51 ! 2021-05-31 02:52 Okay enough speculation 2021-05-31 02:53 I wonder how quantum algorithms will work 2021-05-31 03:03 skyz, re: quantum algorithms, https://github.com/dwavesystems 2021-05-31 03:03 ​github.com: D-Wave Systems Inc. · GitHub 2021-05-31 04:40 Legacy BIOS loader is working again in its current form. Thinking I can probably just move the file loading to ye olde bios calls before even showing the menu... 2021-05-31 04:40 And shouldn't be too hard to also hack this up to a "proper" legacy boot sector setup, or at least write a stub for it. 2021-05-31 04:44 is my system gcc really this obsessed with build ids? https://gist.github.com/doug65536/c30e5cd55054cc717afd5bd72c622d21 2021-05-31 04:44 ​gist.github.com: gist:c30e5cd55054cc717afd5bd72c622d21 · GitHub 2021-05-31 04:48 why is the section named build minus id? 2021-05-31 04:49 skewer-case naming? 2021-05-31 04:49 is that ok though? 2021-05-31 04:49 will it parse that as arithmetic subtract expression? 2021-05-31 04:50 guessing not, but it might screw it up 2021-05-31 04:50 it seems to know it got discarded, yet still there in output. can someone explain that? 2021-05-31 04:51 I _think_ it's added by ld... not sure 2021-05-31 04:51 might need to delve into the internets, or even the source 2021-05-31 04:51 I even said -Wl,-no-build-id and it didn't warn about that 2021-05-31 04:51 I think my distro patched it so it can't be stopped 2021-05-31 04:52 I should try with my dgos compiler, I guess this is an example of why you never use the system compiler 2021-05-31 04:52 Build your own 2021-05-31 04:52 And yep 2021-05-31 04:52 distros have a bad habit of doing their own patches for questionable reasons 2021-05-31 04:53 I thought you could slap out a simple 2MB bin file with a slightly above hello world link 2021-05-31 04:53 apparently not lol 2021-05-31 04:53 I could make it work but just funny 2021-05-31 04:55 yeah my cross compiler doesn't add it 2021-05-31 05:16 I disable cache and turn off MTRRs when starting APs now 2021-05-31 05:16 and flush cache and tlb 2021-05-31 05:17 then after it changes the count I spin on, I flush both again and turn on cache 2021-05-31 05:17 have to do that to comply with "MTRR considerations for MP systems" in manual 2021-05-31 05:17 I change PAT to use WC so I need to do whole thing 2021-05-31 05:18 not allowed to have two cpus with different memory types using MTRRs with cache on at same time 2021-05-31 05:19 with different memory types in mtrrs or different pat I mean 2021-05-31 05:20 all the other cpus have to have cache disabled and mtrrs off before changing pat or mtrrs 2021-05-31 06:17 what happened here? https://gist.github.com/doug65536/8e070b3945ea49aa24461e7aab88a564 2021-05-31 06:17 ​gist.github.com: what happened?! 0x1ffdf0000??? · GitHub 2021-05-31 06:17 I can't believe it 2021-05-31 06:17 oh I know 2021-05-31 06:18 I am in top 2MB 2021-05-31 06:18 wait, why didn't it jmp to ecx 2021-05-31 06:19 oh I know why 2021-05-31 06:19 crap, cs base is 0xffff0000 , so it is nonsense to jump down that far 2021-05-31 06:21 need - 0xFFFF0000 on the jmp address. let me try that 2021-05-31 06:38 haha, nice. if I link the really early code above -64KB line, then I can just jmp normally to bottom of there. it's jmp 0 and goes to 0xffff0000 :D 2021-05-31 06:38 but code says jmp _start 2021-05-31 06:40 I can imagine people stepping through early rom code they made, going wtf? 2021-05-31 08:04 ​#offtopia you've nerd-sniped me so hard with #port5742 2021-05-31 08:04 :) 2021-05-31 08:04 I worry what the timestamp on that message was :) 2021-05-31 08:05 I didn't mean to derail anyone, just wanted to get it back up in the last hours of Sunday :) 2021-05-31 08:07 sortie: what timezone are you in? 2021-05-31 08:07 TZ=CEST 2021-05-31 08:10 $ TZ=CEST date +%a 2021-05-31 08:10 Mon 2021-05-31 08:11 Ah yes I'm currently in that phase where I'm officially working but eating breakfast 2021-05-31 11:06 Good afternoon everyone! 2021-05-31 11:07 Good evening. 2021-05-31 11:16 It's a sham1 2021-05-31 11:16 ! 2021-05-31 11:17 ugh i just want to build modules with the 'large' memory model and stick them up top somewhere and be done with it... 2021-05-31 11:18 going to be much less modular this time around, lots of stuff that moved to the main kernel is staying there 2021-05-31 11:18 but device drivers for things I can probe PCI or whatever for, those should go back into relocatable objects where they belong 2021-05-31 11:18 and then I'm also not going to do what I did in toaru32 where modules were being loaded from multiboot modules 2021-05-31 11:19 just shove 'em in the ramdisk and load them on startup, maybe even with some udev-like thing... 2021-05-31 11:21 maybe i can even do something fun and put pci ids in a section so you can just plop modules in /mod or whatever and they'll get scanned by something in startup.d, it'll check against /proc/pci, and load you... plus or minus also doing dependency resolution stuff, but I kinda want to avoid having dependency trees for modules 2021-05-31 13:00 * gog meows 2021-05-31 13:03 maow 2021-05-31 13:31 woof 2021-05-31 13:38 mjäu 2021-05-31 14:05 mrow 2021-05-31 14:07 morning cunts 2021-05-31 14:08 good afternoon 2021-05-31 14:09 it's that time of the day where I grow sadder looking at build systems! woohoo! 2021-05-31 14:16 moos 2021-05-31 14:16 mood 2021-05-31 15:57 does incbin not work with absolute paths? 2021-05-31 16:06 why would you want that? 2021-05-31 16:06 build stuff 2021-05-31 16:07 huh I found out why it's broken 2021-05-31 16:07 somehow the vdso got non readable and clang just interpreted -EACCES as could not find file 2021-05-31 17:25 Is Google hiring? 2021-05-31 17:29 https://lmgtfy.app/?q=Is+Google+hiring 2021-05-31 17:29 ​lmgtfy.app: LMGTFY - Let Me Google That For You 2021-05-31 17:29 lol you trust _google_ to tell you if google is hiring? 2021-05-31 17:29 won't they be biased? 2021-05-31 17:29 yeah, the google interview process actually requires you to go work for apple first 2021-05-31 17:29 little known secret 2021-05-31 17:31 Could find something I guess 2021-05-31 17:31 Really looking for a job in the future 2021-05-31 17:43 Google calls me every 6 months down to the day. 2021-05-31 17:43 Well, almost. 2021-05-31 17:44 I interviewed with them once and got a really... interesting interviewer. I failed because I asked too many questions about the usecase of wrapping a bowling score algorithm in a class. 2021-05-31 17:44 lol 2021-05-31 17:45 My concern is I'm not a programmer 2021-05-31 17:45 I'm attempting to be 2021-05-31 17:45 Neither are more CS grads 2021-05-31 17:45 ^ 2021-05-31 17:45 Skyz what is your goal with becoming a programmer? 2021-05-31 17:46 Philosophically, I mean. 2021-05-31 17:46 I just wanted to get an os working 2021-05-31 17:46 take up professional snowboarding, it's more fun 2021-05-31 17:46 oh yay that part of the day where I see crazy people talking to themselves 2021-05-31 17:46 For what purpose? Just interest? 2021-05-31 17:46 Pretty much thought it would be an interesting endeavor, and we all are working on OS dev so this should be relevant 2021-05-31 17:46 heat: *passes the bong* 2021-05-31 17:47 Skyz: if you cant program yet, focus on that, before an OS 2021-05-31 17:47 An OS is "final boss mode" 2021-05-31 17:47 it's not just being an elitist saying this. 2021-05-31 17:47 Yeah, but I got some ideas with it 2021-05-31 17:47 I just wanted to get those ideas out there first 2021-05-31 17:48 No matter what a new os is difficult to pull off 2021-05-31 17:48 I wanted to try 2021-05-31 17:48 Ideas are a dime a dozen, being able to execute them is what matters. You can ask questions about them, discuss them, hope and dream. But if you aren't willing to put in the work to actually learn the fundamentals then you are doomed to fail. 2021-05-31 17:48 Do you know Python? Java? Javascript? 2021-05-31 17:48 Do you understand control structures and whatnot? 2021-05-31 17:49 Are you good with arithmetic? 2021-05-31 17:49 learn ebpf and become a network engineer for cloudflare 2021-05-31 17:49 have you finished your blood pact with our dark lord and master ba'al ze'vuv 2021-05-31 17:50 finish? he doesnt let anyone go 2021-05-31 17:50 dark lord ge'ist 2021-05-31 17:50 Basically the bare minimum is to know C, and to know C you need to know how programming works in the general sense, and that can take years to fully grok. 2021-05-31 17:50 and to know how programming works is to know madness 2021-05-31 17:50 turn back! turn baaaaaack! 2021-05-31 17:51 fuck computers 2021-05-31 17:51 go be a doctor or something 2021-05-31 17:51 seriously 2021-05-31 17:51 not a dentist tho 2021-05-31 17:51 dentists are sadists 2021-05-31 17:51 Then from there, you need to understand how processors work, read a bunch of manuals, spend a lot of time straight-up bashing your head against the wall with "this should work but it doesn't"-type problems 2021-05-31 17:51 yeah I meant a real doctor 2021-05-31 17:51 fuck them dentists 2021-05-31 17:51 And that's just to get a kernel working. 2021-05-31 17:52 * kazinsal watches as all his teeth ablate from his skull, britishly 2021-05-31 17:52 bri'ish 2021-05-31 17:52 And a kernel is a very very small part of the OS. A critical one, yes, but small in the grand scheme of things. 2021-05-31 17:52 oi guv spot a tenner for yer ol m8 OS dev 2021-05-31 17:53 I'm not trying to discourage you, Skyz. But going from zero to OS is not realistic for anyone, nor has it ever been (including the creators of existing OSes). 2021-05-31 17:53 Anyone who says this stuff is ezpz is lying to you. 2021-05-31 17:53 paging tough innit 2021-05-31 17:53 If you're not willing to learn the fundamentals then OS dev isn't for you. Gonna be real. 2021-05-31 17:54 I dropped out of math in grade 12 because I was lazy and now I'm a network engineer 2021-05-31 17:54 stay in school, kids 2021-05-31 17:54 I can learn to count 2021-05-31 17:54 Basically that's all the comp does 2021-05-31 17:54 But can you count in binary? :| 2021-05-31 17:54 Unfortunately 2021-05-31 17:54 Ah okay, not sure if this is troll or srs now 2021-05-31 17:54 junon: were not sure 2021-05-31 17:55 junon: nobody bothered reimplementing the +b after we moved to libera, that's what it is 2021-05-31 17:55 junon: Skyz was actually banned on freenode 2021-05-31 17:55 I want everyone to get into osdev 2021-05-31 17:55 oh it's a troll 2021-05-31 17:55 okay 2021-05-31 17:55 It's not 2021-05-31 17:55 we're not sure if troll or unmedicated 2021-05-31 17:55 here I am being earnest lol 2021-05-31 17:55 I'm just obnoxious 2021-05-31 17:55 I'm betting on the latter 2021-05-31 17:55 just /ignore him 2021-05-31 17:55 Binary is for Quakers. I count by listening to the microscopic transistors switching. 2021-05-31 17:55 It's not fair how hard making an os is 2021-05-31 17:55 one of the downsides of IRC is that you can't apply snarky ban messages 2021-05-31 17:55 It's my life goal 2021-05-31 17:56 You can add a message to the kick, tho? 2021-05-31 17:56 yeah, but that doesn't replay the shame when they try to rejoin 2021-05-31 17:56 Skyz in the absolute off-chance you're being sincere, it's very clear this isn't for you. I'm not one to say "give up on your dreams" but... focus on something else that makes you happy. For real. The pathway is painted with pain and unhappiness if you aren't willing to commit to the absolute astronomical amount of work required to get a simple OS working. 2021-05-31 17:56 Ah, true that. I'm used to having eggdrops handle the velvet rope. 2021-05-31 17:57 I tried to stop 2021-05-31 17:57 astronomy is cool. 2021-05-31 17:57 And yes I'm sincere 2021-05-31 17:57 I hate OS development, but I like the people in this channel so it's worth it. 2021-05-31 17:57 I've always loved the SomethingAwful method of putting the punishment log in public view, and letting the moderators occasionally craft bizarre punishment reasons that make people go "oh, now I REALLY have to click on the link and see what this was for" 2021-05-31 17:57 Wow, I ain't thought about that site in years, kazinsal. 2021-05-31 17:58 I can work with a VM already 2021-05-31 17:58 The forums are still alive and kicking. We collectively booted all the weirdos and chuds, Lowtax flamed out and sold the site to Jeffrey of YOSPOS, and now things are nice and happy 2021-05-31 17:59 I'll be darned. 2021-05-31 17:59 is somethingawful parody? 2021-05-31 17:59 The saga with Lowtax receiving big patreon bucks and spending it all on a rented mcmansion and leased Nissan GT-R against the business accounts was a fun one 2021-05-31 17:59 Hahaha 2021-05-31 18:00 Why am I not surprised? 2021-05-31 18:00 He then got outed as a serial wifebeater, his patreon flatlined, and Jeff bought the forums from him 2021-05-31 18:00 kazinsal: Andrew Lee might buy them 2021-05-31 18:00 At one point he was also buying artisinal cookies off the internet 2021-05-31 18:00 SA and Zophar's Domain were two of my favorites back in the day. 2021-05-31 18:00 SA is safe. JeffPOS is also a lucky sonofabitch who threw a few bucks at bitcoin when they were a couple cents each 2021-05-31 18:01 StileProject was a bit too funky for me. 2021-05-31 18:02 I was thinking osdev would be something like racketboy 2021-05-31 18:03 What's racketboy? 2021-05-31 18:03 It's retrogaming 2021-05-31 18:03 Ah 2021-05-31 18:38 Hello! Reading the Z80 processor's user manual, I grow very intrigued about the innerworkings and structure of processors, and it's interaction with peripherals; I find myself looking at results from a web search engine query for a book about, and thought it could come good to bring this up here in addition: Which do you consider the best resource about the innerworking and structure of processors? 2021-05-31 18:38 Oli: https://www.bigmessowires.com/bmow1/ 2021-05-31 18:38 ​www.bigmessowires.com: BMOW 1 Computer | Big Mess o' Wires 2021-05-31 18:39 Oli: this blog has a whole series of posts, on creating a working cpu from just dumb logic gates 2021-05-31 18:39 https://www.nand2tetris.org/ 2021-05-31 18:39 ​www.nand2tetris.org: Home | nand2tetris 2021-05-31 18:42 There are some video series on making breadboard CPUs 2021-05-31 18:42 Ben Eater - Building an 8-bit breadboard computer! https://www.youtube.com/playlist?list=PLowKtXNTBypGqImE405J2565dvjafglHU 2021-05-31 18:42 ​playlist 'Building an 8-bit breadboard computer!' by Ben Eater 2021-05-31 18:42 https://www.youtube.com/playlist?list=PLFhc0MFC8MiCDOh3cGFji3qQfXziB9yOw 2021-05-31 18:42 ​playlist 'Making an 8 Bit pipelined CPU' by James Sharman 2021-05-31 18:55 a pipelined one, eh 2021-05-31 18:55 btw I registered #cpudev by analogy with osdev, but it's pretty much empty 2021-05-31 18:55 (on freenode it's registered to someone who's gone) 2021-05-31 18:56 but if CPUs interest you i'd autojoin it just in case something happens. I think ZipCPU is making one 2021-05-31 18:57 I should read books sometime, instead of piecing together information from random internet comments and the occasional wikipedia article 2021-05-31 18:57 the only hobby cpu communities I know of with any activity are opencores and comp.arch 2021-05-31 18:57 You need a /topic 2021-05-31 18:58 Isn't doug16k designing a CPU? 2021-05-31 19:05 Designing a cpu? 2021-05-31 19:07 designing a CPU is rather possible as long as you don't have to deal with any of that pesky real world stuff. You can basically just write a bytecode interpreter, but out of logic gates. 2021-05-31 19:08 Reality sucks :P 2021-05-31 19:11 immibis: I think that's rather an instruction set than a cpu :P 2021-05-31 19:14 moon-child: > as long as you don't have to deal with any of that pesky real world stuff :) 2021-05-31 19:25 just pull a 90s AMD and implement your bytecode translator on a RISC chip and then when it doesn't work as well as it should have on paper, buy someone else's design 2021-05-31 19:54 rip K5 2021-05-31 19:58 Thank you so much, clever, GeDaMo, immibis and moon-child, for sharing about the processor-related resources you have! 2021-05-31 19:59 I have others, I'll share them in #cpudev at some point :P 2021-05-31 20:00 it's a bit more hard core, but there's a professor in austria i think that puts his lectures online for the last few years 2021-05-31 20:00 and they start from pretty simple up to highly advanced modern cpu design 2021-05-31 20:00 really good stuff. doug16k turned me on to them 2021-05-31 20:01 https://www.youtube.com/c/OnurMutluLectures/playlists is his master list 2021-05-31 20:01 ​playlist? 'Onur Mutlu Lectures - Playlists' - 'This channel contains videos and slides from courses taught and lectures delivered by Professor Onur Mutlu (https://people.inf.ethz.ch/omutlu/). 2021-05-31 20:01 Onur Mutlu's lectures are pretty good 2021-05-31 20:02 the one i was specifically looking at was the spring 2020 one i believe, thoug hhe's done the same seminar a few times, dunno if any are better than others 2021-05-31 20:03 ah yeah this one: https://www.youtube.com/playlist?list=PL5Q2soXY2Zi-RdBwDEIsq0pmsrHWEttz6 2021-05-31 20:03 ​playlist 'Seminar in Computer Architecture - ETH Zürich (Spring 2020)' by Onur Mutlu Lectures 2021-05-31 20:08 actually no, this is a smaller playlist 2021-05-31 20:09 https://www.youtube.com/playlist?list=PL5Q2soXY2Zi_FRrloMa2fUYWPGiZUBQo2 is the one i was thinking of 2021-05-31 20:09 ​playlist 'Digital Design & Computer Architecture - ETH Zürich (Spring 2020)' by Onur Mutlu Lectures 2021-05-31 20:13 hmm, he mentions these two books at this point: https://youtu.be/44B6YmSuk0I?list=PL5Q2soXY2Zi_FRrloMa2fUYWPGiZUBQo2&t=780 2021-05-31 20:13 anyone read or have either of them? 2021-05-31 20:14 I've seen the cover of the Patt and Patel one before but haven't read it 2021-05-31 20:14 yah looks like https://smile.amazon.com/Digital-Design-Computer-Architecture-Harris/dp/0123944244 2021-05-31 20:14 ​redirect -> www.amazon.com: Digital Design and Computer Architecture: Harris, David, Harris, Sarah: 9780123944245: Amazon.com: Books 2021-05-31 20:14 and https://smile.amazon.com/Introduction-Computing-Systems-Gates-Beyond/dp/0072467509 2021-05-31 20:14 ​redirect -> www.amazon.com: Amazon.com: Introduction to Computing Systems: From Bits and Gates to C and Beyond (9780072467505): Yale N. Patt, Sanjay J. Patel: Books 2021-05-31 20:24 moon-child, it's a cpu 2021-05-31 20:26 it's a classic Tomasulo out of order processor. not finished, but most of what's there passes testbenches: https://github.com/doug65536/toycore 2021-05-31 20:26 ​doug65536/toycore - Out-of-order verilog CPU implementation (0 forks/1 stargazers/MIT) 2021-05-31 20:27 register renaming and everything 2021-05-31 20:28 single cycle fmul by power of two 2021-05-31 20:28 er, fdiv I mean 2021-05-31 20:28 adds exponents, boom done 2021-05-31 20:28 er, subtract 2021-05-31 20:30 moon-child, this is the instruction set https://www.docdroid.net/J0Eh0Qy/tiny-insn-set2-pdf 2021-05-31 20:30 ​www.docdroid.net: tiny_insn_set2.pdf | DocDroid 2021-05-31 20:30 fdiv not on that one 2021-05-31 20:33 has paging too - with large pages 2021-05-31 20:34 every time I get it working the whole project gets more ambitious :) 2021-05-31 20:34 it was just pipeline, then SMT, now OOO 2021-05-31 20:35 smt? Wow 2021-05-31 20:35 yeah it kept track of which threads are stalled and round robins the ones not stalled 2021-05-31 20:36 sort of for free, since the sram block I used for the register file had room for lots of register contexts 2021-05-31 20:36 tid becomes upper bits of register selector 2021-05-31 20:37 then have a flags and pc for each and you're set 2021-05-31 20:38 one stage before fetch to pick next ready thread and it tends to be independent operations going down the pipeline from different threads 2021-05-31 20:39 geist2 | anyone read or have either of them? > I have skimmed throuh patt and patel. It is a nice intro book which uses LC3. Most US universities seem to use it for intro courses. But LC3 itself is limiited. Example you can't have interrupts. 2021-05-31 20:40 yah no, but i'm thinking of picking it up, though i doubt there's anything earth shattering that i didn't already know 2021-05-31 20:41 Yes, you would likely know most of it (concepts). 2021-05-31 20:41 moon-child: hoestly SMT is less impressive than OOO. OOO is where it gets fun, SMT is relatively straightforward 2021-05-31 20:42 which is why doug16k progressed in that particular direction, SMT first then OOO 2021-05-31 20:44 yeah, once you get it doing the round robin in one cycle, and expand register files, SMT implements itself 2021-05-31 20:44 carry along a tid 2021-05-31 20:45 you already had to do most of what it needs 2021-05-31 20:47 the scheduler is fairly neat though. you need to be able to make any number of threads become ready, possibly stall one thread, and select the next ready one, every cycle, back to back 2021-05-31 20:48 wait actually I think you can resume one and stall one every cycle 2021-05-31 20:48 and select next one 2021-05-31 20:49 ya that makes sense, since only one cache miss can happen at one time, and one cache line fill completes at a time 2021-05-31 20:50 data cache wins if contention between dcache and icache 2021-05-31 20:57 totally unsure if that is right way around 2021-05-31 20:57 ooo is good? 2021-05-31 20:58 Skyz, it lets work get done when an instruction has to wait 2021-05-31 20:58 it's like a cashier helping the next customer if one at counter has a long delay 2021-05-31 20:58 scheduler? 2021-05-31 20:58 This is processor related? 2021-05-31 20:58 kind of like a scheduler for individual instructions, rather than processes 2021-05-31 20:59 i see 2021-05-31 20:59 in case you didn't know ooo = out-of-order 2021-05-31 20:59 processor finds ways to get a head start on things that don't depend on previous results 2021-05-31 21:00 so when folks say ooo cpu they mean modern designs where the cpu doesn't process instructions in the order they appear in the instruction stream 2021-05-31 21:00 a non ooo cpu folks will call in-order 2021-05-31 21:01 seems bad at first but performance shows it's good 2021-05-31 21:01 So I'll just take the advice if it's good 2021-05-31 21:01 oooooooooooooooooooooooooh 2021-05-31 21:01 almost as good as aaaaaaaaaarch64 2021-05-31 21:03 Skyz: would would it seem bad? 2021-05-31 21:03 Out-of-order 2021-05-31 21:03 sure, go on 2021-05-31 21:04 geist: 'out of order' means 'not working', in certain contexts 2021-05-31 21:04 pun 2021-05-31 21:04 you mean it appears bad because you think it would be incorrect? that's the key 2021-05-31 21:04 out of order but still maintaining the illusion that the instructions are processed in-order 2021-05-31 21:04 it has to do that or it would't work 2021-05-31 21:05 geist: no, they meant that it appears bad because 'out of order' can also mean 'not working' rather than 'in a different order' 2021-05-31 21:05 (I assume) 2021-05-31 21:05 oh oh i see 2021-05-31 21:05 like a sign on it, heh 2021-05-31 21:05 never occurred to me :) 2021-05-31 21:05 very accurate these past few years tbh 2021-05-31 21:05 yeah it seems like they run in order, but delays can cause some older operations to wait while newer ones start immediately, and it makes sure it behaves just like it would in-order 2021-05-31 21:06 every time we talk about this i get a teensy bit more nostalgic for an itanium machine 2021-05-31 21:06 but of course no real cheap itanium boxes were ever made and they're probably still valuable in very specific contexts, much like alpha machines are, apparently 2021-05-31 21:06 so unlikely to ever find a cheap one on ebay 2021-05-31 21:07 intel inside 2021-05-31 21:07 pentium processor 2021-05-31 21:07 if google has quantum computers they probably also have itanium machines 2021-05-31 21:07 they actually advertised them 2021-05-31 21:07 heat: probably a joke in there, but why do you figure that? 2021-05-31 21:07 geist: cliff click says vliw doesn't solve the actual problem, which is that ultimately you have to deal with cache being slow, and all the deep pipelines in the world won't help with that 2021-05-31 21:07 we got the exception abi everyone uses from itanium team. that thing is genius 2021-05-31 21:08 geist: joke :)e 2021-05-31 21:08 s/help with/fix/ 2021-05-31 21:08 moon-child: gotta be more specific about 'slow' though. ie, latency vs throughput 2021-05-31 21:08 everyone knows itanium is even rarer than quantum computing :D 2021-05-31 21:08 latency is the big one, and that's why machines that are highly OOO can help a bit 2021-05-31 21:08 err, memory being slow, sorry 2021-05-31 21:08 and yes latency 2021-05-31 21:08 'a bit' but his argument is that eventually you hit a cliff 2021-05-31 21:08 and of course highly aggressive prefetching 2021-05-31 21:08 oh yah vliw, yeah 2021-05-31 21:09 got it. missed the vliw part of your statement 2021-05-31 21:09 yah it seemed like a 90s problem. like 'how are we ever going to make cpus properly OOO without it being a huge complicated mess' 2021-05-31 21:09 and thus 'solve it in software' 2021-05-31 21:09 whereas some other processor designers were having their beer held 2021-05-31 21:11 vliw seems like it would work 2021-05-31 21:11 It is the first time I became conscious about Verilog, and reading "Out-of-order verilog CPU" on the repository doug16k shared gave me "An emulator for a discontinued Verilog CPU" as first thoughth: I then looked at the code in, and now find myself with several web browser tabs open about hardware description languages, Verilog-related and VHDL-related information. This is a huge world I wasn't aware about. 2021-05-31 21:11 turns out tomatsulo and whatnot had a lot more runway 2021-05-31 21:11 Oli: yay, yeah it's neat 2021-05-31 21:11 Oli, electrical engineer stuff 2021-05-31 21:12 You can look into Computer Engineering 2021-05-31 21:12 the thing that really is the leap forward is the 'thinking in parallel' that you have to context switch to when writing verilog, or really designing any computer circuits 2021-05-31 21:12 I've considered learning verliog or similar and trying to figure out how to put together a basic FPGA but I haven't found a good "starter kit" of sorts 2021-05-31 21:12 someone has to make chips, right? 2021-05-31 21:12 I'd love to try to crank out an ethernet switching FPGA just for fun 2021-05-31 21:12 if there's any value to the whole thing is that parallel thinking mindset you have to adopt while doig it 2021-05-31 21:12 Probably won't end up being terribly performant buuuut 2021-05-31 21:13 yeah, the parallelism is pretty mind blowing in HDL. in some respect, all lines run continuously in parallel 2021-05-31 21:13 kazinsal: indeed i've thought o doing that a few times. i think there's some extremely standard solutions for it, but its like building a simple cpu: you go through the learning curve by making all the same mistakes and designing from first principles 2021-05-31 21:14 definitely. same as osdev, takes many years of reinventing the same broken wheel before you get where you want to be 2021-05-31 21:14 doug16k: right, of coruse it's not really an HDL thing. any circuit design does the same thing. because you dont care about these wires on *this* clock cycle doesn't mean that part of the circuit isn't still doing things, etc 2021-05-31 21:14 yeah 2021-05-31 21:14 what fools you about HDL, and especially verilog is it *looks* procedural 2021-05-31 21:14 reality isn't a step by step thing, it's continuous and parallel 2021-05-31 21:14 and in fact you have the whole structural vs procedural verilog stuff which blurs the line 2021-05-31 21:15 where you're sort of switching between these two modes on a block by block basis and hoping the compiler figures out what you're doing 2021-05-31 21:15 *kinda* like escaping to an alternate version of the same language, but it's more subtle 2021-05-31 21:15 but i think that's why most intro stuff sticks to purely structural verilog (except maybe test harnesses) 2021-05-31 21:15 yes you can make step by step stuff, but arrange it so they all work at once on different data 2021-05-31 21:15 ie, wires, @clock, etc 2021-05-31 21:16 all combinatorial with blocks for latches 2021-05-31 21:16 as i hacked more verilog i got more comfortable writing procedural style 'describe the algorithm, not the structure' stuff where it mattered 2021-05-31 21:17 but only because i could figure out what the compiler was doing and making sure it did the right thing 2021-05-31 21:24 kazinsal, you can get fpga prototyping hardware that has the ethernet port already there and a transceiver to do the SERDES stuff for you so you can use a wide bus to keep clock speed down 2021-05-31 21:25 you could probably get that working no problem 2021-05-31 21:25 kazinsal: i got a Digilent Arty board, but there are others too, expect to spend a few hundred dollars though 2021-05-31 21:26 haven't tried making a whole cpu on it. just some test stuff, then i got bored. I made it reply to IP pings 2021-05-31 21:31 i had some fun driving some of those fancy led arrays 2021-05-31 21:31 a super dump fpga is great for that, especially if they have some fairly complex spi protocol or something 2021-05-31 21:31 an fpga can sequence that like there's no tomorrow 2021-05-31 21:32 I ought to actually read up on how serdeses work 2021-05-31 21:33 my experience with them on altera and xilinx is there are N serdes ports per fpga, can be attached to some limited number of pins (or you can use the pins for regular stuff) 2021-05-31 21:33 and you punch out a wrapper via some wizard that makes a verilog module for you that you then treat like some sort of black box 2021-05-31 21:33 under the hood the verilog ends up basically using some built in intrinsics, not entirely unlike some C++ like __builtin_serdes_pin(...) kinda thing 2021-05-31 21:34 you can write a wide value to it and it blasts them out at a speed you couldn't do in code, or vice versa, collects them into wide reads 2021-05-31 21:34 and what it really is is a configurable hardware block 2021-05-31 21:34 makes sense 2021-05-31 21:34 right, the verilog enterface ends up looking like something like 2021-05-31 21:34 serdes_pin(out clock, in data[8]) or something 2021-05-31 21:35 since you configured it to say run 8x the speed of the clock you feed it it'll once per clock cycle give you 8 bits of data 2021-05-31 21:35 gotcha. seems more logical to just let the FPGA do its thing on repeatable tasks like that 2021-05-31 21:36 right, well also the whole point is it's a fixed asic block that can run many times faster than the regular fpga logic 2021-05-31 21:36 you need to widen things because an fpga can't run at really high frequencies 2021-05-31 21:36 so whereas you might only be able to clock up your logic to say 300mhz or so the serdes fixed part can run at many ghz 2021-05-31 21:36 need a block per cycle 2021-05-31 21:36 right 2021-05-31 21:37 number of serdes pins and the speed they can run, etc is a big differentiator between lower end cheap fpgas and the higher end ones 2021-05-31 21:37 a mid range but still semi affordable fpga may have say 4 or 6 serdes pins (out of say 400 on the part itself) 2021-05-31 21:37 and a low end one may have 0 or 2 2021-05-31 21:37 right 2021-05-31 21:38 really expensive big fpga may have craptons of them and that's a big part of what you're paying for 2021-05-31 21:39 so something like the arty-100 that immibis mentioned i think has a few serdes pins? but that's a 100klut artix which is not the lowest end fpga you can get 2021-05-31 21:39 https://www.xilinx.com/products/silicon-devices/fpga/artix-7.html#productTable yah, see the artix-7 like starts with 2 6.6Gb/s transceivers 2021-05-31 21:39 ​www.xilinx.com: Artix-7 FPGA Family 2021-05-31 21:40 the ddr data bus to memory would be serdes but dedicated to memory 2021-05-31 21:40 the xc7a100t which is what's in the 100klot arty board has 8 2021-05-31 21:40 what the board does with them i dunno, hopefully you can get them out of the board in a reasonable way 2021-05-31 21:42 iirc f you look up one of the raw fpgas on digikey i think they're probablyin the 30-50 USD range, i suspect 2021-05-31 21:42 my fpga has a memory controller with 128 bit bus to get/write entire 16-byte ddr burst in one cycle 2021-05-31 21:42 it's serdes-like 2021-05-31 21:43 which is nice when ram is running at 333 and cpu is at 100 2021-05-31 21:43 and ram data bus is 16 bit and it's ddr 2021-05-31 21:44 166mhz ram ddr = 333 MT/s 2021-05-31 21:45 166M 32-bit/sec is easy way to look at it 2021-05-31 21:46 so that should sustain 1 load/store per cycle plus lots of icache misses and tlb misses 2021-05-31 21:46 that's why I went all ambitious and switched to OOO 2021-05-31 21:47 I mean sustain even if missing a lot 2021-05-31 21:50 makes it easy when cache line fill and write back are just done in one cycle 2021-05-31 21:50 no stepping through words 2021-05-31 21:51 had to make cache 4 banks so I can write 4 things at once 2021-05-31 21:51 128 bits 2021-05-31 21:51 dual port - one port is cache line writeback/fill, other port is load/store 2021-05-31 21:52 writeback/fill activate all four, load/store figure out which one from address 2021-05-31 21:54 can't fill and load or writeback and store in same place so you need an interlock that delays the access if that happens 2021-05-31 21:55 miss handling makes that happen mostly by itself - it can't hit until fill completes, and it can't start the fill until writeback completes 2021-05-31 22:03 it actually reminds me of C64. the memory is so fast it waits for the cpu 2021-05-31 22:04 it is if I overlap stuff a little 2021-05-31 22:06 What would FPGA be most useful for in osdev? 2021-05-31 22:07 Can you get an OS to recognize it like a cpu? 2021-05-31 22:07 yes 2021-05-31 22:09 it is a cpu, just implemented with gates that aren't nearly as fast as if you made a custom circuit from the same code 2021-05-31 22:09 logically seems like a good way to prototype out something that can then be theoretically baked as an ASIC with the clock speeds cranked up 2021-05-31 22:10 your code and the compiler figure out how to use the interconnects and resources in the chip to bodge together the logic you said in the code 2021-05-31 22:11 kazinsal, exactly 2021-05-31 22:11 instead of spending $1M to get a some real wafers that are full of bugs 2021-05-31 22:11 That is, in fact, often the idea... 2021-05-31 22:12 still easier than trying to get your hands on friggin broadcom's switching ASIC documentation 2021-05-31 22:12 geist: unfortunately i looked up the serdes pins and none of them are accessible on this chip. but my version is the 35T IIRC, not the 100, and not the A7 2021-05-31 22:13 er. i think it is an Artix 7. but they released a newer board labeled "Arty A7" which it is not 2021-05-31 22:13 kazinsal, a kit may provide an external transceiver that does that 2021-05-31 22:13 so i'm not sure what's on those chips. I picked it mainly for price and still having an ethernet port 2021-05-31 22:13 kazinsal, with a bus wired to it 2021-05-31 22:14 Skyz: if you're writing an OS for your computer then an FPGA is useless to you. if you're writing a CPU for your FPGA then you need an FPGA to write it for 2021-05-31 22:14 kazinsal, what bitrate are we talking about? 2021-05-31 22:14 geist: don't forget the stupid licensing system though. You can only use the dev tools for free with certain chips, including the one on this board, otherwise you need to pay $,$$$ 2021-05-31 22:14 yeah, what annoys me is that you can get "open" whitebox switches that have some commodity ASICs of some sort in them, but the only OSes that will have drivers for the ASICs are all closed source 2021-05-31 22:14 so beware when buying FPGAs from digikey 2021-05-31 22:14 yah but the point at which you pay for it is the super expensive fpgas 2021-05-31 22:15 in practice i've never had an issue with the free licensing at all 2021-05-31 22:15 ie, you need to be dealing with $1k boards and whatnot before you get into that 2021-05-31 22:15 ie, kintex, etc 2021-05-31 22:15 but, that being said, if you want open source tools lattice fpgas have been basically 'figured out' 2021-05-31 22:15 ie, there is an open source compiler for it 2021-05-31 22:16 order a "defense grade" fpga that's $100k. see if men in black knock on your door :P 2021-05-31 22:16 I'm not sure what I'm trying to do right now 2021-05-31 22:16 IIRC lattice ones are much smaller 2021-05-31 22:16 we gathered 2021-05-31 22:16 no doy Skyz 2021-05-31 22:17 I was thinking a plan 9 OS would be neat 2021-05-31 22:17 I also was thinking ai 2021-05-31 22:17 "yeah I ordered that to make a machine vision autonomous sentry gun like Team Fortress 2" 2021-05-31 22:18 Skyz: yes. well what about plan 9 os? do you mean booting it? hacking it? 2021-05-31 22:18 Skyz: that's the point, you need to focus on something and *do it* 2021-05-31 22:18 "hacking it" 2021-05-31 22:18 Got it 2021-05-31 22:18 looking into it 2021-05-31 22:18 instead of just endlessly blathering about what is interesting 2021-05-31 22:18 no, looking into it is your problem. you look into everything and then dont do it 2021-05-31 22:18 dont look into it. *DO IT* 2021-05-31 22:18 the #osdev team can no longer help you 2021-05-31 22:19 if we had the power to make someone want to actually put some damn effort in I sure as hell would be lobbying for its widespread use 2021-05-31 22:19 we endlessly blather about stuff here, but usually after having done something with it, or blather about the thing we're doing 2021-05-31 22:19 Skyz, it's like you want to skydive from space when you haven't even been in an airplane yet 2021-05-31 22:20 that's a difference between endlessly blathering bout cool stuff that you have no idea what it really is 2021-05-31 22:20 our blathering is usually at least fairly concrete, yes 2021-05-31 22:20 Yeah 2021-05-31 22:20 Got it 2021-05-31 22:20 I got some ideas 2021-05-31 22:20 get some stuff working 2021-05-31 22:20 but lets get some working stuff 2021-05-31 22:20 modest stuff. not amazing stuff 2021-05-31 22:21 you had a bootsector working, keep going on that if you want 2021-05-31 22:21 that was concrete, and something that *actually* intersects with this channel 2021-05-31 22:21 sit down. write out what you want to do, starting in small chunks. then code. 2021-05-31 22:21 and please drop any of these ideas like 'i want to design a dthing and get a bunch of random people to help me' 2021-05-31 22:21 your end goal will with 100% certainty change over time. 2021-05-31 22:21 they are a non starter, 0% chance of working, and it just annoys people. simply stop doing that 2021-05-31 22:22 ^^ 2021-05-31 22:22 communal projects grow organically 2021-05-31 22:22 it's sort of the osdev equivalent of a nigerian prince scam 2021-05-31 22:22 they cannot be forced 2021-05-31 22:22 and no one falls for it 2021-05-31 22:22 forcing someone to work on your product for you is called involuntary servitude 2021-05-31 22:22 or in some places, an internship 2021-05-31 22:23 Skyz: it is sad that everything takes 10000 times longer than you wish it would 2021-05-31 22:23 I always suggest pick something that you think is near your upper limit, but totally doable. then when you realize it is harder than you thought it is enough of a challenge to learn from 2021-05-31 22:23 it is even sadder that we don't have AIs to generate code for us when we plug a bunch of random parts together 2021-05-31 22:24 Just no income atm :| 2021-05-31 22:24 you know was thinking about that. folks have been predicting AIs will be writing code for 50 years, hasn't happened. *but* i wonder if once AI models are cheap enough to deploy if the models/neural nets/etc become a commodity itself 2021-05-31 22:24 regarding Artix FPGAs, it is the GTP transceivers which are not available in all packages. I think the documentation is saying all pins have SERDES 2021-05-31 22:24 if you tried to machine learn a programmer i'm fairly sure tensorflow would give up 2021-05-31 22:24 geist: actually we have AI that writes code - it's called a compiler 2021-05-31 22:25 ie, company sells a net that promises to switch N packets/sec, or something even higher level 2021-05-31 22:25 "screw this, i'll go do biology or something" 2021-05-31 22:25 telling the AI which code to write is still significantly difficult 2021-05-31 22:25 immibis: yah but i'm thinking 30-50 years out 2021-05-31 22:25 ie, at what point do you not write code but you load up an AI and teach it to do the thing instead 2021-05-31 22:25 a net that promises to switch N packets/sec is just code that promises to switch N packets/sec 2021-05-31 22:25 for at least some projects 2021-05-31 22:25 yes, that is called a compiler 2021-05-31 22:26 fine. i'm trying to be more abstract here 2021-05-31 22:26 honestly having AI everything is going to bring our society down 2021-05-31 22:26 as in what parts of solutions in te future are less written than grown. obviously we're in the first stages of it 2021-05-31 22:26 heat: oh possibly, indeed. 2021-05-31 22:26 automatisation bad because advanced caveman need job and token to buy food 2021-05-31 22:27 heat: true 2021-05-31 22:27 one would hope we would grow tools to be able to better understand how these things work 2021-05-31 22:27 it's not clear how fast the SERDES can go from this document, but it mentions the number 1.25Gbps. https://www.xilinx.com/support/documentation/data_sheets/ds197-xa-artix7-overview.pdf 2021-05-31 22:27 and at least keep pace instead of 'we grew an AI to route traffic and we dont know how it works but it works 10% better than anything humans have designed' 2021-05-31 22:27 FPGA speed seems to always be a matter of synthesizing your design and seeing whether the synthesizer finds any timing violations 2021-05-31 22:27 immibis: the top level thing says 6.6Gb/sec 2021-05-31 22:28 but i would expect to find a hard limit on fixed function blocks 2021-05-31 22:28 but possible that's the pin speed, or whatnot 2021-05-31 22:28 well clearl fixed function stuff already runs at those speeds, and have to 10-15 years, so there are clearly transistors that can switch that 2021-05-31 22:28 6.6 is not found, but it says 6.25, but that's for the GTPs which are not available in this package 2021-05-31 22:28 ie, SATA, USB, etc 2021-05-31 22:29 the question isn't how fast a fixed function block *might* run, but how fast *this specific one* can run 2021-05-31 22:29 1.25 Gbps is the serdes speed you need for GbE iirc 2021-05-31 22:29 perhaps the answer is "faster than you'll ever be able to process the data" 2021-05-31 22:29 ah possible. the noe i linked earlier may be a fnewer version 2021-05-31 22:29 i think it was an xc7 instead of an xa7 2021-05-31 22:30 https://www.xilinx.com/support/documentation/data_sheets/ds180_7Series_Overview.pdf for example talks about a xc7 and it seems to have a 6.6 stuff in it 2021-05-31 22:31 so maybe there's a new line called the same artix, which may be what you bumped into with your board. may have the old artix-7s? 2021-05-31 22:31 arty a7 has XC7A35TICSG324 or XC7A100TCSG324 depending on whether you pay an extra $120 and wait for it to be in stock. SG324 is the package - same for both and that package has no GTP pins 2021-05-31 22:31 that's pretty shitty of xilinx if they did 2021-05-31 22:31 Not sure what I want to develop 2021-05-31 22:31 well go figure it out 2021-05-31 22:31 I think that number is for the GTPs. It's not exactly a lie. Note it's not even listed for the Spartan-7 as they have no GTPs 2021-05-31 22:31 "Ambitious project" 2021-05-31 22:32 but the SERDESes are a separate thing 2021-05-31 22:32 Skyz: honestly we cant and/or dont want to help you on that 2021-05-31 22:32 since you have shown zero forward progress over the last few *years* 2021-05-31 22:32 yeah you can't afford my "ideas guy" rate 2021-05-31 22:32 thus we have no reason to believe you'll ever be unstuck from your rut 2021-05-31 22:32 I'm starting 2021-05-31 22:32 you were starting 2 years ago 2021-05-31 22:33 (or at least it feels like 2 years) 2021-05-31 22:33 ehh 2021-05-31 22:33 anyway, this is why we kickbanned you fro the freenode one. i think we're being pretty generous right now even allowing you here. dont blow it. 2021-05-31 22:34 reminds me, we should watch out for the guy that came in, would chat about riscv, actually doing some OS stuff 2021-05-31 22:35 and then randomly go on a racist tirade 2021-05-31 22:35 since we're kinda blank slating the ban list now 2021-05-31 22:35 yeah 2021-05-31 22:35 once in a while we seem to get someone who's channeling the ghost of terry davis 2021-05-31 22:35 (RIP terry, walked into a train) 2021-05-31 22:35 yah, and sadly that almost certainly means mental illness, but there's just nothing we can do really 2021-05-31 22:36 since you can't just talk someone out of lack of medication 2021-05-31 22:36 yep 2021-05-31 22:36 OSdev is a complicated task 2021-05-31 22:37 Skyz: so which part are you stuck with? 2021-05-31 22:37 Coding, and really figuring out which part to work on 2021-05-31 22:37 I got some ideas started 2021-05-31 22:37 but it's gonna take time 2021-05-31 22:37 have you got anything working? 2021-05-31 22:37 Nope 2021-05-31 22:37 yeah this isn't gonna last long 2021-05-31 22:37 Skyz: at the very least, follow someone's tutorial so you have an idea of what's involved 2021-05-31 22:37 I know 2021-05-31 22:38 like what's a GDT, what's an IDT, what's a page table, what's a bootloader 2021-05-31 22:38 just so you have some starting point 2021-05-31 22:40 side note, as a community we ought to figure out what our standard reference tutorial should be for noobs 2021-05-31 22:40 immibis: Skyz can't code 2021-05-31 22:40 Skyz: well then learn to code. in C, which is not optional 2021-05-31 22:40 we haven't really looked at it since The Bad Tutorial kept sending us people with really badbugs 2021-05-31 22:41 I intentially left out the compiler out of my mind. Coding is like juggling, but I will attempt it 2021-05-31 22:41 presumably the bad tutorial = bkerndev 2021-05-31 22:41 yeah, though i do kinda wonder if that's mostly in the past. i dont think we've had too many refrences to the Bad Tutorial lately 2021-05-31 22:41 maybe it's no longer on the top of the google list 2021-05-31 22:41 immibis: no the malloy one 2021-05-31 22:41 I want to do some tutotial evaluation 2021-05-31 22:41 Skyz: again. focus. 2021-05-31 22:41 I'm gonna learn C 2021-05-31 22:41 every time you think about focusing you immediately spiral off into something else 2021-05-31 22:42 yes. perfect 2021-05-31 22:42 that's a really core starting point, yes 2021-05-31 22:42 make sure you're really comfortable with C because there's going to be a lot of it 2021-05-31 22:43 if you have C questions there is a #c channel for it 2021-05-31 22:43 geezus, how can i take this osdev discord seriously when actual partitipants have names like 'i really have aids (i'n india)' 2021-05-31 22:43 ??? 2021-05-31 22:43 there's another one that's about as bad 2021-05-31 22:44 oh on discord 2021-05-31 22:44 yah 2021-05-31 22:44 yeah uh my general recommendation for discords is to only exist in ones that sane, functional humans you know are in 2021-05-31 22:44 sorry to spill it over, it's just so frustraing 2021-05-31 22:44 unfortunately we have not yet found a vaccination for racism 2021-05-31 22:44 the vaccination is actually growing up around people from various races 2021-05-31 22:44 (nor would we be able to effectively apply it if one existed, as the people it would be used on are likely to think it will give them blood clots and ASD) 2021-05-31 22:44 and the annoying part is there actually are kinda functional humans they just also can be edgelords 2021-05-31 22:45 yeah some people never really left early 2000s internet shock humour behind 2021-05-31 22:45 yah there was some sort of random discussion on edgelording that i read the other day that kinda makese sense 2021-05-31 22:45 ie, say terrible things for attention/feelings of relevance 2021-05-31 22:46 so they're... special snowflakes? 2021-05-31 22:46 an appreciable fraction of awful things people say tend to be projection 2021-05-31 22:46 well, not saying t's a good thing, but there's usually some underlying psychology for most good and bad things 2021-05-31 22:47 (it's funny because they're the same people who mock other people by calling them snowflakes) 2021-05-31 22:47 a few generations removed from the root cause of regressive social upbringings and people become decent 2021-05-31 22:48 buuuuut that being said there are also people who are just horrible for horrible's sake 2021-05-31 22:49 they've internalized something for so long and been in so many echo chambers that they're incapable of *not* being horrible 2021-05-31 22:51 at the risk of vaguely invoking politics chat, we saw a similar recent issue on SA where the obsessive regular posters in a thread dedicated primarily to making fun of the previous president has had so little to do since january that they moved on to echoing each other until they became convinced that a culture war was brewing on the forums and decided to start it themselves to try to pre-emptively pull 2021-05-31 22:51 out a third party win 2021-05-31 22:51 the most bizarre thing we've seen in ages and it ended up with them more or less all flaming out and either self-banning, eating bans, or eating lifetime achivement awards of "your account has had its posting privilege disabled for 100,000 hours" 2021-05-31 22:55 I started a toy project. a bios rom for qemu that does just enough to initialize pci enough to initialize vga and print hello 2021-05-31 22:55 oh that sounds fun 2021-05-31 22:55 coreboot? nah, I run dougboot 2021-05-31 22:56 was funny when the unreal mode ffff0000 base screwed me up, but had that ironed out pretty quick 2021-05-31 22:59 as in, how the hell does jmp 0xffe00000 end up at 0x1ffdf0000 2021-05-31 23:01 geist: discord usually have a bunch of kids, i think that's the main issue 2021-05-31 23:01 afaik, it is a gaming chat platform, so... we get what they promise haha 2021-05-31 23:02 i feel the level of maturity changes when going from discord to irc 2021-05-31 23:03 You should see BBS, it's like talking to Aristotle and Socrates on there. 2021-05-31 23:03 No Immanuel though, he Kant use it. 2021-05-31 23:03 Which BBS- LOL 2021-05-31 23:05 You just made me curious about whether there are active communities in relevant to this channel. 2021-05-31 23:05 when i started osdev, #osdev and the wiki was the only good resource i've found 2021-05-31 23:05 apart from random blog posts 2021-05-31 23:06 There are BBS chat rooms 2021-05-31 23:06 I'm in two 2021-05-31 23:06 also, i found a slack server once, but it was more like "we will change the world with our os" 2021-05-31 23:06 There's like a 85 year old on one of them 2021-05-31 23:07 seds: oof 2021-05-31 23:08 The one thing missing from this ThinkPad... is onboard serial... 2021-05-31 23:08 graphitemaster: oh wow. years ago I was very active in the python-forum. There was a guy(?) called Bill. he was definitly older than most of the peeps there, but he was like a second version of geist, but in python. Eventually he disappeared 2021-05-31 23:09 I have a 1394 firewire port, VGA that's actually hooked up to the Intel chipset despite this being an Optimus setup, real PS/2 input devices, but no serial. 2021-05-31 23:10 Be thankful for the people you have who are there to help you, because one day they won't be. 2021-05-31 23:11 optimus always has the vga hooked to cpu. the discrete gpu dmas the frames into the igpu framebuffer 2021-05-31 23:11 Not on laptops. 2021-05-31 23:11 External ports were generally only available to the discrete GPU, but there were two setups. 2021-05-31 23:12 The LVDS was always on the iGPU. 2021-05-31 23:12 that's why there's no such thing as vsync on optimus laptop 2021-05-31 23:12 if using discrete 2021-05-31 23:12 you can turn it on but nothing happens 2021-05-31 23:12 graphitemaster: there was even a post asking where he was: https://web.archive.org/web/20120720183002/http://www.python-forum.org/pythonforum/viewtopic.php?f=7&t=31723 2021-05-31 23:12 ​web.archive.org: www.python-forum.org • View topic - I miss Bill 2021-05-31 23:12 it doesn't know where the scanout is 2021-05-31 23:13 Totally different area, but we had a guy in a webcomic community who... really wasn't that much older - 40s to our 20s - but he was iconic for some of the meta cultural stuff. Passed from heart failure six years ago. I went to his funeral. 2021-05-31 23:14 :/ 2021-05-31 23:14 I'd never met him face-to-face but that didn't matter. 2021-05-31 23:14 Wow 2021-05-31 23:14 what it matter is was he left behind 2021-05-31 23:16 https://en.wikipedia.org/wiki/Nvidia_Optimus "Optimus avoids usage of a hardware multiplexer and prevents glitches associated with changing the display driver from IGP to GPU by transferring the display surface from the GPU frame buffer over the PCI Express bus to the main memory-based framebuffer used by the IGP" 2021-05-31 23:16 ​en.wikipedia.org: Nvidia Optimus - Wikipedia 2021-05-31 23:19 Is using vscode okay? 2021-05-31 23:19 I think vscode is pretty good 2021-05-31 23:20 vscode is pretty great yeah 2021-05-31 23:20 the only issue I'm having with it these days is that they haven't exposed the fuzzy search controller to extensions 2021-05-31 23:21 so if you have an sshfs workspace that's mounted in the vscode extension (instead of actually mounted by the OS) it can't search files 2021-05-31 23:21 it's tagged as a "soon" fix in the vscode issues log 2021-05-31 23:21 go Help -> Toggle Developer Tools and have your mind blown if you didn't realize the whole program is a web page 2021-05-31 23:21 yep 2021-05-31 23:21 it's websites all the way down 2021-05-31 23:22 of course now I'm having issues with the friggin' NFS client for windows 2021-05-31 23:22 think I need to reboot in order to get the client to actually turn back on 2021-05-31 23:22 I might have crashed the redirector or something 2021-05-31 23:24 aha. the redirector doesn't show up in the services console for some reason 2021-05-31 23:24 but it can be manipulated by `sc` 2021-05-31 23:24 Having some issue switching from python to c 2021-05-31 23:25 Gonna spend some time learning the editor 2021-05-31 23:29 Skyz: emacs ftw 2021-05-31 23:29 i've used it I like the tetris feature 2021-05-31 23:29 It was supposed to be made to be an OS itself 2021-05-31 23:30 No, it was not, that's an old joke. 2021-05-31 23:31 it was not supposed to. emacs is actually a elisp interpreter, which happened to become an editor 2021-05-31 23:31 Also incorrect. Emacs was a set of macros for its predecessor. It was, and always has been, intended as an editor. 2021-05-31 23:34 It would be a good OS if it were standalone 2021-05-31 23:34 I've moved on from the Editor Wars to the Post-Editor Wars era, where we teach the history of both sides in school. 2021-05-31 23:34 It's a great editor 2021-05-31 23:35 klange: oh neat 2021-05-31 23:36 klange: a joke--kinda. There's an argument to be made that emacs was compensating for gnu copying unix rather than genera. And one of the predecessors to emacs was zmacs, an editor for one of the classic lisp machines 2021-05-31 23:36 *gnu's 2021-05-31 23:39 heh. turns out if I make changes to my build system and try to run it too quickly, bash gets upset because the NFS lock is still in place 2021-05-31 23:41 Emacs considerably predates the GNU concept, though; Stallman saw E at Stanford and worked with Mikkelsen on TECO to implement similar features. Emacs is the result of Stallman and Guy Steele building a large collection of macros for TECO, and "Emacs" name came from "E with MACroS" - this around '76 or so. 2021-05-31 23:42 The Lisp machine emacs showed up after that, and then it all gets jumbled with various different Emacs implementations until we arrive back at Stallman with GNU Emacs but that's nearly a decade later. 2021-05-31 23:46 The programs I'm writing are very straightforward 2021-05-31 23:47 An OS needs apps 2021-05-31 23:51 There's like no real need for a new general purpose os 2021-05-31 23:51 I have a couple ideas how it could work 2021-05-31 23:52 I was thinking of getting into app development 2021-05-31 23:53 I had an app that would work for people to manage their life 2021-05-31 23:54 It really involves time management 2021-05-31 23:54 It could be useful with hobby os dev 2021-05-31 23:55 Actually interesting is how UNIX/C came out together