Fix: split UST per UID/PID default values

The default per UID subbuffer size are changed from 4096 bytes to 131072
bytes (128k). The rest have the same values as before.

Some DEFAULT_CHANNEL_* macros are prefixed with an underscore making
sure they are not used elsewhere in the code base and only domain
specific values are used.

Fixes #524

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Update version to v2.2.0-rc2

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: print an error if tracefile-size is missing with count

The command will also stop and inform the user that an option is
missing.

Reported-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: check channel subbuf size against page size

Don't validate channel subbuffer size against the default values but
rather against the lower bound being the page size taken at runtime.

Reported-by: Tan Dung Le Tran <tan.dung.le.tran@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add --with-lttng-ust-prefix config option.

Signed-off-by: Stefan Seefeld <stefan@codesourcery.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add --version command-line option to lttng.

Signed-off-by: Stefan Seefeld <stefan@codesourcery.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Remove unused utils.h header

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Cleanup and move gen-ust-events testapp under utils

This will improve the maintainability and stop the copying madness going
on in each test needing a UST sample application.

Application under test should go in tests/utils/testapp/<testapp_name>/.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Replace usage of gen-ust-events testapp in streaming tests

Use the gen-ust-events binary found under
tests/utils/testapp/gen-ust-events/.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Replace usage of gen-ust-events testapp in ust before-after test

Use the gen-ust-events binary found under
tests/utils/testapp/gen-ust-events/.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Replace usage of gen-ust-events testapp in ust buffers-uid test

Use the gen-ust-events binary found under
tests/utils/testapp/gen-ust-events/.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Replace usage of gen-ust-events testapp in ust nprocesses test

Use the gen-ust-events binary found under
tests/utils/testapp/gen-ust-events/.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Replace usage of gen-ust-events testapp in ust metadata-flush test

Use the gen-ust-events binary found under
tests/utils/testapp/gen-ust-events/.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: possible out of bounds write in enable-event

In loglevel_str_to_value: Out-of-bounds write to a buffer (CWE-119).

Issue 1019927 of coverity scan.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: out of bounds access to buffer uuid

In ask_channel_creation: Out-of-bounds access to a buffer (CWE-119)

Issue 1019926 of coverity scan.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: out of bounds access of kernel channel padding

The padding of the old ABI is bigger than the new one so we use the size
of the new padding size for the memcpy since it will always be smaller.

In kernctl_create_channel: Out-of-bounds access to a buffer (CWE-119).
In kernctl_open_metadata: Out-of-bounds access to a buffer (CWE-119).

Issue 1019925 and 1019924 of coverity scan.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: data leak in error path of cmd_register_consumer()

Issue 1019923 of coverity scan.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: kernel metadata data leak in error path

Issue 1019922 of coverity scan.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: memory leak in sessiond command in error path

Issue 1019921 of coverity scan.

More leaks were found of the same type also.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: memory leak in error path in UST registry

Issue 1019919 and 1019918 of coverity scan.

Signed-off-by: David Goulet <dgoulet@efficios.com>