Skip to content
Snippets Groups Projects
  1. Dec 03, 2013
  2. Dec 02, 2013
  3. Dec 01, 2013
    • Tomasz Grabiec's avatar
      Add java.security properties to the image · 261056e7
      Tomasz Grabiec authored
      
      Without it secure random generator doesn't use /dev/random
      source, which leads to slow startup of tomcat.
      
      Signed-off-by: default avatarTomasz Grabiec <tgrabiec@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      261056e7
    • Pekka Enberg's avatar
      tests: tst-random.so · 5eb1522d
      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: default avatarPekka Enberg <penberg@cloudius-systems.com>
      5eb1522d
    • Pekka Enberg's avatar
      virtio: Add virtio-rng driver · fd1be662
      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: default avatarPekka Enberg <penberg@cloudius-systems.com>
      fd1be662
    • Pekka Enberg's avatar
      virtio: Fix device init with no MSI support · 5dfaac26
      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: default avatarPekka Enberg <penberg@cloudius-systems.com>
      5dfaac26
    • Pekka Enberg's avatar
      devfs: device_destroy() API · 765c9afc
      Pekka Enberg authored
      
      Enable device_destroy() API for the virtio-rng driver.
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      765c9afc
    • Nadav Har'El's avatar
      Add license/fastlog2.txt · 989cf8ab
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      989cf8ab
    • Nadav Har'El's avatar
      Fix crash on malformed command line · 082ff373
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      082ff373
Loading