java: fix indentation issues
java: remove redundant local variable
java: make 'java' module depend on 'fonts'

Reduces duplication.
java: add copyright banner to usr.manifest
java: do not print uncaught exception form the child context on the console

The parent context which is doing join() prints it anyway so we end up
with duplication. Also, currently when running java tests which expect
contexts to fail the output is polluted with stack traces which do not
denote failures.
tests: detect ContextFailedException as a failure pattern
java: make runjava.jar domain all-privileged

When application installed a SecurityManager, child protection domains
would have been declined the right to read files from their jar. This
was making apache derby fail with this:

java.util.MissingResourceException: Can't find bundle for base name org.apache.derby.loc.drda.messages, locale en
	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322)
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:795)
	at org.apache.derby.iapi.tools.i18n.LocalizedResource.setResource(LocalizedResource.java:184)
	at org.apache.derby.iapi.tools.i18n.LocalizedResource.getTextMessage(LocalizedResource.java:311)
	at org.apache.derby.iapi.tools.i18n.LocalizedResource.getTextMessage(LocalizedResource.java:273)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.localizeMessage(NetworkServerControlImpl.java:3536)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.localizeMessage(NetworkServerControlImpl.java:3492)
	at org.apache.derby.drda.NetworkServerControl.installSecurityManager(NetworkServerControl.java:705)

The bundle actually exists and resides in derbynet.jar but since we
have a SecurityManager installed and runjava.jar domain, which is a
parent of derbynet.jar, does not have permissions for reading other
jars than itself we fail on permission check inside the class
loader. When the same code is run on the host it passes the check
because derbynet.jar is invoked directly from an all-privileged
context. I think the solution is to make our runjava.jar
all-privileged by default. One way to do that is to grant the
permissions explicitly in the java.policy file, or put runjava.jar in
the extensions directory (/usr/lib/jvm/jre/lib/ext). The latter is
simpler so I went with that approach.
tests: add test exploiting issue with protection domain permissions
java: grant exitVM permission to isolates by default

The OpenJDK's launcher does this, if we want to behave the same we also should do this.
tests: add test for exitVM permission under presence of SecurityManager
procfs: fix use-after-free

release_mp_dentries() releases those dentries, so they cannot be used
afterwards.  The vnode ought to be free at that point.

Reviewed-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vga: initialize _offset

The debug allocator purposely copies junk into memory to catch uninitialized
fields, like this.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Update mgmt

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
drivers: null: read must return zero upon success

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
zfs: Port relatime property from ZFSonLinux

OSv port details:
* Adapted zfs_register_callbacks changes
* Discarded man page changes
* Solved conflict in zfs/zfs_znode.c
* Solved conflict in .../opensolaris/lib/libzfs/common/libzfs_dataset.c
* Added lacking MTNENT definitions into .../opensolaris/sys/mntent.h
* Adapted zfs_tstamp_update_setup and zfs_atime_need_update

Description:
"Add the "relatime" property.  When set to "on", a file's atime will only
be updated if the existing atime at least a day old or if the existing
ctime or mtime has been updated since the last access.  This behavior
is compatible with the Linux "relatime" mount option."

Reviewed-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
zfs: Enable relatime by default when creating ZFS dataset

relatime matches the default ext4/xfs semantics, and improves performance
by conditionally updating atime, i.e. if either mtime or ctime changes,
or atime hasn't been updated within the past 24 hours.

atime=off would provide better performance, but it doesn't satisfies the
POSIX requeriments, thus shouldn't be set off by default.

Reviewed-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
x64: Move pvclock-abi.cc under arch directory

pvclock is x86-64 specific, move it under arch/x64.

Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
release-ec2: update template AMIs

Due to deletion of old releases changing template AMI IDs to v0.09

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

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
libc: add header for ffsl and ffsll

We have an implementation of those functions that external users can call at
will.  But because they are not anywhere in our headers, OSv users will not
find the correct function signature. Man page says:

       #include <string.h>

       int ffsl(long int i);

       int ffsll(long long int i);

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>