Search logs:

channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched

#osdev2 = #osdev @ Libera from 23may2021 to present

#osdev @ OPN/FreeNode from 3apr2001 to 23may2021

all other channels are on OPN/FreeNode from 2004 to present


http://bespin.org/~qz/search/?view=1&c=osdev2&y=24&m=7&d=8

Monday, 8 July 2024

00:00:00 <geist> ah yeah the whole vector 8 foloowed by 0xd. yep
00:00:00 <zid> random ascii! bruce dawson
00:00:00 <adder> but but
00:00:00 <zid> https://randomascii.wordpress.com/2019/04/21/on2-in-createprocess/
00:00:00 <bslsk05> ​randomascii.wordpress.com: O(n^2) in CreateProcess | Random ASCII – tech blog of Bruce Dawson
00:00:00 <geist> someone should go kick the ass of the guy at ibm that messed up the default PIC location
00:01:00 <geist> that was clearly not rading the x86 manual
00:01:00 <zid> PC best architecture though!
00:01:00 <adder> I clearly call my function to remap to pic, and it happens before I sti, so I'm not sure how's this possible
00:01:00 <adder> https://bpa.st/BLVA
00:01:00 <bslsk05> ​bpa.st: View paste BLVA
00:01:00 <geist> intending to remap it and having it remap can be two different things
00:02:00 <adder> yeah unless somehow I fail to remap it
00:02:00 <heat> void pic_remap(u16, u16) { /* TODO */ }
00:02:00 <geist> right, validate that you do
00:02:00 <nikolar> kek
00:05:00 <heat> info pic dumps a bunch of pic registers in qemu
00:31:00 <adder> https://imgur.com/kY4SaRI.png
00:31:00 <bslsk05> ​imgur.com <no title>
00:32:00 <adder> pic1: irr=00 imr=8e isr=00 hprio=0 irq_base=28 rr_sel=0 elcr=0c fnm=0
00:32:00 <adder> pic0: irr=00 imr=b8 isr=00 hprio=0 irq_base=20 rr_sel=0 elcr=00 fnm=0
00:32:00 <geist> tehre y aog
00:32:00 <geist> there ya go
00:32:00 <adder> :D :D
00:39:00 <heat> sweet
00:39:00 <geist> what was up with the remap function?
00:39:00 <geist> outp args in the wrong order? I've done that a bazillion times
00:40:00 <geist> es[pecially when looking at linux stuff,s icne the put the args backwards for whatever reason
00:40:00 <geist> probably to match asm syntax
00:41:00 <nikolapdp> yea
00:41:00 <adder> yes I had my outb/inb impls wrong
00:56:00 <heat> i always do port, value
00:56:00 <heat> i find it more intuitive
01:42:00 <zid> nikolapdp good news, it is monday, sorta
02:16:00 <geist> yah agreed. linux annoyingly does a bunch of those things backwards
02:16:00 <geist> like writel, etc
02:18:00 <Mutabah> what order does it do?
02:19:00 <Mutabah> Hopefully `outb(port, val)`, right?
02:19:00 <Mutabah> (mirroing assignment syntax, and intel assembly syntax)
02:21:00 <Mondenkind> make a wrapper struct for ports
02:21:00 <Mondenkind> and then overload it so you can do both ways :)
02:24:00 <Mutabah> That is the fastest transition from brilliant to cursed I have ever read
02:35:00 <Mondenkind> thanks i try
03:23:00 <geist> Mutabah: nope
03:24:00 <geist> val, port. annoying
03:26:00 <Mutabah> cursed
03:27:00 <Mutabah> I blame AT&T
03:27:00 <geist> and same with writeb, writel, etc
03:27:00 <geist> yah that's my assumption
03:27:00 <Mutabah> I guess fwrite/fread do that order... but memset/memcpy don't
03:27:00 <Mutabah> Consistency, what's that?
03:27:00 <geist> i guess that's a good case for C++, have some sort of struct IoPort { int val; } thing and force the functios to take that
03:29:00 <Mondenkind> c can do that just the same??
03:30:00 <geist> you can,though it's a bit more unweildy
03:31:00 <Mondenkind> not really?
03:31:00 <Mutabah> You can't create struct instances inline in C iirc
03:31:00 <geist> you kinda can, but it's annoying, and i'm not sure its ansi C
03:32:00 <geist> you can do something like 'write_port((IoPort) { 5 }, val);`, iirc
03:32:00 <geist> and iirc it's subtly different than C++s
03:32:00 <Mutabah> I think that's GNU only?
03:33:00 <geist> https://gcc.godbolt.org/z/3MPos5exd is not half bad
03:34:00 <geist> https://gcc.godbolt.org/z/5T5nqjMdG guess the C version isn't too bad
03:35:00 <Mondenkind> not gnu only
03:35:00 <geist> yeah apparently
03:35:00 <geist> i though that was gnu only, but guess not. cool
03:35:00 <Mondenkind> can also struct ioport ioport(int x) { return (struct ioport){x}; } if you feel like it
03:35:00 <Mutabah> Neat
03:36:00 <geist> that's one of those weird differences in C and C++, IIRC
03:36:00 <Mondenkind> you can also take the address of a compound literal
03:36:00 <Mondenkind> f(&(struct whatever){.a = bla, .b = bluzzles})
03:37:00 <geist> yah that's the C equivalent of making a temp object and passsing by reference
03:57:00 <zid> what C is actual enums
03:58:00 <zid> needs*
03:58:00 <zid> words are hard
03:58:00 <zid> then you'd just have a PORT_DATA or whatever of type enum PORT and abuse all the tags matching :P
04:27:00 <geist> yah enum classes are nice
08:38:00 <zid> suddenly hot again
08:38:00 <zid> I blame gedamo
08:40:00 <vdamewood> I may have kept him from opening the fridge door to cool the planet down.
08:58:00 <chiselfuse> at the very end of this chapter https://www.nasm.us/doc/nasmdoc3.html#section-3.4 it says:
08:58:00 <bslsk05> ​www.nasm.us: NASM - The Netwide Assembler
08:58:00 <chiselfuse> > NASM has the capacity to define other special symbols beginning with a double period: for example, ..start is used to specify the entry point in the obj output format (see section 8.4.6), ..imagebase is used to find out the offset from a base address of the current image in the win64 output format (see section 8.6.1). So just keep in mind that symbols beginning with a double period are special.
08:58:00 <chiselfuse> i can't find info on this, i thought it was `_start`, not `..start`. it says dots are for local variables, then says this...
09:06:00 <kof673> it does note those are for specific output formats
09:07:00 * kof673 zzzzzzzzzzzzzzz
09:09:00 <chiselfuse> lol https://forum.nasm.us/index.php?topic=2086.msg9208#msg9208
09:09:00 <bslsk05> ​forum.nasm.us: How do I set the entry point? The official documentation's explanation is wrong.
09:15:00 <zid> _start is what ELF calls it
09:15:00 <zid> That's a directive for the OBJ output format
09:15:00 <zid> (_start is actually just canonical too, it isn't part of the spec)
09:16:00 <zid> Your system's linker scripts just all have ENTRY(_start) in them, because the libc does
15:09:00 <Ermine> Tfw directory entry I'm looking for is at offset 1337 from the beginning of the block
15:11:00 <nikolapdp> leet
15:51:00 <heat> "Prior to Linux 5.5 iopl() allowed the thread to disable interrupts while running at a higher I/O privilege level"
15:51:00 <heat> proper unix behavior
15:53:00 <heat> ohhhh you can't use the x86 tss iopl because it allows you to use cli/sti
15:53:00 <heat> that's a gotcha
16:10:00 <Ermine> rofl
16:11:00 <heat> hey ermine here's worse: https://lore.kernel.org/all/202109151423.43604.linux@zary.sk/
16:11:00 <bslsk05> ​lore.kernel.org: IOPL emulation breaks hpasmd (hp-health) needed by HP DL380 G4 servers - Ondrej Zary
16:11:00 <heat> THEY ACTUALLY DISABLED FUCKING INTERRUPTS
16:11:00 <Ermine> Fuck
16:12:00 <Ermine> I deeply regret approving purchasing those HP servers
16:12:00 <heat> lmfao
16:13:00 <heat> they map the fucking BIOS bits and then execute them
16:14:00 <Ermine> I'll advise buying Dell or something next time
16:14:00 <Ermine> idk actually
16:14:00 <heat> if i ever advise someone buying dell you best believe i'm in a hostage situation
16:16:00 <Ermine> ok, will cross dell out of my list
16:17:00 <Ermine> I guess only Lenovo is left then
16:18:00 <heat> buy oxide
16:20:00 <Ermine> these ones? https://oxide.computer/
16:20:00 <bslsk05> ​oxide.computer: Oxide Computer Company
16:20:00 <heat> yes, they run illumo
16:20:00 <heat> s
16:22:00 <netbsduser> illumos with rust
16:22:00 <netbsduser> what a combination
16:22:00 <Ermine> the fact I've tried out OpenIndiana for a few seconds doesn't make me illumos lover
16:23:00 <heat> netbsduser, they seem to really like rust over there
16:24:00 <heat> if there's anything you can fault the old solaris people (bmc, etc) for, lack of adapting to new technologies isn't it
16:26:00 <Ermine> Meanwhile, fedora installer can't detect my ssd for some reason
16:27:00 <nortti> how's the ssd attached?
16:27:00 <Ermine> sata
16:27:00 <Ermine> The kernel detects it just fine, it's installer issue
16:27:00 <nortti> that's curious
16:28:00 <Ermine> therefore I'll probably go with btwOS. Eh
16:30:00 <heat> weird
16:36:00 <heat> Ermine, hmm is your ssd in raid mode?
16:36:00 <Ermine> no
16:36:00 <Ermine> I have nothing to raid it with
16:37:00 <heat> yeah but have you seen in the BIOS settings?
16:37:00 <heat> from a quick google i think it can fuck with fedora
16:39:00 <Ermine> SATA Mode Selection is set to AHCI
16:45:00 <Ermine> Anyway, my storage configuration is basic. It's fedora which can't get their installer right in 2024, which is LUL
16:50:00 <heat> onyx doesn't have an installer, so the onyx installer is never wrong
16:57:00 <Ermine> sounds like minimalist take
16:58:00 <heat> i'm simply an arch btw enjoyer
16:58:00 <heat> minimalists would have you write your own install script in POSIX sh
16:59:00 <heat> somehow abusing pipes along the way
17:17:00 <Ermine> arch has an installer
17:32:00 <heat> that's for the WEAK to use
17:52:00 <Ermine> I'm weak ngl
18:00:00 <heat> you should try installing it manually
18:00:00 <heat> you'll find it to be pretty easy
18:02:00 <zid> It is monday for real now my dudes
18:03:00 <heat> the guide basically tells you what to do, essentially <configure this and that, pacstrap -S base <desired packages>, arch-chroot /mnt, you're in your new system now
18:03:00 <heat> just don't forget installing a bootloader!
18:14:00 <Ermine> heat: I've installed it several times manually, so I know how this works
18:15:00 <Ermine> I'm too lazy for that
18:15:00 <heat> sad
18:57:00 <kof673> > hpasmd is a binary-only crap that is required on these servers for the fan regulation to work. Without it, fans run at full speed, producing too much noise and consuming power.
18:58:00 <kof673> which is just to say.....the hw is one thing, this sounds like deliberate software issue because they want to keep their "binary-only"
18:58:00 <eevv> Anyone ever tried to make a custom PE 64-bit file and run into "the application was unable to start correctly" error? The error code is 0xc000007b. I have one section `.text` that is located virtually and physically (in file) at address 0x1000 (the file and virtual alignments are both 4k). I set my entry address to 0x1000 and base code 0x1000, but
18:58:00 <eevv> when I set the entry address to 0, there is no application, however I think it tries to execute the header as if it were code...
18:59:00 <eevv> there is no application error*
18:59:00 <geist> hmm, well that sounds like a plausible thing
19:23:00 <heat> geist, remember that thing about your (fuchsia) mmio helpers being in inline asm cuz stores were like merged or something?
19:23:00 <heat> in what case is it permissible for that to happen?
19:26:00 <zid> PE is annoying like that, it's very picky but hard to know what it's being picky about
19:31:00 <heat> ahhh the problem wasn't that stores were merged, it's that they were using movd and other SSE instructions
19:55:00 <geist> right, even on ARM, using writeback in load/stores is no bueno for VM
19:58:00 <geist> note you'll only notice it if you're running on KVM, but i was seeing it in particular cases with gcc 14 on a rpi 5 + KVM
19:59:00 <geist> on x86 i think for the most part it's hard to find an instruction kvm wont emulate, but they can emulate less efficiently, so sticking to a simple mov is a clean path
20:00:00 <heat> yeah
20:00:00 <heat> also TIL on clang address_space(any number) Just Works
20:02:00 <geist> yea that's kinda interesting
20:03:00 <geist> if you're looking at the LK mmio stuff i definitely got that from fuchsia, and it has a nice property of not letting you mix/match it
20:03:00 <geist> or something
20:05:00 <heat> yep
20:06:00 <heat> it works exactly like linux sparse, that's where they got it from
20:06:00 <heat> __user (and __iomem) is defined noderef and address_space(random number)
20:07:00 <heat> although sparse has the aditional feature of not being able to cast between them at all, you need a "force cast" for that
20:27:00 <heat> i don't really understand what's going on but my plasma+wayland setup seems to randomly send tabs to programs
20:28:00 <heat> i alt tab away from the editor or the browser and, boom, new tab just dropped
20:53:00 <nikolar> KERNAL
20:54:00 <zid> nikolapdp is it 10pm yet
20:55:00 <vdamewood> zid: It is somewhere.
20:55:00 <zid> somewhere doesn't count if you're waiting for a thing though
21:00:00 <nikolar> It is zid
21:00:00 <nikolar> For you
21:00:00 <zid> great, time to madly refresh nyaa then
21:01:00 <nikolar> Do that
21:26:00 <Ermine> heat: do you mean tab key?
21:27:00 <gog> nyaa
21:27:00 <heat> yep
21:35:00 <eevv> Alright I figured out the PE thing, just set OS and subsystem versions to something small, if you set to 10 then it probably expects like manifest xmls and stuff
21:36:00 <eevv> PE is so undocumented its cray cray out here
21:38:00 <netbsduser> it's a direct descendent of COFF itself
21:38:00 <netbsduser> you could try XCOFF or ECOFF if you want to have a different flavour
21:42:00 <Ermine> linear executable!
21:43:00 <chiselfuse> zid: finally came round to do that small thing https://0x0.st/XB7l.sh
21:43:00 <chiselfuse> can shift+e in ida and enable it to always get copied to clipboard
21:44:00 <chiselfuse> or turn on bytes of instructions and highlight them then use this with primary selection
21:44:00 <chiselfuse> (hex view unusable because selects text in boxes)
21:45:00 <zid> nikolar: 1 week coma pls
21:46:00 * kof673 squints https://archive.org/details/windows-nt-196-linking-and-running-gcc > warning LNK4033: converting object format from OMF to COFF
21:47:00 <nikolar> I can't do that zid
21:47:00 <zid> shit
22:39:00 * vdamewood gives gog a fishy
22:42:00 * gog chomp fishy