This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Support for dev/net/tun on Linux purecap (Debian)

I'm trying to make use of dev/net/tun to provide an interface for networked applications to my VPN software.

I'm working with the Morello board/SoC, and building Debian from the 1.5 release.

It seems dev/net/tun is not supported by default. After some investigation, I have found that it is not configured in linux\arch\arm64\configs\morello_transitional_pcuabi_defconfig. Setting CONFIG_TUN=y in there, I get a compilation error:

drivers/net/tun.c:3478:20: error: incompatible function pointer types initializing 'long (*)(struct file *, unsigned int, user_uintptr_t)' (aka 'long (*)(struct file *, unsigned int, unsigned __intcap)') with an expression of type 'long (struct file *, unsigned int, unsigned long)' [-Werror,-Wincompatible-function-pointer-types]
.unlocked_ioctl = tun_chr_ioctl,

Ok, so this is obviously one of the numerous cases where a 128-bit pointer isn't compatible with a 64-bit integer any more, requiring some porting work for Morello.

As a quick hack, I removed the offending entry (.unlocked_ioctl) from the initialisation of tun_fops to make the compilation error go away. The resulting build seems to work fine, and dev/net/tun works OK with my base ABI application.

I'm concerned that this quick hack will not hold up when I start using purecap ABI rather than base ABI.

So, I would like to know: is there a plan to include support for the tun driver?

I can see several 'Add PCuABI support to *** ioctls' issues raised against the code, but none that seems to cover this particular case, which seems to be of the same nature.

Thanks!

David

Parents
  • Hi David,

    Thanks for getting in touch. I think you've got a good understanding of the situation, and tweaking the TUN driver to get it to build should certainly be doable.

    For everything concerning Morello Linux, we've got the linux-morello mailing list, which we use both for development and general discussions. The best would be to post about this issue on the list (make sure to send an email in plain text if possible) and we can then take it from there. You may also be interested in this short slide deck, which gives more details on the mailing list, issue tracker, etc.

    Cheers,
    Kevin

Reply
  • Hi David,

    Thanks for getting in touch. I think you've got a good understanding of the situation, and tweaking the TUN driver to get it to build should certainly be doable.

    For everything concerning Morello Linux, we've got the linux-morello mailing list, which we use both for development and general discussions. The best would be to post about this issue on the list (make sure to send an email in plain text if possible) and we can then take it from there. You may also be interested in this short slide deck, which gives more details on the mailing list, issue tracker, etc.

    Cheers,
    Kevin

Children
No data