- Oct 14, 2013
-
-
Nadav Har'El authored
Add a convenience function, osv::run(), to run an ELF executable. The patch includes extensive Doxygen documentation for the new function, also detailing the how osv::run() differs from the familiar Linux functions like exec(2). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Pekka Enberg authored
Fix mincore() to follow Linux ABI and return ENOMEM only if (part of the) memory range is unmapped even if it's not resident. This is needed for mincore() to work with demand paged mmaps. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Fixes the following compilation error: ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c: In function ‘rw_enter’: ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c:205:3: error: pointer targets in passing argument 1 of ‘atomic_add_int’ differ in signedness [-Werror=pointer-sign] atomic_add_int(&rwlp->rw_count, 1); ^ In file included from ../../bsd/sys/cddl/compat/opensolaris/sys/atomic.h:33:0, from ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h:66, from ../../bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h:31, from ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c:32: ../../bsd/machine/atomic.h:285:1: note: expected ‘volatile u_int *’ but argument is of type ‘int *’ ATOMIC_ASM(add, int, "addl %1,%0", "ir", v); ^ Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Fixes the following build breakage: CC bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.o ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c: In function ‘cv_timedwait’: ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c:322:2: error: implicit declaration of function ‘gettimeofday’ [-Werror=implicit-function-declaration] if (gettimeofday(&tv, NULL) != 0) ^ cc1: all warnings being treated as errors Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
I forgot to commit the change to dlfcn.cc in the previous patch. Sorry... Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
This is patch v2, incorporating most of the comments from the previous round. Solves issue #47: elf::program's API - add_object() and remove_object() was problematic in two respects: 1. It did not do reference-counting on the loaded object, so if add_object() was done 5 times, a single remove_object() would unmap the object and its 4 other users will crash. 2. It is un-C++-like. This patch replaces these two functions by a single function get_library(): std::shared_ptr<elf::object> get_library(std::string lib, std::vector<std::string> extra_path = {}); get_library() returns a shared_ptr, which is reference counting and does proper C++-style RAII. For example in the code: auto lib = elf::get_program()->get_library(path); auto main = lib->lookup<int (int, char**)>("main"); int rc = main(argc, argv); once lib out of scope, the reference count of the elf::object automatically goes down, and if nobody else holds another shared-pointer to the same library, the object is destroyed (causing the shared library to be unloaded). This patch also documents, with Doxygen, all the functions it touches. IMPORTANT NOTE: This reference count is completely unrelated to the issue of concurrent use of dlopen()/dlclose()/dl_iterate_phdr(), which is still buggy and we need to fix (I have a patch for that, but it's too long to fit in the margin). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Avi Kivity authored
More mkfs infrastructure. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
root mounts accept both a device and a pool name, while non-root mounts only accept the pool name (the device(s) already known while mounting the pool during the root mount). Adjust the mount protocol for this. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
A zpool has a zfs as its userspace interface; but the call to create it was disabled as part of the porting effort. Re-enable it so osv can create zpools. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
To build is_whole_disk() we need to pull in a lot of partition code. Ignore it instead. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
MNTTAB points at /dev/zero, which doesn't exist, and is too long anyway. Point it at the correct place. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
We don't want it in /usr, because it won't have been created yet. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
MAXPATHLEN on osv is larger than on bsd, leading to the zfs ioctl command buffer overflowing the maximum allowable size. Reduce the buffer size to avoid a compile time assert failure. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Nadav Har'El authored
Our default signal handler (for, e.g., ^C) used abort(), which results in a hung VM, and is not very useful. Change this to osv::poweroff(), which gives more useful behavior. Now one can, for example, run a test with run.py and interrupt it in the middle with ^C causing the VM to power off and run.py to complete. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Tomasz Grabiec authored
URLClassLoader determines whether URL denotes a jar or directory by checking the last character of the path. Before: [/]% java -cp java Hello Uncaught Java exception: java.lang.ClassNotFoundException: Hello at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at io.osv.RunJava.loadClass(RunJava.java:175) at io.osv.RunJava.runClass(RunJava.java:115) at io.osv.RunJava.parseArgs(RunJava.java:81) at io.osv.RunJava.main(RunJava.java:27) After: [/]% java -cp java Hello Hello, world. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
Tomasz Grabiec authored
Currently we call abort() if something is wrong whith java.so command. Now that we allow to run processes from the command line this may not be the best behavior because a problem with starting a less import program will abort the system: [/]% run java.so -cp java Hello run_elf(): running main() in the context of thread 0xffffc0000c30b010 java.so: Can't create VM. Aborted Instead of that we could just return and the system can be still usable: [/]% run java.so -cp java Hello run_elf(): running main() in the context of thread 0xffffc0000c30b010 java.so: Can't create VM. run: finished with exitcode 1 [/]% Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
- Oct 13, 2013
-
-
Nadav Har'El authored
The new scheduling algorithm is based on floating point runtimes, and I'd like to be able to tracepoints to debug it. Adding floats and doubles is trivial - we just need to tell the C++ tracing code to use the character "f" for floats and "d" for doubles, and Python (run in gdb when we use "osv trace") already knows how to unpack values with these designations. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
This is a shortcut through various kernel layers to avoid complication, intended to be called from the various zfs utilities. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Not supported under osv. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-