(openLink - cmd) shows zero still if check fails. Note: this is happening only under valgrind!
Regards, Mano, IxNetwork [Keysight-signature-block-5]<http://www.keysight.com/> From: Manomugdha Biswas Sent: Saturday, August 15, 2020 6:38 PM To: valgrind-users@lists.sourceforge.net Subject: compat_ioctl cmd does not match even if it shows same value Hi, I have a 32 bit application (user space) which communicate with a kernel module through compat_ioctl(). My system is # uname -a Linux chassis1-board1-port5 3.10 #1 SMP Fri Apr 24 02:31:48 PDT 2020 mips64 GNU/Linux Ioctl function is following: long mgr_compat_ioctl(struct file *pFile, unsigned int cmd, unsigned long arg) inside this function definition, I am getting correct cmd value e.g. 0xc018786f. the variable to which this cmd is to be matched has exactly same value of 0xc018786f (printk shows same value). But still if check fails. Sample code is like this: int mgr_ioctl_common (struct inode *pInode, struct file *pFile, unsigned int cmd, unsigned long arg) { int err = -EFAULT; int minor; void *pUserStruct = (void *)arg; SkixpppMgrDevDesc *pDev = NULL; tKHandle retHandle; unsigned int openLink = 3222829167; if (openLink == cmd) { //printk shows value of cmd is 3222829167 printk("matches\n"); } else { printk("no matche\n"); } } Why this if check fails here? Regards, Mano
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users