Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104845/?format=api
http://patchwork.dpdk.org/api/patches/104845/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20211203071907.58032-1-markus.theil@tu-ilmenau.de/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20211203071907.58032-1-markus.theil@tu-ilmenau.de>", "list_archive_url": "https://inbox.dpdk.org/dev/20211203071907.58032-1-markus.theil@tu-ilmenau.de", "date": "2021-12-03T07:19:07", "name": "[v3] kni: fix ioctl signature", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9f95cd2b5d681b61bb5946466ac6f291ac13f78e", "submitter": { "id": 747, "url": "http://patchwork.dpdk.org/api/people/747/?format=api", "name": "Markus Theil", "email": "markus.theil@tu-ilmenau.de" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20211203071907.58032-1-markus.theil@tu-ilmenau.de/mbox/", "series": [ { "id": 20844, "url": "http://patchwork.dpdk.org/api/series/20844/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20844", "date": "2021-12-03T07:19:07", "name": "[v3] kni: fix ioctl signature", "version": 3, "mbox": "http://patchwork.dpdk.org/series/20844/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/104845/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/104845/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9158DA0548;\n\tFri, 3 Dec 2021 08:19:12 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0C5D84014F;\n\tFri, 3 Dec 2021 08:19:12 +0100 (CET)", "from smail.rz.tu-ilmenau.de (smail.rz.tu-ilmenau.de [141.24.186.67])\n by mails.dpdk.org (Postfix) with ESMTP id F22E140041\n for <dev@dpdk.org>; Fri, 3 Dec 2021 08:19:09 +0100 (CET)", "from isengard.fritz.box (unknown [87.147.61.42])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 603EA580062;\n Fri, 3 Dec 2021 08:19:09 +0100 (CET)" ], "From": "Markus Theil <markus.theil@tu-ilmenau.de>", "To": "ferruh.yigit@intel.com", "Cc": "dev@dpdk.org, markus.theil@secunet.com,\n Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>", "Subject": "[PATCH v3] kni: fix ioctl signature", "Date": "Fri, 3 Dec 2021 08:19:07 +0100", "Message-Id": "<20211203071907.58032-1-markus.theil@tu-ilmenau.de>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20211128150531.0a9dc798@hermes.local>", "References": "<20211128150531.0a9dc798@hermes.local>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "From: Markus Theil <markus.theil@secunet.com>\n\nFix kni's ioctl signature to correctly match the kernel's\nstructs. This shaves off the (void*) casts and uses struct file*\ninstead of struct inode*. With the correct signature, control flow\nintegrity checkers are no longer confused at this point.\n\nSigned-off-by: Markus Theil <markus.theil@secunet.com>\nTested-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>\n---\nv3: adapt to suggestions from Stephen Hemminger (use unsigned int)\nv2: adapt to suggestions from Ferruh Yigit\n\n kernel/linux/kni/kni_misc.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)", "diff": "diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c\nindex f10dcd069d..cc5172fefc 100644\n--- a/kernel/linux/kni/kni_misc.c\n+++ b/kernel/linux/kni/kni_misc.c\n@@ -482,10 +482,10 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,\n \treturn ret;\n }\n \n-static int\n-kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param)\n+static long\n+kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)\n {\n-\tint ret = -EINVAL;\n+\tlong ret = -EINVAL;\n \tstruct net *net = current->nsproxy->net_ns;\n \n \tpr_debug(\"IOCTL num=0x%0x param=0x%0lx\\n\", ioctl_num, ioctl_param);\n@@ -511,8 +511,8 @@ kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param)\n \treturn ret;\n }\n \n-static int\n-kni_compat_ioctl(struct inode *inode, uint32_t ioctl_num,\n+static long\n+kni_compat_ioctl(struct file *file, unsigned int ioctl_num,\n \t\tunsigned long ioctl_param)\n {\n \t/* 32 bits app on 64 bits OS to be supported later */\n@@ -525,8 +525,8 @@ static const struct file_operations kni_fops = {\n \t.owner = THIS_MODULE,\n \t.open = kni_open,\n \t.release = kni_release,\n-\t.unlocked_ioctl = (void *)kni_ioctl,\n-\t.compat_ioctl = (void *)kni_compat_ioctl,\n+\t.unlocked_ioctl = kni_ioctl,\n+\t.compat_ioctl = kni_compat_ioctl,\n };\n \n static struct miscdevice kni_misc = {\n", "prefixes": [ "v3" ] }{ "id": 104845, "url": "