[PATCH v2] kni: fix ioctl signature
Stephen Hemminger
stephen at networkplumber.org
Mon Nov 29 00:05:31 CET 2021
On Sun, 28 Nov 2021 14:14:26 +0100
Markus Theil <markus.theil at tu-ilmenau.de> wrote:
> From: Markus Theil <markus.theil at secunet.com>
>
> 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 <markus.theil at secunet.com>
> Tested-by: Michael Pfeiffer <michael.pfeiffer at tu-ilmenau.de>
> ---
> 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);
More information about the dev
mailing list