-
Luna September 5 release - 0.5.0
All checks were successfulcontinuous-integration/drone/push Build is passingreleased this
2023-09-05 08:56:28 +00:00 | 384 commits to main since this releaseSame release name, still an alpha release.
This month (the release was supposed to be at the end of August but I'm a bit behind schedule)'s big features:
1. UNIX local domain sockets
Yes! No internet support, but local communication sockets are now supported on Luna. They are used through the standard Berkeley sockets API, and only support the SOCK_STREAM socket type.
This was a prerequisite for a window server and graphical system (still being worked on in #38).2. Shebang scripts and multiple binary formats
This month, support for shebang scripts (scripts that begin with a line like
#!/bin/sh
or#!/bin/python3
and are treated as normal executables) was added, along with an extensible framework for other executable formats to be added in the future, even allowing for a future subsystem in userspace similar to Linux's binfmt_misc.3. Raw input support
Previously, the only way to read keyboard input was through the TTY. But that has only its own keyboard layout, reads output in lines, and many more things that wouldn't work for a desktop. Now, there is a raw keyboard input device that can be switched on, turning the TTY off, and a raw mouse input device, which wasn't present before.
4. Shared memory
Another prerequisite for a GUI system, anonymous shared memory can be created via mmap(MAP_SHARED | MAP_ANONYMOUS) and most files can also be mapped as shared. POSIX shared memory support is provided via the /dev/shm RAM filesystem, as is done in Linux.
5. Third-party software ports
This month, Luna gained a new system to store port patches and build and install them onto the system root, letting some software be properly ported to Luna, such as the GNU binutils suite.
6. Simple program sandboxing using pledge()
The pledge() call, borrowed from OpenBSD, is a simple way to restrict process operations to limit the damage caused by a potential security vulnerability in a program. This mechanism is not intended to protect from malicious programs, as pledges can be removed by a call to exec (if it is allowed by the process' current set of promises). That will hopefully come later.
7. Greater terminal functionality
Finally, the Luna TTY has a blinking cursor! Also, colors.
Luna now supports basic escape sequences, allowing for color changes and cursor movement. This is used in the shell to add a colorful prompt, and in ls to distinguish file types.
Hopefully coming soon (next month?), a proper terminal editor using this functionality. I can't wait to get rid of edit.Other features:
- Make HashTable and Vector grow exponentially
- Start documenting the entirety of libluna (not finished, libluna is too large to document it all in a single release)
- Add a Bitset class to libluna
- Make edit more user-friendly
- Add a configurable service directory to init
- Add welcome and license files to the OS
- Add the free utility
- Add a memstat() system call
- Make disk reads cached, with cache memory reclaimed on OOM
- Implement popen/pclose
- Use pledge in init
- Add support for init --user
- Add a pledge wrapper to libos
- Build the GNU libstdc++ for third-party ports
- Add alarm() and getpagesize()
- Add putenv() and strcoll()
- Add some math.h functions (wrappers around GCC builtins)
- Add the touch utility
- Add support for file times
- Add Process::spawn() to libos
- Use memory-mapped IO in gol
- Add the poll() system call
- Install kernel API headers into /usr/include/moon
- Add a PS/2 mouse driver
- Add CircularQueue::is_empty()
- Add a variant of CircularQueue that dynamically allocates its buffer at runtime
- Add kernel functionality to allow external inodes (such as sockets) to acquire an inode number from a file system
- Add Buffer::dequeue_data()
- Add the SIGWINCH signal
- Reenable userspace stack tracing, but hidden behind a config flag
- Actually implement sigsetjmp() and siglongjmp()
- Add bc port
Fixes:
- Remove the pivot_root utility
- Handle tab properly in the kernel TTY
- Use /usr/bin instead of /bin everywhere
- Store the full command line of a process
- Move the scanf implementation from libc to libluna
- Stop using syscalls directly in libos
- Avoid scrubbing malloc memory in places where the memory is already going to be overwritten
- Validate the hostname in init
- Move luna/Syscall.h to the kernel API directory
- Completely prevent sending signals to kernel threads
- Remove many legacy test apps
- Install libluna.a and libos.a into the system root
- Use libluna Buffers in more places instead of manually allocating memory
- Return SIGPIPE/EPIPE when writing to a pipe with no more readers
- Detect more cases of no DMA support
- Avoid memory leaks when calling kernel_exit()
- Reset the read buffer even when read() returns an error
- Properly check memory bounds in strdup_from_user()
- Properly check memory bounds while touching user memory
- Allow null envp in execve()
- Store FD_CLOEXEC in the file descriptor itself
- Remove make_array() and destroy_array()
- Create a new process group to log in
- Properly propagate errors through fgetc() and File::getchar()
- Rework the kernel VFS metadata system to make it simpler
- Set the close-on-exec flag for directories opened using opendir()
- Remove support for 'Script' parameters in init config files
- Rename Inode::blocking() to Inode::will_block_if_read()
- Separate FileDescriptors and OpenFileDescription in the kernel
- Store SharedPtr's ref count in the object itself
- Use pid_t internally in the kernel for process IDs
- Fail on invalid interrupts instead of calling FIXME_UNHANDLED_INTERRUPT
- Wrap around when iterating through a HashTable's buckets array
- Include waited-for grandchildren in RUSAGE_CHILDREN's times
- Fix comparison of StringViews without null termination
- Change program description for stat
- Error out on bidirectional characters
- Make init's log stream line-buffered
- Log the release name and build date in the boot log
ISO: pub.cloudapio.eu
Downloads