Fix: provide more precise error report for enable event

Fixes #658

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Update sched instrumentation to Linux 3.13

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Update kvm instrumentation to Linux 3.13

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: enable event error path memory corruption

The call to

  kmem_cache_free(event_cache, event);

after setting event to ERR_PTR() value is causing memory corruption
(kernel oops). This bug has been introduced very recently by commit:

  Fix: provide more precise error report for enable event

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: tracepoint name remapping

Commit

  "Introduce API to remap event names exposed by LTTng"

failed to map the event names enabled by the user to tracepoint names
known to the kernel. For instance, tracing with the kmem_kmalloc event
enabled is not gathering any event. This issue applies to all tracepoint
events declared with a different name within LTTng than within the Linux
kernel.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: tracepoint event name mapping at unregister

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Version 2.4.0-rc3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: OOT lttng-statedump tracepoints not visible with signed kernels

Users have reported being unable to trace non-signed modules loaded
within a kernel supporting module signature.

Here is the relevant report of this issue to Linux upstream, with a
proposed fix: https://lkml.org/lkml/2014/2/10/747

Work-around the issue for lttng-statedump.ko tracepoints.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cleanup: move callback init to static initialization

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: Add statedump exit so module is not permanent

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: use after free in ring buffer clients

Don't use ring buffer client's struct lttng_channel from ioctl which
applies to ring buffer streams, because lttng_channel is freed while lib
ring buffer stream and channel are still in use. Their lifetime persists
until the consumer daemon releases its handles on the related stream
file descriptors.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Basic module for net instrumentation

This module aims at recording network events and relate them to user-space
processes. It includes the following instrumentation.

 * records connect and accept to match client and server socks objects
 * records sock create, clone and delete
 * records hints about TCP packets sent and received

Instrumentation is performed with kprobe, by overriding the netfamilly IPV4 and
by means of netfilter hooks.
Fix compilation issue with socket statedump
Fix declaration warning
Add fields to tcp probe: checksum, window, flags

Thanks to Geneviève Bastien for this patch.
Work around sock_from_file in older kernel

In older kernel < 3.6 function sock_from_file is not exported. Copy the
function to make it work.
Fix TCP flags endianness

Shift TCP flags according to endianness.

Thanks to Genevieve Bastien for this patch

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Skeleton to support custom module signing key

Add a module that installs an additional key to .module_sign keyring. This
module itself will be marked as TAINT_FORCED, but following modules should be
authenticated.

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Sign lttng modules in build process

Modules are signed unconditionnaly, and thus won't work if CONFIG_MODULE_SIG is
not set, because the keys won't be generated. Well, just don't do this.

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Add basic structure for backtrace context