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 D5C4FA0093; Thu, 21 Apr 2022 17:40:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B232D40042; Thu, 21 Apr 2022 17:40:09 +0200 (CEST) Received: from mail-108-mta128.mxroute.com (mail-108-mta128.mxroute.com [136.175.108.128]) by mails.dpdk.org (Postfix) with ESMTP id E09D840040 for ; Thu, 21 Apr 2022 17:40:07 +0200 (CEST) Received: from filter006.mxroute.com ([140.82.40.27] 140.82.40.27.vultrusercontent.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta128.mxroute.com (ZoneMTA) with ESMTPSA id 1804cc7cc09000fe85.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 21 Apr 2022 15:40:03 +0000 X-Zone-Loop: 0818d9700ba2722bdf2fac503100b05b2278e1169cb6 X-Originating-IP: [140.82.40.27] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashroe.eu; s=x; h=Content-Type:MIME-Version:Message-ID:Date:In-reply-to:Subject:Cc:To: From:References:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Lr60FOfzPmNTlEZEDuDI6inRgVvJmeTIFCejUa6mpOs=; b=l9V5EyF6Md626b5Fd+8J4OXj0/ vank5jehWoGlJr+KL4LwmuCYRbCVOIeiRbGLbFsDhKKGTzD4MLZP257dABn7VmSOo4a30h7uYjf9l xUaH1Q3gHZlg78AN16WX6zfhozz5/xw9VzZauXzKQNE3xv0dgG8mDN/jWaS5Y/ZT0beWd9pZftZyQ LVyvN5CaWkdmy2JXkrW8vDLlFGxRdgYlQU1MGAupwufvpz0IMZG+9OatBEdLARBxclkf09OiyblqR dHqySgSQNpTaRlBWmuYB8Gg6gkf3Kamfka+8NjNMILv5V7k2/g+k/fzFeiWrS62CgWRBebo9neQAx oCqDKBjg==; References: <20220421075444.6f872836@hermes.local> User-agent: mu4e 1.4.15; emacs 27.1 From: Ray Kinsella To: Stephen Hemminger Cc: Stephen Coleman , dev@dpdk.org, Ferruh Yigit Subject: Re: kni: check abi version between kmod and lib In-reply-to: <20220421075444.6f872836@hermes.local> Date: Thu, 21 Apr 2022 11:40:00 -0400 Message-ID: <87czhao373.fsf@mdr78.vserver.site> MIME-Version: 1.0 Content-Type: text/plain X-AuthUser: mdr@ashroe.eu X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Stephen Hemminger writes: > On Thu, 21 Apr 2022 12:38:26 +0800 > Stephen Coleman wrote: > >> KNI ioctl functions copy data from userspace lib, and this interface >> of kmod is not compatible indeed. If the user use incompatible rte_kni.ko >> bad things happen: sometimes various fields contain garbage value, >> sometimes it cause a kmod soft lockup. >> >> Some common distros ship their own rte_kni.ko, so this is likely to >> happen. >> >> This patch add abi version checking between userland lib and kmod so >> that: >> >> * if kmod ioctl got a wrong abi magic, it refuse to go on >> * if userland lib, probed a wrong abi version via newly added ioctl, it >> also refuse to go on >> >> Bugzilla ID: 998 > > > Kernel API's are supposed to be 99% stable. > If this driver was playing by the upstream kernel rules this would not > have happened. Well look, it is out-of-tree and never likely to be in-tree, so those rules don't apply. Making sure the ABI doesn't change during the ABI stablity period, should be good enough? -- Regards, Ray K