gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/seccheck/points/syscall.proto (about)

     1  // Copyright 2022 The gVisor Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  package gvisor.syscall;
    18  
    19  import "pkg/sentry/seccheck/points/common.proto";
    20  
    21  message Exit {
    22    int64 result = 1;
    23    int64 errorno = 2;
    24  }
    25  
    26  message Syscall {
    27    gvisor.common.ContextData context_data = 1;
    28    Exit exit = 2;
    29    uint64 sysno = 4;
    30    uint64 arg1 = 5;
    31    uint64 arg2 = 6;
    32    uint64 arg3 = 7;
    33    uint64 arg4 = 8;
    34    uint64 arg5 = 9;
    35    uint64 arg6 = 10;
    36  }
    37  
    38  message Open {
    39    gvisor.common.ContextData context_data = 1;
    40    Exit exit = 2;
    41    uint64 sysno = 3;
    42    int64 fd = 4;
    43    string fd_path = 5;
    44    string pathname = 6;
    45    uint32 flags = 7;
    46    uint32 mode = 8;
    47  }
    48  
    49  message Close {
    50    gvisor.common.ContextData context_data = 1;
    51    Exit exit = 2;
    52    uint64 sysno = 3;
    53    int64 fd = 4;
    54    string fd_path = 5;
    55  }
    56  
    57  message Read {
    58    gvisor.common.ContextData context_data = 1;
    59    Exit exit = 2;
    60    uint64 sysno = 3;
    61    int64 fd = 4;
    62    string fd_path = 5;
    63    uint64 count = 6;
    64    bool has_offset = 7;
    65    int64 offset = 8;
    66    uint32 flags = 9;
    67  }
    68  
    69  message Write {
    70    gvisor.common.ContextData context_data = 1;
    71    Exit exit = 2;
    72    uint64 sysno = 3;
    73    int64 fd = 4;
    74    string fd_path = 5;
    75    uint64 count = 6;
    76    bool has_offset = 7;
    77    int64 offset = 8;
    78    uint32 flags = 9;
    79  }
    80  
    81  message Connect {
    82    gvisor.common.ContextData context_data = 1;
    83    Exit exit = 2;
    84    uint64 sysno = 3;
    85    int64 fd = 4;
    86    string fd_path = 5;
    87    bytes address = 6;
    88  }
    89  
    90  message Execve {
    91    gvisor.common.ContextData context_data = 1;
    92    Exit exit = 2;
    93    uint64 sysno = 3;
    94    int64 fd = 4;
    95    string fd_path = 5;
    96    string pathname = 6;
    97    repeated string argv = 7;
    98    repeated string envv = 8;
    99    uint32 flags = 9;
   100  }
   101  
   102  message Socket {
   103    gvisor.common.ContextData context_data = 1;
   104    Exit exit = 2;
   105    uint64 sysno = 3;
   106    int32 domain = 4;
   107    int32 type = 5;
   108    int32 protocol = 6;
   109  }
   110  
   111  message Chdir {
   112    gvisor.common.ContextData context_data = 1;
   113    Exit exit = 2;
   114    uint64 sysno = 3;
   115    int64 fd = 4;
   116    string fd_path = 5;
   117    string pathname = 6;
   118  }
   119  
   120  message Setresid {
   121    gvisor.common.ContextData context_data = 1;
   122    Exit exit = 2;
   123    uint64 sysno = 3;
   124    uint32 rid = 4;
   125    uint32 eid = 5;
   126    uint32 sid = 6;
   127  }
   128  
   129  message Setid {
   130    gvisor.common.ContextData context_data = 1;
   131    Exit exit = 2;
   132    uint64 sysno = 3;
   133    uint32 id = 4;
   134  }
   135  
   136  message StructRlimit {
   137    uint64 cur = 1;
   138    uint64 max = 2;
   139  }
   140  
   141  message Prlimit {
   142    gvisor.common.ContextData context_data = 1;
   143    Exit exit = 2;
   144    uint64 sysno = 3;
   145    int32 pid = 4;
   146    int64 resource = 5;
   147    StructRlimit new_limit = 6;
   148    StructRlimit old_limit = 7;
   149  }
   150  
   151  message Pipe {
   152    gvisor.common.ContextData context_data = 1;
   153    Exit exit = 2;
   154    uint64 sysno = 3;
   155    uint32 flags = 4;
   156    int32 reader = 5;
   157    int32 writer = 6;
   158  }
   159  
   160  message Fcntl {
   161    gvisor.common.ContextData context_data = 1;
   162    Exit exit = 2;
   163    uint64 sysno = 3;
   164    int32 fd = 4;
   165    string fd_path = 5;
   166    int32 cmd = 6;
   167    int64 args = 7;
   168  }
   169  
   170  message Dup {
   171    gvisor.common.ContextData context_data = 1;
   172    Exit exit = 2;
   173    uint64 sysno = 3;
   174    int32 old_fd = 4;
   175    int32 new_fd = 5;
   176    string fd_path = 6;
   177    uint32 flags = 7;
   178  }
   179  
   180  message Signalfd {
   181    gvisor.common.ContextData context_data = 1;
   182    Exit exit = 2;
   183    uint64 sysno = 3;
   184    int32 fd = 4;
   185    string fd_path = 5;
   186    uint64 sigset = 6;
   187    int32 flags = 7;
   188  }
   189  
   190  message Chroot {
   191    gvisor.common.ContextData context_data = 1;
   192    Exit exit = 2;
   193    uint64 sysno = 3;
   194    string pathname = 4;
   195  }
   196  
   197  message Eventfd {
   198    gvisor.common.ContextData context_data = 1;
   199    Exit exit = 2;
   200    uint64 sysno = 3;
   201    int32 val = 4;
   202    uint32 flags = 5;
   203  }
   204  
   205  message Clone {
   206    gvisor.common.ContextData context_data = 1;
   207    Exit exit = 2;
   208    uint64 sysno = 3;
   209    uint64 flags = 4;
   210    uint64 stack = 5;
   211    uint64 new_tid = 6;
   212    uint64 tls = 7;
   213  }
   214  
   215  message Bind {
   216    gvisor.common.ContextData context_data = 1;
   217    Exit exit = 2;
   218    uint64 sysno = 3;
   219    int32 fd = 4;
   220    string fd_path = 5;
   221    bytes address = 6;
   222  }
   223  
   224  message Accept {
   225    gvisor.common.ContextData context_data = 1;
   226    Exit exit = 2;
   227    uint64 sysno = 3;
   228    int32 fd = 4;
   229    string fd_path = 5;
   230    bytes address = 6;
   231    int32 flags = 7;
   232  }
   233  
   234  message TimerfdCreate {
   235    gvisor.common.ContextData context_data = 1;
   236    Exit exit = 2;
   237    uint64 sysno = 3;
   238    int32 clock_id = 4;
   239    int32 flags = 5;
   240  }
   241  
   242  message Timespec {
   243    int64 sec = 1;
   244    int64 nsec = 2;
   245  }
   246  
   247  message ItimerSpec {
   248    Timespec interval = 1;
   249    Timespec value = 2;
   250  }
   251  
   252  message TimerfdSetTime {
   253    gvisor.common.ContextData context_data = 1;
   254    Exit exit = 2;
   255    uint64 sysno = 3;
   256    int32 fd = 4;
   257    string fd_path = 5;
   258    int32 flags = 6;
   259    ItimerSpec new_value = 7;
   260    ItimerSpec old_value = 8;
   261  }
   262  
   263  message TimerfdGetTime {
   264    gvisor.common.ContextData context_data = 1;
   265    Exit exit = 2;
   266    uint64 sysno = 3;
   267    int32 fd = 4;
   268    string fd_path = 5;
   269    ItimerSpec cur_value = 6;
   270  }
   271  
   272  message Fork {
   273    gvisor.common.ContextData context_data = 1;
   274    Exit exit = 2;
   275    uint64 sysno = 3;
   276  }
   277  
   278  message InotifyInit {
   279    gvisor.common.ContextData context_data = 1;
   280    Exit exit = 2;
   281    uint64 sysno = 3;
   282    int32 flags = 4;
   283  }
   284  
   285  message InotifyAddWatch {
   286    gvisor.common.ContextData context_data = 1;
   287    Exit exit = 2;
   288    uint64 sysno = 3;
   289    int32 fd = 4;
   290    string fd_path = 5;
   291    string pathname = 6;
   292    uint32 mask = 7;
   293  }
   294  
   295  message InotifyRmWatch {
   296    gvisor.common.ContextData context_data = 1;
   297    Exit exit = 2;
   298    uint64 sysno = 3;
   299    int32 fd = 4;
   300    string fd_path = 5;
   301    int32 wd = 6;
   302  }
   303  
   304  message SocketPair {
   305    gvisor.common.ContextData context_data = 1;
   306    Exit exit = 2;
   307    uint64 sysno = 3;
   308    int32 domain = 4;
   309    int32 type = 5;
   310    int32 protocol = 6;
   311    int32 socket1 = 7;
   312    int32 socket2 = 8;
   313  }