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
Burgundy has left #osdev [#osdev]
Turn_Left has quit [Ping timeout: 245 seconds]
<karenw> WTF does it means when clang outputs this nonesense: `movslq (%rcx,%rax,4),%rax` Like, I get it's some fancy address calculation, but how do I interpret it?
<nikolar> rax = *(rcx + rax*4)
<nikolar> that's translated to c, roughly
<bslsk05> ​www.felixcloutier.com: MOVSX/MOVSXD — Move With Sign-Extension
<nikolar> you should learn about at&t syntax
klys has joined #osdev
<karenw> The next instruction is `add %rcx,%rax`, so it's `rax = rcx + *(rcx + rax*4)`. Makes sense (it's a jump table switch)
hwpplayer1 has joined #osdev
<Mondenkind> you interpret it by passing -Mintel to objdump ;)
<nikolar> wrong :P
pabs3 has quit [Ping timeout: 260 seconds]
<the_oz> if I were a parser I would totally love at&t ayntax
<the_oz> and I also appreciate it
<Mondenkind> it doesn't make a lick of difference to the parser
<the_oz> it uses symbols front loading the strings
<the_oz> whereas intel has ambiguities
<the_oz> that's a lick of a difference to me
<the_oz> order doesn't matter, but also isn't what I mean
<Mondenkind> i wrote an intel syntax assembler. i spent the _vast majority_ most of my time on instruction encodings, instructions, and binary file formats
<Mondenkind> s/most //
<bslsk05> ​<Mondenkind*> i wrote an intel syntax assembler. i spent the _vast majority_ of my time on instruction encodings, instructions, and binary file formats
<nikolar> he was talking about the parser
<Mondenkind> my point is that the parser is going to be completely trivial no matter what
<the_oz> ok
<geist> hmm, wonder when qemu will get x86 apx and/or x86s
<chiselfuse> does `e_ident[EI_CLASS]` have to do with whether the binary uses 32-bit or 64-bit assembly or does it just denote whether Elf32_Half or Elf64_Half et al are used in the elf data structures?
<geist> actaully kinda hard to search for 'x86s' because the search engines just interpret that as a plural x86
hwpplayer1 has quit [Remote host closed the connection]
<chiselfuse> "The file format is designed to be portable among machines of various sizes, without imposing the sizes of the largest machine on the smallest. The class of the file defines the basic types used by the data structures of the object file container itself. The data contained in object file sections may follow a different programming model. If so, the processor supplement describes the model used.
<chiselfuse> and yet the only way i found to emit one with 32-bit elf datastructures was with `gcc -m32` and that also emits 32-bit assembly (ebp instead of rbp etc)
<nikolar> geist: maybe after the first chips that support those are confirmed
<geist> axp at least is already getting compiler support i think
<geist> er apx
vai has quit [Ping timeout: 248 seconds]
<nikolar> oh really
<nikolar> cool
<nikolar> is it in gcc
ghoulg has quit [Quit: byee]
pabs3 has joined #osdev
Left_Turn has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
jedesa has joined #osdev
leon has quit [Ping timeout: 272 seconds]
leon has joined #osdev
Fingel has joined #osdev
Arthuria has joined #osdev
<the_oz> I forgor what ip this server is using
<the_oz> and keyboard doesn't work for some reason
<the_oz> >to the nmap I go
<the_oz> hope I kept it default port...
<the_oz> also I need to reinstall a newer freebsd on it because the networking is fucked up and starts complaining about fib
<the_oz> just wtf ever sigh
<clever> the_oz: i was just helping somebody else, where the server rebooted, and they cant access it over the lan anymore
<clever> but there is a VPS forwarding 22 to it over a vpn, lol
<the_oz> oh dear
<clever> so the best way in, is to bounce off the VPS!
<clever> but also, he forgot the password...
<the_oz> lol
<the_oz> I just try the usual suspects until I get in or get locked out for too long
<the_oz> one of em RIGHT? RIGHT?
<clever> problem is, he also just changed his pw at work
<clever> and its all a jumbled mess in his head
<the_oz> d'oh
<the_oz> I used to have a das keyboard
<the_oz> with no letters engraved or printed
<the_oz> typeitty typeitty cherry mx blues
<clever> ive got an ancient sun keyboard, buckling rubber domes
<the_oz> then WHAMMO had a stroke and my brain forgot how to type from muscle memory
<clever> ouch
<the_oz> rendered it useless, I wish I had not been a showoff
<clever> that reminds me of a prank/IT problem somebody had
<clever> whenever they sat down at the computer, the keyboard worked fine
<the_oz> lol
<clever> but when standing up, the keyboard was a jumbled mess and the keys didnt do the right thing
<the_oz> yep
<clever> can you guess why?
<the_oz> because his wrists were different position?
<clever> when sitting, he could touch-type just fine
<clever> when standing, he would hunt&peck
<the_oz> ....
<clever> somebody re-arranged all of the keys on the keyboard
<the_oz> o___o
<clever> and when sitting, he didnt notice, because touch type
<the_oz> that's strange
<clever> when standing, he would actually look for the key he wanted
<clever> and they where all labeled wrong :P
<the_oz> it must have used different pathways
<the_oz> ah loool
<the_oz> of course lol
<clever> some people just have zero problem solving capabilities
<clever> i should get back to bed, goodnight
<the_oz> fare well
steelswords94 has quit [Quit: Ping timeout (120 seconds)]
steelswords94 has joined #osdev
jedesa has quit [Remote host closed the connection]
<klys> > Will AMD have Intel Advanced Performance Extensions? > It's highly unlikely given that Zen5's microarchitecture was already finalised before APX and AVX10 were announced.
Arthuria has quit [Ping timeout: 260 seconds]
<klys> cementing into reality that if you buy intel going forward you want something else entirely from amd64.
<klys> otoh, > Advanced Vector Extensions are SIMD extensions to the x86 instruction set architecture for microprocessors from Intel and Advanced Micro Devices (AMD).
<klys> where simd means single instruction multiple destination
_ngn has joined #osdev
kfv has joined #osdev
kfv has quit [Ping timeout: 252 seconds]
orccoin has joined #osdev
youcai has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
youcai has joined #osdev
karenw has quit [Ping timeout: 244 seconds]
goliath has joined #osdev
kfv has joined #osdev
kfv has quit [Ping timeout: 265 seconds]
bzimage has joined #osdev
Fingel has quit [Ping timeout: 252 seconds]
<bzimage> goodays
<bzimage> what do you do here
heat has joined #osdev
<klys> reactos review for today: 1) use -device ide-hd,drive=disk0,lcyls=1044,lheads=255,lsecs=63 for an 8G qcow2, 2) copy the browser installer in manually via qemu-nbd --connect=/dev/nbd1 /a/reactos-27oct2024.qcow2; or you get no browser.
<heat> bzimage, operating systems development
<zid`> it's almost like that's the first three words of the /topic :P
<bzimage> sounds quite cool
<heat> being a bzimage is also quite cool
<heat> decompression go brrrr
<bzimage> :)
<zid`> heat did you know that if I decompressed you
<zid`> and spread your intestines out along the ground
<zid`> you'd die
<heat> yeah
<heat> i'd be pretty fuckin long though
<bzimage> hehe
<bzimage> https://wiki.osdev.org/Books is an amazing library
<bslsk05> ​wiki.osdev.org: Books - OSDev Wiki
netbsduser` has joined #osdev
<bzimage> but the Supplementary material and/or errata link for the The Unix Programming Environment seems broken or not allowed from my region it takes me to https://nettica.com/
<bslsk05> ​nettica.com: Nettica VPN Service » Make Your Own Cloud
obrien has joined #osdev
youcai has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
kfv has joined #osdev
<chiselfuse> are there little and big endian variants of aarch64?
<zid`> I think some arm chips have a toggle for be vs le?
<chiselfuse> i'm trying to answer whether e_ident[EI_DATA] specifies the endianness only of the ELF data structures or necessarily also of the ISA of the code within it
<chiselfuse> i am testing with this `aarch64-linux-gnu-gcc -mlittle-endian -c -o littleend main.c`
<heat> chiselfuse, yes there are
<heat> a LE elf will be LE all around, a BE elf will be BE all around
<zid`> yea just easier that way
<chiselfuse> the ELF fields are indeed little and you can make them big with `-mbig-endian` but i don't know how to tell whether the code it generates also is be vs le or only one
<zid`> time to make a polyglot iso9660 fs for it
<zid`> where the LE directory entries give you the LE elf, and the BE directory entries give you the BE elf :P
<zid`> (I've never checked any iso9660 parser source to see if anybody ever ever reads the BE entries though, I think they just read the LE ones)
<chiselfuse> heat: how do you know that it's not just ELF datastructures getting flipped
<zid`> just assume it isn't?
<heat> why would they be flipped?
<zid`> someone made one?
<zid`> It'd be *possible* to load it
<zid`> but I just don't think supporting doing so would be worth the huge effort
<chiselfuse> here https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html it says "Primarily for the convenience of code that looks at the ELF file at runtime, the ELF data structures are intended to have the same byte order as that of the running program."
<bslsk05> ​refspecs.linuxfoundation.org: ELF Header
<heat> yes.
<chiselfuse> but looks more like a recommendation
<heat> so what's the question?
<heat> no dude, it's not
<heat> if you do shit backwards it'll break
<heat> no program loader deals with endianness
<zid`> Nobody's loader supports it, you'd be the first
<zid`> so while *technically possible to produce a twisted elf*, I don't think it's worth trying to support them
<chiselfuse> heat: well deosn't that then mean that the ISA is specified by both e_machine and e_ident[EI_DATA] because the ISA is specified by both name and which endianness variant it is?
<heat> no
<heat> because, again, various architectures are biendian
<heat> like aarch64
<chiselfuse> per-process too?
<heat> hm?
<chiselfuse> or does it have to run all in a certain endianness?
X-Scale has joined #osdev
<zid`> if Elf is be, make a be process and load it be. If elf is LE, make an LE process and load it LE.
<heat> i don't remember but it really doesn't matter
<heat> practically everything is LE
<heat> unless you have a really weird network appliance or something
<heat> chiselfuse, also really important that e_machine is iirc a u16
<heat> so you need to look at e_ident's endianness before continuing
<chiselfuse> heat: but i'm pretty sure there are mips variants that are either be or le not bi and then this field would specify which variant of processor it is then
<heat> or 0x8664 will look backwards
<heat> if you accidentally had a 0x6486, oopsie
<chiselfuse> heat: i don't follow what you mean about the u16 size
<heat> u16 e_machine;
<heat> you need to know the endianness before you can parse it properly
<heat> (i was also slightly wrong, ELF seems to mostly assign e_machine values in sequence, PE is the one with the 0x8664 easter egg)
<chiselfuse> heat: e_ident - which specifies endianness - has no endianness, right?
<heat> yes an array of bytes
<heat> s/yes/yes it's/
<bslsk05> ​<heat*> yes it's an array of bytes
<chiselfuse> can you tell me about this easter egg?
<heat> PE's x86_64 machine value is 0x8664
<chiselfuse> oh
<chiselfuse> lol
<heat> arm64's is 0xaa64
<chiselfuse> v cute
<heat> EFI byte code (EBC) is 0xebc, etc
<heat> microsoft ppl had some fun
<heat> riscv{32,64,128} is 0x5000 + {0x32, 0x64, 0x128}
<chiselfuse> why 0x5000
<chiselfuse> how is it related to riscv i mean
<heat> five
<chiselfuse> oh the 'v'
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
X-Scale has quit [Ping timeout: 256 seconds]
<chiselfuse> heat: how about e_ident[EI_CLASS]? i couldn't find info on whether it only affects sizes of addresses/offsets (Elf{32,64}_{Addr,Off}) fields in the ELF file or if it also is related to the word size of the ISA. i found that `-m32` vs `-m64` toggles it but they also emit code like `push rbp` vs `push ebp`. is it necessary that this affects the word size of the ISA or is it possible to have a 64elf that
<chiselfuse> has `push ebp` in it and vice versa?
<heat> 64-bit architectures have 64-bit elfs. 32-bit architectures have 32-bit elfs.
<heat> BE architectures have BE elfs, LE architectures have LE elfs.
<chiselfuse> heat: so the ISA used in the elf is specified by both e_machine and e_ident[EI_CLASS]?
<heat> -m32 not only toggles EI_CLASS but also the actual architecture (should show up as EM_386)
<heat> no?
<heat> again, you need to parse e_ident[EI_CLASS] to validly parse the rest of the header
<chiselfuse> heat: if it shows the size in e_machine then what's the point of having the e_ident[EI_CLASS] field also specify it
<chiselfuse> hmm
<heat> if you don't know how big each field is, you can't parse it. only e_ident is parseable at that point, because it's a statically sized array of bytes
<heat> e_ident very much gives you the information you need to read the rest of the ELF headers.
<chiselfuse> heat: but then why can't you have a 32bit e_ident[EI_CLASS] while encoding a 64-bit ISA (64-bit e_machine)? the former is only for the data structure size of the ELF, the latter is for what the ISA actually is
<heat> which is why it's an array of bytes (no endian issues), statically sized (no bitness issues)
<heat> because that's just not how ELF works
EmanueleDavalli has joined #osdev
<heat> you cannot do it, no linker has ever output that, no program loader has ever loaded that
<heat> program loads don't deal with endianness issues, they don't deal with bitness issues
<heat> s/loads/loaders/
<bslsk05> ​<heat*> program loaders don't deal with endianness issues, they don't deal with bitness issues
<chiselfuse> then it's redundant, isn't it? if it's specified in e_ident[EI_CLASS] then why do we need to have different identifiers for i386 and x86_64 in e_machine
<sortie> I actually put my 64-bit kernel inside a 32-bit ELF for multiboot (turns out I didn't need to do that)
<heat> how can you read e_machine without knowing the rest of the format?
<heat> you're actually lucky that e_machine is stable between ELF32 and ELF64, but it's not necessarily so, and the rest of the header isn't
<chiselfuse> heat: i'm saying that we can specify whether it's 32 or 64 bit in e_ident[EI_CLASS] and then only have a one identifier for both i386 and x86_64 in e_machine since we can infer the size from e_ident[EI_CLASS] already (along with the size of the fields yes). or am i wrong?
<heat> technically yes, but that's just silly
<chiselfuse> silly me :P
<heat> e_machine specifies the ISA, x86_64 and i386 are different ISAs
<heat> e_ident[EI_CLASS] tells you whether it's an ELF32 or ELF64 (i.e how to parse the actual thing beyond e_ident)
<heat> or ELF128 eventually
<chiselfuse> and they both have to match regardless, that's what kinda confused me
<heat> yes
<heat> if you read ELF structures assuming the wrong ELF class, you'll probably read garbage
kfv has joined #osdev
kfv has quit [Remote host closed the connection]
kfv has joined #osdev
Nixkernal has joined #osdev
GeDaMo has joined #osdev
orccoin has quit [Ping timeout: 255 seconds]
leon has quit [Ping timeout: 252 seconds]
Matt|home has quit [Read error: Connection reset by peer]
leon has joined #osdev
leon has quit [Ping timeout: 255 seconds]
<nikolar> geist: you mentioned that apx is getting compiler support
leon has joined #osdev
<bslsk05> ​refspecs.linuxfoundation.org: ELF Header
<chiselfuse> "The file format is designed to be portable among machines of various sizes, without imposing the sizes of the largest machine on the smallest. The class of the file defines the basic types used by the data structures of the object file container itself. The data contained in object file sections may follow a different programming model. If so, the processor supplement describes the model used."
<chiselfuse> I believe you when you say it's never the case, but it does sound like it was designed with that potential
craigo has quit [Quit: Leaving]
bzimage has quit [Quit: Lost terminal]
YaseenTa has joined #osdev
<YaseenTa> Hi
<GeDaMo> Hi YaseenTa :)
<YaseenTa> I am new here to osdev and irc
<YaseenTa> And i have an idea so i need an account to add blog to the wiki
<zid`> you need to ask the wookie guy then
<YaseenTa> Who wookie
<bslsk05> ​wiki.osdev.org: OSDev Wiki:Joining - OSDev Wiki
<zid`> never done it, but this appears to be how
<YaseenTa> How do i idenfiy my self
<YaseenTa> I just write my name?
<YaseenTa> Wish me luck
<YaseenTa> I submit
Nixkernal has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
YaseenTa has quit [Remote host closed the connection]
Left_Turn has joined #osdev
<chiselfuse> is this irc related to the osdev discord?
<zid`> no
<zid`> half of us are banned
<zid`> the other half haven't visited
netbsduser` has quit [Ping timeout: 260 seconds]
Nixkernal has joined #osdev
YaseenTa has joined #osdev
<YaseenTa> hi
<chiselfuse> zid`: funny, can i know what for? (the bans)
<chiselfuse> i got banned there too
<zid`> chiselfuse: i don't know much, I only survived about 7 minutes
<YaseenTa> where you get banned from?
<clever> zid`: dang, how did that happen? ive been in there for months!
<zid`> Someone was asking if they should write a bootloader, I said absolutely not, the 14 year old admin said to shut the fuck up don't you know who I am
<zid`> I said no I and I don't care
<chiselfuse> YaseenTa: the osdev discord
<YaseenTa> where is discord
<YaseenTa> sent link
<chiselfuse> zid`: LOL
<YaseenTa> zid`: are you admin?
<chiselfuse> YaseenTa: i think you can find it in the explore tab
<YaseenTa> ok
<clever> zid`: for a while, they did have rules against bootloaders
<YaseenTa> what???
<YaseenTa> why
netbsduser` has joined #osdev
<clever> YaseenTa: because everybody starts by making a bootloader and never goes any further
<YaseenTa> am new here so can anyone clear the water and say what's going on?
<YaseenTa> clever: oh
<YaseenTa> still bootloader is good
<chiselfuse> autism trap
<YaseenTa> chiselfuse: what do you mean
<YaseenTa> why trap
<nikolar> zid`: loller
<clever> YaseenTa: x86 bootloaders also tend to be complex, and have to deal with the mess that is realmode, which you then never use again once in virtual mode
<clever> efi greatly simplifies things, and can launch you directly in 64bit virtual
<YaseenTa> I don't really know much but i use rust for os dev so no bootloader dev involved
<chiselfuse> YaseenTa: i meant attention time sink with minimal benefits
<YaseenTa> yes
X-Scale has joined #osdev
<YaseenTa> I make an os in asm and I know the madness of bios legacy bootloader
<YaseenTa> x86
<dostoyevsky2> couldn't there just be one bootloader that you can use for any os?
<clever> YaseenTa: i would say, its far simpler to just configure something (like rust) to emit a standard binary format (like the linux header stuff), and then just let a normal bootloader (like grub) do its job, why replace everything?
<zid`> there could be, if every OS was prepared to use it
<zid`> but that is absolutely not how software development works
<clever> dostoyevsky2: grub!
<zid`> Everybody could just implement winapi, too
<zid`> good luck
<YaseenTa> clever: good point actually
<dostoyevsky2> clever: yeah, I grub also has a terminal and some disk drivers, pretty good starting point for an OS imho
<YaseenTa> but zid` is right too
<clever> YaseenTa: and i say that, as a person re-writing the firmware/bootloader on the rpi, to replace blobs with open source, lol
<clever> grub is already open source, you dont need to replace it again
<YaseenTa> yes
<zid`> grub has factions too!
<zid`> I use grub 0.97
<YaseenTa> I use rust so I use bootimage
<YaseenTa> 0.9 I thik
<YaseenTa> think*
<dostoyevsky2> YaseenTa: Oh, so in rust you can use bootimage to do all the booting for you?
<YaseenTa> yes
<YaseenTa> just configure it
<dostoyevsky2> YaseenTa: And how about a syscall API is there also something ready-to-be used?
<YaseenTa> no
<dostoyevsky2> so if you were using grub, then you also need to define a syscall api, but not sure if one can recycle anything there
<YaseenTa> bootimage just trigger the kernel you need to implement everything
zhiayang has quit [Quit: oof.]
<clever> dostoyevsky2: once grub has passed control to your kernel, grub ceases to be involved, so syscalls are entirely the kernels responsibility
<dostoyevsky2> YaseenTa: what kind of crates can you use in such a kernel? As soon as something wants to open a file it seems like its unusable in a kernel
<clever> the only job grub has, is to get your kernel/initrd into memory, and pass some arguments to the entrypoint
<YaseenTa> any no_std crate
<dostoyevsky2> clever: I was thinking about recycling the grub stuff for a kernel
<clever> it LOADS things at boot! nothing more
<dostoyevsky2> clever: so grub becomes the kernel
<clever> dostoyevsky2: ah, i have seen projects more like that, where they added python to grub
<YaseenTa> clever: what why
<dostoyevsky2> clever: so for running C code you'd need to implement a syscall handler so you can use the filesystem code from grub
X-Scale has quit [Ping timeout: 256 seconds]
<clever> YaseenTa: to quickly iterate on bios level stuff
<bslsk05> ​lwn.net: Python without an operating system [LWN.net]
<zid`> damn, no grub2 fanbois wanted to fight me
<YaseenTa> you mean the cool stuff
<clever> > The original reason for wanting Python in the boot loader was to be able to test the hardware, BIOS, Extensible Firmware Interface (EFI), and Advanced Configuration and Power Interface (ACPI) without having to write a "bunch of one-off programs" for testing.
<dostoyevsky2> clever: isn't that what micropython is about? python as an OS
<clever> YaseenTa: so basically, they can interface with all of that ugly realmode bios calls, without having to write c and recompile constantly
<clever> dostoyevsky2: micropython is its own kernel, rather then being a module under grub
<YaseenTa> I making Java as an os(jvm)
<dostoyevsky2> YaseenTa: isn't that android?
<YaseenTa> without anything
<YaseenTa> even without standard api
<YaseenTa> you just have rust jni
<YaseenTa> openjdk 7
<clever> i can imagine how you might create a thin kernel, that will JIT the java bytecode to native asm, and then run that asm in userland
<clever> that raises a question, how does the java bytecode deal with inter-class linking?
<YaseenTa> check Java 7 specs
<dostoyevsky2> clever: sounds like the opposite of ebpf where you generate the code in userland and then run it in the kernel
<netbsduser`> there is a java os already
<clever> old android/dalvik i think had a list of imports defined, and would pre-link things at install time
<netbsduser`> several even
<clever> modern dalvik uses LLVM to translate the entire app to native code at install time
FireFly has quit [Remote host closed the connection]
<dostoyevsky2> I guess one could implement file io in a rust kernel so that it is usable both inside the kernel and via syscall... so then you could use a lot of crates in the kernel
FireFly has joined #osdev
<YaseenTa> can anyone say how to implement rust std for new os
Matt|home has joined #osdev
<kof673> > generate the code in userland and then run it in the kernel > a thin kernel, that will JIT the java bytecode to native asm, and then run that asm in userland
<YaseenTa> dostoyevsky2: this what am trying to do
<kof673> re: kernel and userland, yes, because without an mmu or similar, rings, whatever hw mechanisms, it is an artificial distinction. code is just code
jeaye has quit [Ping timeout: 265 seconds]
<YaseenTa> kof673: I think OK?
<kof673> i wasn't referring to that
<kof673> just decide how you want to split "kernel" and "userland" though
<clever> kof673: one thing i like the concept of, is a kernel where everything (including things like the rootfs) are just handles you inherit from the parent process
<clever> kof673: and with that kind of thing, you could take untrusted java from the internet, and just not grant it any sensitive handles
<dostoyevsky2> YaseenTa: https://docs.rs/ext2/latest/ext2/ <- maybe one could use a create like that and then somehow make use it?
<bslsk05> ​docs.rs: ext2 - Rust
<kof673> i am just upholding conway's law in case someone wants to avoid splitting lol
<clever> the rootfs, and ipc space, could be virtual handles, that just point back to the parent process
<kof673> yeah, makes sense
<clever> network would be the same
<dostoyevsky2> YaseenTa: *make the std crate use the ext2 crate
<clever> so an untrusted process doesnt get free network
<YaseenTa> dostoyevsky2: come discord : yaseenta
<YaseenTa> dostoyevsky2: I know your point
<dostoyevsky2> last time I tried discord it banned me before I could create an account
<YaseenTa> somewhere that I can get to to
<YaseenTa> you
<YaseenTa> without beening online all time like irc
<dostoyevsky2> YaseenTa: Just get an irc bouncer... you can also use irccloud, they even have phone apps, so you can always be online
<YaseenTa> come private
<kof673> for kernel and userland are both made of the one single substance j/k i will avoid jokes today :D
zhiayang has joined #osdev
<YaseenTa> :|
jeaye has joined #osdev
Turn_Left has joined #osdev
<dostoyevsky2> kof673: I always liked the phrase that kernels are just big C programs
Left_Turn has quit [Ping timeout: 246 seconds]
<clever> dostoyevsky2: and for all of the little-kernel stuff ive been doing, the "kernel" is basically the only program
<kof673> sure, what does C have to say about rings, memory protection, what instructions a process can access......... freestanding C or hosted........absolutely nothing
<clever> its got no userland, and it either just runs the whole system, chain-loads something else, or shares the ram with another cpu core and co-operates
<kof673> "neutral" on all those questions
<kof673> it leaves you an empty blank canvass to paint on top of
Left_Turn has joined #osdev
<kof673> or a "process" even. *c89
<dostoyevsky2> .oO( Link glibc in your kernel, do a search and replace of syscall in the assembly and replace it with calls in your kernel code)
Turn_Left has quit [Ping timeout: 265 seconds]
Burgundy has joined #osdev
YaseenTa has quit [Ping timeout: 264 seconds]
YaseenTa has joined #osdev
YaseenTa has quit [Remote host closed the connection]
YaseenTa has joined #osdev
Burgundy has quit [Ping timeout: 255 seconds]
rom4ik1 is now known as rom4ik
rom4ik has quit [Quit: bye]
rom4ik has joined #osdev
edr has joined #osdev
hwpplayer1 has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 244 seconds]
hwpplayer1 has quit [Remote host closed the connection]
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
zhiayang has quit [Ping timeout: 265 seconds]
<netbsduser`> my aix book arrived
<netbsduser`> quite short, disappointed
<netbsduser`> but i'll wait till i've read it to pass full judgment
<nikolar> lol
<zid`> I mean, it's about aix
<zid`> how long could it be
<netbsduser`> zid`: aix is called "the most foreign unix"
<netbsduser`> that it's unix if it were made by people who haven't got the slightest connection to the living tradition of unix but just got given a description of its functionality and implemented it
benlyn has quit [Remote host closed the connection]
benlyn has joined #osdev
benlyn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
benlyn has joined #osdev
Dead_Bush_Sanpai has quit [Ping timeout: 248 seconds]
Turn_Left has quit [Ping timeout: 248 seconds]
Dead_Bush_Sanpai has joined #osdev
Arthuria has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.9.1 - https://znc.in]
<SystemPrompt> clever: java bytecode references other classes by fully qualified name. The runtime calls the classloader to get those classes, if it doesn't already know them.
MiningMarsh has joined #osdev
goliath has quit [Quit: SIGSEGV]
sbalmos has quit [Ping timeout: 272 seconds]
hwpplayer1 has joined #osdev
zhiayang has joined #osdev
Fingel has joined #osdev
<clever> SystemPrompt: ah, i suspected that, and i assume methods are looked up by string also? but is there maybe some interaction, like a table of 3 imported classes and 5 methods on the 1st class? and then it calls the 2nd method on the 1st class?
<clever> indirection*
YaseenTa has quit [Ping timeout: 244 seconds]
<zid`> aix is the opposite of onyx, got it :P
Arthuria has quit [Ping timeout: 245 seconds]
<nikolar> loller
<kof673> these are the 2 serpents...j/k
Turn_Left has joined #osdev
_ngn has quit [Ping timeout: 260 seconds]
kfv_ has joined #osdev
kfv has quit [Ping timeout: 245 seconds]
Left_Turn has quit [Ping timeout: 252 seconds]
kfv_ has quit [Remote host closed the connection]
_ngn has joined #osdev
kfv has joined #osdev
goliath has joined #osdev
Burgundy has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 252 seconds]
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
gog has joined #osdev
obrien has quit [Remote host closed the connection]
YaseenTa has joined #osdev
xenos1984 has quit [Ping timeout: 246 seconds]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
gog has quit [Quit: byee]
Fingel has quit [Ping timeout: 252 seconds]
Left_Turn has quit [Ping timeout: 264 seconds]
xenos1984 has joined #osdev
hwpplayer1 has quit [Remote host closed the connection]
Artea has quit [Remote host closed the connection]
Fingel has joined #osdev
Fingel has quit [Remote host closed the connection]
Fingel has joined #osdev
Fingel has quit [Client Quit]
Fingel has joined #osdev
orccoin has joined #osdev
<geist> nikolar: i think so, re: apx. may already be in llvm
orccoin has quit [Ping timeout: 252 seconds]
karenw has joined #osdev
levitating has joined #osdev
Left_Turn has joined #osdev
levitating has quit [Read error: Connection reset by peer]
levitating has joined #osdev
kfv has joined #osdev
karenw has quit [Ping timeout: 272 seconds]
karenw has joined #osdev
levitating has quit [Client Quit]
aethlas has joined #osdev
aethlas_ has quit [Ping timeout: 255 seconds]
YaseenTa has quit [Ping timeout: 255 seconds]
YaseenTa has joined #osdev
YaseenTa has quit [Ping timeout: 252 seconds]
hwpplayer1 has joined #osdev
X-Scale has joined #osdev
theyneversleep has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 272 seconds]
hwpplayer1 has quit [Read error: Connection reset by peer]
<nikolar> geist: i've found some patches referring to apx in gcc
<nikolar> i just don't know how to enable the 3 address instructions for example heh
<johnjaye> netbsduser`: i thought the exact same thing about the stargate web series. Someone given a written description of a thing without understanding it and told to copy it.
_ngn has quit [Remote host closed the connection]
_ngn has joined #osdev
netbsduser` has quit [Ping timeout: 252 seconds]
theyneversleep has quit [Remote host closed the connection]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<Ermine> heat: check this out: https://github.com/izabera/breakmaps
<bslsk05> ​izabera/breakmaps - (0 forks/1 stargazers)
<Ermine> it breaks /proc/pid/maps
karenw has quit [Ping timeout: 272 seconds]
<heat> // let's descend 4M levels deep
<heat> how about we don't?
<Ermine> no, we shall go deeper
<heat> but yeah that's just a known problem
<heat> you can create ginormous paths by creating relative to something (chdir in this case, could also be openat)
<spiderella> First version was recursive and used openat and stored the whole path in a string each level
<heat> oh hi
<spiderella> Turns out that storing the whole string makes it quadratic, and that file descriptor limits exist, and that the stack isn't infinite
<spiderella> Hi there
<heat> so what's the point of this besides showing people that PATH_MAX is flawed and poopy?
<nikolar> (a well known fact)
<heat> (fwiw i don't think you can do much better)
gog has joined #osdev
<spiderella> Idk I was looking at some code that parsed/proc/pid/maps
<heat> what happens to /proc/pid/maps?
<heat> i'm not actually disk bombing my system :P
<spiderella> Enomem on read
<heat> oooooh interesting
<heat> how big is the final string? IIRC the kernel slab allocator maxes out at 32M
<spiderella> You can normally seek in proc but you can't do that here because it needs to calculate the size first
<spiderella> It's just over 1gb
<heat> lol
<heat> yeah you can't even buddy allocator that much
<spiderella> I looked for things that parse it badly even in less extreme cases and I found a few, like rr does it wrong, libunwind does it wrong, bunch of other things that inspect memory too probably. You can trick several tools to read part of a line as if it was the next line
<heat> \n in path names?
<spiderella> Rr for instance just replaces "\\12" with "\n"
<spiderella> It's all a bit broken
<spiderella> If you do get the enomem, you can completely hide the addresses of your anonymous maps
<heat> i m actually confused as to how the code is ENOMEMing
<spiderella> Like the same thing happens in /proc/pid/smaps, and map_files doesn't list the private anonymous maps
<spiderella> 1 sec
<bslsk05> ​github.com: seq_file: disallow extremely large seq buffer allocations · torvalds/linux@8cae8cd · GitHub
<spiderella> #define MAX_RW_COUNT (INT_MAX & PAGE_MASK)
<spiderella> == 2gb - 4k
<geist> nikolar: yeah maybe -mapx? something like that
<geist> or is it hidden behind a paricular -march
<heat> i don't grok seq buffers too much
<heat> it's all a little overengineered and weird for my taste
<nikolar> geist: there's only -mapxf
<nikolar> march might be more likely
<nikolar> but i am not sure
<nikolar> (from what i can tell at least)
<spiderella> It tries to grow the buffer in powers of 2 and fails after 1gb
<heat> yeah but the api itself is a litle fuckin weird
<heat> like lots of procfs files are just seekable For Some Reason, you apparently need to allocate before you printf or something, etc
<heat> i can't trace seq_path back to the allocation spot
karenw has joined #osdev
<spiderella> It's either seq_read_iter or traverse and I can't tell from my phone lol
<Griwes> > Russia Mulls Forking Linux in Response to Developer Exclusions
<Griwes> I'm sure this will go perfectly well
<the_oz> That's the case for linux by default, just add another bazaar extension to the infinitely growing pile. Hardly news.
<the_oz> Unless, you know, you have a war machine to sell
<kof673> xyz sells you?
<the_oz> Worse, they care not whtheer I purchase it or not, they spam the world with propaganda "selling" their ideas under the assumption that I've already bought wholesale the mind virus!
<klys> if free software were infinite then things would be wildly different from what they be
<the_oz> unbounded!
<klys> you can say that out of ignorance perhaps, though there is no good reason to take it seriously
<Matt|home> o\
<Matt|home> i apologize for the ignorant question but.. regarding the_oz's link to the linux distro timetable
<Matt|home> does that have actual benefit being drawn that way?
<the_oz> infinitely growing is not the same thing as infinity
Turn_Left has quit [Ping timeout: 252 seconds]
<the_oz> Matt|home, probably the timeline? Dunno.
<SystemPrompt> clever: there is a table of classes and methods you want to import, by name, and the actual instructions reference indexes in the import table (which is actually the constant pool and includes other stuff)
<heat> the best part of the distro timeline is that they allllllllllllllll suck
<heat> except fedora and arch don't @ me
<the_oz> @heat
<the_oz> how are you today
<heat> im fine hbu
<the_oz> preddy gud
<the_oz> sees buttan, must press buttan
<clever> SystemPrompt: ahh, thats exactly what i was expecting
<Ermine> @ heat
<clever> SystemPrompt: so a kernel could look at that table, and generate a global indirection table (much like how .so and dll deal with imports), and then as it JIT's the bytecode, it can just use an offset into that table, for the current class
xenos1984 has quit [Read error: Connection reset by peer]
<heat> wot
<SystemPrompt> well, most java function calls are virtual calls
<Ermine> I @ you
<clever> SystemPrompt: and any un-jit'd methods could just have a pointer to a "please jit me" hook, much like lazy symbol loading in .so's
<clever> ah yeah, virtual complicates it a bit, so youll need a vtable on each object
<Matt|home> has anyone here ever taken a coding class before? just wondering if it's worth trying out or if im better off with self-study, not sure
<clever> but at that point, your mostly just borrowing tricks from c++
<kof673> i haven't been following but <points at gcj corpse>
<klys> matt|home, coding classes have this quality where they teach you to interact with other programmers' code
<Matt|home> huh? you mean like APIs?
<klys> through documentation and setting boundaries on object oriented classes
<kof673> me? corpse, dead body, was to the java/c++ stuff
<clever> klys: the convo had started hours ago, about writing an OS in java, and having the kernel JIT it into native, and then run the native in userland
<SystemPrompt> I did a 4-year university degree in software engineering and probably so did a lot of people. Even the 100 level classes filled a lot of gaps in knowledge (e.g. did you know quicksort isn't a black box, is actually quite simple and can be explained in a 1 hour lecture)
<clever> kof673: oops, meant that for you
<Matt|home> klys - so was it beneficial for you?
<klys> matt|home, hard to say, it was so long ago, though I do code much more now than as if I hadn't taken the classes
<SystemPrompt> clever: jit isn't a binary on/off state. If it was, you could just compile the whole thing ahead of time. Real jits unoptimize and reoptimize code based on changing assumptions, like the actual type of an input parameter.
<Ermine> programming is craft, and universities aren't designed to teach people craft
<Matt|home> mkay, i'll think about it. the last time i took any computer class was in middle school, long long time ago (and im still in college), and i remember even then it being crazy out of date
<SystemPrompt> if all you want to do is write crud apps... otherwise there's a lot of theory to it
<Matt|home> like with a textbook from 1998
<Ermine> It just happens that you need to know some theory, so
<Ermine> All good programmers are self-taught
<Matt|home> im looking at taking a C++ and python course on like, udemy or one of the academy thingies or whatever, otherwise maybe MIT opencourseware if they offer it
<klys> at the heart of any university lies the scantron machine and whomever is neccessary to make up for its deficiencies in weeding out scholarship
<SystemPrompt> what kind of coding class are we talking? the first coding class in any institution is probably roughly the same knowledge you get from the Internet
<Matt|home> but yeah i can't afford a paid university credit course
<Matt|home> damn you think so?
<Matt|home> im just getting into learning OOP and higher level languages, wanna focus on desktop applications for a while
<Matt|home> was hoping some beginner courses might help with that, idk
<kof673> "learn from the masters, after that do whatever the hell you want" -- dali
<klys> my advice is to visit a good university bookstore and see why they talk about stuff like they know what's going on
<Matt|home> i guess what i'll do is just take 2 or 3 lectures from a class, see if it's designed to be helpful to me, and if not just do self taught
<SystemPrompt> well the very first class is usually how the computer reads code, functions, variables, etc. and as someone said, at a university it's not focused so much on practical reality, their goal in teaching you programming is so you can get to higher levels of computer understanding, but NOT so you can make a gui interface in visual basic to track the killers IP address
<Matt|home> lol, im learning win32 for C++ stuff and qt for python stuff
<heat> if you want to learn craft you should try mine
<SystemPrompt> Sure, if you have the chance to receive a couple of lectures for free, that's a good way to know if you like a course
<Matt|home> so not exactly rocket science
<clever> SystemPrompt: yeah, so its a bit fuzzy, do you want a true jit, or just pre-translate the entire binary and then use that as-is
<kof673> re: craft, yes, and nethack teaches you 100 ways to die, how to sysadmin
<SystemPrompt> Java is only hard to compile because it can load new code at runtime. Otherwise you can statically figure out all the types for most things and where virtual calls are still needed.
<Matt|home> i didn't know much about MS OS design but it's interesting, they use something called a message system for their API and seeing as imo windows has the best graphics-related code
<Matt|home> that must be because of that :D
<klys> if you can invest in scholarship you can probably also invest in a few dozen or emore good used books, which is still a good idea this year
EmanueleDavalli has quit [Quit: Leaving]
<Matt|home> the only thing i can invest in is free stuff at the moment :p but i'll give it a go like i said~ in general
<SystemPrompt> my 4th year thesis that I never checked what grade I got was about something very similar - how much can we statically determine the types of variables in a mostly dynamic language? Turns out it's a whole lot. Though they weren't that complex programs. If you know the type you can then inline functions and do other things.
<Matt|home> i'd.. probably prefer the course approach by sheer virtue of the fact that it's pre-structured via the syllabus and i don't have to second-guess myself over which order i need to focus on things
<clever> SystemPrompt: but couldnt you also just disallow dynamic loading, by not implementing that method?
<SystemPrompt> what is your goal?
<SystemPrompt> clever: sure. You won't be able to run a lot of Java apps then.
<clever> ahh yeah
<Matt|home> speaking of, im still a little unclear on the internals of callback functions.. ultimately do they all rely on IRQ calls? or is it really different?
<SystemPrompt> anything with any kind of modular structure is loading those modules dynamically
<SystemPrompt> Matt|home: DispatchMessage looks up your window procedure and calls it. No magic.
<klys> well the trouble is that the professor doesn't tell you about the psychology aspect of college writing and studying, which they have to use to weed folks out of the system; so half the students are in the a.p.a. camp and the other half in the m.l.a. camp. if you're into technology you're expected to be a mind reader and get along with mind readers in school.
<Matt|home> e.g. win32 has DispatchMessage which sends some.. weird class macro thing called msg which afaik waits for some kinda signal
<SystemPrompt> GetMessage gets the next message (when it arrives) and puts it in the msg variable. DispatchMessage calls the window procedure
<SystemPrompt> TranslateMessage goes in the middle because Microsoft is weird
<Matt|home> right, how does the "when it arrives" part work is what im asking XD
<Matt|home> is that OS specific?
<SystemPrompt> Yes
<Matt|home> does it rely on interrupt requests?
<SystemPrompt> Generically, it makes a syscall, which makes the CPU go to kernel mode and do kernel things, and the kernel decides not to set the CPU back to your program again until there's a message
<Matt|home> i actually wondered this a few days ago, if modern desktops still have the old-fashioned IRQ tables or some modern equivalent
<SystemPrompt> the kernel is programmed that way so it doesn't go back to a program that called GetMessage until there's a message
<SystemPrompt> there's a modern equivalent
<klys> signal handling is tied to system calls and oerating ssytem interfaces that allow you to recognize when to take care of callbacks. recent developments in operating systems can use interprocess communication to help with that.
<Matt|home> hm. sounds complicated
<SystemPrompt> klys: signal handling is a weird Unix hack that's actually a lot like a simulation of interrupts. Windows doesn't have it, anyway.
<heat> windows has synchronous signals technically, i think?
<klys> windows sockets uses WSAAsyncSelect
<Matt|home> heat - yeah i think so
<SystemPrompt> it has some compatibility emulation thing in the C library
<Matt|home> so ultimately the kernel is responsible for keeping track of all input
<Matt|home> in windows at least
xenos1984 has joined #osdev
<Matt|home> that reminds me, when i build my OS i need to remember to implement matt-input style support -_-
<clever> SystemPrompt: also related to java, i once wanted to run my local banks online banking app, on my kindle fire
<clever> but in the android manifest file, it declared a dependency on a system library for google maps
<clever> first thing i did, was just unpack the app, change the manifest to remove that declarating, and repack the app
<SystemPrompt> That's something Google does on purpose to maintain its monopoly
<clever> it then failed to launch, because the main ui was a subclass of `class MapActivity`
<clever> checking the docs, that itself, is a subclass of the standard `class Activity`
<SystemPrompt> Since the base system is open source, they encourage apps to use Google libraries as strongly as they possibly can. The old Android Studio would automatically add a dependency every time you opened a project.
<clever> so i decompiled the dalvik to dalvik asm (text files, not binary), and changed the super class, then reassembled and repacked
<clever> and boom, 99% of the app worked
<heat> i bet it had a map somewhere and that was the easiest way to make things work
<SystemPrompt> And they only let you distribute the Google libraries if you sign agreements that are basically more restrictive than Apple
<clever> if i tried to pull up a map of nearby ATM's, then it obviously failed, because it tried using virtual methods from `MapActivity`, which dont exist on the new Activity super
<heat> there you go
<heat> dont attribute to malice what you can attribute to people being complete dipshits
<clever> but i had also realized something scary at the time
<clever> the online BANKING app, had no red flags raised, when i modified its code, and re-signed it with my own keys
* Ermine wants to build android app with meson
<clever> how much harder would it be, to tweak the logic process? and forward a copy of the credentials?
<clever> how good (at the time, 2 decades ago) is amazon's app store review policy?
<clever> the hardest part of all of that, is not getting caught when you use the credentials
<clever> getting them was the easy part, and that was more scary :P
<klys> I remember android a decade ago, everyone wanted a rooted brick
* Ermine also wonders whether getting pixel 8a and installing lineageos worths it
<SystemPrompt> clever: the only way to prevent that is to lock your phone down apple-style, so it can only run apple-approved apps. if you wanted that, you would have bought an apple phone.
<clever> SystemPrompt: thinking about it, yeah, any form of self-reporting or self-checking, could just be patched out, like a lot of PC anti-cheat stuff
<SystemPrompt> this feature does exist on android, and if your bank tries to force you to use it, then fire your bank
<clever> just find the part that yells "ive been modified" and edit it to claim all is right
<clever> oh, something else, that my phone did today, that was very very weird
<clever> i went to use youtube, and discovered, the app just isnt installed
<clever> then i went to the play store, and it asked me to sign in
<clever> and some other apps, complained about the google play services being offline
<Ermine> no banking, no discord, no zoom, no navigator, no steam --- that would be sadge
<heat> no banking no discord no zoom no navigator no steam, just rawdogging android
<clever> i gave the phone a reboot, and magically everything returned to normal, youtube just magically reinstalled itself, play store was already signed in, and everything worked once more
<heat> give me a dose of AOSP with a side of fries
<clever> heat: i know one guy that just does pure native code on android, not even dalvik
<clever> and somehow still taps into the gui and everything else, i havent looked into what the api for that is
<Ermine> AOSP keyboard is nice
<klys> it seems android's basic security mechanism had to do with a number of java sockets being open
<Ermine> it's basically gboard afaik
<heat> android being locked out of being traditional linux was the most genius idea android and google ever had
<heat> can you imagine android but everyone has root and setuid and shit? fuck me
<the_oz> omg a phone as a normal compooter?
<heat> your mom installs CandyCrushSaga-NOADS.apk and now her bank information is just on its way to new delhi
<the_oz> the horror
<Ermine> does she?
<clever> one thing that ive found android lacks, is good options for usb gadget mode, without root
<heat> normal people do _very_ stupid shit
<clever> MSD and HID gadgets for example
<Ermine> You don't isntall random shit from the internet, even on traditional linux
<heat> tech people do a little less stupid shit, but when tech people do stupid shit, shit really hits the fucking fan
<clever> HID gadget lets you abuse a phone as a password manager, and just have it type the password into a pc over usb
<heat> sure you do
<the_oz> greaybeard devs do very stupid things, like assuming that normies won't do very stupid shit
<heat> CANDY CRUSH SAGA WITH NO ADS? OOGA BOOGA
<clever> MSD lets you pick a disk image and expose it to a pc over USB, so you can run any distro livecd from the phones uSD, and download them with the phone itself
<heat> there was a time where lots of people i knew had luckypatched a bunch of aps to remove in-app purchases
<Ermine> (and seems like flatpak stuff has the possibility to mitigate this kind of stupid shit)
<heat> s/aps/apps/
<bslsk05> ​<heat*> there was a time where lots of people i knew had luckypatched a bunch of apps to remove in-app purchases
<Ermine> I used luckypatcher
<Ermine> but that were android 2.3 times
<heat> flatpak and containers can help but root exploits are still a thing
<heat> that's how your favourite OneTouchLigmaRoot app does things
<Ermine> haven't heard of such apps
<heat> it'd also open up other problems like why can't my gallery app access chrome's downloads
<heat> which is an unsolved problem even in actual capability-based operating systems AFAIK
<Ermine> at least of those which don't alert safetynet or knox or something else
<clever> heat: for that, you kind of need a central area for downloads, that isnt owned by one app
<clever> and from the little time ive spent with ios, its seriously lacking any central storage (other then photos/music?) and a proper file browser
X-Scale has quit [Ping timeout: 256 seconds]
<nikolar> clever: don't worry, the target audience doesn't care about that stuff
<clever> android can easily have file-browser apps, and you can see the linux file structure at the root (including all the FHS they are ignoring)
<heat> now TotallyLegitFacebookNOADS can read your downloads folder than may or may not have pics of yourself in a sexy bunny costume
<heat> Ermine, they were rampant Back Then when root exploits just fuckin existed
<klys> yeah knox's counter and qualcomm's qfuse are old news. heaven knows where we are this year. well, if rooting a device means booting an unsigned kernel then you've surely ruined your device as per those rules. it's kind of neat that qualcomm is losing their arm certs this year, as since they invented that stuff.
<Ermine> Also, legit q: should os even mitigate "people are doing stupid shit" problem? Stupid people are good at working that around
<klys> poop.
<clever> the only android device i still have that ive rooted, was the kindle fire
<clever> basically, there is a race condition in the backup restore process
<clever> first, you create a directory that is chmod 777
<clever> within that directory, create 10k more things (files/directories, doesnt matter), and one key file, with a known name
<clever> restore that backup with adb
<heat> Ermine, yes
<clever> and then in parallel, via `adb shell`, try to make a symlink, from that key filename, to some config file
<heat> at least from a business pov
<clever> the restore process will restore the 777 directory, allowing you to create symlinks in the target, then it will be busy creating 10k things, giving you time to symlink
<heat> that's the logic behind android blocking app installs on sd cards, and it works out pretty nicely
<clever> then the restore process will blindly follow the symlink, and "restore" into a config file you shouldnt have access to
<Ermine> also, those protections go at expense of other users that know what they do
<clever> linux cp now doesnt set directory privs correctly, until the contents are fully copied, to prevent this kind of exploit, there is also just no-follow on open
<SystemPrompt> heat: i'll be safe from that exploit by being ugly in any costume :)
<heat> :D
<heat> Ermine, that is true
<clever> for the kindle fire, that first exploit just sets a config file, claiming that the OS is running under a VM
<heat> how do you know that the user truly "knows what he's doing"
<clever> and since its in a VM, security isnt a thing, so `adb root` can relaunch adbd as root
<Ermine> I defo know I do know what I'm doing
goliath has quit [Quit: SIGSEGV]
<heat> the osdev forums had (still do?) a funny technical question before you could register an account
<heat> it turns out you could just google it and find the answer straight up
<heat> for android, stuff like "developer mode" is enabled on many many non-developers' phones
<clever> oh, i just remembered a hackaday post, about an old nokia? phone, that had a rather silly/stupid mistake
<Ermine> on mine device too
<clever> everything you enter on the keyboard, went thru the normal linux input subsystem, and the gui would capture it, in the wrong mode
<clever> what you couldnt see, is that a getty was running on tty1, and accepting the same input, and it was set to auto-login as root
<clever> so literally everything you typed into the phone, was just dumped into a root shell
<clever> and 99% of the time, its just silently screaming command not found into the void, lol
<nikolar> heat: on my phone too, I've shortened the animations
<nikolar> clever: oh that's very very silly
<heat> imagine a phone running xorg, now your apps don't even need root to snoop your input
<clever> nikolar: now, what if i tried to say `rm -rf /` in a facebook message....
<SystemPrompt> heat: that's a captcha
<nikolar> :)
<clever> and then my local phone bricks itself when i hit enter, lol
<SystemPrompt> fun fact: xorg has a security hook to block precisely that, but no one cares to implement the hook
<Ermine> heat: doesn't work well on phones
<Ermine> basic thing, plasma has nice orientation change animation under wayland, and doens't under xorg
<SystemPrompt> i got tired of wayland people so i had a look at xorg (about 8 months ago... after fosdem this year) and found that it's not really that bad, though it has some decisions that are just dumb, and some that make sense but are limiting
<Ermine> also, wayland compositors are better at using hw compositing capabilities, which is important for battery lives
<SystemPrompt> the way it loads modules is really dumb and the module interface is the entirety of xorg so it's ossified
<SystemPrompt> x allows for compositing window managers
<Ermine> SystemPrompt: you're always welcome to take maintainance of xorg
<Ermine> compositing window managers don't do this kind of thing
<SystemPrompt> indeed. i just keep finding higher priority things to do. (also i'm not; i'm free to start a new fork of it)
edr has quit [Quit: Leaving]
<Ermine> xorg even't can handle KMS API properly
<Ermine> even can't*
<Ermine> SystemPrompt: so did every other wayland detractor in this world
<SystemPrompt> there aren't that many people who work on x OR wayland
<SystemPrompt> the wayland team is just the previous xorg team
<Ermine> yes, guess why
<SystemPrompt> because very few people want to work on x or wayland
<SystemPrompt> what point are you trying to make, anyway?
<Ermine> > i got tired of wayland people
<SystemPrompt> wayland is a cult
<Ermine> don't make them look like the baddies
<Ermine> it isn't
<SystemPrompt> after 8 years they've managed to produce a protocol that's more complicated than X11 and works worse
<SystemPrompt> have you actually looked into what's involved in the wayland protocol now?
<Ermine> I'm in fact working on a wayland compositor
kfv has quit [Ping timeout: 260 seconds]
<SystemPrompt> are you building on a fully-featured wayland server framework equivalent in scope to xorg, which lets you just write your compositing logic on top?
<Ermine> yes, wlroots
<SystemPrompt> so you aren't really involved with wayland itself, just your compositing logic
<Ermine> I am
<Ermine> I still need to know how the protocol works and how should I operate on it
<Ermine> + one day I'll have to modify wlroots, so
<Matt|home> relax, i got this
<Matt|home> when i develop my OS it'll have the best graphics
<SystemPrompt> make sure to use the Cascade of Attention Deficit Teenagers development model
<SystemPrompt> (which is also how we got Wayland)
<Matt|home> it'll be so easy to do things in my computer: just like, say vague instructions and it'll execute them perfectly
<Matt|home> e.g. "start" and all your favorite tabs will be open instantly pmuch from cold boot
<Ermine> Do you have anything more constructive to say?
<heat> how is wayland so bad if the same people that did xorg are doing wayland
* Matt|home gives Ermine a chill pill
<karenw> Just be sure to implement (z)xdg_decoration in your compositor or you'll make the devs who speak in raw vulkan/opengl very sad
<Ermine> karenw: sure, I'm not gnome
<heat> anyway the worst part about using wayland at all is that you get reminded that you're using linux when you could be outside touching grass
<Ermine> :D
<karenw> Ermine: Ah, good. (I was going to make a gnome comment but you beat me to it)
<Matt|home> you want constructive, sure. the win32 API is _perfectly_ good for an underlying graphics API, and it's perfectly feasible for one or two people to make the equivalent of win32 in about 10-13 ish months
<heat> grass will never flicker the fuck out and your eyes do not have screen tearing due to legacy display server problems
<heat> HAHAHAHAHAHAHAHA
<karenw> Win32 1.0 was pretty cool... in the late 1980s
<Matt|home> without the crazy bullshit vulkan has or the god... AWFUL.. awful awful awful
<karenw> In $CURRENTYEAR though?
<Matt|home> awful "error checking" system opengl has
<karenw> Oh god, OpenGL error handling is...
* karenw vomits
<Ermine> Matt|home: that comment was not for you
<heat> hey ermine wanna write windows in 6 months
<Matt|home> yeah, it pissed my sister off enough that she literally went outside , ripped the USB keyboard out of it's fucking socket (computer fell to the floor, was an rpi) and fucking smashed it against the railing for a solid minute
* kof673 points heat at egypt "grass flickered out"
<heat> she sure as hell sounds... sane
<Matt|home> Ermine - oh im sorry, i thought you were talking to me :( i apologize
<kof673> it just happens very slowly
<Ermine> heat: are you rewriting onyx to larp windows?
<heat> i spent 9 years larping linux when i could've larped the whole of windows in 12 months
<heat> it's one of my big regrets
<karenw> I hear ReactOS was made in a cave, with a box of scraps