austanss / skylight Goto Github PK
View Code? Open in Web Editor NEWA clean, readable, minimalist operating system designed to be used as an educational material for operating system development and design.
License: MIT License
A clean, readable, minimalist operating system designed to be used as an educational material for operating system development and design.
License: MIT License
In frame, when you call a syscall using the syscall
instruction, it causes an error interrupt.
i want to know to take a look at the project i think it is skylight but i cant remember i was just messing around with it a bit
Ii'm trying to use skylight as a base for my os,but i was wondering how could i implement a fopen syscall, trying to read a pointer from userspace to kernel space (path string) obviously makes the kernel crash, so how can i read/translate user memory addresses to kernel?
here's my code:
void fopen(vfs_handle_t* out, char* path, vfs_open_flags_t flags) {
task_context_t* ctx = ((gs_kernel_base_t*)(rdmsr(IA32_GS_BASE)))->ctx;
uint64_t pid = ((gs_kernel_base_t*)(rdmsr(IA32_GS_BASE)))->pid;
paging_table_t* kpml4 = paging_get_pml4();
paging_load_pml4((paging_table_t *)ctx->cr3);
serial_print_quiet(path);
paging_load_pml4(kpml4);
}
when trying to print the path in serial the kernel just goes into unknown exception (obviously it can't find the value referred by the pointer).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.