Overriding functionality with modules in Linux kernel

后端 未结 13 2023
鱼传尺愫
鱼传尺愫 2020-12-24 13:59

Without getting into the details of why, I\'m looking for a clean (as possible) way to replace kernel functions and system calls from a loadable module. My initial

13条回答
  •  Happy的楠姐
    2020-12-24 14:43

    Most filesystem work is done in modules already, presuming that the filesystem code was built as a module, rather than built into the kernel (which means the 'real' answer depends on kernel build options).

    Assuming that the bits you want to log are all filesystem-related, and that those filesystem routines are built as modules, you should just be able to alter the filesystem module(s) you're interested in, and reload them.

    If those assumptions aren't true, or can't be made true, then things clearly get trickier, and I really couldn't point you much further.

提交回复
热议问题