Home | History | Annotate | Download | only in m_syswrap
      1 
      2 /*--------------------------------------------------------------------*/
      3 /*--- Handlers for syscalls on minor variants of Linux kernels.    ---*/
      4 /*---                                     syswrap-linux-variants.c ---*/
      5 /*--------------------------------------------------------------------*/
      6 
      7 /*
      8    This file is part of Valgrind, a dynamic binary instrumentation
      9    framework.
     10 
     11    Copyright (C) 2000-2012 Julian Seward
     12       jseward (at) acm.org
     13 
     14    This program is free software; you can redistribute it and/or
     15    modify it under the terms of the GNU General Public License as
     16    published by the Free Software Foundation; either version 2 of the
     17    License, or (at your option) any later version.
     18 
     19    This program is distributed in the hope that it will be useful, but
     20    WITHOUT ANY WARRANTY; without even the implied warranty of
     21    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     22    General Public License for more details.
     23 
     24    You should have received a copy of the GNU General Public License
     25    along with this program; if not, write to the Free Software
     26    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     27    02111-1307, USA.
     28 
     29    The GNU General Public License is contained in the file COPYING.
     30 */
     31 
     32 #if defined(VGO_linux)
     33 
     34 /* The files syswrap-generic.c, syswrap-linux.c, syswrap-*-linux.c,
     35    and associated vki*.h header files, constitute Valgrind's model of how a
     36    vanilla Linux kernel behaves with respect to syscalls.
     37 
     38    On a few occasions, it is useful to run with a kernel that has some
     39    (minor) extensions to the vanilla model, either due to running on a
     40    hacked kernel, or using a vanilla kernel which has incorporated a
     41    custom kernel module.  Rather than clutter the standard model, all
     42    such variant handlers are placed in here.
     43 
     44    Unlike the C files for the standard model, this file should also
     45    contain all constants/types needed for said wrappers.  The vki*.h
     46    headers should not be polluted with non-vanilla info. */
     47 
     48 
     49 #include "pub_core_basics.h"
     50 #include "pub_core_vki.h"
     51 #include "pub_core_libcsetjmp.h"   // to keep _threadstate.h happy
     52 #include "pub_core_threadstate.h"
     53 #include "pub_core_aspacemgr.h"
     54 #include "pub_core_debuginfo.h"    // VG_(di_notify_*)
     55 #include "pub_core_transtab.h"     // VG_(discard_translations)
     56 #include "pub_core_debuglog.h"
     57 #include "pub_core_libcbase.h"
     58 #include "pub_core_libcassert.h"
     59 #include "pub_core_libcfile.h"
     60 #include "pub_core_libcprint.h"
     61 #include "pub_core_libcproc.h"
     62 #include "pub_core_mallocfree.h"
     63 #include "pub_core_tooliface.h"
     64 #include "pub_core_options.h"
     65 #include "pub_core_scheduler.h"
     66 #include "pub_core_signals.h"
     67 #include "pub_core_syscall.h"
     68 
     69 #include "priv_types_n_macros.h"
     70 #include "priv_syswrap-linux-variants.h"
     71 
     72 
     73 /* ---------------------------------------------------------------
     74    BProc wrappers
     75    ------------------------------------------------------------ */
     76 
     77 /* Return 0 means hand to kernel, non-0 means fail w/ that value. */
     78 Int ML_(linux_variant_PRE_sys_bproc)( UWord arg1, UWord arg2,
     79                                       UWord arg3, UWord arg4,
     80                                       UWord arg5, UWord arg6 )
     81 {
     82    return 0;
     83 }
     84 
     85 void ML_(linux_variant_POST_sys_bproc)( UWord arg1, UWord arg2,
     86                                         UWord arg3, UWord arg4,
     87                                         UWord arg5, UWord arg6 )
     88 {
     89 }
     90 
     91 #endif // defined(VGO_linux)
     92 
     93 /*--------------------------------------------------------------------*/
     94 /*--- end                                                          ---*/
     95 /*--------------------------------------------------------------------*/
     96