Untitled

By Gamboge Hamerkop, 6 Months ago, written in Plain Text, viewed 58 times.
URL http://pb.stoleyour.com/view/54a5366c 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:36:16: error: ‘new_nread’ undeclared (first use in this function)
  9.      regs->ax = new_nread
  10.                 ^
  11. /home/user/kernrk/kernrk.c:36:16: note: each undeclared identifier is reported only once for each function it appears in
  12. /home/user/kernrk/kernrk.c:37:5: error: expected ‘;’ before ‘long’
  13.      long bpos = 0, new_nread = nread;
  14.      ^
  15. /home/user/kernrk/kernrk.c:38:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  16.      char *kbuf;
  17.      ^
  18. /home/user/kernrk/kernrk.c:41:9: error: ‘nread’ undeclared (first use in this function)
  19.      if (nread <= 0 || !data->dirent)
  20.          ^
  21. /home/user/kernrk/kernrk.c:53:12: error: ‘bpos’ undeclared (first use in this function)
  22.      while (bpos < new_nread) {
  23.             ^
  24. /home/user/kernrk/kernrk.c:67:5: error: implicit declaration of function ‘regs_set_return_value’ [-Werror=implicit-function-declaration]
  25.      regs_set_return_value(regs, new_nread); // update return value to new_nread
  26.      ^
  27. /home/user/kernrk/kernrk.c:72:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  28.  static struct kretprobe my_kretprobe = {
  29.  ^
  30. /home/user/kernrk/kernrk.c:80:19: error: invalid storage class for function ‘my_init’
  31.  static int __init my_init(void) {
  32.                    ^
  33. /home/user/kernrk/kernrk.c:90:20: error: invalid storage class for function ‘my_exit’
  34.  static void __exit my_exit(void) {
  35.                     ^
  36. In file included from /home/user/kernrk/kernrk.c:1:0:
  37. include/linux/module.h:128:42: error: invalid storage class for function ‘__inittest’
  38.   static inline initcall_t __maybe_unused __inittest(void)  \
  39.                                           ^
  40. /home/user/kernrk/kernrk.c:95:1: note: in expansion of macro ‘module_init’
  41.  module_init(my_init);
  42.  ^
  43. /home/user/kernrk/kernrk.c:95:1: warning: ‘alias’ attribute ignored [-Wattributes]
  44. In file included from /home/user/kernrk/kernrk.c:1:0:
  45. include/linux/module.h:134:42: error: invalid storage class for function ‘__exittest’
  46.   static inline exitcall_t __maybe_unused __exittest(void)  \
  47.                                           ^
  48. /home/user/kernrk/kernrk.c:96:1: note: in expansion of macro ‘module_exit’
  49.  module_exit(my_exit);
  50.  ^
  51. include/linux/module.h:134:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  52.   static inline exitcall_t __maybe_unused __exittest(void)  \
  53.   ^
  54. /home/user/kernrk/kernrk.c:96:1: note: in expansion of macro ‘module_exit’
  55.  module_exit(my_exit);
  56.  ^
  57. /home/user/kernrk/kernrk.c:96:1: warning: ‘alias’ attribute ignored [-Wattributes]
  58. /home/user/kernrk/kernrk.c:96:1: error: expected declaration or statement at end of input
  59. /home/user/kernrk/kernrk.c: At top level:
  60. /home/user/kernrk/kernrk.c:34:12: warning: ‘ret_handler’ defined but not used [-Wunused-function]
  61.  static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs) {
  62.             ^
  63.  

Reply to "Untitled"

Here you can reply to the paste above