Summary: | Kernel land variable and warning message "uninitialised value" | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Fred M <dark_footix> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | mips32r2, tom |
Priority: | NOR | ||
Version: | 3.7 SVN | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Fred M
2011-09-30 10:27:49 UTC
You will need to teach valgrind about your ioctl as it has to be told what bytes each system call reads/writes (see the code in coregrind/m_syswrap). Alternatively make sure your ioctl number correctly encodes the size and direction hints so that valgrind can use those to work out what is read/written. If this is an ioctl that is part of mainstream kernel.org kernels then we can probably help if you tell us what ioctl it is, but as things stand there is no information here that would allow us to make any changes to valgrind so I am closing this. It s little bit confused. I am working on my own ioctl/driver #define MY_DRIVER_GET_EVENT _IOR (MY_DRIVER_MAGIC_NUMBER, 1, my_structure) in the "coregrind/m_syswrap" I just see a line LINXY(__NR_ioctl, sys_ioctl), What do you mean by teach to valgrind ? oh I see, Should I redevelop the function PRE(sys_ioctl) With all my case, case VKI_MY_DRIVER_GET_EVENT: PRE_MEM_READ( "ioctl(MY_DRIVER_GET_EVENT)", ARG3, sizeof(my_structure) ); Is there any script to do it ? ( parsing the headerq where I define my ioctl, and transode in C ? ) Best Regards, Frédéric Yes, you would need to change PRE(sys_ioctl) and POST(sys_ioctl). See README_MISSING_SYSCALL_OR_IOCTL for more information. > I am working on my own ioctl/driver
> #define MY_DRIVER_GET_EVENT _IOR (MY_DRIVER_MAGIC_NUMBER, 1, my_structure)
Actually as long as _IOR is correctly describing the interaction, valgrind
should handle that already, no?
Yes, which is what I said in my first reply ;-) But I declare correctly my ioctl ? and I set the variable in my driver. I will try to add some logs in valgrind tomorrow. |