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.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +8 -6
- data/.ruby-version +1 -1
- data/Gemfile +2 -1
- data/bin/sandbox +1 -1
- data/ext/enterprise_script_service/Rakefile +1 -1
- data/ext/enterprise_script_service/flags.rb +5 -0
- data/ext/enterprise_script_service/libseccomp/CHANGELOG +15 -0
- data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
- data/ext/enterprise_script_service/libseccomp/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/README.md +1 -1
- data/ext/enterprise_script_service/libseccomp/SECURITY.md +45 -0
- data/ext/enterprise_script_service/libseccomp/configure.ac +3 -3
- data/ext/enterprise_script_service/libseccomp/doc/admin/MAINTAINER_PROCESS.md +95 -0
- data/ext/enterprise_script_service/libseccomp/{RELEASE_PROCESS.md → doc/admin/RELEASE_PROCESS.md} +9 -1
- data/ext/enterprise_script_service/libseccomp/include/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +2292 -0
- data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +3 -1065
- data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +34 -2
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +44 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +46 -14
- data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +142 -18
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +47 -15
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +143 -17
- data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +94 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +142 -19
- data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/db.c +1 -0
- data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +10 -3
- data/ext/enterprise_script_service/libseccomp/src/python/Makefile.am +4 -4
- data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +2 -0
- data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.c +98 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.py +61 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.tests +18 -0
- data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
- data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -2
- data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -0
- data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
- data/ext/enterprise_script_service/mruby-mpdecimal/src/ext.c +1 -1
- data/ext/enterprise_script_service/mruby/.gitignore +2 -2
- data/ext/enterprise_script_service/mruby/CONTRIBUTING.md +10 -3
- data/ext/enterprise_script_service/mruby/Doxyfile +2408 -0
- data/ext/enterprise_script_service/mruby/README.md +21 -8
- data/ext/enterprise_script_service/mruby/Rakefile +4 -13
- data/ext/enterprise_script_service/mruby/appveyor_config.rb +1 -1
- data/ext/enterprise_script_service/mruby/build_config.rb +3 -3
- data/ext/enterprise_script_service/mruby/doc/guides/compile.md +42 -42
- data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
- data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +45 -6
- data/ext/enterprise_script_service/mruby/doc/guides/mrbgems.md +5 -0
- data/ext/enterprise_script_service/mruby/doc/limitations.md +88 -38
- data/ext/enterprise_script_service/mruby/doc/mruby_logo_red_icon.png +0 -0
- data/ext/enterprise_script_service/mruby/doc/opcode.md +94 -94
- data/ext/enterprise_script_service/mruby/include/mrbconf.h +74 -11
- data/ext/enterprise_script_service/mruby/include/mruby.h +242 -146
- data/ext/enterprise_script_service/mruby/include/mruby/array.h +7 -7
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +2 -9
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_no.h +11 -10
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +104 -69
- data/ext/enterprise_script_service/mruby/include/mruby/class.h +7 -5
- data/ext/enterprise_script_service/mruby/include/mruby/common.h +9 -7
- data/ext/enterprise_script_service/mruby/include/mruby/compile.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/data.h +5 -5
- data/ext/enterprise_script_service/mruby/include/mruby/debug.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/dump.h +3 -7
- data/ext/enterprise_script_service/mruby/include/mruby/error.h +34 -6
- data/ext/enterprise_script_service/mruby/include/mruby/gc.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/hash.h +4 -11
- data/ext/enterprise_script_service/mruby/include/mruby/irep.h +16 -4
- data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -4
- data/ext/enterprise_script_service/mruby/include/mruby/khash.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +41 -7
- data/ext/enterprise_script_service/mruby/include/mruby/object.h +8 -9
- data/ext/enterprise_script_service/mruby/include/mruby/opcode.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/ops.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/proc.h +19 -13
- data/ext/enterprise_script_service/mruby/include/mruby/range.h +10 -4
- data/ext/enterprise_script_service/mruby/include/mruby/re.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/string.h +130 -107
- data/ext/enterprise_script_service/mruby/include/mruby/throw.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/value.h +137 -49
- data/ext/enterprise_script_service/mruby/include/mruby/variable.h +3 -5
- data/ext/enterprise_script_service/mruby/include/mruby/version.h +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby-core-ext.rb +2 -39
- data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +32 -15
- data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +63 -17
- data/ext/enterprise_script_service/mruby/lib/mruby/build/load_gems.rb +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +11 -7
- data/ext/enterprise_script_service/mruby/lib/mruby/lockfile.rb +81 -0
- data/ext/enterprise_script_service/mruby/minirake +27 -11
- data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +47 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +50 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +28 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +1 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +75 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +134 -90
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +7 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +69 -46
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/keywords +0 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/lex.def +51 -59
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +430 -241
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrbgem.rake +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +122 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +249 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/test/complex.rb +153 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/mrblib/chain.rb +19 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/test/enum_chain.rb +41 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +30 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/test/enum.rb +8 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +46 -14
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +51 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +47 -44
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c +9 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +16 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/test/fiber.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/test/hash.rb +3 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/README.md +1 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file.rb +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +24 -38
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/kernel.rb +16 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +19 -18
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +5 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +54 -42
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +24 -20
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file_test.rb +4 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +41 -35
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +9 -36
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +9 -27
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +2 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/src/math.c +5 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +39 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +48 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/method.rb +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +134 -101
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/test/method.rb +9 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +17 -37
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +0 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +15 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +35 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/test/nil.rb +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +28 -23
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/test/pack.rb +43 -49
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/mrblib/print.rb +3 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +6 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/test/proc.rb +21 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.c +157 -124
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/test/random.rb +72 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/mrblib/range.rb +38 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +26 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/test/range.rb +111 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrbgem.rake +5 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +117 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +209 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/test/rational.rb +308 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/README.md +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/src/socket.c +10 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/kernel.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +22 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +8 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +116 -117
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/numeric.rb +29 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/range.rb +26 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/string.rb +32 -50
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/mrblib/struct.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +43 -57
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/test/struct.rb +16 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/driver.c +152 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +4 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/vformat.c +200 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/include/mruby/time.h +2 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +199 -68
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/test/time.rb +81 -46
- data/ext/enterprise_script_service/mruby/mrblib/array.rb +14 -16
- data/ext/enterprise_script_service/mruby/mrblib/enum.rb +13 -9
- data/ext/enterprise_script_service/mruby/mrblib/hash.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrblib/kernel.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/numeric.rb +4 -4
- data/ext/enterprise_script_service/mruby/mrblib/range.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/string.rb +55 -112
- data/ext/enterprise_script_service/mruby/mruby-source.gemspec +1 -1
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby.dict +105 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_fuzzer.options +5 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_proto_fuzzer.options +4 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_fuzzer.c +18 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_proto_fuzzer.cpp +44 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.cpp +455 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h +55 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/ruby.proto +201 -0
- data/ext/enterprise_script_service/mruby/src/array.c +95 -46
- data/ext/enterprise_script_service/mruby/src/backtrace.c +6 -8
- data/ext/enterprise_script_service/mruby/src/class.c +370 -278
- data/ext/enterprise_script_service/mruby/src/codedump.c +34 -34
- data/ext/enterprise_script_service/mruby/src/debug.c +2 -2
- data/ext/enterprise_script_service/mruby/src/dump.c +8 -6
- data/ext/enterprise_script_service/mruby/src/enum.c +1 -1
- data/ext/enterprise_script_service/mruby/src/error.c +157 -55
- data/ext/enterprise_script_service/mruby/src/etc.c +13 -46
- data/ext/enterprise_script_service/mruby/src/fmt_fp.c +2 -2
- data/ext/enterprise_script_service/mruby/src/gc.c +30 -11
- data/ext/enterprise_script_service/mruby/src/hash.c +23 -14
- data/ext/enterprise_script_service/mruby/src/kernel.c +16 -54
- data/ext/enterprise_script_service/mruby/src/load.c +40 -76
- data/ext/enterprise_script_service/mruby/src/numeric.c +164 -94
- data/ext/enterprise_script_service/mruby/src/object.c +16 -39
- data/ext/enterprise_script_service/mruby/src/pool.c +0 -2
- data/ext/enterprise_script_service/mruby/src/proc.c +47 -48
- data/ext/enterprise_script_service/mruby/src/range.c +22 -35
- data/ext/enterprise_script_service/mruby/src/state.c +5 -94
- data/ext/enterprise_script_service/mruby/src/string.c +874 -710
- data/ext/enterprise_script_service/mruby/src/symbol.c +73 -48
- data/ext/enterprise_script_service/mruby/src/variable.c +58 -38
- data/ext/enterprise_script_service/mruby/src/vm.c +133 -304
- data/ext/enterprise_script_service/mruby/tasks/doc.rake +48 -0
- data/ext/enterprise_script_service/mruby/tasks/toolchains/clang.rake +3 -4
- data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +20 -19
- data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +0 -12
- data/ext/enterprise_script_service/mruby/test/assert.rb +186 -25
- data/ext/enterprise_script_service/mruby/test/t/array.rb +34 -6
- data/ext/enterprise_script_service/mruby/test/t/class.rb +26 -0
- data/ext/enterprise_script_service/mruby/test/t/enumerable.rb +2 -2
- data/ext/enterprise_script_service/mruby/test/t/float.rb +17 -17
- data/ext/enterprise_script_service/mruby/test/t/hash.rb +2 -0
- data/ext/enterprise_script_service/mruby/test/t/integer.rb +14 -6
- data/ext/enterprise_script_service/mruby/test/t/kernel.rb +38 -19
- data/ext/enterprise_script_service/mruby/test/t/module.rb +87 -14
- data/ext/enterprise_script_service/mruby/test/t/numeric.rb +65 -23
- data/ext/enterprise_script_service/mruby/test/t/range.rb +4 -4
- data/ext/enterprise_script_service/mruby/test/t/string.rb +211 -49
- data/ext/enterprise_script_service/mruby/test/t/syntax.rb +19 -2
- data/ext/enterprise_script_service/mruby/test/t/vformat.rb +92 -0
- data/ext/enterprise_script_service/mruby/travis_config.rb +2 -2
- data/ext/enterprise_script_service/mruby_config.rb +10 -0
- data/ext/enterprise_script_service/mruby_engine.cpp +2 -2
- data/ext/enterprise_script_service/mruby_engine.gembox +1 -0
- data/ext/enterprise_script_service/msgpack/CHANGELOG.md +14 -0
- data/ext/enterprise_script_service/msgpack/Files.cmake +4 -0
- data/ext/enterprise_script_service/msgpack/README.md +1 -1
- data/ext/enterprise_script_service/msgpack/appveyor.yml +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_zone.hpp.erb +3 -3
- data/ext/enterprise_script_service/msgpack/example/boost/asio_send_recv.cpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/cpp11/timespec.hpp +16 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/wstring.hpp +15 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/object.h +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/pack_template.h +17 -9
- data/ext/enterprise_script_service/msgpack/include/msgpack/sysdep.h +27 -16
- data/ext/enterprise_script_service/msgpack/include/msgpack/type.hpp +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/unpack_template.h +5 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +0 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/check_container_size.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/chrono.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/timespec.hpp +140 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +10 -10
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/ext.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/fixint.hpp +5 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int.hpp +40 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int_decl.hpp +3 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +121 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp03_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp11_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object_fwd.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/pack.hpp +40 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/unpack.hpp +11 -11
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/vrefbuffer.hpp +7 -7
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/zbuffer.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/create_object_visitor.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/x3_parse.hpp +28 -26
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/zone.h +1 -1
- data/ext/enterprise_script_service/msgpack/src/objectc.c +83 -148
- data/ext/enterprise_script_service/msgpack/src/unpack.c +73 -47
- data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +1 -1
- data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +15 -9
- data/ext/enterprise_script_service/msgpack/test/buffer.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/carray.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/cases.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/convert.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/fixint.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +6 -1
- data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +8 -2
- data/ext/enterprise_script_service/msgpack/test/json.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/limit.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +128 -6
- data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +7 -2
- data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +20 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +159 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +8 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +23 -18
- data/ext/enterprise_script_service/msgpack/test/object.cpp +77 -45
- data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +28 -10
- data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +25 -18
- data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/raw.cpp +17 -12
- data/ext/enterprise_script_service/msgpack/test/reference.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +6 -2
- data/ext/enterprise_script_service/msgpack/test/streaming.cpp +10 -3
- data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/user_class.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/version.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/visitor.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/zone.cpp +6 -0
- data/lib/script_core/version.rb +1 -1
- data/lib/tasks/mruby/engine.gembox.example +1 -0
- data/lib/tasks/script_core.rake +21 -3
- data/spec/dummy/app/helpers/fields_helper.rb +2 -2
- data/spec/dummy/mruby/engine.gembox +1 -0
- data/spec/script_core_spec.rb +1 -1
- metadata +38 -22
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.gitignore +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrblib/kernel.rb +0 -15
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/unbound_method.rb +0 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.gitignore +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/packtest.rb +0 -157
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.c +0 -224
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.h +0 -80
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.h +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.gitignore +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis.yml +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis_build_config.rb +0 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/Rakefile +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/.travis.yml +0 -4
- 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-x86_64.h"
|
28
28
|
|
29
|
-
/* NOTE: based on Linux 4
|
29
|
+
/* NOTE: based on Linux v5.4-rc4 */
|
30
30
|
const struct arch_syscall_def x86_64_syscall_table[] = { \
|
31
31
|
{ "_llseek", __PNR__llseek },
|
32
32
|
{ "_newselect", __PNR__newselect },
|
@@ -58,11 +58,17 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
58
58
|
{ "chown32", __PNR_chown32 },
|
59
59
|
{ "chroot", 161 },
|
60
60
|
{ "clock_adjtime", 305 },
|
61
|
+
{ "clock_adjtime64", __PNR_clock_adjtime64 },
|
61
62
|
{ "clock_getres", 229 },
|
63
|
+
{ "clock_getres_time64", __PNR_clock_getres_time64 },
|
62
64
|
{ "clock_gettime", 228 },
|
65
|
+
{ "clock_gettime64", __PNR_clock_gettime64 },
|
63
66
|
{ "clock_nanosleep", 230 },
|
67
|
+
{ "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 },
|
64
68
|
{ "clock_settime", 227 },
|
69
|
+
{ "clock_settime64", __PNR_clock_settime64 },
|
65
70
|
{ "clone", 56 },
|
71
|
+
{ "clone3", 435 },
|
66
72
|
{ "close", 3 },
|
67
73
|
{ "connect", 42 },
|
68
74
|
{ "copy_file_range", 326 },
|
@@ -106,7 +112,11 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
106
112
|
{ "flock", 73 },
|
107
113
|
{ "fork", 57 },
|
108
114
|
{ "fremovexattr", 199 },
|
115
|
+
{ "fsconfig", 431 },
|
109
116
|
{ "fsetxattr", 190 },
|
117
|
+
{ "fsmount", 432 },
|
118
|
+
{ "fsopen", 430 },
|
119
|
+
{ "fspick", 433 },
|
110
120
|
{ "fstat", 5 },
|
111
121
|
{ "fstat64", __PNR_fstat64 },
|
112
122
|
{ "fstatat64", __PNR_fstatat64 },
|
@@ -117,6 +127,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
117
127
|
{ "ftruncate", 77 },
|
118
128
|
{ "ftruncate64", __PNR_ftruncate64 },
|
119
129
|
{ "futex", 202 },
|
130
|
+
{ "futex_time64", __PNR_futex_time64 },
|
120
131
|
{ "futimesat", 261 },
|
121
132
|
{ "get_kernel_syms", 177 },
|
122
133
|
{ "get_mempolicy", 239 },
|
@@ -169,8 +180,12 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
169
180
|
{ "io_destroy", 207 },
|
170
181
|
{ "io_getevents", 208 },
|
171
182
|
{ "io_pgetevents", 333 },
|
183
|
+
{ "io_pgetevents_time64", __PNR_io_pgetevents_time64 },
|
172
184
|
{ "io_setup", 206 },
|
173
185
|
{ "io_submit", 209 },
|
186
|
+
{ "io_uring_setup", 425 },
|
187
|
+
{ "io_uring_enter", 426 },
|
188
|
+
{ "io_uring_register", 427 },
|
174
189
|
{ "ioctl", 16 },
|
175
190
|
{ "ioperm", 173 },
|
176
191
|
{ "iopl", 172 },
|
@@ -214,6 +229,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
214
229
|
{ "mmap2", __PNR_mmap2 },
|
215
230
|
{ "modify_ldt", 154 },
|
216
231
|
{ "mount", 165 },
|
232
|
+
{ "move_mount", 429 },
|
217
233
|
{ "move_pages", 279 },
|
218
234
|
{ "mprotect", 10 },
|
219
235
|
{ "mpx", __PNR_mpx },
|
@@ -221,7 +237,9 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
221
237
|
{ "mq_notify", 244 },
|
222
238
|
{ "mq_open", 240 },
|
223
239
|
{ "mq_timedreceive", 243 },
|
240
|
+
{ "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 },
|
224
241
|
{ "mq_timedsend", 242 },
|
242
|
+
{ "mq_timedsend_time64", __PNR_mq_timedsend_time64 },
|
225
243
|
{ "mq_unlink", 241 },
|
226
244
|
{ "mremap", 25 },
|
227
245
|
{ "msgctl", 71 },
|
@@ -246,6 +264,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
246
264
|
{ "oldwait4", __PNR_oldwait4 },
|
247
265
|
{ "open", 2 },
|
248
266
|
{ "open_by_handle_at", 304 },
|
267
|
+
{ "open_tree", 428 },
|
249
268
|
{ "openat", 257 },
|
250
269
|
{ "pause", 34 },
|
251
270
|
{ "pciconfig_iobase", __PNR_pciconfig_iobase },
|
@@ -253,6 +272,8 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
253
272
|
{ "pciconfig_write", __PNR_pciconfig_write },
|
254
273
|
{ "perf_event_open", 298 },
|
255
274
|
{ "personality", 135 },
|
275
|
+
{ "pidfd_open", 434 },
|
276
|
+
{ "pidfd_send_signal", 424 },
|
256
277
|
{ "pipe", 22 },
|
257
278
|
{ "pipe2", 293 },
|
258
279
|
{ "pivot_root", 155 },
|
@@ -261,6 +282,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
261
282
|
{ "pkey_mprotect", 329 },
|
262
283
|
{ "poll", 7 },
|
263
284
|
{ "ppoll", 271 },
|
285
|
+
{ "ppoll_time64", __PNR_ppoll_time64 },
|
264
286
|
{ "prctl", 157 },
|
265
287
|
{ "pread64", 17 },
|
266
288
|
{ "preadv", 295 },
|
@@ -271,6 +293,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
271
293
|
{ "prof", __PNR_prof },
|
272
294
|
{ "profil", __PNR_profil },
|
273
295
|
{ "pselect6", 270 },
|
296
|
+
{ "pselect6_time64", __PNR_pselect6_time64 },
|
274
297
|
{ "ptrace", 101 },
|
275
298
|
{ "putpmsg", 182 },
|
276
299
|
{ "pwrite64", 18 },
|
@@ -288,6 +311,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
288
311
|
{ "recv", __PNR_recv },
|
289
312
|
{ "recvfrom", 45 },
|
290
313
|
{ "recvmmsg", 299 },
|
314
|
+
{ "recvmmsg_time64", __PNR_recvmmsg_time64 },
|
291
315
|
{ "recvmsg", 47 },
|
292
316
|
{ "remap_file_pages", 216 },
|
293
317
|
{ "removexattr", 197 },
|
@@ -305,6 +329,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
305
329
|
{ "rt_sigreturn", 15 },
|
306
330
|
{ "rt_sigsuspend", 130 },
|
307
331
|
{ "rt_sigtimedwait", 128 },
|
332
|
+
{ "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 },
|
308
333
|
{ "rt_tgsigqueueinfo", 297 },
|
309
334
|
{ "rtas", __PNR_rtas },
|
310
335
|
{ "s390_guarded_storage", __PNR_s390_guarded_storage },
|
@@ -319,6 +344,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
319
344
|
{ "sched_getparam", 143 },
|
320
345
|
{ "sched_getscheduler", 145 },
|
321
346
|
{ "sched_rr_get_interval", 148 },
|
347
|
+
{ "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 },
|
322
348
|
{ "sched_setaffinity", 203 },
|
323
349
|
{ "sched_setattr", 314 },
|
324
350
|
{ "sched_setparam", 142 },
|
@@ -331,6 +357,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
331
357
|
{ "semget", 64 },
|
332
358
|
{ "semop", 65 },
|
333
359
|
{ "semtimedop", 220 },
|
360
|
+
{ "semtimedop_time64", __PNR_semtimedop_time64 },
|
334
361
|
{ "send", __PNR_send },
|
335
362
|
{ "sendfile", 40 },
|
336
363
|
{ "sendfile64", __PNR_sendfile64 },
|
@@ -424,11 +451,15 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
424
451
|
{ "timer_delete", 226 },
|
425
452
|
{ "timer_getoverrun", 225 },
|
426
453
|
{ "timer_gettime", 224 },
|
454
|
+
{ "timer_gettime64", __PNR_timer_gettime64 },
|
427
455
|
{ "timer_settime", 223 },
|
456
|
+
{ "timer_settime64", __PNR_timer_settime64 },
|
428
457
|
{ "timerfd", __PNR_timerfd },
|
429
458
|
{ "timerfd_create", 283 },
|
430
459
|
{ "timerfd_gettime", 287 },
|
460
|
+
{ "timerfd_gettime64", __PNR_timerfd_gettime64 },
|
431
461
|
{ "timerfd_settime", 286 },
|
462
|
+
{ "timerfd_settime64", __PNR_timerfd_settime64 },
|
432
463
|
{ "times", 100 },
|
433
464
|
{ "tkill", 200 },
|
434
465
|
{ "truncate", 76 },
|
@@ -450,6 +481,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
|
|
450
481
|
{ "ustat", 136 },
|
451
482
|
{ "utime", 132 },
|
452
483
|
{ "utimensat", 280 },
|
484
|
+
{ "utimensat_time64", __PNR_utimensat_time64 },
|
453
485
|
{ "utimes", 235 },
|
454
486
|
{ "vfork", 58 },
|
455
487
|
{ "vhangup", 153 },
|
@@ -1063,6 +1063,7 @@ int db_col_reset(struct db_filter_col *col, uint32_t def_action)
|
|
1063
1063
|
col->attr.nnp_enable = 1;
|
1064
1064
|
col->attr.tsync_enable = 0;
|
1065
1065
|
col->attr.api_tskip = 0;
|
1066
|
+
col->attr.log_enable = 0;
|
1066
1067
|
|
1067
1068
|
/* set the state */
|
1068
1069
|
col->state = _DB_STA_VALID;
|
@@ -556,7 +556,7 @@ static void _state_release(struct bpf_state *state)
|
|
556
556
|
static int _hsh_add(struct bpf_state *state, struct bpf_blk **blk_p,
|
557
557
|
unsigned int found)
|
558
558
|
{
|
559
|
-
uint64_t h_val;
|
559
|
+
uint64_t h_val, h_val_tmp[3];
|
560
560
|
struct bpf_hash_bkt *h_new, *h_iter, *h_prev = NULL;
|
561
561
|
struct bpf_blk *blk = *blk_p;
|
562
562
|
struct bpf_blk *b_iter;
|
@@ -569,7 +569,10 @@ static int _hsh_add(struct bpf_state *state, struct bpf_blk **blk_p,
|
|
569
569
|
return -ENOMEM;
|
570
570
|
|
571
571
|
/* generate the hash */
|
572
|
-
|
572
|
+
h_val_tmp[0] = hash(blk->blks, _BLK_MSZE(blk));
|
573
|
+
h_val_tmp[1] = hash(&blk->acc_start, sizeof(blk->acc_start));
|
574
|
+
h_val_tmp[2] = hash(&blk->acc_end, sizeof(blk->acc_end));
|
575
|
+
h_val = hash(h_val_tmp, sizeof(h_val_tmp));
|
573
576
|
blk->hash = h_val;
|
574
577
|
blk->flag_hash = true;
|
575
578
|
blk->node = NULL;
|
@@ -584,7 +587,11 @@ hsh_add_restart:
|
|
584
587
|
if ((h_iter->blk->hash == h_val) &&
|
585
588
|
(_BLK_MSZE(h_iter->blk) == _BLK_MSZE(blk)) &&
|
586
589
|
(memcmp(h_iter->blk->blks, blk->blks,
|
587
|
-
_BLK_MSZE(blk)) == 0)
|
590
|
+
_BLK_MSZE(blk)) == 0) &&
|
591
|
+
_ACC_CMP_EQ(h_iter->blk->acc_start,
|
592
|
+
blk->acc_start) &&
|
593
|
+
_ACC_CMP_EQ(h_iter->blk->acc_end,
|
594
|
+
blk->acc_end)) {
|
588
595
|
/* duplicate block */
|
589
596
|
free(h_new);
|
590
597
|
|
@@ -40,12 +40,12 @@ build: ../libseccomp.la libseccomp.pxd seccomp.pyx setup.py
|
|
40
40
|
${PY_BUILD} && touch build
|
41
41
|
|
42
42
|
install-exec-local: build
|
43
|
-
${PY_INSTALL} --install-lib=${DESTDIR}/${
|
44
|
-
--record=${DESTDIR}/${
|
43
|
+
${PY_INSTALL} --install-lib=${DESTDIR}/${pyexecdir} \
|
44
|
+
--record=${DESTDIR}/${pyexecdir}/install_files.txt
|
45
45
|
|
46
46
|
uninstall-local:
|
47
|
-
cat ${DESTDIR}/${
|
48
|
-
${RM} -f ${DESTDIR}/${
|
47
|
+
cat ${DESTDIR}/${pyexecdir}/install_files.txt | xargs ${RM} -f
|
48
|
+
${RM} -f ${DESTDIR}/${pyexecdir}/install_files.txt
|
49
49
|
|
50
50
|
clean-local:
|
51
51
|
[ ${srcdir} == ${builddir} ] || ${RM} -f ${builddir}/seccomp.pyx
|
@@ -0,0 +1,98 @@
|
|
1
|
+
/**
|
2
|
+
* Seccomp Library test program
|
3
|
+
*
|
4
|
+
* Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
|
5
|
+
* Author: Tom Hromatka <tom.hromatka@oracle.com>
|
6
|
+
*/
|
7
|
+
|
8
|
+
/*
|
9
|
+
* This library is free software; you can redistribute it and/or modify it
|
10
|
+
* under the terms of version 2.1 of the GNU Lesser General Public License as
|
11
|
+
* published by the Free Software Foundation.
|
12
|
+
*
|
13
|
+
* This library is distributed in the hope that it will be useful, but WITHOUT
|
14
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
16
|
+
* for more details.
|
17
|
+
*
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
19
|
+
* along with this library; if not, see <http://www.gnu.org/licenses>.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include <errno.h>
|
23
|
+
#include <unistd.h>
|
24
|
+
|
25
|
+
#include <seccomp.h>
|
26
|
+
|
27
|
+
#include "util.h"
|
28
|
+
|
29
|
+
int main(int argc, char *argv[])
|
30
|
+
{
|
31
|
+
int rc;
|
32
|
+
struct util_options opts;
|
33
|
+
scmp_filter_ctx ctx = NULL;
|
34
|
+
|
35
|
+
rc = util_getopt(argc, argv, &opts);
|
36
|
+
if (rc < 0)
|
37
|
+
goto out;
|
38
|
+
|
39
|
+
rc = seccomp_api_set(1);
|
40
|
+
if (rc != 0)
|
41
|
+
return -rc;
|
42
|
+
|
43
|
+
ctx = seccomp_init(SCMP_ACT_ERRNO(100));
|
44
|
+
if (ctx == NULL)
|
45
|
+
return ENOMEM;
|
46
|
+
|
47
|
+
rc = seccomp_arch_remove(ctx, SCMP_ARCH_NATIVE);
|
48
|
+
if (rc != 0)
|
49
|
+
goto out;
|
50
|
+
rc = seccomp_arch_add(ctx, SCMP_ARCH_X86_64);
|
51
|
+
if (rc != 0)
|
52
|
+
goto out;
|
53
|
+
|
54
|
+
/* libseccomp utilizes a hash table to manage BPF blocks. It
|
55
|
+
* currently employs MurmurHash3 where the key is the hashed values
|
56
|
+
* of the BPF instruction blocks, the accumulator start, and the
|
57
|
+
* accumulator end. Changes to the hash algorithm will likely affect
|
58
|
+
* this test.
|
59
|
+
*/
|
60
|
+
|
61
|
+
/* The following rules were derived from an issue reported by Tor:
|
62
|
+
* https://github.com/seccomp/libseccomp/issues/148
|
63
|
+
*
|
64
|
+
* In the steps below, syscall 1001 is configured similarly to how
|
65
|
+
* Tor configured socket. The fairly complex rules below led to
|
66
|
+
* a hash collision with rt_sigaction (syscall 1000) in this test.
|
67
|
+
*/
|
68
|
+
|
69
|
+
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, 1001, 3,
|
70
|
+
SCMP_A0(SCMP_CMP_EQ, 1),
|
71
|
+
SCMP_A1(SCMP_CMP_MASKED_EQ, 0xf, 2),
|
72
|
+
SCMP_A2(SCMP_CMP_EQ, 3));
|
73
|
+
if (rc != 0)
|
74
|
+
goto out;
|
75
|
+
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, 1001, 2,
|
76
|
+
SCMP_A0(SCMP_CMP_EQ, 1),
|
77
|
+
SCMP_A1(SCMP_CMP_MASKED_EQ, 0xf, 1));
|
78
|
+
if (rc != 0)
|
79
|
+
goto out;
|
80
|
+
|
81
|
+
|
82
|
+
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, 1000, 1,
|
83
|
+
SCMP_A0(SCMP_CMP_EQ, 2));
|
84
|
+
if (rc != 0)
|
85
|
+
goto out;
|
86
|
+
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, 1000, 1,
|
87
|
+
SCMP_A0(SCMP_CMP_EQ, 1));
|
88
|
+
if (rc != 0)
|
89
|
+
goto out;
|
90
|
+
|
91
|
+
rc = util_filter_output(&opts, ctx);
|
92
|
+
if (rc)
|
93
|
+
goto out;
|
94
|
+
|
95
|
+
out:
|
96
|
+
seccomp_release(ctx);
|
97
|
+
return (rc < 0 ? -rc : rc);
|
98
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
|
3
|
+
#
|
4
|
+
# Seccomp Library test program
|
5
|
+
#
|
6
|
+
# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
|
7
|
+
# Author: Tom Hromatka <tom.hromatka@oracle.com>
|
8
|
+
#
|
9
|
+
|
10
|
+
#
|
11
|
+
# This library is free software; you can redistribute it and/or modify it
|
12
|
+
# under the terms of version 2.1 of the GNU Lesser General Public License as
|
13
|
+
# published by the Free Software Foundation.
|
14
|
+
#
|
15
|
+
# This library is distributed in the hope that it will be useful, but WITHOUT
|
16
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
18
|
+
# for more details.
|
19
|
+
#
|
20
|
+
# You should have received a copy of the GNU Lesser General Public License
|
21
|
+
# along with this library; if not, see <http://www.gnu.org/licenses>.
|
22
|
+
#
|
23
|
+
|
24
|
+
import argparse
|
25
|
+
import sys
|
26
|
+
|
27
|
+
import util
|
28
|
+
|
29
|
+
from seccomp import *
|
30
|
+
|
31
|
+
def test(args):
|
32
|
+
set_api(1)
|
33
|
+
f = SyscallFilter(ERRNO(100))
|
34
|
+
f.remove_arch(Arch())
|
35
|
+
f.add_arch(Arch("x86_64"))
|
36
|
+
|
37
|
+
# libseccomp utilizes a hash table to manage BPF blocks. It currently
|
38
|
+
# employs MurmurHash3 where the key is the hashed values of the BPF
|
39
|
+
# instruction blocks, the accumulator start, and the accumulator end.
|
40
|
+
# Changes to the hash algorithm will likely affect this test.
|
41
|
+
|
42
|
+
# The following rules were derived from an issue reported by Tor:
|
43
|
+
# https://github.com/seccomp/libseccomp/issues/148
|
44
|
+
#
|
45
|
+
# In the steps below, syscall 1001 is configured similarly to how
|
46
|
+
# Tor configured socket. The fairly complex rules below led to
|
47
|
+
# a hash collision with rt_sigaction (syscall 1000) in this test.
|
48
|
+
|
49
|
+
f.add_rule_exactly(ALLOW, 1001, Arg(0, EQ, 1), Arg(1, MASKED_EQ, 0xf, 2),
|
50
|
+
Arg(2, EQ, 3))
|
51
|
+
f.add_rule_exactly(ALLOW, 1001, Arg(0, EQ, 1), Arg(1, MASKED_EQ, 0xf, 1))
|
52
|
+
f.add_rule_exactly(ALLOW, 1000, Arg(0, EQ, 2))
|
53
|
+
f.add_rule_exactly(ALLOW, 1000, Arg(0, EQ, 1))
|
54
|
+
return f
|
55
|
+
|
56
|
+
args = util.get_opt()
|
57
|
+
ctx = test(args)
|
58
|
+
util.filter_output(args, ctx)
|
59
|
+
|
60
|
+
# kate: syntax python;
|
61
|
+
# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#
|
2
|
+
# libseccomp regression test automation data
|
3
|
+
#
|
4
|
+
# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
|
5
|
+
# Author: Tom Hromatka <tom.hromatka@oracle.com>
|
6
|
+
#
|
7
|
+
|
8
|
+
test type: bpf-sim
|
9
|
+
|
10
|
+
# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result
|
11
|
+
50-sim-hash_collision x86_64 1000 1 N N N N N ALLOW
|
12
|
+
50-sim-hash_collision x86_64 1000 2 N N N N N ALLOW
|
13
|
+
50-sim-hash_collision x86_64 1000 3 N N N N N ERRNO(100)
|
14
|
+
50-sim-hash_collision x86_64 1001 1 2 3 N N N ALLOW
|
15
|
+
50-sim-hash_collision x86_64 1001 1 1 N N N N ALLOW
|
16
|
+
50-sim-hash_collision x86_64 1001 2 N N N N N ERRNO(100)
|
17
|
+
50-sim-hash_collision x86_64 1001 1 3 N N N N ERRNO(100)
|
18
|
+
50-sim-hash_collision x86_64 1001 1 2 4 N N N ERRNO(100)
|
@@ -88,7 +88,8 @@ check_PROGRAMS = \
|
|
88
88
|
46-sim-kill_process \
|
89
89
|
47-live-kill_process \
|
90
90
|
48-sim-32b_args \
|
91
|
-
49-sim-64b_comparisons
|
91
|
+
49-sim-64b_comparisons \
|
92
|
+
50-sim-hash_collision
|
92
93
|
|
93
94
|
EXTRA_DIST_TESTPYTHON = \
|
94
95
|
util.py \
|
@@ -139,7 +140,8 @@ EXTRA_DIST_TESTPYTHON = \
|
|
139
140
|
46-sim-kill_process.py \
|
140
141
|
47-live-kill_process.py \
|
141
142
|
48-sim-32b_args.py \
|
142
|
-
49-sim-64b_comparisons.py
|
143
|
+
49-sim-64b_comparisons.py \
|
144
|
+
50-sim-hash_collision.py
|
143
145
|
|
144
146
|
EXTRA_DIST_TESTCFGS = \
|
145
147
|
01-sim-allow.tests \
|
@@ -190,7 +192,8 @@ EXTRA_DIST_TESTCFGS = \
|
|
190
192
|
46-sim-kill_process.tests \
|
191
193
|
47-live-kill_process.tests \
|
192
194
|
48-sim-32b_args.tests \
|
193
|
-
49-sim-64b_comparisons.tests
|
195
|
+
49-sim-64b_comparisons.tests \
|
196
|
+
50-sim-hash_collision.tests
|
194
197
|
|
195
198
|
EXTRA_DIST_TESTSCRIPTS = \
|
196
199
|
38-basic-pfc_coverage.sh 38-basic-pfc_coverage.pfc
|