<div dir="ltr">Michael,<div><br></div><div>Thank you for your swift response. However, for the first part, I'm not sure what it means by "using" the full kernel source. How would I use it with lttng-modules?</div><div><br></div><div>As for the quick hack part, I grabbed the kernel source and copied the mount.h onto the folder you mentioned, and it did not help. I don't expect lttng to automatically find that file and use it; also there are no other header files in the package build directory. Could you kindly give us more instructions?</div><div><br></div><div>Thanks,</div><div>Mohammad</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 6, 2021 at 11:02 AM Michael Jeanson <<a href="mailto:mjeanson@efficios.com">mjeanson@efficios.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2021-01-06 10 h 50, Mohammad Kavousi via lttng-dev wrote:<br>
> Dear LTTng developers,<br>
> <br>
> Our group at Northwestern has been using your amazing tool for the <br>
> purpose of provenance tracking on Linux-based systems and we are very <br>
> fond of the performance and accuracy it provides.<br>
> <br>
> Our analysis shows that mnt_ns context is supported in the 2.12 version <br>
> of LTTng. However, though, adding the mnt_ns context using <br>
> the add-context command produces this error:<br>
> <br>
> Error: mnt_ns: Context unavailable on this kernel<br>
> <br>
> We have tried adding the context to the more recent version of the <br>
> kernel (5.8) on Ubuntu 20.04, as well as older kernel versions such as <br>
> the 4.4 version on Ubuntu 16.04. However, we always receive the above <br>
> error trying to add the mnt_ns context.<br>
> <br>
> We could not find which kernel versions are supported for adding this <br>
> context, or whether they need to be built with special flags. I would <br>
> appreciate your guidance on resolving this issue.<br>
> <br>
> <br>
> Thank you,<br>
> Mohammad<br>
<br>
Hi,<br>
<br>
Unfortunately the definition of 'struct mnt_namespace' is in a private <br>
kernel header (fs/mount.h) unlike other namespaces. Private headers are <br>
not included in the kernel headers package of distributions like Ubuntu, <br>
to build support for this namespace context in lttng-modules you need to <br>
use the full kernel source tree.<br>
<br>
Or as a quick hack, you could copy 'fs/mount.h' from the original source <br>
tree to your kernel headers package build directory, which on Ubuntu is <br>
usually '/lib/modules/$(uname -r)/build'.<br>
<br>
Hoe this helps,<br>
<br>
Michael<br>
</blockquote></div>