- make: Entering directory `/usr/src/linux-headers-4.4.0-142-generic'
- CC [M] /home/user/kernrk/kernrk.o
- /home/user/kernrk/kernrk.c: In function ‘entry_handler’:
- /home/user/kernrk/kernrk.c:22:21: warning: unused variable ‘data’ [-Wunused-variable]
- struct my_data *data = (struct my_data *)ri->data;
- ^
- /home/user/kernrk/kernrk.c: In function ‘ret_handler’:
- /home/user/kernrk/kernrk.c:36:16: error: ‘new_nread’ undeclared (first use in this function)
- regs->ax = new_nread
- ^
- /home/user/kernrk/kernrk.c:36:16: note: each undeclared identifier is reported only once for each function it appears in
- /home/user/kernrk/kernrk.c:37:5: error: expected ‘;’ before ‘long’
- long bpos = 0, new_nread = nread;
- ^
- /home/user/kernrk/kernrk.c:38:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
- char *kbuf;
- ^
- /home/user/kernrk/kernrk.c:41:9: error: ‘nread’ undeclared (first use in this function)
- if (nread <= 0 || !data->dirent)
- ^
- /home/user/kernrk/kernrk.c:53:12: error: ‘bpos’ undeclared (first use in this function)
- while (bpos < new_nread) {
- ^
- /home/user/kernrk/kernrk.c:67:5: error: implicit declaration of function ‘regs_set_return_value’ [-Werror=implicit-function-declaration]
- regs_set_return_value(regs, new_nread); // update return value to new_nread
- ^
- /home/user/kernrk/kernrk.c:72:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
- static struct kretprobe my_kretprobe = {
- ^
- /home/user/kernrk/kernrk.c:80:19: error: invalid storage class for function ‘my_init’
- static int __init my_init(void) {
- ^
- /home/user/kernrk/kernrk.c:90:20: error: invalid storage class for function ‘my_exit’
- static void __exit my_exit(void) {
- ^
- In file included from /home/user/kernrk/kernrk.c:1:0:
- include/linux/module.h:128:42: error: invalid storage class for function ‘__inittest’
- static inline initcall_t __maybe_unused __inittest(void) \
- ^
- /home/user/kernrk/kernrk.c:95:1: note: in expansion of macro ‘module_init’
- module_init(my_init);
- ^
- /home/user/kernrk/kernrk.c:95:1: warning: ‘alias’ attribute ignored [-Wattributes]
- In file included from /home/user/kernrk/kernrk.c:1:0:
- include/linux/module.h:134:42: error: invalid storage class for function ‘__exittest’
- static inline exitcall_t __maybe_unused __exittest(void) \
- ^
- /home/user/kernrk/kernrk.c:96:1: note: in expansion of macro ‘module_exit’
- module_exit(my_exit);
- ^
- include/linux/module.h:134:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
- static inline exitcall_t __maybe_unused __exittest(void) \
- ^
- /home/user/kernrk/kernrk.c:96:1: note: in expansion of macro ‘module_exit’
- module_exit(my_exit);
- ^
- /home/user/kernrk/kernrk.c:96:1: warning: ‘alias’ attribute ignored [-Wattributes]
- /home/user/kernrk/kernrk.c:96:1: error: expected declaration or statement at end of input
- /home/user/kernrk/kernrk.c: At top level:
- /home/user/kernrk/kernrk.c:34:12: warning: ‘ret_handler’ defined but not used [-Wunused-function]
- static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs) {
- ^