../drivers/ioctlhook/ioctlhook.c:57:5: error: use of undeclared identifier 'mm_segment_t'
mm_segment_t old_fs;
^
../drivers/ioctlhook/ioctlhook.c:65:5: error: use of undeclared identifier 'old_fs'
old_fs = get_fs();
^
../drivers/ioctlhook/ioctlhook.c:65:14: error: call to undeclared function 'get_fs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
old_fs = get_fs();
^
../drivers/ioctlhook/ioctlhook.c:65:14: note: did you mean 'sget_fc'?
../include/linux/fs.h:2652:21: note: 'sget_fc' declared here
struct super_block *sget_fc(struct fs_context *fc,
^
../drivers/ioctlhook/ioctlhook.c:66:5: error: call to undeclared function 'set_fs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
set_fs(get_ds());
^
../drivers/ioctlhook/ioctlhook.c:66:12: error: call to undeclared function 'get_ds'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
set_fs(get_ds());
^
../drivers/ioctlhook/ioctlhook.c:71:16: error: use of undeclared identifier 'old_fs'
set_fs(old_fs);
^
../drivers/ioctlhook/ioctlhook.c:80:16: error: use of undeclared identifier 'old_fs'
set_fs(old_fs);
^
../drivers/ioctlhook/ioctlhook.c:106:24: error: use of undeclared identifier 'old_fs'
set_fs(old_fs);
^
../drivers/ioctlhook/ioctlhook.c:166:38: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]page_size_t: %lx\n", page_size_t);
~~~ ^~~~~~~~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:167:39: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]page_level_c: %lx\n", page_level_c);
~~~ ^~~~~~~~~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:168:39: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]page_shift_t: %lx\n", page_shift_t);
~~~ ^~~~~~~~~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:169:35: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]pgd_k_pa: %lx\n", pgd_k_pa);
~~~ ^~~~~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:170:32: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]pgd_k: %lx\n", pgd_k);
~~~ ^~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:198:18: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
uint64_t pxd_desc = *((uint64_t *)pxd_entry_va);
^
14 errors generated.
../drivers/ioctlhook/ioctlhook.c:57:5: error: use of undeclared identifier 'mm_segment_t'
mm_segment_t old_fs;
^
../drivers/ioctlhook/ioctlhook.c:65:5: error: use of undeclared identifier 'old_fs'
old_fs = get_fs();
^
../drivers/ioctlhook/ioctlhook.c:65:14: error: call to undeclared function 'get_fs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
old_fs = get_fs();
^
../drivers/ioctlhook/ioctlhook.c:65:14: note: did you mean 'sget_fc'?
../include/linux/fs.h:2652:21: note: 'sget_fc' declared here
struct super_block *sget_fc(struct fs_context *fc,
^
../drivers/ioctlhook/ioctlhook.c:66:5: error: call to undeclared function 'set_fs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
set_fs(get_ds());
^
../drivers/ioctlhook/ioctlhook.c:66:12: error: call to undeclared function 'get_ds'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
set_fs(get_ds());
^
../drivers/ioctlhook/ioctlhook.c:71:16: error: use of undeclared identifier 'old_fs'
set_fs(old_fs);
^
../drivers/ioctlhook/ioctlhook.c:80:16: error: use of undeclared identifier 'old_fs'
set_fs(old_fs);
^
../drivers/ioctlhook/ioctlhook.c:106:24: error: use of undeclared identifier 'old_fs'
set_fs(old_fs);
^
../drivers/ioctlhook/ioctlhook.c:166:38: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]page_size_t: %lx\n", page_size_t);
~~~ ^~~~~~~~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:167:39: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]page_level_c: %lx\n", page_level_c);
~~~ ^~~~~~~~~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:168:39: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]page_shift_t: %lx\n", page_shift_t);
~~~ ^~~~~~~~~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:169:35: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]pgd_k_pa: %lx\n", pgd_k_pa);
~~~ ^~~~~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:170:32: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printk("[db]pgd_k: %lx\n", pgd_k);
~~~ ^~~~~
%llx
../include/linux/printk.h:457:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##VA_ARGS)
~~~ ^~~~~~~~~~~
../include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##VA_ARGS);
~~~~ ^~~~~~~~~~~
../drivers/ioctlhook/ioctlhook.c:198:18: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
uint64_t pxd_desc = *((uint64_t *)pxd_entry_va);
^
14 errors generated.