Mathieu Desnoyers [Fri, 17 Feb 2017 17:14:07 +0000 (12:14 -0500)]
Version 2.8.4
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 10 Feb 2017 01:46:44 +0000 (20:46 -0500)]
Fix: nmi-safe clock on 32-bit systems
On 32-bit systems, the algorithm within lttng-modules that ensures the
nmi-safe clock increases monotonically on a CPU assumes to have one
clock read per 32-bit LSB overflow period, which is not guaranteed. It
also has an issue on the first clock reads after module load, because
the initial value for the last LSB is 0. It can cause the time to stay
stuck at the same value for a few seconds at the beginning of the trace,
which is unfortunate for the first trace after module load, because this
is where the offset between realtime and trace_clock is sampled, which
prevents correlation of kernel and user-space traces for that session.
It only affects 32-bit systems with kernels >= 3.17.
Fix this by using the non-nmi-safe clock source on 32-bit systems.
While we are there, remove an implementation-defined c99 behavior
regarding casting u64 to long by using unsigned arithmetic instead:
turn:
if (((long) now - (long) last) < 0)
into:
if (U64_MAX / 2 < now - last)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 7 Dec 2016 19:17:33 +0000 (14:17 -0500)]
Fix: asoc instrumentation for RHEL 7.3
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 7 Dec 2016 16:09:31 +0000 (11:09 -0500)]
Fix: SCSI instrumentation for SLES12 SP2
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 7 Dec 2016 16:09:30 +0000 (11:09 -0500)]
Add SUSE Linux Enterprise kernel version tests
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 24 Oct 2016 17:27:01 +0000 (13:27 -0400)]
Fix: preemptible and migratable context error handling
When built against preempt-rt and preempt kernels, the "return 0" case
means success, but lttng-modules incorrectly prints an error in the
kernel log.
Given that we handle the -ENOSYS error in lttng_context_init, there is
no need to keep the ifdefs in that function.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 13 Oct 2016 14:13:29 +0000 (16:13 +0200)]
Version 2.8.3
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 13 Oct 2016 13:50:21 +0000 (15:50 +0200)]
Fix: bump stable kernel version ranges for clock work-around
Linux commit
27727df240c7 ("Avoid taking lock in NMI path with
CONFIG_DEBUG_TIMEKEEPING"), changed the logic to open-code
the timekeeping_get_ns() function, but forgot to include
the unit conversion from cycles to nanoseconds, breaking the
function's output, which impacts LTTng.
We expected Linux commit
58bfea9532 "timekeeping: Fix
__ktime_get_fast_ns() regression" to make its way into stable
kernels promptly, but it appears new stable kernel releases were
done before the fix was cherry-picked from the master branch.
We therefore need to bump the version ranges for the work-around
in lttng-modules.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: John Stultz <john.stultz@linaro.org>
Mathieu Desnoyers [Fri, 7 Oct 2016 20:18:54 +0000 (16:18 -0400)]
Version 2.8.2
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 6 Oct 2016 11:45:35 +0000 (07:45 -0400)]
Fix: show warning for broken clock work-around
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 5 Oct 2016 11:20:32 +0000 (07:20 -0400)]
Fix: work-around upstream Linux timekeeping bug
Linux commit
27727df240c7 ("Avoid taking lock in NMI path with
CONFIG_DEBUG_TIMEKEEPING"), changed the logic to open-code
the timekeeping_get_ns() function, but forgot to include
the unit conversion from cycles to nanoseconds, breaking the
function's output, which impacts LTTng.
The following kernel versions are affected: 4.8, 4.7.4+, 4.4.20+,
4.1.32+
We expect that the upstream fix will reach the master and stable
branches timely before the next releases, so we use 4.8.1, 4.7.7,
4.4.24, and 4.1.34 as upper bounds (exclusive).
Fall-back to the non-NMI-safe trace clock for those kernel versions.
We simply discard events from NMI context with a in_nmi() check,
as we did before Linux 3.17.
Link: http://lkml.kernel.org/r/1475636148-26539-1-git-send-email-john.stultz@linaro.org
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 3 Oct 2016 16:06:57 +0000 (12:06 -0400)]
Version 2.8.1
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 1 Sep 2016 22:08:15 +0000 (18:08 -0400)]
Fix: handle large number of pages or subbuffers per buffer
Do no trigger kernel console warnings when we try to allocate too many
pages, or a too large kmalloc area for page array (within a subbuffer),
or a sub-buffer array (within a buffer).
Use vmalloc/vfree for the "pages" local variable used only during
allocation, which is an array of nr_subbuf * nr_pages_per_subbuf
pointers. This ensures we do not limit the overall buffer size due to
kmalloc limitations.
Fixes #1031
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Jonathan Rajotte [Thu, 1 Sep 2016 21:52:09 +0000 (17:52 -0400)]
Fix: unregister cpu hotplug notifier on buffer alloc error
The cpu hotplug notifier needs to be unregistered in the error path of
buffer allocation, else it eventually causes kernel OOPS when the kernel
accesses freed memory of the notifier block.
Fixes #1031
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Jérémie Galarneau [Wed, 31 Aug 2016 04:21:14 +0000 (00:21 -0400)]
Fix: sa_family is of type unsigned short
sa_family is an unsigned short in sockaddr definitions. For instance,
the kernel's unix_getname() function sets addrlen to sizeof(short) as it
only returns the socket's family.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Jérémie Galarneau [Wed, 31 Aug 2016 04:18:29 +0000 (00:18 -0400)]
Fix: check for sizeof sa_family to save sa_family in accept and connect
The check of addrlen >= sizeof(struct sockaddr) is too restrictive
and causes sa_family to not be saved in the case of AF_UNIX sockets
as the addrlen returned by the syscall may be only sizeof(short).
Individual checks per socket family are performed anyhow in the
switch case, making this safe.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Jérémie Galarneau [Mon, 29 Aug 2016 20:02:10 +0000 (16:02 -0400)]
Cleanup: reuse code in accept() and accept4() instrumentation
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Jérémie Galarneau [Mon, 29 Aug 2016 20:02:09 +0000 (16:02 -0400)]
Add x86-64 override for accept4 syscall
This patch adds an instrumentation override for the accept4() syscall
which is almost identical to accept(), except for an additional
"flags" parameter.
A follow-up patch refactors both overrides to minimize code
duplication as is done for the select/pselect6 overrides.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Aug 2016 22:42:10 +0000 (18:42 -0400)]
Fix: use printk_once() for wrapper warning messages
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Aug 2016 21:32:35 +0000 (17:32 -0400)]
Fix: btrfs instrumentation for 4.8 kernel
Note: there are missing events.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Aug 2016 21:13:37 +0000 (17:13 -0400)]
Fix: update mm_vmscan instrumentation for kernel 4.8
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Aug 2016 21:02:09 +0000 (17:02 -0400)]
Fix: napi instrumentation for 4.8 kernels
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Aug 2016 20:59:13 +0000 (16:59 -0400)]
Fix: update block instrumentation to compile on 4.8 kernels
These 2 upstream Linux commits break the block instrumentation in lttng
modules master:
https://github.com/torvalds/linux/commit/
4e1b2d52a80d79296a5d899d73249748dea71a53
https://github.com/torvalds/linux/commit/
288dab8a35a0bde426a09870943c8d3ee3a50dab
The errors are :
lttng-modules/probes/../instrumentation/events/lttng-module/block.h:35:13:
error: ‘REQ_DISCARD’ undeclared (first use in this function)
lttng-modules/probes/../instrumentation/events/lttng-module/block.h:41:14:
error: ‘REQ_SECURE’ undeclared (first use in this function)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 25 Aug 2016 21:39:47 +0000 (17:39 -0400)]
Fix: timer wrapper: support kernels >= 4.8
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 19 Aug 2016 14:58:26 +0000 (10:58 -0400)]
Fix: x86-64 accept instrumentation
The ipv4/ipv6 addr are output parameters.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Fri, 29 Jul 2016 14:52:47 +0000 (10:52 -0400)]
Fix: Add support for 4.6.4-rt8 kernel
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Thu, 28 Jul 2016 16:12:37 +0000 (12:12 -0400)]
Fix: update scsi instrumentation for 4.7+ kernels
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Thu, 28 Jul 2016 16:12:11 +0000 (12:12 -0400)]
Fix: Use fs_initcall instead of rootfs_initcall
The rootfs_initcall for drivers built as modules was only introduced in
kernel 3.14 by commit
b46d0c46ccaa366a5bb8ac709fdf2bcaa76221fd. Use
fs_initcall instead which comes just before and exists in older kernels.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Anders Wallin [Fri, 22 Jul 2016 14:10:47 +0000 (16:10 +0200)]
Fix: Add kernel configuration for lttng clock plugin
Only one lttng clock plugin can be used when building the lttng-modules
in the kernel. To make it possible to use a custom clock plugin it must
be possible to unconfigure the test clock plugin
Signed-off-by: Anders Wallin <wallinux@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Anders Wallin [Fri, 22 Jul 2016 13:56:59 +0000 (15:56 +0200)]
Fix: the clock plugin must be initiated before first use of the clock
When building lttng inside the kernel the clock plugin must be initated
before the rest of the lttng code. Moved the module_init to
rootfs_initcall. The functionality will not change when built as a
module.
Signed-off-by: Anders Wallin <wallinux@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 15 Jul 2016 15:29:33 +0000 (11:29 -0400)]
Fix: tests/Kbuild for older kernels
Older kernels (e.g. 2.6.38.8) don't seem to handle subdirectory in the
same way as recent kernels (e.g. 4.6). As a result, building LTTng
out-of-tree within a kernel modified to have LTTng as a built-in addon
fails with CONFIG_LTTNG=m.
$ make all O=../kernel_builddir
.....
CC [M] lttng/probes/lttng-kprobes.o
CC [M] lttng/probes/lttng-kretprobes.o
LD lttng/tests/built-in.o
CC [M] lttng/tests/probes/lttng-test.o
Assembler messages:
Fatal error: can't create lttng/tests/probes/lttng-test.o: No such
file or directory
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/scripts/Makefile.build:264:
recipe for target 'lttng/tests/probes/lttng-test.o' failed
make[3]: *** [lttng/tests/probes/lttng-test.o] Error 2
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/scripts/Makefile.build:403:
recipe for target 'lttng/tests' failed
make[2]: *** [lttng/tests] Error 2
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/Makefile:946:
recipe for target 'lttng' failed
make[1]: *** [lttng] Error 2
make[1]: Leaving directory
'/media/awallin/sda1/home/awallin/src/lttng-test/kernel_builddir'
Makefile:146: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
$tree ../kernel_builddir/lttng/tests/
../kernel_builddir/lttng/tests/
└── built-in.o
Reported-by: Anders Wallin <anders.wallin@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 15 Jun 2016 18:39:41 +0000 (14:39 -0400)]
Fix: annotate bytecode interpreter for kernel stack validator
With gcc 6.1.1, kernel 4.6, with
CONFIG_STACK_VALIDATION=y, building lttng-modules master
at commit
6c09dd94 gives this warning:
lttng-modules/lttng-filter-interpreter.o: warning: objtool:
lttng_filter_interpret_bytecode()+0x58: sibling call from
callable instruction with changed frame pointer
This object implements a bytecode interpreter using an explicit
jump table.
If we define "INTERPRETER_USE_SWITCH" at the top of the file,
thus using the switch-case fallback implementation, the
warning vanishes.
We use an explicit jump table rather than a switch case whenever
possible for performance reasons.
Unfortunately objtool doesn't know how to validate this type of jump
table. So to avoid the warning we need to add an annotation to tell
objtool to ignore it.
Kernel developers has to annotate __bpf_prog_run() in the kernel for the
same reason.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 20 May 2016 20:14:51 +0000 (16:14 -0400)]
Version 2.8.0
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 20 May 2016 01:32:06 +0000 (21:32 -0400)]
Fix: ring buffer: honor switch parameter type in remote switch
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 20 May 2016 01:31:07 +0000 (21:31 -0400)]
Fix: only flush non-metadata channels
Issue introduced by commit
"Fix: do not generate packet at destroy after stop".
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 20 May 2016 00:30:07 +0000 (20:30 -0400)]
Fix: don't perform extra flush on metadata channel
The metadata channel requires that the LTTng client layer and the ring
buffer keep a notion of the amount of data produced in the channel.
This issue has been introduced recently by commit
"Fix: flush empty packets on snapshot channel".
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 01:24:46 +0000 (21:24 -0400)]
Fix: flush empty packets on snapshot channel
Snapshot operation on a non-stopped stream should use a "final" flush to
ensure empty packets are flushed, so we gather timestamps at the moment
where the snapshot is taken. This is important for streams that have a
low amount of activity.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 01:23:24 +0000 (21:23 -0400)]
Fix: do not generate packet at destroy after stop
In the following scenario:
- create, enable events (kernel),
- start
- ...
- stop (await for data_pending to complete)
- destroy
- rm the trace directory
We would expect that the "rm" operation would not conflict with the
consumer daemon trying to output data into the trace files, since the
"stop" operation ensured that there was no data_pending.
However, the "destroy" operation currently generates an extra packet
after the data_pending check. This causes the consumer daemon to try to
perform trace file rotation concurrently with the trace directory
removal in the scenario above, which triggers errors. The main reason
why this empty packet is generated by "destroy" is to deal with trace
start/stop scenario which would otherwise generate a completely empty
stream.
Therefore, introduce the concept of a "quiescent stream". It is
initialized at false on stream creation (first packet is empty). When
tracing is started, it is set to false (for cases of start/stop/start).
When tracing is stopped, if the stream is not quiescent, perform a
"final" flush (which will generate an empty packet if the current packet
was empty), and set quiescent to true. On "destroy" stream: if the
stream is not quiescent, perform a "final" flush, and set the quiescent
state to true.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 01:16:22 +0000 (21:16 -0400)]
Fix: compat ioctl for flush/get metadata version
Unlike the non-compat version, the compat ioctl lttng ABI code for the
ring buffer flush operation does not invoke
lttng_metadata_output_channel before calling the ring buffer operation.
This could lead to incomplete metadata on 64-bit kernels running with
32-bit lttng userland.
There is also a discrepancy between the non-compat and compat code: the
GET_METADATA_VERSION operation is performed before calling the ring
buffer code. Ensure both non-compat and compat code are alike.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 16 May 2016 20:45:24 +0000 (16:45 -0400)]
Fix: ctf_string() should handle NULL pointers
The regmap instrumentation can send a NULL string (e.g. on ARM32).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 16 May 2016 19:08:02 +0000 (15:08 -0400)]
Fix: portability: no arith on void pointer
Reported by cppcheck.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 11 May 2016 23:35:06 +0000 (19:35 -0400)]
Fix: add missing tests/Kbuild
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 11 May 2016 14:10:17 +0000 (10:10 -0400)]
Test clock override plugin
Fixes: #939
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 11 May 2016 14:38:06 +0000 (10:38 -0400)]
Fix: add modules target to base Makefile
This way running 'make modules' will indeed build the modules
like in the upstream build system.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 11 May 2016 14:37:12 +0000 (10:37 -0400)]
Fix: make clean does not include dot-config
Skip the CONFIG_TRACEPOINT test if dot-config has not been included.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 11 May 2016 02:04:12 +0000 (22:04 -0400)]
Fix: trigger build error if CONFIG_TRACEPOINTS is not set
Fixes: #1015
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 11 May 2016 02:03:23 +0000 (22:03 -0400)]
Documentation: document that CONFIG_MODULES not required when builtin
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Thu, 5 May 2016 20:10:36 +0000 (16:10 -0400)]
Fix: mm_page_alloc_extfrag instrumentation for kernel 3.16.35
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 2 May 2016 16:32:48 +0000 (12:32 -0400)]
Fix: integer endianness metadata generation
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 26 Apr 2016 22:41:04 +0000 (18:41 -0400)]
Fix: endianness of integers received by filter
We need to byteswap integers passed to the filter when they are tagged
as being in an endianness which differs from the architecture
endianness, so the integer comparisons make sense in terms of value
rather than raw bytes for those fields.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 26 Apr 2016 20:03:38 +0000 (16:03 -0400)]
Version 2.8.0-rc2
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Thu, 21 Apr 2016 20:11:04 +0000 (16:11 -0400)]
Fix: writeback probe on RHEL >= 3.10.0-327.10.1
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 20 Apr 2016 21:50:05 +0000 (17:50 -0400)]
Fix: RHEL kernel 3.10.0-327.13.1 compat
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 20 Apr 2016 21:58:33 +0000 (17:58 -0400)]
Fix: ctf_user_integer should not trigger page fault
It is not used by the instrumentation currently, but fix it
nevertheless.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 20 Apr 2016 21:56:45 +0000 (17:56 -0400)]
Fix: lib_ring_buffer_copy_from_user_inatomic error handling
It should treat nonzero return value of
lib_ring_buffer_do_copy_from_user_inatomic() as errors, 0 as success.
It is currently unused by the instrumentation.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 14 Apr 2016 19:29:01 +0000 (15:29 -0400)]
Add comment describing ioctl number duplication
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 5 Apr 2016 19:25:20 +0000 (15:25 -0400)]
Fix: remove unused gfpflags.h from btrfs and compaction instrumentation
Its content is unused, and this file disappears in Linux 4.6-rc.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 5 Apr 2016 13:26:51 +0000 (09:26 -0400)]
Fix: Remove dead code from filter interpreter
Detected by Coverity:
** CID
1353794: Control flow issues (DEADCODE)
/lttng-filter-interpreter.c: 123 in stack_strcmp()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 5 Apr 2016 12:36:44 +0000 (08:36 -0400)]
Fix: x86 kvm mmutrace instrumentation for kernel < 3.6
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 5 Apr 2016 12:09:13 +0000 (08:09 -0400)]
Fix: mm_vmscan instrumentation: remove unused gfpflags.h include
This header disappears in kernel 4.6, but we don't actually use it, so
remove its include.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 5 Apr 2016 12:05:42 +0000 (08:05 -0400)]
Fix: use of uninitialized ret value in lttng_abi_create_event
Fixes the following compiler warning:
/home/jenkins/workspace/lttng-modules_VERSION_param-build/arch/x86-32/src/lttng-modules/lttng-abi.c: In function ‘lttng_abi_create_event’:
/home/jenkins/workspace/lttng-modules_VERSION_param-build/arch/x86-32/src/lttng-modules/lttng-abi.c:987:16: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int event_fd, ret;
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 4 Apr 2016 19:57:24 +0000 (15:57 -0400)]
Fix: kmem instrumentation: remove unused gfpflags.h include
This header disappears in kernel 4.6, but we don't actually use it, so
remove its include.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 4 Apr 2016 19:55:28 +0000 (15:55 -0400)]
Fix: 4.6 kernel: use in_compat_syscall
in_compat_sycall appears in kernel 4.6. Use it instead of
is_compat_task(), but use is_compat_task() as fallback.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 4 Apr 2016 18:39:16 +0000 (14:39 -0400)]
Fix: use BUG_ON instead of accessing array subscript above array bounds
Building lttng-modules lttng-filter-interpreter.c on a 4.6-rc kernel
triggers the following gcc warning:
In file included from /home/compudj/git/lttng-modules/lttng-filter-interpreter.c:25:0:
/home/compudj/git/lttng-modules/lttng-filter-interpreter.c: In function ‘lttng_filter_interpret_bytecode’:
/home/compudj/git/lttng-modules/lttng-filter.h:144:14: warning: array subscript is above array bounds [-Warray-bounds]
&(stack)->e[top]; \
^
/home/compudj/git/lttng-modules/lttng-filter-interpreter.c:714:4: note: in expansion of macro ‘estack_ax’
estack_ax(stack, top)->u.s.str = insn->data;
^
/home/compudj/git/lttng-modules/lttng-filter.h:144:14: warning: array subscript is above array bounds [-Warray-bounds]
&(stack)->e[top]; \
^
/home/compudj/git/lttng-modules/lttng-filter-interpreter.c:715:4: note: in expansion of macro ‘estack_ax’
estack_ax(stack, top)->u.s.seq_len = UINT_MAX;
This is because the bound checking is performed in a prior validation
phase (which the compiler does not know about), and we only
WARN_ON_ONCE() if the interpreter sees values that don't fit in array
range.
Use BUG_ON() in the interpreter instead, which ensures we never, ever
reach the out-of-bound condition from a compiler perspective.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 29 Mar 2016 23:32:19 +0000 (19:32 -0400)]
Fix: Add granularity to RHEL kernel version checks
Our RHEL kernel version macros were based on the major and minor version
of the distribution version like "7.2" instead of the full kernel version
like "327.4.4". This prevented us from adding compatibility changes with
sufficient granularity.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 18 Mar 2016 22:21:44 +0000 (18:21 -0400)]
Version 2.8.0-rc1
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 18 Mar 2016 21:32:21 +0000 (17:32 -0400)]
Bump minor tracer ABI version
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 16 Mar 2016 15:23:43 +0000 (11:23 -0400)]
Fix: build against out-of-tree kernel build
Fix following system header include modifications.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 16:24:12 +0000 (12:24 -0400)]
probes/Kbuild: remove upper level header path
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 16:12:46 +0000 (12:12 -0400)]
Move leftover relative include paths to system paths
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 16:02:27 +0000 (12:02 -0400)]
syscall instrumentation: use system headers
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:56:24 +0000 (11:56 -0400)]
tracepoint event instrumentation: use system headers
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:45:00 +0000 (11:45 -0400)]
Use system include path in wrappers
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:41:09 +0000 (11:41 -0400)]
libs: use system include paths
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:35:47 +0000 (11:35 -0400)]
Use system header paths in core implementation files
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:27:52 +0000 (11:27 -0400)]
Use system include paths in root directory headers
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:16:43 +0000 (11:16 -0400)]
Use system include paths in probes
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:03:08 +0000 (11:03 -0400)]
Update gitignore
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:02:33 +0000 (11:02 -0400)]
Use system include paths in lttng-types.h
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 15:01:32 +0000 (11:01 -0400)]
Use system include paths in lttng-tracepoint-event-impl.h
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 14:59:47 +0000 (10:59 -0400)]
Use system include path in probes/define_trace.h
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 14:58:45 +0000 (10:58 -0400)]
Use system include paths in probes/lttng-tracepoint-event-impl.h
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 14:57:39 +0000 (10:57 -0400)]
Rename probes/lttng-events.h to probes/lttng-tracepoint-event-impl.h
Ensure we don't have a duplicated header file name in the tree.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 15 Mar 2016 14:45:44 +0000 (10:45 -0400)]
Add makefile directory to include path
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 10 Mar 2016 01:21:42 +0000 (20:21 -0500)]
Fix: event ctx get size should be after chan ctx
Match the record functions, and the CTF spec. This has no impact
currently because event contexts are not implemented.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 8 Mar 2016 16:34:01 +0000 (11:34 -0500)]
Fix: filter interpreter with userspace strings
The filter interpreter is populating the "str" register field, but the
string comparison functions expect to use the "user_str" register field
whenever it deals with a userspace string ("user" flag set to 1).
Since we are using __copy_from_user_inatomic(), this is typically
bailing out on anything that requires to read the string (except the '*'
wildcard).
Fixes #943
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 8 Mar 2016 15:49:52 +0000 (10:49 -0500)]
Fix: rename kvm x86 TRACE_SYSTEM to avoid name clash
The lttng-probe-kvm and lttng-probe-kvm-x86 have the same TRACE_SYSTEM
string. Because of that, both modules can't be loaded at the same time.
The second module fails to load silently. Rename the TRACE_SYSTEM of
lttng-probe-kvm-x86 to avoid the clash.
We need to use the LTTNG_TRACEPOINT_EVENT_MAP to perform this
namespacing while still hooking onto the kernel tracepoints.
Fixes #895
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 8 Mar 2016 15:30:33 +0000 (10:30 -0500)]
Fix: format address fields as hexadecimal
Fixes #947
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 7 Mar 2016 23:24:25 +0000 (18:24 -0500)]
PowerPC-64 ABIv1: add build error if KALLSYMS_ALL is missing
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 25 Feb 2016 15:46:54 +0000 (10:46 -0500)]
Fix: system call instrumentation overrides
* All architectures
- For mmap, print the "ret" value as an hexadecimal integer (rather than
base 10), which better suits a pointer.
- Add missing "clone" override define, which ensures the clone
system call override is used rather than leaving it as an
"unknown" system call.
* ARM32
- Add missing output return values to arm_fadvise64_64,
sync_file_range2.
- Handle the 64-bit parameters of both arm_fadvise64_64 and
sync_file_range2 correctly on arm32, on big and little endian builds.
- Move the mmap2 system call instrumentation from "pointers" to
"integers" override header, and add the missing return value
(sc_exit).
* PPC32
- Add sync_file_range2 system call instrumentation. Handle the
64-bit parameters on big and little endian builds.
- Move the mmap2 system call instrumentation from "pointers" to
"integers" override header, and add the missing return value
(sc_exit).
* PPC64 compat
- Include compatibility (ppc32) header in ppc64 build to trace compat
system calls on PPC64 big endian.
* x86-32
- Add mmap2 system call instrumentation override.
- Add sync_file_range instrumentation override, correctly combining
the low/high parts of offset and nbytes into 64-bit fields.
Tested-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 4 Mar 2016 01:00:50 +0000 (20:00 -0500)]
Fix: page_alloc wrapper incorrect parenthesis
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 22 Feb 2016 21:57:37 +0000 (16:57 -0500)]
Fix: system call tracing for arm-64 compat !CONFIG_UID16
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 20 Feb 2016 00:00:20 +0000 (19:00 -0500)]
Fix: add struct user_msghdr forward declaration for older kernels
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Fri, 12 Feb 2016 20:26:23 +0000 (15:26 -0500)]
Cleanup: Remove unused lttng-types module
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 12 Feb 2016 20:11:04 +0000 (15:11 -0500)]
Fix: add missing versions and init call for page_alloc wrapper
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Wed, 10 Feb 2016 16:08:14 +0000 (11:08 -0500)]
Fix: Define lttng-tracer metadata only once
Fixes sysfs trying to create the lttng-tracer module version node
multiple times.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Tue, 9 Feb 2016 20:16:56 +0000 (15:16 -0500)]
Fix: Add CONFIG_LTTNG to modules_install target
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Michael Jeanson [Mon, 8 Feb 2016 21:33:17 +0000 (16:33 -0500)]
Fix: Use kbuild env instead of a custom var KERNELDIR
We currently use the custom variables KERNELDIR and LTTNG_KERNELDIR
to pass the kernel source tree directory to helper scripts. We should
instead use the built-in Kbuild variable CURDIR which is available in
all sub makefiles and always points to the kernel sources.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 8 Feb 2016 21:58:32 +0000 (16:58 -0500)]
Update clock offset comment
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 8 Feb 2016 21:52:05 +0000 (16:52 -0500)]
clock offset: print negative value in metadata
In the upcoming 2.8, we can print the negative value of clock offset in
the metadata, and expect users to update their viewers to correct any
bug that could prevent them from handling those negative values.
This happens only in cases where the system sets CLOCK_REALTIME to 0
after boot, thus leading to a negative clock offset value between
realtime and monotonic clocks.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.045103 seconds and 4 git commands to generate.