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 785F2A0C41; Mon, 29 Nov 2021 00:05:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27AA04068A; Mon, 29 Nov 2021 00:05:37 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 9C71540689 for ; Mon, 29 Nov 2021 00:05:35 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id n85so14737605pfd.10 for ; Sun, 28 Nov 2021 15:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J6URPAPqEz8D7wZjTCakTQSM4skbsdFSPKPfICx+OdA=; b=HnbRAf2XAv016pJBsdeXDC0HjR9z1qMrMhzSk121PhEJ5aORpSldbi/t8i95cVy7g2 ztVF/8pZJlGCo4Kd1DJP9S4ryHEqt/bh9x7gF5rWA7O5mZlvInYSndoCDrvUedi1N9M9 H05Cx3v+3Uo8pL5ILwjCR0nCE2JZfAx/FgHJjQcMgtscHaOzKdI1BJKdqtVBwVYgJHQC Cfmz+dQOjskNZ5xpaxIfdzsX3wf1r5jeOO960NpgHcnvzAVtqGADaUNidkalJeTxELFq R4lCy/qldao536fSSmLBeLMbstU3NFleFRMAHv9F3WeDbRrpn7/aRqv/+CeXykoDVQ5y 93Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J6URPAPqEz8D7wZjTCakTQSM4skbsdFSPKPfICx+OdA=; b=c8JXP67/ZNeBjip43bwWfoLdC6gbponJ3CNW4TeDAGnFzpW1VAI9HsJH0fuUn+erF+ tfEuxIqohcLUcM8GwNcJO1siGXkXLq4tT9SNKGCcAEcawnweJeiCR4vk47PGqreBs1at h7smxz0+2tibL5bLI97JjvjLZnAmrunan3MDk9dkrFXHecXRPIbI2rdo4o2pf+3rRbiV sdWWRn8/Lv5UAaSsaF1XYxUDoBoSj/HP9+gmIdKg8G8NRkPlLJTe6P2xqM8S8dPoO+fs H9/JOKmCXBS4+Py7yqGalVWaWLmKDxaxoKIsoV9Brnj/i73RjUdhBENVSY9zpXC5pBCM fd1A== X-Gm-Message-State: AOAM532L9PobhcCSRmMe7JWe7tAh+CKMBl91Q4ze3xoPfI+IFayD3aO/ XVMshjsqvRrHlzwDJbjbLaL+0Q== X-Google-Smtp-Source: ABdhPJzqjdK64ZSSaEoCxhQy6I1er4JhGShyj5jscEAUsKbrftF2B1gsUt+UAz4ggkkYhc8ozaN07w== X-Received: by 2002:a62:e904:0:b0:4a4:b4e3:a712 with SMTP id j4-20020a62e904000000b004a4b4e3a712mr34890715pfh.25.1638140734614; Sun, 28 Nov 2021 15:05:34 -0800 (PST) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id h128sm14003994pfg.212.2021.11.28.15.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 15:05:34 -0800 (PST) Date: Sun, 28 Nov 2021 15:05:31 -0800 From: Stephen Hemminger To: Markus Theil Cc: ferruh.yigit@intel.com, dev@dpdk.org, markus.theil@secunet.com, Michael Pfeiffer Subject: Re: [PATCH v2] kni: fix ioctl signature Message-ID: <20211128150531.0a9dc798@hermes.local> In-Reply-To: <20211128131426.68238-1-markus.theil@tu-ilmenau.de> References: <20211128131426.68238-1-markus.theil@tu-ilmenau.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sun, 28 Nov 2021 14:14:26 +0100 Markus Theil wrote: > From: Markus Theil > > 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 > --- > v2: adapt to suggestions from Ferruh Yigit > > kernel/linux/kni/kni_misc.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > -static int > -kni_compat_ioctl(struct inode *inode, uint32_t ioctl_num, > +static long > +kni_compat_ioctl(struct file *file, uint32_t ioctl_num, > unsigned long ioctl_param) > { Shouldn't be uint32_t should be unsigned int. In fs.h. long (*compat_ioctl) (struct file *, unsigned int, unsigned long);