Open przemyslaw0 opened 3 months ago
Just reporting, tagfd kernel module doesn't compile here:
$ make
make -C /lib/modules/6.9.7-x64v1-native-xanmod-xanmod1/build M=/dev/shm/tagfd/src-kernel modules
make[1]: Entering directory '/usr/src/linux-headers-6.9.7-x64v1-native-xanmod-xanmod1'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Debian 13.3.0-1) 13.3.0
You are using: gcc (Debian 13.3.0-3) 13.3.0
CC [M] /dev/shm/tagfd/src-kernel/tagfd.o
/dev/shm/tagfd/src-kernel/tagfd.c: In function ‘tagfd_masterWrite’:
/dev/shm/tagfd/src-kernel/tagfd.c:386:25: error: storage size of ‘ts’ isn’t known
386 | struct timespec ts;
| ^~
/dev/shm/tagfd/src-kernel/tagfd.c:391:9: error: implicit declaration of function ‘getnstimeofday’ [-Werror=implicit-function-declaration]
391 | getnstimeofday(&ts);
| ^~~~~~~~~~~~~~
/dev/shm/tagfd/src-kernel/tagfd.c:386:25: warning: unused variable ‘ts’ [-Wunused-variable]
386 | struct timespec ts;
| ^~
In file included from /dev/shm/tagfd/src-kernel/tagfd.c:28:
/dev/shm/tagfd/src-kernel/tagfd.c: In function ‘tagfd_init’:
./include/linux/init.h:180:22: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
180 | #define THIS_MODULE (&__this_module)
| ~^~~~~~~~~~~~~~~
| |
| struct module *
/dev/shm/tagfd/src-kernel/tagfd.c:586:38: note: in expansion of macro ‘THIS_MODULE’
586 | gl_tagfdClass = class_create(THIS_MODULE, NAME);
| ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
from /dev/shm/tagfd/src-kernel/tagfd.c:35:
./include/linux/device/class.h:228:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
228 | struct class * __must_check class_create(const char *name);
| ~~~~~~~~~~~~^~~~
/dev/shm/tagfd/src-kernel/tagfd.c:586:25: error: too many arguments to function ‘class_create’
586 | gl_tagfdClass = class_create(THIS_MODULE, NAME);
| ^~~~~~~~~~~~
./include/linux/device/class.h:228:29: note: declared here
228 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
/dev/shm/tagfd/src-kernel/tagfd.c:593:32: error: assignment to ‘char * (*)(const struct device *, umode_t *)’ {aka ‘char * (*)(const struct device *, short unsigned int *)’} from incompatible pointer type ‘char * (*)(struct device *, umode_t *)’ {aka ‘char * (*)(struct device *, short unsigned int *)’} [-Werror=incompatible-pointer-types]
593 | gl_tagfdClass->devnode = tagfd_devnode;
| ^
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:244: /dev/shm/tagfd/src-kernel/tagfd.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.9.7-x64v1-native-xanmod-xanmod1/Makefile:2070: /dev/shm/tagfd/src-kernel] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.9.7-x64v1-native-xanmod-xanmod1'
make: *** [Makefile:9: default] Error 2
Kernel version:
$ uname -r
6.9.7-x64v1-native-xanmod-xanmod1
How tagfd compares to Unix Domain Sockets?
Is tagfd are bidirectional? Does tagfd support passing kernel-verified UID / GID credentials between processes? Does tagfd support passing file descriptors between processes?