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-tools 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.