script_core 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/ext/enterprise_script_service/libseccomp/.travis.yml +21 -7
  3. data/ext/enterprise_script_service/libseccomp/CHANGELOG +22 -0
  4. data/ext/enterprise_script_service/libseccomp/CONTRIBUTING.md +37 -26
  5. data/ext/enterprise_script_service/libseccomp/CREDITS +8 -0
  6. data/ext/enterprise_script_service/libseccomp/README.md +3 -1
  7. data/ext/enterprise_script_service/libseccomp/configure.ac +13 -8
  8. data/ext/enterprise_script_service/libseccomp/doc/Makefile.am +6 -0
  9. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_api_get.3 +12 -2
  10. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_arch_add.3 +38 -6
  11. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_attr_set.3 +53 -2
  12. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_export_bpf.3 +20 -2
  13. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_init.3 +9 -2
  14. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_load.3 +32 -2
  15. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_merge.3 +16 -2
  16. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_alloc.3 +113 -0
  17. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_fd.3 +1 -0
  18. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_free.3 +1 -0
  19. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_id_valid.3 +1 -0
  20. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_receive.3 +1 -0
  21. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_respond.3 +1 -0
  22. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_rule_add.3 +64 -3
  23. data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_syscall_priority.3 +18 -3
  24. data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +12 -0
  25. data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +116 -0
  26. data/ext/enterprise_script_service/libseccomp/src/.gitignore +2 -0
  27. data/ext/enterprise_script_service/libseccomp/src/Makefile.am +31 -17
  28. data/ext/enterprise_script_service/libseccomp/src/api.c +254 -58
  29. data/ext/enterprise_script_service/libseccomp/src/arch-aarch64.h +1 -9
  30. data/ext/enterprise_script_service/libseccomp/src/arch-arm.c +47 -2
  31. data/ext/enterprise_script_service/libseccomp/src/arch-arm.h +1 -9
  32. data/ext/enterprise_script_service/libseccomp/src/arch-gperf-generate +40 -0
  33. data/ext/enterprise_script_service/libseccomp/src/arch-mips.c +41 -4
  34. data/ext/enterprise_script_service/libseccomp/src/arch-mips.h +2 -10
  35. data/ext/enterprise_script_service/libseccomp/src/arch-mips64.c +41 -4
  36. data/ext/enterprise_script_service/libseccomp/src/arch-mips64.h +3 -11
  37. data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32.c +41 -4
  38. data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32.h +2 -10
  39. data/ext/enterprise_script_service/libseccomp/src/arch-parisc.h +1 -10
  40. data/ext/enterprise_script_service/libseccomp/src/arch-parisc64.c +3 -3
  41. data/ext/enterprise_script_service/libseccomp/src/arch-parisc64.h +29 -0
  42. data/ext/enterprise_script_service/libseccomp/src/arch-ppc.h +1 -9
  43. data/ext/enterprise_script_service/libseccomp/src/arch-ppc64.c +606 -8
  44. data/ext/enterprise_script_service/libseccomp/src/arch-ppc64.h +2 -10
  45. data/ext/enterprise_script_service/libseccomp/src/arch-riscv64.c +31 -0
  46. data/ext/enterprise_script_service/libseccomp/src/arch-riscv64.h +22 -0
  47. data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +171 -12
  48. data/ext/enterprise_script_service/libseccomp/src/arch-s390.h +1 -17
  49. data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +166 -10
  50. data/ext/enterprise_script_service/libseccomp/src/arch-s390x.h +1 -20
  51. data/ext/enterprise_script_service/libseccomp/src/arch-syscall-dump.c +8 -1
  52. data/ext/enterprise_script_service/libseccomp/src/arch-syscall-validate +359 -143
  53. data/ext/enterprise_script_service/libseccomp/src/arch-x32.c +36 -2
  54. data/ext/enterprise_script_service/libseccomp/src/arch-x32.h +2 -10
  55. data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +172 -10
  56. data/ext/enterprise_script_service/libseccomp/src/arch-x86.h +1 -14
  57. data/ext/enterprise_script_service/libseccomp/src/arch-x86_64.h +1 -9
  58. data/ext/enterprise_script_service/libseccomp/src/arch.c +11 -3
  59. data/ext/enterprise_script_service/libseccomp/src/arch.h +7 -0
  60. data/ext/enterprise_script_service/libseccomp/src/db.c +268 -57
  61. data/ext/enterprise_script_service/libseccomp/src/db.h +16 -2
  62. data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +503 -148
  63. data/ext/enterprise_script_service/libseccomp/src/gen_bpf.h +2 -1
  64. data/ext/enterprise_script_service/libseccomp/src/gen_pfc.c +165 -37
  65. data/ext/enterprise_script_service/libseccomp/src/python/libseccomp.pxd +37 -1
  66. data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +295 -5
  67. data/ext/enterprise_script_service/libseccomp/src/syscalls.c +56 -0
  68. data/ext/enterprise_script_service/libseccomp/src/syscalls.csv +470 -0
  69. data/ext/enterprise_script_service/libseccomp/src/syscalls.h +62 -0
  70. data/ext/enterprise_script_service/libseccomp/src/syscalls.perf.template +82 -0
  71. data/ext/enterprise_script_service/libseccomp/src/system.c +196 -16
  72. data/ext/enterprise_script_service/libseccomp/src/system.h +68 -13
  73. data/ext/enterprise_script_service/libseccomp/tests/.gitignore +9 -2
  74. data/ext/enterprise_script_service/libseccomp/tests/06-sim-actions.tests +1 -1
  75. data/ext/enterprise_script_service/libseccomp/tests/11-basic-basic_errors.c +5 -5
  76. data/ext/enterprise_script_service/libseccomp/tests/13-basic-attrs.c +35 -1
  77. data/ext/enterprise_script_service/libseccomp/tests/13-basic-attrs.py +10 -1
  78. data/ext/enterprise_script_service/libseccomp/tests/15-basic-resolver.c +1 -0
  79. data/ext/enterprise_script_service/libseccomp/tests/16-sim-arch_basic.c +12 -0
  80. data/ext/enterprise_script_service/libseccomp/tests/16-sim-arch_basic.py +1 -0
  81. data/ext/enterprise_script_service/libseccomp/tests/{18-sim-basic_whitelist.c → 18-sim-basic_allowlist.c} +0 -0
  82. data/ext/enterprise_script_service/libseccomp/tests/{18-sim-basic_whitelist.py → 18-sim-basic_allowlist.py} +0 -0
  83. data/ext/enterprise_script_service/libseccomp/tests/18-sim-basic_allowlist.tests +32 -0
  84. data/ext/enterprise_script_service/libseccomp/tests/23-sim-arch_all_le_basic.c +3 -0
  85. data/ext/enterprise_script_service/libseccomp/tests/23-sim-arch_all_le_basic.py +1 -0
  86. data/ext/enterprise_script_service/libseccomp/tests/30-sim-socket_syscalls.c +3 -0
  87. data/ext/enterprise_script_service/libseccomp/tests/30-sim-socket_syscalls.py +1 -0
  88. data/ext/enterprise_script_service/libseccomp/tests/30-sim-socket_syscalls.tests +33 -17
  89. data/ext/enterprise_script_service/libseccomp/tests/{34-sim-basic_blacklist.c → 34-sim-basic_denylist.c} +0 -0
  90. data/ext/enterprise_script_service/libseccomp/tests/{34-sim-basic_blacklist.py → 34-sim-basic_denylist.py} +0 -0
  91. data/ext/enterprise_script_service/libseccomp/tests/34-sim-basic_denylist.tests +32 -0
  92. data/ext/enterprise_script_service/libseccomp/tests/36-sim-ipc_syscalls.c +3 -0
  93. data/ext/enterprise_script_service/libseccomp/tests/36-sim-ipc_syscalls.py +1 -0
  94. data/ext/enterprise_script_service/libseccomp/tests/36-sim-ipc_syscalls.tests +25 -25
  95. data/ext/enterprise_script_service/libseccomp/tests/39-basic-api_level.c +24 -3
  96. data/ext/enterprise_script_service/libseccomp/tests/39-basic-api_level.py +16 -1
  97. data/ext/enterprise_script_service/libseccomp/tests/47-live-kill_process.c +3 -3
  98. data/ext/enterprise_script_service/libseccomp/tests/51-live-user_notification.c +112 -0
  99. data/ext/enterprise_script_service/libseccomp/tests/51-live-user_notification.py +60 -0
  100. data/ext/enterprise_script_service/libseccomp/tests/51-live-user_notification.tests +11 -0
  101. data/ext/enterprise_script_service/libseccomp/tests/53-sim-binary_tree.c +156 -0
  102. data/ext/enterprise_script_service/libseccomp/tests/53-sim-binary_tree.py +95 -0
  103. data/ext/enterprise_script_service/libseccomp/tests/53-sim-binary_tree.tests +65 -0
  104. data/ext/enterprise_script_service/libseccomp/tests/54-live-binary_tree.c +128 -0
  105. data/ext/enterprise_script_service/libseccomp/tests/54-live-binary_tree.py +95 -0
  106. data/ext/enterprise_script_service/libseccomp/tests/54-live-binary_tree.tests +11 -0
  107. data/ext/enterprise_script_service/libseccomp/tests/55-basic-pfc_binary_tree.c +134 -0
  108. data/ext/enterprise_script_service/libseccomp/tests/55-basic-pfc_binary_tree.sh +46 -0
  109. data/ext/enterprise_script_service/libseccomp/tests/55-basic-pfc_binary_tree.tests +11 -0
  110. data/ext/enterprise_script_service/libseccomp/tests/56-basic-iterate_syscalls.c +90 -0
  111. data/ext/enterprise_script_service/libseccomp/tests/56-basic-iterate_syscalls.py +65 -0
  112. data/ext/enterprise_script_service/libseccomp/tests/56-basic-iterate_syscalls.tests +11 -0
  113. data/ext/enterprise_script_service/libseccomp/tests/57-basic-rawsysrc.c +64 -0
  114. data/ext/enterprise_script_service/libseccomp/tests/57-basic-rawsysrc.py +46 -0
  115. data/ext/enterprise_script_service/libseccomp/tests/57-basic-rawsysrc.tests +11 -0
  116. data/ext/enterprise_script_service/libseccomp/tests/58-live-tsync_notify.c +116 -0
  117. data/ext/enterprise_script_service/libseccomp/tests/58-live-tsync_notify.py +61 -0
  118. data/ext/enterprise_script_service/libseccomp/tests/58-live-tsync_notify.tests +11 -0
  119. data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +31 -10
  120. data/ext/enterprise_script_service/libseccomp/tests/regression +6 -3
  121. data/ext/enterprise_script_service/libseccomp/tests/util.c +3 -3
  122. data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -1
  123. data/ext/enterprise_script_service/libseccomp/tools/scmp_arch_detect.c +3 -0
  124. data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_disasm.c +4 -2
  125. data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
  126. data/ext/enterprise_script_service/libseccomp/tools/util.c +14 -12
  127. data/ext/enterprise_script_service/libseccomp/tools/util.h +7 -0
  128. data/ext/enterprise_script_service/mruby/.github/workflows/codeql-analysis.yml +51 -0
  129. data/ext/enterprise_script_service/mruby/Doxyfile +1 -1
  130. data/ext/enterprise_script_service/mruby/README.md +1 -1
  131. data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
  132. data/ext/enterprise_script_service/mruby/doc/limitations.md +10 -10
  133. data/ext/enterprise_script_service/mruby/include/mruby.h +13 -0
  134. data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +0 -1
  135. data/ext/enterprise_script_service/mruby/include/mruby/proc.h +13 -8
  136. data/ext/enterprise_script_service/mruby/include/mruby/value.h +25 -29
  137. data/ext/enterprise_script_service/mruby/include/mruby/version.h +3 -3
  138. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +5 -8
  139. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +2 -2
  140. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +17 -10
  141. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +1 -1
  142. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +1 -2
  143. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +1 -1
  144. data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +1 -2
  145. data/ext/enterprise_script_service/mruby/mrbgems/mruby-inline-struct/test/inline.c +3 -4
  146. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +1 -2
  147. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +9 -26
  148. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +1 -2
  149. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +6 -8
  150. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +3 -4
  151. data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +0 -1
  152. data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/src/print.c +1 -2
  153. data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +1 -3
  154. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +1 -3
  155. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +3 -3
  156. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +1 -2
  157. data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +5 -11
  158. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +5 -10
  159. data/ext/enterprise_script_service/mruby/mrblib/00class.rb +10 -0
  160. data/ext/enterprise_script_service/mruby/src/array.c +14 -11
  161. data/ext/enterprise_script_service/mruby/src/class.c +22 -21
  162. data/ext/enterprise_script_service/mruby/src/error.c +1 -2
  163. data/ext/enterprise_script_service/mruby/src/etc.c +0 -1
  164. data/ext/enterprise_script_service/mruby/src/gc.c +5 -5
  165. data/ext/enterprise_script_service/mruby/src/hash.c +8 -15
  166. data/ext/enterprise_script_service/mruby/src/kernel.c +4 -7
  167. data/ext/enterprise_script_service/mruby/src/numeric.c +28 -60
  168. data/ext/enterprise_script_service/mruby/src/object.c +11 -1
  169. data/ext/enterprise_script_service/mruby/src/proc.c +7 -8
  170. data/ext/enterprise_script_service/mruby/src/range.c +4 -12
  171. data/ext/enterprise_script_service/mruby/src/string.c +24 -21
  172. data/ext/enterprise_script_service/mruby/src/symbol.c +1 -2
  173. data/ext/enterprise_script_service/mruby/src/vm.c +28 -24
  174. data/ext/enterprise_script_service/mruby/test/t/kernel.rb +7 -0
  175. data/lib/script_core/version.rb +1 -1
  176. metadata +45 -21
  177. data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +0 -559
  178. data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +0 -570
  179. data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +0 -562
  180. data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +0 -562
  181. data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +0 -562
  182. data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +0 -542
  183. data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +0 -559
  184. data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +0 -559
  185. data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +0 -642
  186. data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +0 -642
  187. data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +0 -558
  188. data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +0 -692
  189. data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +0 -559
  190. data/ext/enterprise_script_service/libseccomp/tests/18-sim-basic_whitelist.tests +0 -32
  191. data/ext/enterprise_script_service/libseccomp/tests/34-sim-basic_blacklist.tests +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0f7d0aed06a2aa8a5636be6e7113b9e4b651037d9489246ba995df1c375a190
4
- data.tar.gz: 8725fa84598ca2370d7b79c747e1f29c41258d8c3f026137191a46d470f8c882
3
+ metadata.gz: 3cfa6713154bbd8ad099289142899dca5ba3f5dea5cc2c5a6d48f2119559b4b8
4
+ data.tar.gz: 6141a1d955d8ae69080c56f0d4b6966e9595d5f0992cc758ddc5ba6bdff9ab98
5
5
  SHA512:
6
- metadata.gz: 39c01ca8ed18bf12a6c56c6d4b354d756212bb67ab33ad67855080eed4f2383cb07517e0ea42f1dde024b42be65dd86f19788356f2e0eda585010cc4afdbe8ba
7
- data.tar.gz: 59c59baa3b3d6820c65df45b687d23bf0b4831b1f34539c6d0b70dd401fb60c3c686a3c2f9761417e05084e7f023e1e15a2b7eb6652680164ab74eca1740b8dc
6
+ metadata.gz: a250786dcf497f2e93f3734a154f32ed31fe367b6f6df50d12e5b683850003275a9852f2f3ae5eec037b313fc16c66af034528cf3f5abbc3cb55bc6b24fb6b20
7
+ data.tar.gz: 4ab307f3a464f1cfe5e0c0fe0a43ec56c70055e88a02a6ade5f0fb33b510ac56e8240fdc758104d1089a5b420e940476436695285f46f921e6f97cabc9f5ed7c
@@ -4,13 +4,20 @@
4
4
  # https://wiki.ubuntu.com/Releases
5
5
 
6
6
  dist: bionic
7
- sudo: false
8
7
 
9
8
  notifications:
10
9
  email:
11
10
  on_success: always
12
11
  on_failure: always
13
12
 
13
+ arch:
14
+ - amd64
15
+ - arm64
16
+ - ppc64le
17
+
18
+ os:
19
+ - linux
20
+
14
21
  language: c
15
22
  compiler:
16
23
  - gcc
@@ -32,6 +39,7 @@ addons:
32
39
  - valgrind
33
40
  - clang
34
41
  - lcov
42
+ - gperf
35
43
 
36
44
  env:
37
45
  global:
@@ -44,7 +52,10 @@ before_install:
44
52
  # assume the distro has an old version of cython
45
53
  - pip install cython
46
54
  # see https://github.com/eddyxu/cpp-coveralls
47
- - pip install cpp-coveralls
55
+ - |
56
+ if [ $TRAVIS_CPU_ARCH == "amd64" ]; then
57
+ pip install cpp-coveralls
58
+ fi
48
59
 
49
60
  # perform the build and fail immediately on error
50
61
  install:
@@ -58,12 +69,15 @@ script:
58
69
  - make check-build
59
70
  - LIBSECCOMP_TSTCFG_STRESSCNT=5 make check
60
71
  - LIBSECCOMP_TSTCFG_TYPE=live LIBSECCOMP_TSTCFG_MODE_LIST=c make -C tests check
61
- # ubuntu 14.04 (trusty) clang has problems with the cython generated code
62
- - make clean && ./configure && scan-build --status-bugs make
72
+ - |
73
+ if [ $TRAVIS_CPU_ARCH == "amd64" -o -x scan-build ]; then
74
+ make clean && ./configure && scan-build --status-bugs make
75
+ fi
63
76
 
64
77
  after_success:
65
78
  # limit the code coverage tests to the 'test-code-coverage' target
66
- - make clean && ./configure --enable-code-coverage && make test-code-coverage
67
79
  # https://github.com/eddyxu/cpp-coveralls/blob/master/README.md
68
- - coveralls --gcov-options '\-lp'
69
- --exclude tests --exclude tools --exclude src/arch-syscall-check.c
80
+ - |
81
+ if [ $TRAVIS_CPU_ARCH == "amd64" ]; then
82
+ make clean && ./configure --enable-code-coverage && make test-code-coverage && coveralls --gcov-options '\-lp' --exclude tests --exclude tools --exclude src/arch-syscall-check.c
83
+ fi
@@ -2,6 +2,28 @@ libseccomp: Releases
2
2
  ===============================================================================
3
3
  https://github.com/seccomp/libseccomp
4
4
 
5
+ * Version 2.5.0 - July 20, 2020
6
+ - Add support for the seccomp user notifications, see the
7
+ seccomp_notify_alloc(3), seccomp_notify_receive(3), seccomp_notify_respond(3)
8
+ manpages for more information
9
+ - Add support for new filter optimization approaches, including a balanced tree
10
+ optimization, see the SCMP_FLTATR_CTL_OPTIMIZE filter attribute for more
11
+ information
12
+ - Add support for the 64-bit RISC-V architecture
13
+ - Performance improvements when adding new rules to a filter thanks to the use
14
+ of internal shadow transactions and improved syscall lookup tables
15
+ - Properly document the libseccomp API return values and include them in the
16
+ stable API promise
17
+ - Improvements to the s390 and s390x multiplexed syscall handling
18
+ - Multiple fixes and improvements to the libseccomp manpages
19
+ - Moved from manually maintained syscall tables to an automatically generated
20
+ syscall table in CSV format
21
+ - Update the syscall tables to Linux v5.8.0-rc5
22
+ - Python bindings and build now default to Python 3.x
23
+ - Improvements to the tests have boosted code coverage to over 93%
24
+ - Enable Travis CI testing on the aarch64 and ppc64le architectures
25
+ - Add code inspection via lgtm.com
26
+
5
27
  * Version 2.4.3 - March 4, 2020
6
28
  - Add list of authorized release signatures to README.md
7
29
  - Fix multiplexing issue with s390/s390x shm* syscalls
@@ -8,7 +8,7 @@ to the rules described here, but by following the instructions below you
8
8
  should have a much easier time getting your work merged with the upstream
9
9
  project.
10
10
 
11
- ## Test Your Code
11
+ ## Test Your Code Using Existing Tests
12
12
 
13
13
  There are three possible tests you can run to verify your code. The first
14
14
  test is used to check the formatting and coding style of your changes, you
@@ -38,7 +38,7 @@ command:
38
38
 
39
39
  ... if there are any faults or errors they will be displayed.
40
40
 
41
- ## Make Sure Your Code is Tested
41
+ ## Add New Tests for New Functionality
42
42
 
43
43
  The libseccomp code includes a fairly extensive test suite and any submissions
44
44
  which add functionality, or significantly change the existing code, should
@@ -50,29 +50,6 @@ base, and can be enabled via the "--enable-code-coverage" configure flag and
50
50
  the "check-code-coverage" make target. Additional details on generating code
51
51
  coverage information can be found in the .travis.yml file.
52
52
 
53
- ## Generate the Patch(es)
54
-
55
- Depending on how you decided to work with the libseccomp code base and what
56
- tools you are using there are different ways to generate your patch(es).
57
- However, regardless of what tools you use, you should always generate your
58
- patches using the "unified" diff/patch format and the patches should always
59
- apply to the libseccomp source tree using the following command from the top
60
- directory of the libseccomp sources:
61
-
62
- # patch -p1 < changes.patch
63
-
64
- If you are not using git, stacked git (stgit), or some other tool which can
65
- generate patch files for you automatically, you may find the following command
66
- helpful in generating patches, where "libseccomp.orig/" is the unmodified
67
- source code directory and "libseccomp/" is the source code directory with your
68
- changes:
69
-
70
- # diff -purN libseccomp.orig/ libseccomp/
71
-
72
- When in doubt please generate your patch and try applying it to an unmodified
73
- copy of the libseccomp sources; if it fails for you, it will fail for the rest
74
- of us.
75
-
76
53
  ## Explain Your Work
77
54
 
78
55
  At the top of every patch you should include a description of the problem you
@@ -120,7 +97,37 @@ your real name, saying:
120
97
 
121
98
  Signed-off-by: Random J Developer <random@developer.example.org>
122
99
 
123
- ## Email Your Patch(es)
100
+ You can add this to your commit description in `git` with `git commit -s`
101
+
102
+ ## Post Your Patches Upstream
103
+
104
+ The libseccomp project accepts both GitHub pull requests and patches sent via
105
+ the mailing list. GitHub pull requests are preferred. This sections below
106
+ explain how to contribute via either method. Please read each step and perform
107
+ all steps that apply to your chosen contribution method.
108
+
109
+ ### Submitting via Email
110
+
111
+ Depending on how you decided to work with the libseccomp code base and what
112
+ tools you are using there are different ways to generate your patch(es).
113
+ However, regardless of what tools you use, you should always generate your
114
+ patches using the "unified" diff/patch format and the patches should always
115
+ apply to the libseccomp source tree using the following command from the top
116
+ directory of the libseccomp sources:
117
+
118
+ # patch -p1 < changes.patch
119
+
120
+ If you are not using git, stacked git (stgit), or some other tool which can
121
+ generate patch files for you automatically, you may find the following command
122
+ helpful in generating patches, where "libseccomp.orig/" is the unmodified
123
+ source code directory and "libseccomp/" is the source code directory with your
124
+ changes:
125
+
126
+ # diff -purN libseccomp.orig/ libseccomp/
127
+
128
+ When in doubt please generate your patch and try applying it to an unmodified
129
+ copy of the libseccomp sources; if it fails for you, it will fail for the rest
130
+ of us.
124
131
 
125
132
  Finally, you will need to email your patches to the mailing list so they can
126
133
  be reviewed and potentially merged into the main libseccomp repository. When
@@ -132,3 +139,7 @@ a problem with your email client. When in doubt try a test first by sending
132
139
  yourself an email with your patch and attempting to apply the emailed patch to
133
140
  the libseccomp repository; if it fails for you, it will fail for the rest of
134
141
  us trying to test your patch and include it in the main libseccomp repository.
142
+
143
+ ### Submitting via GitHub
144
+
145
+ See [this guide](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) if you've never done this before.
@@ -2,11 +2,14 @@ libseccomp: Contributors
2
2
  ========================================================================
3
3
  https://github.com/seccomp/libseccomp
4
4
 
5
+ Alex Murray <alex.murray@canonical.com>
6
+ Andreas Schwab <schwab@suse.de>
5
7
  Andrew Jones <drjones@redhat.com>
6
8
  Andy Lutomirski <luto@amacapital.net>
7
9
  Ashley Lai <adlai@us.ibm.com>
8
10
  Bogdan Purcareata <bogdan.purcareata@freescale.com>
9
11
  Brian Cain <brian.cain@gmail.com>
12
+ Christopher Waldon <christopher.waldon.dev@gmail.com>
10
13
  Chris Waldon <chris.waldon@ibm.com>
11
14
  Colin Walters <walters@verbum.org>
12
15
  Corey Bryant <coreyb@linux.vnet.ibm.com>
@@ -16,6 +19,7 @@ Eric Paris <eparis@redhat.com>
16
19
  Fabrice Fontaine <fontaine.fabrice@gmail.com>
17
20
  Felix Abecassis <fabecassis@nvidia.com>
18
21
  Felix Geyer <debfx@fobos.de>
22
+ Giuseppe Scrivano <gscrivan@redhat.com>
19
23
  Heiko Carstens <heiko.carstens@de.ibm.com>
20
24
  Helge Deller <deller@gmx.de>
21
25
  Jake Edge <jake@lwn.net>
@@ -25,9 +29,11 @@ Jan Willeke <willeke@linux.vnet.ibm.com>
25
29
  Jay Guo <guojiannan@cn.ibm.com>
26
30
  Jiannan Guo <guojiannan1101@gmail.com>
27
31
  Joe MacDonald <joe@deserted.net>
32
+ Jonah Petri <jonah@petri.us>
28
33
  Justin Cormack <justin.cormack@docker.com>
29
34
  Kees Cook <keescook@chromium.org>
30
35
  Kyle R. Conway <kyle.r.conway@gmail.com>
36
+ Kenta Tada <Kenta.Tada@sony.com>
31
37
  Luca Bruno <lucab@debian.org>
32
38
  Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
33
39
  Marcus Meissner <meissner@suse.de>
@@ -38,12 +44,14 @@ Mike Frysinger <vapier@gentoo.org>
38
44
  Mike Strosaker <strosake@linux.vnet.ibm.com>
39
45
  Miroslav Lichvar <mlichvar@redhat.com>
40
46
  Paul Moore <paul@paul-moore.com>
47
+ Rolf Eike Beer <eb@emlix.com>
41
48
  Serge Hallyn <serge.hallyn@ubuntu.com>
42
49
  Stéphane Graber <stgraber@ubuntu.com>
43
50
  Stephen Coleman <omegacoleman@gmail.com>
44
51
  Thiago Marcos P. Santos <thiago.santos@intel.com>
45
52
  Tobias Klauser <tklauser@distanz.ch>
46
53
  Tom Hromatka <tom.hromatka@oracle.com>
54
+ Tudor Brindus <me@tbrindus.ca>
47
55
  Tycho Andersen <tycho@tycho.ws>
48
56
  Tyler Hicks <tyhicks@canonical.com>
49
57
  valoq <valoq@mailbox.org>
@@ -1,10 +1,11 @@
1
- ![Enhanced Seccomp Helper Library](https://github.com/seccomp/libseccomp-artwork/blob/master/logo/libseccomp-color_text.png)
1
+ ![Enhanced Seccomp Helper Library](https://github.com/seccomp/libseccomp-artwork/blob/main/logo/libseccomp-color_text.png)
2
2
  ===============================================================================
3
3
  https://github.com/seccomp/libseccomp
4
4
 
5
5
  [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/608/badge)](https://bestpractices.coreinfrastructure.org/projects/608)
6
6
  [![Build Status](https://img.shields.io/travis/seccomp/libseccomp/master.svg)](https://travis-ci.org/seccomp/libseccomp)
7
7
  [![Coverage Status](https://img.shields.io/coveralls/github/seccomp/libseccomp/master.svg)](https://coveralls.io/github/seccomp/libseccomp?branch=master)
8
+ [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/seccomp/libseccomp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/seccomp/libseccomp/context:cpp)
8
9
 
9
10
  The libseccomp library provides an easy to use, platform independent, interface
10
11
  to the Linux Kernel's syscall filtering mechanism. The libseccomp API is
@@ -52,6 +53,7 @@ The libseccomp library currently supports the architectures listed below:
52
53
  * 64-bit PowerPC little endian (ppc64le)
53
54
  * 32-bit s390 (s390)
54
55
  * 64-bit s390x (s390x)
56
+ * 64-bit RISC-V (riscv64)
55
57
 
56
58
  ## Documentation
57
59
 
@@ -19,7 +19,7 @@ dnl #
19
19
  dnl ####
20
20
  dnl libseccomp defines
21
21
  dnl ####
22
- AC_INIT([libseccomp], [2.4.3])
22
+ AC_INIT([libseccomp], [2.5.0])
23
23
 
24
24
  dnl ####
25
25
  dnl autoconf configuration
@@ -66,7 +66,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
66
66
  dnl ####
67
67
  dnl build flags
68
68
  dnl ####
69
- AM_CPPFLAGS="-I\${top_srcdir}/include"
69
+ AM_CPPFLAGS="-I\${top_srcdir}/include -I\${top_builddir}/include"
70
70
  AM_CFLAGS="-Wall"
71
71
  AM_LDFLAGS="-Wl,-z -Wl,relro"
72
72
  AC_SUBST([AM_CPPFLAGS])
@@ -91,11 +91,11 @@ AC_SUBST([VERSION_MICRO])
91
91
  dnl ####
92
92
  dnl cython checks
93
93
  dnl ####
94
- AC_CHECK_PROG(have_cython, cython, "yes", "no")
95
- AS_IF([test "$have_cython" = yes], [
96
- AS_ECHO("checking cython version... $(cython -V 2>&1 | cut -d' ' -f 3)")
97
- CYTHON_VER_MAJ=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1);
98
- CYTHON_VER_MIN=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2);
94
+ AC_CHECK_PROGS(cython, cython3 cython, "no")
95
+ AS_IF([test "$cython" != no], [
96
+ AS_ECHO("checking cython version... $($cython -V 2>&1 | cut -d' ' -f 3)")
97
+ CYTHON_VER_MAJ=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1);
98
+ CYTHON_VER_MIN=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2);
99
99
  ],[
100
100
  CYTHON_VER_MAJ=0
101
101
  CYTHON_VER_MIN=0
@@ -112,13 +112,18 @@ AS_IF([test "$enable_python" = yes], [
112
112
  AS_IF([test "$CYTHON_VER_MAJ" -eq 0 -a "$CYTHON_VER_MIN" -lt 29], [
113
113
  AC_MSG_ERROR([python bindings require cython 0.29 or higher])
114
114
  ])
115
- AM_PATH_PYTHON
115
+ AM_PATH_PYTHON([3])
116
116
  ])
117
117
  AM_CONDITIONAL([ENABLE_PYTHON], [test "$enable_python" = yes])
118
118
  AC_DEFINE_UNQUOTED([ENABLE_PYTHON],
119
119
  [$(test "$enable_python" = yes && echo 1 || echo 0)],
120
120
  [Python bindings build flag.])
121
121
 
122
+ AC_CHECK_TOOL(GPERF, gperf)
123
+ if test -z "$GPERF"; then
124
+ AC_MSG_ERROR([please install gperf])
125
+ fi
126
+
122
127
  dnl ####
123
128
  dnl coverity checks
124
129
  dnl ####
@@ -38,6 +38,12 @@ dist_man3_MANS = \
38
38
  man/man3/seccomp_rule_add_array.3 \
39
39
  man/man3/seccomp_rule_add_exact.3 \
40
40
  man/man3/seccomp_rule_add_exact_array.3 \
41
+ man/man3/seccomp_notify_alloc.3 \
42
+ man/man3/seccomp_notify_fd.3 \
43
+ man/man3/seccomp_notify_free.3 \
44
+ man/man3/seccomp_notify_id_valid.3 \
45
+ man/man3/seccomp_notify_receive.3 \
46
+ man/man3/seccomp_notify_respond.3 \
41
47
  man/man3/seccomp_syscall_priority.3 \
42
48
  man/man3/seccomp_syscall_resolve_name.3 \
43
49
  man/man3/seccomp_syscall_resolve_name_arch.3 \
@@ -1,4 +1,4 @@
1
- .TH "seccomp_api_get" 3 "8 October 2017" "paul@paul-moore.com" "libseccomp Documentation"
1
+ .TH "seccomp_api_get" 3 "13 June 2020" "paul@paul-moore.com" "libseccomp Documentation"
2
2
  .\" //////////////////////////////////////////////////////////////////////////
3
3
  .SH NAME
4
4
  .\" //////////////////////////////////////////////////////////////////////////
@@ -49,7 +49,17 @@ the
49
49
  syscall to load the seccomp filter into the kernel.
50
50
  .TP
51
51
  .B 3
52
- The SCMP_FLTATR_CTL_LOG filter attribute and the SCMP_ACT_LOG action are supported.
52
+ The SCMP_FLTATR_CTL_LOG filter attribute and the SCMP_ACT_LOG action are
53
+ supported.
54
+ .TP
55
+ .B 4
56
+ The SCMP_FLTATR_CTL_SSB filter attribute is supported.
57
+ .TP
58
+ .B 5
59
+ The SCMP_ACT_NOTIFY action and the notify APIs are supported.
60
+ .TP
61
+ .B 5
62
+ The simultaneous use of SCMP_FLTATR_CTL_TSYNC and the notify APIs are supported.
53
63
  .\" //////////////////////////////////////////////////////////////////////////
54
64
  .SH RETURN VALUE
55
65
  .\" //////////////////////////////////////////////////////////////////////////
@@ -1,4 +1,4 @@
1
- .TH "seccomp_arch_add" 3 "7 May 2014" "paul@paul-moore.com" "libseccomp Documentation"
1
+ .TH "seccomp_arch_add" 3 "15 June 2020" "paul@paul-moore.com" "libseccomp Documentation"
2
2
  .\" //////////////////////////////////////////////////////////////////////////
3
3
  .SH NAME
4
4
  .\" //////////////////////////////////////////////////////////////////////////
@@ -14,6 +14,23 @@ seccomp_arch_add, seccomp_arch_remove, seccomp_arch_exist, seccomp_arch_native \
14
14
  .B #define SCMP_ARCH_NATIVE
15
15
  .B #define SCMP_ARCH_X86
16
16
  .B #define SCMP_ARCH_X86_64
17
+ .B #define SCMP_ARCH_X32
18
+ .B #define SCMP_ARCH_ARM
19
+ .B #define SCMP_ARCH_AARCH64
20
+ .B #define SCMP_ARCH_MIPS
21
+ .B #define SCMP_ARCH_MIPS64
22
+ .B #define SCMP_ARCH_MIPS64N32
23
+ .B #define SCMP_ARCH_MIPSEL
24
+ .B #define SCMP_ARCH_MIPSEL64
25
+ .B #define SCMP_ARCH_MIPSEL64N32
26
+ .B #define SCMP_ARCH_PPC
27
+ .B #define SCMP_ARCH_PPC64
28
+ .B #define SCMP_ARCH_PPC64LE
29
+ .B #define SCMP_ARCH_S390
30
+ .B #define SCMP_ARCH_S390X
31
+ .B #define SCMP_ARCH_PARISC
32
+ .B #define SCMP_ARCH_PARISC64
33
+ .B #define SCMP_ARCH_RISCV64
17
34
  .sp
18
35
  .BI "uint32_t seccomp_arch_resolve_name(const char *" arch_name ");"
19
36
  .BI "uint32_t seccomp_arch_native();"
@@ -69,13 +86,28 @@ new architecture will be added to all of the architectures in the filter.
69
86
  .SH RETURN VALUE
70
87
  .\" //////////////////////////////////////////////////////////////////////////
71
88
  The
72
- .BR seccomp_arch_add ()
89
+ .BR seccomp_arch_add (),
90
+ .BR seccomp_arch_remove (),
73
91
  and
74
- .BR seccomp_arch_remove ()
75
- functions return zero on success, negative errno values on failure. The
76
92
  .BR seccomp_arch_exist ()
77
- function returns zero if the architecture exists, \-EEXIST if it does not, and
78
- other negative errno values on failure.
93
+ functions return zero on success or one of the following error codes on
94
+ failure:
95
+ .TP
96
+ .B -EDOM
97
+ Architecture specific failure.
98
+ .TP
99
+ .B -EEXIST
100
+ In the case of
101
+ .BR seccomp_arch_add ()
102
+ the architecture already exists and in the case of
103
+ .BR seccomp_arch_remove ()
104
+ the architecture does not exist.
105
+ .TP
106
+ .B -EINVAL
107
+ Invalid input, either the context or architecture token is invalid.
108
+ .TP
109
+ .B -ENOMEM
110
+ The library was unable to allocate enough memory.
79
111
  .\" //////////////////////////////////////////////////////////////////////////
80
112
  .SH EXAMPLES
81
113
  .\" //////////////////////////////////////////////////////////////////////////
@@ -1,4 +1,4 @@
1
- .TH "seccomp_attr_set" 3 "21 August 2014" "paul@paul-moore.com" "libseccomp Documentation"
1
+ .TH "seccomp_attr_set" 3 "06 June 2020" "paul@paul-moore.com" "libseccomp Documentation"
2
2
  .\" //////////////////////////////////////////////////////////////////////////
3
3
  .SH NAME
4
4
  .\" //////////////////////////////////////////////////////////////////////////
@@ -94,10 +94,61 @@ the
94
94
  action. Defaults to off (
95
95
  .I value
96
96
  == 0).
97
+ .TP
98
+ .B SCMP_FLTATR_CTL_SSB
99
+ A flag to disable Speculative Store Bypass mitigations for this filter.
100
+ Defaults to off (
101
+ .I value
102
+ == 0).
103
+ .TP
104
+ .B SCMP_FLTATR_CTL_OPTIMIZE
105
+ A flag to specify the optimization level of the seccomp filter. By default
106
+ libseccomp generates a set of sequential \'if\' statements for each rule in
107
+ the filter.
108
+ .BR seccomp_syscall_priority(3)
109
+ can be used to prioritize the order for the default cause. The binary tree
110
+ optimization sorts by syscall numbers and generates consistent
111
+ .BR O(log\ n)
112
+ filter traversal for every rule in the filter. The binary tree may be
113
+ advantageous for large filters. Note that
114
+ .BR seccomp_syscall_priority(3)
115
+ is ignored when SCMP_FLTATR_CTL_OPTIMIZE == 2.
116
+ .RS
117
+ .P
118
+ The different optimization levels are described below:
119
+ .TP
120
+ .B 0
121
+ Reserved value, not currently used.
122
+ .TP
123
+ .B 1
124
+ Rules sorted by priority and complexity (DEFAULT).
125
+ .TP
126
+ .B 2
127
+ Binary tree sorted by syscall number.
128
+ .RE
129
+ .TP
130
+ .B SCMP_FLTATR_API_SYSRAWRC
131
+ A flag to specify if libseccomp should pass system error codes back to the
132
+ caller instead of the default -ECANCELED. Defaults to off (
133
+ .I value
134
+ == 0).
97
135
  .\" //////////////////////////////////////////////////////////////////////////
98
136
  .SH RETURN VALUE
99
137
  .\" //////////////////////////////////////////////////////////////////////////
100
- Returns zero on success, negative errno values on failure.
138
+ Returns zero on success or one of the following error codes on
139
+ failure:
140
+ .TP
141
+ .B -EACCES
142
+ Setting the attribute with the given value is not allowed.
143
+ .TP
144
+ .B -EEXIST
145
+ The attribute does not exist.
146
+ .TP
147
+ .B -EINVAL
148
+ Invalid input, either the context or architecture token is invalid.
149
+ .TP
150
+ .B -EOPNOTSUPP
151
+ The library doesn't support the particular operation.
101
152
  .\" //////////////////////////////////////////////////////////////////////////
102
153
  .SH EXAMPLES
103
154
  .\" //////////////////////////////////////////////////////////////////////////