Better HN
topnewbestaskshowjobs
Log inSign up

1fishe2fishe

96 karma · joined Feb 16, 2024 (2y ago) · 10 submissions

check out:

https://github.com/1fishe2fishe/EXODUS

https://github.com/nrootconauto/Aiwnios

Submissions

comment 2y ago · link · parent

I hate how there's at least one discussion about how a clinically insane man on a disability check that got hit by a train said the n word and did insane things. I know that and his OS is what's best known about him but I really want people to not think about the former when discussing about the latter. Why would that even matter?

comment 2y ago · link · parent

Yeah, I could just use that flag on Linux and let the kernel do more work but I'm afraid I might have to add more logic for looping for a failed mmap only for linux, and more ifdefs usually mean I'm doing something wrong. I'd rather roll with my current strategy (finding a safe pivot and keep bumping without checking anything)

comment 2y ago · link · parent

Thanks for the information, I wasn't aware of that! Seems like it's not available on FreeBSD though ;( I want to support as many OS'es as possible, but I'll still add a comment on that for future reference.

comment 2y ago · link · parent

It's a great OS to play around with, after all. I know a guy that uses TempleOS to poke around his hypervisor's private internal data that's not exposed in the normal control interface because it's the one of the only "full" OS'es that allows unrestricted access to protected memory and lets you write programs and stuff in it in a relatively familiar language (HolyC).

comment 2y ago · link · parent

There were a few candidates for this like "GENESIS - Godly Emulation Not Encountered, System Is Sacred", but that sounded way too biblical (you get my point), or "SANCTUM - Sacred Assembly for Navigating Computing Technology with Unity and Majesty" which was too long and felt almost condescending in a way and both didn't feel like it expressed what EXODUS does clearly enough.

After all, it's EXODUS is an "exodus" of the TempleOS kernel from ring 0 to 3, so I rolled with it.

comment 2y ago · link · parent

God actually didn't ban networking, contrary to popular belief [1]. He just didn't add network drivers to his OS because of all the network cards he'd have to support and cause the OS to bloat up. He stated "We need a network connection, possibly implemented as a super-simple high speed serial device." [2] so browsing the Internet isn't a sin after all ;)

[1]: https://old.reddit.com/r/TempleOS_Official/comments/2pzdy6/c...

[2]: https://web.archive.org/web/20170305000952/http://www.temple...

comment 2y ago · link · parent

That's one way to do it, dealing with linkers was really not my thing so I just get the mapped memory list [1] and set it as the start pivot then stack pages on top of it [2]. Thankfully the brk heap isn't intrusive enough to climb up into the pages I allocated :) (this is actually why Linux' MAP_32BIT mmap starts from 0x40000000 [3], but I didn't like how high it was and made it dynamic)

[1]: https://github.com/1fishe2fishe/EXODUS/blob/90f70386b8ac6bd0...

[2]: https://github.com/1fishe2fishe/EXODUS/blob/90f70386b8ac6bd0...

[3]: https://github.com/torvalds/linux/blob/8f2c057754b25075aa3da...

comment 2y ago · link · parent

Sort of a "distro" I guess. It's basically TempleOS as an app.

comment 2y ago · link · parent

That was actually a very easy part of EXODUS. Since TempleOS is basically a unikernel, it doesn't need any code for per-process virtual address space.

So I can just map some pages in the host process and the host process' address space becomes the HolyC kernel's entire address space, which is ironic since Terry was always adamant about how he disliked modern isolated per-process address spaces and that turned out to be a key to porting his OS to Ring 3.

I did need some code for "code pages" though - since all function calls in TempleOS use the 32 bit relative call instruction, all compiled HolyC code go in the lower 32 bit address space. Some Linux distros like to map the ELF binary at that address range too, so I have a routine to read /proc/self/maps and avoid mmapping those areas (I was surprised mmap can overlap without any signs).

10.

Show HN: Running TempleOS in user space without virtualization(github.com ↗)

228 points · by 1fishe2fishe · 2y ago · 36 comments