<kof123>
eh, what type of lines are you spitting out for printf() logging? i mean some "compressed" form will be more complicated and need pre & post-processing, but cut down how much data needs sent.
<bl4ckb0ne>
sweaty
<heat>
hi mcrod
[itchyjunk] has quit [Remote host closed the connection]
netbsduser` has joined #osdev
<mcrod>
hi heat
<mcrod>
tell me
<mcrod>
how do I tell someone that disabling interrupts, and then waiting for interrupts is going to work
<mcrod>
*isn't
<mcrod>
kof123: I cannot even do a simple printf("%02X\n");
<heat>
"if you disable them, how are they going to come?"
<mcrod>
not *once*
<heat>
and if they don't get it, quit
<kof123>
i recommend a meme teaching device. doctor "it hurts when i do this" "don't do that" . spaceballs clip, dark helmet crashes into wall
<mcrod>
what happened to that kid who didn't know how to count
<heat>
what kid?
<mcrod>
there was some dude in here ages ago that you told me about
<mcrod>
you and zid were teaching him how to count
<heat>
trolled us mercilessly
<mcrod>
and I say "kid" because I'm pretty sure I remember he was like 14
<heat>
out of our good will
<mcrod>
that whole thing popped up in my mind today.
<kof123>
i have a nephew who thought it was a great idea to run around with eyes closed. and then he crashed into kitchen cabinet, that is kind of what i am going for, maybe find a picture of this
<kof123>
well, just get it to output a byte...then i was just saying you could send "binary" data of whatever kind, make up a smaller format if too slow, etc. but it still may be too slow
bnchs is now known as Cindy
netbsduser` has quit [Ping timeout: 245 seconds]
heat has quit [Quit: Client closed]
heat has joined #osdev
SGautam has joined #osdev
FreeFull has quit []
netbsduser` has joined #osdev
vdamewood has joined #osdev
netbsduser` has quit [Ping timeout: 245 seconds]
austincheney has quit [Read error: Connection reset by peer]
heat has quit [Remote host closed the connection]
heat has joined #osdev
netbsduser` has joined #osdev
CaCode has joined #osdev
netbsduser` has quit [Ping timeout: 246 seconds]
m3a has quit [Ping timeout: 246 seconds]
netbsduser` has joined #osdev
bgs has joined #osdev
goliath has quit [Quit: SIGSEGV]
netbsduser` has quit [Ping timeout: 246 seconds]
valshaped7424 has quit [Ping timeout: 260 seconds]
valshaped7424 has joined #osdev
torresjrjr has quit [Ping timeout: 246 seconds]
torresjrjr_ has joined #osdev
GeDaMo has joined #osdev
dutch has quit [Ping timeout: 256 seconds]
dutch has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
CaCode has quit [Ping timeout: 246 seconds]
CaCode has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
goliath has joined #osdev
heat has quit [Ping timeout: 246 seconds]
morgan has quit [Ping timeout: 245 seconds]
duderonomy has quit [Ping timeout: 246 seconds]
morgan has joined #osdev
Burgundy has joined #osdev
zxrom has quit [Quit: Leaving]
danilogondolfo has joined #osdev
zxrom has joined #osdev
divine has quit [Ping timeout: 250 seconds]
Left_Turn has joined #osdev
stolen has joined #osdev
CaCode has quit [Quit: Leaving]
gog has joined #osdev
gildasio has joined #osdev
Burgundy has quit [Ping timeout: 246 seconds]
divine has joined #osdev
nyah has joined #osdev
<zid>
I think I'm going to change my nick, xXxDeathStrike420xXx seems best
<gog>
how are oyu gonna have xXx and 420 in your nick
<gog>
straightedge stoner? how?
<zid>
that isn't what xxx means in nicks
<zid>
different dialect
phoooo has joined #osdev
<zid>
(similarly it doesn't mean explicit content)
lg has quit [Ping timeout: 246 seconds]
<Ermine>
XXX means 'shitty code ahead'
<gog>
i should wrap all my code in that
<zid>
yea that seems perfect for me
netbsduser` has joined #osdev
<phoooo>
question time, in my case it is riscv, but this applies to everything really, is it more common to do basic device machine initialization in assembly or in c?
<phoooo>
with basic machine initialization i mean setting up basic registers and such
<gog>
well, to write or read directly to/from specific registers you need to use assembly at some level
<gog>
you can do it inline in the C code or you can write thunks to call in an assembly code file
<gog>
i do a mix of both depending on the nature of what i'm doing
<phoooo>
yeah, i would wrap every register write/read inside an inline function to make things clearer
xenos1984 has quit [Ping timeout: 245 seconds]
<zid>
why would you care?
<zid>
C doesn't care what value anything has before you write to it, it's UB to read uninitialized vars etc
netbsduser` has quit [Ping timeout: 245 seconds]
phoooo has quit [Ping timeout: 246 seconds]
phoooo has joined #osdev
<phoooo>
zid: i was referring to the fact of putting the inline assembly inside an inline function to avoid repeating everything everywhere, abstracting it
<phoooo>
nothing else
sparklysara has joined #osdev
<mcrod>
gog: may i pet you
<gog>
yes
* mcrod
pet gog
MiningMarsh has joined #osdev
<zid>
I was talking about
<zid>
<phoooo> question time, in my case it is riscv, but this applies to everything really, is it more common to do basic device machine initialization in assembly or in c?
* gog
prr
<zid>
There's certain initialization you *must* do in asm, for some architectures, I can't speak to riscv, but for anything that doesn't need it, don't do it.
<gog>
yeh assembly code is a hazard
[itchyjunk] has joined #osdev
<zid>
It's just something that needs porting
andreas808 has joined #osdev
<zid>
keeping that surface low is good in general
<zid>
regardless of any other constraints like maintainability etc
andreas303 has quit [Ping timeout: 260 seconds]
dutch has quit [Quit: WeeChat 4.0.2]
dutch has joined #osdev
<clever>
geist: i know cortex-a53 isnt meant to be as deterministic as cortex-m, but is there any documentation on clock cycle counts? i have a for loop with 5 opcodes and its taking 12 clocks per loop, if i add 1 nop its still 12, but with a second nop added, 16 clocks, and that pattern roughly holds
sparklysara has quit [Quit: Leaving]
<clever>
when crossing some critical boundary (maybe a conditional branch between cache lines), a nop pair cost 5 clocks rather then 4
zxrom has quit [Quit: Leaving]
<clever>
ah, found most of the answer in the datasheet
<clever>
> In-order pipeline with symmetric dual-issue of most instructions.
<clever>
if you assume the pipeline takes 2 clocks to execute every opcode pair, then 12 clocks can run 6 opcodes
<clever>
the original for loop with 5 opcodes left a slot in dual-issue empty/wasted
<clever>
because of conditional branching not being compatible with dual-issue
<clever>
adding 1 opcode filled that wasted slot, and had no extra clocks where taken
netbsduser` has joined #osdev
Matt|home has joined #osdev
phoooo has quit [Quit: Client closed]
lg has joined #osdev
gareppa has joined #osdev
zxrom has joined #osdev
phoooo has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 246 seconds]
<phoooo>
i've run into a weird problem in my riscv kernel.... every time the timer interrupt hits the machine trap handler, i set the relevant bit in the mip register and do mret to go to the supervisor trap handler. the problem is that when the supervisor trap handler returns with sret, it goes into an infinite loop
<phoooo>
the thing is that the supervisor handler runs perfectly until it returns, which causes it to loop as i described
<phoooo>
(note that in that infinite loop, the supervisor handler gets called again and again)
<gog>
do you have to tell some external device that the interrupt is serviced?
<gog>
pretty sure the same thing happens on x86 if you don't send and EOI to the relevant controller
<phoooo>
that is what i initially thought, but it does not seem to be the case
Left_Turn has joined #osdev
Vercas0 has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
Vercas has quit [Ping timeout: 240 seconds]
Vercas0 is now known as Vercas
xenos1984 has joined #osdev
<phoooo>
wait, it *might* be the case
<phoooo>
let me dig a little bit
<phoooo>
yup, looks like i need acknowledge the interrupt
* gog
fingerguns
Harriet has quit [Quit: Leaving]
Harriet has joined #osdev
Harriet has quit [Client Quit]
<phoooo>
it does not work tho :^)
Harriet has joined #osdev
zxrom has quit [Quit: Leaving]
<gog>
dang
<phoooo>
wait, got it working
<phoooo>
weird way of doing so but whatever
<gog>
osdev is an inherently weird activity
<gog>
believe it or not i'm the most normal person here
<Cindy>
gog: being normal is dumb
<mcrod>
I have to tell you all
<mcrod>
there is nothing more painful on this planet than dealing with STM8
Amanieu has left #osdev [#osdev]
<mcrod>
thank god ST saw the light and dropped their stupid architecture entirely
<gog>
u wot m8
<mcrod>
picture this
<mcrod>
you're an embedded person
<mcrod>
breakpoints are already often painful enough as it is
<mcrod>
now imagine having to press "break" to set a breakpoint
<mcrod>
first off that's annoying, second that fucks with absolutely everything else
<mcrod>
now i'm pulling out an oscilloscope
<mcrod>
STM8 is honestly a great architecture to fuck with, it's small and fairly simple
<mcrod>
but not for anything like this
<gog>
sux
<mcrod>
eh I don't want to bitch too much
<mcrod>
done enough of that already about this god forsaken architecture
<gog>
i have scary doctor appointment scheduled can i have a hug pls
<mcrod>
ok
* mcrod
hug gog
* gog
hug
<mcrod>
what do they plan to do
<mcrod>
if you don't mind my asking
<mcrod>
if it helps I don't like doctors either
<gog>
heart checkup
<mcrod>
see, what I admire about other countries
<mcrod>
other countries don't treat medical care like a business
<mcrod>
it's probably been forever since you've seen a drug commercial
<gog>
well, i stopped watching regular tv providers with ads around 2016 or so
<gog>
so i haven't seen a drug ad in like 6-7 years
<phoooo>
news: i rtfm myself and learned what i was doing wrong :^)
<phoooo>
problem solved
<mcrod>
reading the manual is always a good brain massage
phoooo has quit [Ping timeout: 246 seconds]
goliath has quit [Quit: SIGSEGV]
phoooo has joined #osdev
zxrom has joined #osdev
m3a has joined #osdev
Burgundy has joined #osdev
eddof13 has joined #osdev
heat has joined #osdev
phoooo has quit [Ping timeout: 246 seconds]
goliath has joined #osdev
joe9 has quit [Quit: leaving]
Cindy is now known as bnchs
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
Jari-- has joined #osdev
qubasa has joined #osdev
phoooo has joined #osdev
phoooo has quit [Client Quit]
phoooo has joined #osdev
phoooo has quit [Client Quit]
phoooo has joined #osdev
phoooo has quit [Remote host closed the connection]
<Ermine>
because other distros use kconfig to write config files
<Ermine>
(I guess)
<heat>
no
<heat>
the whole build uses kconfig
<heat>
but the alpine people are probably stripping them of comments
<heat>
for... reasons
hmmmm has quit [Quit: Leaving]
<Ermine>
Configs lie in aports
<heat>
mjg, seriously tree rcu might be overkill
<heat>
yes, im doing this with 4 threads, but absolutely HAMMERING RCU with a bunch of call_rcus has 0 contention on the spinlock
<heat>
quiescent states happen at ever so slightly different times
<Ermine>
There are actually "# ... is not set" lines
<mjg>
heat: it is not an overkill for what it was done for
<mjg>
heat: a 4096 cpu box
<heat>
they mention hundreds or thousands of CPUs
<heat>
and lol lmao stop
<heat>
too many cpus
<mjg>
what is an overkill is shipping laptops with that config
<gog>
i want 4096 cpus
<mjg>
unless mckenney made it optimize itself away, whch i doubt
<heat>
oh it optimizes itself
<heat>
it folds the tree
<mjg>
does it?
<Ermine>
Is it harmful to ship laptops with this config?
<mjg>
look mate, i'm sure it maeks the tree certain size based on topology
<heat>
a system with 64 CPUs will have a single tree node
<Ermine>
.. no
<mjg>
but best case would WHACK IT MOFO
<heat>
it'll be nearly the same as classic rcu
<mjg>
for a lolcored laptop
<heat>
... which they killed in like 08 or 09
<heat>
TINY rcu is still there though, for !SMP
<Ermine>
TINY is useful on embedded stuff, no?
<heat>
it's smaller, sure
<heat>
and i understand the point of killing classic rcu, all the fancy features would require double the effort
<mjg>
for half the pay lmao
<heat>
but seriously RCU is a genius idea
<mcrod>
hi
<Ermine>
hey mcrod
<heat>
props to paulmck
<mcrod>
Ermine: hi
<mcrod>
does someone wanna make me food
<heat>
no
<mcrod>
:(
<heat>
mjg, RCU does *not* play well with SLAB pcpu caching though :(
hmmmm has joined #osdev
<mjg>
dude you think everything is genius
<Ermine>
want: try cooking something finnish and japanese cuisine
<heat>
shut up mjg
* mjg
remembers you praising SMR
<heat>
SMR is cool
<mjg>
it is mostly lame
<heat>
SMR lets you have much faster path lookups
<mjg>
there are multiple ways to get the same result
<mjg>
did you know openbsd has their own variant
<heat>
i dont see you complain about SMR when you dick measure will-it-scale with linux
<mjg>
i'm not benching performance of rcu, smr or delayed reclamation do jour
<mjg>
if you meant comparinv VERSUS linukkkz, i will have you know it entering the protected section requires a full memory barrier
<mjg>
so it is slower for most uses
<mjg>
among other slodowns
<mjg>
so if oone is to mess with it on freebsd, you are automatically behind in the fast path
hmmmm has quit [Client Quit]
<gog>
hmmmm
<Ermine>
gog: did I pet you today?
<gog>
idk
<Ermine>
Anyway, may I?
<gog>
yes
<mjg>
no
* Ermine
pets gog
* gog
prr
<mjg>
i wanted to be first :[
<Ermine>
mjg: u r late
<mjg>
tomorrow, same time
<gog>
i accept pets at all times
bgs has quit [Remote host closed the connection]
<Ermine>
I still want to get into i915 development
* moon-child
pets gog
* bl4ckb0ne
gives Ermine some sanity
Burgundy has left #osdev [#osdev]
<Ermine>
bl4ckb0ne: -inf + something = -inf
dutch has joined #osdev
<bl4ckb0ne>
what if not
gareppa has quit [Quit: WeeChat 3.8]
<Ermine>
floating arithmetics work like this
<moon-child>
that's how limits work
<Ermine>
limits do not introduce the notion of infinity though
<moon-child>
kindaa
<moon-child>
lim_x->0- 1/x = -inf
<moon-child>
lim_x->0- 5 + 1/x = -inf
<moon-child>
is the logic behind 5 + -inf = -inf
<Ermine>
this is a formal writing for something written in the definition of limit
<moon-child>
(where -inf is shorthand for 'decreases without bound')
<heat>
mjg, i know EBR is slower in read sections
<heat>
that's not the point
<Ermine>
Like for any K > 0 there exist a real number delta < 0 such that for any x in interval (delta, 0) 1/x < -K
<moon-child>
yeah
<heat>
thats the result of freebsd being a BSD-Licensed freedom fest orgy
<Ermine>
So 'infinity' is kind of jargon here
<heat>
EBR may not be optimal (at least in read sections, i don't know how write or reclamation works there), but it's a heck better than not having shit at all
<moon-child>
i wanna hazard pointers
<heat>
i wanna hazar potr
<Ermine>
You can add an infinity to your number point, sure. That's how it turns into projective line (iirc)
<Ermine>
s/point/line
CaCode has joined #osdev
<Ermine>
bl4ckb0ne: so you don't like gpudev?
<heat>
i915 develolpment
duderonomy has joined #osdev
<bl4ckb0ne>
i like gpu
<heat>
i dont wanna discourage you but GPUs are ridonculously complicated
<heat>
i915 included
<heat>
the docs *are not enough*
<heat>
the kernel driver has multiple 10KLOC+ files
Hammdist has joined #osdev
<heat>
and *that's not even the hard part*
guideX has joined #osdev
<Hammdist>
hi all. I'm relatively fresh to my OS development journey so I'm trying to get the serial port working. but it's not working. if I write a char and read the status I get 5. if I pause and read the status I also get 5. hence my code cannot distinguish when the fifo is full and when I try to write alternating As and Bs they do not always alternate.
<Hammdist>
I do not understand why I always get '5' when I try to read its status
<heat>
more details
<heat>
what arch, what hardware (soc?)
<Hammdist>
aarch64, rk3328 (renegade)
<heat>
is your caching right?
<heat>
that seems like a typical "moooooooooooooom i mapped device memory as normal memory"
<Hammdist>
well I didn't do anything to the memory map myself. I am in the post-kexec environment, whatever that is. I believe all caches are off
<heat>
so you're kexecing your hobby kernel?
<gog>
meow
<Hammdist>
yes
<heat>
i don't know what the state for that is
<heat>
i assume the MMU is off
gorgonical has joined #osdev
<gorgonical>
Stupid hotel wifi blocks irc and also all vpn connections.
<Hammdist>
I think it's off or maybe read somewhere it's 1:1
<heat>
1:1 is a problem
<heat>
check that first
<gorgonical>
Anyway, for those who know about virtio drivers, what would happen if I set the queue size to 1? The wording of the spec makes me think that this is likely to cause problems
<sham1>
I didn't even know that you could kexec non-Linux kernels
<heat>
yeah you can
<heat>
you can even exec multiboot1
<heat>
gorgonical, idk, maybe it'll work? why wouldn't it work?
<Hammdist>
my hobby kernel is compiled just like linux, it just has an extra unconditional branch into my code
<gorgonical>
heat: the spec suggests that the device starts looking at new descriptors when you move idx forward so that the new descriptors are behind where idx points
<Hammdist>
(for now)
<heat>
oh, so its linux?
<gorgonical>
But if you have only one slot, there's not a well-defined notion of behind or in front of idx is there
<heat>
i'd suggest you avoid doing that then :)
<Hammdist>
well I'm not calling into any other linux code. so it's basically not linux but I still have to sort out how to build a proper Image without relying on the linux build scripts
<heat>
thats ez
<gorgonical>
In theory this might not be a problem because the spec says you might need to notify the device, but sometimes you don't
<immibis>
heat: for a certain type of person ridiculously complicated is where the fun is. (make sure you're that type of person before starting)
<immibis>
there's also nothing wrong with hacking on something like that just a little bit and feeling satisfied when you, say, get a simple framebuffer
<heat>
hacking on what?
* heat
doesn't know what you're replying to
<Ermine>
heat: I know it's super hard and I don't expect to do anything meaningful any time soon. I'm just seeking a way into it
<Hammdist>
how would I check if the mmu is currently enabled? (arm64, rk3328) would this be SoC specific or is it an arm standard? if the latter, where would I find the datasheet for it?
<immibis>
heat: "gpus are ridiculously complicated"
<heat>
oh yeah sure
<heat>
but ermine isn't writing his own driver I believe
<heat>
just hacking on the i915.ko
<Ermine>
Hammdist: you need ARM Architecture Reference Manual
<heat>
yeah ARM ARM ftw
<heat>
Hammdist, but if you read the link I gave you, you'd know the answer
<Hammdist>
well I know it -says- it should be disabled but what if it isn't for some reason I guess. I don't have much else to go on if its disabled then the uart should work
<heat>
that'd be a bad bug
<heat>
geist: I believe caches are off when the MMU is off, right?
<heat>
Hammdist, can you show me your code?
<Hammdist>
heat: https://paste.ee/p/ldpaH as you can see it's using naps for the most part to get sensible uart output. the printed status value is 5 both times, both immediately after writing and after pausing
<heat>
when jann horn sends patches you best believe there's a CVE behind that shit
<Ermine>
Time to upgrade my server
<mjg>
CVE-1999-0179 Windows NT crashes or locks up when a Samba client executes a "cd .." command on a file share.
<heat>
CVE-1999
<heat>
bruh
<mjg>
CVE-1999-0549 Windows NT automatically logs in an administrator upon rebooting.
<mjg>
CVE-1999-0560 A system-critical Windows NT file or directory has inappropriate permissions.
<mjg>
CVE-1999-0562 The registry in Windows NT can be accessed remotely by users who are not administrators.
<Ermine>
1999
<mjg>
ye the old shit is particularly funny
<mjg>
the criterion was "funny", not "current"
<bnchs>
mjg: what about
<heat>
CVE-2003-1604
<bnchs>
currently funny vulnerabilites
<Ermine>
What are Linux CVEs of that time?
<heat>
The redirect_target function in net/ipv4/netfilter/ipt_REDIRECT.c in the Linux kernel before 2.6.0 allows remote attackers to cause a denial of service (NULL pointer dereference and OOPS) by sending packets to an interface that has a 0.0.0.0 IP address
<heat>
wow found an ia64 CVE
<Ermine>
related to CVE-2015
<mjg>
CVE-1999-1011 The Remote Data Service (RDS) DataFactory component of Microsoft Data Access Components (MDAC) in IIS 3.x and 4.x exposes unsafe methods, which allows remote attackers to execute arbitrary commands.
<heat>
A flaw was found in the exFAT driver of the Linux kernel. The vulnerability exists in the implementation of the file name reconstruction function, which is responsible for reading file name entries from a directory index and merging file name parts belonging to one file into a single long file name. Since the file name characters are copied into a stack variable, a local privileged attacker could use this flaw to overflow the kernel stack.
<heat>
in 2023
<mjg>
bnchs: these are *currently* funny
<heat>
long filename exploit
<bnchs>
mjg: i mean
<heat>
this is hilarious
<bnchs>
funny but current vulnerabilites
<mjg>
heat: if you think a buffer overflow is funny....
<mjg>
genz i guess
<heat>
it's fuckign hilarious
<mjg>
bnchs: see pwnie awards
<heat>
Windows NT 4.0 SP2 allows remote attackers to cause a denial of service (crash), possibly via malformed inputs or packets, such as those generated by a Linux smbmount command that was compiled on the Linux 2.0.29 kernel but executed on Linux 2.0.25.
<heat>
crossover!
<Ermine>
da best crossover
<bnchs>
BREAkING NEWS
<bnchs>
linux ddoses windows
<mjg>
Microsoft Internet Information Services (IIS) 7.5 uses weak permissions for the Operational log, which allows local users to discover credentials by reading this file, aka "Password Disclosure Vulnerability."
<bnchs>
:OOOO
<heat>
Certain operations in Linux kernel before 2.2.19 on the x86 architecture copy the wrong number of bytes, which might allow attackers to modify memory, aka "User access asm bug on x86."
<heat>
The iBCS routines in arch/i386/kernel/traps.c for Linux kernels 2.4.18 and earlier on x86 systems allow local users to kill arbitrary processes via a a binary compatibility interface (lcall).
<heat>
this shit is great
<mjg>
now *that* is funny
<zid>
And these are just the bugs that happen when you're NOT an adversary running on the same hyperthread!
<heat>
FreeBSD kernel 4.6 and earlier closes the file descriptors 0, 1, and 2 after they have already been assigned to /dev/null when the descriptors reference procfs or linprocfs, which could allow local users to reuse the file descriptors in a setuid or setgid program to modify critical data and gain privileges.
<zid>
same cpu core's*
<SGautam>
bruh
<SGautam>
I just got to know
<SGautam>
You can't exit(3) from a signal handler
<zid>
Try and stop me
<SGautam>
Wait is the signal handler running on another thread?
<SGautam>
What is this magic
<bnchs>
SGautam: i have an idea
<mjg>
that's nothing mate
<heat>
SGautam, no
<heat>
signals are asynchronous
<bnchs>
overwrite the process' memory in the signal handler
<mjg>
there was a program once which would crash on exit, maybe
<heat>
exit() holds locks
<bnchs>
so that it crashes
<heat>
you want _exit() there
<bnchs>
rather than exit
<mjg>
it was multithreaded, calling exit from tons of threads at the same time
<heat>
or abort()
<zid>
abortforrealsies()
<mjg>
and crashing when processing the atexit list
<mjg>
at least 10 years ago glibc *really* did not like that
<mjg>
besdies, who tf calls exit() from all threads
<heat>
abort() from tons of threads is still broken in glibc
<Ermine>
gigamind: modprobe a module which panic()s
<mjg>
heat: now that makes sense to do and i totally believe it is broken
<zid>
galaxy brain: execve into a process that just does return 0;
<mjg>
glibc has a rather... funny quality at times
<mjg>
universe fucking brain: RUN ONYX
<bnchs>
zid: galaxy brain
<heat>
run onyx
<bnchs>
overwrite the kernel variables after getting the signal
<bnchs>
so that the kernel crashes
<bnchs>
instead of you
<heat>
stop enjoying life and install a worse UNIX than what you currently have
<bnchs>
TRY TO STOP ME MMU!
<mjg>
yo
<mjg>
you reminded me of something bnchs
<Ermine>
run code to hack your power plant and disable it to get your process terminated
<mjg>
there is this concept of "securelevels" in the bsd land, and it says you can't move it down
<mjg>
only up
<mjg>
so one guy reported a bug, this can be bypassed mon!
<mjg>
here is how: load a kernel module which changes the value
<mjg>
gg man
<bnchs>
>windows
<bnchs>
now i'm not surprised from your bug
<heat>
what bug?
<heat>
there's no bug here
<heat>
exit was never callable from signal handlers
<heat>
POSIX explicitly tells you to fuck off too
<SGautam>
Windows POSIX emulation is fairly accurate nowadays.
<heat>
same for malloc, for the *exact* same reason
<heat>
exit needs locks, malloc needs locks
<mjg>
right, they got all the bugs did not the they ;s
<bnchs>
windows never emulated POSIX
<heat>
WRONG
<bnchs>
i mean it did, but it was shit
<mjg>
windows was posix certified
<heat>
anyway im going to reboot to the best UNIX out there
<mjg>
they did absolutely bare minimium to get the cert
<bnchs>
yes
heat has quit [Remote host closed the connection]
<mjg>
which turns out to not be enough to run real world programs
<bnchs>
that's why i said their POSIX emulation was shit
<SGautam>
I mean the C/C++ library of MSVC does seem to work with all standard POSIX stuff so far
<mjg>
great work certificatin program
<SGautam>
but yea
<SGautam>
theres stuff like ioctl that wont
<bnchs>
OS-9 had a syscall for system-state processes
<bnchs>
that allows you to read or write to kernel variables
<bnchs>
for some reason
<mjg>
:A
<bnchs>
the CD-i runs games in system-state
<zid>
problem with windows' posix is that the C runtime is not posix, and the bits of posix they did add like select, have MAX_FDS of 32 and stuff :D
<mjg>
lol i did not know about the fd stuff
<SGautam>
honestly I wish I learned C++ from POSIX cuz since school they taught us Win32 related stuff coz it was so easy to get MessageBoxes and other UI type stuff on the screen and ofc all the PCs were running Windows.
<zid>
so you still have to seek between fwrite and fread and other C things that posix changed, which caused me a bug while porting before etc
<zid>
I learned winapi first, didn't do me any harm
<zid>
It was a good exercise in seeing what sort of API types existed too tbh
heat has joined #osdev
<SGautam>
I spent 4-5 minutes wondering why MessageBox() was not available when I was compiling on WSL-Ubuntu yesterday
<zid>
out params via pointers, return codes, handles, etc
<heat>
hello from the windows 11 operating system
<zid>
posix's APIs are really boring, compared :p
<bnchs>
i hate how most CD-i players don't have a MMU, so you get programs that read data from where they shouldn't be reading
<bnchs>
fucking hell, how expensive was a MMU
<SGautam>
WinAPI has its own variation of everything is a file, they just turn everything into a handle
<mjg>
getFuckedByHandle
<SGautam>
One of the coolest things I think is even turning memory into a handle
<SGautam>
Using GlobalAlloc
<zid>
To be fair, void * are just handles that you give to free
<zid>
re malloc
<bnchs>
SGautam: no stop, what are you doing, what. are. you. doing
<heat>
fds are handles
<heat>
the problem is EVERYTHING IS A **FILE**
<heat>
on the fucking automagic filesystem
<zid>
Yea posix is boring cus all the handles are the same handle
<zid>
int fd
<bnchs>
but anyway, why would you turn memory into a handle
<zid>
even mmap deals with fds
<SGautam>
bnchs: Sometimes it can be useful, e.g. embedding file data into the executable itself.
<SGautam>
Like having an internal font file
<bnchs>
can you already do that with a static variable?
<zid>
main thing I like about winapi is that.. it's homogenous. I don't have to switch style 18 times to do message boxes + sounds + files
<zid>
or do very awkward conversions, or specially build packages so that they interopt, etc
<zid>
DirectSound takes a 'hwnd' so that mute on focus loss works, etc
<SGautam>
Yah, on Linux every component usually has a different maintainer.
<SGautam>
ALSA for Audio, OpenGL for graphics, X for Window management
<zid>
year of the linux desktop will be when they all die in a freak nuclear attack
<zid>
and we start over with systemd/linux
<bnchs>
more like
<bnchs>
openbsd
<bnchs>
amirtie
<Ermine>
Year of the linux desktop will never happen
<zid>
hey, freak nuclear attacks CAN happen
<Ermine>
It will be year of CollapseOS something
<Ermine>
Anyway, it's more about social and economical reasons
<bnchs>
i will run collapseOS on an afghanistan clone of sega mega drive found in the rubbles of a house exploded by a airstrike
<Ermine>
I used to worry about Linux desktop, but I don't anymore
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
<Hammdist>
when I compile I get command lines that state "-march=armv8.5-a". is this suitable for rk3328 (which afaict is arm-v7a)?
<Hammdist>
context is I'm trying to use the mrc instruction in inline asm and I get "unknown mnemonic" so I was wondering if perhaps the arch version is off
<zid>
binutils is what does the assemblering
<Hammdist>
ah wait
<Hammdist>
I think I copied the instruction from 32-bit arm. no wonder it won't work
<Hammdist>
hm but it is still defined on page 1706 of ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition
<Hammdist>
ah it's mrc for 32-bit but msr for 64-bit
<geist>
it is not suitable
<geist>
-march=armv8 is more appropriate (or -mcpu=cortex-a53)
<geist>
because the rk3328 is cortex-a53 which is armv8.0
<Hammdist>
ah. part of my problem is I mistyped 3288 when looking it up and that is also a rockchip model number
<SGautam>
aaaa my little HTTP Server is being detected as a Severe Trojan Virus
<Ermine>
Don't write trojans :)
<zid>
SEVERE TROJAN VIRUS is an amazing mix of words
<mjg>
hopeless situation warrior
<Hammdist>
so I am trying to determine whether mmu is enabled or not, but my program hangs when invoking this function: https://godbolt.org/z/qceTrMWGb
<bslsk05>
godbolt.org: Compiler Explorer
<Hammdist>
I am trying to print the results of invoking that function to the serial port, but something hangs and nothing appears
<Hammdist>
are there perhaps processor states in which mrs is not valid?