{"action":"closed","issue":{"url":"https://api.github.com/repos/luigirizzo/netmap/issues/111","repository_url":"https://api.github.com/repos/luigirizzo/netmap","labels_url":"https://api.github.com/repos/luigirizzo/netmap/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/luigirizzo/netmap/issues/111/comments","events_url":"https://api.github.com/repos/luigirizzo/netmap/issues/111/events","html_url":"https://github.com/luigirizzo/netmap/issues/111","id":116736585,"number":111,"title":"compat_ioctl for 32bit application","user":{"login":"BASM","id":157529,"avatar_url":"https://avatars.githubusercontent.com/u/157529?v=3","gravatar_id":"","url":"https://api.github.com/users/BASM","html_url":"https://github.com/BASM","followers_url":"https://api.github.com/users/BASM/followers","following_url":"https://api.github.com/users/BASM/following{/other_user}","gists_url":"https://api.github.com/users/BASM/gists{/gist_id}","starred_url":"https://api.github.com/users/BASM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BASM/subscriptions","organizations_url":"https://api.github.com/users/BASM/orgs","repos_url":"https://api.github.com/users/BASM/repos","events_url":"https://api.github.com/users/BASM/events{/privacy}","received_events_url":"https://api.github.com/users/BASM/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-11-13T09:58:00Z","updated_at":"2016-12-15T18:22:53Z","closed_at":"2016-12-15T18:22:53Z","body":"For running 32bit a application on the 64bit kernel device driver (file_operations for ioctl) must have compat_ioctl vector. In the ioctl all data must use same struct on 32bit and 64bit struct.\n\nNetmap have a good 'struct nmreq' and all other mmaped structs, but netmap do not init compat_ioctl vector (Why?). Therefore 32bit netmap is not works on the 64bit kernel.\n\nThe patch adds support for 32 bit applications, but I have not tested it well:\n\n``` C\ndiff --git a/LINUX/netmap_linux.c b/LINUX/netmap_linux.c\nindex a9ca2dd..e225bb1 100644\n--- a/LINUX/netmap_linux.c\n+++ b/LINUX/netmap_linux.c\n@@ -747,6 +747,9 @@ static struct file_operations netmap_fops = {\n     .open = linux_netmap_open,\n     .mmap = linux_netmap_mmap,\n     LIN_IOCTL_NAME = linux_netmap_ioctl,\n+#ifdef NETMAP_LINUX_HAVE_UNLOCKED_IOCTL\n+    .compat_ioctl = linux_netmap_ioctl,\n+#endif\n     .poll = linux_netmap_poll,\n     .release = linux_netmap_release,\n };\n```\n"}}
{"actor":{"display_login":"vmaffione"}}