cellrox / devns-patches Goto Github PK
View Code? Open in Web Editor NEWDevice namespace patches
License: Other
Device namespace patches
License: Other
Device namespaces are an extension to existing Linux kernel namespaces, developed by Cellrox as part of its Thinvisor technology for lightweight virtualization for mobile devices. Device namespaces are based on development done at Columbia University. Certain portions are copyrighted by Columbia University. Device namespaces create the illusion, for processes inside a namespace, that they interact exclusively with a set of device drivers, hiding the fact that there are other namespaces interacting with the same set of device drivers. Device namespaces also introduce the concept of an active namespace, which is a namespace with access to real devices/peripherals and with which the user interacts, and the concept of switching namespaces to allow users to interact with multiple namespaces, one at a time. For more information, see https://github.com/Cellrox/devns-patches/wiki
When you create a new device namespace (via clone), you assign dev_ns->pid_ns in the create_dev_ns function by getting a reference to the pid namespace associated with tsk. This is actually the pid namespace of the task being cloned, and it gets replaced further up the call chain (in create_namespaces).
Additionally, you re-assign dev_ns->pid_ns (without taking a reference) in create_namepaces (kernel/nsproxy.c). This assignment leaks a reference to the original task's pid namespace, and leaves you one-reference short on the pid namespace you want.
line 745: the pr_info statement is missing a parameter - I believe you intended to pass the "addr" variable
Without CONFIG_DEV_NS the current_dev_ns() function returns NULL. This triggers a BUG_ON in drivers/staging/android/logger.c:459
The same logic would eventually trigger a BUG_ON in logger_open() as well.
Perhaps a careful look at where current_dev_ns is used is in order. If there are assumptions about pointer validity then perhaps assigning init_dev_ns to NULL is not the right way to go.
Also, the construction of current_dev_ns() without CONFIG_DEV_NS set is quite awkward. It comes out to something like: &(*(struct dev_namespace *)NULL)
If the kernel config does not contain CONFIG_DEV_NS, then it will not build.
Quick list of issues:
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.