ABI with support for compat 32/64 bits
authorJulien Desfossez <jdesfossez@efficios.com>
Tue, 2 Oct 2012 19:03:26 +0000 (15:03 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 9 Oct 2012 18:38:11 +0000 (14:38 -0400)
commit4dbc372b53ef1ac713497164e7a8b92100db7ae2
tree392959fe68cf65a2e551156f137bcbdcb7e1677b
parente316aad5fbbe3782872083cb68dfdd58bccea811
ABI with support for compat 32/64 bits

The current ABI does not work for compat 32/64 bits. This patch moves
the current ABI as old-abi and provides a new ABI in which all the
structures exchanged between user and kernel-space are packed. Also this
new ABI moves the "int overwrite" member of the struct
lttng_kernel_channel to remove the alignment added by the compiler.

A patch for lttng-modules has been developed in parallel to this one to
support the new ABI. These 2 patches have been tested in all possible
configurations (applied or not) on 64-bit and 32-bit kernels (with
CONFIG_COMPAT) and a user-space in 32 and 64-bit.

Here are the results of the tests :
k 64 compat     | u 32 compat     | OK
k 64 compat     | u 64 compat     | OK
k 64 compat     | u 32 non-compat | KO
k 64 compat     | u 64 non-compat | OK

k 64 non-compat | u 64 compat     | OK
k 64 non-compat | u 32 compat     | KO
k 64 non-compat | u 64 non-compat | OK
k 64 non-compat | u 32 non-compat | KO

k 32 compat     | u compat        | OK
k 32 compat     | u non-compat    | OK

k 32 non-compat | u compat        | OK
k 32 non-compat | u non-compat    | OK

The results are as expected :
- on 32-bit user-space and kernel, every configuration works.
- on 64-bit user-space and kernel, every configuration works.
- with 32-bit user-space on a 64-bit kernel the only configuration
  where it works is when the compat patch is applied everywhere.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/trace-kernel.h
src/common/kernel-ctl/kernel-ctl.c
src/common/kernel-ctl/kernel-ctl.h
src/common/kernel-ctl/kernel-ioctl.h
src/common/lttng-kernel-old.h [new file with mode: 0644]
src/common/lttng-kernel.h
This page took 0.025691 seconds and 4 git commands to generate.