4,441
社区成员
发帖
与我相关
我的任务
分享
#ifdef MODULE
#define THIS_MODULE (&__this_module)
#else /* !MODULE */
#define THIS_MODULE ((struct module *)0)
#endif
/* This is where the real work happens */
SYSCALL_DEFINE3(init_module, void __user *, umod,
unsigned long, len, const char __user *, uargs)
{
struct module *mod;
int ret = 0;
/* Must have permission */
if (!capable(CAP_SYS_MODULE) || modules_disabled)
return -EPERM;
/* Only one module load at a time, please */
if (mutex_lock_interruptible(&module_mutex) != 0)
return -EINTR;
/* Do all the hard work */
mod = load_module(umod, len, uargs);
修改内核的话你可以试试nlfd = netlink_kernel_create(&init_net, NL_IMP2, 0, kernel_receive, NULL, 0);可能会crash