core: implement pselect()

Add implementation for pselect().

Signed-off-by: Jaspal Singh Dhillon <jaspal.iiith@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
provide a shared library containing most of OSv symbols

This patch introduces a script that will autogenerate a library, libosv.so. Besides
future uses, such as allowing linking agains special symbols for external applications
outside the OSv build system, the immediate use is to allow OSv internals to be exposed
through mechanisms such as Java's JNA and JNI.

It only relies on the "readelf" command to work, that is shipped with binutils
- therefore no extra dependencies are required. All symbols who are either
OBJECT or FUNC. TLS are explicitly left behind because it would complicate the
implementation.  We can revisit this in the future if we really need them.

The script works by scanning all global symbols in the final OSv ELF, and
generating a corresponding symbol in libosv.so. A linker script guarantees that
the addresses match the ones of the kernel. That means the versions of
libosv.so and the kernel MUST match. There is no whitelist or blacklist. I will
make the case here that everything that is normally visible in the OSv ELF should
be visible in this shared library. Making a symbol invisible should then be done
in an earlier and unrelated step.

I have tested this with a JNA wrapper that calls getpid and gettid (due to their
simplicity), and they are working perfectly.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
CC: Lyor Goldstein <lgoldstein@vmware.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
libosv: warn against version mismatch

It is cumbersome to fail loading an ELF because of a version mismatch. My proposed
solution is for us to just warn very loudly if this is the case.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mgmt: update to latest

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
ec2-release: check image format before upload

EC2 doesn't support image formats other than raw. However it does
not verify image format before upload so qcow2 image may be successfully
imported as a volume and attached to an instance. Instance with such a volume
will fail to start and there will be no indication of what went wrong.

Image format verification added to the ec2-release.sh script to eliminate
such a possibility.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
libc: add pthread_attr_setinheritsched to run WEBrick its ruby HTTP server

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: KANATSU Minoru <icc.pot.tyew272@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
random: Add a note to avoid misconception about virtio_rng_read

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: Cleanup enable_tracepoint function

Minor change removing exposing "glob->regex" at Avi's suggestion. Nicer interface.

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
release-ec2: make credentials management more robust

This patch introduces 2 changes:

  1. fix help text to make instructions on credentials definition clearer
  2. verify credentials presence before starting the release process

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>