albertofaria / bdus

A framework for implementing Block Devices in User Space
https://bdus.readthedocs.io
GNU General Public License v2.0
33 stars 3 forks source link

Build with errors in linux kernel 4.14.44 #2

Open oracleloyall opened 2 years ago

oracleloyall commented 2 years ago

When I build dbus with some errors,should sove for it? make -C /lib/modules/4.18.0-193.el8.x86_64/build M='/test/bdus-0.1.1/kbdus' W=1 C=0 DEBUG=0 make[1]: 进入目录“/usr/src/kernels/4.18.0-193.el8.x86_64” CC [M] /test/bdus-0.1.1/kbdus/src/control.o CC [M] /test/bdus-0.1.1/kbdus/src/device.o /test/bdus-0.1.1/kbdus/src/device.c: 在函数‘kbdus_device_ioctl_createbuffer’中: /test/bdus-0.1.1/kbdus/src/device.c:523:34: 错误:宏“access_ok”传递了 3 个参数,但只需要 2 个 argument_usrptr, size)) ^ In file included from /test/bdus-0.1.1/kbdus/src/device.c:8: /test/bdus-0.1.1/kbdus/include-private/kbdus/utilities.h:45:43: 错误:‘access_ok’未声明(在此函数内第一次使用)

define kbdus_access_ok(type, addr, size) access_ok((type), (addr), (size))

                                       ^~~~~~~~~

/test/bdus-0.1.1/kbdus/src/device.c:520:10: 附注:in expansion of macro ‘kbdus_access_ok’ if (!kbdus_access_ok( ^~~~~~~ /test/bdus-0.1.1/kbdus/include-private/kbdus/utilities.h:45:43: 附注:每个未声明的标识符在其出现的函数内只报告一次

define kbdus_access_ok(type, addr, size) access_ok((type), (addr), (size))

                                       ^~~~~~~~~

/test/bdus-0.1.1/kbdus/src/device.c:520:10: 附注:in expansion of macro ‘kbdus_access_ok’ if (!kbdus_access_ok( ^~~~~~~ make[2]: [scripts/Makefile.build:313:/test/bdus-0.1.1/kbdus/src/device.o] 错误 1 make[1]: [Makefile:1542:module/test/bdus-0.1.1/kbdus] 错误 2 make[1]: 离开目录“/usr/src/kernels/4.18.0-193.el8.x86_64” make: *** [Makefile:45:kbdus.ko] 错误 2

albertofaria commented 2 years ago

Thanks for the report! At first sight, it appears that you are using a kernel with distribution-specific patches that modified the access_ok() macro. What Linux distribution and version are you using?