Comments (8)
Here's import for aarch64 - google/kafel@2ae8e11
But generally, yes, argument sizes might be different between architectures - but generally the same for the same size of bitness, so it should be technically ok to use existing arm template for mips32 syscalls, and aarch64 template for mips64 sysacalls. The argument sizes are typically the same (e.g. integers, masks), just things like addresses have different bitness.
from nsjail.
Hm.. the whole syscall table is architecture-specific, I don't think these should be ignored, but simply added to the array?
{"sysmips",
4149 ,
NORMAL,
{
[ARG_0] = .....
}},
Or, am I misunderstanding here? If you did mips syscall table on the basis of aarch64 or some other syscall table, then the way to go is to simply add them (at the end, or sorted, I guess it doesn't matter). We don't have any canonical syscall tables.
from nsjail.
I was (still am) a bit confused about few differences between naming in this table and the one used in the nsjail. Which one is correct ? or does it even matter!?
I will send a pull request soon, but please be critical about it and check it properly before merge ;) as I only have a little experience with these details. :)
Thanks
from nsjail.
I just noticed that my method will not work as the size of input arguments for the same syscall is different in different architectures:
accept4 in arm_syscall.c
{"accept4",
366,
NORMAL,
{
[ARG_0] = {"fd", 4}, [ARG_1] = {"upeer_sockaddr", 4},
[ARG_2] = {"upeer_addrlen", 4}, [ARG_3] = {"flags", 4},
}},
accept4 in amd64_syscall.c
{"accept4",
288,
NORMAL,
{
[ARG_0] = {"fd", 4}, [ARG_1] = {"upeer_sockaddr", 8},
[ARG_2] = {"upeer_addrlen", 8}, [ARG_3] = {"flags", 4},
}},
I also noticed that some syscalls that are available on all architecture are missing in kafel such as statx and pkey_mprotect. Please take a look at this: https://fedora.juszkiewicz.com.pl/syscalls.html
from nsjail.
In other words, if you're trying to create syscall table for mips32, please use arm_syscall template, if for mips64 please try to use aarch64 template. Then please try to remove syscalls which are not present in mips, and add syscalls which are specific to mips.
from nsjail.
The number of undefined syscalls in the templates are high. I should think about a better solution to generate this list!
https://github.com/ebadi/syscalls-table/blob/master/parser.py
python3 parser.py 32 mipso32
Syscall found: 294
Syscall not found 63
python3 parser.py 64 mips64
Syscall found: 239
Syscall not found 85
from nsjail.
What about manually checking (at least some rudumentaty check) with
https://github.com/torvalds/linux/blob/master/arch/mips/kernel/scall64-64.S
and
https://github.com/torvalds/linux/blob/master/arch/mips/kernel/scall32-o32.S
Given that we don't have tables for mips yet, I think we could marge your tables as-is, given that it passes this rudimentary/manual check (total number of syscalls, a few examples of syscalls and their numbers in your table), and fix any eventual problems later on?
from nsjail.
I cleaned up my code here and did a quick check to make sure that syscall numbers match with the links you provided. Please take a look at the result
from nsjail.
Related Issues (20)
- Safe default /dev mounts? HOT 3
- check pid
- build fails after kafel update HOT 5
- build fails on 32 bit targets HOT 2
- Add millisecond precision to nsjail logs HOT 1
- Package nsjail for ease of installation on Linux
- Build fails on armv7l (32 bit) HOT 2
- mnt:mountPt fails with invalid argument HOT 1
- Better fs isolation HOT 2
- Using nsjail with GPU and OpenGL HOT 1
- Include installation instructions in the README HOT 1
- Compilation fails HOT 1
- Making configs
- Updated vendored kafel to enable build on gcc13 HOT 1
- Python Tracing and Runtime security
- Build failed on arm64 with clang-15 HOT 1
- Build Fails when compiling on musl-libc system HOT 6
- config.cc uses old protobuf log handling API that was removed in protobuf 22.0 HOT 1
- SIGTERM Default Handler Issue HOT 1
- Exploring nsjail for Application Isolation with ROS2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsjail.