Untitled

By Mustard Owl, 6 Months ago, written in Plain Text, viewed 54 times.
URL http://pb.stoleyour.com/view/47a4fb11 Embed
Download Paste or View RawExpand paste to full width of browser
  1. make: Entering directory `/usr/src/linux-headers-4.4.0-142-generic'
  2.   CC [M]  /home/user/kernrk/kernrk.o
  3. /home/user/kernrk/kernrk.c: In function ‘entry_handler’:
  4. /home/user/kernrk/kernrk.c:22:21: warning: unused variable ‘data’ [-Wunused-variable]
  5.      struct my_data *data = (struct my_data *)ri->data;
  6.                      ^
  7. /home/user/kernrk/kernrk.c: In function ‘ret_handler’:
  8. /home/user/kernrk/kernrk.c:67:5: error: implicit declaration of function ‘regs_set_return_value’ [-Werror=implicit-function-declaration]
  9.      regs_set_return_value(regs, new_nread); // update return value to new_nread
  10.      ^
  11. /home/user/kernrk/kernrk.c:72:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  12.  static struct kretprobe my_kretprobe = {
  13.  ^
  14. /home/user/kernrk/kernrk.c:80:19: error: invalid storage class for function ‘my_init’
  15.  static int __init my_init(void) {
  16.                    ^
  17. /home/user/kernrk/kernrk.c:90:20: error: invalid storage class for function ‘my_exit’
  18.  static void __exit my_exit(void) {
  19.                     ^
  20. In file included from /home/user/kernrk/kernrk.c:1:0:
  21. include/linux/module.h:128:42: error: invalid storage class for function ‘__inittest’
  22.   static inline initcall_t __maybe_unused __inittest(void)  \
  23.                                           ^
  24. /home/user/kernrk/kernrk.c:95:1: note: in expansion of macro ‘module_init’
  25.  module_init(my_init);
  26.  ^
  27. /home/user/kernrk/kernrk.c:95:1: warning: ‘alias’ attribute ignored [-Wattributes]
  28. In file included from /home/user/kernrk/kernrk.c:1:0:
  29. include/linux/module.h:134:42: error: invalid storage class for function ‘__exittest’
  30.   static inline exitcall_t __maybe_unused __exittest(void)  \
  31.                                           ^
  32. /home/user/kernrk/kernrk.c:96:1: note: in expansion of macro ‘module_exit’
  33.  module_exit(my_exit);
  34.  ^
  35. include/linux/module.h:134:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  36.   static inline exitcall_t __maybe_unused __exittest(void)  \
  37.   ^
  38. /home/user/kernrk/kernrk.c:96:1: note: in expansion of macro ‘module_exit’
  39.  module_exit(my_exit);
  40.  ^
  41. /home/user/kernrk/kernrk.c:96:1: warning: ‘alias’ attribute ignored [-Wattributes]
  42. /home/user/kernrk/kernrk.c:96:1: error: expected declaration or statement at end of input
  43. /home/user/kernrk/kernrk.c: At top level:
  44. /home/user/kernrk/kernrk.c:34:12: warning: ‘ret_handler’ defined but not used [-Wunused-function]
  45.  static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs) {
  46.             ^
  47. cc1: some warnings being treated as errors
  48. make[1]: *** [/home/user/kernrk/kernrk.o] Error 1
  49. make: *** [_module_/home/user/kernrk] Error 2
  50.  

Reply to "Untitled"

Here you can reply to the paste above