script_core 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (381) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.rubocop.yml +8 -6
  4. data/.ruby-version +1 -1
  5. data/Gemfile +2 -1
  6. data/bin/sandbox +1 -1
  7. data/ext/enterprise_script_service/Rakefile +1 -1
  8. data/ext/enterprise_script_service/flags.rb +5 -0
  9. data/ext/enterprise_script_service/libseccomp/CHANGELOG +15 -0
  10. data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
  11. data/ext/enterprise_script_service/libseccomp/Makefile.am +1 -1
  12. data/ext/enterprise_script_service/libseccomp/README.md +1 -1
  13. data/ext/enterprise_script_service/libseccomp/SECURITY.md +45 -0
  14. data/ext/enterprise_script_service/libseccomp/configure.ac +3 -3
  15. data/ext/enterprise_script_service/libseccomp/doc/admin/MAINTAINER_PROCESS.md +95 -0
  16. data/ext/enterprise_script_service/libseccomp/{RELEASE_PROCESS.md → doc/admin/RELEASE_PROCESS.md} +9 -1
  17. data/ext/enterprise_script_service/libseccomp/include/Makefile.am +1 -1
  18. data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +2292 -0
  19. data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +3 -1065
  20. data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +35 -3
  21. data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +35 -3
  22. data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +43 -11
  23. data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +33 -1
  24. data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +33 -1
  25. data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +34 -2
  26. data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +43 -11
  27. data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +44 -12
  28. data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +46 -14
  29. data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +142 -18
  30. data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +47 -15
  31. data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +143 -17
  32. data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +33 -1
  33. data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +94 -12
  34. data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +142 -19
  35. data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +33 -1
  36. data/ext/enterprise_script_service/libseccomp/src/db.c +1 -0
  37. data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +10 -3
  38. data/ext/enterprise_script_service/libseccomp/src/python/Makefile.am +4 -4
  39. data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +2 -0
  40. data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
  41. data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.c +98 -0
  42. data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.py +61 -0
  43. data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.tests +18 -0
  44. data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
  45. data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -2
  46. data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -0
  47. data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
  48. data/ext/enterprise_script_service/mruby-mpdecimal/src/ext.c +1 -1
  49. data/ext/enterprise_script_service/mruby/.gitignore +2 -2
  50. data/ext/enterprise_script_service/mruby/CONTRIBUTING.md +10 -3
  51. data/ext/enterprise_script_service/mruby/Doxyfile +2408 -0
  52. data/ext/enterprise_script_service/mruby/README.md +21 -8
  53. data/ext/enterprise_script_service/mruby/Rakefile +4 -13
  54. data/ext/enterprise_script_service/mruby/appveyor_config.rb +1 -1
  55. data/ext/enterprise_script_service/mruby/build_config.rb +3 -3
  56. data/ext/enterprise_script_service/mruby/doc/guides/compile.md +42 -42
  57. data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
  58. data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +45 -6
  59. data/ext/enterprise_script_service/mruby/doc/guides/mrbgems.md +5 -0
  60. data/ext/enterprise_script_service/mruby/doc/limitations.md +88 -38
  61. data/ext/enterprise_script_service/mruby/doc/mruby_logo_red_icon.png +0 -0
  62. data/ext/enterprise_script_service/mruby/doc/opcode.md +94 -94
  63. data/ext/enterprise_script_service/mruby/include/mrbconf.h +74 -11
  64. data/ext/enterprise_script_service/mruby/include/mruby.h +242 -146
  65. data/ext/enterprise_script_service/mruby/include/mruby/array.h +7 -7
  66. data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +2 -9
  67. data/ext/enterprise_script_service/mruby/include/mruby/boxing_no.h +11 -10
  68. data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +104 -69
  69. data/ext/enterprise_script_service/mruby/include/mruby/class.h +7 -5
  70. data/ext/enterprise_script_service/mruby/include/mruby/common.h +9 -7
  71. data/ext/enterprise_script_service/mruby/include/mruby/compile.h +6 -6
  72. data/ext/enterprise_script_service/mruby/include/mruby/data.h +5 -5
  73. data/ext/enterprise_script_service/mruby/include/mruby/debug.h +2 -2
  74. data/ext/enterprise_script_service/mruby/include/mruby/dump.h +3 -7
  75. data/ext/enterprise_script_service/mruby/include/mruby/error.h +34 -6
  76. data/ext/enterprise_script_service/mruby/include/mruby/gc.h +2 -2
  77. data/ext/enterprise_script_service/mruby/include/mruby/hash.h +4 -11
  78. data/ext/enterprise_script_service/mruby/include/mruby/irep.h +16 -4
  79. data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -4
  80. data/ext/enterprise_script_service/mruby/include/mruby/khash.h +2 -2
  81. data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +41 -7
  82. data/ext/enterprise_script_service/mruby/include/mruby/object.h +8 -9
  83. data/ext/enterprise_script_service/mruby/include/mruby/opcode.h +2 -2
  84. data/ext/enterprise_script_service/mruby/include/mruby/ops.h +6 -6
  85. data/ext/enterprise_script_service/mruby/include/mruby/proc.h +19 -13
  86. data/ext/enterprise_script_service/mruby/include/mruby/range.h +10 -4
  87. data/ext/enterprise_script_service/mruby/include/mruby/re.h +2 -2
  88. data/ext/enterprise_script_service/mruby/include/mruby/string.h +130 -107
  89. data/ext/enterprise_script_service/mruby/include/mruby/throw.h +2 -2
  90. data/ext/enterprise_script_service/mruby/include/mruby/value.h +137 -49
  91. data/ext/enterprise_script_service/mruby/include/mruby/variable.h +3 -5
  92. data/ext/enterprise_script_service/mruby/include/mruby/version.h +24 -10
  93. data/ext/enterprise_script_service/mruby/lib/mruby-core-ext.rb +2 -39
  94. data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +32 -15
  95. data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +63 -17
  96. data/ext/enterprise_script_service/mruby/lib/mruby/build/load_gems.rb +24 -10
  97. data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +11 -7
  98. data/ext/enterprise_script_service/mruby/lib/mruby/lockfile.rb +81 -0
  99. data/ext/enterprise_script_service/mruby/minirake +27 -11
  100. data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +3 -0
  101. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrbgem.rake +0 -1
  102. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +47 -9
  103. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +3 -3
  104. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +50 -29
  105. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +3 -3
  106. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +2 -2
  107. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +3 -3
  108. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +2 -2
  109. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +1 -1
  110. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +4 -0
  111. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +28 -1
  112. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +1 -2
  113. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +75 -8
  114. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +134 -90
  115. data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +7 -8
  116. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +69 -46
  117. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/keywords +0 -3
  118. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/lex.def +51 -59
  119. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +430 -241
  120. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrbgem.rake +10 -0
  121. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +122 -0
  122. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +249 -0
  123. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/test/complex.rb +153 -0
  124. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/mrblib/chain.rb +19 -17
  125. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/test/enum_chain.rb +41 -9
  126. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +30 -4
  127. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/test/enum.rb +8 -3
  128. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrbgem.rake +0 -1
  129. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +46 -14
  130. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +51 -2
  131. data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +10 -0
  132. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +47 -44
  133. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +2 -2
  134. data/ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c +9 -4
  135. data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +16 -12
  136. data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/test/fiber.rb +1 -1
  137. data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +0 -2
  138. data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +3 -0
  139. data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/test/hash.rb +3 -7
  140. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/README.md +1 -3
  141. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +1 -1
  142. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file.rb +0 -5
  143. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +24 -38
  144. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/kernel.rb +16 -0
  145. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +19 -18
  146. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +5 -16
  147. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +54 -42
  148. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +24 -20
  149. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file_test.rb +4 -9
  150. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +41 -35
  151. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +9 -36
  152. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +1 -1
  153. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +9 -27
  154. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +2 -0
  155. data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/src/math.c +5 -2
  156. data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +39 -24
  157. data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +48 -17
  158. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/method.rb +0 -12
  159. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +134 -101
  160. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/test/method.rb +9 -1
  161. data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +1 -5
  162. data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +17 -37
  163. data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +0 -8
  164. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -1
  165. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +15 -1
  166. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +35 -6
  167. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/test/nil.rb +4 -0
  168. data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +1 -5
  169. data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +1 -1
  170. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +28 -23
  171. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/test/pack.rb +43 -49
  172. data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/mrblib/print.rb +3 -9
  173. data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +6 -9
  174. data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/test/proc.rb +21 -5
  175. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.c +157 -124
  176. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/test/random.rb +72 -26
  177. data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/mrblib/range.rb +38 -0
  178. data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +26 -11
  179. data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/test/range.rb +111 -1
  180. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrbgem.rake +5 -0
  181. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +117 -0
  182. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +209 -0
  183. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/test/rational.rb +308 -0
  184. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/README.md +1 -1
  185. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/src/socket.c +10 -9
  186. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/kernel.c +2 -2
  187. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +22 -24
  188. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrbgem.rake +0 -1
  189. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +8 -4
  190. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +116 -117
  191. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/numeric.rb +29 -0
  192. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/range.rb +26 -0
  193. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/string.rb +32 -50
  194. data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/mrblib/struct.rb +5 -7
  195. data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +43 -57
  196. data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/test/struct.rb +16 -11
  197. data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +2 -2
  198. data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +1 -1
  199. data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/driver.c +152 -1
  200. data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +4 -3
  201. data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/vformat.c +200 -0
  202. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/include/mruby/time.h +2 -1
  203. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +199 -68
  204. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/test/time.rb +81 -46
  205. data/ext/enterprise_script_service/mruby/mrblib/array.rb +14 -16
  206. data/ext/enterprise_script_service/mruby/mrblib/enum.rb +13 -9
  207. data/ext/enterprise_script_service/mruby/mrblib/hash.rb +5 -7
  208. data/ext/enterprise_script_service/mruby/mrblib/kernel.rb +1 -1
  209. data/ext/enterprise_script_service/mruby/mrblib/numeric.rb +4 -4
  210. data/ext/enterprise_script_service/mruby/mrblib/range.rb +1 -1
  211. data/ext/enterprise_script_service/mruby/mrblib/string.rb +55 -112
  212. data/ext/enterprise_script_service/mruby/mruby-source.gemspec +1 -1
  213. data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby.dict +105 -0
  214. data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_fuzzer.options +5 -0
  215. data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_proto_fuzzer.options +4 -0
  216. data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_fuzzer.c +18 -0
  217. data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_proto_fuzzer.cpp +44 -0
  218. data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.cpp +455 -0
  219. data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h +55 -0
  220. data/ext/enterprise_script_service/mruby/oss-fuzz/ruby.proto +201 -0
  221. data/ext/enterprise_script_service/mruby/src/array.c +95 -46
  222. data/ext/enterprise_script_service/mruby/src/backtrace.c +6 -8
  223. data/ext/enterprise_script_service/mruby/src/class.c +370 -278
  224. data/ext/enterprise_script_service/mruby/src/codedump.c +34 -34
  225. data/ext/enterprise_script_service/mruby/src/debug.c +2 -2
  226. data/ext/enterprise_script_service/mruby/src/dump.c +8 -6
  227. data/ext/enterprise_script_service/mruby/src/enum.c +1 -1
  228. data/ext/enterprise_script_service/mruby/src/error.c +157 -55
  229. data/ext/enterprise_script_service/mruby/src/etc.c +13 -46
  230. data/ext/enterprise_script_service/mruby/src/fmt_fp.c +2 -2
  231. data/ext/enterprise_script_service/mruby/src/gc.c +30 -11
  232. data/ext/enterprise_script_service/mruby/src/hash.c +23 -14
  233. data/ext/enterprise_script_service/mruby/src/kernel.c +16 -54
  234. data/ext/enterprise_script_service/mruby/src/load.c +40 -76
  235. data/ext/enterprise_script_service/mruby/src/numeric.c +164 -94
  236. data/ext/enterprise_script_service/mruby/src/object.c +16 -39
  237. data/ext/enterprise_script_service/mruby/src/pool.c +0 -2
  238. data/ext/enterprise_script_service/mruby/src/proc.c +47 -48
  239. data/ext/enterprise_script_service/mruby/src/range.c +22 -35
  240. data/ext/enterprise_script_service/mruby/src/state.c +5 -94
  241. data/ext/enterprise_script_service/mruby/src/string.c +874 -710
  242. data/ext/enterprise_script_service/mruby/src/symbol.c +73 -48
  243. data/ext/enterprise_script_service/mruby/src/variable.c +58 -38
  244. data/ext/enterprise_script_service/mruby/src/vm.c +133 -304
  245. data/ext/enterprise_script_service/mruby/tasks/doc.rake +48 -0
  246. data/ext/enterprise_script_service/mruby/tasks/toolchains/clang.rake +3 -4
  247. data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +20 -19
  248. data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +0 -12
  249. data/ext/enterprise_script_service/mruby/test/assert.rb +186 -25
  250. data/ext/enterprise_script_service/mruby/test/t/array.rb +34 -6
  251. data/ext/enterprise_script_service/mruby/test/t/class.rb +26 -0
  252. data/ext/enterprise_script_service/mruby/test/t/enumerable.rb +2 -2
  253. data/ext/enterprise_script_service/mruby/test/t/float.rb +17 -17
  254. data/ext/enterprise_script_service/mruby/test/t/hash.rb +2 -0
  255. data/ext/enterprise_script_service/mruby/test/t/integer.rb +14 -6
  256. data/ext/enterprise_script_service/mruby/test/t/kernel.rb +38 -19
  257. data/ext/enterprise_script_service/mruby/test/t/module.rb +87 -14
  258. data/ext/enterprise_script_service/mruby/test/t/numeric.rb +65 -23
  259. data/ext/enterprise_script_service/mruby/test/t/range.rb +4 -4
  260. data/ext/enterprise_script_service/mruby/test/t/string.rb +211 -49
  261. data/ext/enterprise_script_service/mruby/test/t/syntax.rb +19 -2
  262. data/ext/enterprise_script_service/mruby/test/t/vformat.rb +92 -0
  263. data/ext/enterprise_script_service/mruby/travis_config.rb +2 -2
  264. data/ext/enterprise_script_service/mruby_config.rb +10 -0
  265. data/ext/enterprise_script_service/mruby_engine.cpp +2 -2
  266. data/ext/enterprise_script_service/mruby_engine.gembox +1 -0
  267. data/ext/enterprise_script_service/msgpack/CHANGELOG.md +14 -0
  268. data/ext/enterprise_script_service/msgpack/Files.cmake +4 -0
  269. data/ext/enterprise_script_service/msgpack/README.md +1 -1
  270. data/ext/enterprise_script_service/msgpack/appveyor.yml +1 -1
  271. data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple.hpp.erb +1 -1
  272. data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb +1 -1
  273. data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_zone.hpp.erb +3 -3
  274. data/ext/enterprise_script_service/msgpack/example/boost/asio_send_recv.cpp +1 -1
  275. data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/cpp11/timespec.hpp +16 -0
  276. data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/wstring.hpp +15 -0
  277. data/ext/enterprise_script_service/msgpack/include/msgpack/object.h +2 -0
  278. data/ext/enterprise_script_service/msgpack/include/msgpack/pack_template.h +17 -9
  279. data/ext/enterprise_script_service/msgpack/include/msgpack/sysdep.h +27 -16
  280. data/ext/enterprise_script_service/msgpack/include/msgpack/type.hpp +2 -0
  281. data/ext/enterprise_script_service/msgpack/include/msgpack/unpack_template.h +5 -0
  282. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +0 -1
  283. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/check_container_size.hpp +1 -1
  284. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/chrono.hpp +5 -5
  285. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/timespec.hpp +140 -0
  286. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +32 -32
  287. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +32 -32
  288. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +6 -6
  289. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +10 -10
  290. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/ext.hpp +1 -1
  291. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/fixint.hpp +5 -4
  292. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int.hpp +40 -13
  293. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int_decl.hpp +3 -2
  294. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +121 -0
  295. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp03_zone.hpp +3 -3
  296. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp11_zone.hpp +3 -3
  297. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object.hpp +6 -6
  298. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object_fwd.hpp +1 -1
  299. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/pack.hpp +40 -5
  300. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/unpack.hpp +11 -11
  301. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/vrefbuffer.hpp +7 -7
  302. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/zbuffer.hpp +5 -5
  303. data/ext/enterprise_script_service/msgpack/include/msgpack/v2/adaptor/int_decl.hpp +1 -1
  304. data/ext/enterprise_script_service/msgpack/include/msgpack/v2/create_object_visitor.hpp +1 -1
  305. data/ext/enterprise_script_service/msgpack/include/msgpack/v2/parse.hpp +13 -13
  306. data/ext/enterprise_script_service/msgpack/include/msgpack/v2/x3_parse.hpp +28 -26
  307. data/ext/enterprise_script_service/msgpack/include/msgpack/v3/adaptor/int_decl.hpp +1 -1
  308. data/ext/enterprise_script_service/msgpack/include/msgpack/v3/parse.hpp +13 -13
  309. data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
  310. data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +6 -6
  311. data/ext/enterprise_script_service/msgpack/include/msgpack/zone.h +1 -1
  312. data/ext/enterprise_script_service/msgpack/src/objectc.c +83 -148
  313. data/ext/enterprise_script_service/msgpack/src/unpack.c +73 -47
  314. data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +1 -1
  315. data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +5 -0
  316. data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +5 -0
  317. data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +7 -0
  318. data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +7 -0
  319. data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +6 -0
  320. data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +15 -9
  321. data/ext/enterprise_script_service/msgpack/test/buffer.cpp +7 -0
  322. data/ext/enterprise_script_service/msgpack/test/carray.cpp +7 -0
  323. data/ext/enterprise_script_service/msgpack/test/cases.cpp +7 -1
  324. data/ext/enterprise_script_service/msgpack/test/convert.cpp +6 -0
  325. data/ext/enterprise_script_service/msgpack/test/fixint.cpp +7 -1
  326. data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +6 -1
  327. data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +5 -0
  328. data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +8 -2
  329. data/ext/enterprise_script_service/msgpack/test/json.cpp +6 -0
  330. data/ext/enterprise_script_service/msgpack/test/limit.cpp +7 -0
  331. data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +128 -6
  332. data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +7 -2
  333. data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +20 -3
  334. data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +159 -0
  335. data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +5 -0
  336. data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +8 -3
  337. data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +6 -0
  338. data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +5 -0
  339. data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +23 -18
  340. data/ext/enterprise_script_service/msgpack/test/object.cpp +77 -45
  341. data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +28 -10
  342. data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +25 -18
  343. data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +7 -0
  344. data/ext/enterprise_script_service/msgpack/test/raw.cpp +17 -12
  345. data/ext/enterprise_script_service/msgpack/test/reference.cpp +6 -0
  346. data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +6 -0
  347. data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +6 -0
  348. data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +6 -0
  349. data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +6 -2
  350. data/ext/enterprise_script_service/msgpack/test/streaming.cpp +10 -3
  351. data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +7 -0
  352. data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +6 -0
  353. data/ext/enterprise_script_service/msgpack/test/user_class.cpp +5 -0
  354. data/ext/enterprise_script_service/msgpack/test/version.cpp +6 -0
  355. data/ext/enterprise_script_service/msgpack/test/visitor.cpp +7 -0
  356. data/ext/enterprise_script_service/msgpack/test/zone.cpp +6 -0
  357. data/lib/script_core/version.rb +1 -1
  358. data/lib/tasks/mruby/engine.gembox.example +1 -0
  359. data/lib/tasks/script_core.rake +21 -3
  360. data/spec/dummy/app/helpers/fields_helper.rb +2 -2
  361. data/spec/dummy/mruby/engine.gembox +1 -0
  362. data/spec/script_core_spec.rb +1 -1
  363. metadata +38 -22
  364. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.gitignore +0 -1
  365. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.travis.yml +0 -2
  366. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/run_test.rb +0 -26
  367. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrblib/kernel.rb +0 -15
  368. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/unbound_method.rb +0 -9
  369. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.gitignore +0 -5
  370. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.travis.yml +0 -2
  371. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/packtest.rb +0 -157
  372. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/run_test.rb +0 -26
  373. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.c +0 -224
  374. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.h +0 -80
  375. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.h +0 -12
  376. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.gitignore +0 -4
  377. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis.yml +0 -29
  378. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis_build_config.rb +0 -6
  379. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/Rakefile +0 -29
  380. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/.travis.yml +0 -4
  381. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/run_test.rb +0 -28
@@ -26,7 +26,7 @@
26
26
  #include "arch.h"
27
27
  #include "arch-x32.h"
28
28
 
29
- /* NOTE: based on Linux 4.15-rc7 */
29
+ /* NOTE: based on Linux v5.4-rc4 */
30
30
  const struct arch_syscall_def x32_syscall_table[] = { \
31
31
  { "_llseek", __PNR__llseek },
32
32
  { "_newselect", __PNR__newselect },
@@ -58,11 +58,17 @@ const struct arch_syscall_def x32_syscall_table[] = { \
58
58
  { "chown32", __PNR_chown32 },
59
59
  { "chroot", (X32_SYSCALL_BIT + 161) },
60
60
  { "clock_adjtime", (X32_SYSCALL_BIT + 305) },
61
+ { "clock_adjtime64", __PNR_clock_adjtime64 },
61
62
  { "clock_getres", (X32_SYSCALL_BIT + 229) },
63
+ { "clock_getres_time64", __PNR_clock_getres_time64 },
62
64
  { "clock_gettime", (X32_SYSCALL_BIT + 228) },
65
+ { "clock_gettime64", __PNR_clock_gettime64 },
63
66
  { "clock_nanosleep", (X32_SYSCALL_BIT + 230) },
67
+ { "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 },
64
68
  { "clock_settime", (X32_SYSCALL_BIT + 227) },
69
+ { "clock_settime64", __PNR_clock_settime64 },
65
70
  { "clone", (X32_SYSCALL_BIT + 56) },
71
+ { "clone3", (X32_SYSCALL_BIT + 435) },
66
72
  { "close", (X32_SYSCALL_BIT + 3) },
67
73
  { "connect", (X32_SYSCALL_BIT + 42) },
68
74
  { "copy_file_range", (X32_SYSCALL_BIT + 326) },
@@ -106,7 +112,11 @@ const struct arch_syscall_def x32_syscall_table[] = { \
106
112
  { "flock", (X32_SYSCALL_BIT + 73) },
107
113
  { "fork", (X32_SYSCALL_BIT + 57) },
108
114
  { "fremovexattr", (X32_SYSCALL_BIT + 199) },
115
+ { "fsconfig", (X32_SYSCALL_BIT + 431) },
109
116
  { "fsetxattr", (X32_SYSCALL_BIT + 190) },
117
+ { "fsmount", (X32_SYSCALL_BIT + 432) },
118
+ { "fsopen", (X32_SYSCALL_BIT + 430) },
119
+ { "fspick", (X32_SYSCALL_BIT + 433) },
110
120
  { "fstat", (X32_SYSCALL_BIT + 5) },
111
121
  { "fstat64", __PNR_fstat64 },
112
122
  { "fstatat64", __PNR_fstatat64 },
@@ -117,6 +127,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
117
127
  { "ftruncate", (X32_SYSCALL_BIT + 77) },
118
128
  { "ftruncate64", __PNR_ftruncate64 },
119
129
  { "futex", (X32_SYSCALL_BIT + 202) },
130
+ { "futex_time64", __PNR_futex_time64 },
120
131
  { "futimesat", (X32_SYSCALL_BIT + 261) },
121
132
  { "get_kernel_syms", __PNR_get_kernel_syms },
122
133
  { "get_mempolicy", (X32_SYSCALL_BIT + 239) },
@@ -169,8 +180,12 @@ const struct arch_syscall_def x32_syscall_table[] = { \
169
180
  { "io_destroy", (X32_SYSCALL_BIT + 207) },
170
181
  { "io_getevents", (X32_SYSCALL_BIT + 208) },
171
182
  { "io_pgetevents", (X32_SYSCALL_BIT + 333) },
183
+ { "io_pgetevents_time64", __PNR_io_pgetevents_time64 },
172
184
  { "io_setup", (X32_SYSCALL_BIT + 543) },
173
185
  { "io_submit", (X32_SYSCALL_BIT + 544) },
186
+ { "io_uring_setup", (X32_SYSCALL_BIT + 425) },
187
+ { "io_uring_enter", (X32_SYSCALL_BIT + 426) },
188
+ { "io_uring_register", (X32_SYSCALL_BIT + 427) },
174
189
  { "ioctl", (X32_SYSCALL_BIT + 514) },
175
190
  { "ioperm", (X32_SYSCALL_BIT + 173) },
176
191
  { "iopl", (X32_SYSCALL_BIT + 172) },
@@ -214,6 +229,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
214
229
  { "mmap2", __PNR_mmap2 },
215
230
  { "modify_ldt", (X32_SYSCALL_BIT + 154) },
216
231
  { "mount", (X32_SYSCALL_BIT + 165) },
232
+ { "move_mount", (X32_SYSCALL_BIT + 429) },
217
233
  { "move_pages", (X32_SYSCALL_BIT + 533) },
218
234
  { "mprotect", (X32_SYSCALL_BIT + 10) },
219
235
  { "mpx", __PNR_mpx },
@@ -221,7 +237,9 @@ const struct arch_syscall_def x32_syscall_table[] = { \
221
237
  { "mq_notify", (X32_SYSCALL_BIT + 527) },
222
238
  { "mq_open", (X32_SYSCALL_BIT + 240) },
223
239
  { "mq_timedreceive", (X32_SYSCALL_BIT + 243) },
240
+ { "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 },
224
241
  { "mq_timedsend", (X32_SYSCALL_BIT + 242) },
242
+ { "mq_timedsend_time64", __PNR_mq_timedsend_time64 },
225
243
  { "mq_unlink", (X32_SYSCALL_BIT + 241) },
226
244
  { "mremap", (X32_SYSCALL_BIT + 25) },
227
245
  { "msgctl", (X32_SYSCALL_BIT + 71) },
@@ -246,6 +264,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
246
264
  { "oldwait4", __PNR_oldwait4 },
247
265
  { "open", (X32_SYSCALL_BIT + 2) },
248
266
  { "open_by_handle_at", (X32_SYSCALL_BIT + 304) },
267
+ { "open_tree", (X32_SYSCALL_BIT + 428) },
249
268
  { "openat", (X32_SYSCALL_BIT + 257) },
250
269
  { "pause", (X32_SYSCALL_BIT + 34) },
251
270
  { "pciconfig_iobase", __PNR_pciconfig_iobase },
@@ -253,6 +272,8 @@ const struct arch_syscall_def x32_syscall_table[] = { \
253
272
  { "pciconfig_write", __PNR_pciconfig_write },
254
273
  { "perf_event_open", (X32_SYSCALL_BIT + 298) },
255
274
  { "personality", (X32_SYSCALL_BIT + 135) },
275
+ { "pidfd_open", (X32_SYSCALL_BIT + 434) },
276
+ { "pidfd_send_signal", (X32_SYSCALL_BIT + 424) },
256
277
  { "pipe", (X32_SYSCALL_BIT + 22) },
257
278
  { "pipe2", (X32_SYSCALL_BIT + 293) },
258
279
  { "pivot_root", (X32_SYSCALL_BIT + 155) },
@@ -261,6 +282,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
261
282
  { "pkey_mprotect", (X32_SYSCALL_BIT + 329) },
262
283
  { "poll", (X32_SYSCALL_BIT + 7) },
263
284
  { "ppoll", (X32_SYSCALL_BIT + 271) },
285
+ { "ppoll_time64", __PNR_ppoll_time64 },
264
286
  { "prctl", (X32_SYSCALL_BIT + 157) },
265
287
  { "pread64", (X32_SYSCALL_BIT + 17) },
266
288
  { "preadv", (X32_SYSCALL_BIT + 534) },
@@ -271,6 +293,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
271
293
  { "prof", __PNR_prof },
272
294
  { "profil", __PNR_profil },
273
295
  { "pselect6", (X32_SYSCALL_BIT + 270) },
296
+ { "pselect6_time64", __PNR_pselect6_time64 },
274
297
  { "ptrace", (X32_SYSCALL_BIT + 521) },
275
298
  { "putpmsg", (X32_SYSCALL_BIT + 182) },
276
299
  { "pwrite64", (X32_SYSCALL_BIT + 18) },
@@ -288,6 +311,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
288
311
  { "recv", __PNR_recv },
289
312
  { "recvfrom", (X32_SYSCALL_BIT + 517) },
290
313
  { "recvmmsg", (X32_SYSCALL_BIT + 537) },
314
+ { "recvmmsg_time64", __PNR_recvmmsg_time64 },
291
315
  { "recvmsg", (X32_SYSCALL_BIT + 519) },
292
316
  { "remap_file_pages", (X32_SYSCALL_BIT + 216) },
293
317
  { "removexattr", (X32_SYSCALL_BIT + 197) },
@@ -305,6 +329,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
305
329
  { "rt_sigreturn", (X32_SYSCALL_BIT + 513) },
306
330
  { "rt_sigsuspend", (X32_SYSCALL_BIT + 130) },
307
331
  { "rt_sigtimedwait", (X32_SYSCALL_BIT + 523) },
332
+ { "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 },
308
333
  { "rt_tgsigqueueinfo", (X32_SYSCALL_BIT + 536) },
309
334
  { "rtas", __PNR_rtas },
310
335
  { "s390_guarded_storage", __PNR_s390_guarded_storage },
@@ -319,6 +344,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
319
344
  { "sched_getparam", (X32_SYSCALL_BIT + 143) },
320
345
  { "sched_getscheduler", (X32_SYSCALL_BIT + 145) },
321
346
  { "sched_rr_get_interval", (X32_SYSCALL_BIT + 148) },
347
+ { "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 },
322
348
  { "sched_setaffinity", (X32_SYSCALL_BIT + 203) },
323
349
  { "sched_setattr", (X32_SYSCALL_BIT + 314) },
324
350
  { "sched_setparam", (X32_SYSCALL_BIT + 142) },
@@ -331,6 +357,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
331
357
  { "semget", (X32_SYSCALL_BIT + 64) },
332
358
  { "semop", (X32_SYSCALL_BIT + 65) },
333
359
  { "semtimedop", (X32_SYSCALL_BIT + 220) },
360
+ { "semtimedop_time64", __PNR_semtimedop_time64 },
334
361
  { "send", __PNR_send },
335
362
  { "sendfile", (X32_SYSCALL_BIT + 40) },
336
363
  { "sendfile64", __PNR_sendfile64 },
@@ -424,11 +451,15 @@ const struct arch_syscall_def x32_syscall_table[] = { \
424
451
  { "timer_delete", (X32_SYSCALL_BIT + 226) },
425
452
  { "timer_getoverrun", (X32_SYSCALL_BIT + 225) },
426
453
  { "timer_gettime", (X32_SYSCALL_BIT + 224) },
454
+ { "timer_gettime64", __PNR_timer_gettime64 },
427
455
  { "timer_settime", (X32_SYSCALL_BIT + 223) },
456
+ { "timer_settime64", __PNR_timer_settime64 },
428
457
  { "timerfd", __PNR_timerfd },
429
458
  { "timerfd_create", (X32_SYSCALL_BIT + 283) },
430
459
  { "timerfd_gettime", (X32_SYSCALL_BIT + 287) },
460
+ { "timerfd_gettime64", __PNR_timerfd_gettime64 },
431
461
  { "timerfd_settime", (X32_SYSCALL_BIT + 286) },
462
+ { "timerfd_settime64", __PNR_timerfd_settime64 },
432
463
  { "times", (X32_SYSCALL_BIT + 100) },
433
464
  { "tkill", (X32_SYSCALL_BIT + 200) },
434
465
  { "truncate", (X32_SYSCALL_BIT + 76) },
@@ -450,6 +481,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
450
481
  { "ustat", (X32_SYSCALL_BIT + 136) },
451
482
  { "utime", (X32_SYSCALL_BIT + 132) },
452
483
  { "utimensat", (X32_SYSCALL_BIT + 280) },
484
+ { "utimensat_time64", __PNR_utimensat_time64 },
453
485
  { "utimes", (X32_SYSCALL_BIT + 235) },
454
486
  { "vfork", (X32_SYSCALL_BIT + 58) },
455
487
  { "vhangup", (X32_SYSCALL_BIT + 153) },
@@ -26,7 +26,7 @@
26
26
  #include "arch.h"
27
27
  #include "arch-x86.h"
28
28
 
29
- /* NOTE: based on Linux 4.15-rc7 */
29
+ /* NOTE: based on Linux v5.4-rc4 */
30
30
  const struct arch_syscall_def x86_syscall_table[] = { \
31
31
  { "_llseek", 140 },
32
32
  { "_newselect", 142 },
@@ -58,11 +58,17 @@ const struct arch_syscall_def x86_syscall_table[] = { \
58
58
  { "chown32", 212 },
59
59
  { "chroot", 61 },
60
60
  { "clock_adjtime", 343 },
61
+ { "clock_adjtime64", 405 },
61
62
  { "clock_getres", 266 },
63
+ { "clock_getres_time64", 406 },
62
64
  { "clock_gettime", 265 },
65
+ { "clock_gettime64", 403 },
63
66
  { "clock_nanosleep", 267 },
67
+ { "clock_nanosleep_time64", 407 },
64
68
  { "clock_settime", 264 },
69
+ { "clock_settime64", 404 },
65
70
  { "clone", 120 },
71
+ { "clone3", 435 },
66
72
  { "close", 6 },
67
73
  { "connect", 362 },
68
74
  { "copy_file_range", 377 },
@@ -106,7 +112,11 @@ const struct arch_syscall_def x86_syscall_table[] = { \
106
112
  { "flock", 143 },
107
113
  { "fork", 2 },
108
114
  { "fremovexattr", 237 },
115
+ { "fsconfig", 431 },
109
116
  { "fsetxattr", 228 },
117
+ { "fsmount", 432 },
118
+ { "fsopen", 430 },
119
+ { "fspick", 433 },
110
120
  { "fstat", 108 },
111
121
  { "fstat64", 197 },
112
122
  { "fstatat64", 300 },
@@ -117,6 +127,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
117
127
  { "ftruncate", 93 },
118
128
  { "ftruncate64", 194 },
119
129
  { "futex", 240 },
130
+ { "futex_time64", 422 },
120
131
  { "futimesat", 299 },
121
132
  { "get_kernel_syms", 130 },
122
133
  { "get_mempolicy", 275 },
@@ -169,8 +180,12 @@ const struct arch_syscall_def x86_syscall_table[] = { \
169
180
  { "io_destroy", 246 },
170
181
  { "io_getevents", 247 },
171
182
  { "io_pgetevents", 385 },
183
+ { "io_pgetevents_time64", 416 },
172
184
  { "io_setup", 245 },
173
185
  { "io_submit", 248 },
186
+ { "io_uring_setup", 425 },
187
+ { "io_uring_enter", 426 },
188
+ { "io_uring_register", 427 },
174
189
  { "ioctl", 54 },
175
190
  { "ioperm", 101 },
176
191
  { "iopl", 110 },
@@ -214,6 +229,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
214
229
  { "mmap2", 192 },
215
230
  { "modify_ldt", 123 },
216
231
  { "mount", 21 },
232
+ { "move_mount", 429 },
217
233
  { "move_pages", 317 },
218
234
  { "mprotect", 125 },
219
235
  { "mpx", 56 },
@@ -221,13 +237,15 @@ const struct arch_syscall_def x86_syscall_table[] = { \
221
237
  { "mq_notify", 281 },
222
238
  { "mq_open", 277 },
223
239
  { "mq_timedreceive", 280 },
240
+ { "mq_timedreceive_time64", 419 },
224
241
  { "mq_timedsend", 279 },
242
+ { "mq_timedsend_time64", 418 },
225
243
  { "mq_unlink", 278 },
226
244
  { "mremap", 163 },
227
- { "msgctl", __PNR_msgctl },
228
- { "msgget", __PNR_msgget },
229
- { "msgrcv", __PNR_msgrcv },
230
- { "msgsnd", __PNR_msgsnd },
245
+ { "msgctl", 402 },
246
+ { "msgget", 399 },
247
+ { "msgrcv", 401 },
248
+ { "msgsnd", 400 },
231
249
  { "msync", 144 },
232
250
  { "multiplexer", __PNR_multiplexer },
233
251
  { "munlock", 151 },
@@ -246,6 +264,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
246
264
  { "oldwait4", __PNR_oldwait4 },
247
265
  { "open", 5 },
248
266
  { "open_by_handle_at", 342 },
267
+ { "open_tree", 428 },
249
268
  { "openat", 295 },
250
269
  { "pause", 29 },
251
270
  { "pciconfig_iobase", __PNR_pciconfig_iobase },
@@ -253,6 +272,8 @@ const struct arch_syscall_def x86_syscall_table[] = { \
253
272
  { "pciconfig_write", __PNR_pciconfig_write },
254
273
  { "perf_event_open", 336 },
255
274
  { "personality", 136 },
275
+ { "pidfd_open", 434 },
276
+ { "pidfd_send_signal", 424 },
256
277
  { "pipe", 42 },
257
278
  { "pipe2", 331 },
258
279
  { "pivot_root", 217 },
@@ -261,6 +282,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
261
282
  { "pkey_mprotect", 380 },
262
283
  { "poll", 168 },
263
284
  { "ppoll", 309 },
285
+ { "ppoll_time64", 414 },
264
286
  { "prctl", 172 },
265
287
  { "pread64", 180 },
266
288
  { "preadv", 333 },
@@ -271,6 +293,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
271
293
  { "prof", 44 },
272
294
  { "profil", 98 },
273
295
  { "pselect6", 308 },
296
+ { "pselect6_time64", 413 },
274
297
  { "ptrace", 26 },
275
298
  { "putpmsg", 189 },
276
299
  { "pwrite64", 181 },
@@ -288,6 +311,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
288
311
  { "recv", __PNR_recv },
289
312
  { "recvfrom", 371 },
290
313
  { "recvmmsg", 337 },
314
+ { "recvmmsg_time64", 417 },
291
315
  { "recvmsg", 372 },
292
316
  { "remap_file_pages", 257 },
293
317
  { "removexattr", 235 },
@@ -305,6 +329,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
305
329
  { "rt_sigreturn", 173 },
306
330
  { "rt_sigsuspend", 179 },
307
331
  { "rt_sigtimedwait", 177 },
332
+ { "rt_sigtimedwait_time64", 421 },
308
333
  { "rt_tgsigqueueinfo", 335 },
309
334
  { "rtas", __PNR_rtas },
310
335
  { "s390_guarded_storage", __PNR_s390_guarded_storage },
@@ -319,6 +344,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
319
344
  { "sched_getparam", 155 },
320
345
  { "sched_getscheduler", 157 },
321
346
  { "sched_rr_get_interval", 161 },
347
+ { "sched_rr_get_interval_time64", 423 },
322
348
  { "sched_setaffinity", 241 },
323
349
  { "sched_setattr", 351 },
324
350
  { "sched_setparam", 154 },
@@ -327,10 +353,11 @@ const struct arch_syscall_def x86_syscall_table[] = { \
327
353
  { "seccomp", 354 },
328
354
  { "security", __PNR_security },
329
355
  { "select", 82 },
330
- { "semctl", __PNR_semctl },
331
- { "semget", __PNR_semget },
356
+ { "semctl", 394 },
357
+ { "semget", 393 },
332
358
  { "semop", __PNR_semop },
333
359
  { "semtimedop", __PNR_semtimedop },
360
+ { "semtimedop_time64", 420 },
334
361
  { "send", __PNR_send },
335
362
  { "sendfile", 187 },
336
363
  { "sendfile64", 239 },
@@ -372,10 +399,10 @@ const struct arch_syscall_def x86_syscall_table[] = { \
372
399
  { "setuid32", 213 },
373
400
  { "setxattr", 226 },
374
401
  { "sgetmask", 68 },
375
- { "shmat", __PNR_shmat },
376
- { "shmctl", __PNR_shmctl },
377
- { "shmdt", __PNR_shmdt },
378
- { "shmget", __PNR_shmget },
402
+ { "shmat", 397 },
403
+ { "shmctl", 396 },
404
+ { "shmdt", 398 },
405
+ { "shmget", 395 },
379
406
  { "shutdown", 373 },
380
407
  { "sigaction", 67 },
381
408
  { "sigaltstack", 186 },
@@ -424,11 +451,15 @@ const struct arch_syscall_def x86_syscall_table[] = { \
424
451
  { "timer_delete", 263 },
425
452
  { "timer_getoverrun", 262 },
426
453
  { "timer_gettime", 261 },
454
+ { "timer_gettime64", 408 },
427
455
  { "timer_settime", 260 },
456
+ { "timer_settime64", 409 },
428
457
  { "timerfd", __PNR_timerfd },
429
458
  { "timerfd_create", 322 },
430
459
  { "timerfd_gettime", 326 },
460
+ { "timerfd_gettime64", 410 },
431
461
  { "timerfd_settime", 325 },
462
+ { "timerfd_settime64", 411 },
432
463
  { "times", 43 },
433
464
  { "tkill", 238 },
434
465
  { "truncate", 92 },
@@ -450,6 +481,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
450
481
  { "ustat", 62 },
451
482
  { "utime", 30 },
452
483
  { "utimensat", 320 },
484
+ { "utimensat_time64", 412 },
453
485
  { "utimes", 271 },
454
486
  { "vfork", 190 },
455
487
  { "vhangup", 111 },
@@ -483,7 +515,7 @@ int x86_syscall_resolve_name(const char *name)
483
515
 
484
516
  if (strcmp(name, "accept") == 0)
485
517
  return __PNR_accept;
486
- if (strcmp(name, "accept4") == 0)
518
+ else if (strcmp(name, "accept4") == 0)
487
519
  return __PNR_accept4;
488
520
  else if (strcmp(name, "bind") == 0)
489
521
  return __PNR_bind;
@@ -522,6 +554,31 @@ int x86_syscall_resolve_name(const char *name)
522
554
  else if (strcmp(name, "socketpair") == 0)
523
555
  return __PNR_socketpair;
524
556
 
557
+ if (strcmp(name, "semop") == 0)
558
+ return __PNR_semop;
559
+ else if (strcmp(name, "semget") == 0)
560
+ return __PNR_semget;
561
+ else if (strcmp(name, "semctl") == 0)
562
+ return __PNR_semctl;
563
+ else if (strcmp(name, "semtimedop") == 0)
564
+ return __PNR_semtimedop;
565
+ else if (strcmp(name, "msgsnd") == 0)
566
+ return __PNR_msgsnd;
567
+ else if (strcmp(name, "msgrcv") == 0)
568
+ return __PNR_msgrcv;
569
+ else if (strcmp(name, "msgget") == 0)
570
+ return __PNR_msgget;
571
+ else if (strcmp(name, "msgctl") == 0)
572
+ return __PNR_msgctl;
573
+ else if (strcmp(name, "shmat") == 0)
574
+ return __PNR_shmat;
575
+ else if (strcmp(name, "shmdt") == 0)
576
+ return __PNR_shmdt;
577
+ else if (strcmp(name, "shmget") == 0)
578
+ return __PNR_shmget;
579
+ else if (strcmp(name, "shmctl") == 0)
580
+ return __PNR_shmctl;
581
+
525
582
  for (iter = 0; table[iter].name != NULL; iter++) {
526
583
  if (strcmp(name, table[iter].name) == 0)
527
584
  return table[iter].num;
@@ -587,6 +644,31 @@ const char *x86_syscall_resolve_num(int num)
587
644
  else if (num == __PNR_socketpair)
588
645
  return "socketpair";
589
646
 
647
+ if (num == __PNR_semop)
648
+ return "semop";
649
+ else if (num == __PNR_semget)
650
+ return "semget";
651
+ else if (num == __PNR_semctl)
652
+ return "semctl";
653
+ else if (num == __PNR_semtimedop)
654
+ return "semtimedop";
655
+ else if (num == __PNR_msgsnd)
656
+ return "msgsnd";
657
+ else if (num == __PNR_msgrcv)
658
+ return "msgrcv";
659
+ else if (num == __PNR_msgget)
660
+ return "msgget";
661
+ else if (num == __PNR_msgctl)
662
+ return "msgctl";
663
+ else if (num == __PNR_shmat)
664
+ return "shmat";
665
+ else if (num == __PNR_shmdt)
666
+ return "shmdt";
667
+ else if (num == __PNR_shmget)
668
+ return "shmget";
669
+ else if (num == __PNR_shmctl)
670
+ return "shmctl";
671
+
590
672
  for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) {
591
673
  if (num == table[iter].num)
592
674
  return table[iter].name;
@@ -43,16 +43,16 @@ const struct arch_def arch_def_x86 = {
43
43
  };
44
44
 
45
45
  /**
46
- * Convert a multiplexed pseudo socket syscall into a direct syscall
47
- * @param socketcall the multiplexed pseudo syscall number
46
+ * Convert a multiplexed pseudo syscall into a direct syscall
47
+ * @param syscall the multiplexed pseudo syscall number
48
48
  *
49
49
  * Return the related direct syscall number, __NR_SCMP_UNDEF is there is
50
50
  * no related syscall, or __NR_SCMP_ERROR otherwise.
51
51
  *
52
52
  */
53
- static int _x86_sock_demux(int socketcall)
53
+ static int _x86_syscall_demux(int syscall)
54
54
  {
55
- switch (socketcall) {
55
+ switch (syscall) {
56
56
  case -101:
57
57
  /* socket */
58
58
  return 359;
@@ -113,20 +113,56 @@ static int _x86_sock_demux(int socketcall)
113
113
  case -120:
114
114
  /* sendmmsg */
115
115
  return 345;
116
+ case -201:
117
+ /* semop - not defined */
118
+ return __NR_SCMP_UNDEF;
119
+ case -202:
120
+ /* semget */
121
+ return 393;
122
+ case -203:
123
+ /* semctl */
124
+ return 394;
125
+ case -204:
126
+ /* semtimedop - not defined */
127
+ return __NR_SCMP_UNDEF;
128
+ case -211:
129
+ /* msgsnd */
130
+ return 400;
131
+ case -212:
132
+ /* msgrcv */
133
+ return 401;
134
+ case -213:
135
+ /* msgget */
136
+ return 399;
137
+ case -214:
138
+ /* msgctl */
139
+ return 402;
140
+ case -221:
141
+ /* shmat */
142
+ return 397;
143
+ case -222:
144
+ /* shmdt */
145
+ return 398;
146
+ case -223:
147
+ /* shmget */
148
+ return 395;
149
+ case -224:
150
+ /* shmctl */
151
+ return 396;
116
152
  }
117
153
 
118
154
  return __NR_SCMP_ERROR;
119
155
  }
120
156
 
121
157
  /**
122
- * Convert a direct socket syscall into multiplexed pseudo socket syscall
158
+ * Convert a direct syscall into multiplexed pseudo socket syscall
123
159
  * @param syscall the direct syscall
124
160
  *
125
161
  * Return the related multiplexed pseduo syscall number, __NR_SCMP_UNDEF is
126
162
  * there is no related pseudo syscall, or __NR_SCMP_ERROR otherwise.
127
163
  *
128
164
  */
129
- static int _x86_sock_mux(int syscall)
165
+ static int _x86_syscall_mux(int syscall)
130
166
  {
131
167
  switch (syscall) {
132
168
  case 337:
@@ -180,6 +216,36 @@ static int _x86_sock_mux(int syscall)
180
216
  case 373:
181
217
  /* shutdown */
182
218
  return -113;
219
+ case 393:
220
+ /* semget */
221
+ return -202;
222
+ case 394:
223
+ /* semctl */
224
+ return -203;
225
+ case 400:
226
+ /* msgsnd */
227
+ return -211;
228
+ case 401:
229
+ /* msgrcv */
230
+ return -212;
231
+ case 399:
232
+ /* msgget */
233
+ return -213;
234
+ case 402:
235
+ /* msgctl */
236
+ return -214;
237
+ case 397:
238
+ /* shmat */
239
+ return -221;
240
+ case 398:
241
+ /* shmdt */
242
+ return -222;
243
+ case 395:
244
+ /* shmget */
245
+ return -223;
246
+ case 396:
247
+ /* shmctl */
248
+ return -224;
183
249
  }
184
250
 
185
251
  return __NR_SCMP_ERROR;
@@ -244,7 +310,7 @@ int x86_rule_add(struct db_filter *db, struct db_api_rule_list *rule)
244
310
 
245
311
  /* determine both the muxed and direct syscall numbers */
246
312
  if (sys > 0) {
247
- sys_a = _x86_sock_mux(sys);
313
+ sys_a = _x86_syscall_mux(sys);
248
314
  if (sys_a == __NR_SCMP_ERROR) {
249
315
  rc = __NR_SCMP_ERROR;
250
316
  goto add_return;
@@ -252,7 +318,7 @@ int x86_rule_add(struct db_filter *db, struct db_api_rule_list *rule)
252
318
  sys_b = sys;
253
319
  } else {
254
320
  sys_a = sys;
255
- sys_b = _x86_sock_demux(sys);
321
+ sys_b = _x86_syscall_demux(sys);
256
322
  if (sys_b == __NR_SCMP_ERROR) {
257
323
  rc = __NR_SCMP_ERROR;
258
324
  goto add_return;
@@ -305,24 +371,81 @@ int x86_rule_add(struct db_filter *db, struct db_api_rule_list *rule)
305
371
  if (rc < 0)
306
372
  goto add_return;
307
373
  }
308
- } else if (sys <= -200 && sys >= -224) {
309
- /* multiplexed ipc syscalls */
374
+ } else if ((sys <= -200 && sys >= -224) || (sys >= 393 && sys <= 402)) {
375
+ /* (-200 to -224) : multiplexed ipc syscalls
376
+ (393 to 402) : direct ipc syscalls */
377
+
378
+ /* strict check for the multiplexed socket syscalls */
310
379
  for (iter = 0; iter < ARG_COUNT_MAX; iter++) {
311
380
  if ((rule->args[iter].valid != 0) && (rule->strict)) {
312
381
  rc = -EINVAL;
313
382
  goto add_return;
314
383
  }
315
384
  }
316
- rule->args[0].arg = 0;
317
- rule->args[0].op = SCMP_CMP_EQ;
318
- rule->args[0].mask = DATUM_MAX;
319
- rule->args[0].datum = abs(sys) % 200;
320
- rule->args[0].valid = 1;
321
- rule->syscall = __x86_NR_ipc;
322
385
 
323
- rc = db_rule_add(db, rule);
324
- if (rc < 0)
325
- goto add_return;
386
+ /* determine both the muxed and direct syscall numbers */
387
+ if (sys > 0) {
388
+ sys_a = _x86_syscall_mux(sys);
389
+ if (sys_a == __NR_SCMP_ERROR) {
390
+ rc = __NR_SCMP_ERROR;
391
+ goto add_return;
392
+ }
393
+ sys_b = sys;
394
+ } else {
395
+ sys_a = sys;
396
+ sys_b = _x86_syscall_demux(sys);
397
+ if (sys_b == __NR_SCMP_ERROR) {
398
+ rc = __NR_SCMP_ERROR;
399
+ goto add_return;
400
+ }
401
+ }
402
+
403
+ /* use rule_a for the multiplexed syscall and use rule_b for
404
+ * the direct wired syscall */
405
+
406
+ if (sys_a == __NR_SCMP_UNDEF) {
407
+ rule_a = NULL;
408
+ rule_b = rule;
409
+ } else if (sys_b == __NR_SCMP_UNDEF) {
410
+ rule_a = rule;
411
+ rule_b = NULL;
412
+ } else {
413
+ /* need two rules, dup the first and link together */
414
+ rule_a = rule;
415
+ rule_dup = db_rule_dup(rule_a);
416
+ rule_b = rule_dup;
417
+ if (rule_b == NULL)
418
+ goto add_return;
419
+ rule_b->prev = rule_a;
420
+ rule_b->next = NULL;
421
+ rule_a->next = rule_b;
422
+ }
423
+
424
+ /* multiplexed socket syscalls */
425
+ if (rule_a != NULL) {
426
+ rule_a->syscall = __x86_NR_ipc;
427
+ rule_a->args[0].arg = 0;
428
+ rule_a->args[0].op = SCMP_CMP_EQ;
429
+ rule_a->args[0].mask = DATUM_MAX;
430
+ rule_a->args[0].datum = (-sys_a) % 200;
431
+ rule_a->args[0].valid = 1;
432
+ }
433
+
434
+ /* direct wired socket syscalls */
435
+ if (rule_b != NULL)
436
+ rule_b->syscall = sys_b;
437
+
438
+ /* we should be protected by a transaction checkpoint */
439
+ if (rule_a != NULL) {
440
+ rc = db_rule_add(db, rule_a);
441
+ if (rc < 0)
442
+ goto add_return;
443
+ }
444
+ if (rule_b != NULL) {
445
+ rc = db_rule_add(db, rule_b);
446
+ if (rc < 0)
447
+ goto add_return;
448
+ }
326
449
  } else if (sys >= 0) {
327
450
  /* normal syscall processing */
328
451
  rc = db_rule_add(db, rule);