Giter Club home page Giter Club logo

maestro's People

Contributors

litarvan avatar llenotre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maestro's Issues

error: linker `i686-elf-ld` not found

When trying to build the kernel using cargo build in the cleanup branch, I get this error:

> cargo build
   Compiling maestro v0.1.0 (/home/pixl_xip/Projects/Git/maestro/kernel)
warning: [email protected]: Compiler version doesn't include clang or GCC: "cc" "--version"
error: linker `i686-elf-ld` not found
  |
  = note: No such file or directory (os error 2)

The following warnings were emitted during compilation:

warning: [email protected]: Compiler version doesn't include clang or GCC: "cc" "--version"

error: could not compile `maestro` (lib) due to 1 previous error

My system:
cargo 1.78.0-nightly (7065f0ef4 2024-03-12)
gcc (Debian 13.2.0-23) 13.2.0
GNU ld (GNU Binutils for Debian) 2.42
linux 6.7.9-amd64
Vanilla OS 2.0 x86_64 with subsystem apx-vso-pico (Debian based)

Be able to build from `aarch64`

$ cargo build
   Compiling macros v0.1.0 (/Users/brandon/Desktop/maestro/macros)
   Compiling maestro v0.1.0 (/Users/brandon/Desktop/maestro)
error: failed to run custom build command for `maestro v0.1.0 (/Users/brandon/Desktop/maestro)`

Caused by:
  process didn't exit successfully: `/Users/brandon/.cargo/target/debug/build/maestro-7fa53f85575e3aad/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=config.toml

  --- stderr
  Configuration file not found

  Please make sure the configuration file at `config.toml` exists`
  An example configuration file can be found in `default.config.toml`
MacBook-Air:maestro brandon 2024-01-07 11:54:32 $ 

Kind of a confusing error because there is a .cargo/config.toml:

 $ ls .cargo/config.toml
.cargo/config.toml

but I'm guessing it expects something different

Doing this:

$ cp default.config.toml config.toml
$ cargo build

gets me further. not sure if this could be documented somewhere more clear

but then I get a whole bunch of weird cc/clang errors:

warning: src/boot/remap.s:44:6: error: malformed expression
warning: unexpected token in operand mov $0x088888, %esisrc/util/libc/memset.s
warning:  : 22unexpected token in operand:2
warning: :  or $1, %alerror: 
warning: invalid instruction, did you mean: b? 
warning:     mov $(0xc0000000 + boot_stack_begin), %esp 
warning:       
warning:   shl %cl, %ebx  src/memory/vmem/paging.s :   jbe 1f 
warning:  45 : 2^
warning:  : error: invalid instruction
warning:  ret
warning:   ^   
warning:  ^
warning:  src/util/libc/memset.s:24:   src/boot/gdt.s :673  :   error: :  ^

It's probably because I'm on aarch64 and it's trying to use $CC without realizing it needs to "cross-compile" I guess?

  exit status: 1
  cargo:warning=ToolExecError: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m32" "-Wall" "-Wextra" "-nostdlib" "-ffreestanding" "-fno-stack-protector" "-mno-red-zone" "-Wall" "-Wextra" "-Tarch/x86/linker.ld" "-o" "/Users/brandon/.cargo/target/x86/debug/build/maestro-5b5a8234f3b77c53/out/src/idt/idt.o" "-c" "src/idt/idt.s" with args "cc" did not execute successfully (status code exit status: 1).
  exit status: 1
  cargo:warning=ToolExecError: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m32" "-Wall" "-Wextra" "-nostdlib" "-ffreestanding" "-fno-stack-protector" "-mno-red-zone" "-Wall" "-Wextra" "-Tarch/x86/linker.ld" "-o" "/Users/brandon/.cargo/target/x86/debug/build/maestro-5b5a8234f3b77c53/out/src/idt/syscall.o" "-c" "src/idt/syscall.s" with args "cc" did not execute successfully (status code exit status: 1).
  exit status: 1
  cargo:warning=ToolExecError: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m32" "-Wall" "-Wextra" "-nostdlib" "-ffreestanding" "-fno-stack-protector" "-mno-red-zone" "-Wall" "-Wextra" "-Tarch/x86/linker.ld" "-o" "/Users/brandon/.cargo/target/x86/debug/build/maestro-5b5a8234f3b77c53/out/src/kernel.o" "-c" "src/kernel.s" with args "cc" did not execute successfully (status code exit status: 1).
  exit status: 1
  cargo:warning=ToolExecError: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m32" "-Wall" "-Wextra" "-nostdlib" "-ffreestanding" "-fno-stack-protector" "-mno-red-zone" "-Wall" "-Wextra" "-Tarch/x86/linker.ld" "-o" "/Users/brandon/.cargo/target/x86/debug/build/maestro-5b5a8234f3b77c53/out/src/process/regs/context_switch.o" "-c" "src/process/regs/context_switch.s" with args "cc" did not execute successfully (status code exit status: 1).
  exit status: 0

  --- stderr


  error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m32" "-Wall" "-Wextra" "-nostdlib" "-ffreestanding" "-fno-stack-protector" "-mno-red-zone" "-Wall" "-Wextra" "-Tarch/x86/linker.ld" "-o" "/Users/brandon/.cargo/target/x86/debug/build/maestro-5b5a8234f3b77c53/out/src/process/regs/context_switch.o" "-c" "src/process/regs/context_switch.s" with args "cc" did not execute successfully (status code exit status: 1).

Not sure if the build.rs script or whatever can detect it needs to find x86/x86_64 compiler if one isn't available natively. I would have guessed changing the build target in .cargo/config.toml was enough

Network management UI: add system proxy default TUN Mode

Why this request?

I’m in a country where the internet is very blocked, and upgrading OS or downloading software is a hassle, github gitlab Ping over time 300ms.

In thousands of Linux and BSD distributions, there is no single system desktop environment that proxies all traffic,
I use a proxychains and it’s a terrible proxy for the terminal, very slow.

Missing privilege check in the mknod, mount and umount syscalls

According to the man page, the mknod syscall should return EPERM when an unprivileged user requests anything except "a regular file, FIFO (named pipe), or UNIX domain socket".
The lack of this check means that an unprivileged user can create a new device node for any connected hard disks to read the entire contents:

mknod foo b 8 0

The mount and umount syscalls should also only be possible to run as a privileged user

Is Maestro a RTOS?

Never found any other place to ask this question:

Is Maestro is a Real-Time or a non Real-Time kernel?

All about maestro in an organization

Dear @llenotre,

In first, I wish you a Happy New Year 2024!

It is a good project, I think, it will be better to have all repositories into an organization than a personal account.

Can you look?

Webbrowser VM (WASM or asm.js) and use GPLv2 or Mozillas MPL

A nice way to allow people to look at a new OS:
https://bellard.org/jslinux/
https://copy.sh/v86/
Maybe you like to host a copy of that for Maestro. You only need to serve static files. The VM runs completly in the webbrowser client.

 

License

Additionally I like to mention, that I consider GPLv2 a main factor of success for Linux. Especially in the early days GPLv2 forced companies to work together. Red Hat or SUSE couldn't make their Linux completly propritary because of GPLv2.
(Look at Microsoft. Theiy simply used the TCP/IP stack from BSD for Windows without ever giving something back to BSD.)

So I'd humbly suggest to use GPLv2 instead of MPL.

 

GPLv3 is a little strict. Many hardware vendors competly avoid it, because it enforces them to allow customers running custom OS on the hardware. This sounds nice for customers. But it would have kept companies from contributing to Linux. And commercial contributions make up a great part of Linux's success.

An alternative to GPLv2 would be Mozillas MPL. It's a little more permissive than GPLv2. But it still enforces others to share their improvements.

https://en.wikipedia.org/wiki/GNU_General_Public_License#Version_2

https://en.wikipedia.org/wiki/Mozilla_Public_License

Error when attempting to build

error: command failed: 'cargo': Permission denied (os error 13)

This is shown when trying to build with cargo build. cargo build works on my own projects, but when attempting to build maestro, this error is displayed.

System info:
Vanilla OS 2.0 Beta (commands being run is an apx-vso-pica container)
cargo 1.78.0 (54d8815d0 2024-03-26) (installed from rustup)
linux 6.7.9-amd64

Panic! src/memory/buddy.rs:552:49

Created a new VM under Workstation Pro Linux 17.5.0. Pretty basic VM, single core 256MB RAM, 1GB IDE HDD. It could easily be something related to the VMWare machine I created, but I captured a screen for you anyway. :-)
Screenshot from 2024-01-05 23-45-29

Provide a ready-made ISO for download

IMO that would hugely help the project. It would be lower the barrier for experimenting with the system. Maybe you can leverage some GitHub automation to do that when you merge a new feature branch? Thanks.

The License Issue

Splitting off from #3 because that issue has two concerns listed in it.

I am currently thinking about switching the license. A lot of people made that remark.

To be fully honest, the decision to use the MIT license was taken a long time ago and was based only on "this is somewhat acceptable" and "this is easy to understand". Literally a no brainer because I didn't want to spend time thinking about this.

Now that the question gained relevance, I am considering it.

Originally posted by @llenotre in #3 (comment)

The MIT license fails to address patents, which is liable to become relevant eventually if your project continues growing in popularity, as patents are not the same as copyright. This is why the Rust project uses its MIT/Apache 2.0 dual-license scheme. An alternative license is the Blue Oak Model License, which is kinda just "the MIT license, but it directly addresses the patent problem". It was designed by a lawyer specializing in this area. Others have already made the arguments for/against various licenses in #3 and I offer no real disagreement with their points: it's just a matter of what you want.

The umount syscall does not check if the mount is busy

The umount syscall does not check if there are any open file descriptors in the mount point. This means that when unmounting, there can be a dangling inode. The umount syscall should return EBUSY when there are still open file descriptors.

bad filesystem/partition layout

After installing, I tried to mount the filesystems from the host in order to copy files over.

I could mount /boot but only after fixing tons of e2fsck errors, I could not mount / at all, and the disc now does not boot any more either (enters GRUB rescue mode).

I suspect that something does not honour the partition layout (and, arrrgh why do you use GPT?) correctly.

kpartx also says that one of the two GPT copies is corrupt.

I think this will lead to data loss.

(I just wanted to look whether my shell works. It’s more liberally licenced than GNU bash, leaner and faster. If you want, get the Debian package, extract usr/lib/i386-linux-musl/bin/mksh from the inside (it’s statically linked) and copy it over. Also put usr/share/doc/mksh/examples/dot.mkshrc as ~/.mkshrc.)

MemSpace::map can overwrite kernel pages

When run with MAP_FIXED, MemSpace::map has no limits to where a page is requested. Furthermore, it will always unmap any pre-existing page. This means that a user can hijack kernel pages (and thus execution) with mmap or the ELF parser.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.