innegatives has quit [Quit: Connection closed for inactivity]
Matt|home has quit [Quit: Matt|home]
edr has quit [Quit: Leaving]
Left_Turn has joined #osdev
jcea has quit [Ping timeout: 268 seconds]
Left_Turn has quit [Read error: Connection reset by peer]
Matt|home has joined #osdev
chiselfuse has quit [Ping timeout: 244 seconds]
Jari-- has joined #osdev
chiselfuse has joined #osdev
gog has quit [Quit: byee]
sprock has joined #osdev
<aaabbb>
looks like that openbsd TIOCUNCTL bug is actually a pledge bug
<aaabbb>
so not something that's been stuck in their vt subsystem for ages, but a problem with the (relatively new) security system
eluks has quit [Remote host closed the connection]
eluks has joined #osdev
GeDaMo has joined #osdev
Lucretia has joined #osdev
<chiselfuse>
i have another question which i can't find the answer to
<chiselfuse>
i disabled ASLR system-wide and surely enough every time i exec() some /usr/lib/lib*.so file repeatedly, its segments get loaded in the same 0x7fffxxxxxxxx address. (yes, i know they're not supposed to be executed and they segfault but i let gdb pause them at their entry address)
<chiselfuse>
however, some /usr/lib/libfoo.so's base address will always get set to a different address than that of some /usr/lib/libbar.so's.
<chiselfuse>
when i check their headers, the Offset and VirtAddr of the first LOAD segment are always 0. i can't find any other relevant difference in the output of `readelf -aW` that can tell me why the loader decides to pick a different base address for every /usr/lib/lib*.so
<chiselfuse>
to try for yourself you can do `gdb /usr/lib/libfoo.so`, then `starti`, then `i proc m` on different files under `/usr/lib/`.
<chiselfuse>
after disabling ASLR system-wide with `sudo sysctl -w kernel.randomize_va_space=0`
jedesa has quit [Remote host closed the connection]
Jari-- has quit [Ping timeout: 276 seconds]
netbsduser` has joined #osdev
\Test_User has quit [Ping timeout: 276 seconds]
\Test_User has joined #osdev
goliath has joined #osdev
netbsduser` has quit [Ping timeout: 244 seconds]
<zid>
what's a tiocunctl when it's at home?
<Ermine>
NTOSKERNAL.EXE
xvmt has quit [Remote host closed the connection]
<chiselfuse>
hey all-knowing zid please help me with my question :p
<zid>
it's linux shit
<zid>
ask linux people
<chiselfuse>
but do you not *happen* to know..
<zid>
I don't even fully understand the question
<zid>
your complaint is that the load addresses of different .so files is consistent, but different?
xvmt has joined #osdev
<chiselfuse>
zid: when ASLR is disabled, doing exec on the same .so file repeatedly has it loaded on the same address. however, the load address is different for every .so file
<chiselfuse>
if that makes sense
<zid>
so.. that's a yes?
<chiselfuse>
yea
<zid>
My guess would be size
<zid>
it's aiming to leave a certain sized gap somewhere
<_Heat>
"I don't use uefi anyway" -- person using EFI
<zid>
actually atm I think I do
<zid>
cus w10
<zid>
but I've never booted linux with uefi at least
<_Heat>
and the firmware is all EFI internally, too
<nikolar>
i think i had a bios w10 install
<nikolar>
like 10 years ago
<nikolar>
lol
<zid>
It's not possible on the current isos
<zid>
H22 or whatever changed a load of stuff
<zid>
H21?idk what they call it
<nikolar>
interesting
<zid>
it's also the one that broke amd virt
<zid>
:D
<nikolar>
i bet an update from an earlier build would've worked
<_Heat>
21H2
<zid>
That's it
<zid>
heat knows his w10 versioning scheme
<zid>
for some reason
<_Heat>
i don't but i recognized that update out of your attempts to spell it out
<nikolar>
for some reason
<_Heat>
i think it's <last 2 digits of the year>H<half of the year>
<_Heat>
or something
<zid>
for some reason
<_Heat>
so 21H2 was 2021 second half of the year (november)
<nikolar>
zid: how does it feel to have to do software emulation for everything
<zid>
like what
<nikolar>
idk
<nikolar>
stuff
<zid>
nikolar you don't have talk some shit sometimes
<zid>
half*
<nikolar>
huh
<zid>
exactly huh
<_Heat>
i found something interesting about qemu user networking
<zid>
it's weird and crappy?
<nikolar>
hey it works ok
<_Heat>
connecting to the gateway is the same as connecting to the host
<nikolar>
oh
<nikolar>
you can ssh from the vm to the host or something?
<_Heat>
yeah
<nikolar>
cute
<nikolar>
that's actually handy for copying files and such
<zid>
what.. do you normally do with a gateway?
<zid>
like, my machine is 172.22.160.1 wrt to my VMs
<zid>
ofc if they ssh to the gateway, they get the host?
<nikolar>
i've never tried it, no clue
<zid>
it's just the lan ip
<zid>
of the router
<nikolar>
lol i have a hidpi screen on my laptop now
<zid>
192.168.100.1 is my router, 192.168.100.128 is a desktop machine, they can just.. talk to each other.. that's the point of the subnet?
<nikolar>
and the vm's screen is tiny
<nikolar>
i enabled scaling in my vm and it broke :(
<clever>
zid: until the wifi router comes along and says no war driving, lol
<clever>
my laptop and desktop couldnt talk together on my old isp router
<zid>
then it was firewalling itself
<zid>
the network topology allows it
<clever>
all wireless clients are isolated and can only get internet
<zid>
because.. if it didn't.. it couldn't route
<clever>
there is no off button, the docs claim it doesnt even support it
<_Heat>
that's nuts
<clever>
i suspect my ISP modified the firmware and added things
<_Heat>
so each client gets its own little subnet
<clever>
the logo is also all over the UI
<nikolar>
_Heat: that's how wifi works at our work
<nikolar>
*at work
<clever>
_Heat: the IP's say they are in the same subnet, but the router just doesnt route packets between them
<_Heat>
oh that's even weirder
<nikolar>
i can't ping any other device
<_Heat>
and possibly non-compliant
<nikolar>
but it's fine over lan lol
<nikolar>
well, ethernet
freakazoid332 has joined #osdev
<_Heat>
modern games are so big i might actually need to get a proper networking setup
<nortti>
oh?
<_Heat>
70 or 90GB take a while if I can get peak 80mbps
<_Heat>
and I can't just take the desktop and connect it straight to the router
<nikolar>
Why not
<_Heat>
i mean it's a little big lol
<nikolar>
What
<_Heat>
what what
<nikolar>
There's this thing called an Ethernet cable
<_Heat>
i know, and my house is huge
<_Heat>
i can't get an eth cable here without poking it through the walls
<nikolar>
Get it through a window or something lol
<_Heat>
basically the router is on one end of the house
<_Heat>
and i'm on the other end
<_Heat>
so you made my problem worse lol
<nikolar>
Kek
goliath has joined #osdev
<nikolar>
If your router is that far, you're lucky you got 80mpbs
<_Heat>
i mean, the powerline works decently
<_Heat>
i'm not on wifi, i can't get signal on wifi
<nikolar>
Oh that's a thing people do
<nikolar>
Re powerline
<_Heat>
yeah
libercv has joined #osdev
<_Heat>
it's neat but i'm paying for 500mbps
<_Heat>
and getting 80 out of that is... ungreat
<nikolar>
Indeed
<GeDaMo>
I just have a really long cat6 cable :|
<nikolar>
That works
<nikolar>
Wifi absolutely sucks btw
<GeDaMo>
I don't care about the cable dangling down the stairs :P
<nikolar>
I hate it
<nikolar>
GeDaMo: lol that's fair enough
<nikolar>
As long as it's one cable
<GeDaMo>
The router's downstairs, my computer is upstairs
<GeDaMo>
I haven't even bothered tacking it to the wall :|
<nikolar>
Kek
<nikolar>
Some day, you'll step on it wrong and it will break, and pull wonder why
<nikolar>
*you'll
<GeDaMo>
Nah, it's straight down the stairs then around the wall
<GeDaMo>
Having said that, there's a big pile of cable at the top, I should probably tie that up or something :P
<Ermine>
_Heat: which distro you run now btw?
<_Heat>
arch btw
<_Heat>
i considered tumbleweed but i stayed with the safe option
dude12312414 has quit [Remote host closed the connection]
dude12312414 has joined #osdev
<_Heat>
TIL MoCA
<_Heat>
this might actually work
xenos1984 has quit [Ping timeout: 268 seconds]
xenos1984 has joined #osdev
m3a has quit [Ping timeout: 245 seconds]
libercv has quit [Quit: Konversation terminated!]
<zid>
henlo
<zid>
I am back
<zid>
Two things changed
<zid>
My keyboard no longer goes 'boop beep' 'beep boop' when I move my legs
<zid>
and the cable is 3cm shorter
<izabera>
congrats on your surgery
<zid>
It was touch and go, I was re-doing a splice and now the spliced end is honestly, too short
<zid>
so it was incredibly fiddly and only barely worked :p
<zid>
almost lost the patient, aka, almost had to take 10cm off and unscrew the keyboard
m3a has joined #osdev
xenos1984 has quit [Ping timeout: 252 seconds]
innegatives has quit [Quit: Connection closed for inactivity]
xenos1984 has joined #osdev
kata has joined #osdev
ionutc has joined #osdev
<ionutc>
hello, does anyone have a risc-v kernel (preferably written in C) that uses SBI calls, that I could study? I am trying to use OpenSBI as a library to do BIOS-ey stuff but I can't figure it out.
<bslsk05>
github.com: lk/arch/riscv/sbi.c at master · littlekernel/lk · GitHub
<_Heat>
no one's using lk on riscv yet?
<geist>
not publically at least
<geist>
i think there's some project at work that's using it
<_Heat>
trusty maybe?
<_Heat>
for a random coprocessor
<_Heat>
anyway i think you can get pretty compact with current riscv on linux
<_Heat>
like, few megs and you get access to the whole linux ecosystem
<geist>
word
<geist>
i dont think i'm leaking anything in particular but the silicon validation teams that work on home built stuff at google love LK because it boots instantly (relatively speaking) to linux
<_Heat>
oh cool
<_Heat>
the apple people love linux
<geist>
so when you have something in simulation or on a FPGA it might take like 2 hours to boot linux to just get to the command line to run some test thing
<geist>
whereas on LK it's maybe 5 minutes
<_Heat>
i suppose because it boots instantly relative to macOS
<bslsk05>
popovicu.com: 789 KB Linux Without MMU on RISC-V
<geist>
so i've been working with the sival team a lot for various features and whatnot, and they've benen rolling things back on occasion
<_Heat>
nortti: yep that matches with what i've heard
kata has quit [Read error: Connection reset by peer]
kata has joined #osdev
<_Heat>
i can build a full gcc toolchain in 4 minutes now
<_Heat>
24 threads op
<_Heat>
the whole of the onyx base system in 12 seconds
<nortti>
when building the onyx base system, are you able to hit the full parallelism?
<_Heat>
maybe?
<geist>
awww yeah tiny oses rule!
* geist
goes for a high five
<_Heat>
the build is a little two staged, the kernel and musl don't depend on anything (musl depends on headers actually)
<_Heat>
But user progs depend on musl
<zid>
musl being *built* thought?
<geist>
i need to get back to hacking on lkuser and just take the plunge and switch to musl
<geist>
having a shit libc and no desire to write another one is holding me back
<geist>
now i can probably just vibe code it
<_Heat>
Vibe port musl
<geist>
right, like... maybe it might work
<geist>
tell it to just port the whole directory structure
<zid>
Use the machine we invented that drinks its own piss vibe code, or vibe code as in, just wing it
<geist>
or i can point it at onyx and say 'go do this plox'
<geist>
and it'll be 'no can do kemosabe, that's gpl'
<_Heat>
hahahahaha
<_Heat>
hahahahahaha
<_Heat>
hahahahahahaha
<_Heat>
hahahahahahaha
<geist>
and i'll be like 'damn heat, you got me now!'
<_Heat>
cmon geist, an LLM that respects intellectual property?
<geist>
haha, you think this is reality mang? it's been fiction this whole time!
<_Heat>
poorly written fiction i'll tell you that much
<geist>
fanfic
<geist>
OR IS IT
<zid>
geist heat slashfic
<geist>
a forbidden love
<zid>
makes a change from the usual heat/footballers
<zid>
that he self publishes
<chiselfuse>
i can't for the life of me figure out why 4a2000-4a7000 is loaded as `R` separately instead of just 4a2000-4a9000 as `RW` as i illustrate: https://pasteboard.co/WHAUu7cyw4kL.png
<chiselfuse>
zid: i don't understand. does this section affect where/how it's mapped or does it instruct the ld.so to remap something later on that makes it look like that?
<zid>
yes
<chiselfuse>
that's not a y/n question
<chiselfuse>
which one?
<zid>
the answer is yes to both
<zid>
it affected how it's mapped
<zid>
by instructing ld.so
<zid>
to remap
<_Heat>
geist: hey at least i realized a fun problem here before it happened
<_Heat>
namely, that i need to keep track of pending tlbsync's in case i schedule out
<zid>
don't ask me how relro is implemented, because I don't know, that's between glibc and ld.so and linux
rom4ik has joined #osdev
<geist>
oh tabt's why you have a zen 4 now so you can dothe new stuff huh
<_Heat>
yeah!
<chiselfuse>
zid: but how? it doesn't have an INTERP
<_Heat>
chiselfuse: glibc does it
<geist>
my biggest machine is a zen 3. damn AMD for making perfectly good cpus that i dont need to upgrade
<_Heat>
static PIE essentially needs a small ldso copy to do certain stuff
\Test_User has quit [Ping timeout: 252 seconds]
<zid>
Actually kind of proud that I immediately thought of relro
<chiselfuse>
zid is an oracle to me
<_Heat>
actually i think this needs further work
<_Heat>
namely regarding ASID support
<_Heat>
you can only invlpgb a single ASID (or broadcast but lol)
<bslsk05>
github.com: lk/arch/x86/64/mmu.c at master · littlekernel/lk · GitHub
<geist>
but... i dunno what happens with 5 level. probably same
<_Heat>
apparently i've been setting the G bit on all user page tables
<_Heat>
.. and nothing blew up
<zid>
coinflip over whether 'same' means 'pml4 behaviour now applies to pml5, and pml4 now acts like pml3' or 'pml5 acts like pml4 did'
<zid>
though
<_Heat>
ah yes, because G is ignored there
<geist>
well, i asked an ai and it said yeah pml5 it's the same as pml4 and cited the docs
<_Heat>
geist and the G stands for googlepilled
<zid>
Globally incorrect
<geist>
lets see is there anything else about AMD that will trip you up... iirc the only thing that comes to mind for the basic stuff is the use lf long jumps in some way that AMD doesn't implement
<geist>
though i guess you got past that. its why i pretty much always use retf for long jumps that set CS
<geist>
something something 64bit long jump doesn't work or something like that
<geist>
but you usually only use that in bootstrapping, so if you got that far
<_Heat>
ok i've just hit a geist problem!
<_Heat>
the fixed_point little header library i took from you can only divide a u32 by a u32
<geist>
no did you only grab part of it?
<_Heat>
none of the other funcs help
<geist>
you can multiply by 0.x
<_Heat>
i'm calculating nanoseconds per tick and ticks per nanosecond
<bslsk05>
github.com: lk/platform/pc/timer.c at master · littlekernel/lk · GitHub
<_Heat>
msvc (the superior compiler) would warn on that
<geist>
a little surprised gcc doesn't
<_Heat>
C++ can if you enable -Wnarrowing
<geist>
so the obvious question is if you make a 64bit version of that div function does it just continue to work. since i didn't write it i dont fully grok whats going on there
<geist>
may be time to try to figure out precisely how all this code works
<geist>
and yeah my main machine dopesn't return a TSC tick faster than 4.2 so i've never seen it
<geist>
THE TERRIBLE CURSE OF NEW HARDWARE
kata has quit [Read error: Connection reset by peer]
goliath has quit [Quit: SIGSEGV]
kata has joined #osdev
<_Heat>
i could finally switch over to linux's cycles mult + shift thing
<_Heat>
which i do not understand
<_Heat>
but i don't understand the fixed point stuff either
<bslsk05>
github.com: Fix possible 32-bit integer overflow in TSC to time base calculations (timer.c and related areas) · Issue #448 · littlekernel/lk · GitHub
<geist>
honestly i dont know how i got it but i have the AI pro version on github, though AFAICT i'm not paying for it
<geist>
i wonder if someone at github basically gifted it to me
<geist>
i think at least? i dunno
<geist>
ah i see, github pro "(free for some users)"
<geist>
i guess there's some sort of bit you can have set on your account if you're a 'big' developer or something
<geist>
"If you are a maintainer of a popular open-source repository, you may be eligible for free access to Copilot Pro. GitHub reviews eligibility for this based on project popularity and maintainer activity."