- Dec 03, 2013
-
-
Avi Kivity authored
Subsumed by make_file(). Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Makes it easy to avoid losing them. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Combines falloc_noinstall() and finit(), which are always used together. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
falloc() is inherently racy in that it makes visible (via an fd) a file structure that is not initialized. Remove its uses and falloc() itself. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
falloc() is inherently racy in that it installs an uninitialized file descriptor in a user accessible fd. It is also hard to use correctly when an error occurs. Luckily, we don't use it anywhere, so we can just remove it. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
falloc() is racy since it installs an uninitialized file in an accessible fd. Use falloc_noinstall() and fdalloc() instead; also fixes fd leaks on error. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
falloc() is racy since it installs an uninitialized file in an accessible fd. Use falloc_noinstall() and fdalloc() instead; also fixes an fd leak on error. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
falloc() is racy since it installs an uninitialized file in an accessible fd. Convert sys_close() to C++ and avoid the race; also fixes an fd leak in case of an error. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Copying filerefs is expensive since the reference count is incremented, avoid it. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Raphael S. Carvalho authored
Currently, we only check if neither MAP_PRIVATE nor MAP_SHARED were passed to mmap, however, if it was called with both flags, then EINVAL should be returned. Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Asias He authored
Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
* Admin UI links fixed * CRaSH 1.3.0-beta11 Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Or Cohen authored
Use ISIG flag for our stty call from jline, in order to translate INT to ^C. ISIG was added in "Add interrupt and quit keys" (d7292625). This is related to issue #53. Reviewed-by:
Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Or Cohen <orc@fewbytes.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Asias He authored
Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 02, 2013
-
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Currently sys_open() receives an uninitialized file structure from its callers, which is awkward as the callers must handle opening a file in two steps. It also doesn't fit well with C++'s notion of an object being always fully initialized and valid. Fix by making sys_open() allocate and return the file structure. This also fixes a window in open() where an fd would point to an uninitialized file (between fdalloc() and sys_open()). Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Dec 01, 2013
-
-
Tomasz Grabiec authored
Without it secure random generator doesn't use /dev/random source, which leads to slow startup of tomcat. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Add a simple test case for "/dev/random" which just reads from the file and prints out the random bytes. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
This adds the virtio-rng driver to OSv. The implementation is simple: - Start a thread that keeps 64 byte of entropy cached in internal buffer. Entropy is gathered from the host with virtio-rng. - Create device nodes for "/dev/random" and "/dev/urandom" that both use the same virtio_rng_read() hook. - Use the entropy buffer for virtio_rng_read(). If we exhaust the buffer, wake up the thread and wait for more entropy to appear. We eventually should move device node creation to separate drivers/random.c that multiplexes between different hardware RNG implementations. However, as we only support virtio-rng, I'm leaving that to whomever implements support for the next RNG. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Not all virtio devices support MSI. Fix device initialization by not writing to VIRTIO_MSI_QUEUE_VECTOR register if a PCI device does not advertise MSI-X support. This is needed to initialize virtio-rng devices when running on KVM/QEMU. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Enable device_destroy() API for the virtio-rng driver. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Add license file (BSD license) for fastlog2() function used in the new scheduler as a quick approximate logf(). From https://code.google.com/p/fastapprox/ . Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Before this patch, OSv crashes or continuously reboots when given unknown command line paramters, e.g., scripts/run.py -c1 -e "--help --z a" With this patch, it says, as expected that the "--z" option is not recognized, and displays the list of known options: unrecognised option '--z' OSv options: --help show help text --trace arg tracepoints to enable --trace-backtrace log backtraces in the tracepoint log --leak start leak detector after boot --nomount don't mount the file system --noshutdown continue running after main() returns --env arg set Unix-like environment variable (putenv()) --cwd arg set current working directory Aborted The problem was that to parse the command line options, we used Boost, which throws an exception when an unrecognized option is seen. We need to catch this exception, and show a message accordingly. But before this patch, C++ exceptions did not work correctly during this stage of the boot process, because exceptions use elf::program(), and we only set it up later. So this patch moves the setup of the elf::program() object earlier in the boot, to the beginning of main_cont(). Now we'll be able to use C++ exceptions throughout main_cont(), not just in command line parsing. This patch also removes the unused "filesystem" paramter of elf::program(), rather than move the initializion of this empty object as well. Fixes #103. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Needed for C++ conversion. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
socketpair() stores temporary data in the field they're going to be copied into. Use a local instead. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
In preparation for making 'file' a C++ type. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Unfortunately, C++ does not support designated initializers. Add a function that helps fill their place. Use example: -static struct netisr_handler ether_nh = { - .nh_name = "ether", - .nh_handler = ether_nh_input, - .nh_proto = NETISR_ETHER, - .nh_policy = NETISR_POLICY_SOURCE, - .nh_dispatch = NETISR_DISPATCH_DIRECT, -}; +static netisr_handler ether_nh = initialize_with([] (netisr_handler& x) { + x.nh_name = "ether"; + x.nh_handler = ether_nh_input; + x.nh_proto = NETISR_ETHER; + x.nh_policy = NETISR_POLICY_SOURCE; + x.nh_dispatch = NETISR_DISPATCH_DIRECT; +}); Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-