*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.

    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. The Warning at the top looks like it came from the functionPRE_unknown_ioctl in the filecoregrind/m_syswrap/syswrap-generic.c

   3488          for (i = 0; i <
   sizeof(unknown_ioctl)/sizeof(unknown_ioctl[0]); i++) {
   3489             if (unknown_ioctl[i] == request)
   3490                break;
   3491             if (unknown_ioctl[i] == 0) {
   3492                unknown_ioctl[i] = request;
   3493                moans--;
   *3494                VG_(umsg)("Warning: noted but unhandled ioctl
   0x%lx"**
   **3495                          " with no size/direction hints.\n",
   request); *
   3496                VG_(umsg)("   This could cause spurious value
   errors to appear.\n");
   3497                VG_(umsg)("   See
   README_MISSING_SYSCALL_OR_IOCTL for "
   3498                          "guidance on writing a proper
   wrapper.\n" );
   3499                //VG_(get_and_pp_StackTrace)(tid,
   VG_(clo_backtrace_size));
   3500                return;
   3501             }
   3502          }

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.
Can you tell me what else needs to be changed?
Thanks,

                    Carl


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
------------------------------------------------------------------------------
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