klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
isaacwoods has quit [Quit: WeeChat 3.2]
dude12312414 has joined #osdev
<travisg> nice. any in particular you found to be lovely?
srjek has joined #osdev
dbana has joined #osdev
dbana has quit [Client Quit]
billc has joined #osdev
dutch has quit [Quit: WeeChat 3.2]
dutch has joined #osdev
zaquest has quit [Remote host closed the connection]
smeso has quit [Quit: smeso]
zaquest has joined #osdev
jbg has quit [Ping timeout: 240 seconds]
jbg has joined #osdev
smeso has joined #osdev
jbg has quit [Ping timeout: 250 seconds]
jbg has joined #osdev
srjek has quit [Ping timeout: 240 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
flx-- has joined #osdev
flx-- is now known as flx
flx- has quit [Ping timeout: 240 seconds]
sts-q has quit [Ping timeout: 252 seconds]
sts-q has joined #osdev
nyah has quit [Ping timeout: 240 seconds]
h4zel has joined #osdev
mahmutov has joined #osdev
Shikadi has quit [Ping timeout: 250 seconds]
edr has quit [Ping timeout: 248 seconds]
fedorafan_altern has joined #osdev
edr has joined #osdev
nur has quit [Quit: Leaving]
ZombieChicken has joined #osdev
fedorafan_altern has quit [Quit: Textual IRC Client: www.textualapp.com]
ZombieChicken has quit [Quit: WeeChat 3.2]
GeDaMo has joined #osdev
k0valski has quit [Quit: Ping timeout (120 seconds)]
h4zel has quit [Ping timeout: 240 seconds]
<klange> Thinking... instead of writing another paint app, I should do a vector illustrator... really push my little path rasterizer to the limit.
mctpyt has joined #osdev
<zid> You should draw ayame
wgrant has quit [Ping timeout: 240 seconds]
Belxjander has joined #osdev
immibis has quit [Ping timeout: 252 seconds]
tacco has joined #osdev
wgrant has joined #osdev
tacco has quit []
mahmutov has quit [Ping timeout: 248 seconds]
wgrant has quit [Ping timeout: 252 seconds]
k0valski has joined #osdev
mahmutov has joined #osdev
regreg has joined #osdev
wgrant has joined #osdev
regreg has quit [Read error: Connection reset by peer]
fwg has quit [Ping timeout: 250 seconds]
regreg has joined #osdev
fwg has joined #osdev
regreg has quit [Read error: Connection reset by peer]
regreg has joined #osdev
nur has joined #osdev
wgrant has quit [Ping timeout: 250 seconds]
regreg has quit [Read error: Connection reset by peer]
mctpyt has quit [Ping timeout: 250 seconds]
gateway2000 has quit [Read error: Connection reset by peer]
gateway2000 has joined #osdev
<klange> I _thought_ my UI was feeling a bit sluggish lately... turns out I accidentally removed a line that was supposed to be resetting clip regions, so it was flushing the entire screen on every update
<zid> not bad
<zid> I just wrote a program to parse the imports in PE and now I hate myself
<zid> PE is dum and I hate it
<clever> zid: i once saw somebody translate a windows kernel module into a linux elf dynamic library
<clever> so they could debug it under plain gdb
<zid> There's no program headers so it's all loaded so everything is done in virtual address space
<clever> at least its not a .com file :P
<zid> .com would have been preferable
<zid> I'm planning some stupid heinous exe shenanigans
wgrant has joined #osdev
<zid> I have a .dll that I inject into an .exe to povide rawinput, launcher's suck because it's hard to debug, can't do it after it already starts running because it's too late
<zid> so I just hex edited the entry point of the .exe to be LoadLibrary("hook.dll"); jmp _start
<klange> Today I added back in an old feature that was preloading fonts into shared memory blobs, which plays doubly duty of providing some level of theme control and making text rendering faster than the typical alternative of jumping around and using file i/o operations.
<zid> But that provides no feedback for the dll not being found, or version control etc, and there's no real space to put it into the original .exe
<zid> so I was going to re-pack them both into a new exe, by combining their import tables and .text/.data sections
<clever> zid: :D
<zid> The fact it's all done in virtual address space means that's a super annoying job though, because the import table is in memory, and BETWEEN .text and .data, so I can't grow it
<klange> Something relevant to your PE woes, I also added some getopting to my readelf, which was previously doing a solid job of emulating the output of binutils' `readelf -a`
<zid> so the stupid hack is to dump both, put the SUPER IMPORT TABLE *after* everything, then steal the relocations and reapply them to the original import tables
<zid> cus you know, PE is dumb
<clever> ive done injecting a dll and patching the relocation tables once before
<zid> patching would be easy, I need to grow it :/
<clever> LD_PRELOAD makes things far far simpler on linux
<zid> I instead need to dump, combine, patch
<clever> i was patching the table at runtime...
<zid> Yea that's trivial
<zid> the rdata entries are at fixed offsets it's literally *((u32 *)rdata_for_func) = new_func;
<zid> It's a ghetto got/plt basically
<clever> once you remap that page r/w
<zid> My dll already does patching and has helpers for all that
<zid> It has a PATCH ENGINE where it takes an array of patches with hint tags like "we're patching a call"
<zid> and does the jmp size + 4 + relative offset calc for you
<zid> and does the permissions
<zid> /* Input layer hacks */
<zid> {CALL, 0, 0, 0x0040D2B2, input_init, 4},
<zid> {ARRY, 0, 0, 0x0040D3C8, nops, 5},
<zid> {CALL, 0, 0, 0x0040D3C3, freeplay, 4}, /* JVS function */
<zid> patch a 4 byte call at 40d2b2 to call input_init instead, put 5 nops at d3c8 etc
<clever> ah, thats way more powerful
<zid> but the dll itself obviously needs WriteProcessMemory etc relocated for it, and game.exe doesn't need it, and the IAT is 'full', hence the issue
<zid> if you try to pack the exe with the dll, either you're manually doing all your relocations for the exe or the dll, as the loader can only do one 'half', or you're doing my insane shit
<clever> isnt there a way to do CreateProcess and hang immediately? for debugger usage?
<zid> where you make a fake 'combined' IAT, then write it back out
<zid> Yes, that's a loader
<zid> and loaders suck
<clever> and then you can patch the target to inject the dll, without needing a bigger import table
<clever> ahh
fwg has quit [Quit: .oO( zzZzZzz ...]
<clever> what if you just make .text bigger
<zid> that will move .data
<clever> can you add a whole new section?
<zid> I can, on the end, which si the plan
<zid> .text.dll .rdata.dll and .data.dll go on the end or whatever
<clever> what if you just add a .text.loader
<zid> and rdata.dll actually imports everything game.exe would have wnated
<clever> then patch _start to jump to that, LoadLibrary with error checking, then jump back
<zid> and then copies the first half of itself to the original .rdata
<clever> so LoadLibrary still does all of the work
<zid> who's doing the imports for the exe then
<zid> my loader will need diff imports, so we've got the exact same issue
<zid> There is a way to do it like that, where you just add a .loader and it does GetProcAdress for anything it needs to call
billc has quit [Quit: Leaving]
freakazoid333 has quit [Ping timeout: 250 seconds]
xenos1984 has quit [Ping timeout: 250 seconds]
xenos1984 has joined #osdev
wereii has quit [Quit: ZNC - https://znc.in]
mahmutov has quit [Ping timeout: 250 seconds]
wereii has joined #osdev
CryptoDavid has joined #osdev
AssKoala has joined #osdev
pretty_dumm_guy has joined #osdev
<klange> ah, everything's feeling smooth and responsive, even under TCG~
<klange> Premature optimization may be the root of all evil, but eventually optimizations are no longer 'premature'.
ElectronApps has joined #osdev
gateway2000 has quit [Read error: Connection reset by peer]
gateway2000 has joined #osdev
regreg has joined #osdev
dennis95 has joined #osdev
AssKoala has quit [Ping timeout: 240 seconds]
Belxjander has quit [Quit: AmigaOS PPC 4.1 +E +U1 // AmIRC 68K]
isaacwoods has joined #osdev
kulernil has joined #osdev
kuler has quit [Ping timeout: 276 seconds]
elastic_dog has quit [Ping timeout: 250 seconds]
elastic_dog has joined #osdev
kulernil has quit [Remote host closed the connection]
kulernil has joined #osdev
nyah has joined #osdev
srjek has joined #osdev
CryptoDavid has quit [Quit: Connection closed for inactivity]
amine has quit [Quit: The Lounge - https://thelounge.github.io]
amine has joined #osdev
mahmutov has joined #osdev
fedorafan_altern has joined #osdev
fedorafan_altern has quit [Quit: Textual IRC Client: www.textualapp.com]
k0valski has quit [Quit: Ping timeout (120 seconds)]
kulernil has quit [Remote host closed the connection]
kulernil has joined #osdev
ElectronApps has quit [Read error: Connection reset by peer]
gateway2000 has quit [Remote host closed the connection]
gateway2000 has joined #osdev
kulernil has quit [Remote host closed the connection]
kulernil has joined #osdev
kulernil has quit [Remote host closed the connection]
dude12312414 has joined #osdev
kulernil has joined #osdev
kulernil has quit [Remote host closed the connection]
freakazoid343 has joined #osdev
mahmutov has quit [Ping timeout: 245 seconds]
gateway2000 has quit [Remote host closed the connection]
gateway2000 has joined #osdev
cookie is now known as ckie
dude12312414 has quit [Ping timeout: 276 seconds]
dude12312414 has joined #osdev
AssKoala has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
srjek has quit [Ping timeout: 250 seconds]
AssKoala has quit [Read error: Connection reset by peer]
AssKoala has joined #osdev
mahmutov has joined #osdev
Shikadi has joined #osdev
kulernil has joined #osdev
kulernil has quit [Remote host closed the connection]
kulernil has joined #osdev
kulernil has quit [Remote host closed the connection]
kulernil has joined #osdev
mahmutov has quit [Ping timeout: 248 seconds]
kulernil has quit [Remote host closed the connection]
kulernil has joined #osdev
mahmutov has joined #osdev
kulernil has quit [Remote host closed the connection]
Shikadi has quit [Ping timeout: 252 seconds]
kaitsh has joined #osdev
lTheCrow has joined #osdev
dude12312414 has quit [Ping timeout: 276 seconds]
<ZetItUp> has anyone used valgrind before?
lTheCrow has quit [Quit: Leaving]
<ZetItUp> it kinda shouts at half my libc
<ZetItUp> code works and runs fine, but not sure if i should just ignore valgrinds error for it
<zid> it shouldn't be spammy unless your libc is doing syscalls that return allocated structures which you then read
<zid> valgrind can't tell you did a syscall, so think you're reading uninitialized memory
<zid> thinks*
<zid> i.e recv
koon has quit [Quit: leaving]
<zid> valgrind needs teaching about them, but, don't ask me how
koon has joined #osdev
GeDaMo has quit [Quit: Leaving.]
<moon-child> could have a #ifdef VALGRIND memset(whatever, 0), and do a -DVALGRIND build
<ZetItUp> hehe ok, guess ill ignore it for now then
<ZetItUp> about 251 errors lol
dennis95 has quit [Quit: Leaving]
lTheCrow has joined #osdev
regreg has quit [Read error: Connection reset by peer]
<vin> ' If two of the three-channel slots are populated with identical DIMMs, then the CPU activates dual-channel mode.' from https://frankdenneman.nl/2015/02/18/memory-tech-primer-memory-subsystem-organization/ what does only two channels are activated mean? Out of three only two can be concurrently accessed?
<bslsk05> ​frankdenneman.nl: Memory Deep Dive: Memory Subsystem Organisation - frankdenneman.nl
<vin> So if I have 4 DIMMs with 2666MHz and two with 2400MHz, does that mean only quad channels are activated?
<geist> klange: might be useful to add some sort of clip region debugging thing
<geist> in the old days with 'draw on framebuffer' style drawing i think it was fairly easy to fill with green or something for a frame
<geist> though fully buffered stuff may be less easy to make it show
diamondbond has joined #osdev
diamondbond has quit [Read error: Connection reset by peer]
AssKoala has quit [Remote host closed the connection]
AssKoala has joined #osdev
kaitsh has quit [Read error: Connection reset by peer]
AssKoala has quit [Ping timeout: 250 seconds]
srjek has joined #osdev
emoney has joined #osdev
__sen has quit [Ping timeout: 256 seconds]
__sen has joined #osdev
Arthuria has joined #osdev
nsmb has joined #osdev
flx has quit [Quit: Leaving]
flx has joined #osdev
PyR3X has joined #osdev
dbana has joined #osdev
Arthuria has quit [Ping timeout: 250 seconds]
billc has joined #osdev