memset has quit [Remote host closed the connection]
memset has joined #osdev
kfv has joined #osdev
kfv has quit [Remote host closed the connection]
kfv has joined #osdev
kfv has quit [Client Quit]
Stellacy has joined #osdev
Stellacy has quit [Quit: Leaving]
Stellacy has joined #osdev
kfv has joined #osdev
agent3142 has joined #osdev
agent3142 has quit [Max SendQ exceeded]
<azonenberg>
Am I correct in saying that "bfcsel" is not a valid ARMv7-M instruction?
<azonenberg>
Using arm-none-eabi-g++ (15:12.2.rel1-1) 12.2.1 20221205
<azonenberg>
if i try to generate calls from Cortex-M ITCM to flash with -O0 or -Og, it creates a "veneer" thunk that does ldr.w pc, [pc] followed by a 32-bit immedite address
<azonenberg>
But if I do -O1 or higher, instead
<azonenberg>
i get bfcsel 0, 0x1688, 2, ne
<azonenberg>
which isnt making much sense, i'm investigating if my linnker script is corrupting things somehow
goliath has joined #osdev
stolen has quit [Quit: Connection closed for inactivity]
GeDaMo has joined #osdev
pieguy128_ has joined #osdev
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pieguy128 has quit [Ping timeout: 252 seconds]
gamma63 has joined #osdev
netbsduser has joined #osdev
seds has joined #osdev
kfv has quit [Ping timeout: 252 seconds]
kfv has joined #osdev
netbsduser has quit [Ping timeout: 252 seconds]
kfv has quit [Remote host closed the connection]
kfv has joined #osdev
netbsduser has joined #osdev
Stellacy has quit [Quit: Leaving]
Stellacy has joined #osdev
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zetef has joined #osdev
zetef has quit [Client Quit]
kfv has joined #osdev
kfv has quit [Remote host closed the connection]
kfv has joined #osdev
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kfv has joined #osdev
kfv has quit [Remote host closed the connection]
kfv has joined #osdev
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
X-Scale has joined #osdev
seds has quit [Remote host closed the connection]
kfv has joined #osdev
lucyy has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale has joined #osdev
X-Scale62 has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
Left_Turn has joined #osdev
kfv has quit [Ping timeout: 252 seconds]
kfv has joined #osdev
gamma63 has quit [Ping timeout: 256 seconds]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
X-Scale62 has quit [Ping timeout: 256 seconds]
kfv has joined #osdev
kfv has quit [Client Quit]
kfv has joined #osdev
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
getz- is now known as getz
X-Scale has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
kfv has joined #osdev
kfv has quit [Remote host closed the connection]
kfv has joined #osdev
kfv has quit [Remote host closed the connection]
kfv has joined #osdev
kfv has quit [Client Quit]
frkzoid has quit [Ping timeout: 272 seconds]
toyBeaver has joined #osdev
ramenu has quit [Remote host closed the connection]
heat has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
X-Scale has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
hwpplayer1 has joined #osdev
edr has joined #osdev
Stellacy has quit [Ping timeout: 260 seconds]
spareproject has joined #osdev
gioyik has joined #osdev
hwpplayer1 has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
eddof13 has joined #osdev
<guideX>
a few weeks ago, I was advised to run my programs in user mode and not kernel mode, but how do I know what mode I'm currently in
<zid>
You start learning about osdev
<zid>
instead of C#
goliath has quit [Quit: SIGSEGV]
gamma63 has joined #osdev
<nikolar>
lel
<kof673>
> Presently, they met Firmware, who was dressed in tattered rags and hobbled along propped on a thorny stick. # firmware can be spotted by the thorny stick
<Mutabah>
guideX: If you're writing a kernel, then by default you're in kernel mode - until you explicitly drop those permissions and enter user mode
<zid>
He hasn't written a kernel
<zid>
He found a thing that lets him boot C# code
<zid>
and he's been adding xneko and stuff to it
<Mutabah>
aaah
xenos1984 has quit [Read error: Connection reset by peer]
gamma63 has quit [Ping timeout: 256 seconds]
gioyik has quit [Ping timeout: 260 seconds]
<netbsduser>
aarch64 port of my kernel seems to be progressing nicely (at least in qemu)
xenos1984 has joined #osdev
<nikolar>
neat
<netbsduser>
it did run a little on a raspi 4 as well
<netbsduser>
i can't do any proper testing on the pi as i don't have a driver for whatever nic it has
<netbsduser>
i've only ever booted with a 9p root
<nikolar>
ah nice heh
<heat>
i'm improving my mount support while unfucking a bit of my namei
<heat>
most of this is tedious refactor from tech debt
gioyik has joined #osdev
frkazoid333 has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
hwpplayer1 has joined #osdev
seds has joined #osdev
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
<netbsduser>
heat: mount is nice but unmount, that's where the money is
<heat>
i'm doing all of this for umount
<heat>
and future weird shit like remounting and mount flags and all that jazz
gioyik has joined #osdev
<immibis>
guideX it's ultimately up to you to write whatever they want. there have been systems that only use software to keep programs apart from each other. user mode is a hardware feature for keeping programs apart from each other. you don't *have* to use it... if your design is completely different from most people's. If all your programs are C#, that qualifies as completely different from most people's.
<immibis>
user mode isn't something you run into by accident - it's a complicated feature (just like every other feature)
<immibis>
Java tried this idea where different programs with different permissions would run together... after 15 years, it gave up because there were just too many permission leaks to plug.
heat has quit [Read error: Connection reset by peer]
gioyik has quit [Ping timeout: 260 seconds]
heat has joined #osdev
<zid>
Remember, nobody has ever hacked a games console by using javascript on its web browser
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
gioyik has joined #osdev
<guideX>
immibis, ah ok
<clever>
zid: wasnt there a multi-year old webkit bug in the ps3 browser? (but the browser itself was in a freebsd jail, so you couldnt escape that)
<immibis>
guideX: i'm sure youve already read it, but the idea is that you set some bit (don't remember which bits where exactly) that tells the CPU it's now in user mode, and then all the important instructions, like changing page tables, or interrupt tables, or changing the mode again, will just be 'ignored' by the CPU and instead of doing what they're supposed to do, they activate an exception (which puts the CPU back in kernel mode with an instruction pointer
<immibis>
of your choice).
<immibis>
it's a hardware sandbox
<guideX>
ah ok
gioyik has quit [Ping timeout: 260 seconds]
<clever>
guideX: having a properly configured MMU is also critical to doing that security right, for example, configuring it so the kernel isnt writeable by userland
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
flom84 has joined #osdev
<nikolar>
heat now that you've mentioned it, I wonder what remounting actually does in the background
<clever>
fs/ext2/super.c:static int ext2_remount (struct super_block * sb, int * flags, char * data);
<clever>
nikolar: i see a remount function in most fs drivers
<clever>
nikolar: interesting, i think the freeze/thaw functions i see, are used for either suspend2ram, or better disk imaging?
<nikolar>
if i'd have to guess based on the name, suspend2ram
<clever>
ah, comments mention LVM
<clever>
in the ext4 case, its to convince the fs to flush all buffers and make the journal consistent
<clever>
before LVM creates a RO snapshot of the disk
<nikolar>
ah
<nikolar>
snapshotting
<nikolar>
interesting
<clever>
so the snapshot is in a sane state, rather then an improer shutdown state
<nikolar>
yeah got it
<clever>
related, i discovered years ago, that XFS cant replay a journal from the wrong endianness
<clever>
so if your only BE machine crashes and burns, your remaining LE machines cant perform recovery!
<nikolar>
heh
<nikolar>
do they not remember what endinanness the journal is
<clever>
static int ioctl_fsfreeze(struct file *filp)
<clever>
nikolar: its more, that the journal replay code lacks byteswaps
<clever>
there is an endianness flag, but the replay only supports native order
<nikolar>
that's the more stupid problem
<clever>
so if there is a mismatch, it just refuses to mount
gioyik has quit [Ping timeout: 260 seconds]
<clever>
ZFS went the fun route, most data structures are created in native order, including the magic number identifying what it is
<nikolar>
i know
<clever>
if the magic number comes out backwards, then it will byte-swap things on read
<nikolar>
yeah, it actually works *cough* xfs
<clever>
i also recently had the "fun" of getting doom working on the ppc64 (xbox 360, BE)
<heat>
xfs doesn't work?
<clever>
in more then a dozen places, they byte swap things they shouldnt (filesize from a syscall, a literal 0), and then dont byte swap things they should!
<nikolar>
heat: xfs can't replay the journal from the non-native endianess
<heat>
ohno!
<heat>
why are you running big endian
<nikolar>
clever: people think about endianess too much
<nikolar>
heat: do i look like someone who runs xfs in the first place
<clever>
heat: i was using a sparc machine as a nas
<heat>
it would be too prudent of a choice, you're right
<clever>
it had a nice backplane with a lot of sata ports
<clever>
then one day it died, and refused to boot
<bslsk05>
lwn.net: Freezing filesystems and containers [LWN.net]
<clever>
nikolar: aha, perfect, backup stuff, like what i needed on my router a decade ago
<nikolar>
heh yea
<clever>
just open a mount point like /, and ioctl FIFREEZE, and the kernel will stop all writes, and make the disk clean
<clever>
i assume writes will then block until you thaw?
<nikolar>
that would be my guess
<nikolar>
failing writes would probably be worse
<clever>
ah, it also has some auto-thaw timers, so if the backup process hangs, it recovers
<clever>
and typical watchdog stuff, where you can keep reseting the timer
<nikolar>
interesting
<clever>
fsfreeze --freeze|--unfreeze mountpoint
gioyik has joined #osdev
<clever>
nikolar: oh, and there is already a CLI tool to access it all!
<nikolar>
heh not surprised
<heat>
a few hours ago i found out linux lets you mount over / but has really weird semantics
<clever>
and yep, it clearly says that things block until you thaw
<nikolar>
nice
<nikolar>
heat: what
<nikolar>
how
<heat>
normally
<heat>
sudo mount -t tmpfs none /
<heat>
try it
<heat>
path walking does not seem to dereference it properly
<nikolar>
do i want to lol
<heat>
if things go to shit just sync and reboot
<heat>
at least in my case my path walking was fucky and started hanging weirdly
<nikolar>
what did you do
<nikolar>
so far seems normal
<heat>
try spawning another shell
<nikolar>
huh well mpv crashed
gioyik has quit [Ping timeout: 260 seconds]
<nikolar>
seems fine
<heat>
well idk it hanged here
<nikolar>
what are the intended semantics though
<heat>
there aren't any
<heat>
this case is not covered in the manpage :P
<nikolar>
btw after unmounting, mpv works now
<heat>
i couldn't unmount
<nikolar>
heat: kek why do they allow it though
<clever>
oh, i just remembered something nasty that i did by accident one say
<heat>
see if its still mounted, cat /proc/mounts
<clever>
umount / -o lazy, i think it was?
<nikolar>
it is not ž
<nikolar>
worked perfetcly fine
<heat>
ẑ indeed
<nikolar>
*it is not mounted
<nikolar>
ж
gildasio has quit [Ping timeout: 260 seconds]
flom84 has quit [Quit: Leaving]
gioyik has joined #osdev
gildasio has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
seds has quit [Remote host closed the connection]
Maja has quit [Remote host closed the connection]
seds has joined #osdev
Maja has joined #osdev
gioyik has joined #osdev
frkazoid333 has quit [Ping timeout: 276 seconds]
gioyik has quit [Ping timeout: 260 seconds]
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
hwpplayer1 has joined #osdev
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
<Ermine>
but if you mount over / , don't you lose access to actual rootfs?
<nikolar>
i unmounted / and everything was back to normal
<nikolar>
so no clue
<Ermine>
so those mounts stack somehow?
<nikolar>
¯\_(ツ)_/¯
<heat>
mounts stack
<nikolar>
does that work in general
<heat>
it's perfectly defined to do mount /dir then mount /dir then mount /dir
<nikolar>
never tried
<heat>
then umount /dir + umount /dir + umount /dir
<Ermine>
but why
<heat>
this is so defined it's not even funny
<heat>
idk, might be useful
<nikolar>
does it work as overlay or something
<nikolar>
or does the one of the mounts "win
<kof673>
^^^ wasn't this unionfs or similar? i don't recall where, one idea is you might have source on a cd-rom (read-only) then rw obj directory on top... or could just not hardcode paths lol
<nikolar>
"win"
<kof673>
*don't recall where i saw it described
<heat>
nikolar, last one wins
<Ermine>
Ah, actually you do that when you mount / in initramfs
<heat>
no overlay
<nikolar>
huh
<heat>
no, initramfs does not mount on /
<heat>
there's a funny pivot_root syscall
<nikolar>
yeah i know that
<heat>
kof673, yeah that's overlayfs or unionfs or aufs or whatever
<heat>
different thing where it actually overlays
<kof673>
*or ditto for read-only nfs i guess. hmm......
<nikolar>
why are there so many overlays fss
<Ermine>
you know it's a funky syscall when there's no glibc wrapper for it
<nikolar>
there aren't glibc wrappers for a few syscalls
gioyik has joined #osdev
<nikolar>
that sound normal enough
<Ermine>
btw, is it possible to mount dev1 / ; mount dev2 / ; umount dev1 ?
spareproject has quit [Remote host closed the connection]
<nikolar>
heh give it a tr
<nikolar>
try
<Ermine>
I have no spare linux system atm
<nikolar>
what do you run btw
gioyik has quit [Ping timeout: 260 seconds]
<heat>
Ermine, i don't think so
<heat>
nikolar, the concept of an overlay fs is very tricky and terrible, and you can never do one without exposing really funky semantics
<nikolar>
heh
<heat>
i don't think the current $overlayfs is POSIX compliant even
<nikolar>
kek
hwpplayer1 has quit [Read error: Connection reset by peer]
<heat>
an example of trickyness: you have a dir that is being read from the slave fs. you create a file. now you rm -rf the dir.
<heat>
boom, 2 terrible edge cases
<Ermine>
create a file where
<heat>
in the dir
<nikolar>
and which one is the slave
<nikolar>
the upper layer?
<heat>
no, the lower layer
<nikolar>
ah right
<nikolar>
so the ro one
<heat>
yes
<heat>
more terrible: modify a file
<heat>
Ermine, note: i am in no way shape or form a specialist on linux mounting, they have a bunch of really fancy options like mount propagation and shit
<heat>
it's possible that umount dev1 is possible somehow
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
hwpplayer1 has joined #osdev
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
gioyik has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
seds has quit [Remote host closed the connection]
gioyik has joined #osdev
X-Scale has joined #osdev
gioyik has quit [Ping timeout: 260 seconds]
gioyik has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
eddof13 has quit [Quit: eddof13]
\Test_User has quit [Ping timeout: 260 seconds]
eddof13 has joined #osdev
eddof13 has quit [Quit: eddof13]
npc has joined #osdev
hwpplayer1 has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
MiningMarsh has quit [Ping timeout: 252 seconds]
Renfield has joined #osdev
MiningMarsh has joined #osdev
Reinhilde is now known as Ellenor
netbsduser has quit [Ping timeout: 252 seconds]
netbsduser has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]