On 18/05/15 15:12, Carl Ponder wrote:
> *On 01/28/2015 09:27 PM, Carl Ponder wrote:*
>> I ran into this output from valgrind
>>
>>     *==21898== Warning: noted but unhandled ioctl 0x30000001 with no
>>     size/direction hints.*
>>     ==21898==   This could cause spurious value errors to appear.
>>     ==21898==   See README_MISSING_SYSCALL_OR_IOCTL for guidance on
>>     writing a proper wrapper.
>>
> *On 03/17/2015 03:44 AM, Julian Seward wrote: *
>>
>>     A more fundamental question is, are you running a kernel with 
>> NVidia-specific hacks?  What is this ioctl 0x30000001 ?  What does it do?  
>> Is it in the mainline linux kernel sources?
>>
> I had to postpone this thread while I was working on other things, but
> am back looking atvalgrind output again.
> We're running standard Centos 6.6 but loading-in custom kernel extensions.
> The ioctl call is to UvmInitialize, which maps the GPU memory into the
> process address-space.

But this ioctl is implemented by that extra kernel module I assume?

>>     The right place to add it is PRE(sys_ioctl) and POST(sys_ioctl).
>>
> I tried inserting print-statements into this function in the
> filecoregrind/m_syswrap/syswrap-linux.c
>
>     5406 PRE(sys_ioctl)
>     5407 {
>     5408    *flags |= SfMayBlock;
>     5409
>     5410    ARG2 = (UInt)ARG2;
>     5411
>     *5412 PRINT("ioctl ARG1=0x%lx\n", (unsigned long) ARG1 );**
>     **5413 PRINT("ioctl ARG2=0x%lx\n", (unsigned long) ARG2 );**
>     **5414 PRINT("ioctl ARG3=0x%lx\n", (unsigned long) ARG3 );*
>
> but didn't see any output, it looks like this function doesn't get
> called on ioctl0x30000001.

You know PRINT only prints when --trace-syscalls=yes is used?

> The Warning at the top looks like it came from the

> So I still don't understand how to get it to handle 0x30000001, given
> that it never gets to thePRE(sys_ioctl).
> It must be getting intercepted somewhere higher in the call-chain and
> passed down toPRE_unknown_ioctlinstead.

Well you have clearly done something wrong, as unknown_ioctl is invoked 
from the default clause in sys_ioctl, so it must be getting called.

Tom

-- 
Tom Hughes (t...@compton.nu)
http://compton.nu/

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to