From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 223BCA034C for ; Fri, 25 Feb 2022 18:17:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C898410FD; Fri, 25 Feb 2022 18:17:30 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 78FC44113D for ; Fri, 25 Feb 2022 18:17:28 +0100 (CET) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 5B27C3F1F3 for ; Fri, 25 Feb 2022 17:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809448; bh=XOGeHu10qs0y79w8RC0WJ5IjAr73MSbIE8mbjS8mMgo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CuCEfYuvSOMKVI5wveSjRcMiCRDuubg8J3WxBcrGBZ5JWBaA23Cf/lhXBAFeLgE30 jlQILewE5wQe3Kl03+ZRl4pSn7SRXrYPnqp/Czz2yK9scz+tT3q0ndmIGwBU3GEV4E UFnKbkfRZAvxsrbqtDkH18vI2RqFjYoDUim7IWkPinEEvEWcjU4klpcY+T84xeZd83 cyPb2Ip469qDm10lI1leRCPAlFeNQrmF7pho0Qgib6aAgEoPsA9w1epbPXbKILYu5K qt3BIskzTrqIfQidGCbIYPH1ieVq8zP9pyVpbV7WmmfgYBo7XgG8im/6rXInppr69B W2BVYrLEK+P2g== Received: by mail-wm1-f71.google.com with SMTP id c5-20020a1c3505000000b0034a0dfc86aaso1835245wma.6 for ; Fri, 25 Feb 2022 09:17:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XOGeHu10qs0y79w8RC0WJ5IjAr73MSbIE8mbjS8mMgo=; b=jE+iQEIqaDuVNDcvGgpB0N3BY1cEaG/+Q16JB2MfCjU9do/TGM1Po9Duqa0Yi/uBvg O00JvlTc3QrOLKeQfh3Oq7OExtL/ZZzDBw/bwZGIgfJLTuqqPCdFkEc89PHKsxdbczsd azmQYSjPkbdmFaWhKaoPTZswE200k0CoE/b8zJyFsEpi90kF8dwikiephi4XkGPynFSh +7WXlTbTog+RY/oPaZD+VZvwBZ788VYuDcNrdVcdJ10a60jo03ZfBc15P5EdSj0b3Dl2 33QZhPj8ulRN7AqBrXlUgdTs+RapCTF2sZLo6urc28I0r4JrcE1QbqsLHVQ9tRIgafAO 1T8A== X-Gm-Message-State: AOAM531x6NALaHiozvihgSgVIqnomL5AaxyRdPXm1rxOHZtYuAOr71LG 6IxA2FkENakAF95tP8ohBhjfj4Hm8elvazqqhf42mMpGrpBVWeObMZIUPGB9E8QwNnSC/rabBvy JC5KG8dc/0DpgBGAsxt7qgh9c X-Received: by 2002:a5d:6583:0:b0:1ea:9ad0:851f with SMTP id q3-20020a5d6583000000b001ea9ad0851fmr6953541wru.200.1645809446011; Fri, 25 Feb 2022 09:17:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyL292UI1XhwsMSxsFwufRG14sq2k1vm4WwFcOvp2agqQzfY4mkrrOXMINAEKWsl+l03fvrsw== X-Received: by 2002:a5d:6583:0:b0:1ea:9ad0:851f with SMTP id q3-20020a5d6583000000b001ea9ad0851fmr6953530wru.200.1645809445798; Fri, 25 Feb 2022 09:17:25 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id o9-20020adfeac9000000b001e68d090023sm2895646wrn.68.2022.02.25.09.17.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:17:25 -0800 (PST) From: christian.ehrhardt@canonical.com To: Markus Theil Cc: Michael Pfeiffer , Stephen Hemminger , dpdk stable Subject: patch 'kni: fix ioctl signature' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:24 +0100 Message-Id: <20220225171550.3499040-31-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 19.11.12 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/27/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/7eb7d8589b1caa3b9e92a6460d43668ced1ead72 Thanks. Christian Ehrhardt --- >From 7eb7d8589b1caa3b9e92a6460d43668ced1ead72 Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Fri, 3 Dec 2021 08:19:07 +0100 Subject: [PATCH] kni: fix ioctl signature [ upstream commit f1b2991c3c0f480fe8e9f6c5c640a1d913b76bed ] Fix kni's ioctl signature to correctly match the kernel's structs. This shaves off the (void*) casts and uses struct file* instead of struct inode*. With the correct signature, control flow integrity checkers are no longer confused at this point. Signed-off-by: Markus Theil Tested-by: Michael Pfeiffer Acked-by: Stephen Hemminger --- kernel/linux/kni/kni_misc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c index f4944e1ddf..9b3d20ec69 100644 --- a/kernel/linux/kni/kni_misc.c +++ b/kernel/linux/kni/kni_misc.c @@ -478,10 +478,10 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num, return ret; } -static int -kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param) +static long +kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param) { - int ret = -EINVAL; + long ret = -EINVAL; struct net *net = current->nsproxy->net_ns; pr_debug("IOCTL num=0x%0x param=0x%0lx\n", ioctl_num, ioctl_param); @@ -507,8 +507,8 @@ kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param) return ret; } -static int -kni_compat_ioctl(struct inode *inode, uint32_t ioctl_num, +static long +kni_compat_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param) { /* 32 bits app on 64 bits OS to be supported later */ @@ -521,8 +521,8 @@ static const struct file_operations kni_fops = { .owner = THIS_MODULE, .open = kni_open, .release = kni_release, - .unlocked_ioctl = (void *)kni_ioctl, - .compat_ioctl = (void *)kni_compat_ioctl, + .unlocked_ioctl = kni_ioctl, + .compat_ioctl = kni_compat_ioctl, }; static struct miscdevice kni_misc = { -- 2.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:45.469448904 +0100 +++ 0031-kni-fix-ioctl-signature.patch 2022-02-25 16:58:44.244990416 +0100 @@ -1 +1 @@ -From f1b2991c3c0f480fe8e9f6c5c640a1d913b76bed Mon Sep 17 00:00:00 2001 +From 7eb7d8589b1caa3b9e92a6460d43668ced1ead72 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f1b2991c3c0f480fe8e9f6c5c640a1d913b76bed ] + @@ -19 +21 @@ -index e8a8203c90..ec70190042 100644 +index f4944e1ddf..9b3d20ec69 100644 @@ -22 +24 @@ -@@ -480,10 +480,10 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num, +@@ -478,10 +478,10 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num, @@ -36 +38 @@ -@@ -509,8 +509,8 @@ kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param) +@@ -507,8 +507,8 @@ kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param) @@ -47 +49 @@ -@@ -523,8 +523,8 @@ static const struct file_operations kni_fops = { +@@ -521,8 +521,8 @@ static const struct file_operations kni_fops = {