@zigc/lib 0.16.0 → 0.17.0-dev.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/c/fcntl.zig +6 -1
  2. package/c/inttypes.zig +0 -10
  3. package/c/math.zig +46 -122
  4. package/c/pthread.zig +57 -0
  5. package/c/search.zig +1 -27
  6. package/c/stdlib/drand48.zig +0 -57
  7. package/c/stdlib.zig +0 -100
  8. package/c/string.zig +20 -7
  9. package/c/strings.zig +0 -38
  10. package/c/unistd.zig +27 -26
  11. package/c/wchar.zig +10 -0
  12. package/c.zig +2 -2
  13. package/compiler/aro/aro/CodeGen.zig +5 -6
  14. package/compiler/aro/aro/Compilation.zig +17 -14
  15. package/compiler/aro/aro/Driver.zig +14 -13
  16. package/compiler/aro/aro/Parser.zig +20 -15
  17. package/compiler/aro/aro/Pragma.zig +3 -2
  18. package/compiler/aro/aro/Preprocessor.zig +9 -6
  19. package/compiler/aro/aro/pragmas/message.zig +3 -2
  20. package/compiler/aro/aro/text_literal.zig +3 -2
  21. package/compiler/aro/assembly_backend/x86_64.zig +4 -4
  22. package/compiler/build_runner.zig +0 -2
  23. package/compiler/reduce/Walk.zig +7 -7
  24. package/compiler/test_runner.zig +2 -2
  25. package/compiler/translate-c/Translator.zig +6 -2
  26. package/compiler/translate-c/main.zig +1 -1
  27. package/compiler_rt/cos.zig +0 -2
  28. package/compiler_rt/divmodei4.zig +40 -17
  29. package/compiler_rt/exp.zig +1 -6
  30. package/compiler_rt/exp2.zig +1 -6
  31. package/compiler_rt/exp_f128.zig +377 -0
  32. package/compiler_rt/fabs.zig +0 -2
  33. package/compiler_rt/fma.zig +0 -2
  34. package/compiler_rt/fmax.zig +0 -2
  35. package/compiler_rt/fmin.zig +0 -2
  36. package/compiler_rt/fmod.zig +0 -2
  37. package/compiler_rt/limb64.zig +876 -15
  38. package/compiler_rt/log.zig +0 -2
  39. package/compiler_rt/log10.zig +0 -2
  40. package/compiler_rt/log2.zig +0 -2
  41. package/compiler_rt/mulXi3.zig +1 -1
  42. package/compiler_rt/round.zig +0 -2
  43. package/compiler_rt/sin.zig +0 -2
  44. package/compiler_rt/sincos.zig +0 -2
  45. package/compiler_rt/sqrt.zig +0 -2
  46. package/compiler_rt/ssp.zig +1 -1
  47. package/compiler_rt/tan.zig +0 -2
  48. package/compiler_rt/trunc.zig +0 -2
  49. package/compiler_rt/udivmodei4.zig +28 -0
  50. package/fuzzer.zig +2 -0
  51. package/libc/include/aarch64-linux-any/asm/hwcap.h +1 -0
  52. package/libc/include/aarch64-linux-any/asm/unistd_64.h +1 -0
  53. package/libc/include/any-linux-any/asm-generic/errno.h +2 -0
  54. package/libc/include/any-linux-any/asm-generic/unistd.h +4 -1
  55. package/libc/include/any-linux-any/drm/amdgpu_drm.h +20 -6
  56. package/libc/include/any-linux-any/drm/amdxdna_accel.h +8 -0
  57. package/libc/include/any-linux-any/drm/drm_fourcc.h +6 -6
  58. package/libc/include/any-linux-any/drm/panfrost_drm.h +75 -1
  59. package/libc/include/any-linux-any/drm/panthor_drm.h +154 -3
  60. package/libc/include/any-linux-any/drm/rocket_accel.h +74 -24
  61. package/libc/include/any-linux-any/drm/xe_drm.h +89 -6
  62. package/libc/include/any-linux-any/linux/android/binder.h +1 -1
  63. package/libc/include/any-linux-any/linux/bpf.h +28 -0
  64. package/libc/include/any-linux-any/linux/btrfs.h +1 -0
  65. package/libc/include/any-linux-any/linux/btrfs_tree.h +32 -2
  66. package/libc/include/any-linux-any/linux/dma-buf.h +1 -0
  67. package/libc/include/any-linux-any/linux/dpll.h +1 -0
  68. package/libc/include/any-linux-any/linux/elf.h +2 -0
  69. package/libc/include/any-linux-any/linux/ethtool.h +21 -5
  70. package/libc/include/any-linux-any/linux/fs.h +1 -0
  71. package/libc/include/any-linux-any/linux/hyperv.h +1 -1
  72. package/libc/include/any-linux-any/linux/idxd.h +134 -134
  73. package/libc/include/any-linux-any/linux/if_alg.h +1 -1
  74. package/libc/include/any-linux-any/linux/if_link.h +1 -0
  75. package/libc/include/any-linux-any/linux/input-event-codes.h +4 -0
  76. package/libc/include/any-linux-any/linux/io_uring/bpf_filter.h +68 -0
  77. package/libc/include/any-linux-any/linux/io_uring/query.h +5 -1
  78. package/libc/include/any-linux-any/linux/io_uring.h +33 -2
  79. package/libc/include/any-linux-any/linux/iommufd.h +39 -0
  80. package/libc/include/any-linux-any/linux/kfd_ioctl.h +13 -3
  81. package/libc/include/any-linux-any/linux/kfd_sysfs.h +2 -1
  82. package/libc/include/any-linux-any/linux/kvm.h +30 -6
  83. package/libc/include/any-linux-any/linux/landlock.h +22 -8
  84. package/libc/include/any-linux-any/linux/magic.h +1 -0
  85. package/libc/include/any-linux-any/linux/mempolicy.h +3 -0
  86. package/libc/include/any-linux-any/linux/mount.h +11 -2
  87. package/libc/include/any-linux-any/linux/mptcp_pm.h +1 -1
  88. package/libc/include/any-linux-any/linux/mshv.h +2 -0
  89. package/libc/include/any-linux-any/linux/netfilter_bridge.h +5 -4
  90. package/libc/include/any-linux-any/linux/netfilter_ipv4.h +4 -5
  91. package/libc/include/any-linux-any/linux/netfilter_ipv6.h +3 -4
  92. package/libc/include/any-linux-any/linux/nfs.h +1 -1
  93. package/libc/include/any-linux-any/linux/nfsd_netlink.h +1 -0
  94. package/libc/include/any-linux-any/linux/nilfs2_api.h +2 -2
  95. package/libc/include/any-linux-any/linux/nilfs2_ondisk.h +97 -66
  96. package/libc/include/any-linux-any/linux/nl80211.h +104 -3
  97. package/libc/include/any-linux-any/linux/pci.h +7 -0
  98. package/libc/include/any-linux-any/linux/pci_regs.h +65 -6
  99. package/libc/include/any-linux-any/linux/pcitest.h +1 -0
  100. package/libc/include/any-linux-any/linux/perf_event.h +24 -3
  101. package/libc/include/any-linux-any/linux/pkt_sched.h +1 -0
  102. package/libc/include/any-linux-any/linux/prctl.h +30 -0
  103. package/libc/include/any-linux-any/linux/rseq.h +62 -5
  104. package/libc/include/any-linux-any/linux/shm.h +0 -1
  105. package/libc/include/any-linux-any/linux/stddef.h +4 -0
  106. package/libc/include/any-linux-any/linux/sysctl.h +1 -2
  107. package/libc/include/any-linux-any/linux/taskstats.h +12 -1
  108. package/libc/include/any-linux-any/linux/tcp.h +23 -3
  109. package/libc/include/any-linux-any/linux/typelimits.h +8 -0
  110. package/libc/include/any-linux-any/linux/ublk_cmd.h +120 -1
  111. package/libc/include/any-linux-any/linux/v4l2-controls.h +63 -0
  112. package/libc/include/any-linux-any/linux/vbox_vmmdev_types.h +2 -2
  113. package/libc/include/any-linux-any/linux/vduse.h +80 -5
  114. package/libc/include/any-linux-any/linux/version.h +3 -3
  115. package/libc/include/any-linux-any/linux/vfio.h +4 -0
  116. package/libc/include/any-linux-any/linux/videodev2.h +3 -0
  117. package/libc/include/any-linux-any/linux/virtio_ring.h +1 -2
  118. package/libc/include/any-linux-any/linux/vmclock-abi.h +20 -0
  119. package/libc/include/any-linux-any/rdma/bnxt_re-abi.h +16 -0
  120. package/libc/include/any-linux-any/rdma/ib_user_ioctl_cmds.h +16 -0
  121. package/libc/include/any-linux-any/rdma/mana-abi.h +3 -0
  122. package/libc/include/any-linux-any/scsi/scsi_bsg_ufs.h +8 -9
  123. package/libc/include/any-linux-any/sound/sof/tokens.h +6 -0
  124. package/libc/include/arc-linux-any/asm/swab.h +0 -63
  125. package/libc/include/arc-linux-any/asm/unistd_32.h +1 -0
  126. package/libc/include/arm-linux-any/asm/ptrace.h +0 -9
  127. package/libc/include/arm-linux-any/asm/unistd-eabi.h +1 -0
  128. package/libc/include/arm-linux-any/asm/unistd-oabi.h +1 -0
  129. package/libc/include/csky-linux-any/asm/unistd_32.h +1 -0
  130. package/libc/include/hexagon-linux-any/asm/unistd_32.h +1 -0
  131. package/libc/include/loongarch-linux-any/asm/hwcap.h +1 -0
  132. package/libc/include/loongarch-linux-any/asm/kvm.h +1 -0
  133. package/libc/include/loongarch-linux-any/asm/kvm_para.h +1 -0
  134. package/libc/include/loongarch-linux-any/asm/unistd_32.h +2 -0
  135. package/libc/include/loongarch-linux-any/asm/unistd_64.h +2 -0
  136. package/libc/include/m68k-linux-any/asm/unistd_32.h +1 -0
  137. package/libc/include/mips-linux-any/asm/errno.h +2 -0
  138. package/libc/include/mips-linux-any/asm/unistd_n32.h +1 -0
  139. package/libc/include/mips-linux-any/asm/unistd_n64.h +1 -0
  140. package/libc/include/mips-linux-any/asm/unistd_o32.h +1 -0
  141. package/libc/include/powerpc-linux-any/asm/unistd_32.h +1 -0
  142. package/libc/include/powerpc-linux-any/asm/unistd_64.h +1 -0
  143. package/libc/include/riscv-linux-any/asm/hwprobe.h +4 -0
  144. package/libc/include/riscv-linux-any/asm/kvm.h +3 -0
  145. package/libc/include/riscv-linux-any/asm/ptrace.h +37 -0
  146. package/libc/include/riscv-linux-any/asm/sigcontext.h +1 -0
  147. package/libc/include/riscv-linux-any/asm/unistd_32.h +1 -0
  148. package/libc/include/riscv-linux-any/asm/unistd_64.h +1 -0
  149. package/libc/include/s390x-linux-any/asm/unistd_64.h +1 -0
  150. package/libc/include/sparc-linux-any/asm/errno.h +2 -0
  151. package/libc/include/sparc-linux-any/asm/ioctls.h +4 -4
  152. package/libc/include/sparc-linux-any/asm/unistd_32.h +2 -0
  153. package/libc/include/sparc-linux-any/asm/unistd_64.h +2 -0
  154. package/libc/include/x86-linux-any/asm/auxvec.h +0 -4
  155. package/libc/include/x86-linux-any/asm/kvm.h +13 -8
  156. package/libc/include/x86-linux-any/asm/svm.h +16 -16
  157. package/libc/include/x86-linux-any/asm/unistd_32.h +1 -0
  158. package/libc/include/x86-linux-any/asm/unistd_64.h +1 -0
  159. package/libc/include/x86-linux-any/asm/unistd_x32.h +1 -0
  160. package/libc/include/xtensa-linux-any/asm/unistd_32.h +1 -0
  161. package/libc/musl/arch/mipsn32/syscall_arch.h +35 -32
  162. package/package.json +1 -1
  163. package/std/Build/Cache.zig +6 -6
  164. package/std/Build/Step/Compile.zig +0 -1
  165. package/std/Build/Step/Run.zig +2 -2
  166. package/std/Build/Step.zig +2 -4
  167. package/std/Build/WebServer.zig +2 -2
  168. package/std/Build.zig +0 -3
  169. package/std/Io/Dir.zig +7 -2
  170. package/std/Io/Dispatch.zig +3 -13
  171. package/std/Io/File/Writer.zig +8 -6
  172. package/std/Io/Reader.zig +8 -9
  173. package/std/Io/Semaphore.zig +112 -17
  174. package/std/Io/Terminal.zig +1 -1
  175. package/std/Io/Threaded.zig +171 -37
  176. package/std/Io/Uring.zig +13 -15
  177. package/std/Io/Writer.zig +46 -42
  178. package/std/Io/net.zig +11 -11
  179. package/std/Io.zig +90 -26
  180. package/std/SemanticVersion.zig +1 -1
  181. package/std/Target/Query.zig +2 -2
  182. package/std/Target.zig +50 -5
  183. package/std/array_hash_map.zig +9 -18
  184. package/std/builtin.zig +4 -0
  185. package/std/c/haiku.zig +3 -0
  186. package/std/c/serenity.zig +1 -6
  187. package/std/c.zig +89 -7
  188. package/std/compress/flate/Decompress.zig +2 -3
  189. package/std/compress/zstd/Decompress.zig +2 -4
  190. package/std/crypto/Certificate.zig +13 -1
  191. package/std/crypto/ascon.zig +75 -33
  192. package/std/crypto/codecs/asn1/Oid.zig +12 -1
  193. package/std/crypto/codecs/base64_hex_ct.zig +2 -4
  194. package/std/crypto/ml_kem.zig +2 -9
  195. package/std/crypto/tls/Client.zig +79 -4
  196. package/std/crypto/tls.zig +1 -1
  197. package/std/crypto.zig +1 -0
  198. package/std/debug/Pdb.zig +1 -1
  199. package/std/debug.zig +4 -3
  200. package/std/fmt.zig +8 -3
  201. package/std/fs/path.zig +6 -4
  202. package/std/heap/BufferFirstAllocator.zig +165 -0
  203. package/std/heap.zig +2 -126
  204. package/std/http/Client.zig +21 -24
  205. package/std/http.zig +3 -4
  206. package/std/json/Scanner.zig +2 -2
  207. package/std/os/emscripten.zig +1 -1
  208. package/std/os/linux/IoUring.zig +2 -0
  209. package/std/os/linux/aarch64.zig +41 -12
  210. package/std/os/linux/arc.zig +173 -0
  211. package/std/os/linux/arm.zig +41 -12
  212. package/std/os/linux/hexagon.zig +33 -11
  213. package/std/os/linux/loongarch32.zig +41 -13
  214. package/std/os/linux/loongarch64.zig +41 -12
  215. package/std/os/linux/m68k.zig +41 -13
  216. package/std/os/linux/mips.zig +67 -36
  217. package/std/os/linux/mips64.zig +60 -29
  218. package/std/os/linux/mipsn32.zig +60 -29
  219. package/std/os/linux/or1k.zig +41 -12
  220. package/std/os/linux/powerpc.zig +41 -12
  221. package/std/os/linux/powerpc64.zig +41 -12
  222. package/std/os/linux/riscv32.zig +41 -12
  223. package/std/os/linux/riscv64.zig +41 -12
  224. package/std/os/linux/s390x.zig +44 -7
  225. package/std/os/linux/sparc64.zig +83 -52
  226. package/std/os/linux/syscalls.zig +26 -1
  227. package/std/os/linux/thumb.zig +52 -36
  228. package/std/os/linux/x32.zig +41 -12
  229. package/std/os/linux/x86.zig +42 -13
  230. package/std/os/linux/x86_64.zig +41 -12
  231. package/std/os/linux.zig +412 -436
  232. package/std/os/uefi/tables/boot_services.zig +9 -8
  233. package/std/os.zig +41 -0
  234. package/std/process.zig +1 -1
  235. package/std/sort.zig +3 -3
  236. package/std/zig/Ast/Render.zig +3 -3
  237. package/std/zig/AstGen.zig +44 -98
  238. package/std/zig/AstRlAnnotate.zig +0 -11
  239. package/std/zig/BuiltinFn.zig +0 -32
  240. package/std/zig/LibCInstallation.zig +4 -3
  241. package/std/zig/Parse.zig +7 -7
  242. package/std/zig/WindowsSdk.zig +13 -13
  243. package/std/zig/Zir.zig +50 -63
  244. package/std/zig/ZonGen.zig +6 -5
  245. package/std/zig/llvm/Builder.zig +12 -12
  246. package/std/zig.zig +1 -10
  247. package/std/zip.zig +5 -5
  248. package/zig.h +340 -1
  249. package/libc/include/hexagon-linux-any/asm/signal.h +0 -29
  250. package/libc/include/s390x-linux-any/asm/tape390.h +0 -103
  251. package/libc/mingw/math/fdiml.c +0 -24
  252. package/libc/mingw/winpthreads/spinlock.c +0 -82
  253. package/libc/musl/src/linux/tee.c +0 -8
  254. package/libc/musl/src/math/fdimf.c +0 -10
  255. package/libc/musl/src/math/fdiml.c +0 -18
  256. package/libc/musl/src/string/strdup.c +0 -10
  257. package/libc/musl/src/string/strndup.c +0 -12
  258. package/libc/musl/src/string/wcsdup.c +0 -10
  259. package/libc/musl/src/thread/pthread_spin_destroy.c +0 -6
  260. package/libc/musl/src/thread/pthread_spin_init.c +0 -6
  261. package/libc/musl/src/thread/pthread_spin_lock.c +0 -8
  262. package/libc/musl/src/thread/pthread_spin_trylock.c +0 -7
  263. package/libc/musl/src/thread/pthread_spin_unlock.c +0 -7
  264. package/libc/musl/src/unistd/dup2.c +0 -20
  265. package/libc/musl/src/unistd/dup3.c +0 -26
  266. package/libc/wasi/thread-stub/pthread_spin_lock.c +0 -8
  267. package/libc/wasi/thread-stub/pthread_spin_trylock.c +0 -8
  268. package/libc/wasi/thread-stub/pthread_spin_unlock.c +0 -7
@@ -64,7 +64,8 @@
64
64
  #define HSA_CAP_RESERVED 0x000f8000
65
65
 
66
66
  #define HSA_CAP2_PER_SDMA_QUEUE_RESET_SUPPORTED 0x00000001
67
- #define HSA_CAP2_RESERVED 0xfffffffe
67
+ #define HSA_CAP2_TRAP_DEBUG_LDS_OUT_OF_ADDR_RANGE_SUPPORTED 0x00000002
68
+ #define HSA_CAP2_RESERVED 0xfffffffc
68
69
 
69
70
  /* debug_prop bits in node properties */
70
71
  #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f
@@ -11,9 +11,11 @@
11
11
  #include <linux/const.h>
12
12
  #include <linux/types.h>
13
13
 
14
+ #include <linux/stddef.h>
14
15
  #include <linux/ioctl.h>
15
16
  #include <asm/kvm.h>
16
17
 
18
+
17
19
  #define KVM_API_VERSION 12
18
20
 
19
21
  /*
@@ -135,6 +137,12 @@ struct kvm_xen_exit {
135
137
  } u;
136
138
  };
137
139
 
140
+ struct kvm_exit_snp_req_certs {
141
+ __u64 gpa;
142
+ __u64 npages;
143
+ __u64 ret;
144
+ };
145
+
138
146
  #define KVM_S390_GET_SKEYS_NONE 1
139
147
  #define KVM_S390_SKEYS_MAX 1048576
140
148
 
@@ -180,6 +188,8 @@ struct kvm_xen_exit {
180
188
  #define KVM_EXIT_MEMORY_FAULT 39
181
189
  #define KVM_EXIT_TDX 40
182
190
  #define KVM_EXIT_ARM_SEA 41
191
+ #define KVM_EXIT_ARM_LDST64B 42
192
+ #define KVM_EXIT_SNP_REQ_CERTS 43
183
193
 
184
194
  /* For KVM_EXIT_INTERNAL_ERROR */
185
195
  /* Emulate instruction failed. */
@@ -394,7 +404,7 @@ struct kvm_run {
394
404
  } eoi;
395
405
  /* KVM_EXIT_HYPERV */
396
406
  struct kvm_hyperv_exit hyperv;
397
- /* KVM_EXIT_ARM_NISV */
407
+ /* KVM_EXIT_ARM_NISV / KVM_EXIT_ARM_LDST64B */
398
408
  struct {
399
409
  __u64 esr_iss;
400
410
  __u64 fault_ipa;
@@ -474,6 +484,8 @@ struct kvm_run {
474
484
  __u64 gva;
475
485
  __u64 gpa;
476
486
  } arm_sea;
487
+ /* KVM_EXIT_SNP_REQ_CERTS */
488
+ struct kvm_exit_snp_req_certs snp_req_certs;
477
489
  /* Fix the size of the union. */
478
490
  char padding[256];
479
491
  };
@@ -520,7 +532,7 @@ struct kvm_coalesced_mmio {
520
532
 
521
533
  struct kvm_coalesced_mmio_ring {
522
534
  __u32 first, last;
523
- struct kvm_coalesced_mmio coalesced_mmio[];
535
+ __DECLARE_FLEX_ARRAY(struct kvm_coalesced_mmio, coalesced_mmio);
524
536
  };
525
537
 
526
538
  #define KVM_COALESCED_MMIO_MAX \
@@ -570,7 +582,7 @@ struct kvm_clear_dirty_log {
570
582
  /* for KVM_SET_SIGNAL_MASK */
571
583
  struct kvm_signal_mask {
572
584
  __u32 len;
573
- __u8 sigset[];
585
+ __DECLARE_FLEX_ARRAY(__u8, sigset);
574
586
  };
575
587
 
576
588
  /* for KVM_TPR_ACCESS_REPORTING */
@@ -966,6 +978,7 @@ struct kvm_enable_cap {
966
978
  #define KVM_CAP_GUEST_MEMFD_FLAGS 244
967
979
  #define KVM_CAP_ARM_SEA_TO_USER 245
968
980
  #define KVM_CAP_S390_USER_OPEREXEC 246
981
+ #define KVM_CAP_S390_KEYOP 247
969
982
 
970
983
  struct kvm_irq_routing_irqchip {
971
984
  __u32 irqchip;
@@ -1028,7 +1041,7 @@ struct kvm_irq_routing_entry {
1028
1041
  struct kvm_irq_routing {
1029
1042
  __u32 nr;
1030
1043
  __u32 flags;
1031
- struct kvm_irq_routing_entry entries[];
1044
+ __DECLARE_FLEX_ARRAY(struct kvm_irq_routing_entry, entries);
1032
1045
  };
1033
1046
 
1034
1047
  #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0)
@@ -1119,7 +1132,7 @@ struct kvm_dirty_tlb {
1119
1132
 
1120
1133
  struct kvm_reg_list {
1121
1134
  __u64 n; /* number of regs */
1122
- __u64 reg[];
1135
+ __DECLARE_FLEX_ARRAY(__u64, reg);
1123
1136
  };
1124
1137
 
1125
1138
  struct kvm_one_reg {
@@ -1211,6 +1224,16 @@ struct kvm_vfio_spapr_tce {
1211
1224
  __s32 tablefd;
1212
1225
  };
1213
1226
 
1227
+ #define KVM_S390_KEYOP_ISKE 0x01
1228
+ #define KVM_S390_KEYOP_RRBE 0x02
1229
+ #define KVM_S390_KEYOP_SSKE 0x03
1230
+ struct kvm_s390_keyop {
1231
+ __u64 guest_addr;
1232
+ __u8 key;
1233
+ __u8 operation;
1234
+ __u8 pad[6];
1235
+ };
1236
+
1214
1237
  /*
1215
1238
  * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns
1216
1239
  * a vcpu fd.
@@ -1230,6 +1253,7 @@ struct kvm_vfio_spapr_tce {
1230
1253
  #define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)
1231
1254
  #define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)
1232
1255
  #define KVM_S390_VCPU_FAULT _IOW(KVMIO, 0x52, unsigned long)
1256
+ #define KVM_S390_KEYOP _IOWR(KVMIO, 0x53, struct kvm_s390_keyop)
1233
1257
 
1234
1258
  /* Device model IOC */
1235
1259
  #define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)
@@ -1571,7 +1595,7 @@ struct kvm_stats_desc {
1571
1595
  __u16 size;
1572
1596
  __u32 offset;
1573
1597
  __u32 bucket_size;
1574
- char name[];
1598
+ __DECLARE_FLEX_ARRAY(char, name);
1575
1599
  };
1576
1600
 
1577
1601
  #define KVM_GET_STATS_FD _IO(KVMIO, 0xce)
@@ -117,11 +117,24 @@ struct landlock_ruleset_attr {
117
117
  * future nested domains, not the one being created. It can also be used
118
118
  * with a @ruleset_fd value of -1 to mute subdomain logs without creating a
119
119
  * domain.
120
+ *
121
+ * The following flag supports policy enforcement in multithreaded processes:
122
+ *
123
+ * %LANDLOCK_RESTRICT_SELF_TSYNC
124
+ * Applies the new Landlock configuration atomically to all threads of the
125
+ * current process, including the Landlock domain and logging
126
+ * configuration. This overrides the Landlock configuration of sibling
127
+ * threads, irrespective of previously established Landlock domains and
128
+ * logging configurations on these threads.
129
+ *
130
+ * If the calling thread is running with no_new_privs, this operation
131
+ * enables no_new_privs on the sibling threads as well.
120
132
  */
121
133
  /* clang-format off */
122
134
  #define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF (1U << 0)
123
135
  #define LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON (1U << 1)
124
136
  #define LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF (1U << 2)
137
+ #define LANDLOCK_RESTRICT_SELF_TSYNC (1U << 3)
125
138
  /* clang-format on */
126
139
 
127
140
  /**
@@ -182,11 +195,13 @@ struct landlock_net_port_attr {
182
195
  * It should be noted that port 0 passed to :manpage:`bind(2)` will bind
183
196
  * to an available port from the ephemeral port range. This can be
184
197
  * configured with the ``/proc/sys/net/ipv4/ip_local_port_range`` sysctl
185
- * (also used for IPv6).
198
+ * (also used for IPv6), and within that range, on a per-socket basis
199
+ * with ``setsockopt(IP_LOCAL_PORT_RANGE)``.
186
200
  *
187
- * A Landlock rule with port 0 and the ``LANDLOCK_ACCESS_NET_BIND_TCP``
201
+ * A Landlock rule with port 0 and the %LANDLOCK_ACCESS_NET_BIND_TCP
188
202
  * right means that requesting to bind on port 0 is allowed and it will
189
- * automatically translate to binding on the related port range.
203
+ * automatically translate to binding on a kernel-assigned ephemeral
204
+ * port.
190
205
  */
191
206
  __u64 port;
192
207
  };
@@ -329,13 +344,12 @@ struct landlock_net_port_attr {
329
344
  * These flags enable to restrict a sandboxed process to a set of network
330
345
  * actions.
331
346
  *
332
- * This is supported since Landlock ABI version 4.
333
- *
334
347
  * The following access rights apply to TCP port numbers:
335
348
  *
336
- * - %LANDLOCK_ACCESS_NET_BIND_TCP: Bind a TCP socket to a local port.
337
- * - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect an active TCP socket to
338
- * a remote port.
349
+ * - %LANDLOCK_ACCESS_NET_BIND_TCP: Bind TCP sockets to the given local
350
+ * port. Support added in Landlock ABI version 4.
351
+ * - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect TCP sockets to the given
352
+ * remote port. Support added in Landlock ABI version 4.
339
353
  */
340
354
  /* clang-format off */
341
355
  #define LANDLOCK_ACCESS_NET_BIND_TCP (1ULL << 0)
@@ -104,5 +104,6 @@
104
104
  #define SECRETMEM_MAGIC 0x5345434d /* "SECM" */
105
105
  #define PID_FS_MAGIC 0x50494446 /* "PIDF" */
106
106
  #define GUEST_MEMFD_MAGIC 0x474d454d /* "GMEM" */
107
+ #define NULL_FS_MAGIC 0x4E554C4C /* "NULL" */
107
108
 
108
109
  #endif /* __LINUX_MAGIC_H__ */
@@ -39,6 +39,9 @@ enum {
39
39
  #define MPOL_MODE_FLAGS \
40
40
  (MPOL_F_STATIC_NODES | MPOL_F_RELATIVE_NODES | MPOL_F_NUMA_BALANCING)
41
41
 
42
+ /* Whether the nodemask is specified by users */
43
+ #define MPOL_USER_NODEMASK_FLAGS (MPOL_F_STATIC_NODES | MPOL_F_RELATIVE_NODES)
44
+
42
45
  /* Flags for get_mempolicy */
43
46
  #define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */
44
47
  #define MPOL_F_ADDR (1<<1) /* look up vma using address */
@@ -61,7 +61,8 @@
61
61
  /*
62
62
  * open_tree() flags.
63
63
  */
64
- #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
64
+ #define OPEN_TREE_CLONE (1 << 0) /* Clone the target tree and attach the clone */
65
+ #define OPEN_TREE_NAMESPACE (1 << 1) /* Clone the target tree into a new mount namespace */
65
66
  #define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
66
67
 
67
68
  /*
@@ -197,7 +198,10 @@ struct statmount {
197
198
  */
198
199
  struct mnt_id_req {
199
200
  __u32 size;
200
- __u32 mnt_ns_fd;
201
+ union {
202
+ __u32 mnt_ns_fd;
203
+ __u32 mnt_fd;
204
+ };
201
205
  __u64 mnt_id;
202
206
  __u64 param;
203
207
  __u64 mnt_ns_id;
@@ -232,4 +236,9 @@ struct mnt_id_req {
232
236
  #define LSMT_ROOT 0xffffffffffffffff /* root mount */
233
237
  #define LISTMOUNT_REVERSE (1 << 0) /* List later mounts first */
234
238
 
239
+ /*
240
+ * @flag bits for statmount(2)
241
+ */
242
+ #define STATMOUNT_BY_FD 0x00000001U /* want mountinfo for given fd */
243
+
235
244
  #endif /* _LINUX_MOUNT_H */
@@ -11,7 +11,7 @@
11
11
  #define MPTCP_PM_VER 1
12
12
 
13
13
  /**
14
- * enum mptcp_event_type
14
+ * enum mptcp_event_type - Netlink MPTCP event types
15
15
  * @MPTCP_EVENT_UNSPEC: unused event
16
16
  * @MPTCP_EVENT_CREATED: A new MPTCP connection has been created. It is the
17
17
  * good time to allocate memory and send ADD_ADDR if needed. Depending on the
@@ -27,6 +27,8 @@ enum {
27
27
  MSHV_PT_BIT_X2APIC,
28
28
  MSHV_PT_BIT_GPA_SUPER_PAGES,
29
29
  MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES,
30
+ MSHV_PT_BIT_NESTED_VIRTUALIZATION,
31
+ MSHV_PT_BIT_SMT_ENABLED_GUEST,
30
32
  MSHV_PT_BIT_COUNT,
31
33
  };
32
34
 
@@ -5,13 +5,14 @@
5
5
  /* bridge-specific defines for netfilter.
6
6
  */
7
7
 
8
+ #include <netinet/if_ether.h> /* for __UAPI_DEF_ETHHDR if defined */
9
+
8
10
  #include <linux/in.h>
9
11
  #include <linux/netfilter.h>
10
12
  #include <linux/if_ether.h>
11
13
  #include <linux/if_vlan.h>
12
14
  #include <linux/if_pppox.h>
13
-
14
- #include <limits.h> /* for INT_MIN, INT_MAX */
15
+ #include <linux/typelimits.h>
15
16
 
16
17
  /* Bridge Hooks */
17
18
  /* After promisc drops, checksum checks. */
@@ -29,14 +30,14 @@
29
30
  #define NF_BR_NUMHOOKS 6
30
31
 
31
32
  enum nf_br_hook_priorities {
32
- NF_BR_PRI_FIRST = INT_MIN,
33
+ NF_BR_PRI_FIRST = __KERNEL_INT_MIN,
33
34
  NF_BR_PRI_NAT_DST_BRIDGED = -300,
34
35
  NF_BR_PRI_FILTER_BRIDGED = -200,
35
36
  NF_BR_PRI_BRNF = 0,
36
37
  NF_BR_PRI_NAT_DST_OTHER = 100,
37
38
  NF_BR_PRI_FILTER_OTHER = 200,
38
39
  NF_BR_PRI_NAT_SRC = 300,
39
- NF_BR_PRI_LAST = INT_MAX,
40
+ NF_BR_PRI_LAST = __KERNEL_INT_MAX,
40
41
  };
41
42
 
42
43
  #endif /* __LINUX_BRIDGE_NETFILTER_H */
@@ -7,11 +7,10 @@
7
7
 
8
8
 
9
9
  #include <linux/netfilter.h>
10
+ #include <linux/typelimits.h>
10
11
 
11
12
  /* only for userspace compatibility */
12
13
 
13
- #include <limits.h> /* for INT_MIN, INT_MAX */
14
-
15
14
  /* IP Hooks */
16
15
  /* After promisc drops, checksum checks. */
17
16
  #define NF_IP_PRE_ROUTING 0
@@ -26,7 +25,7 @@
26
25
  #define NF_IP_NUMHOOKS 5
27
26
 
28
27
  enum nf_ip_hook_priorities {
29
- NF_IP_PRI_FIRST = INT_MIN,
28
+ NF_IP_PRI_FIRST = __KERNEL_INT_MIN,
30
29
  NF_IP_PRI_RAW_BEFORE_DEFRAG = -450,
31
30
  NF_IP_PRI_CONNTRACK_DEFRAG = -400,
32
31
  NF_IP_PRI_RAW = -300,
@@ -39,8 +38,8 @@ enum nf_ip_hook_priorities {
39
38
  NF_IP_PRI_NAT_SRC = 100,
40
39
  NF_IP_PRI_SELINUX_LAST = 225,
41
40
  NF_IP_PRI_CONNTRACK_HELPER = 300,
42
- NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
43
- NF_IP_PRI_LAST = INT_MAX,
41
+ NF_IP_PRI_CONNTRACK_CONFIRM = __KERNEL_INT_MAX,
42
+ NF_IP_PRI_LAST = __KERNEL_INT_MAX,
44
43
  };
45
44
 
46
45
  /* Arguments for setsockopt SOL_IP: */
@@ -10,11 +10,10 @@
10
10
 
11
11
 
12
12
  #include <linux/netfilter.h>
13
+ #include <linux/typelimits.h>
13
14
 
14
15
  /* only for userspace compatibility */
15
16
 
16
- #include <limits.h> /* for INT_MIN, INT_MAX */
17
-
18
17
  /* IP6 Hooks */
19
18
  /* After promisc drops, checksum checks. */
20
19
  #define NF_IP6_PRE_ROUTING 0
@@ -30,7 +29,7 @@
30
29
 
31
30
 
32
31
  enum nf_ip6_hook_priorities {
33
- NF_IP6_PRI_FIRST = INT_MIN,
32
+ NF_IP6_PRI_FIRST = __KERNEL_INT_MIN,
34
33
  NF_IP6_PRI_RAW_BEFORE_DEFRAG = -450,
35
34
  NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
36
35
  NF_IP6_PRI_RAW = -300,
@@ -43,7 +42,7 @@ enum nf_ip6_hook_priorities {
43
42
  NF_IP6_PRI_NAT_SRC = 100,
44
43
  NF_IP6_PRI_SELINUX_LAST = 225,
45
44
  NF_IP6_PRI_CONNTRACK_HELPER = 300,
46
- NF_IP6_PRI_LAST = INT_MAX,
45
+ NF_IP6_PRI_LAST = __KERNEL_INT_MAX,
47
46
  };
48
47
 
49
48
 
@@ -55,7 +55,7 @@
55
55
  NFSERR_NODEV = 19, /* v2 v3 v4 */
56
56
  NFSERR_NOTDIR = 20, /* v2 v3 v4 */
57
57
  NFSERR_ISDIR = 21, /* v2 v3 v4 */
58
- NFSERR_INVAL = 22, /* v2 v3 v4 */
58
+ NFSERR_INVAL = 22, /* v3 v4 */
59
59
  NFSERR_FBIG = 27, /* v2 v3 v4 */
60
60
  NFSERR_NOSPC = 28, /* v2 v3 v4 */
61
61
  NFSERR_ROFS = 30, /* v2 v3 v4 */
@@ -35,6 +35,7 @@ enum {
35
35
  NFSD_A_SERVER_GRACETIME,
36
36
  NFSD_A_SERVER_LEASETIME,
37
37
  NFSD_A_SERVER_SCOPE,
38
+ NFSD_A_SERVER_MIN_THREADS,
38
39
 
39
40
  __NFSD_A_SERVER_MAX,
40
41
  NFSD_A_SERVER_MAX = (__NFSD_A_SERVER_MAX - 1)
@@ -58,7 +58,7 @@ NILFS_CPINFO_FNS(INVALID, invalid)
58
58
  NILFS_CPINFO_FNS(MINOR, minor)
59
59
 
60
60
  /**
61
- * nilfs_suinfo - segment usage information
61
+ * struct nilfs_suinfo - segment usage information
62
62
  * @sui_lastmod: timestamp of last modification
63
63
  * @sui_nblocks: number of written blocks in segment
64
64
  * @sui_flags: segment usage flags
@@ -93,7 +93,7 @@ static __inline__ int nilfs_suinfo_clean(const struct nilfs_suinfo *si)
93
93
  }
94
94
 
95
95
  /**
96
- * nilfs_suinfo_update - segment usage information update
96
+ * struct nilfs_suinfo_update - segment usage information update
97
97
  * @sup_segnum: segment number
98
98
  * @sup_flags: flags for which fields are active in sup_sui
99
99
  * @sup_reserved: reserved necessary for alignment
@@ -133,73 +133,104 @@ struct nilfs_super_root {
133
133
 
134
134
  /**
135
135
  * struct nilfs_super_block - structure of super block on disk
136
+ * @s_rev_level: Revision level
137
+ * @s_minor_rev_level: minor revision level
138
+ * @s_magic: Magic signature
139
+ * @s_bytes: Bytes count of CRC calculation for
140
+ * this structure. s_reserved is excluded.
141
+ * @s_flags: flags
142
+ * @s_crc_seed: Seed value of CRC calculation
143
+ * @s_sum: Check sum of super block
144
+ * @s_log_block_size: Block size represented as follows:
145
+ * blocksize = 1 << (s_log_block_size + 10)
146
+ * @s_nsegments: Number of segments in filesystem
147
+ * @s_dev_size: block device size in bytes
148
+ * @s_first_data_block: 1st seg disk block number
149
+ * @s_blocks_per_segment: number of blocks per full segment
150
+ * @s_r_segments_percentage: Reserved segments percentage
151
+ * @s_last_cno: Last checkpoint number
152
+ * @s_last_pseg: disk block addr pseg written last
153
+ * @s_last_seq: seq. number of seg written last
154
+ * @s_free_blocks_count: Free blocks count
155
+ * @s_ctime: Creation time (execution time of newfs)
156
+ * @s_mtime: Mount time
157
+ * @s_wtime: Write time
158
+ * @s_mnt_count: Mount count
159
+ * @s_max_mnt_count: Maximal mount count
160
+ * @s_state: File system state
161
+ * @s_errors: Behaviour when detecting errors
162
+ * @s_lastcheck: time of last check
163
+ * @s_checkinterval: max. time between checks
164
+ * @s_creator_os: OS
165
+ * @s_def_resuid: Default uid for reserved blocks
166
+ * @s_def_resgid: Default gid for reserved blocks
167
+ * @s_first_ino: First non-reserved inode
168
+ * @s_inode_size: Size of an inode
169
+ * @s_dat_entry_size: Size of a dat entry
170
+ * @s_checkpoint_size: Size of a checkpoint
171
+ * @s_segment_usage_size: Size of a segment usage
172
+ * @s_uuid: 128-bit uuid for volume
173
+ * @s_volume_name: volume name
174
+ * @s_c_interval: Commit interval of segment
175
+ * @s_c_block_max: Threshold of data amount for the
176
+ * segment construction
177
+ * @s_feature_compat: Compatible feature set
178
+ * @s_feature_compat_ro: Read-only compatible feature set
179
+ * @s_feature_incompat: Incompatible feature set
180
+ * @s_reserved: padding to the end of the block
136
181
  */
137
182
  struct nilfs_super_block {
138
- /*00*/ __le32 s_rev_level; /* Revision level */
139
- __le16 s_minor_rev_level; /* minor revision level */
140
- __le16 s_magic; /* Magic signature */
141
-
142
- __le16 s_bytes; /*
143
- * Bytes count of CRC calculation
144
- * for this structure. s_reserved
145
- * is excluded.
146
- */
147
- __le16 s_flags; /* flags */
148
- __le32 s_crc_seed; /* Seed value of CRC calculation */
149
- /*10*/ __le32 s_sum; /* Check sum of super block */
150
-
151
- __le32 s_log_block_size; /*
152
- * Block size represented as follows
153
- * blocksize =
154
- * 1 << (s_log_block_size + 10)
155
- */
156
- __le64 s_nsegments; /* Number of segments in filesystem */
157
- /*20*/ __le64 s_dev_size; /* block device size in bytes */
158
- __le64 s_first_data_block; /* 1st seg disk block number */
159
- /*30*/ __le32 s_blocks_per_segment; /* number of blocks per full segment */
160
- __le32 s_r_segments_percentage; /* Reserved segments percentage */
161
-
162
- __le64 s_last_cno; /* Last checkpoint number */
163
- /*40*/ __le64 s_last_pseg; /* disk block addr pseg written last */
164
- __le64 s_last_seq; /* seq. number of seg written last */
165
- /*50*/ __le64 s_free_blocks_count; /* Free blocks count */
166
-
167
- __le64 s_ctime; /*
168
- * Creation time (execution time of
169
- * newfs)
170
- */
171
- /*60*/ __le64 s_mtime; /* Mount time */
172
- __le64 s_wtime; /* Write time */
173
- /*70*/ __le16 s_mnt_count; /* Mount count */
174
- __le16 s_max_mnt_count; /* Maximal mount count */
175
- __le16 s_state; /* File system state */
176
- __le16 s_errors; /* Behaviour when detecting errors */
177
- __le64 s_lastcheck; /* time of last check */
178
-
179
- /*80*/ __le32 s_checkinterval; /* max. time between checks */
180
- __le32 s_creator_os; /* OS */
181
- __le16 s_def_resuid; /* Default uid for reserved blocks */
182
- __le16 s_def_resgid; /* Default gid for reserved blocks */
183
- __le32 s_first_ino; /* First non-reserved inode */
184
-
185
- /*90*/ __le16 s_inode_size; /* Size of an inode */
186
- __le16 s_dat_entry_size; /* Size of a dat entry */
187
- __le16 s_checkpoint_size; /* Size of a checkpoint */
188
- __le16 s_segment_usage_size; /* Size of a segment usage */
189
-
190
- /*98*/ __u8 s_uuid[16]; /* 128-bit uuid for volume */
191
- /*A8*/ char s_volume_name[80] /* volume name */
192
- __kernel_nonstring;
193
-
194
- /*F8*/ __le32 s_c_interval; /* Commit interval of segment */
195
- __le32 s_c_block_max; /*
196
- * Threshold of data amount for
197
- * the segment construction
198
- */
199
- /*100*/ __le64 s_feature_compat; /* Compatible feature set */
200
- __le64 s_feature_compat_ro; /* Read-only compatible feature set */
201
- __le64 s_feature_incompat; /* Incompatible feature set */
202
- __u32 s_reserved[186]; /* padding to the end of the block */
183
+ /*00*/ __le32 s_rev_level;
184
+ __le16 s_minor_rev_level;
185
+ __le16 s_magic;
186
+
187
+ __le16 s_bytes;
188
+ __le16 s_flags;
189
+ __le32 s_crc_seed;
190
+ /*10*/ __le32 s_sum;
191
+
192
+ __le32 s_log_block_size;
193
+ __le64 s_nsegments;
194
+ /*20*/ __le64 s_dev_size;
195
+ __le64 s_first_data_block;
196
+ /*30*/ __le32 s_blocks_per_segment;
197
+ __le32 s_r_segments_percentage;
198
+
199
+ __le64 s_last_cno;
200
+ /*40*/ __le64 s_last_pseg;
201
+ __le64 s_last_seq;
202
+ /*50*/ __le64 s_free_blocks_count;
203
+
204
+ __le64 s_ctime;
205
+ /*60*/ __le64 s_mtime;
206
+ __le64 s_wtime;
207
+ /*70*/ __le16 s_mnt_count;
208
+ __le16 s_max_mnt_count;
209
+ __le16 s_state;
210
+ __le16 s_errors;
211
+ __le64 s_lastcheck;
212
+
213
+ /*80*/ __le32 s_checkinterval;
214
+ __le32 s_creator_os;
215
+ __le16 s_def_resuid;
216
+ __le16 s_def_resgid;
217
+ __le32 s_first_ino;
218
+
219
+ /*90*/ __le16 s_inode_size;
220
+ __le16 s_dat_entry_size;
221
+ __le16 s_checkpoint_size;
222
+ __le16 s_segment_usage_size;
223
+
224
+ /*98*/ __u8 s_uuid[16];
225
+ /*A8*/ char s_volume_name[80] __kernel_nonstring;
226
+
227
+ /*F8*/ __le32 s_c_interval;
228
+ __le32 s_c_block_max;
229
+
230
+ /*100*/ __le64 s_feature_compat;
231
+ __le64 s_feature_compat_ro;
232
+ __le64 s_feature_incompat;
233
+ __u32 s_reserved[186];
203
234
  };
204
235
 
205
236
  /*
@@ -449,7 +480,7 @@ struct nilfs_btree_node {
449
480
  /**
450
481
  * struct nilfs_direct_node - header of built-in bmap array
451
482
  * @dn_flags: flags
452
- * @dn_pad: padding
483
+ * @pad: padding
453
484
  */
454
485
  struct nilfs_direct_node {
455
486
  __u8 dn_flags;