livepatch-callbacks-mod.c 805 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright (C) 2017 Joe Lawrence <joe.lawrence@redhat.com>
  4. */
  5. /*
  6. * livepatch-callbacks-mod.c - (un)patching callbacks demo support module
  7. *
  8. *
  9. * Purpose
  10. * -------
  11. *
  12. * Simple module to demonstrate livepatch (un)patching callbacks.
  13. *
  14. *
  15. * Usage
  16. * -----
  17. *
  18. * This module is not intended to be standalone. See the "Usage"
  19. * section of livepatch-callbacks-demo.c.
  20. */
  21. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  22. #include <linux/module.h>
  23. #include <linux/kernel.h>
  24. static int livepatch_callbacks_mod_init(void)
  25. {
  26. pr_info("%s\n", __func__);
  27. return 0;
  28. }
  29. static void livepatch_callbacks_mod_exit(void)
  30. {
  31. pr_info("%s\n", __func__);
  32. }
  33. module_init(livepatch_callbacks_mod_init);
  34. module_exit(livepatch_callbacks_mod_exit);
  35. MODULE_LICENSE("GPL");