Thanks Michael, the patch is working

[  157.606699]  SK DEBUG look up symbol .kallsyms_lookup_name
[  157.613527]  SK DEBUG look up symbol get_pfnblock_flags_mask
[  157.644191] LTTng: Loaded modules v2.13.8 (Nordicité) - devtool-base-1-g1011df74-dirty

Regards,
Shahank 

On Mon, Mar 27, 2023 at 11:59 PM Michael Jeanson <mjeanson@efficios.com> wrote:
On 2023-03-27 11:52, yashvardhan kukreti wrote:
>   62 #ifdef LTTNG_CONFIG_PPC64_ELF_ABI_V2
>   63         /* Substract 4 bytes to get what we originally want */
>   64         addr = (unsigned long)(((char *)probe.addr) - 4);
>   65 #elif defined*(LTTNG_*CONFIG_PPC64_ELF_ABI_V1)   << incorrect MACRO to
> used in gerrit review. this is the correct one.
>   66         /*
>   67          * Build a function descriptor from the address of
>
> /lttng-module-2.13.8/src/wrapper/kallsyms.c:72:32: error: invalid use of
> undefined type 'struct func_desc'
> |    72 |  kallsyms_lookup_name_func_desc.addr = (unsigned long)probe.addr;
> /lttng-module-2.13.8/src/wrapper/kallsyms.c:73:32: error: invalid use of
> undefined type 'struct func_desc'
> |    73 |  kallsyms_lookup_name_func_desc.toc = ((struct func_desc *)
> &sprint_symbol)->toc;
>
> you either want to use func_descr_t
> https://elixir.bootlin.com/linux/v5.15.104/source/arch/powerpc/include/asm/types.h#L30 <https://elixir.bootlin.com/linux/v5.15.104/source/arch/powerpc/include/asm/types.h#L30>
> or
> struct ppc64_opd_entry
> https://elixir.bootlin.com/linux/v5.17.15/source/arch/powerpc/include/uapi/asm/elf.h#L293 <https://elixir.bootlin.com/linux/v5.17.15/source/arch/powerpc/include/uapi/asm/elf.h#L293>
>
> both of which are discontinued from 5.18


Hi,

I updated the patch at https://review.lttng.org/c/lttng-modules/+/9113 to
support kernels older than v5.18. It's only build tested on v5.17 and v5.18.

Michael