Closed rsantos88 closed 4 years ago
The temporary solution is to edit the file jr3pci-ioctl.c and returning directly zero in the err
variable, avoiding calling the check function:
#ifndef LINUX_20
if (_IOC_DIR(cmd) & _IOC_READ)
//err = !access_ok(VERIFY_WRITE, (void *)arg, size);
err = 0;
if (_IOC_DIR(cmd) & _IOC_WRITE)
//err = !access_ok(VERIFY_READ, (void *)arg, size);
err = 0;
By doing this, the driver compiles and works correctly. The PCI card LEDs turn on and the jr3
yarp device runs correctly.
I leave the issue open to fix the problem that the function access_ok
gives with this kernel.
Could you verify if simply removing the first parameter is enough, as in https://github.com/martinezjavier/ldd3/commit/887600dab825111721c3bb9ce2331f28adbb648d ?
Yes, it's enough
I've fixed the error, detecting previously the kernel version (see https://github.com/roboticslab-uc3m/jr3pci-linux/commit/87536e37574b69cf6eb96dd04295bb27699f34fd)
Now it's working with the two Kernel versions.
Note: I've removed verify_area(VERIFY_READ, (void *)arg, size)
because it's deprecated and not used in our current versions.
Note2: Added some installation notes if you want to install the drivers on Ubuntu 18.04 (https://github.com/roboticslab-uc3m/installation-guides/commit/68c47866e9f9bd63cd9bdc8daf2367488dd6babb) I'll close the issue :)
Not sure if we should care, but I presume that commit breaks compatibility with the Linux 2.0 kernel?
The following errors were found during JR3 drivers compilation in Ubuntu 18.04 The kernel version used is
5.3.0-26-generic
the errors shown are: