[DTrace-devel] [PATCH v2] btf: support compilation in older environments

Kris Van Hees kris.van.hees at oracle.com
Fri Dec 1 04:35:46 UTC 2023


On Thu, Nov 30, 2023 at 04:11:26PM -0500, Eugene Loh via DTrace-devel wrote:
> Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
> but I'm not familiar with this stuff and so maybe Nick should take a look.
> 
> On 11/29/23 16:07, Kris Van Hees via DTrace-devel wrote:
> > diff --git a/include/linux/btf.h b/include/linux/btf.h
> > +#ifndef _UAPI__LINUX_BTF_H__
> > +#define _UAPI__LINUX_BTF_H__
> 
> I am curious about this, though.  I guess one does want the uapi version of
> the file, but should the macro be __LINUX_BTF_H__ ?

No, because we are using the include file from the kernel as the exposed and
published API.  We deliberately do not modify that file (and bpf.h) in any way.

As a side effect this also ensures that if somehow someone makes a mistake and
we end up later including the installed version this define will correctly
bypass its content.



More information about the DTrace-devel mailing list