Commit Graph

139 Commits

Author SHA1 Message Date
Norman Feske
4a1b545770 Move 'Child' API implementation to library 2012-10-09 13:45:33 +02:00
Norman Feske
f4bc08c16f Whitespace fixes in Noux 2012-10-08 15:08:17 +02:00
Alexander Boettcher
2f460b4638 Vancouver: use github version
Fixes #361
2012-10-08 15:08:02 +02:00
Christian Prochaska
cbf401f232 Noux: 'which'
This patch adds the GNU 'which' program to the 'ports' repository.

Fixes #380.
2012-10-08 15:07:53 +02:00
Christian Prochaska
e9ac4b653b Add support for symbolic links
This patch adds support for symbolic links in libc, libc plugins, file
system servers and Noux.

Fixes #322.
2012-10-08 15:05:02 +02:00
Christian Prochaska
963b77bc27 Noux: release binary dataspace in SYSCALL_EXECVE
Fixes #375.
2012-09-30 13:37:49 +02:00
Christian Prochaska
a42f6d8cf7 Noux: get 'libgcc_eh.a' built with GCC
Fixes #373.
2012-09-30 13:37:20 +02:00
Christian Prochaska
20fcede93a Noux: fix error handling in 'Dir_file_system'
If during the file system iterations in the 'stat()', 'rename()' or
'mkdir()' funtions of the 'Dir_file_system' class any file system
returns an error code other than 'ERR_NO_ENTRY', return immediately.

Fixes #376.
2012-09-28 17:08:20 +02:00
Christian Prochaska
1497d5e48f libc_noux: fix 'lseek()' error message
Print 'lseek: ERR_FD_INVALID' instead of 'dirent: ERR_FD_INVALID'.

Fixes #370.
2012-09-28 17:05:36 +02:00
Christian Prochaska
d4499cba41 libc_noux: return the new file descriptor in 'dup2()'
Fixes #369.
2012-09-28 17:05:22 +02:00
Christian Prochaska
0a12e262ce Noux: fix interpreter argument processing
Don't write a '\0' into the argument buffer if no interpreter argument is
given.

Fixes #368.
2012-09-28 17:05:04 +02:00
Christian Prochaska
55a8bae2f8 Noux: close all file descriptors on child exit
With this patch, when a child exits, all of its open file descriptors get
closed immediately. This is necessary to unblock the parent if it is
trying to read from a pipe (connected to the child) before calling
'wait4()'.

Fixes #357.
2012-09-24 09:18:00 +02:00
Josef Söntgen
af58d39854 Noux: fix previous attempt of fixing SYSCALL_READ 2012-09-24 09:18:00 +02:00
Christian Prochaska
97c3f6599d Noux, libc_terminal: initialize 'stat' buffer
Initialize the 'stat' buffer in the 'stat()' function to avoid potential
non-deterministic program behavior.

Fixes #362.
2012-09-24 09:17:59 +02:00
Alexander Boettcher
8af582fac2 Vancouver: catch exception during module loading
Catch any kind of exception we get from the rm_session during module
loading. Panic if modules can't be processed (too big images and so on)
2012-09-24 09:17:59 +02:00
Alexander Boettcher
f5efbff19c Vancouver: map solely requested memory region
Don't map all memory of the VM at once, instead only the one permitted
by the memory model. Otherwise memory regions get mapped which must not,
where each instruction and memory access have to cause an exception in
order to emulate it step by step.
2012-09-24 09:17:59 +02:00
Alexander Boettcher
315a8437e3 Vancouver: make debug output configurable 2012-09-24 09:17:59 +02:00
Alexander Boettcher
2fd68105a3 Vancouver: Make sure context area gets reserved 2012-09-24 09:17:58 +02:00
Alexander Boettcher
5566446211 Vancouver: dimension VM size dynamically 2012-09-24 09:17:58 +02:00
Alexander Boettcher
79b0a7a2c9 Vancouver: zero initialize memory of the heap
Classes in Vancouver expect to get zero initialised memory when using memory
from the heap. Some classes don't initialize member variables as they should
do.
2012-09-24 09:17:58 +02:00
Alexander Boettcher
0d9e5f2daf Vancouver: Reserve VM memory region early
Reserve memory region for VM as early as possible before any other
memory allocation happens. Otherwise it could happen that heap
allocations will use part of the virtual region we require for the VM.
2012-09-24 09:17:58 +02:00
Josef Söntgen
83dd1640fc Noux: fix SYSCALL_READ return value
There is an error if reading from a Io_channel returns -1. In this
case the syscall should fail.

Fixes #356.
2012-09-14 12:24:13 +02:00
Christian Prochaska
d6402041bc Noux: return dummy time in 'gettimeofday()'
The 'find' program can abort if the 'gettimeofday()' function returns -1,
which it currently does. With this patch the 'gettimeofday()' returns a
dummy time instead to prevent such a termination.

Fixes #353.
2012-09-14 12:21:54 +02:00
Christian Prochaska
4b81cf3e63 Noux: fix 'Vfs_io_channel::lseek()' calculations
With this patch the 'Vfs_io_channel::lseek()' function takes the offset
argument into account when calculating the new seek offset in the SEEK_CUR
and SEEK_END cases.

Fixes #352.
2012-09-14 12:21:16 +02:00
Christian Prochaska
4ab9782b8b Noux: use correct member in Vfs_io_channel::size()
Fixes #351.
2012-09-14 12:20:33 +02:00
Norman Feske
83bdfea9b0 Extend Cpu_session with thread-affinity API
This patch introduces the functions 'affinity' and 'num_cpus' to the CPU
session interface. The interface extension will allow the assignment of
individual threads to CPUs. At this point, it is just a stub with no
actual platform support.
2012-09-05 10:25:04 +02:00
Christian Prochaska
78b0bd57f7 Noux: store environment variables zero-separated
With this patch environment variables always get stored as zero-separated
strings in buffers of type 'Sysio::Env'. This fixes the problem that
environment variables with non-alphanumeric characters did not get set
correctly in child processes.

Fixes #340.
2012-08-30 10:44:53 +02:00
Josef Söntgen
1b9c356aa3 Noux: override uid/gid in SYSCALL_STAT
Change the uid/gid entries in the stat syscall to have the same values
on all filesystems that are used in the current noux-instance according
to the specified values in noux' config.

Fixes #338.
2012-08-30 10:44:22 +02:00
Josef Söntgen
9cff243f42 Noux: add proper errno handling to network funcs
Programs use the errno value to check which error exactly occured.
It is mandatory for non-blocking I/O, e.g. connect() gets the current
state of the connection by looking at the returned errno values.

Fixes #337.
2012-08-30 10:44:06 +02:00
Alexander Boettcher
3b0e4372fe NOVA: setup all exception handlers of a thread 2012-08-30 10:42:38 +02:00
Alexander Boettcher
7595823146 Propagate result of cpu_session::state call
State may fail, don't just return just true.
2012-08-30 10:40:00 +02:00
Alexander Boettcher
39957d17b2 Enable gdb_monitor for NOVA 2012-08-30 10:40:00 +02:00
Norman Feske
b7d3601624 Enable 'genode_org.run' examle for Pandaboard 2012-08-23 11:26:19 +02:00
Norman Feske
f4881a37c8 libc_noux: fix compile warnings 2012-08-22 09:51:31 +02:00
Josef Söntgen
95f71a5f71 Noux: add is_nonblocking() method
Certain programs tend to set their sockets non-blocking. As previously
descriptors in Noux were only blocking we now introduce a method to mark
the used Io_channel as non-blocking.
2012-08-22 09:51:30 +02:00
Josef Söntgen
343266b06e Noux: add F_GETFL handling to terminal_io_channel
There are certain programms which check if an fd is open by calling
fcntl(fd, F_GETFL, ...). So to keep them happy we return true if
such an request was done to our terminal fd's.
2012-08-22 09:51:30 +02:00
Josef Söntgen
7dfbd9e191 Noux/net: fix write() in socket_io_channel 2012-08-22 09:51:30 +02:00
Josef Söntgen
1c495b79f4 Noux/net: add proper fcntl() to socket_io_channel 2012-08-22 09:51:30 +02:00
Josef Söntgen
a6904b4deb Noux: add F_SETFL to libc_noux's fcntl()
Among other things it is used to set non-blocking mode, so we should
support it (e.g. fcntl(d, F_SETFL, fl | O_NONBLOCK)).
2012-08-22 09:51:30 +02:00
Josef Söntgen
4aac3933b3 Noux: add FIONBIO handling support to libc_noux 2012-08-22 09:51:30 +02:00
Josef Söntgen
8dfb3d5d81 Noux: add cleanup_socket_descriptors() function
When a child exists it makes sure that all remaining socket descriptors
are closed.
2012-08-22 09:51:30 +02:00
Josef Söntgen
2010a74fba Noux/net: add reset_all() method to sd registry
This method is called when a child is exiting to remove all remaining
sockets from the socket descriptor registry to close all sockets.
2012-08-22 09:51:30 +02:00
Josef Söntgen
57b0490fc6 Noux: remove {get,free}addrinfo
This dead-code will not be needed in the future because we now use
libc_resolv.
2012-08-22 09:51:29 +02:00
Josef Söntgen
6aa05e8d46 Noux: add noux-pkg/lynx
Explanation why --disable-rpath-hack is needed:

When building on pistachio_x86 $(LDFLAGS) contains '-L[...]/l4/lib'
which will be transformed by autoconf to '-rpath [...]/l4/lib'.
Now the problem at hand is that we pretend to be FreeBSD when we are
actually not. So autoconf assumes it is valid to use '-path'  when it
is actually not.

Also we use zlib for (de)compressing gzipped streams/files instead of
calling gzip as this currently somewhat buggy.
2012-08-22 09:51:29 +02:00
Josef Söntgen
42c259d9f0 Noux: add noux-pkg/etc
This package provides files in /etc which are needed for domain
resolving etc. pp.
2012-08-22 09:51:29 +02:00
Josef Söntgen
fd3b54a4fb Noux: add libc_resolv to noux-pkg/netcat 2012-08-22 09:51:29 +02:00
Josef Söntgen
b7dc9af447 Noux: rename noux-pkg/gnu-netcat
The other GNU based packages do not have a gnu- prefix either.
2012-08-22 09:51:29 +02:00
Alexander Boettcher
5fcdd61a13 NOVA: fix placement of EC cap for recall
Put EC cap next to SM cap of Vcpu_dispatcher and not of the Vcpu.

Thanks @parthy for pointing out the issue.
2012-08-22 09:51:29 +02:00
Alexander Boettcher
125d274bc7 NOVA: fix locking in vancouver
Reported by @parthy.
2012-08-22 09:51:28 +02:00
Josef Söntgen
a4f4a5fb5a Noux: add /dev/null and /dev/zero filesystems
These device are mandatory for most programs (well, at least null
is required to be present for a POSIX compliant OS, which Noux is
actually not). But for proper shell-script support we will need
them anyway.
2012-08-22 09:51:28 +02:00