Modules creating PLT Entries

Derrick McKee derrick.mckee at gmail.com
Mon Dec 21 10:26:07 EST 2020


Hi,

I am working on a project that is attempting to make two regions for
module allocation, and embed an identifier in the address of modules
allocated in the new region.  However, when I try to load a module in
the new area, I hit the warning on arch/arm64/kernel/module-plts.c:105
because I guess the loader is creating a PLT entry, which triggers the
warning and loading stops.  The changes I have made to
arch/arm64/include/asm/memory.h are the following:

#if IS_ENABLED(CONFIG_PAC_MTE_COMPART)
#define PMC_MODULES_START   (BPF_JIT_REGION_END + MODULES_VSIZE)
#define PMC_MODULES_END     (PMC_MODULES_START + MODULES_VSIZE)
#define MODULES_VADDR  (PMC_MODULES_END)
#else
#define MODULES_VADDR  (BPF_JIT_REGION_END)
#endif

The definition of PMC_MODULES_START adds MODULES_VSIZE to make room
for the identifier.  Reading the help for CONFIG_ARM64_MODULE_PLTS, it
seems like having PLT entries are expected and supported, but the
warning seems to indicate that they aren't.  Any suggestions?  Thanks



More information about the linux-arm-kernel mailing list