Add attribute format gnu_printf to notice() + fix 1 format error.

This attribute was suggested by the GCC option "-Wsuggest-attribute".
In turn, this GCC option was suggested by Chritophe Monat ;)
Fix "./tracee/abi.h:42:41: warning: unused parameter tracee" on x86.
Move backup of original register values out of fetch/push_regs().

This will allow the use of fetch/push_regs() without messing up the
enter/exit stage logic.
Use ptrace(SYSCALL, ...) as the unique point of death for Tracee structures.

First a quote from the ptrace manual:

    interpret ESRCH as "tracee died unexpectedly" [...].  Note that
    there is no guarantee that waitpid(WNOHANG) will reliably report
    the tracee's death status if a ptrace operation returned ESRCH.
    waitpid(WNOHANG) may return 0 instead.  In other words, the tracee
    may be "not yet fully dead", but already refusing ptrace requests.

Then, this should simplifies the event loop/state machine a little
bit, for the ptrace emulation support more specifically.

(cherry picked from commit 63cb73059c8bd7bc9dd866b8586d092de7b8fa8d)

Conflicts:
	src/ptrace/event.c
	src/tracee/tracee.c
Simplify the handling of events specific to waitpid(2).

(cherry picked from commit 2e0a62fe921d36d03656e831a44705c5b1629e0e)

Conflicts:
	src/ptrace/event.c
	src/tracee/event.c
	src/tracee/tracee.c
Use ptrace notification for clone, fork, and vfork inheritance.

This commit is a pre-requisite for some incoming features
(seccomp-filter, ptrace emulation, ...).
Add support for PTRACE_EVENT_SECCOMP in order to improve performance.

Note: it is currently enabled by an external program.
Fix the function that searches for the command in $PATH.

Previously, if the initial command was specified as an absolute or
relative path that didn't exist, the function which() searched for it
in $PATH:

    before$ stat ./echo test
    stat: cannot stat ‘./echo’: No such file or directory
    before$ proot ./echo test
    test

    now$ proot ./echo test
    proot warning: './echo' not found (root = /, cwd = /usr/local/cedric/git/proot)
    proot error: see `proot --help` or `man proot`.

Note that there's still an unexpected behavior with such a following
command:

    $ env PATH=/ ./proot usr/bin/echo test
    test

Reported-by: André Draszik <andre.draszik@st.com>
Enable PTRACE_EVENT_SECCOMP in order to improve performance on x86/64.

Note that the support for x32 is now broken unless the environment
variable PROOT_NO_SECCOMP is set.
Enter the sysexit stage only on demand when seccomp is enabled.

This reduces the overhead induced by PRoot by 10%.
Extend syntax of -b option to explicitly not dereference the guest location.

If the guest location is a symbolic link, it is dereferenced to ensure
the new content is accessible through all the symbolic links that
point to the overlaid content.  In most cases this default behavior
shouldn't be a problem, although it is possible to explicitly not
dereference the guest location by prepending it the ``!`` character:
``-b *host_path*:!*guest_location*``.

For example, on Debian and Ubuntu where ``/bin/sh`` is a symbolic link
to ``/bin/dash``.  If ``/bin/bash`` is bound to ``/bin/sh``, the
binding location will be actually ``/bin/dash``:

    proot -b /bin/bash:/bin/sh

    $ md5sum /bin/sh
    089ed56cd74e63f461bef0fdfc2d159a  /bin/sh
    $ md5sum /bin/bash
    089ed56cd74e63f461bef0fdfc2d159a  /bin/bash
    $ md5sum /bin/dash
    089ed56cd74e63f461bef0fdfc2d159a  /bin/dash

It is now possible to strictly bind ``/bin/bash`` over ``/bin/sh`` --
without dereferencing it -- by specifying the ``!`` character::

    proot -b '/bin/bash:!/bin/sh'

    $ md5sum /bin/sh
    089ed56cd74e63f461bef0fdfc2d159a  /bin/sh
    $ md5sum /bin/bash
    089ed56cd74e63f461bef0fdfc2d159a  /bin/bash
    $ md5sum /bin/dash
    c229085928dc19e8d9bd29fe88268504  /bin/dash

Reported-by: Benjamin BARATTE <benjamin.baratte@st.com>
Refactor syscall filtering + split the list for each extensions.

Note it's not possible to update the list of filtered syscalls during
a sub-reconfiguration since it have to be done by the tracee itself.
A solution is to defined PROOT_NO_SECCOMP before executing the outer
PRoot.
Print list of built-in accelerators (process_vm, seccomp_filter) when -V.
Merge branch 'seccomp-accelerator'
Add missing "#include <linux/ptrace.h>" for the event loop.

This was detected on Ubuntu where PTRACE_SECCOMP_EVENT is equal to 8
instead of 7 (as defined by compat.h).
Add missing "#include <sys/ptrace.h>" before "#include <linux/audit.h>".

Until linux.git:c0a3a20b, the header file "linux/audit.h" used to
include "linux/ptrace.h".  This latter defines PTRACE_ variables with
CPP directives whereas "sys/ptrace.h" defines them with an "enum". As
a consequence, the following invalid C code might be produced:

    enum __ptrace_request
    {
        0 = 0,
        1 = 1,
        2 = 2,
    ...
Fix compatibility with old kernels & ones where PTRACE_EVENT_SECCOMP == 8.
Fix stack corruption: GETEVENTMSG expects *data to be "unsigned long".
Fix missing trailing ";" for architectures with no seccomp support.
Try a ptrace setup without the support for seccomp if it failed at first.

An error could happen if PRoot was built with seccomp support but is
actually running on a kernel without this support.