<clever>
an hmac uses 0x5c and 0x36 as padding, and is basically just hash(pad(key)+hash(pad(key)+payload)))
<clever>
a search of the disassembly quickly found a function with 5c and 36 as immediates
<clever>
and that then led to the buffer key was held in, which cracked the whole thing open
<clever>
just the hint that i was looking for something near 5c and 36, was all i needed
epony has quit [Max SendQ exceeded]
epony has joined #osdev
epony has quit [Remote host closed the connection]
<klange>
> 09:05:45 up 14 days, 16:18
<klange>
i have not worked on rpi stuff in a while
<klange>
I guess I should decide on whether I'm bringing the RPi400 with me on this international trip...
<clever>
doit!
<klange>
I would need to bring cables for it, the serial adapter, something for the microSD card... probably too much of a hassle
mahmutov_ has joined #osdev
mahmutov1 has joined #osdev
Affliction has joined #osdev
mahmutov has quit [Ping timeout: 260 seconds]
mahmutov_ has quit [Ping timeout: 248 seconds]
mahmutov1 has quit [Ping timeout: 260 seconds]
epony has joined #osdev
mahmutov1 has joined #osdev
Gooberpatrol66 has joined #osdev
<geist>
yah i love the rpi400. i dont really have a purpose for it around my lab but i like to keep it around and plug it in and pet it
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
mahmutov1 has quit [Ping timeout: 268 seconds]
sonny has joined #osdev
sonny has left #osdev [#osdev]
<CompanionCube>
geist's pet rpi
gog has quit [Ping timeout: 260 seconds]
<geist>
ugh my home server is starting to crash mroe and more
<geist>
just a hard lock up. no obvious way to debug it
<clever>
ive got the same issue with my main desktop
<clever>
i tried netconsole, but nada
<geist>
been maybe once every 2 weeks, now it's more frequent. just went down twice in a few days
<clever>
ONCE, the LED's on a ps2 keyboard where blinking, a sign of a kernel panic, but it hasnt done that since
<geist>
i have seen the cursor stop blinking, but it may be a graphical framebuffer in which case the kernel stopping would make sense
<clever>
X was online every time mine hung
<clever>
so a blinking cursor is far more complicated
<clever>
mine also doesnt respond to ARP when it hangs
<geist>
yah this one is headless, but it's also running about 8 VMs. i suppse i can try not starting them to see if it still fails without them running
<clever>
and ive seen systems respond to ARP before, even when in swap deadlock
<geist>
yeah
<zid>
simple things that can be handled in an IRQ can be alive forever theoretically
<zid>
unless it wedged with interrupts disabled inside the kenrle
<zid>
or kernel
<clever>
that reminds me
<clever>
my motherboard has a 2 digit 7-segment LED display, that can show hex codes
<clever>
no matter what ive tried, i havent been able to control it from within linux
<clever>
only the bios is able to control it
<zid>
Mine responds to isa port 80
<zid>
even if the machine is fully booted
<zid>
it's possible yours latches as the bios leaves though I suppose
<clever>
but how do you write to isa port 80 from linux userland?
<zid>
you don't
<clever>
and is that base10 80 or 0x80?
<geist>
0x80
<zid>
hex I think
<zid>
not hard to google for though, isa post code port .gooogle.com
<geist>
you can ask for io port access if you're root i think (though i dont know what the api is)
<geist>
yah
<CompanionCube>
wasn't /dev/port a thing at one point
<clever>
it says "for further information please see <here>"
<clever>
you cant click <here> because the A from "rc tweakit" is huge
<clever>
and clips into the line above it
<clever>
only the top 1 pixel row of <here> can be clicked
<clever>
and the link is 404 anyways, lol
<clever>
i cant even find the download page now
Terlisimo has quit [Quit: Connection reset by beer]
Terlisimo has joined #osdev
Jari-- has quit [Remote host closed the connection]
the_lanetly_052 has joined #osdev
ThinkT510 has joined #osdev
m3a has joined #osdev
kingoffrance has quit [Ping timeout: 268 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
vai has joined #osdev
vai is now known as Jari--
Payam has joined #osdev
xenos1984 has joined #osdev
bauen1 has quit [Ping timeout: 260 seconds]
<gorgonical>
Ah man I'm such a dingus
<gorgonical>
I just wasted all of today trying to do something that isn't really doable
<gorgonical>
I spent like the whole day diving into how OP-TEE includes mbedtls and how mbedtls works on the idea that I could implement TLS in Arm TrustZone, so I could implement a TCP server
<gorgonical>
But I'm realizing the OP-TEE system doesn't provide really any way to create a listening server inside the trustzone
nanovad has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
nanovad has joined #osdev
bauen1 has joined #osdev
ptrc has joined #osdev
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
dennis95 has quit [Quit: Leaving]
<Griwes>
Turns out that spending a few days coding in nature can be pretty productive, I now have all the syscalls necessary for process startup, and have successfully started one after dynamically linking it to the vdso
<Griwes>
Now I just need to (1) actually use correct access flags for the mappings and (2) undo my toolchain crimes by patching clang (I'm temporarily pretending to clang that it's targetting linux, because otherwise, with --ld-path pointing at ld.lld, it decides to invoke the linker through GCC, in an incredibly broken way where it drops sysroot on the floor)
eddof13 has joined #osdev
freakazoid343 has joined #osdev
rustyy has quit [Quit: leaving]
rustyy has joined #osdev
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
the_lanetly_052 has quit [Ping timeout: 245 seconds]
eddof13 has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FatalNIX has quit [Quit: Lost terminal]
eddof13 has joined #osdev
Likorn has joined #osdev
<sortie>
go go Griwes sounds super cool!
the_lanetly_052 has joined #osdev
<zid>
what do you guys do with your boot stack, does it end up being init's kernel stack, or do you just go into some common path where each task does a kalloc for the kernel stack and you just leak it
srjek has quit [Ping timeout: 260 seconds]
<clever>
zid: i think for LK, the boot stack winds up becoming the stack for the idle thread
<bslsk05>
github.com: lk/main.c at master · littlekernel/lk · GitHub
<clever>
lk_main() is ran by start.S, and ends with thread_become_idle()
<clever>
thread_init_early() i think is what turns a naked stack into the init thread
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zid>
does it reset it back with & 0xFFFF or just leave the main() return frame on it?
<zid>
& ~0xFFFF
<zid>
doesn't matter obviously but it does feel tidier :P
Payam has quit [Quit: Client closed]
gildasio has quit [Ping timeout: 240 seconds]
gildasio has joined #osdev
<geist>
yah i forget. i think it just ends up with main on the stack
<geist>
the 'becomes idle' is more of setting up the idle thread_t to line up with what the cpu is already doing
<geist>
such that by the time the scheduler is properly started, the cpu is already in thread context
<clever>
yeah, from memory, thread_init_early creates a thread context, so the scheduler will consider the current state a valid thread
<clever>
and thread_become_idle then just flags the current thread as an idle thread, and does an infinite sleep
<zid>
My best mental image is a caterpillar making a cocoon for itself
<clever>
and the scheduler will just run it when it runs out of jobs
<zid>
"I'm already here but I should totally be a proper butterfly, I'll just stick these structs tomyself an hide"
<sortie>
zid, yeah same, in Sortix, the kernel prioritizes going multithreaded as soon as possible, and the main thread becomes the idle thread at that point
<sortie>
It's an explicit design philosophy to have as little special early boot times as possible where there are different rules
<clever>
LK still has a decent number of init tasks that get ran in a set order by lk_main()
<clever>
but with the app framework, you can register both an init that gets ran early, and an entry-point that gets ran in its own thread later
<clever>
init should deal with racy things, like creating global mutexes
<clever>
while the entry-point can do slower things, and things that could block
Likorn has quit [Quit: WeeChat 3.4.1]
epony has joined #osdev
the_lanetly_052_ has joined #osdev
the_lanetly_052 has quit [Ping timeout: 268 seconds]
GeDaMo has quit [Remote host closed the connection]
Likorn has joined #osdev
<zid>
I found felix's christmas present but he isn't here
dzwdz has quit [Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world.]
dzwdz has joined #osdev
freakazoid343 has quit [Read error: Connection reset by peer]
fwg has quit [Quit: .oO( zzZzZzz ...]
freakazoid12345 has joined #osdev
sortie has quit [Ping timeout: 260 seconds]
lg has quit [Ping timeout: 240 seconds]
lg has joined #osdev
sortie has joined #osdev
Burgundy has quit [Ping timeout: 248 seconds]
hodbogi_ has joined #osdev
<hodbogi_>
I have a terrifying idea.
<hodbogi_>
Equivalent of what would be a dynamically linked object wrapped in send/recv message passing processes + RPC/IPC.
hodbogi_ is now known as FatalNIX
<FatalNIX>
I'm just jotting down wild ideas that don't always make sense.
<heat>
congrats
<heat>
you have found rundll
freakazoid12345 has quit [Remote host closed the connection]
<FatalNIX>
Is that really how rundll32 worked?
<FatalNIX>
See I had this odd feeling it was a crazy idea but somebody has to have done it
<heat>
well, no
<heat>
rundll32 just ran dlls
<clever>
i think rundll, just loads a dll, and runs the named symbol
<heat>
the RPC/IPC part is implicit since it's running on its own address space :)
janemba has quit [Ping timeout: 250 seconds]
<FatalNIX>
I was kind of thinking what if I could somehow wrap some sort of process around my shared objects and have them work with the ELF to handle calls. I could do something like Erlang where I could "process link" so that in the event something went wrong it would crash the parent process that interfaced the object.
<geist>
clever: re: lk_init hooks. post LK_INIT_LEVEL_THREADING they're running in the boostrap thread
<geist>
which is the first thread that runs outside of the idle thread
<geist>
most of the lk hooks run at that level
<clever>
ah
<clever>
most of mine run earlier then that
<FatalNIX>
But supposedly my idea is as usual something that isn't as crazy as it seemed.
<heat>
FatalNIX, would your shared objects not export symbols other than functions?
<clever>
geist: but the post LK_INIT_LEVEL_THREADING hooks, are still ran sequentially?
<geist>
yes, but in the context of a worker thread
<clever>
yeah
<heat>
because it would totally work if you patched your dynamic linker to call a rpc thunk, except for exported data
<clever>
so the order between hooks is maintained, but other threads may be coming to life and interrupting you or running before your hook
<FatalNIX>
that's a good question. I'm kind of on the functional side of programming sometimes, and I honestly don't like the idea of exposing internal data other than functions unless it were necessary.
<FatalNIX>
I'd have to think about that.
<FatalNIX>
There's always the issue of "say I have a big struct or something". Do I always copy it by value to some location another process can access? if it is referenced and updated internally, that'd be kind of inefficient, I'd think.
<heat>
shared memory
<FatalNIX>
Sure
<heat>
no copies there
<FatalNIX>
That part I am okay with
<FatalNIX>
But I mean in terms of internal data in the shared object process
<FatalNIX>
Perhaps it is of no concern
<heat>
well this is all inefficient anyway
<heat>
and an awkward fit tbh
<heat>
a shared object with its own address space is literally just a process :P
<FatalNIX>
pretty much!
<FatalNIX>
I love Erlang and Elixir so what do you expect