Re: [BUG] Incorrect ordering of klp and ftrace module notifier callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Jan 2016, Jessica Yu wrote:

> So it doesn't look like a simple priority tweak will work, since we want a
> ftrace->klp->klp->ftrace ordering from module load->module unload. Perhaps we
> can split the ftrace and klp notifiers into separate coming and going handlers
> with the appropriate priorities set to enforce correct ordering (not terribly
> pretty, but it works). Is there a better solution?

Given the facts that:

- we want the ordering ftrace -> klp for load and klp -> ftrace for 
  unload

- we already do have separate klp_module_notify_coming() and 
  klp_module_notify_going(), and klp_module_notify() is just a stub that 
  decides which one to call

I'd suggest we keep just a single ftrace_module_notify() (with INT_MIN+1, 
priority), and then introduce separate notifiers

- klp_module_notify_going() with INT_MIN+2, that triggers action iff 
  action == MODULE_STATE_GOING

- klp_module_notify_going() with INT_MIN, that triggers action only iff 
  action == MODULE_STATE_COMING

Thanks,

-- 
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux