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 B30D7A0032 for ; Fri, 18 Feb 2022 13:43:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAF6C40141; Fri, 18 Feb 2022 13:43:19 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 77A0740141 for ; Fri, 18 Feb 2022 13:43:18 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id n8so5144841wms.3 for ; Fri, 18 Feb 2022 04:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tLjbm0ILtFQg7Sw2krJfs46IJkoR1j09rt3MQbPnNO4=; b=Za3LWt2iGI07+I094zwTVcLt48mMeP4fLCKdz3/lYPfrGRuLCXJG5k8sROemuBELEQ n019pM4FBFY9RIOrn2iAnnRGwEindnFQs4PwGcmwZB21ZiHXjeFmgHLoGTPZZ28c2RsI iLwhgBP8DLov0rFQtrTOlsHFRScZsKzgpmxlfSg7pgUaKx216fc47OGxkvSaBQ6zbVUf KhUYRAwz0iOvHWdVLLapuAaGqottWQtRXpbOYHCFBRfnbkkgWPTpUYy0S0lePz2EXfQV cUN3KqfRf3x0ucuTJAgk8gijO/F7X26LVdn/SOXXdfwjfAyC0SdMs50XQlCIxLqMA59y rACw== 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=tLjbm0ILtFQg7Sw2krJfs46IJkoR1j09rt3MQbPnNO4=; b=qUgxN3xv5RGuM/XcYguBnCXeWzpKf0hS8/0R29dLvAAeojjdXNiBIQisfgLWzfd3/w 37zq0frRlOf05AOO7iPTnDN0WpFezDDRht39fJ7EugcYACW7Wb0o8rU1+HvXaIGo/MF6 GDdVsIn15ZQlba4GnTLJvW8xSJUepVngibPK+fk0cjdZhomYi+7IApjTLwohRwMSKu0A u6vjpOrMVPSHW53Fe5aZE/hFJofE3Q0ltyJ7WzRnghpDJuDzybDZAOyr0ybauHhc3T9f qBMIzbR5R8b6E/9OjJblbUyYzUikWPb0JXStq9LT/Aqa5SPing4n22QRGGNJ2xoUDXZ1 OxgQ== X-Gm-Message-State: AOAM532d+E1asDmkZfLCaYZPaVSff/cK7r/Ap1RQCDFYBPmaBk9kYKYG ewdx27FW6VzPY4bNuEXf3Do= X-Google-Smtp-Source: ABdhPJwmk2LYUHDn6gfLnQg2tJKQlFM11ZkcglHrYskvPvrlwuSx07jUO+RX4iUStnfMn/kiWCTCKA== X-Received: by 2002:a1c:7715:0:b0:37b:dc94:9eb4 with SMTP id t21-20020a1c7715000000b0037bdc949eb4mr7094345wmi.61.1645188198212; Fri, 18 Feb 2022 04:43:18 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id c13sm41561991wrv.24.2022.02.18.04.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:43:17 -0800 (PST) From: luca.boccassi@gmail.com To: Markus Theil Cc: Michael Pfeiffer , Stephen Hemminger , dpdk stable Subject: patch 'kni: fix ioctl signature' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:38:40 +0000 Message-Id: <20220218123931.1749595-71-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.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 20.11.5 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/20/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/1b61157ec9460a316b25d456624222c6da43eb75 Thanks. Luca Boccassi --- >From 1b61157ec9460a316b25d456624222c6da43eb75 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 aae977c187..c8da5805c0 100644 --- a/kernel/linux/kni/kni_misc.c +++ b/kernel/linux/kni/kni_misc.c @@ -485,10 +485,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); @@ -514,8 +514,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 */ @@ -528,8 +528,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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:40.703388238 +0000 +++ 0071-kni-fix-ioctl-signature.patch 2022-02-18 12:37:37.746793171 +0000 @@ -1 +1 @@ -From f1b2991c3c0f480fe8e9f6c5c640a1d913b76bed Mon Sep 17 00:00:00 2001 +From 1b61157ec9460a316b25d456624222c6da43eb75 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f1b2991c3c0f480fe8e9f6c5c640a1d913b76bed ] + @@ -19 +21 @@ -index e8a8203c90..ec70190042 100644 +index aae977c187..c8da5805c0 100644 @@ -22 +24 @@ -@@ -480,10 +480,10 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num, +@@ -485,10 +485,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) +@@ -514,8 +514,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 = { +@@ -528,8 +528,8 @@ static const struct file_operations kni_fops = {