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-2015 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_threadstate.h"
     52 #include "pub_core_aspacemgr.h"
     53 #include "pub_core_debuginfo.h"    // VG_(di_notify_*)
     54 #include "pub_core_transtab.h"     // VG_(discard_translations)
     55 #include "pub_core_debuglog.h"
     56 #include "pub_core_libcbase.h"
     57 #include "pub_core_libcassert.h"
     58 #include "pub_core_libcfile.h"
     59 #include "pub_core_libcprint.h"
     60 #include "pub_core_libcproc.h"
     61 #include "pub_core_mallocfree.h"
     62 #include "pub_core_tooliface.h"
     63 #include "pub_core_options.h"
     64 #include "pub_core_scheduler.h"
     65 #include "pub_core_signals.h"
     66 #include "pub_core_syscall.h"
     67 
     68 #include "priv_types_n_macros.h"
     69 #include "priv_syswrap-linux-variants.h"
     70 
     71 
     72 /* ---------------------------------------------------------------
     73    BProc wrappers
     74    ------------------------------------------------------------ */
     75 
     76 /* Return 0 means hand to kernel, non-0 means fail w/ that value. */
     77 Int ML_(linux_variant_PRE_sys_bproc)( UWord arg1, UWord arg2,
     78                                       UWord arg3, UWord arg4,
     79                                       UWord arg5, UWord arg6 )
     80 {
     81    return 0;
     82 }
     83 
     84 void ML_(linux_variant_POST_sys_bproc)( UWord arg1, UWord arg2,
     85                                         UWord arg3, UWord arg4,
     86                                         UWord arg5, UWord arg6 )
     87 {
     88 }
     89 
     90 #endif // defined(VGO_linux)
     91 
     92 /*--------------------------------------------------------------------*/
     93 /*--- end                                                          ---*/
     94 /*--------------------------------------------------------------------*/
     95