History

Merge remote-tracking branch 'origin/master' into perf/core

Further perf/core patches will depend on: d3f7b1bb2040 ("mm/gup: fix gup_fast with dynamic page table folding") which is already in Linus' tree.

Peter Zijlstra committed 5 years ago

Commit 20c77752 parents 306e3e9 fa02fcd15620 files · +594574 −316393Browse files

Showing the changes to include/uapi/linux (72 of 15620 files). Show all

Unified · Split

72 files
  1. include/uapi/linux/blkzoned.h +9 −6
  2. include/uapi/linux/bpf.h +640 −39
  3. include/uapi/linux/btrfs_tree.h +14 −0
  4. include/uapi/linux/can/isotp.h +165 −0
  5. include/uapi/linux/can/raw.h +3 −0
  6. include/uapi/linux/capability.h +2 −0
  7. include/uapi/linux/cdrom.h +4 −1
  8. include/uapi/linux/coresight-stm.h +1 −0
  9. include/uapi/linux/devlink.h +69 −0
  10. include/uapi/linux/dm-ioctl.h +2 −2
  11. include/uapi/linux/dqblk_xfs.h +13 −3
  12. include/uapi/linux/elf.h +1 −0
  13. include/uapi/linux/ethtool.h +2 −0
  14. include/uapi/linux/ethtool_netlink.h +18 −1
  15. include/uapi/linux/fscrypt.h +3 −3
  16. include/uapi/linux/fuse.h +47 −3
  17. include/uapi/linux/genetlink.h +11 −0
  18. include/uapi/linux/gpio.h +337 −27
  19. include/uapi/linux/gtp.h +2 −0
  20. include/uapi/linux/icmpv6.h +1 −0
  21. include/uapi/linux/if_alg.h +1 −0
  22. include/uapi/linux/if_bridge.h +38 −0
  23. include/uapi/linux/if_link.h +202 −33
  24. include/uapi/linux/if_pppol2tp.h +1 −1
  25. include/uapi/linux/iio/types.h +1 −0
  26. include/uapi/linux/in.h +1 −1
  27. include/uapi/linux/inet_diag.h +18 −0
  28. include/uapi/linux/input-event-codes.h +4 −0
  29. include/uapi/linux/io_uring.h +50 −11
  30. include/uapi/linux/iommu.h +13 −5
  31. include/uapi/linux/ipmi_msgdefs.h +2 −0
  32. include/uapi/linux/kfd_ioctl.h +9 −2
  33. include/uapi/linux/kvm.h +23 −2
  34. include/uapi/linux/l2tp.h +5 −2
  35. include/uapi/linux/mei.h +49 −0
  36. include/uapi/linux/membarrier.h +26 −0
  37. include/uapi/linux/mic_common.h +0 −235
  38. include/uapi/linux/mic_ioctl.h +0 −77
  39. include/uapi/linux/mman.h +1 −0
  40. include/uapi/linux/mount.h +1 −0
  41. include/uapi/linux/mroute.h +3 −2
  42. include/uapi/linux/netfilter.h +2 −1
  43. include/uapi/linux/netfilter/nf_tables.h +11 −1
  44. include/uapi/linux/netfilter/nfnetlink_conntrack.h +2 −1
  45. include/uapi/linux/netlink.h +4 −0
  46. include/uapi/linux/nfs4.h +3 −0
  47. include/uapi/linux/nfsacl.h +2 −0
  48. include/uapi/linux/nitro_enclaves.h +359 −0
  49. include/uapi/linux/nl80211.h +174 −22
  50. include/uapi/linux/pci_regs.h +5 −1
  51. include/uapi/linux/perf_event.h +1 −1
  52. include/uapi/linux/pidfd.h +12 −0
  53. include/uapi/linux/prctl.h +9 −0
  54. include/uapi/linux/rxrpc.h +1 −1
  55. include/uapi/linux/snmp.h +1 −0
  56. include/uapi/linux/tc_act/tc_mpls.h +1 −0
  57. include/uapi/linux/tc_act/tc_vlan.h +4 −0
  58. include/uapi/linux/tee.h +13 −0
  59. include/uapi/linux/tipc.h +2 −0
  60. include/uapi/linux/tipc_netlink.h +2 −0
  61. include/uapi/linux/v4l2-controls.h +25 −0
  62. include/uapi/linux/v4l2-mediabus.h +13 −2
  63. include/uapi/linux/v4l2-subdev.h +9 −1
  64. include/uapi/linux/vfio.h +28 −1
  65. include/uapi/linux/vfio_zdev.h +78 −0
  66. include/uapi/linux/vhost.h +4 −0
  67. include/uapi/linux/vhost_types.h +9 −0
  68. include/uapi/linux/videodev2.h +16 −20
  69. include/uapi/linux/virtio_fs.h +3 −0
  70. include/uapi/linux/virtio_gpu.h +19 −0
  71. include/uapi/linux/virtio_mmio.h +11 −0
  72. include/uapi/linux/virtio_pci.h +10 −1
include/uapi/linux/blkzoned.h+9−6
@@ -93,12 +93,15 @@ enum blk_zone_report_flags { · 92 unmodified lines
93 * @non_seq: Flag indicating that the zone is using non-sequential resources93 * @non_seq: Flag indicating that the zone is using non-sequential resources
94 * (for host-aware zoned block devices only).94 * (for host-aware zoned block devices only).
95 * @reset: Flag indicating that a zone reset is recommended.95 * @reset: Flag indicating that a zone reset is recommended.
96 * @reserved: Padding to 64 B to match the ZBC/ZAC defined zone descriptor size.96 * @resv: Padding for 8B alignment.
97 * @capacity: Zone usable capacity in 512 B sector units
98 * @reserved: Padding to 64 B to match the ZBC, ZAC and ZNS defined zone
99 * descriptor size.
97 *100 *
98 * start, len and wp use the regular 512 B sector unit, regardless of the101 * start, len, capacity and wp use the regular 512 B sector unit, regardless
99 * device logical block size. The overall structure size is 64 B to match the102 * of the device logical block size. The overall structure size is 64 B to
100 * ZBC/ZAC defined zone descriptor and allow support for future additional103 * match the ZBC, ZAC and ZNS defined zone descriptor and allow support for
101 * zone information.104 * future additional zone information.
102 */105 */
103struct blk_zone {106struct blk_zone {
104 __u64 start; /* Zone start sector */107 __u64 start; /* Zone start sector */
@@ -118,7 +121,7 @@ struct blk_zone { · 13 unmodified lines
118 *121 *
119 * @sector: starting sector of report122 * @sector: starting sector of report
120 * @nr_zones: IN maximum / OUT actual123 * @nr_zones: IN maximum / OUT actual
121 * @reserved: padding to 16 byte alignment124 * @flags: one or more flags as defined by enum blk_zone_report_flags.
122 * @zones: Space to hold @nr_zones @zones entries on reply.125 * @zones: Space to hold @nr_zones @zones entries on reply.
123 *126 *
124 * The array of at most @nr_zones must follow this structure in memory.127 * The array of at most @nr_zones must follow this structure in memory.
include/uapi/linux/bpf.h+640−39
@@ -124,6 +124,7 @@ enum bpf_cmd { · 123 unmodified lines
124 BPF_ENABLE_STATS,124 BPF_ENABLE_STATS,
125 BPF_ITER_CREATE,125 BPF_ITER_CREATE,
126 BPF_LINK_DETACH,126 BPF_LINK_DETACH,
127 BPF_PROG_BIND_MAP,
127};128};
128 129
129enum bpf_map_type {130enum bpf_map_type {
@@ -155,6 +156,7 @@ enum bpf_map_type { · 25 unmodified lines
155 BPF_MAP_TYPE_DEVMAP_HASH,156 BPF_MAP_TYPE_DEVMAP_HASH,
156 BPF_MAP_TYPE_STRUCT_OPS,157 BPF_MAP_TYPE_STRUCT_OPS,
157 BPF_MAP_TYPE_RINGBUF,158 BPF_MAP_TYPE_RINGBUF,
159 BPF_MAP_TYPE_INODE_STORAGE,
158};160};
159 161
160/* Note that tracing related programs such as162/* Note that tracing related programs such as
@@ -345,19 +347,45 @@ enum bpf_link_type { · 184 unmodified lines
345/* The verifier internal test flag. Behavior is undefined */347/* The verifier internal test flag. Behavior is undefined */
346#define BPF_F_TEST_STATE_FREQ (1U << 3)348#define BPF_F_TEST_STATE_FREQ (1U << 3)
347 349
350/* If BPF_F_SLEEPABLE is used in BPF_PROG_LOAD command, the verifier will
351 * restrict map and helper usage for such programs. Sleepable BPF programs can
352 * only be attached to hooks where kernel execution context allows sleeping.
353 * Such programs are allowed to use helpers that may sleep like
354 * bpf_copy_from_user().
355 */
356#define BPF_F_SLEEPABLE (1U << 4)
357
348/* When BPF ldimm64's insn[0].src_reg != 0 then this can have358/* When BPF ldimm64's insn[0].src_reg != 0 then this can have
349 * two extensions:359 * the following extensions:
350 *360 *
351 * insn[0].src_reg: BPF_PSEUDO_MAP_FD BPF_PSEUDO_MAP_VALUE361 * insn[0].src_reg: BPF_PSEUDO_MAP_FD
352 * insn[0].imm: map fd map fd362 * insn[0].imm: map fd
353 * insn[1].imm: 0 offset into value363 * insn[1].imm: 0
354 * insn[0].off: 0 0364 * insn[0].off: 0
355 * insn[1].off: 0 0365 * insn[1].off: 0
356 * ldimm64 rewrite: address of map address of map[0]+offset366 * ldimm64 rewrite: address of map
357 * verifier type: CONST_PTR_TO_MAP PTR_TO_MAP_VALUE367 * verifier type: CONST_PTR_TO_MAP
358 */368 */
359#define BPF_PSEUDO_MAP_FD 1369#define BPF_PSEUDO_MAP_FD 1
370/* insn[0].src_reg: BPF_PSEUDO_MAP_VALUE
371 * insn[0].imm: map fd
372 * insn[1].imm: offset into value
373 * insn[0].off: 0
374 * insn[1].off: 0
375 * ldimm64 rewrite: address of map[0]+offset
376 * verifier type: PTR_TO_MAP_VALUE
377 */
360#define BPF_PSEUDO_MAP_VALUE 2378#define BPF_PSEUDO_MAP_VALUE 2
379/* insn[0].src_reg: BPF_PSEUDO_BTF_ID
380 * insn[0].imm: kernel btd id of VAR
381 * insn[1].imm: 0
382 * insn[0].off: 0
383 * insn[1].off: 0
384 * ldimm64 rewrite: address of the kernel variable
385 * verifier type: PTR_TO_BTF_ID or PTR_TO_MEM, depending on whether the var
386 * is struct/union.
387 */
388#define BPF_PSEUDO_BTF_ID 3
361 389
362/* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative390/* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
363 * offset to another bpf function391 * offset to another bpf function
@@ -404,6 +432,12 @@ enum { · 40 unmodified lines
404 432
405/* Enable memory-mapping BPF map */433/* Enable memory-mapping BPF map */
406 BPF_F_MMAPABLE = (1U << 10),434 BPF_F_MMAPABLE = (1U << 10),
435
436/* Share perf_event among processes */
437 BPF_F_PRESERVE_ELEMS = (1U << 11),
438
439/* Create a map that is suitable to be an inner map with dynamic max entries */
440 BPF_F_INNER_MAP = (1U << 12),
407};441};
408 442
409/* Flags for BPF_PROG_QUERY. */443/* Flags for BPF_PROG_QUERY. */
@@ -414,6 +448,11 @@ enum { · 4 unmodified lines
414 */448 */
415#define BPF_F_QUERY_EFFECTIVE (1U << 0)449#define BPF_F_QUERY_EFFECTIVE (1U << 0)
416 450
451/* Flags for BPF_PROG_TEST_RUN */
452
453/* If set, run the test on the cpu specified by bpf_attr.test.cpu */
454#define BPF_F_TEST_RUN_ON_CPU (1U << 0)
455
417/* type for BPF_ENABLE_STATS */456/* type for BPF_ENABLE_STATS */
418enum bpf_stats_type {457enum bpf_stats_type {
419 /* enabled run_time_ns and run_cnt */458 /* enabled run_time_ns and run_cnt */
@@ -556,6 +595,8 @@ union bpf_attr { · 136 unmodified lines
556 */595 */
557 __aligned_u64 ctx_in;596 __aligned_u64 ctx_in;
558 __aligned_u64 ctx_out;597 __aligned_u64 ctx_out;
598 __u32 flags;
599 __u32 cpu;
559 } test;600 } test;
560 601
561 struct { /* anonymous struct used by BPF_*_GET_*_ID */602 struct { /* anonymous struct used by BPF_*_GET_*_ID */
@@ -622,8 +663,13 @@ union bpf_attr { · 60 unmodified lines
622 };663 };
623 __u32 attach_type; /* attach type */664 __u32 attach_type; /* attach type */
624 __u32 flags; /* extra flags */665 __u32 flags; /* extra flags */
625 __aligned_u64 iter_info; /* extra bpf_iter_link_info */666 union {
626 __u32 iter_info_len; /* iter_info length */667 __u32 target_btf_id; /* btf_id of target to attach to */
668 struct {
669 __aligned_u64 iter_info; /* extra bpf_iter_link_info */
670 __u32 iter_info_len; /* iter_info length */
671 };
672 };
627 } link_create;673 } link_create;
628 674
629 struct { /* struct used by BPF_LINK_UPDATE command */675 struct { /* struct used by BPF_LINK_UPDATE command */
@@ -649,6 +695,12 @@ union bpf_attr { · 19 unmodified lines
649 __u32 flags;695 __u32 flags;
650 } iter_create;696 } iter_create;
651 697
698 struct { /* struct used by BPF_PROG_BIND_MAP command */
699 __u32 prog_fd;
700 __u32 map_fd;
701 __u32 flags; /* extra flags */
702 } prog_bind_map;
703
652} __attribute__((aligned(8)));704} __attribute__((aligned(8)));
653 705
654/* The description below is an attempt at providing documentation to eBPF706/* The description below is an attempt at providing documentation to eBPF
@@ -767,7 +819,7 @@ union bpf_attr { · 112 unmodified lines
767 *819 *
768 * Also, note that **bpf_trace_printk**\ () is slow, and should820 * Also, note that **bpf_trace_printk**\ () is slow, and should
769 * only be used for debugging purposes. For this reason, a notice821 * only be used for debugging purposes. For this reason, a notice
770 * bloc (spanning several lines) is printed to kernel logs and822 * block (spanning several lines) is printed to kernel logs and
771 * states that the helper should not be used "for production use"823 * states that the helper should not be used "for production use"
772 * the first time this helper is used (or more precisely, when824 * the first time this helper is used (or more precisely, when
773 * **trace_printk**\ () buffers are allocated). For passing values825 * **trace_printk**\ () buffers are allocated). For passing values
@@ -1033,14 +1085,14 @@ union bpf_attr { · 259 unmodified lines
1033 *1085 *
1034 * int ret;1086 * int ret;
1035 * struct bpf_tunnel_key key = {};1087 * struct bpf_tunnel_key key = {};
1036 * 1088 *
1037 * ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);1089 * ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);
1038 * if (ret < 0)1090 * if (ret < 0)
1039 * return TC_ACT_SHOT; // drop packet1091 * return TC_ACT_SHOT; // drop packet
1040 * 1092 *
1041 * if (key.remote_ipv4 != 0x0a000001)1093 * if (key.remote_ipv4 != 0x0a000001)
1042 * return TC_ACT_SHOT; // drop packet1094 * return TC_ACT_SHOT; // drop packet
1043 * 1095 *
1044 * return TC_ACT_OK; // accept packet1096 * return TC_ACT_OK; // accept packet
1045 *1097 *
1046 * This interface can also be used with all encapsulation devices1098 * This interface can also be used with all encapsulation devices
@@ -1147,7 +1199,7 @@ union bpf_attr { · 100 unmodified lines
1147 * Description1199 * Description
1148 * Retrieve the realm or the route, that is to say the1200 * Retrieve the realm or the route, that is to say the
1149 * **tclassid** field of the destination for the *skb*. The1201 * **tclassid** field of the destination for the *skb*. The
1150 * indentifier retrieved is a user-provided tag, similar to the1202 * identifier retrieved is a user-provided tag, similar to the
1151 * one used with the net_cls cgroup (see description for1203 * one used with the net_cls cgroup (see description for
1152 * **bpf_get_cgroup_classid**\ () helper), but here this tag is1204 * **bpf_get_cgroup_classid**\ () helper), but here this tag is
1153 * held by a route (a destination entry), not by a task.1205 * held by a route (a destination entry), not by a task.
@@ -1438,8 +1490,8 @@ union bpf_attr { · 284 unmodified lines
1438 * Return1490 * Return
1439 * The return value depends on the result of the test, and can be:1491 * The return value depends on the result of the test, and can be:
1440 *1492 *
1441 * * 0, if the *skb* task belongs to the cgroup2.1493 * * 0, if current task belongs to the cgroup2.
1442 * * 1, if the *skb* task does not belong to the cgroup2.1494 * * 1, if current task does not belong to the cgroup2.
1443 * * A negative error code, if an error occurred.1495 * * A negative error code, if an error occurred.
1444 *1496 *
1445 * long bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)1497 * long bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
@@ -1649,7 +1701,7 @@ union bpf_attr { · 203 unmodified lines
1649 * **TCP_CONGESTION**, **TCP_BPF_IW**,1701 * **TCP_CONGESTION**, **TCP_BPF_IW**,
1650 * **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**,1702 * **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**,
1651 * **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**,1703 * **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**,
1652 * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**.1704 * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**.
1653 * * **IPPROTO_IP**, which supports *optname* **IP_TOS**.1705 * * **IPPROTO_IP**, which supports *optname* **IP_TOS**.
1654 * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.1706 * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.
1655 * Return1707 * Return
@@ -2204,7 +2256,7 @@ union bpf_attr { · 548 unmodified lines
2204 * Description2256 * Description
2205 * This helper is used in programs implementing policies at the2257 * This helper is used in programs implementing policies at the
2206 * skb socket level. If the sk_buff *skb* is allowed to pass (i.e.2258 * skb socket level. If the sk_buff *skb* is allowed to pass (i.e.
2207 * if the verdeict eBPF program returns **SK_PASS**), redirect it2259 * if the verdict eBPF program returns **SK_PASS**), redirect it
2208 * to the socket referenced by *map* (of type2260 * to the socket referenced by *map* (of type
2209 * **BPF_MAP_TYPE_SOCKHASH**) using hash *key*. Both ingress and2261 * **BPF_MAP_TYPE_SOCKHASH**) using hash *key*. Both ingress and
2210 * egress interfaces can be used for redirection. The2262 * egress interfaces can be used for redirection. The
@@ -2496,7 +2548,7 @@ union bpf_attr { · 285 unmodified lines
2496 * result is from *reuse*\ **->socks**\ [] using the hash of the2548 * result is from *reuse*\ **->socks**\ [] using the hash of the
2497 * tuple.2549 * tuple.
2498 *2550 *
2499 * long bpf_sk_release(struct bpf_sock *sock)2551 * long bpf_sk_release(void *sock)
2500 * Description2552 * Description
2501 * Release the reference held by *sock*. *sock* must be a2553 * Release the reference held by *sock*. *sock* must be a
2502 * non-**NULL** pointer that was returned from2554 * non-**NULL** pointer that was returned from
@@ -2676,7 +2728,7 @@ union bpf_attr { · 173 unmodified lines
2676 * result is from *reuse*\ **->socks**\ [] using the hash of the2728 * result is from *reuse*\ **->socks**\ [] using the hash of the
2677 * tuple.2729 * tuple.
2678 *2730 *
2679 * long bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)2731 * long bpf_tcp_check_syncookie(void *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
2680 * Description2732 * Description
2681 * Check whether *iph* and *th* contain a valid SYN cookie ACK for2733 * Check whether *iph* and *th* contain a valid SYN cookie ACK for
2682 * the listening socket in *sk*.2734 * the listening socket in *sk*.
@@ -2807,7 +2859,7 @@ union bpf_attr { · 124 unmodified lines
2807 *2859 *
2808 * **-ERANGE** if resulting value was out of range.2860 * **-ERANGE** if resulting value was out of range.
2809 *2861 *
2810 * void *bpf_sk_storage_get(struct bpf_map *map, struct bpf_sock *sk, void *value, u64 flags)2862 * void *bpf_sk_storage_get(struct bpf_map *map, void *sk, void *value, u64 flags)
2811 * Description2863 * Description
2812 * Get a bpf-local-storage from a *sk*.2864 * Get a bpf-local-storage from a *sk*.
2813 *2865 *
@@ -2823,6 +2875,9 @@ union bpf_attr { · 9 unmodified lines
2823 * "type". The bpf-local-storage "type" (i.e. the *map*) is2875 * "type". The bpf-local-storage "type" (i.e. the *map*) is
2824 * searched against all bpf-local-storages residing at *sk*.2876 * searched against all bpf-local-storages residing at *sk*.
2825 *2877 *
2878 * *sk* is a kernel **struct sock** pointer for LSM program.
2879 * *sk* is a **struct bpf_sock** pointer for other program types.
2880 *
2826 * An optional *flags* (**BPF_SK_STORAGE_GET_F_CREATE**) can be2881 * An optional *flags* (**BPF_SK_STORAGE_GET_F_CREATE**) can be
2827 * used such that a new bpf-local-storage will be2882 * used such that a new bpf-local-storage will be
2828 * created if one does not exist. *value* can be used2883 * created if one does not exist. *value* can be used
@@ -2835,13 +2890,14 @@ union bpf_attr { · 6 unmodified lines
2835 * **NULL** if not found or there was an error in adding2890 * **NULL** if not found or there was an error in adding
2836 * a new bpf-local-storage.2891 * a new bpf-local-storage.
2837 *2892 *
2838 * long bpf_sk_storage_delete(struct bpf_map *map, struct bpf_sock *sk)2893 * long bpf_sk_storage_delete(struct bpf_map *map, void *sk)
2839 * Description2894 * Description
2840 * Delete a bpf-local-storage from a *sk*.2895 * Delete a bpf-local-storage from a *sk*.
2841 * Return2896 * Return
2842 * 0 on success.2897 * 0 on success.
2843 *2898 *
2844 * **-ENOENT** if the bpf-local-storage cannot be found.2899 * **-ENOENT** if the bpf-local-storage cannot be found.
2900 * **-EINVAL** if sk is not a fullsock (e.g. a request_sock).
2845 *2901 *
2846 * long bpf_send_signal(u32 sig)2902 * long bpf_send_signal(u32 sig)
2847 * Description2903 * Description
@@ -2858,7 +2914,7 @@ union bpf_attr { · 10 unmodified lines
2858 *2914 *
2859 * **-EAGAIN** if bpf program can try again.2915 * **-EAGAIN** if bpf program can try again.
2860 *2916 *
2861 * s64 bpf_tcp_gen_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)2917 * s64 bpf_tcp_gen_syncookie(void *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
2862 * Description2918 * Description
2863 * Try to issue a SYN cookie for the packet with corresponding2919 * Try to issue a SYN cookie for the packet with corresponding
2864 * IP/TCP headers, *iph* and *th*, on the listening socket in *sk*.2920 * IP/TCP headers, *iph* and *th*, on the listening socket in *sk*.
@@ -3087,7 +3143,7 @@ union bpf_attr { · 222 unmodified lines
3087 * Return3143 * Return
3088 * The id is returned or 0 in case the id could not be retrieved.3144 * The id is returned or 0 in case the id could not be retrieved.
3089 *3145 *
3090 * long bpf_sk_assign(struct sk_buff *skb, struct bpf_sock *sk, u64 flags)3146 * long bpf_sk_assign(struct sk_buff *skb, void *sk, u64 flags)
3091 * Description3147 * Description
3092 * Helper is overloaded depending on BPF program type. This3148 * Helper is overloaded depending on BPF program type. This
3093 * description applies to **BPF_PROG_TYPE_SCHED_CLS** and3149 * description applies to **BPF_PROG_TYPE_SCHED_CLS** and
@@ -3215,11 +3271,11 @@ union bpf_attr { · 121 unmodified lines
3215 *3271 *
3216 * **-EOVERFLOW** if an overflow happened: The same object will be tried again.3272 * **-EOVERFLOW** if an overflow happened: The same object will be tried again.
3217 *3273 *
3218 * u64 bpf_sk_cgroup_id(struct bpf_sock *sk)3274 * u64 bpf_sk_cgroup_id(void *sk)
3219 * Description3275 * Description
3220 * Return the cgroup v2 id of the socket *sk*.3276 * Return the cgroup v2 id of the socket *sk*.
3221 *3277 *
3222 * *sk* must be a non-**NULL** pointer to a full socket, e.g. one3278 * *sk* must be a non-**NULL** pointer to a socket, e.g. one
3223 * returned from **bpf_sk_lookup_xxx**\ (),3279 * returned from **bpf_sk_lookup_xxx**\ (),
3224 * **bpf_sk_fullsock**\ (), etc. The format of returned id is3280 * **bpf_sk_fullsock**\ (), etc. The format of returned id is
3225 * same as in **bpf_skb_cgroup_id**\ ().3281 * same as in **bpf_skb_cgroup_id**\ ().
@@ -3229,7 +3285,7 @@ union bpf_attr { · 3 unmodified lines
3229 * Return3285 * Return
3230 * The id is returned or 0 in case the id could not be retrieved.3286 * The id is returned or 0 in case the id could not be retrieved.
3231 *3287 *
3232 * u64 bpf_sk_ancestor_cgroup_id(struct bpf_sock *sk, int ancestor_level)3288 * u64 bpf_sk_ancestor_cgroup_id(void *sk, int ancestor_level)
3233 * Description3289 * Description
3234 * Return id of cgroup v2 that is ancestor of cgroup associated3290 * Return id of cgroup v2 that is ancestor of cgroup associated
3235 * with the *sk* at the *ancestor_level*. The root cgroup is at3291 * with the *sk* at the *ancestor_level*. The root cgroup is at
@@ -3337,38 +3393,38 @@ union bpf_attr { · 101 unmodified lines
3337 * Description3393 * Description
3338 * Dynamically cast a *sk* pointer to a *tcp6_sock* pointer.3394 * Dynamically cast a *sk* pointer to a *tcp6_sock* pointer.
3339 * Return3395 * Return
3340 * *sk* if casting is valid, or NULL otherwise.3396 * *sk* if casting is valid, or **NULL** otherwise.
3341 *3397 *
3342 * struct tcp_sock *bpf_skc_to_tcp_sock(void *sk)3398 * struct tcp_sock *bpf_skc_to_tcp_sock(void *sk)
3343 * Description3399 * Description
3344 * Dynamically cast a *sk* pointer to a *tcp_sock* pointer.3400 * Dynamically cast a *sk* pointer to a *tcp_sock* pointer.
3345 * Return3401 * Return
3346 * *sk* if casting is valid, or NULL otherwise.3402 * *sk* if casting is valid, or **NULL** otherwise.
3347 *3403 *
3348 * struct tcp_timewait_sock *bpf_skc_to_tcp_timewait_sock(void *sk)3404 * struct tcp_timewait_sock *bpf_skc_to_tcp_timewait_sock(void *sk)
3349 * Description3405 * Description
3350 * Dynamically cast a *sk* pointer to a *tcp_timewait_sock* pointer.3406 * Dynamically cast a *sk* pointer to a *tcp_timewait_sock* pointer.
3351 * Return3407 * Return
3352 * *sk* if casting is valid, or NULL otherwise.3408 * *sk* if casting is valid, or **NULL** otherwise.
3353 *3409 *
3354 * struct tcp_request_sock *bpf_skc_to_tcp_request_sock(void *sk)3410 * struct tcp_request_sock *bpf_skc_to_tcp_request_sock(void *sk)
3355 * Description3411 * Description
3356 * Dynamically cast a *sk* pointer to a *tcp_request_sock* pointer.3412 * Dynamically cast a *sk* pointer to a *tcp_request_sock* pointer.
3357 * Return3413 * Return
3358 * *sk* if casting is valid, or NULL otherwise.3414 * *sk* if casting is valid, or **NULL** otherwise.
3359 *3415 *
3360 * struct udp6_sock *bpf_skc_to_udp6_sock(void *sk)3416 * struct udp6_sock *bpf_skc_to_udp6_sock(void *sk)
3361 * Description3417 * Description
3362 * Dynamically cast a *sk* pointer to a *udp6_sock* pointer.3418 * Dynamically cast a *sk* pointer to a *udp6_sock* pointer.
3363 * Return3419 * Return
3364 * *sk* if casting is valid, or NULL otherwise.3420 * *sk* if casting is valid, or **NULL** otherwise.
3365 *3421 *
3366 * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags)3422 * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags)
3367 * Description3423 * Description
3368 * Return a user or a kernel stack in bpf program provided buffer.3424 * Return a user or a kernel stack in bpf program provided buffer.
3369 * To achieve this, the helper needs *task*, which is a valid3425 * To achieve this, the helper needs *task*, which is a valid
3370 * pointer to struct task_struct. To store the stacktrace, the3426 * pointer to **struct task_struct**. To store the stacktrace, the
3371 * bpf program provides *buf* with a nonnegative *size*.3427 * bpf program provides *buf* with a nonnegative *size*.
3372 *3428 *
3373 * The last argument, *flags*, holds the number of stack frames to3429 * The last argument, *flags*, holds the number of stack frames to
3374 * skip (from 0 to 255), masked with3430 * skip (from 0 to 255), masked with
@@ -3395,6 +3451,297 @@ union bpf_attr { · 20 unmodified lines
3395 * A non-negative value equal to or less than *size* on success,3451 * A non-negative value equal to or less than *size* on success,
3396 * or a negative error in case of failure.3452 * or a negative error in case of failure.
3397 *3453 *
3454 * long bpf_load_hdr_opt(struct bpf_sock_ops *skops, void *searchby_res, u32 len, u64 flags)
3455 * Description
3456 * Load header option. Support reading a particular TCP header
3457 * option for bpf program (**BPF_PROG_TYPE_SOCK_OPS**).
3458 *
3459 * If *flags* is 0, it will search the option from the
3460 * *skops*\ **->skb_data**. The comment in **struct bpf_sock_ops**
3461 * has details on what skb_data contains under different
3462 * *skops*\ **->op**.
3463 *
3464 * The first byte of the *searchby_res* specifies the
3465 * kind that it wants to search.
3466 *
3467 * If the searching kind is an experimental kind
3468 * (i.e. 253 or 254 according to RFC6994). It also
3469 * needs to specify the "magic" which is either
3470 * 2 bytes or 4 bytes. It then also needs to
3471 * specify the size of the magic by using
3472 * the 2nd byte which is "kind-length" of a TCP
3473 * header option and the "kind-length" also
3474 * includes the first 2 bytes "kind" and "kind-length"
3475 * itself as a normal TCP header option also does.
3476 *
3477 * For example, to search experimental kind 254 with
3478 * 2 byte magic 0xeB9F, the searchby_res should be
3479 * [ 254, 4, 0xeB, 0x9F, 0, 0, .... 0 ].
3480 *
3481 * To search for the standard window scale option (3),
3482 * the *searchby_res* should be [ 3, 0, 0, .... 0 ].
3483 * Note, kind-length must be 0 for regular option.
3484 *
3485 * Searching for No-Op (0) and End-of-Option-List (1) are
3486 * not supported.
3487 *
3488 * *len* must be at least 2 bytes which is the minimal size
3489 * of a header option.
3490 *
3491 * Supported flags:
3492 *
3493 * * **BPF_LOAD_HDR_OPT_TCP_SYN** to search from the
3494 * saved_syn packet or the just-received syn packet.
3495 *
3496 * Return
3497 * > 0 when found, the header option is copied to *searchby_res*.
3498 * The return value is the total length copied. On failure, a
3499 * negative error code is returned:
3500 *
3501 * **-EINVAL** if a parameter is invalid.
3502 *
3503 * **-ENOMSG** if the option is not found.
3504 *
3505 * **-ENOENT** if no syn packet is available when
3506 * **BPF_LOAD_HDR_OPT_TCP_SYN** is used.
3507 *
3508 * **-ENOSPC** if there is not enough space. Only *len* number of
3509 * bytes are copied.
3510 *
3511 * **-EFAULT** on failure to parse the header options in the
3512 * packet.
3513 *
3514 * **-EPERM** if the helper cannot be used under the current
3515 * *skops*\ **->op**.
3516 *
3517 * long bpf_store_hdr_opt(struct bpf_sock_ops *skops, const void *from, u32 len, u64 flags)
3518 * Description
3519 * Store header option. The data will be copied
3520 * from buffer *from* with length *len* to the TCP header.
3521 *
3522 * The buffer *from* should have the whole option that
3523 * includes the kind, kind-length, and the actual
3524 * option data. The *len* must be at least kind-length
3525 * long. The kind-length does not have to be 4 byte
3526 * aligned. The kernel will take care of the padding
3527 * and setting the 4 bytes aligned value to th->doff.
3528 *
3529 * This helper will check for duplicated option
3530 * by searching the same option in the outgoing skb.
3531 *
3532 * This helper can only be called during
3533 * **BPF_SOCK_OPS_WRITE_HDR_OPT_CB**.
3534 *
3535 * Return
3536 * 0 on success, or negative error in case of failure:
3537 *
3538 * **-EINVAL** If param is invalid.
3539 *
3540 * **-ENOSPC** if there is not enough space in the header.
3541 * Nothing has been written
3542 *
3543 * **-EEXIST** if the option already exists.
3544 *
3545 * **-EFAULT** on failrue to parse the existing header options.
3546 *
3547 * **-EPERM** if the helper cannot be used under the current
3548 * *skops*\ **->op**.
3549 *
3550 * long bpf_reserve_hdr_opt(struct bpf_sock_ops *skops, u32 len, u64 flags)
3551 * Description
3552 * Reserve *len* bytes for the bpf header option. The
3553 * space will be used by **bpf_store_hdr_opt**\ () later in
3554 * **BPF_SOCK_OPS_WRITE_HDR_OPT_CB**.
3555 *
3556 * If **bpf_reserve_hdr_opt**\ () is called multiple times,
3557 * the total number of bytes will be reserved.
3558 *
3559 * This helper can only be called during
3560 * **BPF_SOCK_OPS_HDR_OPT_LEN_CB**.
3561 *
3562 * Return
3563 * 0 on success, or negative error in case of failure:
3564 *
3565 * **-EINVAL** if a parameter is invalid.
3566 *
3567 * **-ENOSPC** if there is not enough space in the header.
3568 *
3569 * **-EPERM** if the helper cannot be used under the current
3570 * *skops*\ **->op**.
3571 *
3572 * void *bpf_inode_storage_get(struct bpf_map *map, void *inode, void *value, u64 flags)
3573 * Description
3574 * Get a bpf_local_storage from an *inode*.
3575 *
3576 * Logically, it could be thought of as getting the value from
3577 * a *map* with *inode* as the **key**. From this
3578 * perspective, the usage is not much different from
3579 * **bpf_map_lookup_elem**\ (*map*, **&**\ *inode*) except this
3580 * helper enforces the key must be an inode and the map must also
3581 * be a **BPF_MAP_TYPE_INODE_STORAGE**.
3582 *
3583 * Underneath, the value is stored locally at *inode* instead of
3584 * the *map*. The *map* is used as the bpf-local-storage
3585 * "type". The bpf-local-storage "type" (i.e. the *map*) is
3586 * searched against all bpf_local_storage residing at *inode*.
3587 *
3588 * An optional *flags* (**BPF_LOCAL_STORAGE_GET_F_CREATE**) can be
3589 * used such that a new bpf_local_storage will be
3590 * created if one does not exist. *value* can be used
3591 * together with **BPF_LOCAL_STORAGE_GET_F_CREATE** to specify
3592 * the initial value of a bpf_local_storage. If *value* is
3593 * **NULL**, the new bpf_local_storage will be zero initialized.
3594 * Return
3595 * A bpf_local_storage pointer is returned on success.
3596 *
3597 * **NULL** if not found or there was an error in adding
3598 * a new bpf_local_storage.
3599 *
3600 * int bpf_inode_storage_delete(struct bpf_map *map, void *inode)
3601 * Description
3602 * Delete a bpf_local_storage from an *inode*.
3603 * Return
3604 * 0 on success.
3605 *
3606 * **-ENOENT** if the bpf_local_storage cannot be found.
3607 *
3608 * long bpf_d_path(struct path *path, char *buf, u32 sz)
3609 * Description
3610 * Return full path for given **struct path** object, which
3611 * needs to be the kernel BTF *path* object. The path is
3612 * returned in the provided buffer *buf* of size *sz* and
3613 * is zero terminated.
3614 *
3615 * Return
3616 * On success, the strictly positive length of the string,
3617 * including the trailing NUL character. On error, a negative
3618 * value.
3619 *
3620 * long bpf_copy_from_user(void *dst, u32 size, const void *user_ptr)
3621 * Description
3622 * Read *size* bytes from user space address *user_ptr* and store
3623 * the data in *dst*. This is a wrapper of **copy_from_user**\ ().
3624 * Return
3625 * 0 on success, or a negative error in case of failure.
3626 *
3627 * long bpf_snprintf_btf(char *str, u32 str_size, struct btf_ptr *ptr, u32 btf_ptr_size, u64 flags)
3628 * Description
3629 * Use BTF to store a string representation of *ptr*->ptr in *str*,
3630 * using *ptr*->type_id. This value should specify the type
3631 * that *ptr*->ptr points to. LLVM __builtin_btf_type_id(type, 1)
3632 * can be used to look up vmlinux BTF type ids. Traversing the
3633 * data structure using BTF, the type information and values are
3634 * stored in the first *str_size* - 1 bytes of *str*. Safe copy of
3635 * the pointer data is carried out to avoid kernel crashes during
3636 * operation. Smaller types can use string space on the stack;
3637 * larger programs can use map data to store the string
3638 * representation.
3639 *
3640 * The string can be subsequently shared with userspace via
3641 * bpf_perf_event_output() or ring buffer interfaces.
3642 * bpf_trace_printk() is to be avoided as it places too small
3643 * a limit on string size to be useful.
3644 *
3645 * *flags* is a combination of
3646 *
3647 * **BTF_F_COMPACT**
3648 * no formatting around type information
3649 * **BTF_F_NONAME**
3650 * no struct/union member names/types
3651 * **BTF_F_PTR_RAW**
3652 * show raw (unobfuscated) pointer values;
3653 * equivalent to printk specifier %px.
3654 * **BTF_F_ZERO**
3655 * show zero-valued struct/union members; they
3656 * are not displayed by default
3657 *
3658 * Return
3659 * The number of bytes that were written (or would have been
3660 * written if output had to be truncated due to string size),
3661 * or a negative error in cases of failure.
3662 *
3663 * long bpf_seq_printf_btf(struct seq_file *m, struct btf_ptr *ptr, u32 ptr_size, u64 flags)
3664 * Description
3665 * Use BTF to write to seq_write a string representation of
3666 * *ptr*->ptr, using *ptr*->type_id as per bpf_snprintf_btf().
3667 * *flags* are identical to those used for bpf_snprintf_btf.
3668 * Return
3669 * 0 on success or a negative error in case of failure.
3670 *
3671 * u64 bpf_skb_cgroup_classid(struct sk_buff *skb)
3672 * Description
3673 * See **bpf_get_cgroup_classid**\ () for the main description.
3674 * This helper differs from **bpf_get_cgroup_classid**\ () in that
3675 * the cgroup v1 net_cls class is retrieved only from the *skb*'s
3676 * associated socket instead of the current process.
3677 * Return
3678 * The id is returned or 0 in case the id could not be retrieved.
3679 *
3680 * long bpf_redirect_neigh(u32 ifindex, struct bpf_redir_neigh *params, int plen, u64 flags)
3681 * Description
3682 * Redirect the packet to another net device of index *ifindex*
3683 * and fill in L2 addresses from neighboring subsystem. This helper
3684 * is somewhat similar to **bpf_redirect**\ (), except that it
3685 * populates L2 addresses as well, meaning, internally, the helper
3686 * relies on the neighbor lookup for the L2 address of the nexthop.
3687 *
3688 * The helper will perform a FIB lookup based on the skb's
3689 * networking header to get the address of the next hop, unless
3690 * this is supplied by the caller in the *params* argument. The
3691 * *plen* argument indicates the len of *params* and should be set
3692 * to 0 if *params* is NULL.
3693 *
3694 * The *flags* argument is reserved and must be 0. The helper is
3695 * currently only supported for tc BPF program types, and enabled
3696 * for IPv4 and IPv6 protocols.
3697 * Return
3698 * The helper returns **TC_ACT_REDIRECT** on success or
3699 * **TC_ACT_SHOT** on error.
3700 *
3701 * void *bpf_per_cpu_ptr(const void *percpu_ptr, u32 cpu)
3702 * Description
3703 * Take a pointer to a percpu ksym, *percpu_ptr*, and return a
3704 * pointer to the percpu kernel variable on *cpu*. A ksym is an
3705 * extern variable decorated with '__ksym'. For ksym, there is a
3706 * global var (either static or global) defined of the same name
3707 * in the kernel. The ksym is percpu if the global var is percpu.
3708 * The returned pointer points to the global percpu var on *cpu*.
3709 *
3710 * bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the
3711 * kernel, except that bpf_per_cpu_ptr() may return NULL. This
3712 * happens if *cpu* is larger than nr_cpu_ids. The caller of
3713 * bpf_per_cpu_ptr() must check the returned value.
3714 * Return
3715 * A pointer pointing to the kernel percpu variable on *cpu*, or
3716 * NULL, if *cpu* is invalid.
3717 *
3718 * void *bpf_this_cpu_ptr(const void *percpu_ptr)
3719 * Description
3720 * Take a pointer to a percpu ksym, *percpu_ptr*, and return a
3721 * pointer to the percpu kernel variable on this cpu. See the
3722 * description of 'ksym' in **bpf_per_cpu_ptr**\ ().
3723 *
3724 * bpf_this_cpu_ptr() has the same semantic as this_cpu_ptr() in
3725 * the kernel. Different from **bpf_per_cpu_ptr**\ (), it would
3726 * never return NULL.
3727 * Return
3728 * A pointer pointing to the kernel percpu variable on this cpu.
3729 *
3730 * long bpf_redirect_peer(u32 ifindex, u64 flags)
3731 * Description
3732 * Redirect the packet to another net device of index *ifindex*.
3733 * This helper is somewhat similar to **bpf_redirect**\ (), except
3734 * that the redirection happens to the *ifindex*' peer device and
3735 * the netns switch takes place from ingress to ingress without
3736 * going through the CPU's backlog queue.
3737 *
3738 * The *flags* argument is reserved and must be 0. The helper is
3739 * currently only supported for tc BPF program types at the ingress
3740 * hook and for veth device types. The peer device must reside in a
3741 * different network namespace.
3742 * Return
3743 * The helper returns **TC_ACT_REDIRECT** on success or
3744 * **TC_ACT_SHOT** on error.
3398 */3745 */
3399#define __BPF_FUNC_MAPPER(FN) \3746#define __BPF_FUNC_MAPPER(FN) \
3400 FN(unspec), \3747 FN(unspec), \
@@ -3539,6 +3886,20 @@ union bpf_attr { · 138 unmodified lines
3539 FN(skc_to_tcp_request_sock), \3886 FN(skc_to_tcp_request_sock), \
3540 FN(skc_to_udp6_sock), \3887 FN(skc_to_udp6_sock), \
3541 FN(get_task_stack), \3888 FN(get_task_stack), \
3889 FN(load_hdr_opt), \
3890 FN(store_hdr_opt), \
3891 FN(reserve_hdr_opt), \
3892 FN(inode_storage_get), \
3893 FN(inode_storage_delete), \
3894 FN(d_path), \
3895 FN(copy_from_user), \
3896 FN(snprintf_btf), \
3897 FN(seq_printf_btf), \
3898 FN(skb_cgroup_classid), \
3899 FN(redirect_neigh), \
3900 FN(bpf_per_cpu_ptr), \
3901 FN(bpf_this_cpu_ptr), \
3902 FN(redirect_peer), \
3542 /* */3903 /* */
3543 3904
3544/* integer value in 'imm' field of BPF_CALL instruction selects which helper3905/* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -3648,9 +4009,13 @@ enum { · 103 unmodified lines
3648 BPF_F_SYSCTL_BASE_NAME = (1ULL << 0),4009 BPF_F_SYSCTL_BASE_NAME = (1ULL << 0),
3649};4010};
3650 4011
3651/* BPF_FUNC_sk_storage_get flags */4012/* BPF_FUNC_<kernel_obj>_storage_get flags */
3652enum {4013enum {
3653 BPF_SK_STORAGE_GET_F_CREATE = (1ULL << 0),4014 BPF_LOCAL_STORAGE_GET_F_CREATE = (1ULL << 0),
4015 /* BPF_SK_STORAGE_GET_F_CREATE is only kept for backward compatibility
4016 * and BPF_LOCAL_STORAGE_GET_F_CREATE must be used instead.
4017 */
4018 BPF_SK_STORAGE_GET_F_CREATE = BPF_LOCAL_STORAGE_GET_F_CREATE,
3654};4019};
3655 4020
3656/* BPF_FUNC_read_branch_records flags. */4021/* BPF_FUNC_read_branch_records flags. */
@@ -4071,6 +4436,15 @@ struct bpf_link_info { · 414 unmodified lines
4071 __u64 cgroup_id;4436 __u64 cgroup_id;
4072 __u32 attach_type;4437 __u32 attach_type;
4073 } cgroup;4438 } cgroup;
4439 struct {
4440 __aligned_u64 target_name; /* in/out: target_name buffer ptr */
4441 __u32 target_name_len; /* in/out: target_name buffer len */
4442 union {
4443 struct {
4444 __u32 map_id;
4445 } map;
4446 };
4447 } iter;
4074 struct {4448 struct {
4075 __u32 netns_ino;4449 __u32 netns_ino;
4076 __u32 attach_type;4450 __u32 attach_type;
@@ -4158,6 +4532,36 @@ struct bpf_sock_ops { · 81 unmodified lines
4158 __u64 bytes_received;4532 __u64 bytes_received;
4159 __u64 bytes_acked;4533 __u64 bytes_acked;
4160 __bpf_md_ptr(struct bpf_sock *, sk);4534 __bpf_md_ptr(struct bpf_sock *, sk);
4535 /* [skb_data, skb_data_end) covers the whole TCP header.
4536 *
4537 * BPF_SOCK_OPS_PARSE_HDR_OPT_CB: The packet received
4538 * BPF_SOCK_OPS_HDR_OPT_LEN_CB: Not useful because the
4539 * header has not been written.
4540 * BPF_SOCK_OPS_WRITE_HDR_OPT_CB: The header and options have
4541 * been written so far.
4542 * BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: The SYNACK that concludes
4543 * the 3WHS.
4544 * BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: The ACK that concludes
4545 * the 3WHS.
4546 *
4547 * bpf_load_hdr_opt() can also be used to read a particular option.
4548 */
4549 __bpf_md_ptr(void *, skb_data);
4550 __bpf_md_ptr(void *, skb_data_end);
4551 __u32 skb_len; /* The total length of a packet.
4552 * It includes the header, options,
4553 * and payload.
4554 */
4555 __u32 skb_tcp_flags; /* tcp_flags of the header. It provides
4556 * an easy way to check for tcp_flags
4557 * without parsing skb_data.
4558 *
4559 * In particular, the skb_tcp_flags
4560 * will still be available in
4561 * BPF_SOCK_OPS_HDR_OPT_LEN even though
4562 * the outgoing header has not
4563 * been written yet.
4564 */
4161};4565};
4162 4566
4163/* Definitions for bpf_sock_ops_cb_flags */4567/* Definitions for bpf_sock_ops_cb_flags */
@@ -4166,8 +4570,51 @@ enum { · 2 unmodified lines
4166 BPF_SOCK_OPS_RETRANS_CB_FLAG = (1<<1),4570 BPF_SOCK_OPS_RETRANS_CB_FLAG = (1<<1),
4167 BPF_SOCK_OPS_STATE_CB_FLAG = (1<<2),4571 BPF_SOCK_OPS_STATE_CB_FLAG = (1<<2),
4168 BPF_SOCK_OPS_RTT_CB_FLAG = (1<<3),4572 BPF_SOCK_OPS_RTT_CB_FLAG = (1<<3),
4573 /* Call bpf for all received TCP headers. The bpf prog will be
4574 * called under sock_ops->op == BPF_SOCK_OPS_PARSE_HDR_OPT_CB
4575 *
4576 * Please refer to the comment in BPF_SOCK_OPS_PARSE_HDR_OPT_CB
4577 * for the header option related helpers that will be useful
4578 * to the bpf programs.
4579 *
4580 * It could be used at the client/active side (i.e. connect() side)
4581 * when the server told it that the server was in syncookie
4582 * mode and required the active side to resend the bpf-written
4583 * options. The active side can keep writing the bpf-options until
4584 * it received a valid packet from the server side to confirm
4585 * the earlier packet (and options) has been received. The later
4586 * example patch is using it like this at the active side when the
4587 * server is in syncookie mode.
4588 *
4589 * The bpf prog will usually turn this off in the common cases.
4590 */
4591 BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = (1<<4),
4592 /* Call bpf when kernel has received a header option that
4593 * the kernel cannot handle. The bpf prog will be called under
4594 * sock_ops->op == BPF_SOCK_OPS_PARSE_HDR_OPT_CB.
4595 *
4596 * Please refer to the comment in BPF_SOCK_OPS_PARSE_HDR_OPT_CB
4597 * for the header option related helpers that will be useful
4598 * to the bpf programs.
4599 */
4600 BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = (1<<5),
4601 /* Call bpf when the kernel is writing header options for the
4602 * outgoing packet. The bpf prog will first be called
4603 * to reserve space in a skb under
4604 * sock_ops->op == BPF_SOCK_OPS_HDR_OPT_LEN_CB. Then
4605 * the bpf prog will be called to write the header option(s)
4606 * under sock_ops->op == BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
4607 *
4608 * Please refer to the comment in BPF_SOCK_OPS_HDR_OPT_LEN_CB
4609 * and BPF_SOCK_OPS_WRITE_HDR_OPT_CB for the header option
4610 * related helpers that will be useful to the bpf programs.
4611 *
4612 * The kernel gets its chance to reserve space and write
4613 * options first before the BPF program does.
4614 */
4615 BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = (1<<6),
4169/* Mask of all currently supported cb flags */4616/* Mask of all currently supported cb flags */
4170 BPF_SOCK_OPS_ALL_CB_FLAGS = 0xF,4617 BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7F,
4171};4618};
4172 4619
4173/* List of known BPF sock_ops operators.4620/* List of known BPF sock_ops operators.
@@ -4223,6 +4670,63 @@ enum { · 49 unmodified lines
4223 */4670 */
4224 BPF_SOCK_OPS_RTT_CB, /* Called on every RTT.4671 BPF_SOCK_OPS_RTT_CB, /* Called on every RTT.
4225 */4672 */
4673 BPF_SOCK_OPS_PARSE_HDR_OPT_CB, /* Parse the header option.
4674 * It will be called to handle
4675 * the packets received at
4676 * an already established
4677 * connection.
4678 *
4679 * sock_ops->skb_data:
4680 * Referring to the received skb.
4681 * It covers the TCP header only.
4682 *
4683 * bpf_load_hdr_opt() can also
4684 * be used to search for a
4685 * particular option.
4686 */
4687 BPF_SOCK_OPS_HDR_OPT_LEN_CB, /* Reserve space for writing the
4688 * header option later in
4689 * BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
4690 * Arg1: bool want_cookie. (in
4691 * writing SYNACK only)
4692 *
4693 * sock_ops->skb_data:
4694 * Not available because no header has
4695 * been written yet.
4696 *
4697 * sock_ops->skb_tcp_flags:
4698 * The tcp_flags of the
4699 * outgoing skb. (e.g. SYN, ACK, FIN).
4700 *
4701 * bpf_reserve_hdr_opt() should
4702 * be used to reserve space.
4703 */
4704 BPF_SOCK_OPS_WRITE_HDR_OPT_CB, /* Write the header options
4705 * Arg1: bool want_cookie. (in
4706 * writing SYNACK only)
4707 *
4708 * sock_ops->skb_data:
4709 * Referring to the outgoing skb.
4710 * It covers the TCP header
4711 * that has already been written
4712 * by the kernel and the
4713 * earlier bpf-progs.
4714 *
4715 * sock_ops->skb_tcp_flags:
4716 * The tcp_flags of the outgoing
4717 * skb. (e.g. SYN, ACK, FIN).
4718 *
4719 * bpf_store_hdr_opt() should
4720 * be used to write the
4721 * option.
4722 *
4723 * bpf_load_hdr_opt() can also
4724 * be used to search for a
4725 * particular option that
4726 * has already been written
4727 * by the kernel or the
4728 * earlier bpf-progs.
4729 */
4226};4730};
4227 4731
4228/* List of TCP states. There is a build check in net/ipv4/tcp.c to detect4732/* List of TCP states. There is a build check in net/ipv4/tcp.c to detect
@@ -4250,6 +4754,63 @@ enum { · 21 unmodified lines
4250enum {4754enum {
4251 TCP_BPF_IW = 1001, /* Set TCP initial congestion window */4755 TCP_BPF_IW = 1001, /* Set TCP initial congestion window */
4252 TCP_BPF_SNDCWND_CLAMP = 1002, /* Set sndcwnd_clamp */4756 TCP_BPF_SNDCWND_CLAMP = 1002, /* Set sndcwnd_clamp */
4757 TCP_BPF_DELACK_MAX = 1003, /* Max delay ack in usecs */
4758 TCP_BPF_RTO_MIN = 1004, /* Min delay ack in usecs */
4759 /* Copy the SYN pkt to optval
4760 *
4761 * BPF_PROG_TYPE_SOCK_OPS only. It is similar to the
4762 * bpf_getsockopt(TCP_SAVED_SYN) but it does not limit
4763 * to only getting from the saved_syn. It can either get the
4764 * syn packet from:
4765 *
4766 * 1. the just-received SYN packet (only available when writing the
4767 * SYNACK). It will be useful when it is not necessary to
4768 * save the SYN packet for latter use. It is also the only way
4769 * to get the SYN during syncookie mode because the syn
4770 * packet cannot be saved during syncookie.
4771 *
4772 * OR
4773 *
4774 * 2. the earlier saved syn which was done by
4775 * bpf_setsockopt(TCP_SAVE_SYN).
4776 *
4777 * The bpf_getsockopt(TCP_BPF_SYN*) option will hide where the
4778 * SYN packet is obtained.
4779 *
4780 * If the bpf-prog does not need the IP[46] header, the
4781 * bpf-prog can avoid parsing the IP header by using
4782 * TCP_BPF_SYN. Otherwise, the bpf-prog can get both
4783 * IP[46] and TCP header by using TCP_BPF_SYN_IP.
4784 *
4785 * >0: Total number of bytes copied
4786 * -ENOSPC: Not enough space in optval. Only optlen number of
4787 * bytes is copied.
4788 * -ENOENT: The SYN skb is not available now and the earlier SYN pkt
4789 * is not saved by setsockopt(TCP_SAVE_SYN).
4790 */
4791 TCP_BPF_SYN = 1005, /* Copy the TCP header */
4792 TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */
4793 TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */
4794};
4795
4796enum {
4797 BPF_LOAD_HDR_OPT_TCP_SYN = (1ULL << 0),
4798};
4799
4800/* args[0] value during BPF_SOCK_OPS_HDR_OPT_LEN_CB and
4801 * BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
4802 */
4803enum {
4804 BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, /* Kernel is finding the
4805 * total option spaces
4806 * required for an established
4807 * sk in order to calculate the
4808 * MSS. No skb is actually
4809 * sent.
4810 */
4811 BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, /* Kernel is in syncookie mode
4812 * when sending a SYN.
4813 */
4253};4814};
4254 4815
4255struct bpf_perf_event_value {4816struct bpf_perf_event_value {
@@ -4349,6 +4910,16 @@ struct bpf_fib_lookup { · 93 unmodified lines
4349 __u8 dmac[6]; /* ETH_ALEN */4910 __u8 dmac[6]; /* ETH_ALEN */
4350};4911};
4351 4912
4913struct bpf_redir_neigh {
4914 /* network family for lookup (AF_INET, AF_INET6) */
4915 __u32 nh_family;
4916 /* network address of nexthop; skips fib lookup to find gateway */
4917 union {
4918 __be32 ipv4_nh;
4919 __u32 ipv6_nh[4]; /* in6_addr; network order */
4920 };
4921};
4922
4352enum bpf_task_fd_type {4923enum bpf_task_fd_type {
4353 BPF_FD_TYPE_RAW_TRACEPOINT, /* tp name */4924 BPF_FD_TYPE_RAW_TRACEPOINT, /* tp name */
4354 BPF_FD_TYPE_TRACEPOINT, /* tp name */4925 BPF_FD_TYPE_TRACEPOINT, /* tp name */
@@ -4447,4 +5018,34 @@ struct bpf_sk_lookup { · 92 unmodified lines
4447 __u32 local_port; /* Host byte order */5018 __u32 local_port; /* Host byte order */
4448};5019};
4449 5020
5021/*
5022 * struct btf_ptr is used for typed pointer representation; the
5023 * type id is used to render the pointer data as the appropriate type
5024 * via the bpf_snprintf_btf() helper described above. A flags field -
5025 * potentially to specify additional details about the BTF pointer
5026 * (rather than its mode of display) - is included for future use.
5027 * Display flags - BTF_F_* - are passed to bpf_snprintf_btf separately.
5028 */
5029struct btf_ptr {
5030 void *ptr;
5031 __u32 type_id;
5032 __u32 flags; /* BTF ptr flags; unused at present. */
5033};
5034
5035/*
5036 * Flags to control bpf_snprintf_btf() behaviour.
5037 * - BTF_F_COMPACT: no formatting around type information
5038 * - BTF_F_NONAME: no struct/union member names/types
5039 * - BTF_F_PTR_RAW: show raw (unobfuscated) pointer values;
5040 * equivalent to %px.
5041 * - BTF_F_ZERO: show zero-valued struct/union members; they
5042 * are not displayed by default
5043 */
5044enum {
5045 BTF_F_COMPACT = (1ULL << 0),
5046 BTF_F_NONAME = (1ULL << 1),
5047 BTF_F_PTR_RAW = (1ULL << 2),
5048 BTF_F_ZERO = (1ULL << 3),
5049};
5050
4450#endif /* _UAPI__LINUX_BPF_H__ */5051#endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/btrfs_tree.h+14−0
@@ -4,6 +4,11 @@ · 3 unmodified lines
4 4
5#include <linux/btrfs.h>5#include <linux/btrfs.h>
6#include <linux/types.h>6#include <linux/types.h>
7#ifdef __KERNEL__
8#include <linux/stddef.h>
9#else
10#include <stddef.h>
11#endif
7 12
8/*13/*
9 * This header contains the structure definitions and constants used14 * This header contains the structure definitions and constants used
@@ -644,6 +649,15 @@ struct btrfs_root_item { · 634 unmodified lines
644 __le64 reserved[8]; /* for future */649 __le64 reserved[8]; /* for future */
645} __attribute__ ((__packed__));650} __attribute__ ((__packed__));
646 651
652/*
653 * Btrfs root item used to be smaller than current size. The old format ends
654 * at where member generation_v2 is.
655 */
656static inline __u32 btrfs_legacy_root_item_size(void)
657{
658 return offsetof(struct btrfs_root_item, generation_v2);
659}
660
647/*661/*
648 * this is used for both forward and backward root refs662 * this is used for both forward and backward root refs
649 */663 */
include/uapi/linux/can/isotp.h+165−0
@@ -0,0 +1,165 @@
1/* SPDX-License-Identifier: ((GPL-2.0-only WITH Linux-syscall-note) OR BSD-3-Clause) */
2/*
3 * linux/can/isotp.h
4 *
5 * Definitions for isotp CAN sockets (ISO 15765-2:2016)
6 *
7 * Copyright (c) 2020 Volkswagen Group Electronic Research
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of Volkswagen nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * Alternatively, provided that this notice is retained in full, this
23 * software may be distributed under the terms of the GNU General
24 * Public License ("GPL") version 2, in which case the provisions of the
25 * GPL apply INSTEAD OF those given above.
26 *
27 * The provided data structures and external interfaces from this code
28 * are not restricted to be used by modules with a GPL compatible license.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
41 * DAMAGE.
42 */
43
44#ifndef _UAPI_CAN_ISOTP_H
45#define _UAPI_CAN_ISOTP_H
46
47#include <linux/types.h>
48#include <linux/can.h>
49
50#define SOL_CAN_ISOTP (SOL_CAN_BASE + CAN_ISOTP)
51
52/* for socket options affecting the socket (not the global system) */
53
54#define CAN_ISOTP_OPTS 1 /* pass struct can_isotp_options */
55
56#define CAN_ISOTP_RECV_FC 2 /* pass struct can_isotp_fc_options */
57
58/* sockopts to force stmin timer values for protocol regression tests */
59
60#define CAN_ISOTP_TX_STMIN 3 /* pass __u32 value in nano secs */
61 /* use this time instead of value */
62 /* provided in FC from the receiver */
63
64#define CAN_ISOTP_RX_STMIN 4 /* pass __u32 value in nano secs */
65 /* ignore received CF frames which */
66 /* timestamps differ less than val */
67
68#define CAN_ISOTP_LL_OPTS 5 /* pass struct can_isotp_ll_options */
69
70struct can_isotp_options {
71
72 __u32 flags; /* set flags for isotp behaviour. */
73 /* __u32 value : flags see below */
74
75 __u32 frame_txtime; /* frame transmission time (N_As/N_Ar) */
76 /* __u32 value : time in nano secs */
77
78 __u8 ext_address; /* set address for extended addressing */
79 /* __u8 value : extended address */
80
81 __u8 txpad_content; /* set content of padding byte (tx) */
82 /* __u8 value : content on tx path */
83
84 __u8 rxpad_content; /* set content of padding byte (rx) */
85 /* __u8 value : content on rx path */
86
87 __u8 rx_ext_address; /* set address for extended addressing */
88 /* __u8 value : extended address (rx) */
89};
90
91struct can_isotp_fc_options {
92
93 __u8 bs; /* blocksize provided in FC frame */
94 /* __u8 value : blocksize. 0 = off */
95
96 __u8 stmin; /* separation time provided in FC frame */
97 /* __u8 value : */
98 /* 0x00 - 0x7F : 0 - 127 ms */
99 /* 0x80 - 0xF0 : reserved */
100 /* 0xF1 - 0xF9 : 100 us - 900 us */
101 /* 0xFA - 0xFF : reserved */
102
103 __u8 wftmax; /* max. number of wait frame transmiss. */
104 /* __u8 value : 0 = omit FC N_PDU WT */
105};
106
107struct can_isotp_ll_options {
108
109 __u8 mtu; /* generated & accepted CAN frame type */
110 /* __u8 value : */
111 /* CAN_MTU (16) -> standard CAN 2.0 */
112 /* CANFD_MTU (72) -> CAN FD frame */
113
114 __u8 tx_dl; /* tx link layer data length in bytes */
115 /* (configured maximum payload length) */
116 /* __u8 value : 8,12,16,20,24,32,48,64 */
117 /* => rx path supports all LL_DL values */
118
119 __u8 tx_flags; /* set into struct canfd_frame.flags */
120 /* at frame creation: e.g. CANFD_BRS */
121 /* Obsolete when the BRS flag is fixed */
122 /* by the CAN netdriver configuration */
123};
124
125/* flags for isotp behaviour */
126
127#define CAN_ISOTP_LISTEN_MODE 0x001 /* listen only (do not send FC) */
128#define CAN_ISOTP_EXTEND_ADDR 0x002 /* enable extended addressing */
129#define CAN_ISOTP_TX_PADDING 0x004 /* enable CAN frame padding tx path */
130#define CAN_ISOTP_RX_PADDING 0x008 /* enable CAN frame padding rx path */
131#define CAN_ISOTP_CHK_PAD_LEN 0x010 /* check received CAN frame padding */
132#define CAN_ISOTP_CHK_PAD_DATA 0x020 /* check received CAN frame padding */
133#define CAN_ISOTP_HALF_DUPLEX 0x040 /* half duplex error state handling */
134#define CAN_ISOTP_FORCE_TXSTMIN 0x080 /* ignore stmin from received FC */
135#define CAN_ISOTP_FORCE_RXSTMIN 0x100 /* ignore CFs depending on rx stmin */
136#define CAN_ISOTP_RX_EXT_ADDR 0x200 /* different rx extended addressing */
137#define CAN_ISOTP_WAIT_TX_DONE 0x400 /* wait for tx completion */
138
139
140/* default values */
141
142#define CAN_ISOTP_DEFAULT_FLAGS 0
143#define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00
144#define CAN_ISOTP_DEFAULT_PAD_CONTENT 0xCC /* prevent bit-stuffing */
145#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 0
146#define CAN_ISOTP_DEFAULT_RECV_BS 0
147#define CAN_ISOTP_DEFAULT_RECV_STMIN 0x00
148#define CAN_ISOTP_DEFAULT_RECV_WFTMAX 0
149
150#define CAN_ISOTP_DEFAULT_LL_MTU CAN_MTU
151#define CAN_ISOTP_DEFAULT_LL_TX_DL CAN_MAX_DLEN
152#define CAN_ISOTP_DEFAULT_LL_TX_FLAGS 0
153
154/*
155 * Remark on CAN_ISOTP_DEFAULT_RECV_* values:
156 *
157 * We can strongly assume, that the Linux Kernel implementation of
158 * CAN_ISOTP is capable to run with BS=0, STmin=0 and WFTmax=0.
159 * But as we like to be able to behave as a commonly available ECU,
160 * these default settings can be changed via sockopts.
161 * For that reason the STmin value is intentionally _not_ checked for
162 * consistency and copied directly into the flow control (FC) frame.
163 */
164
165#endif /* !_UAPI_CAN_ISOTP_H */
include/uapi/linux/can/raw.h+3−0
@@ -49,6 +49,9 @@ · 48 unmodified lines
49#include <linux/can.h>49#include <linux/can.h>
50 50
51#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)51#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
52enum {
53 SCM_CAN_RAW_ERRQUEUE = 1,
54};
52 55
53/* for socket options affecting the socket (not the global system) */56/* for socket options affecting the socket (not the global system) */
54 57
include/uapi/linux/capability.h+2−0
@@ -288,6 +288,8 @@ struct vfs_ns_cap_data { · 287 unmodified lines
288 processes and setting the scheduling algorithm used by another288 processes and setting the scheduling algorithm used by another
289 process. */289 process. */
290/* Allow setting cpu affinity on other processes */290/* Allow setting cpu affinity on other processes */
291/* Allow setting realtime ioprio class */
292/* Allow setting ioprio class on other processes */
291 293
292#define CAP_SYS_NICE 23294#define CAP_SYS_NICE 23
293 295
include/uapi/linux/cdrom.h+4−1
@@ -289,7 +289,10 @@ struct cdrom_generic_command · 288 unmodified lines
289 unsigned char data_direction;289 unsigned char data_direction;
290 int quiet;290 int quiet;
291 int timeout;291 int timeout;
292 void __user *reserved[1]; /* unused, actually */292 union {
293 void __user *reserved[1]; /* unused, actually */
294 void __user *unused;
295 };
293};296};
294 297
295/*298/*
include/uapi/linux/coresight-stm.h+1−0
@@ -5,6 +5,7 @@ · 4 unmodified lines
5#include <linux/const.h>5#include <linux/const.h>
6 6
7#define STM_FLAG_TIMESTAMPED _BITUL(3)7#define STM_FLAG_TIMESTAMPED _BITUL(3)
8#define STM_FLAG_MARKED _BITUL(4)
8#define STM_FLAG_GUARANTEED _BITUL(7)9#define STM_FLAG_GUARANTEED _BITUL(7)
9 10
10/*11/*
include/uapi/linux/devlink.h+69−0
@@ -13,6 +13,8 @@ · 12 unmodified lines
13#ifndef _UAPI_LINUX_DEVLINK_H_13#ifndef _UAPI_LINUX_DEVLINK_H_
14#define _UAPI_LINUX_DEVLINK_H_14#define _UAPI_LINUX_DEVLINK_H_
15 15
16#include <linux/const.h>
17
16#define DEVLINK_GENL_NAME "devlink"18#define DEVLINK_GENL_NAME "devlink"
17#define DEVLINK_GENL_VERSION 0x119#define DEVLINK_GENL_VERSION 0x1
18#define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"20#define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"
@@ -122,6 +124,8 @@ enum devlink_command { · 103 unmodified lines
122 DEVLINK_CMD_TRAP_POLICER_NEW,124 DEVLINK_CMD_TRAP_POLICER_NEW,
123 DEVLINK_CMD_TRAP_POLICER_DEL,125 DEVLINK_CMD_TRAP_POLICER_DEL,
124 126
127 DEVLINK_CMD_HEALTH_REPORTER_TEST,
128
125 /* add new commands above here */129 /* add new commands above here */
126 __DEVLINK_CMD_MAX,130 __DEVLINK_CMD_MAX,
127 DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1131 DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
@@ -193,6 +197,9 @@ enum devlink_port_flavour { · 65 unmodified lines
193 * port that faces the PCI VF.197 * port that faces the PCI VF.
194 */198 */
195 DEVLINK_PORT_FLAVOUR_VIRTUAL, /* Any virtual port facing the user. */199 DEVLINK_PORT_FLAVOUR_VIRTUAL, /* Any virtual port facing the user. */
200 DEVLINK_PORT_FLAVOUR_UNUSED, /* Port which exists in the switch, but
201 * is not used in any way.
202 */
196};203};
197 204
198enum devlink_param_cmode {205enum devlink_param_cmode {
@@ -228,6 +235,28 @@ enum { · 29 unmodified lines
228 DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1235 DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1
229};236};
230 237
238/* Specify what sections of a flash component can be overwritten when
239 * performing an update. Overwriting of firmware binary sections is always
240 * implicitly assumed to be allowed.
241 *
242 * Each section must be documented in
243 * Documentation/networking/devlink/devlink-flash.rst
244 *
245 */
246enum {
247 DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT,
248 DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT,
249
250 __DEVLINK_FLASH_OVERWRITE_MAX_BIT,
251 DEVLINK_FLASH_OVERWRITE_MAX_BIT = __DEVLINK_FLASH_OVERWRITE_MAX_BIT - 1
252};
253
254#define DEVLINK_FLASH_OVERWRITE_SETTINGS _BITUL(DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT)
255#define DEVLINK_FLASH_OVERWRITE_IDENTIFIERS _BITUL(DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT)
256
257#define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS \
258 (_BITUL(__DEVLINK_FLASH_OVERWRITE_MAX_BIT) - 1)
259
231/**260/**
232 * enum devlink_trap_action - Packet trap action.261 * enum devlink_trap_action - Packet trap action.
233 * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not262 * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not
@@ -272,6 +301,29 @@ enum { · 38 unmodified lines
272 DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE,301 DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE,
273};302};
274 303
304enum devlink_reload_action {
305 DEVLINK_RELOAD_ACTION_UNSPEC,
306 DEVLINK_RELOAD_ACTION_DRIVER_REINIT, /* Driver entities re-instantiation */
307 DEVLINK_RELOAD_ACTION_FW_ACTIVATE, /* FW activate */
308
309 /* Add new reload actions above */
310 __DEVLINK_RELOAD_ACTION_MAX,
311 DEVLINK_RELOAD_ACTION_MAX = __DEVLINK_RELOAD_ACTION_MAX - 1
312};
313
314enum devlink_reload_limit {
315 DEVLINK_RELOAD_LIMIT_UNSPEC, /* unspecified, no constraints */
316 DEVLINK_RELOAD_LIMIT_NO_RESET, /* No reset allowed, no down time allowed,
317 * no link flap and no configuration is lost.
318 */
319
320 /* Add new reload limit above */
321 __DEVLINK_RELOAD_LIMIT_MAX,
322 DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1
323};
324
325#define DEVLINK_RELOAD_LIMITS_VALID_MASK (BIT(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
326
275enum devlink_attr {327enum devlink_attr {
276 /* don't change the order or add anything between, this is ABI! */328 /* don't change the order or add anything between, this is ABI! */
277 DEVLINK_ATTR_UNSPEC,329 DEVLINK_ATTR_UNSPEC,
@@ -458,6 +510,23 @@ enum devlink_attr { · 180 unmodified lines
458 DEVLINK_ATTR_PORT_LANES, /* u32 */510 DEVLINK_ATTR_PORT_LANES, /* u32 */
459 DEVLINK_ATTR_PORT_SPLITTABLE, /* u8 */511 DEVLINK_ATTR_PORT_SPLITTABLE, /* u8 */
460 512
513 DEVLINK_ATTR_PORT_EXTERNAL, /* u8 */
514 DEVLINK_ATTR_PORT_CONTROLLER_NUMBER, /* u32 */
515
516 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT, /* u64 */
517 DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK, /* bitfield32 */
518
519 DEVLINK_ATTR_RELOAD_ACTION, /* u8 */
520 DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED, /* bitfield32 */
521 DEVLINK_ATTR_RELOAD_LIMITS, /* bitfield32 */
522
523 DEVLINK_ATTR_DEV_STATS, /* nested */
524 DEVLINK_ATTR_RELOAD_STATS, /* nested */
525 DEVLINK_ATTR_RELOAD_STATS_ENTRY, /* nested */
526 DEVLINK_ATTR_RELOAD_STATS_LIMIT, /* u8 */
527 DEVLINK_ATTR_RELOAD_STATS_VALUE, /* u32 */
528 DEVLINK_ATTR_REMOTE_RELOAD_STATS, /* nested */
529
461 /* add new attributes above here, update the policy in devlink.c */530 /* add new attributes above here, update the policy in devlink.c */
462 531
463 __DEVLINK_ATTR_MAX,532 __DEVLINK_ATTR_MAX,
include/uapi/linux/dm-ioctl.h+2−2
@@ -272,9 +272,9 @@ enum { · 271 unmodified lines
272#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)272#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
273 273
274#define DM_VERSION_MAJOR 4274#define DM_VERSION_MAJOR 4
275#define DM_VERSION_MINOR 42275#define DM_VERSION_MINOR 43
276#define DM_VERSION_PATCHLEVEL 0276#define DM_VERSION_PATCHLEVEL 0
277#define DM_VERSION_EXTRA "-ioctl (2020-02-27)"277#define DM_VERSION_EXTRA "-ioctl (2020-10-01)"
278 278
279/* Status bits */279/* Status bits */
280#define DM_READONLY_FLAG (1 << 0) /* In/Out */280#define DM_READONLY_FLAG (1 << 0) /* In/Out */
include/uapi/linux/dqblk_xfs.h+13−3
@@ -61,12 +61,16 @@ typedef struct fs_disk_quota { · 60 unmodified lines
61 __u64 d_ino_softlimit;/* preferred inode limit */61 __u64 d_ino_softlimit;/* preferred inode limit */
62 __u64 d_bcount; /* # disk blocks owned by the user */62 __u64 d_bcount; /* # disk blocks owned by the user */
63 __u64 d_icount; /* # inodes owned by the user */63 __u64 d_icount; /* # inodes owned by the user */
64 __s32 d_itimer; /* zero if within inode limits */64 __s32 d_itimer; /* Zero if within inode limits. If
65 /* if not, we refuse service */65 * not, we refuse service at this time
66 * (in seconds since Unix epoch) */
66 __s32 d_btimer; /* similar to above; for disk blocks */67 __s32 d_btimer; /* similar to above; for disk blocks */
67 __u16 d_iwarns; /* # warnings issued wrt num inodes */68 __u16 d_iwarns; /* # warnings issued wrt num inodes */
68 __u16 d_bwarns; /* # warnings issued wrt disk blocks */69 __u16 d_bwarns; /* # warnings issued wrt disk blocks */
69 __s32 d_padding2; /* padding2 - for future use */70 __s8 d_itimer_hi; /* upper 8 bits of timer values */
71 __s8 d_btimer_hi;
72 __s8 d_rtbtimer_hi;
73 __s8 d_padding2; /* padding2 - for future use */
70 __u64 d_rtb_hardlimit;/* absolute limit on realtime blks */74 __u64 d_rtb_hardlimit;/* absolute limit on realtime blks */
71 __u64 d_rtb_softlimit;/* preferred limit on RT disk blks */75 __u64 d_rtb_softlimit;/* preferred limit on RT disk blks */
72 __u64 d_rtbcount; /* # realtime blocks owned */76 __u64 d_rtbcount; /* # realtime blocks owned */
@@ -121,6 +125,12 @@ typedef struct fs_disk_quota { · 48 unmodified lines
121#define FS_DQ_RTBCOUNT (1<<14)125#define FS_DQ_RTBCOUNT (1<<14)
122#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)126#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
123 127
128/*
129 * Quota expiration timestamps are 40-bit signed integers, with the upper 8
130 * bits encoded in the _hi fields.
131 */
132#define FS_DQ_BIGTIME (1<<15)
133
124/*134/*
125 * Various flags related to quotactl(2).135 * Various flags related to quotactl(2).
126 */136 */
include/uapi/linux/elf.h+1−0
@@ -425,6 +425,7 @@ typedef struct elf64_shdr { · 424 unmodified lines
425#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication code masks */425#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication code masks */
426#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */426#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */
427#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */427#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */
428#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* arm64 tagged address control (prctl()) */
428#define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */429#define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */
429#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */430#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */
430#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */431#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */
include/uapi/linux/ethtool.h+2−0
@@ -1617,6 +1617,8 @@ enum ethtool_link_mode_bit_indices { · 1616 unmodified lines
1617 ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87,1617 ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87,
1618 ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 88,1618 ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 88,
1619 ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 89,1619 ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 89,
1620 ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 90,
1621 ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 91,
1620 /* must be last entry */1622 /* must be last entry */
1621 __ETHTOOL_LINK_MODE_MASK_NBITS1623 __ETHTOOL_LINK_MODE_MASK_NBITS
1622};1624};
include/uapi/linux/ethtool_netlink.h+18−1
@@ -79,6 +79,7 @@ enum { · 78 unmodified lines
79 ETHTOOL_MSG_TSINFO_GET_REPLY,79 ETHTOOL_MSG_TSINFO_GET_REPLY,
80 ETHTOOL_MSG_CABLE_TEST_NTF,80 ETHTOOL_MSG_CABLE_TEST_NTF,
81 ETHTOOL_MSG_CABLE_TEST_TDR_NTF,81 ETHTOOL_MSG_CABLE_TEST_TDR_NTF,
82 ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY,
82 83
83 /* add new constants above here */84 /* add new constants above here */
84 __ETHTOOL_MSG_KERNEL_CNT,85 __ETHTOOL_MSG_KERNEL_CNT,
@@ -91,9 +92,12 @@ enum { · 6 unmodified lines
91#define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0)92#define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0)
92/* provide optional reply for SET or ACT requests */93/* provide optional reply for SET or ACT requests */
93#define ETHTOOL_FLAG_OMIT_REPLY (1 << 1)94#define ETHTOOL_FLAG_OMIT_REPLY (1 << 1)
95/* request statistics, if supported by the driver */
96#define ETHTOOL_FLAG_STATS (1 << 2)
94 97
95#define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \98#define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \
96 ETHTOOL_FLAG_OMIT_REPLY)99 ETHTOOL_FLAG_OMIT_REPLY | \
100 ETHTOOL_FLAG_STATS)
97 101
98enum {102enum {
99 ETHTOOL_A_HEADER_UNSPEC,103 ETHTOOL_A_HEADER_UNSPEC,
@@ -376,12 +380,25 @@ enum { · 276 unmodified lines
376 ETHTOOL_A_PAUSE_AUTONEG, /* u8 */380 ETHTOOL_A_PAUSE_AUTONEG, /* u8 */
377 ETHTOOL_A_PAUSE_RX, /* u8 */381 ETHTOOL_A_PAUSE_RX, /* u8 */
378 ETHTOOL_A_PAUSE_TX, /* u8 */382 ETHTOOL_A_PAUSE_TX, /* u8 */
383 ETHTOOL_A_PAUSE_STATS, /* nest - _PAUSE_STAT_* */
379 384
380 /* add new constants above here */385 /* add new constants above here */
381 __ETHTOOL_A_PAUSE_CNT,386 __ETHTOOL_A_PAUSE_CNT,
382 ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)387 ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)
383};388};
384 389
390enum {
391 ETHTOOL_A_PAUSE_STAT_UNSPEC,
392 ETHTOOL_A_PAUSE_STAT_PAD,
393
394 ETHTOOL_A_PAUSE_STAT_TX_FRAMES,
395 ETHTOOL_A_PAUSE_STAT_RX_FRAMES,
396
397 /* add new constants above here */
398 __ETHTOOL_A_PAUSE_STAT_CNT,
399 ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1)
400};
401
385/* EEE */402/* EEE */
386 403
387enum {404enum {
include/uapi/linux/fscrypt.h+3−3
@@ -45,7 +45,6 @@ struct fscrypt_policy_v1 { · 44 unmodified lines
45 __u8 flags;45 __u8 flags;
46 __u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];46 __u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];
47};47};
48#define fscrypt_policy fscrypt_policy_v1
49 48
50/*49/*
51 * Process-subscribed "logon" key description prefix and payload format.50 * Process-subscribed "logon" key description prefix and payload format.
@@ -156,9 +155,9 @@ struct fscrypt_get_key_status_arg { · 104 unmodified lines
156 __u32 __out_reserved[13];155 __u32 __out_reserved[13];
157};156};
158 157
159#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy)158#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy_v1)
160#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16])159#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16])
161#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy)160#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy_v1)
162#define FS_IOC_GET_ENCRYPTION_POLICY_EX _IOWR('f', 22, __u8[9]) /* size + version */161#define FS_IOC_GET_ENCRYPTION_POLICY_EX _IOWR('f', 22, __u8[9]) /* size + version */
163#define FS_IOC_ADD_ENCRYPTION_KEY _IOWR('f', 23, struct fscrypt_add_key_arg)162#define FS_IOC_ADD_ENCRYPTION_KEY _IOWR('f', 23, struct fscrypt_add_key_arg)
164#define FS_IOC_REMOVE_ENCRYPTION_KEY _IOWR('f', 24, struct fscrypt_remove_key_arg)163#define FS_IOC_REMOVE_ENCRYPTION_KEY _IOWR('f', 24, struct fscrypt_remove_key_arg)
@@ -170,6 +169,7 @@ struct fscrypt_get_key_status_arg { · 5 unmodified lines
170 169
171/* old names; don't add anything new here! */170/* old names; don't add anything new here! */
172#ifndef __KERNEL__171#ifndef __KERNEL__
172#define fscrypt_policy fscrypt_policy_v1
173#define FS_KEY_DESCRIPTOR_SIZE FSCRYPT_KEY_DESCRIPTOR_SIZE173#define FS_KEY_DESCRIPTOR_SIZE FSCRYPT_KEY_DESCRIPTOR_SIZE
174#define FS_POLICY_FLAGS_PAD_4 FSCRYPT_POLICY_FLAGS_PAD_4174#define FS_POLICY_FLAGS_PAD_4 FSCRYPT_POLICY_FLAGS_PAD_4
175#define FS_POLICY_FLAGS_PAD_8 FSCRYPT_POLICY_FLAGS_PAD_8175#define FS_POLICY_FLAGS_PAD_8 FSCRYPT_POLICY_FLAGS_PAD_8
include/uapi/linux/fuse.h+47−3
@@ -172,6 +172,9 @@ · 171 unmodified lines
172 * - add FUSE_WRITE_KILL_PRIV flag172 * - add FUSE_WRITE_KILL_PRIV flag
173 * - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING173 * - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING
174 * - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag174 * - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag
175 *
176 * 7.32
177 * - add flags to fuse_attr, add FUSE_ATTR_SUBMOUNT, add FUSE_SUBMOUNTS
175 */178 */
176 179
177#ifndef _LINUX_FUSE_H180#ifndef _LINUX_FUSE_H
@@ -207,7 +210,7 @@ · 29 unmodified lines
207#define FUSE_KERNEL_VERSION 7210#define FUSE_KERNEL_VERSION 7
208 211
209/** Minor version number of this interface */212/** Minor version number of this interface */
210#define FUSE_KERNEL_MINOR_VERSION 31213#define FUSE_KERNEL_MINOR_VERSION 32
211 214
212/** The node ID of the root inode */215/** The node ID of the root inode */
213#define FUSE_ROOT_ID 1216#define FUSE_ROOT_ID 1
@@ -231,7 +234,7 @@ struct fuse_attr { · 17 unmodified lines
231 uint32_t gid;234 uint32_t gid;
232 uint32_t rdev;235 uint32_t rdev;
233 uint32_t blksize;236 uint32_t blksize;
234 uint32_t padding;237 uint32_t flags;
235};238};
236 239
237struct fuse_kstatfs {240struct fuse_kstatfs {
@@ -313,7 +316,10 @@ struct fuse_file_lock { · 75 unmodified lines
313 * FUSE_CACHE_SYMLINKS: cache READLINK responses316 * FUSE_CACHE_SYMLINKS: cache READLINK responses
314 * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir317 * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
315 * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request318 * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
316 * FUSE_MAP_ALIGNMENT: map_alignment field is valid319 * FUSE_MAP_ALIGNMENT: init_out.map_alignment contains log2(byte alignment) for
320 * foffset and moffset fields in struct
321 * fuse_setupmapping_out and fuse_removemapping_one.
322 * FUSE_SUBMOUNTS: kernel supports auto-mounting directory submounts
317 */323 */
318#define FUSE_ASYNC_READ (1 << 0)324#define FUSE_ASYNC_READ (1 << 0)
319#define FUSE_POSIX_LOCKS (1 << 1)325#define FUSE_POSIX_LOCKS (1 << 1)
@@ -342,6 +348,7 @@ struct fuse_file_lock { · 22 unmodified lines
342#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)348#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
343#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)349#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
344#define FUSE_MAP_ALIGNMENT (1 << 26)350#define FUSE_MAP_ALIGNMENT (1 << 26)
351#define FUSE_SUBMOUNTS (1 << 27)
345 352
346/**353/**
347 * CUSE INIT request/reply flags354 * CUSE INIT request/reply flags
@@ -417,6 +424,13 @@ struct fuse_file_lock { · 69 unmodified lines
417 */424 */
418#define FUSE_FSYNC_FDATASYNC (1 << 0)425#define FUSE_FSYNC_FDATASYNC (1 << 0)
419 426
427/**
428 * fuse_attr flags
429 *
430 * FUSE_ATTR_SUBMOUNT: Object is a submount root
431 */
432#define FUSE_ATTR_SUBMOUNT (1 << 0)
433
420enum fuse_opcode {434enum fuse_opcode {
421 FUSE_LOOKUP = 1,435 FUSE_LOOKUP = 1,
422 FUSE_FORGET = 2, /* no reply */436 FUSE_FORGET = 2, /* no reply */
@@ -892,4 +906,34 @@ struct fuse_copy_file_range_in { · 469 unmodified lines
892 uint64_t flags;906 uint64_t flags;
893};907};
894 908
909#define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0)
910#define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1)
911struct fuse_setupmapping_in {
912 /* An already open handle */
913 uint64_t fh;
914 /* Offset into the file to start the mapping */
915 uint64_t foffset;
916 /* Length of mapping required */
917 uint64_t len;
918 /* Flags, FUSE_SETUPMAPPING_FLAG_* */
919 uint64_t flags;
920 /* Offset in Memory Window */
921 uint64_t moffset;
922};
923
924struct fuse_removemapping_in {
925 /* number of fuse_removemapping_one follows */
926 uint32_t count;
927};
928
929struct fuse_removemapping_one {
930 /* Offset into the dax window start the unmapping */
931 uint64_t moffset;
932 /* Length of mapping required */
933 uint64_t len;
934};
935
936#define FUSE_REMOVEMAPPING_MAX_ENTRY \
937 (PAGE_SIZE / sizeof(struct fuse_removemapping_one))
938
895#endif /* _LINUX_FUSE_H */939#endif /* _LINUX_FUSE_H */
include/uapi/linux/genetlink.h+11−0
@@ -64,6 +64,8 @@ enum { · 63 unmodified lines
64 CTRL_ATTR_OPS,64 CTRL_ATTR_OPS,
65 CTRL_ATTR_MCAST_GROUPS,65 CTRL_ATTR_MCAST_GROUPS,
66 CTRL_ATTR_POLICY,66 CTRL_ATTR_POLICY,
67 CTRL_ATTR_OP_POLICY,
68 CTRL_ATTR_OP,
67 __CTRL_ATTR_MAX,69 __CTRL_ATTR_MAX,
68};70};
69 71
@@ -85,6 +87,15 @@ enum { · 15 unmodified lines
85 __CTRL_ATTR_MCAST_GRP_MAX,87 __CTRL_ATTR_MCAST_GRP_MAX,
86};88};
87 89
90enum {
91 CTRL_ATTR_POLICY_UNSPEC,
92 CTRL_ATTR_POLICY_DO,
93 CTRL_ATTR_POLICY_DUMP,
94
95 __CTRL_ATTR_POLICY_DUMP_MAX,
96 CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
97};
98
88#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)99#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
89 100
90 101
include/uapi/linux/gpio.h+337−27
@@ -11,22 +11,293 @@ · 10 unmodified lines
11#ifndef _UAPI_GPIO_H_11#ifndef _UAPI_GPIO_H_
12#define _UAPI_GPIO_H_12#define _UAPI_GPIO_H_
13 13
14#include <linux/const.h>
14#include <linux/ioctl.h>15#include <linux/ioctl.h>
15#include <linux/types.h>16#include <linux/types.h>
16 17
18/*
19 * The maximum size of name and label arrays.
20 *
21 * Must be a multiple of 8 to ensure 32/64-bit alignment of structs.
22 */
23#define GPIO_MAX_NAME_SIZE 32
24
17/**25/**
18 * struct gpiochip_info - Information about a certain GPIO chip26 * struct gpiochip_info - Information about a certain GPIO chip
19 * @name: the Linux kernel name of this GPIO chip27 * @name: the Linux kernel name of this GPIO chip
20 * @label: a functional name for this GPIO chip, such as a product28 * @label: a functional name for this GPIO chip, such as a product
21 * number, may be empty29 * number, may be empty (i.e. label[0] == '\0')
22 * @lines: number of GPIO lines on this chip30 * @lines: number of GPIO lines on this chip
23 */31 */
24struct gpiochip_info {32struct gpiochip_info {
25 char name[32];33 char name[GPIO_MAX_NAME_SIZE];
26 char label[32];34 char label[GPIO_MAX_NAME_SIZE];
27 __u32 lines;35 __u32 lines;
28};36};
29 37
38/*
39 * Maximum number of requested lines.
40 *
41 * Must be no greater than 64, as bitmaps are restricted here to 64-bits
42 * for simplicity, and a multiple of 2 to ensure 32/64-bit alignment of
43 * structs.
44 */
45#define GPIO_V2_LINES_MAX 64
46
47/*
48 * The maximum number of configuration attributes associated with a line
49 * request.
50 */
51#define GPIO_V2_LINE_NUM_ATTRS_MAX 10
52
53/**
54 * enum gpio_v2_line_flag - &struct gpio_v2_line_attribute.flags values
55 * @GPIO_V2_LINE_FLAG_USED: line is not available for request
56 * @GPIO_V2_LINE_FLAG_ACTIVE_LOW: line active state is physical low
57 * @GPIO_V2_LINE_FLAG_INPUT: line is an input
58 * @GPIO_V2_LINE_FLAG_OUTPUT: line is an output
59 * @GPIO_V2_LINE_FLAG_EDGE_RISING: line detects rising (inactive to active)
60 * edges
61 * @GPIO_V2_LINE_FLAG_EDGE_FALLING: line detects falling (active to
62 * inactive) edges
63 * @GPIO_V2_LINE_FLAG_OPEN_DRAIN: line is an open drain output
64 * @GPIO_V2_LINE_FLAG_OPEN_SOURCE: line is an open source output
65 * @GPIO_V2_LINE_FLAG_BIAS_PULL_UP: line has pull-up bias enabled
66 * @GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN: line has pull-down bias enabled
67 * @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled
68 */
69enum gpio_v2_line_flag {
70 GPIO_V2_LINE_FLAG_USED = _BITULL(0),
71 GPIO_V2_LINE_FLAG_ACTIVE_LOW = _BITULL(1),
72 GPIO_V2_LINE_FLAG_INPUT = _BITULL(2),
73 GPIO_V2_LINE_FLAG_OUTPUT = _BITULL(3),
74 GPIO_V2_LINE_FLAG_EDGE_RISING = _BITULL(4),
75 GPIO_V2_LINE_FLAG_EDGE_FALLING = _BITULL(5),
76 GPIO_V2_LINE_FLAG_OPEN_DRAIN = _BITULL(6),
77 GPIO_V2_LINE_FLAG_OPEN_SOURCE = _BITULL(7),
78 GPIO_V2_LINE_FLAG_BIAS_PULL_UP = _BITULL(8),
79 GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN = _BITULL(9),
80 GPIO_V2_LINE_FLAG_BIAS_DISABLED = _BITULL(10),
81};
82
83/**
84 * struct gpio_v2_line_values - Values of GPIO lines
85 * @bits: a bitmap containing the value of the lines, set to 1 for active
86 * and 0 for inactive.
87 * @mask: a bitmap identifying the lines to get or set, with each bit
88 * number corresponding to the index into &struct
89 * gpio_v2_line_request.offsets.
90 */
91struct gpio_v2_line_values {
92 __aligned_u64 bits;
93 __aligned_u64 mask;
94};
95
96/**
97 * enum gpio_v2_line_attr_id - &struct gpio_v2_line_attribute.id values
98 * identifying which field of the attribute union is in use.
99 * @GPIO_V2_LINE_ATTR_ID_FLAGS: flags field is in use
100 * @GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES: values field is in use
101 * @GPIO_V2_LINE_ATTR_ID_DEBOUNCE: debounce_period_us field is in use
102 */
103enum gpio_v2_line_attr_id {
104 GPIO_V2_LINE_ATTR_ID_FLAGS = 1,
105 GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES = 2,
106 GPIO_V2_LINE_ATTR_ID_DEBOUNCE = 3,
107};
108
109/**
110 * struct gpio_v2_line_attribute - a configurable attribute of a line
111 * @id: attribute identifier with value from &enum gpio_v2_line_attr_id
112 * @padding: reserved for future use and must be zero filled
113 * @flags: if id is %GPIO_V2_LINE_ATTR_ID_FLAGS, the flags for the GPIO
114 * line, with values from &enum gpio_v2_line_flag, such as
115 * %GPIO_V2_LINE_FLAG_ACTIVE_LOW, %GPIO_V2_LINE_FLAG_OUTPUT etc, added
116 * together. This overrides the default flags contained in the &struct
117 * gpio_v2_line_config for the associated line.
118 * @values: if id is %GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap
119 * containing the values to which the lines will be set, with each bit
120 * number corresponding to the index into &struct
121 * gpio_v2_line_request.offsets.
122 * @debounce_period_us: if id is %GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the
123 * desired debounce period, in microseconds
124 */
125struct gpio_v2_line_attribute {
126 __u32 id;
127 __u32 padding;
128 union {
129 __aligned_u64 flags;
130 __aligned_u64 values;
131 __u32 debounce_period_us;
132 };
133};
134
135/**
136 * struct gpio_v2_line_config_attribute - a configuration attribute
137 * associated with one or more of the requested lines.
138 * @attr: the configurable attribute
139 * @mask: a bitmap identifying the lines to which the attribute applies,
140 * with each bit number corresponding to the index into &struct
141 * gpio_v2_line_request.offsets.
142 */
143struct gpio_v2_line_config_attribute {
144 struct gpio_v2_line_attribute attr;
145 __aligned_u64 mask;
146};
147
148/**
149 * struct gpio_v2_line_config - Configuration for GPIO lines
150 * @flags: flags for the GPIO lines, with values from &enum
151 * gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW,
152 * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together. This is the default for
153 * all requested lines but may be overridden for particular lines using
154 * @attrs.
155 * @num_attrs: the number of attributes in @attrs
156 * @padding: reserved for future use and must be zero filled
157 * @attrs: the configuration attributes associated with the requested
158 * lines. Any attribute should only be associated with a particular line
159 * once. If an attribute is associated with a line multiple times then the
160 * first occurrence (i.e. lowest index) has precedence.
161 */
162struct gpio_v2_line_config {
163 __aligned_u64 flags;
164 __u32 num_attrs;
165 /* Pad to fill implicit padding and reserve space for future use. */
166 __u32 padding[5];
167 struct gpio_v2_line_config_attribute attrs[GPIO_V2_LINE_NUM_ATTRS_MAX];
168};
169
170/**
171 * struct gpio_v2_line_request - Information about a request for GPIO lines
172 * @offsets: an array of desired lines, specified by offset index for the
173 * associated GPIO chip
174 * @consumer: a desired consumer label for the selected GPIO lines such as
175 * "my-bitbanged-relay"
176 * @config: requested configuration for the lines.
177 * @num_lines: number of lines requested in this request, i.e. the number
178 * of valid fields in the %GPIO_V2_LINES_MAX sized arrays, set to 1 to
179 * request a single line
180 * @event_buffer_size: a suggested minimum number of line events that the
181 * kernel should buffer. This is only relevant if edge detection is
182 * enabled in the configuration. Note that this is only a suggested value
183 * and the kernel may allocate a larger buffer or cap the size of the
184 * buffer. If this field is zero then the buffer size defaults to a minimum
185 * of @num_lines * 16.
186 * @padding: reserved for future use and must be zero filled
187 * @fd: if successful this field will contain a valid anonymous file handle
188 * after a %GPIO_GET_LINE_IOCTL operation, zero or negative value means
189 * error
190 */
191struct gpio_v2_line_request {
192 __u32 offsets[GPIO_V2_LINES_MAX];
193 char consumer[GPIO_MAX_NAME_SIZE];
194 struct gpio_v2_line_config config;
195 __u32 num_lines;
196 __u32 event_buffer_size;
197 /* Pad to fill implicit padding and reserve space for future use. */
198 __u32 padding[5];
199 __s32 fd;
200};
201
202/**
203 * struct gpio_v2_line_info - Information about a certain GPIO line
204 * @name: the name of this GPIO line, such as the output pin of the line on
205 * the chip, a rail or a pin header name on a board, as specified by the
206 * GPIO chip, may be empty (i.e. name[0] == '\0')
207 * @consumer: a functional name for the consumer of this GPIO line as set
208 * by whatever is using it, will be empty if there is no current user but
209 * may also be empty if the consumer doesn't set this up
210 * @offset: the local offset on this GPIO chip, fill this in when
211 * requesting the line information from the kernel
212 * @num_attrs: the number of attributes in @attrs
213 * @flags: flags for the GPIO lines, with values from &enum
214 * gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW,
215 * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together.
216 * @attrs: the configuration attributes associated with the line
217 * @padding: reserved for future use
218 */
219struct gpio_v2_line_info {
220 char name[GPIO_MAX_NAME_SIZE];
221 char consumer[GPIO_MAX_NAME_SIZE];
222 __u32 offset;
223 __u32 num_attrs;
224 __aligned_u64 flags;
225 struct gpio_v2_line_attribute attrs[GPIO_V2_LINE_NUM_ATTRS_MAX];
226 /* Space reserved for future use. */
227 __u32 padding[4];
228};
229
230/**
231 * enum gpio_v2_line_changed_type - &struct gpio_v2_line_changed.event_type
232 * values
233 * @GPIO_V2_LINE_CHANGED_REQUESTED: line has been requested
234 * @GPIO_V2_LINE_CHANGED_RELEASED: line has been released
235 * @GPIO_V2_LINE_CHANGED_CONFIG: line has been reconfigured
236 */
237enum gpio_v2_line_changed_type {
238 GPIO_V2_LINE_CHANGED_REQUESTED = 1,
239 GPIO_V2_LINE_CHANGED_RELEASED = 2,
240 GPIO_V2_LINE_CHANGED_CONFIG = 3,
241};
242
243/**
244 * struct gpio_v2_line_info_changed - Information about a change in status
245 * of a GPIO line
246 * @info: updated line information
247 * @timestamp_ns: estimate of time of status change occurrence, in nanoseconds
248 * @event_type: the type of change with a value from &enum
249 * gpio_v2_line_changed_type
250 * @padding: reserved for future use
251 */
252struct gpio_v2_line_info_changed {
253 struct gpio_v2_line_info info;
254 __aligned_u64 timestamp_ns;
255 __u32 event_type;
256 /* Pad struct to 64-bit boundary and reserve space for future use. */
257 __u32 padding[5];
258};
259
260/**
261 * enum gpio_v2_line_event_id - &struct gpio_v2_line_event.id values
262 * @GPIO_V2_LINE_EVENT_RISING_EDGE: event triggered by a rising edge
263 * @GPIO_V2_LINE_EVENT_FALLING_EDGE: event triggered by a falling edge
264 */
265enum gpio_v2_line_event_id {
266 GPIO_V2_LINE_EVENT_RISING_EDGE = 1,
267 GPIO_V2_LINE_EVENT_FALLING_EDGE = 2,
268};
269
270/**
271 * struct gpio_v2_line_event - The actual event being pushed to userspace
272 * @timestamp_ns: best estimate of time of event occurrence, in nanoseconds.
273 * The @timestamp_ns is read from %CLOCK_MONOTONIC and is intended to allow
274 * the accurate measurement of the time between events. It does not provide
275 * the wall-clock time.
276 * @id: event identifier with value from &enum gpio_v2_line_event_id
277 * @offset: the offset of the line that triggered the event
278 * @seqno: the sequence number for this event in the sequence of events for
279 * all the lines in this line request
280 * @line_seqno: the sequence number for this event in the sequence of
281 * events on this particular line
282 * @padding: reserved for future use
283 */
284struct gpio_v2_line_event {
285 __aligned_u64 timestamp_ns;
286 __u32 id;
287 __u32 offset;
288 __u32 seqno;
289 __u32 line_seqno;
290 /* Space reserved for future use. */
291 __u32 padding[6];
292};
293
294/*
295 * ABI v1
296 *
297 * This version of the ABI is deprecated.
298 * Use the latest version of the ABI, defined above, instead.
299 */
300
30/* Informational flags */301/* Informational flags */
31#define GPIOLINE_FLAG_KERNEL (1UL << 0) /* Line used by the kernel */302#define GPIOLINE_FLAG_KERNEL (1UL << 0) /* Line used by the kernel */
32#define GPIOLINE_FLAG_IS_OUT (1UL << 1)303#define GPIOLINE_FLAG_IS_OUT (1UL << 1)
@@ -44,16 +315,19 @@ struct gpiochip_info { · 11 unmodified lines
44 * @flags: various flags for this line315 * @flags: various flags for this line
45 * @name: the name of this GPIO line, such as the output pin of the line on the316 * @name: the name of this GPIO line, such as the output pin of the line on the
46 * chip, a rail or a pin header name on a board, as specified by the gpio317 * chip, a rail or a pin header name on a board, as specified by the gpio
47 * chip, may be empty318 * chip, may be empty (i.e. name[0] == '\0')
48 * @consumer: a functional name for the consumer of this GPIO line as set by319 * @consumer: a functional name for the consumer of this GPIO line as set by
49 * whatever is using it, will be empty if there is no current user but may320 * whatever is using it, will be empty if there is no current user but may
50 * also be empty if the consumer doesn't set this up321 * also be empty if the consumer doesn't set this up
322 *
323 * Note: This struct is part of ABI v1 and is deprecated.
324 * Use &struct gpio_v2_line_info instead.
51 */325 */
52struct gpioline_info {326struct gpioline_info {
53 __u32 line_offset;327 __u32 line_offset;
54 __u32 flags;328 __u32 flags;
55 char name[32];329 char name[GPIO_MAX_NAME_SIZE];
56 char consumer[32];330 char consumer[GPIO_MAX_NAME_SIZE];
57};331};
58 332
59/* Maximum number of requested handles */333/* Maximum number of requested handles */
@@ -71,14 +345,18 @@ enum { · 11 unmodified lines
71 * of a GPIO line345 * of a GPIO line
72 * @info: updated line information346 * @info: updated line information
73 * @timestamp: estimate of time of status change occurrence, in nanoseconds347 * @timestamp: estimate of time of status change occurrence, in nanoseconds
74 * @event_type: one of GPIOLINE_CHANGED_REQUESTED, GPIOLINE_CHANGED_RELEASED348 * @event_type: one of %GPIOLINE_CHANGED_REQUESTED,
75 * and GPIOLINE_CHANGED_CONFIG349 * %GPIOLINE_CHANGED_RELEASED and %GPIOLINE_CHANGED_CONFIG
350 * @padding: reserved for future use
76 *351 *
77 * Note: struct gpioline_info embedded here has 32-bit alignment on its own,352 * The &struct gpioline_info embedded here has 32-bit alignment on its own,
78 * but it works fine with 64-bit alignment too. With its 72 byte size, we can353 * but it works fine with 64-bit alignment too. With its 72 byte size, we can
79 * guarantee there are no implicit holes between it and subsequent members.354 * guarantee there are no implicit holes between it and subsequent members.
80 * The 20-byte padding at the end makes sure we don't add any implicit padding355 * The 20-byte padding at the end makes sure we don't add any implicit padding
81 * at the end of the structure on 64-bit architectures.356 * at the end of the structure on 64-bit architectures.
357 *
358 * Note: This struct is part of ABI v1 and is deprecated.
359 * Use &struct gpio_v2_line_info_changed instead.
82 */360 */
83struct gpioline_info_changed {361struct gpioline_info_changed {
84 struct gpioline_info info;362 struct gpioline_info info;
@@ -102,13 +380,13 @@ struct gpioline_info_changed { · 17 unmodified lines
102 * @lineoffsets: an array of desired lines, specified by offset index for the380 * @lineoffsets: an array of desired lines, specified by offset index for the
103 * associated GPIO device381 * associated GPIO device
104 * @flags: desired flags for the desired GPIO lines, such as382 * @flags: desired flags for the desired GPIO lines, such as
105 * GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed383 * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
106 * together. Note that even if multiple lines are requested, the same flags384 * together. Note that even if multiple lines are requested, the same flags
107 * must be applicable to all of them, if you want lines with individual385 * must be applicable to all of them, if you want lines with individual
108 * flags set, request them one by one. It is possible to select386 * flags set, request them one by one. It is possible to select
109 * a batch of input or output lines, but they must all have the same387 * a batch of input or output lines, but they must all have the same
110 * characteristics, i.e. all inputs or all outputs, all active low etc388 * characteristics, i.e. all inputs or all outputs, all active low etc
111 * @default_values: if the GPIOHANDLE_REQUEST_OUTPUT is set for a requested389 * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested
112 * line, this specifies the default output value, should be 0 (low) or390 * line, this specifies the default output value, should be 0 (low) or
113 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)391 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
114 * @consumer_label: a desired consumer label for the selected GPIO line(s)392 * @consumer_label: a desired consumer label for the selected GPIO line(s)
@@ -116,14 +394,17 @@ struct gpioline_info_changed { · 1 unmodified line
116 * @lines: number of lines requested in this request, i.e. the number of394 * @lines: number of lines requested in this request, i.e. the number of
117 * valid fields in the above arrays, set to 1 to request a single line395 * valid fields in the above arrays, set to 1 to request a single line
118 * @fd: if successful this field will contain a valid anonymous file handle396 * @fd: if successful this field will contain a valid anonymous file handle
119 * after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value397 * after a %GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
120 * means error398 * means error
399 *
400 * Note: This struct is part of ABI v1 and is deprecated.
401 * Use &struct gpio_v2_line_request instead.
121 */402 */
122struct gpiohandle_request {403struct gpiohandle_request {
123 __u32 lineoffsets[GPIOHANDLES_MAX];404 __u32 lineoffsets[GPIOHANDLES_MAX];
124 __u32 flags;405 __u32 flags;
125 __u8 default_values[GPIOHANDLES_MAX];406 __u8 default_values[GPIOHANDLES_MAX];
126 char consumer_label[32];407 char consumer_label[GPIO_MAX_NAME_SIZE];
127 __u32 lines;408 __u32 lines;
128 int fd;409 int fd;
129};410};
@@ -131,12 +412,15 @@ struct gpiohandle_request { · 1 unmodified line
131/**412/**
132 * struct gpiohandle_config - Configuration for a GPIO handle request413 * struct gpiohandle_config - Configuration for a GPIO handle request
133 * @flags: updated flags for the requested GPIO lines, such as414 * @flags: updated flags for the requested GPIO lines, such as
134 * GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed415 * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
135 * together416 * together
136 * @default_values: if the GPIOHANDLE_REQUEST_OUTPUT is set in flags,417 * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags,
137 * this specifies the default output value, should be 0 (low) or418 * this specifies the default output value, should be 0 (low) or
138 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)419 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
139 * @padding: reserved for future use and should be zero filled420 * @padding: reserved for future use and should be zero filled
421 *
422 * Note: This struct is part of ABI v1 and is deprecated.
423 * Use &struct gpio_v2_line_config instead.
140 */424 */
141struct gpiohandle_config {425struct gpiohandle_config {
142 __u32 flags;426 __u32 flags;
@@ -144,21 +428,19 @@ struct gpiohandle_config { · 1 unmodified line
144 __u32 padding[4]; /* padding for future use */428 __u32 padding[4]; /* padding for future use */
145};429};
146 430
147#define GPIOHANDLE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0a, struct gpiohandle_config)
148
149/**431/**
150 * struct gpiohandle_data - Information of values on a GPIO handle432 * struct gpiohandle_data - Information of values on a GPIO handle
151 * @values: when getting the state of lines this contains the current433 * @values: when getting the state of lines this contains the current
152 * state of a line, when setting the state of lines these should contain434 * state of a line, when setting the state of lines these should contain
153 * the desired target state435 * the desired target state
436 *
437 * Note: This struct is part of ABI v1 and is deprecated.
438 * Use &struct gpio_v2_line_values instead.
154 */439 */
155struct gpiohandle_data {440struct gpiohandle_data {
156 __u8 values[GPIOHANDLES_MAX];441 __u8 values[GPIOHANDLES_MAX];
157};442};
158 443
159#define GPIOHANDLE_GET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x08, struct gpiohandle_data)
160#define GPIOHANDLE_SET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x09, struct gpiohandle_data)
161
162/* Eventrequest flags */444/* Eventrequest flags */
163#define GPIOEVENT_REQUEST_RISING_EDGE (1UL << 0)445#define GPIOEVENT_REQUEST_RISING_EDGE (1UL << 0)
164#define GPIOEVENT_REQUEST_FALLING_EDGE (1UL << 1)446#define GPIOEVENT_REQUEST_FALLING_EDGE (1UL << 1)
@@ -169,24 +451,27 @@ struct gpiohandle_data { · 4 unmodified lines
169 * @lineoffset: the desired line to subscribe to events from, specified by451 * @lineoffset: the desired line to subscribe to events from, specified by
170 * offset index for the associated GPIO device452 * offset index for the associated GPIO device
171 * @handleflags: desired handle flags for the desired GPIO line, such as453 * @handleflags: desired handle flags for the desired GPIO line, such as
172 * GPIOHANDLE_REQUEST_ACTIVE_LOW or GPIOHANDLE_REQUEST_OPEN_DRAIN454 * %GPIOHANDLE_REQUEST_ACTIVE_LOW or %GPIOHANDLE_REQUEST_OPEN_DRAIN
173 * @eventflags: desired flags for the desired GPIO event line, such as455 * @eventflags: desired flags for the desired GPIO event line, such as
174 * GPIOEVENT_REQUEST_RISING_EDGE or GPIOEVENT_REQUEST_FALLING_EDGE456 * %GPIOEVENT_REQUEST_RISING_EDGE or %GPIOEVENT_REQUEST_FALLING_EDGE
175 * @consumer_label: a desired consumer label for the selected GPIO line(s)457 * @consumer_label: a desired consumer label for the selected GPIO line(s)
176 * such as "my-listener"458 * such as "my-listener"
177 * @fd: if successful this field will contain a valid anonymous file handle459 * @fd: if successful this field will contain a valid anonymous file handle
178 * after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value460 * after a %GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
179 * means error461 * means error
462 *
463 * Note: This struct is part of ABI v1 and is deprecated.
464 * Use &struct gpio_v2_line_request instead.
180 */465 */
181struct gpioevent_request {466struct gpioevent_request {
182 __u32 lineoffset;467 __u32 lineoffset;
183 __u32 handleflags;468 __u32 handleflags;
184 __u32 eventflags;469 __u32 eventflags;
185 char consumer_label[32];470 char consumer_label[GPIO_MAX_NAME_SIZE];
186 int fd;471 int fd;
187};472};
188 473
189/**474/*
190 * GPIO event types475 * GPIO event types
191 */476 */
192#define GPIOEVENT_EVENT_RISING_EDGE 0x01477#define GPIOEVENT_EVENT_RISING_EDGE 0x01
@@ -196,17 +481,42 @@ struct gpioevent_request { · 3 unmodified lines
196 * struct gpioevent_data - The actual event being pushed to userspace481 * struct gpioevent_data - The actual event being pushed to userspace
197 * @timestamp: best estimate of time of event occurrence, in nanoseconds482 * @timestamp: best estimate of time of event occurrence, in nanoseconds
198 * @id: event identifier483 * @id: event identifier
484 *
485 * Note: This struct is part of ABI v1 and is deprecated.
486 * Use &struct gpio_v2_line_event instead.
199 */487 */
200struct gpioevent_data {488struct gpioevent_data {
201 __u64 timestamp;489 __u64 timestamp;
202 __u32 id;490 __u32 id;
203};491};
204 492
493/*
494 * v1 and v2 ioctl()s
495 */
205#define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info)496#define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info)
497#define GPIO_GET_LINEINFO_UNWATCH_IOCTL _IOWR(0xB4, 0x0C, __u32)
498
499/*
500 * v2 ioctl()s
501 */
502#define GPIO_V2_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x05, struct gpio_v2_line_info)
503#define GPIO_V2_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x06, struct gpio_v2_line_info)
504#define GPIO_V2_GET_LINE_IOCTL _IOWR(0xB4, 0x07, struct gpio_v2_line_request)
505#define GPIO_V2_LINE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0D, struct gpio_v2_line_config)
506#define GPIO_V2_LINE_GET_VALUES_IOCTL _IOWR(0xB4, 0x0E, struct gpio_v2_line_values)
507#define GPIO_V2_LINE_SET_VALUES_IOCTL _IOWR(0xB4, 0x0F, struct gpio_v2_line_values)
508
509/*
510 * v1 ioctl()s
511 *
512 * These ioctl()s are deprecated. Use the v2 equivalent instead.
513 */
206#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)514#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)
207#define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0b, struct gpioline_info)
208#define GPIO_GET_LINEINFO_UNWATCH_IOCTL _IOWR(0xB4, 0x0c, __u32)
209#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request)515#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request)
210#define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request)516#define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request)
517#define GPIOHANDLE_GET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x08, struct gpiohandle_data)
518#define GPIOHANDLE_SET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x09, struct gpiohandle_data)
519#define GPIOHANDLE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0A, struct gpiohandle_config)
520#define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0B, struct gpioline_info)
211 521
212#endif /* _UAPI_GPIO_H_ */522#endif /* _UAPI_GPIO_H_ */
include/uapi/linux/gtp.h+2−0
@@ -2,6 +2,8 @@ · 1 unmodified line
2#ifndef _UAPI_LINUX_GTP_H_2#ifndef _UAPI_LINUX_GTP_H_
3#define _UAPI_LINUX_GTP_H_3#define _UAPI_LINUX_GTP_H_
4 4
5#define GTP_GENL_MCGRP_NAME "gtp"
6
5enum gtp_genl_cmds {7enum gtp_genl_cmds {
6 GTP_CMD_NEWPDP,8 GTP_CMD_NEWPDP,
7 GTP_CMD_DELPDP,9 GTP_CMD_DELPDP,
include/uapi/linux/icmpv6.h+1−0
@@ -138,6 +138,7 @@ struct icmp6hdr { · 137 unmodified lines
138#define ICMPV6_HDR_FIELD 0138#define ICMPV6_HDR_FIELD 0
139#define ICMPV6_UNK_NEXTHDR 1139#define ICMPV6_UNK_NEXTHDR 1
140#define ICMPV6_UNK_OPTION 2140#define ICMPV6_UNK_OPTION 2
141#define ICMPV6_HDR_INCOMP 3
141 142
142/*143/*
143 * constants for (set|get)sockopt144 * constants for (set|get)sockopt
include/uapi/linux/if_alg.h+1−0
@@ -35,6 +35,7 @@ struct af_alg_iv { · 34 unmodified lines
35#define ALG_SET_OP 335#define ALG_SET_OP 3
36#define ALG_SET_AEAD_ASSOCLEN 436#define ALG_SET_AEAD_ASSOCLEN 4
37#define ALG_SET_AEAD_AUTHSIZE 537#define ALG_SET_AEAD_AUTHSIZE 5
38#define ALG_SET_DRBG_ENTROPY 6
38 39
39/* Operations */40/* Operations */
40#define ALG_OP_DECRYPT 041#define ALG_OP_DECRYPT 0
include/uapi/linux/if_bridge.h+38−0
@@ -455,10 +455,33 @@ enum { · 454 unmodified lines
455enum {455enum {
456 MDBA_MDB_EATTR_UNSPEC,456 MDBA_MDB_EATTR_UNSPEC,
457 MDBA_MDB_EATTR_TIMER,457 MDBA_MDB_EATTR_TIMER,
458 MDBA_MDB_EATTR_SRC_LIST,
459 MDBA_MDB_EATTR_GROUP_MODE,
460 MDBA_MDB_EATTR_SOURCE,
461 MDBA_MDB_EATTR_RTPROT,
458 __MDBA_MDB_EATTR_MAX462 __MDBA_MDB_EATTR_MAX
459};463};
460#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)464#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
461 465
466/* per mdb entry source */
467enum {
468 MDBA_MDB_SRCLIST_UNSPEC,
469 MDBA_MDB_SRCLIST_ENTRY,
470 __MDBA_MDB_SRCLIST_MAX
471};
472#define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
473
474/* per mdb entry per source attributes
475 * these are embedded in MDBA_MDB_SRCLIST_ENTRY
476 */
477enum {
478 MDBA_MDB_SRCATTR_UNSPEC,
479 MDBA_MDB_SRCATTR_ADDRESS,
480 MDBA_MDB_SRCATTR_TIMER,
481 __MDBA_MDB_SRCATTR_MAX
482};
483#define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
484
462/* multicast router types */485/* multicast router types */
463enum {486enum {
464 MDB_RTR_TYPE_DISABLED,487 MDB_RTR_TYPE_DISABLED,
@@ -495,6 +518,8 @@ struct br_mdb_entry { · 30 unmodified lines
495 __u8 state;518 __u8 state;
496#define MDB_FLAGS_OFFLOAD (1 << 0)519#define MDB_FLAGS_OFFLOAD (1 << 0)
497#define MDB_FLAGS_FAST_LEAVE (1 << 1)520#define MDB_FLAGS_FAST_LEAVE (1 << 1)
521#define MDB_FLAGS_STAR_EXCL (1 << 2)
522#define MDB_FLAGS_BLOCKED (1 << 3)
498 __u8 flags;523 __u8 flags;
499 __u16 vid;524 __u16 vid;
500 struct {525 struct {
@@ -509,10 +534,23 @@ struct br_mdb_entry { · 8 unmodified lines
509enum {534enum {
510 MDBA_SET_ENTRY_UNSPEC,535 MDBA_SET_ENTRY_UNSPEC,
511 MDBA_SET_ENTRY,536 MDBA_SET_ENTRY,
537 MDBA_SET_ENTRY_ATTRS,
512 __MDBA_SET_ENTRY_MAX,538 __MDBA_SET_ENTRY_MAX,
513};539};
514#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)540#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
515 541
542/* [MDBA_SET_ENTRY_ATTRS] = {
543 * [MDBE_ATTR_xxx]
544 * ...
545 * }
546 */
547enum {
548 MDBE_ATTR_UNSPEC,
549 MDBE_ATTR_SOURCE,
550 __MDBE_ATTR_MAX,
551};
552#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
553
516/* Embedded inside LINK_XSTATS_TYPE_BRIDGE */554/* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
517enum {555enum {
518 BRIDGE_XSTATS_UNSPEC,556 BRIDGE_XSTATS_UNSPEC,
include/uapi/linux/if_link.h+202−33
@@ -7,24 +7,23 @@ · 6 unmodified lines
7 7
8/* This struct should be in sync with struct rtnl_link_stats64 */8/* This struct should be in sync with struct rtnl_link_stats64 */
9struct rtnl_link_stats {9struct rtnl_link_stats {
10 __u32 rx_packets; /* total packets received */10 __u32 rx_packets;
11 __u32 tx_packets; /* total packets transmitted */11 __u32 tx_packets;
12 __u32 rx_bytes; /* total bytes received */12 __u32 rx_bytes;
13 __u32 tx_bytes; /* total bytes transmitted */13 __u32 tx_bytes;
14 __u32 rx_errors; /* bad packets received */14 __u32 rx_errors;
15 __u32 tx_errors; /* packet transmit problems */15 __u32 tx_errors;
16 __u32 rx_dropped; /* no space in linux buffers */16 __u32 rx_dropped;
17 __u32 tx_dropped; /* no space available in linux */17 __u32 tx_dropped;
18 __u32 multicast; /* multicast packets received */18 __u32 multicast;
19 __u32 collisions;19 __u32 collisions;
20
21 /* detailed rx_errors: */20 /* detailed rx_errors: */
22 __u32 rx_length_errors;21 __u32 rx_length_errors;
23 __u32 rx_over_errors; /* receiver ring buff overflow */22 __u32 rx_over_errors;
24 __u32 rx_crc_errors; /* recved pkt with crc error */23 __u32 rx_crc_errors;
25 __u32 rx_frame_errors; /* recv'd frame alignment error */24 __u32 rx_frame_errors;
26 __u32 rx_fifo_errors; /* recv'r fifo overrun */25 __u32 rx_fifo_errors;
27 __u32 rx_missed_errors; /* receiver missed packet */26 __u32 rx_missed_errors;
28 27
29 /* detailed tx_errors */28 /* detailed tx_errors */
30 __u32 tx_aborted_errors;29 __u32 tx_aborted_errors;
@@ -37,29 +36,200 @@ struct rtnl_link_stats { · 6 unmodified lines
37 __u32 rx_compressed;36 __u32 rx_compressed;
38 __u32 tx_compressed;37 __u32 tx_compressed;
39 38
40 __u32 rx_nohandler; /* dropped, no handler found */39 __u32 rx_nohandler;
41};40};
42 41
43/* The main device statistics structure */42/**
43 * struct rtnl_link_stats64 - The main device statistics structure.
44 *
45 * @rx_packets: Number of good packets received by the interface.
46 * For hardware interfaces counts all good packets received from the device
47 * by the host, including packets which host had to drop at various stages
48 * of processing (even in the driver).
49 *
50 * @tx_packets: Number of packets successfully transmitted.
51 * For hardware interfaces counts packets which host was able to successfully
52 * hand over to the device, which does not necessarily mean that packets
53 * had been successfully transmitted out of the device, only that device
54 * acknowledged it copied them out of host memory.
55 *
56 * @rx_bytes: Number of good received bytes, corresponding to @rx_packets.
57 *
58 * For IEEE 802.3 devices should count the length of Ethernet Frames
59 * excluding the FCS.
60 *
61 * @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets.
62 *
63 * For IEEE 802.3 devices should count the length of Ethernet Frames
64 * excluding the FCS.
65 *
66 * @rx_errors: Total number of bad packets received on this network device.
67 * This counter must include events counted by @rx_length_errors,
68 * @rx_crc_errors, @rx_frame_errors and other errors not otherwise
69 * counted.
70 *
71 * @tx_errors: Total number of transmit problems.
72 * This counter must include events counter by @tx_aborted_errors,
73 * @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors,
74 * @tx_window_errors and other errors not otherwise counted.
75 *
76 * @rx_dropped: Number of packets received but not processed,
77 * e.g. due to lack of resources or unsupported protocol.
78 * For hardware interfaces this counter should not include packets
79 * dropped by the device which are counted separately in
80 * @rx_missed_errors (since procfs folds those two counters together).
81 *
82 * @tx_dropped: Number of packets dropped on their way to transmission,
83 * e.g. due to lack of resources.
84 *
85 * @multicast: Multicast packets received.
86 * For hardware interfaces this statistic is commonly calculated
87 * at the device level (unlike @rx_packets) and therefore may include
88 * packets which did not reach the host.
89 *
90 * For IEEE 802.3 devices this counter may be equivalent to:
91 *
92 * - 30.3.1.1.21 aMulticastFramesReceivedOK
93 *
94 * @collisions: Number of collisions during packet transmissions.
95 *
96 * @rx_length_errors: Number of packets dropped due to invalid length.
97 * Part of aggregate "frame" errors in `/proc/net/dev`.
98 *
99 * For IEEE 802.3 devices this counter should be equivalent to a sum
100 * of the following attributes:
101 *
102 * - 30.3.1.1.23 aInRangeLengthErrors
103 * - 30.3.1.1.24 aOutOfRangeLengthField
104 * - 30.3.1.1.25 aFrameTooLongErrors
105 *
106 * @rx_over_errors: Receiver FIFO overflow event counter.
107 *
108 * Historically the count of overflow events. Such events may be
109 * reported in the receive descriptors or via interrupts, and may
110 * not correspond one-to-one with dropped packets.
111 *
112 * The recommended interpretation for high speed interfaces is -
113 * number of packets dropped because they did not fit into buffers
114 * provided by the host, e.g. packets larger than MTU or next buffer
115 * in the ring was not available for a scatter transfer.
116 *
117 * Part of aggregate "frame" errors in `/proc/net/dev`.
118 *
119 * This statistics was historically used interchangeably with
120 * @rx_fifo_errors.
121 *
122 * This statistic corresponds to hardware events and is not commonly used
123 * on software devices.
124 *
125 * @rx_crc_errors: Number of packets received with a CRC error.
126 * Part of aggregate "frame" errors in `/proc/net/dev`.
127 *
128 * For IEEE 802.3 devices this counter must be equivalent to:
129 *
130 * - 30.3.1.1.6 aFrameCheckSequenceErrors
131 *
132 * @rx_frame_errors: Receiver frame alignment errors.
133 * Part of aggregate "frame" errors in `/proc/net/dev`.
134 *
135 * For IEEE 802.3 devices this counter should be equivalent to:
136 *
137 * - 30.3.1.1.7 aAlignmentErrors
138 *
139 * @rx_fifo_errors: Receiver FIFO error counter.
140 *
141 * Historically the count of overflow events. Those events may be
142 * reported in the receive descriptors or via interrupts, and may
143 * not correspond one-to-one with dropped packets.
144 *
145 * This statistics was used interchangeably with @rx_over_errors.
146 * Not recommended for use in drivers for high speed interfaces.
147 *
148 * This statistic is used on software devices, e.g. to count software
149 * packet queue overflow (can) or sequencing errors (GRE).
150 *
151 * @rx_missed_errors: Count of packets missed by the host.
152 * Folded into the "drop" counter in `/proc/net/dev`.
153 *
154 * Counts number of packets dropped by the device due to lack
155 * of buffer space. This usually indicates that the host interface
156 * is slower than the network interface, or host is not keeping up
157 * with the receive packet rate.
158 *
159 * This statistic corresponds to hardware events and is not used
160 * on software devices.
161 *
162 * @tx_aborted_errors:
163 * Part of aggregate "carrier" errors in `/proc/net/dev`.
164 * For IEEE 802.3 devices capable of half-duplex operation this counter
165 * must be equivalent to:
166 *
167 * - 30.3.1.1.11 aFramesAbortedDueToXSColls
168 *
169 * High speed interfaces may use this counter as a general device
170 * discard counter.
171 *
172 * @tx_carrier_errors: Number of frame transmission errors due to loss
173 * of carrier during transmission.
174 * Part of aggregate "carrier" errors in `/proc/net/dev`.
175 *
176 * For IEEE 802.3 devices this counter must be equivalent to:
177 *
178 * - 30.3.1.1.13 aCarrierSenseErrors
179 *
180 * @tx_fifo_errors: Number of frame transmission errors due to device
181 * FIFO underrun / underflow. This condition occurs when the device
182 * begins transmission of a frame but is unable to deliver the
183 * entire frame to the transmitter in time for transmission.
184 * Part of aggregate "carrier" errors in `/proc/net/dev`.
185 *
186 * @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for
187 * old half-duplex Ethernet.
188 * Part of aggregate "carrier" errors in `/proc/net/dev`.
189 *
190 * For IEEE 802.3 devices possibly equivalent to:
191 *
192 * - 30.3.2.1.4 aSQETestErrors
193 *
194 * @tx_window_errors: Number of frame transmission errors due
195 * to late collisions (for Ethernet - after the first 64B of transmission).
196 * Part of aggregate "carrier" errors in `/proc/net/dev`.
197 *
198 * For IEEE 802.3 devices this counter must be equivalent to:
199 *
200 * - 30.3.1.1.10 aLateCollisions
201 *
202 * @rx_compressed: Number of correctly received compressed packets.
203 * This counters is only meaningful for interfaces which support
204 * packet compression (e.g. CSLIP, PPP).
205 *
206 * @tx_compressed: Number of transmitted compressed packets.
207 * This counters is only meaningful for interfaces which support
208 * packet compression (e.g. CSLIP, PPP).
209 *
210 * @rx_nohandler: Number of packets received on the interface
211 * but dropped by the networking stack because the device is
212 * not designated to receive packets (e.g. backup link in a bond).
213 */
44struct rtnl_link_stats64 {214struct rtnl_link_stats64 {
45 __u64 rx_packets; /* total packets received */215 __u64 rx_packets;
46 __u64 tx_packets; /* total packets transmitted */216 __u64 tx_packets;
47 __u64 rx_bytes; /* total bytes received */217 __u64 rx_bytes;
48 __u64 tx_bytes; /* total bytes transmitted */218 __u64 tx_bytes;
49 __u64 rx_errors; /* bad packets received */219 __u64 rx_errors;
50 __u64 tx_errors; /* packet transmit problems */220 __u64 tx_errors;
51 __u64 rx_dropped; /* no space in linux buffers */221 __u64 rx_dropped;
52 __u64 tx_dropped; /* no space available in linux */222 __u64 tx_dropped;
53 __u64 multicast; /* multicast packets received */223 __u64 multicast;
54 __u64 collisions;224 __u64 collisions;
55 225
56 /* detailed rx_errors: */226 /* detailed rx_errors: */
57 __u64 rx_length_errors;227 __u64 rx_length_errors;
58 __u64 rx_over_errors; /* receiver ring buff overflow */228 __u64 rx_over_errors;
59 __u64 rx_crc_errors; /* recved pkt with crc error */229 __u64 rx_crc_errors;
60 __u64 rx_frame_errors; /* recv'd frame alignment error */230 __u64 rx_frame_errors;
61 __u64 rx_fifo_errors; /* recv'r fifo overrun */231 __u64 rx_fifo_errors;
62 __u64 rx_missed_errors; /* receiver missed packet */232 __u64 rx_missed_errors;
63 233
64 /* detailed tx_errors */234 /* detailed tx_errors */
65 __u64 tx_aborted_errors;235 __u64 tx_aborted_errors;
@@ -71,8 +241,7 @@ struct rtnl_link_stats64 { · 5 unmodified lines
71 /* for cslip etc */241 /* for cslip etc */
72 __u64 rx_compressed;242 __u64 rx_compressed;
73 __u64 tx_compressed;243 __u64 tx_compressed;
74 244 __u64 rx_nohandler;
75 __u64 rx_nohandler; /* dropped, no handler found */
76};245};
77 246
78/* The struct should be in sync with struct ifmap */247/* The struct should be in sync with struct ifmap */
include/uapi/linux/if_pppol2tp.h+1−1
@@ -75,7 +75,7 @@ struct pppol2tpv3in6_addr { · 74 unmodified lines
75};75};
76 76
77/* Socket options:77/* Socket options:
78 * DEBUG - bitmask of debug message categories78 * DEBUG - bitmask of debug message categories (not used)
79 * SENDSEQ - 0 => don't send packets with sequence numbers79 * SENDSEQ - 0 => don't send packets with sequence numbers
80 * 1 => send packets with sequence numbers80 * 1 => send packets with sequence numbers
81 * RECVSEQ - 0 => receive packet sequence numbers are optional81 * RECVSEQ - 0 => receive packet sequence numbers are optional
include/uapi/linux/iio/types.h+1−0
@@ -94,6 +94,7 @@ enum iio_modifier { · 93 unmodified lines
94 IIO_MOD_PM10,94 IIO_MOD_PM10,
95 IIO_MOD_ETHANOL,95 IIO_MOD_ETHANOL,
96 IIO_MOD_H2,96 IIO_MOD_H2,
97 IIO_MOD_O2,
97};98};
98 99
99enum iio_event_type {100enum iio_event_type {
include/uapi/linux/in.h+1−1
@@ -135,7 +135,7 @@ struct in_addr { · 134 unmodified lines
135 * this socket to prevent accepting spoofed ones.135 * this socket to prevent accepting spoofed ones.
136 */136 */
137#define IP_PMTUDISC_INTERFACE 4137#define IP_PMTUDISC_INTERFACE 4
138/* weaker version of IP_PMTUDISC_INTERFACE, which allos packets to get138/* weaker version of IP_PMTUDISC_INTERFACE, which allows packets to get
139 * fragmented if they exeed the interface mtu139 * fragmented if they exeed the interface mtu
140 */140 */
141#define IP_PMTUDISC_OMIT 5141#define IP_PMTUDISC_OMIT 5
include/uapi/linux/inet_diag.h+18−0
@@ -160,6 +160,7 @@ enum { · 159 unmodified lines
160 INET_DIAG_ULP_INFO,160 INET_DIAG_ULP_INFO,
161 INET_DIAG_SK_BPF_STORAGES,161 INET_DIAG_SK_BPF_STORAGES,
162 INET_DIAG_CGROUP_ID,162 INET_DIAG_CGROUP_ID,
163 INET_DIAG_SOCKOPT,
163 __INET_DIAG_MAX,164 __INET_DIAG_MAX,
164};165};
165 166
@@ -183,6 +184,23 @@ struct inet_diag_meminfo { · 17 unmodified lines
183 __u32 idiag_tmem;184 __u32 idiag_tmem;
184};185};
185 186
187/* INET_DIAG_SOCKOPT */
188
189struct inet_diag_sockopt {
190 __u8 recverr:1,
191 is_icsk:1,
192 freebind:1,
193 hdrincl:1,
194 mc_loop:1,
195 transparent:1,
196 mc_all:1,
197 nodefrag:1;
198 __u8 bind_address_no_port:1,
199 recverr_rfc4884:1,
200 defer_connect:1,
201 unused:5;
202};
203
186/* INET_DIAG_VEGASINFO */204/* INET_DIAG_VEGASINFO */
187 205
188struct tcpvegas_info {206struct tcpvegas_info {
include/uapi/linux/input-event-codes.h+4−0
@@ -515,6 +515,9 @@ · 514 unmodified lines
515#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */515#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */
516#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */516#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */
517#define KEY_IMAGES 0x1ba /* AL Image Browser */517#define KEY_IMAGES 0x1ba /* AL Image Browser */
518#define KEY_NOTIFICATION_CENTER 0x1bc /* Show/hide the notification center */
519#define KEY_PICKUP_PHONE 0x1bd /* Answer incoming call */
520#define KEY_HANGUP_PHONE 0x1be /* Decline incoming call */
518 521
519#define KEY_DEL_EOL 0x1c0522#define KEY_DEL_EOL 0x1c0
520#define KEY_DEL_EOS 0x1c1523#define KEY_DEL_EOS 0x1c1
@@ -542,6 +545,7 @@ · 21 unmodified lines
542#define KEY_FN_F 0x1e2545#define KEY_FN_F 0x1e2
543#define KEY_FN_S 0x1e3546#define KEY_FN_S 0x1e3
544#define KEY_FN_B 0x1e4547#define KEY_FN_B 0x1e4
548#define KEY_FN_RIGHT_SHIFT 0x1e5
545 549
546#define KEY_BRL_DOT1 0x1f1550#define KEY_BRL_DOT1 0x1f1
547#define KEY_BRL_DOT2 0x1f2551#define KEY_BRL_DOT2 0x1f2
include/uapi/linux/io_uring.h+50−11
@@ -95,6 +95,7 @@ enum { · 94 unmodified lines
95#define IORING_SETUP_CQSIZE (1U << 3) /* app defines CQ size */95#define IORING_SETUP_CQSIZE (1U << 3) /* app defines CQ size */
96#define IORING_SETUP_CLAMP (1U << 4) /* clamp SQ/CQ ring sizes */96#define IORING_SETUP_CLAMP (1U << 4) /* clamp SQ/CQ ring sizes */
97#define IORING_SETUP_ATTACH_WQ (1U << 5) /* attach to existing wq */97#define IORING_SETUP_ATTACH_WQ (1U << 5) /* attach to existing wq */
98#define IORING_SETUP_R_DISABLED (1U << 6) /* start with ring disabled */
98 99
99enum {100enum {
100 IORING_OP_NOP,101 IORING_OP_NOP,
@@ -224,6 +225,7 @@ struct io_cqring_offsets { · 123 unmodified lines
224 */225 */
225#define IORING_ENTER_GETEVENTS (1U << 0)226#define IORING_ENTER_GETEVENTS (1U << 0)
226#define IORING_ENTER_SQ_WAKEUP (1U << 1)227#define IORING_ENTER_SQ_WAKEUP (1U << 1)
228#define IORING_ENTER_SQ_WAIT (1U << 2)
227 229
228/*230/*
229 * Passed in for io_uring_setup(2). Copied back with updated info on success231 * Passed in for io_uring_setup(2). Copied back with updated info on success
@@ -255,17 +257,24 @@ struct io_uring_params { · 25 unmodified lines
255/*257/*
256 * io_uring_register(2) opcodes and arguments258 * io_uring_register(2) opcodes and arguments
257 */259 */
258#define IORING_REGISTER_BUFFERS 0260enum {
259#define IORING_UNREGISTER_BUFFERS 1261 IORING_REGISTER_BUFFERS = 0,
260#define IORING_REGISTER_FILES 2262 IORING_UNREGISTER_BUFFERS = 1,
261#define IORING_UNREGISTER_FILES 3263 IORING_REGISTER_FILES = 2,
262#define IORING_REGISTER_EVENTFD 4264 IORING_UNREGISTER_FILES = 3,
263#define IORING_UNREGISTER_EVENTFD 5265 IORING_REGISTER_EVENTFD = 4,
264#define IORING_REGISTER_FILES_UPDATE 6266 IORING_UNREGISTER_EVENTFD = 5,
265#define IORING_REGISTER_EVENTFD_ASYNC 7267 IORING_REGISTER_FILES_UPDATE = 6,
266#define IORING_REGISTER_PROBE 8268 IORING_REGISTER_EVENTFD_ASYNC = 7,
267#define IORING_REGISTER_PERSONALITY 9269 IORING_REGISTER_PROBE = 8,
268#define IORING_UNREGISTER_PERSONALITY 10270 IORING_REGISTER_PERSONALITY = 9,
271 IORING_UNREGISTER_PERSONALITY = 10,
272 IORING_REGISTER_RESTRICTIONS = 11,
273 IORING_REGISTER_ENABLE_RINGS = 12,
274
275 /* this goes last */
276 IORING_REGISTER_LAST
277};
269 278
270struct io_uring_files_update {279struct io_uring_files_update {
271 __u32 offset;280 __u32 offset;
@@ -290,4 +299,34 @@ struct io_uring_probe { · 18 unmodified lines
290 struct io_uring_probe_op ops[0];299 struct io_uring_probe_op ops[0];
291};300};
292 301
302struct io_uring_restriction {
303 __u16 opcode;
304 union {
305 __u8 register_op; /* IORING_RESTRICTION_REGISTER_OP */
306 __u8 sqe_op; /* IORING_RESTRICTION_SQE_OP */
307 __u8 sqe_flags; /* IORING_RESTRICTION_SQE_FLAGS_* */
308 };
309 __u8 resv;
310 __u32 resv2[3];
311};
312
313/*
314 * io_uring_restriction->opcode values
315 */
316enum {
317 /* Allow an io_uring_register(2) opcode */
318 IORING_RESTRICTION_REGISTER_OP = 0,
319
320 /* Allow an sqe opcode */
321 IORING_RESTRICTION_SQE_OP = 1,
322
323 /* Allow sqe flags */
324 IORING_RESTRICTION_SQE_FLAGS_ALLOWED = 2,
325
326 /* Require sqe flags (these flags must be set on each submission) */
327 IORING_RESTRICTION_SQE_FLAGS_REQUIRED = 3,
328
329 IORING_RESTRICTION_LAST
330};
331
293#endif332#endif
include/uapi/linux/iommu.h+13−5
@@ -139,6 +139,7 @@ enum iommu_page_response_code { · 138 unmodified lines
139 139
140/**140/**
141 * struct iommu_page_response - Generic page response information141 * struct iommu_page_response - Generic page response information
142 * @argsz: User filled size of this data
142 * @version: API version of this structure143 * @version: API version of this structure
143 * @flags: encodes whether the corresponding fields are valid144 * @flags: encodes whether the corresponding fields are valid
144 * (IOMMU_FAULT_PAGE_RESPONSE_* values)145 * (IOMMU_FAULT_PAGE_RESPONSE_* values)
@@ -147,6 +148,7 @@ enum iommu_page_response_code { · 2 unmodified lines
147 * @code: response code from &enum iommu_page_response_code148 * @code: response code from &enum iommu_page_response_code
148 */149 */
149struct iommu_page_response {150struct iommu_page_response {
151 __u32 argsz;
150#define IOMMU_PAGE_RESP_VERSION_1 1152#define IOMMU_PAGE_RESP_VERSION_1 1
151 __u32 version;153 __u32 version;
152#define IOMMU_PAGE_RESP_PASID_VALID (1 << 0)154#define IOMMU_PAGE_RESP_PASID_VALID (1 << 0)
@@ -222,6 +224,7 @@ struct iommu_inv_pasid_info { · 69 unmodified lines
222/**224/**
223 * struct iommu_cache_invalidate_info - First level/stage invalidation225 * struct iommu_cache_invalidate_info - First level/stage invalidation
224 * information226 * information
227 * @argsz: User filled size of this data
225 * @version: API version of this structure228 * @version: API version of this structure
226 * @cache: bitfield that allows to select which caches to invalidate229 * @cache: bitfield that allows to select which caches to invalidate
227 * @granularity: defines the lowest granularity used for the invalidation:230 * @granularity: defines the lowest granularity used for the invalidation:
@@ -250,6 +253,7 @@ struct iommu_inv_pasid_info { · 22 unmodified lines
250 * must support the used granularity.253 * must support the used granularity.
251 */254 */
252struct iommu_cache_invalidate_info {255struct iommu_cache_invalidate_info {
256 __u32 argsz;
253#define IOMMU_CACHE_INVALIDATE_INFO_VERSION_1 1257#define IOMMU_CACHE_INVALIDATE_INFO_VERSION_1 1
254 __u32 version;258 __u32 version;
255/* IOMMU paging structure cache */259/* IOMMU paging structure cache */
@@ -259,11 +263,11 @@ struct iommu_cache_invalidate_info { · 3 unmodified lines
259#define IOMMU_CACHE_INV_TYPE_NR (3)263#define IOMMU_CACHE_INV_TYPE_NR (3)
260 __u8 cache;264 __u8 cache;
261 __u8 granularity;265 __u8 granularity;
262 __u8 padding[2];266 __u8 padding[6];
263 union {267 union {
264 struct iommu_inv_pasid_info pasid_info;268 struct iommu_inv_pasid_info pasid_info;
265 struct iommu_inv_addr_info addr_info;269 struct iommu_inv_addr_info addr_info;
266 };270 } granu;
267};271};
268 272
269/**273/**
@@ -284,6 +288,7 @@ struct iommu_gpasid_bind_data_vtd { · 14 unmodified lines
284#define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) /* page-level write through */288#define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) /* page-level write through */
285#define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) /* extended mem type enable */289#define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) /* extended mem type enable */
286#define IOMMU_SVA_VTD_GPASID_CD (1 << 5) /* PASID-level cache disable */290#define IOMMU_SVA_VTD_GPASID_CD (1 << 5) /* PASID-level cache disable */
291#define IOMMU_SVA_VTD_GPASID_LAST (1 << 6)
287 __u64 flags;292 __u64 flags;
288 __u32 pat;293 __u32 pat;
289 __u32 emt;294 __u32 emt;
@@ -296,6 +301,7 @@ struct iommu_gpasid_bind_data_vtd { · 6 unmodified lines
296 301
297/**302/**
298 * struct iommu_gpasid_bind_data - Information about device and guest PASID binding303 * struct iommu_gpasid_bind_data - Information about device and guest PASID binding
304 * @argsz: User filled size of this data
299 * @version: Version of this data structure305 * @version: Version of this data structure
300 * @format: PASID table entry format306 * @format: PASID table entry format
301 * @flags: Additional information on guest bind request307 * @flags: Additional information on guest bind request
@@ -313,21 +319,23 @@ struct iommu_gpasid_bind_data_vtd { · 11 unmodified lines
313 * PASID to host PASID based on this bind data.319 * PASID to host PASID based on this bind data.
314 */320 */
315struct iommu_gpasid_bind_data {321struct iommu_gpasid_bind_data {
322 __u32 argsz;
316#define IOMMU_GPASID_BIND_VERSION_1 1323#define IOMMU_GPASID_BIND_VERSION_1 1
317 __u32 version;324 __u32 version;
318#define IOMMU_PASID_FORMAT_INTEL_VTD 1325#define IOMMU_PASID_FORMAT_INTEL_VTD 1
326#define IOMMU_PASID_FORMAT_LAST 2
319 __u32 format;327 __u32 format;
328 __u32 addr_width;
320#define IOMMU_SVA_GPASID_VAL (1 << 0) /* guest PASID valid */329#define IOMMU_SVA_GPASID_VAL (1 << 0) /* guest PASID valid */
321 __u64 flags;330 __u64 flags;
322 __u64 gpgd;331 __u64 gpgd;
323 __u64 hpasid;332 __u64 hpasid;
324 __u64 gpasid;333 __u64 gpasid;
325 __u32 addr_width;334 __u8 padding[8];
326 __u8 padding[12];
327 /* Vendor specific data */335 /* Vendor specific data */
328 union {336 union {
329 struct iommu_gpasid_bind_data_vtd vtd;337 struct iommu_gpasid_bind_data_vtd vtd;
330 };338 } vendor;
331};339};
332 340
333#endif /* _UAPI_IOMMU_H */341#endif /* _UAPI_IOMMU_H */
include/uapi/linux/ipmi_msgdefs.h+2−0
@@ -69,6 +69,8 @@ · 68 unmodified lines
69#define IPMI_ERR_MSG_TRUNCATED 0xc669#define IPMI_ERR_MSG_TRUNCATED 0xc6
70#define IPMI_REQ_LEN_INVALID_ERR 0xc770#define IPMI_REQ_LEN_INVALID_ERR 0xc7
71#define IPMI_REQ_LEN_EXCEEDED_ERR 0xc871#define IPMI_REQ_LEN_EXCEEDED_ERR 0xc8
72#define IPMI_DEVICE_IN_FW_UPDATE_ERR 0xd1
73#define IPMI_DEVICE_IN_INIT_ERR 0xd2
72#define IPMI_NOT_IN_MY_STATE_ERR 0xd5 /* IPMI 2.0 */74#define IPMI_NOT_IN_MY_STATE_ERR 0xd5 /* IPMI 2.0 */
73#define IPMI_LOST_ARBITRATION_ERR 0x8175#define IPMI_LOST_ARBITRATION_ERR 0x81
74#define IPMI_BUS_ERR 0x8276#define IPMI_BUS_ERR 0x82
include/uapi/linux/kfd_ioctl.h+9−2
@@ -449,8 +449,15 @@ struct kfd_ioctl_import_dmabuf_args { · 448 unmodified lines
449/*449/*
450 * KFD SMI(System Management Interface) events450 * KFD SMI(System Management Interface) events
451 */451 */
452/* Event type (defined by bitmask) */452enum kfd_smi_event {
453#define KFD_SMI_EVENT_VMFAULT 0x0000000000000001453 KFD_SMI_EVENT_NONE = 0, /* not used */
454 KFD_SMI_EVENT_VMFAULT = 1, /* event start counting at 1 */
455 KFD_SMI_EVENT_THERMAL_THROTTLE = 2,
456 KFD_SMI_EVENT_GPU_PRE_RESET = 3,
457 KFD_SMI_EVENT_GPU_POST_RESET = 4,
458};
459
460#define KFD_SMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
454 461
455struct kfd_ioctl_smi_events_args {462struct kfd_ioctl_smi_events_args {
456 __u32 gpuid; /* to KFD */463 __u32 gpuid; /* to KFD */
include/uapi/linux/kvm.h+23−2
@@ -248,6 +248,8 @@ struct kvm_hyperv_exit { · 247 unmodified lines
248#define KVM_EXIT_IOAPIC_EOI 26248#define KVM_EXIT_IOAPIC_EOI 26
249#define KVM_EXIT_HYPERV 27249#define KVM_EXIT_HYPERV 27
250#define KVM_EXIT_ARM_NISV 28250#define KVM_EXIT_ARM_NISV 28
251#define KVM_EXIT_X86_RDMSR 29
252#define KVM_EXIT_X86_WRMSR 30
251 253
252/* For KVM_EXIT_INTERNAL_ERROR */254/* For KVM_EXIT_INTERNAL_ERROR */
253/* Emulate instruction failed. */255/* Emulate instruction failed. */
@@ -413,6 +415,17 @@ struct kvm_run { · 159 unmodified lines
413 __u64 esr_iss;415 __u64 esr_iss;
414 __u64 fault_ipa;416 __u64 fault_ipa;
415 } arm_nisv;417 } arm_nisv;
418 /* KVM_EXIT_X86_RDMSR / KVM_EXIT_X86_WRMSR */
419 struct {
420 __u8 error; /* user -> kernel */
421 __u8 pad[7];
422#define KVM_MSR_EXIT_REASON_INVAL (1 << 0)
423#define KVM_MSR_EXIT_REASON_UNKNOWN (1 << 1)
424#define KVM_MSR_EXIT_REASON_FILTER (1 << 2)
425 __u32 reason; /* kernel -> user */
426 __u32 index; /* kernel -> user */
427 __u64 data; /* kernel <-> user */
428 } msr;
416 /* Fix the size of the union. */429 /* Fix the size of the union. */
417 char padding[256];430 char padding[256];
418 };431 };
@@ -790,9 +803,10 @@ struct kvm_ppc_resize_hpt { · 371 unmodified lines
790#define KVM_VM_PPC_HV 1803#define KVM_VM_PPC_HV 1
791#define KVM_VM_PPC_PR 2804#define KVM_VM_PPC_PR 2
792 805
793/* on MIPS, 0 forces trap & emulate, 1 forces VZ ASE */806/* on MIPS, 0 indicates auto, 1 forces VZ ASE, 2 forces trap & emulate */
794#define KVM_VM_MIPS_TE 0807#define KVM_VM_MIPS_AUTO 0
795#define KVM_VM_MIPS_VZ 1808#define KVM_VM_MIPS_VZ 1
809#define KVM_VM_MIPS_TE 2
796 810
797#define KVM_S390_SIE_PAGE_OFFSET 1811#define KVM_S390_SIE_PAGE_OFFSET 1
798 812
@@ -1035,6 +1049,10 @@ struct kvm_ppc_resize_hpt { · 236 unmodified lines
1035#define KVM_CAP_LAST_CPU 1841049#define KVM_CAP_LAST_CPU 184
1036#define KVM_CAP_SMALLER_MAXPHYADDR 1851050#define KVM_CAP_SMALLER_MAXPHYADDR 185
1037#define KVM_CAP_S390_DIAG318 1861051#define KVM_CAP_S390_DIAG318 186
1052#define KVM_CAP_STEAL_TIME 187
1053#define KVM_CAP_X86_USER_SPACE_MSR 188
1054#define KVM_CAP_X86_MSR_FILTER 189
1055#define KVM_CAP_ENFORCE_PV_FEATURE_CPUID 190
1038 1056
1039#ifdef KVM_CAP_IRQ_ROUTING1057#ifdef KVM_CAP_IRQ_ROUTING
1040 1058
@@ -1536,6 +1554,9 @@ struct kvm_pv_cmd { · 495 unmodified lines
1536/* Available with KVM_CAP_S390_PROTECTED */1554/* Available with KVM_CAP_S390_PROTECTED */
1537#define KVM_S390_PV_COMMAND _IOWR(KVMIO, 0xc5, struct kvm_pv_cmd)1555#define KVM_S390_PV_COMMAND _IOWR(KVMIO, 0xc5, struct kvm_pv_cmd)
1538 1556
1557/* Available with KVM_CAP_X86_MSR_FILTER */
1558#define KVM_X86_SET_MSR_FILTER _IOW(KVMIO, 0xc6, struct kvm_msr_filter)
1559
1539/* Secure Encrypted Virtualization command */1560/* Secure Encrypted Virtualization command */
1540enum sev_cmd_id {1561enum sev_cmd_id {
1541 /* Guest initialization commands */1562 /* Guest initialization commands */
include/uapi/linux/l2tp.h+5−2
@@ -108,7 +108,7 @@ enum { · 107 unmodified lines
108 L2TP_ATTR_VLAN_ID, /* u16 (not used) */108 L2TP_ATTR_VLAN_ID, /* u16 (not used) */
109 L2TP_ATTR_COOKIE, /* 0, 4 or 8 bytes */109 L2TP_ATTR_COOKIE, /* 0, 4 or 8 bytes */
110 L2TP_ATTR_PEER_COOKIE, /* 0, 4 or 8 bytes */110 L2TP_ATTR_PEER_COOKIE, /* 0, 4 or 8 bytes */
111 L2TP_ATTR_DEBUG, /* u32, enum l2tp_debug_flags */111 L2TP_ATTR_DEBUG, /* u32, enum l2tp_debug_flags (not used) */
112 L2TP_ATTR_RECV_SEQ, /* u8 */112 L2TP_ATTR_RECV_SEQ, /* u8 */
113 L2TP_ATTR_SEND_SEQ, /* u8 */113 L2TP_ATTR_SEND_SEQ, /* u8 */
114 L2TP_ATTR_LNS_MODE, /* u8 */114 L2TP_ATTR_LNS_MODE, /* u8 */
@@ -144,6 +144,7 @@ enum { · 29 unmodified lines
144 L2TP_ATTR_RX_OOS_PACKETS, /* u64 */144 L2TP_ATTR_RX_OOS_PACKETS, /* u64 */
145 L2TP_ATTR_RX_ERRORS, /* u64 */145 L2TP_ATTR_RX_ERRORS, /* u64 */
146 L2TP_ATTR_STATS_PAD,146 L2TP_ATTR_STATS_PAD,
147 L2TP_ATTR_RX_COOKIE_DISCARDS, /* u64 */
147 __L2TP_ATTR_STATS_MAX,148 __L2TP_ATTR_STATS_MAX,
148};149};
149 150
@@ -177,7 +178,9 @@ enum l2tp_seqmode { · 27 unmodified lines
177};178};
178 179
179/**180/**
180 * enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions181 * enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions.
182 *
183 * Unused.
181 *184 *
182 * @L2TP_MSG_DEBUG: verbose debug (if compiled in)185 * @L2TP_MSG_DEBUG: verbose debug (if compiled in)
183 * @L2TP_MSG_CONTROL: userspace - kernel interface186 * @L2TP_MSG_CONTROL: userspace - kernel interface
include/uapi/linux/mei.h+49−0
@@ -66,4 +66,53 @@ struct mei_connect_client_data { · 65 unmodified lines
66 */66 */
67#define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)67#define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)
68 68
69/**
70 * struct mei_connect_client_vtag - mei client information struct with vtag
71 *
72 * @in_client_uuid: UUID of client to connect
73 * @vtag: virtual tag
74 * @reserved: reserved for future use
75 */
76struct mei_connect_client_vtag {
77 uuid_le in_client_uuid;
78 __u8 vtag;
79 __u8 reserved[3];
80};
81
82/**
83 * struct mei_connect_client_data_vtag - IOCTL connect data union
84 *
85 * @connect: input connect data
86 * @out_client_properties: output client data
87 */
88struct mei_connect_client_data_vtag {
89 union {
90 struct mei_connect_client_vtag connect;
91 struct mei_client out_client_properties;
92 };
93};
94
95/**
96 * DOC:
97 * This IOCTL is used to associate the current file descriptor with a
98 * FW Client (given by UUID), and virtual tag (vtag).
99 * The IOCTL opens a communication channel between a host client and
100 * a FW client on a tagged channel. From this point on, every read
101 * and write will communicate with the associated FW client with
102 * on the tagged channel.
103 * Upone close() the communication is terminated.
104 *
105 * The IOCTL argument is a struct with a union that contains
106 * the input parameter and the output parameter for this IOCTL.
107 *
108 * The input parameter is UUID of the FW Client, a vtag [0,255]
109 * The output parameter is the properties of the FW client
110 * (FW protocool version and max message size).
111 *
112 * Clients that do not support tagged connection
113 * will respond with -EOPNOTSUPP.
114 */
115#define IOCTL_MEI_CONNECT_CLIENT_VTAG \
116 _IOWR('H', 0x04, struct mei_connect_client_data_vtag)
117
69#endif /* _LINUX_MEI_H */118#endif /* _LINUX_MEI_H */
include/uapi/linux/membarrier.h+26−0
@@ -114,6 +114,26 @@ · 113 unmodified lines
114 * If this command is not implemented by an114 * If this command is not implemented by an
115 * architecture, -EINVAL is returned.115 * architecture, -EINVAL is returned.
116 * Returns 0 on success.116 * Returns 0 on success.
117 * @MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ:
118 * Ensure the caller thread, upon return from
119 * system call, that all its running thread
120 * siblings have any currently running rseq
121 * critical sections restarted if @flags
122 * parameter is 0; if @flags parameter is
123 * MEMBARRIER_CMD_FLAG_CPU,
124 * then this operation is performed only
125 * on CPU indicated by @cpu_id. If this command is
126 * not implemented by an architecture, -EINVAL
127 * is returned. A process needs to register its
128 * intent to use the private expedited rseq
129 * command prior to using it, otherwise
130 * this command returns -EPERM.
131 * @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ:
132 * Register the process intent to use
133 * MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ.
134 * If this command is not implemented by an
135 * architecture, -EINVAL is returned.
136 * Returns 0 on success.
117 * @MEMBARRIER_CMD_SHARED:137 * @MEMBARRIER_CMD_SHARED:
118 * Alias to MEMBARRIER_CMD_GLOBAL. Provided for138 * Alias to MEMBARRIER_CMD_GLOBAL. Provided for
119 * header backward compatibility.139 * header backward compatibility.
@@ -131,9 +151,15 @@ enum membarrier_cmd { · 11 unmodified lines
131 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = (1 << 4),151 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = (1 << 4),
132 MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 5),152 MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 5),
133 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 6),153 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 6),
154 MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = (1 << 7),
155 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ = (1 << 8),
134 156
135 /* Alias for header backward compatibility. */157 /* Alias for header backward compatibility. */
136 MEMBARRIER_CMD_SHARED = MEMBARRIER_CMD_GLOBAL,158 MEMBARRIER_CMD_SHARED = MEMBARRIER_CMD_GLOBAL,
137};159};
138 160
161enum membarrier_cmd_flag {
162 MEMBARRIER_CMD_FLAG_CPU = (1 << 0),
163};
164
139#endif /* _UAPI_LINUX_MEMBARRIER_H */165#endif /* _UAPI_LINUX_MEMBARRIER_H */
include/uapi/linux/mic_common.h+0−235
@@ -1,235 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * Intel MIC Platform Software Stack (MPSS)
4 *
5 * Copyright(c) 2013 Intel Corporation.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License, version 2, as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * The full GNU General Public License is included in this distribution in
17 * the file called "COPYING".
18 *
19 * Intel MIC driver.
20 *
21 */
22#ifndef __MIC_COMMON_H_
23#define __MIC_COMMON_H_
24
25#include <linux/virtio_ring.h>
26
27#define __mic_align(a, x) (((a) + (x) - 1) & ~((x) - 1))
28
29/**
30 * struct mic_device_desc: Virtio device information shared between the
31 * virtio driver and userspace backend
32 *
33 * @type: Device type: console/network/disk etc. Type 0/-1 terminates.
34 * @num_vq: Number of virtqueues.
35 * @feature_len: Number of bytes of feature bits. Multiply by 2: one for
36 host features and one for guest acknowledgements.
37 * @config_len: Number of bytes of the config array after virtqueues.
38 * @status: A status byte, written by the Guest.
39 * @config: Start of the following variable length config.
40 */
41struct mic_device_desc {
42 __s8 type;
43 __u8 num_vq;
44 __u8 feature_len;
45 __u8 config_len;
46 __u8 status;
47 __le64 config[0];
48} __attribute__ ((aligned(8)));
49
50/**
51 * struct mic_device_ctrl: Per virtio device information in the device page
52 * used internally by the host and card side drivers.
53 *
54 * @vdev: Used for storing MIC vdev information by the guest.
55 * @config_change: Set to 1 by host when a config change is requested.
56 * @vdev_reset: Set to 1 by guest to indicate virtio device has been reset.
57 * @guest_ack: Set to 1 by guest to ack a command.
58 * @host_ack: Set to 1 by host to ack a command.
59 * @used_address_updated: Set to 1 by guest when the used address should be
60 * updated.
61 * @c2h_vdev_db: The doorbell number to be used by guest. Set by host.
62 * @h2c_vdev_db: The doorbell number to be used by host. Set by guest.
63 */
64struct mic_device_ctrl {
65 __le64 vdev;
66 __u8 config_change;
67 __u8 vdev_reset;
68 __u8 guest_ack;
69 __u8 host_ack;
70 __u8 used_address_updated;
71 __s8 c2h_vdev_db;
72 __s8 h2c_vdev_db;
73} __attribute__ ((aligned(8)));
74
75/**
76 * struct mic_bootparam: Virtio device independent information in device page
77 *
78 * @magic: A magic value used by the card to ensure it can see the host
79 * @h2c_config_db: Host to Card Virtio config doorbell set by card
80 * @node_id: Unique id of the node
81 * @h2c_scif_db - Host to card SCIF doorbell set by card
82 * @c2h_scif_db - Card to host SCIF doorbell set by host
83 * @scif_host_dma_addr - SCIF host queue pair DMA address
84 * @scif_card_dma_addr - SCIF card queue pair DMA address
85 */
86struct mic_bootparam {
87 __le32 magic;
88 __s8 h2c_config_db;
89 __u8 node_id;
90 __u8 h2c_scif_db;
91 __u8 c2h_scif_db;
92 __u64 scif_host_dma_addr;
93 __u64 scif_card_dma_addr;
94} __attribute__ ((aligned(8)));
95
96/**
97 * struct mic_device_page: High level representation of the device page
98 *
99 * @bootparam: The bootparam structure is used for sharing information and
100 * status updates between MIC host and card drivers.
101 * @desc: Array of MIC virtio device descriptors.
102 */
103struct mic_device_page {
104 struct mic_bootparam bootparam;
105 struct mic_device_desc desc[0];
106};
107/**
108 * struct mic_vqconfig: This is how we expect the device configuration field
109 * for a virtqueue to be laid out in config space.
110 *
111 * @address: Guest/MIC physical address of the virtio ring
112 * (avail and desc rings)
113 * @used_address: Guest/MIC physical address of the used ring
114 * @num: The number of entries in the virtio_ring
115 */
116struct mic_vqconfig {
117 __le64 address;
118 __le64 used_address;
119 __le16 num;
120} __attribute__ ((aligned(8)));
121
122/*
123 * The alignment to use between consumer and producer parts of vring.
124 * This is pagesize for historical reasons.
125 */
126#define MIC_VIRTIO_RING_ALIGN 4096
127
128#define MIC_MAX_VRINGS 4
129#define MIC_VRING_ENTRIES 128
130
131/*
132 * Max vring entries (power of 2) to ensure desc and avail rings
133 * fit in a single page
134 */
135#define MIC_MAX_VRING_ENTRIES 128
136
137/**
138 * Max size of the desc block in bytes: includes:
139 * - struct mic_device_desc
140 * - struct mic_vqconfig (num_vq of these)
141 * - host and guest features
142 * - virtio device config space
143 */
144#define MIC_MAX_DESC_BLK_SIZE 256
145
146/**
147 * struct _mic_vring_info - Host vring info exposed to userspace backend
148 * for the avail index and magic for the card.
149 *
150 * @avail_idx: host avail idx
151 * @magic: A magic debug cookie.
152 */
153struct _mic_vring_info {
154 __u16 avail_idx;
155 __le32 magic;
156};
157
158/**
159 * struct mic_vring - Vring information.
160 *
161 * @vr: The virtio ring.
162 * @info: Host vring information exposed to the userspace backend for the
163 * avail index and magic for the card.
164 * @va: The va for the buffer allocated for vr and info.
165 * @len: The length of the buffer required for allocating vr and info.
166 */
167struct mic_vring {
168 struct vring vr;
169 struct _mic_vring_info *info;
170 void *va;
171 int len;
172};
173
174#define mic_aligned_desc_size(d) __mic_align(mic_desc_size(d), 8)
175
176#ifndef INTEL_MIC_CARD
177static inline unsigned mic_desc_size(const struct mic_device_desc *desc)
178{
179 return sizeof(*desc) + desc->num_vq * sizeof(struct mic_vqconfig)
180 + desc->feature_len * 2 + desc->config_len;
181}
182
183static inline struct mic_vqconfig *
184mic_vq_config(const struct mic_device_desc *desc)
185{
186 return (struct mic_vqconfig *)(desc + 1);
187}
188
189static inline __u8 *mic_vq_features(const struct mic_device_desc *desc)
190{
191 return (__u8 *)(mic_vq_config(desc) + desc->num_vq);
192}
193
194static inline __u8 *mic_vq_configspace(const struct mic_device_desc *desc)
195{
196 return mic_vq_features(desc) + desc->feature_len * 2;
197}
198static inline unsigned mic_total_desc_size(struct mic_device_desc *desc)
199{
200 return mic_aligned_desc_size(desc) + sizeof(struct mic_device_ctrl);
201}
202#endif
203
204/* Device page size */
205#define MIC_DP_SIZE 4096
206
207#define MIC_MAGIC 0xc0ffee00
208
209/**
210 * enum mic_states - MIC states.
211 */
212enum mic_states {
213 MIC_READY = 0,
214 MIC_BOOTING,
215 MIC_ONLINE,
216 MIC_SHUTTING_DOWN,
217 MIC_RESETTING,
218 MIC_RESET_FAILED,
219 MIC_LAST
220};
221
222/**
223 * enum mic_status - MIC status reported by card after
224 * a host or card initiated shutdown or a card crash.
225 */
226enum mic_status {
227 MIC_NOP = 0,
228 MIC_CRASHED,
229 MIC_HALTED,
230 MIC_POWER_OFF,
231 MIC_RESTART,
232 MIC_STATUS_LAST
233};
234
235#endif
include/uapi/linux/mic_ioctl.h+0−77
@@ -1,77 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * Intel MIC Platform Software Stack (MPSS)
4 *
5 * Copyright(c) 2013 Intel Corporation.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License, version 2, as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * The full GNU General Public License is included in this distribution in
17 * the file called "COPYING".
18 *
19 * Intel MIC Host driver.
20 *
21 */
22#ifndef _MIC_IOCTL_H_
23#define _MIC_IOCTL_H_
24
25#include <linux/types.h>
26
27/*
28 * mic_copy - MIC virtio descriptor copy.
29 *
30 * @iov: An array of IOVEC structures containing user space buffers.
31 * @iovcnt: Number of IOVEC structures in iov.
32 * @vr_idx: The vring index.
33 * @update_used: A non zero value results in used index being updated.
34 * @out_len: The aggregate of the total length written to or read from
35 * the virtio device.
36 */
37struct mic_copy_desc {
38#ifdef __KERNEL__
39 struct iovec __user *iov;
40#else
41 struct iovec *iov;
42#endif
43 __u32 iovcnt;
44 __u8 vr_idx;
45 __u8 update_used;
46 __u32 out_len;
47};
48
49/*
50 * Add a new virtio device
51 * The (struct mic_device_desc *) pointer points to a device page entry
52 * for the virtio device consisting of:
53 * - struct mic_device_desc
54 * - struct mic_vqconfig (num_vq of these)
55 * - host and guest features
56 * - virtio device config space
57 * The total size referenced by the pointer should equal the size returned
58 * by desc_size() in mic_common.h
59 */
60#define MIC_VIRTIO_ADD_DEVICE _IOWR('s', 1, struct mic_device_desc *)
61
62/*
63 * Copy the number of entries in the iovec and update the used index
64 * if requested by the user.
65 */
66#define MIC_VIRTIO_COPY_DESC _IOWR('s', 2, struct mic_copy_desc *)
67
68/*
69 * Notify virtio device of a config change
70 * The (__u8 *) pointer points to config space values for the device
71 * as they should be written into the device page. The total size
72 * referenced by the pointer should equal the config_len field of struct
73 * mic_device_desc.
74 */
75#define MIC_VIRTIO_CONFIG_CHANGE _IOWR('s', 5, __u8 *)
76
77#endif
include/uapi/linux/mman.h+1−0
@@ -27,6 +27,7 @@ · 26 unmodified lines
27#define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT27#define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT
28#define MAP_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK28#define MAP_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK
29 29
30#define MAP_HUGE_16KB HUGETLB_FLAG_ENCODE_16KB
30#define MAP_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB31#define MAP_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB
31#define MAP_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB32#define MAP_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB
32#define MAP_HUGE_1MB HUGETLB_FLAG_ENCODE_1MB33#define MAP_HUGE_1MB HUGETLB_FLAG_ENCODE_1MB
include/uapi/linux/mount.h+1−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
16#define MS_REMOUNT 32 /* Alter flags of a mounted FS */16#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
17#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */17#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
18#define MS_DIRSYNC 128 /* Directory modifications are synchronous */18#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
19#define MS_NOSYMFOLLOW 256 /* Do not follow symlinks */
19#define MS_NOATIME 1024 /* Do not update access times. */20#define MS_NOATIME 1024 /* Do not update access times. */
20#define MS_NODIRATIME 2048 /* Do not update directory access times */21#define MS_NODIRATIME 2048 /* Do not update directory access times */
21#define MS_BIND 409622#define MS_BIND 4096
include/uapi/linux/mroute.h+3−2
@@ -113,8 +113,8 @@ struct igmpmsg { · 112 unmodified lines
113 __u32 unused1,unused2;113 __u32 unused1,unused2;
114 unsigned char im_msgtype; /* What is this */114 unsigned char im_msgtype; /* What is this */
115 unsigned char im_mbz; /* Must be zero */115 unsigned char im_mbz; /* Must be zero */
116 unsigned char im_vif; /* Interface (this ought to be a vifi_t!) */116 unsigned char im_vif; /* Low 8 bits of Interface */
117 unsigned char unused3;117 unsigned char im_vif_hi; /* High 8 bits of Interface */
118 struct in_addr im_src,im_dst;118 struct in_addr im_src,im_dst;
119};119};
120 120
@@ -169,6 +169,7 @@ enum { · 48 unmodified lines
169 IPMRA_CREPORT_SRC_ADDR,169 IPMRA_CREPORT_SRC_ADDR,
170 IPMRA_CREPORT_DST_ADDR,170 IPMRA_CREPORT_DST_ADDR,
171 IPMRA_CREPORT_PKT,171 IPMRA_CREPORT_PKT,
172 IPMRA_CREPORT_TABLE,
172 __IPMRA_CREPORT_MAX173 __IPMRA_CREPORT_MAX
173};174};
174#define IPMRA_CREPORT_MAX (__IPMRA_CREPORT_MAX - 1)175#define IPMRA_CREPORT_MAX (__IPMRA_CREPORT_MAX - 1)
include/uapi/linux/netfilter.h+2−1
@@ -45,7 +45,8 @@ enum nf_inet_hooks { · 44 unmodified lines
45 NF_INET_FORWARD,45 NF_INET_FORWARD,
46 NF_INET_LOCAL_OUT,46 NF_INET_LOCAL_OUT,
47 NF_INET_POST_ROUTING,47 NF_INET_POST_ROUTING,
48 NF_INET_NUMHOOKS48 NF_INET_NUMHOOKS,
49 NF_INET_INGRESS = NF_INET_NUMHOOKS,
49};50};
50 51
51enum nf_dev_hooks {52enum nf_dev_hooks {
include/uapi/linux/netfilter/nf_tables.h+11−1
@@ -133,7 +133,7 @@ enum nf_tables_msg_types { · 132 unmodified lines
133 * @NFTA_LIST_ELEM: list element (NLA_NESTED)133 * @NFTA_LIST_ELEM: list element (NLA_NESTED)
134 */134 */
135enum nft_list_attributes {135enum nft_list_attributes {
136 NFTA_LIST_UNPEC,136 NFTA_LIST_UNSPEC,
137 NFTA_LIST_ELEM,137 NFTA_LIST_ELEM,
138 __NFTA_LIST_MAX138 __NFTA_LIST_MAX
139};139};
@@ -172,6 +172,7 @@ enum nft_table_flags { · 32 unmodified lines
172 * @NFTA_TABLE_NAME: name of the table (NLA_STRING)172 * @NFTA_TABLE_NAME: name of the table (NLA_STRING)
173 * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32)173 * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32)
174 * @NFTA_TABLE_USE: number of chains in this table (NLA_U32)174 * @NFTA_TABLE_USE: number of chains in this table (NLA_U32)
175 * @NFTA_TABLE_USERDATA: user data (NLA_BINARY)
175 */176 */
176enum nft_table_attributes {177enum nft_table_attributes {
177 NFTA_TABLE_UNSPEC,178 NFTA_TABLE_UNSPEC,
@@ -180,6 +181,7 @@ enum nft_table_attributes { · 2 unmodified lines
180 NFTA_TABLE_USE,181 NFTA_TABLE_USE,
181 NFTA_TABLE_HANDLE,182 NFTA_TABLE_HANDLE,
182 NFTA_TABLE_PAD,183 NFTA_TABLE_PAD,
184 NFTA_TABLE_USERDATA,
183 __NFTA_TABLE_MAX185 __NFTA_TABLE_MAX
184};186};
185#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)187#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)
@@ -206,6 +208,7 @@ enum nft_chain_flags { · 20 unmodified lines
206 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)208 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)
207 * @NFTA_CHAIN_FLAGS: chain flags209 * @NFTA_CHAIN_FLAGS: chain flags
208 * @NFTA_CHAIN_ID: uniquely identifies a chain in a transaction (NLA_U32)210 * @NFTA_CHAIN_ID: uniquely identifies a chain in a transaction (NLA_U32)
211 * @NFTA_CHAIN_USERDATA: user data (NLA_BINARY)
209 */212 */
210enum nft_chain_attributes {213enum nft_chain_attributes {
211 NFTA_CHAIN_UNSPEC,214 NFTA_CHAIN_UNSPEC,
@@ -220,6 +223,7 @@ enum nft_chain_attributes { · 8 unmodified lines
220 NFTA_CHAIN_PAD,223 NFTA_CHAIN_PAD,
221 NFTA_CHAIN_FLAGS,224 NFTA_CHAIN_FLAGS,
222 NFTA_CHAIN_ID,225 NFTA_CHAIN_ID,
226 NFTA_CHAIN_USERDATA,
223 __NFTA_CHAIN_MAX227 __NFTA_CHAIN_MAX
224};228};
225#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)229#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)
@@ -745,10 +749,12 @@ enum nft_payload_bases { · 519 unmodified lines
745 *749 *
746 * @NFT_PAYLOAD_CSUM_NONE: no checksumming750 * @NFT_PAYLOAD_CSUM_NONE: no checksumming
747 * @NFT_PAYLOAD_CSUM_INET: internet checksum (RFC 791)751 * @NFT_PAYLOAD_CSUM_INET: internet checksum (RFC 791)
752 * @NFT_PAYLOAD_CSUM_SCTP: CRC-32c, for use in SCTP header (RFC 3309)
748 */753 */
749enum nft_payload_csum_types {754enum nft_payload_csum_types {
750 NFT_PAYLOAD_CSUM_NONE,755 NFT_PAYLOAD_CSUM_NONE,
751 NFT_PAYLOAD_CSUM_INET,756 NFT_PAYLOAD_CSUM_INET,
757 NFT_PAYLOAD_CSUM_SCTP,
752};758};
753 759
754enum nft_payload_csum_flags {760enum nft_payload_csum_flags {
@@ -1008,10 +1014,12 @@ enum nft_socket_attributes { · 253 unmodified lines
1008 *1014 *
1009 * @NFT_SOCKET_TRANSPARENT: Value of the IP(V6)_TRANSPARENT socket option1015 * @NFT_SOCKET_TRANSPARENT: Value of the IP(V6)_TRANSPARENT socket option
1010 * @NFT_SOCKET_MARK: Value of the socket mark1016 * @NFT_SOCKET_MARK: Value of the socket mark
1017 * @NFT_SOCKET_WILDCARD: Whether the socket is zero-bound (e.g. 0.0.0.0 or ::0)
1011 */1018 */
1012enum nft_socket_keys {1019enum nft_socket_keys {
1013 NFT_SOCKET_TRANSPARENT,1020 NFT_SOCKET_TRANSPARENT,
1014 NFT_SOCKET_MARK,1021 NFT_SOCKET_MARK,
1022 NFT_SOCKET_WILDCARD,
1015 __NFT_SOCKET_MAX1023 __NFT_SOCKET_MAX
1016};1024};
1017#define NFT_SOCKET_MAX (__NFT_SOCKET_MAX - 1)1025#define NFT_SOCKET_MAX (__NFT_SOCKET_MAX - 1)
@@ -1555,6 +1563,7 @@ enum nft_ct_expectation_attributes { · 537 unmodified lines
1555 * @NFTA_OBJ_DATA: stateful object data (NLA_NESTED)1563 * @NFTA_OBJ_DATA: stateful object data (NLA_NESTED)
1556 * @NFTA_OBJ_USE: number of references to this expression (NLA_U32)1564 * @NFTA_OBJ_USE: number of references to this expression (NLA_U32)
1557 * @NFTA_OBJ_HANDLE: object handle (NLA_U64)1565 * @NFTA_OBJ_HANDLE: object handle (NLA_U64)
1566 * @NFTA_OBJ_USERDATA: user data (NLA_BINARY)
1558 */1567 */
1559enum nft_object_attributes {1568enum nft_object_attributes {
1560 NFTA_OBJ_UNSPEC,1569 NFTA_OBJ_UNSPEC,
@@ -1565,6 +1574,7 @@ enum nft_object_attributes { · 4 unmodified lines
1565 NFTA_OBJ_USE,1574 NFTA_OBJ_USE,
1566 NFTA_OBJ_HANDLE,1575 NFTA_OBJ_HANDLE,
1567 NFTA_OBJ_PAD,1576 NFTA_OBJ_PAD,
1577 NFTA_OBJ_USERDATA,
1568 __NFTA_OBJ_MAX1578 __NFTA_OBJ_MAX
1569};1579};
1570#define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1)1580#define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1)
include/uapi/linux/netfilter/nfnetlink_conntrack.h+2−1
@@ -247,7 +247,7 @@ enum ctattr_stats_cpu { · 246 unmodified lines
247 CTA_STATS_FOUND,247 CTA_STATS_FOUND,
248 CTA_STATS_NEW, /* no longer used */248 CTA_STATS_NEW, /* no longer used */
249 CTA_STATS_INVALID,249 CTA_STATS_INVALID,
250 CTA_STATS_IGNORE,250 CTA_STATS_IGNORE, /* no longer used */
251 CTA_STATS_DELETE, /* no longer used */251 CTA_STATS_DELETE, /* no longer used */
252 CTA_STATS_DELETE_LIST, /* no longer used */252 CTA_STATS_DELETE_LIST, /* no longer used */
253 CTA_STATS_INSERT,253 CTA_STATS_INSERT,
@@ -256,6 +256,7 @@ enum ctattr_stats_cpu { · 2 unmodified lines
256 CTA_STATS_EARLY_DROP,256 CTA_STATS_EARLY_DROP,
257 CTA_STATS_ERROR,257 CTA_STATS_ERROR,
258 CTA_STATS_SEARCH_RESTART,258 CTA_STATS_SEARCH_RESTART,
259 CTA_STATS_CLASH_RESOLVE,
259 __CTA_STATS_MAX,260 __CTA_STATS_MAX,
260};261};
261#define CTA_STATS_MAX (__CTA_STATS_MAX - 1)262#define CTA_STATS_MAX (__CTA_STATS_MAX - 1)
include/uapi/linux/netlink.h+4−0
@@ -129,6 +129,7 @@ struct nlmsgerr { · 128 unmodified lines
129 * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to129 * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to
130 * be used - in the success case - to identify a created130 * be used - in the success case - to identify a created
131 * object or operation or similar (binary)131 * object or operation or similar (binary)
132 * @NLMSGERR_ATTR_POLICY: policy for a rejected attribute
132 * @__NLMSGERR_ATTR_MAX: number of attributes133 * @__NLMSGERR_ATTR_MAX: number of attributes
133 * @NLMSGERR_ATTR_MAX: highest attribute number134 * @NLMSGERR_ATTR_MAX: highest attribute number
134 */135 */
@@ -137,6 +138,7 @@ enum nlmsgerr_attrs { · 2 unmodified lines
137 NLMSGERR_ATTR_MSG,138 NLMSGERR_ATTR_MSG,
138 NLMSGERR_ATTR_OFFS,139 NLMSGERR_ATTR_OFFS,
139 NLMSGERR_ATTR_COOKIE,140 NLMSGERR_ATTR_COOKIE,
141 NLMSGERR_ATTR_POLICY,
140 142
141 __NLMSGERR_ATTR_MAX,143 __NLMSGERR_ATTR_MAX,
142 NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1144 NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1
@@ -331,6 +333,7 @@ enum netlink_attribute_type { · 188 unmodified lines
331 * the index, if limited inside the nesting (U32)333 * the index, if limited inside the nesting (U32)
332 * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the334 * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the
333 * bitfield32 type (U32)335 * bitfield32 type (U32)
336 * @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64)
334 * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment337 * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment
335 */338 */
336enum netlink_policy_type_attr {339enum netlink_policy_type_attr {
@@ -346,6 +349,7 @@ enum netlink_policy_type_attr { · 9 unmodified lines
346 NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE,349 NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE,
347 NL_POLICY_TYPE_ATTR_BITFIELD32_MASK,350 NL_POLICY_TYPE_ATTR_BITFIELD32_MASK,
348 NL_POLICY_TYPE_ATTR_PAD,351 NL_POLICY_TYPE_ATTR_PAD,
352 NL_POLICY_TYPE_ATTR_MASK,
349 353
350 /* keep last */354 /* keep last */
351 __NL_POLICY_TYPE_ATTR_MAX,355 __NL_POLICY_TYPE_ATTR_MAX,
include/uapi/linux/nfs4.h+3−0
@@ -139,6 +139,8 @@ · 138 unmodified lines
139 139
140#define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000140#define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000
141#define EXCHGID4_FLAG_CONFIRMED_R 0x80000000141#define EXCHGID4_FLAG_CONFIRMED_R 0x80000000
142
143#define EXCHGID4_FLAG_SUPP_FENCE_OPS 0x00000004
142/*144/*
143 * Since the validity of these bits depends on whether145 * Since the validity of these bits depends on whether
144 * they're set in the argument or response, have separate146 * they're set in the argument or response, have separate
@@ -146,6 +148,7 @@ · 1 unmodified line
146 */148 */
147#define EXCHGID4_FLAG_MASK_A 0x40070103149#define EXCHGID4_FLAG_MASK_A 0x40070103
148#define EXCHGID4_FLAG_MASK_R 0x80070103150#define EXCHGID4_FLAG_MASK_R 0x80070103
151#define EXCHGID4_2_FLAG_MASK_R 0x80070107
149 152
150#define SEQ4_STATUS_CB_PATH_DOWN 0x00000001153#define SEQ4_STATUS_CB_PATH_DOWN 0x00000001
151#define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002154#define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002
include/uapi/linux/nfsacl.h+2−0
@@ -9,11 +9,13 @@ · 8 unmodified lines
9 9
10#define NFS_ACL_PROGRAM 10022710#define NFS_ACL_PROGRAM 100227
11 11
12#define ACLPROC2_NULL 0
12#define ACLPROC2_GETACL 113#define ACLPROC2_GETACL 1
13#define ACLPROC2_SETACL 214#define ACLPROC2_SETACL 2
14#define ACLPROC2_GETATTR 315#define ACLPROC2_GETATTR 3
15#define ACLPROC2_ACCESS 416#define ACLPROC2_ACCESS 4
16 17
18#define ACLPROC3_NULL 0
17#define ACLPROC3_GETACL 119#define ACLPROC3_GETACL 1
18#define ACLPROC3_SETACL 220#define ACLPROC3_SETACL 2
19 21
include/uapi/linux/nitro_enclaves.h+359−0
@@ -0,0 +1,359 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 */
5
6#ifndef _UAPI_LINUX_NITRO_ENCLAVES_H_
7#define _UAPI_LINUX_NITRO_ENCLAVES_H_
8
9#include <linux/types.h>
10
11/**
12 * DOC: Nitro Enclaves (NE) Kernel Driver Interface
13 */
14
15/**
16 * NE_CREATE_VM - The command is used to create a slot that is associated with
17 * an enclave VM.
18 * The generated unique slot id is an output parameter.
19 * The ioctl can be invoked on the /dev/nitro_enclaves fd, before
20 * setting any resources, such as memory and vCPUs, for an
21 * enclave. Memory and vCPUs are set for the slot mapped to an enclave.
22 * A NE CPU pool has to be set before calling this function. The
23 * pool can be set after the NE driver load, using
24 * /sys/module/nitro_enclaves/parameters/ne_cpus.
25 * Its format is the detailed in the cpu-lists section:
26 * https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
27 * CPU 0 and its siblings have to remain available for the
28 * primary / parent VM, so they cannot be set for enclaves. Full
29 * CPU core(s), from the same NUMA node, need(s) to be included
30 * in the CPU pool.
31 *
32 * Context: Process context.
33 * Return:
34 * * Enclave file descriptor - Enclave file descriptor used with
35 * ioctl calls to set vCPUs and memory
36 * regions, then start the enclave.
37 * * -1 - There was a failure in the ioctl logic.
38 * On failure, errno is set to:
39 * * EFAULT - copy_to_user() failure.
40 * * ENOMEM - Memory allocation failure for internal
41 * bookkeeping variables.
42 * * NE_ERR_NO_CPUS_AVAIL_IN_POOL - No NE CPU pool set / no CPUs available
43 * in the pool.
44 * * Error codes from get_unused_fd_flags() and anon_inode_getfile().
45 * * Error codes from the NE PCI device request.
46 */
47#define NE_CREATE_VM _IOR(0xAE, 0x20, __u64)
48
49/**
50 * NE_ADD_VCPU - The command is used to set a vCPU for an enclave. The vCPU can
51 * be auto-chosen from the NE CPU pool or it can be set by the
52 * caller, with the note that it needs to be available in the NE
53 * CPU pool. Full CPU core(s), from the same NUMA node, need(s) to
54 * be associated with an enclave.
55 * The vCPU id is an input / output parameter. If its value is 0,
56 * then a CPU is chosen from the enclave CPU pool and returned via
57 * this parameter.
58 * The ioctl can be invoked on the enclave fd, before an enclave
59 * is started.
60 *
61 * Context: Process context.
62 * Return:
63 * * 0 - Logic succesfully completed.
64 * * -1 - There was a failure in the ioctl logic.
65 * On failure, errno is set to:
66 * * EFAULT - copy_from_user() / copy_to_user() failure.
67 * * ENOMEM - Memory allocation failure for internal
68 * bookkeeping variables.
69 * * EIO - Current task mm is not the same as the one
70 * that created the enclave.
71 * * NE_ERR_NO_CPUS_AVAIL_IN_POOL - No CPUs available in the NE CPU pool.
72 * * NE_ERR_VCPU_ALREADY_USED - The provided vCPU is already used.
73 * * NE_ERR_VCPU_NOT_IN_CPU_POOL - The provided vCPU is not available in the
74 * NE CPU pool.
75 * * NE_ERR_VCPU_INVALID_CPU_CORE - The core id of the provided vCPU is invalid
76 * or out of range.
77 * * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state
78 * (init = before being started).
79 * * NE_ERR_INVALID_VCPU - The provided vCPU is not in the available
80 * CPUs range.
81 * * Error codes from the NE PCI device request.
82 */
83#define NE_ADD_VCPU _IOWR(0xAE, 0x21, __u32)
84
85/**
86 * NE_GET_IMAGE_LOAD_INFO - The command is used to get information needed for
87 * in-memory enclave image loading e.g. offset in
88 * enclave memory to start placing the enclave image.
89 * The image load info is an input / output parameter.
90 * It includes info provided by the caller - flags -
91 * and returns the offset in enclave memory where to
92 * start placing the enclave image.
93 * The ioctl can be invoked on the enclave fd, before
94 * an enclave is started.
95 *
96 * Context: Process context.
97 * Return:
98 * * 0 - Logic succesfully completed.
99 * * -1 - There was a failure in the ioctl logic.
100 * On failure, errno is set to:
101 * * EFAULT - copy_from_user() / copy_to_user() failure.
102 * * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state (init =
103 * before being started).
104 * * NE_ERR_INVALID_FLAG_VALUE - The value of the provided flag is invalid.
105 */
106#define NE_GET_IMAGE_LOAD_INFO _IOWR(0xAE, 0x22, struct ne_image_load_info)
107
108/**
109 * NE_SET_USER_MEMORY_REGION - The command is used to set a memory region for an
110 * enclave, given the allocated memory from the
111 * userspace. Enclave memory needs to be from the
112 * same NUMA node as the enclave CPUs.
113 * The user memory region is an input parameter. It
114 * includes info provided by the caller - flags,
115 * memory size and userspace address.
116 * The ioctl can be invoked on the enclave fd,
117 * before an enclave is started.
118 *
119 * Context: Process context.
120 * Return:
121 * * 0 - Logic succesfully completed.
122 * * -1 - There was a failure in the ioctl logic.
123 * On failure, errno is set to:
124 * * EFAULT - copy_from_user() failure.
125 * * EINVAL - Invalid physical memory region(s) e.g.
126 * unaligned address.
127 * * EIO - Current task mm is not the same as
128 * the one that created the enclave.
129 * * ENOMEM - Memory allocation failure for internal
130 * bookkeeping variables.
131 * * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state
132 * (init = before being started).
133 * * NE_ERR_INVALID_MEM_REGION_SIZE - The memory size of the region is not
134 * multiple of 2 MiB.
135 * * NE_ERR_INVALID_MEM_REGION_ADDR - Invalid user space address given.
136 * * NE_ERR_UNALIGNED_MEM_REGION_ADDR - Unaligned user space address given.
137 * * NE_ERR_MEM_REGION_ALREADY_USED - The memory region is already used.
138 * * NE_ERR_MEM_NOT_HUGE_PAGE - The memory region is not backed by
139 * huge pages.
140 * * NE_ERR_MEM_DIFFERENT_NUMA_NODE - The memory region is not from the same
141 * NUMA node as the CPUs.
142 * * NE_ERR_MEM_MAX_REGIONS - The number of memory regions set for
143 * the enclave reached maximum.
144 * * NE_ERR_INVALID_PAGE_SIZE - The memory region is not backed by
145 * pages multiple of 2 MiB.
146 * * NE_ERR_INVALID_FLAG_VALUE - The value of the provided flag is invalid.
147 * * Error codes from get_user_pages().
148 * * Error codes from the NE PCI device request.
149 */
150#define NE_SET_USER_MEMORY_REGION _IOW(0xAE, 0x23, struct ne_user_memory_region)
151
152/**
153 * NE_START_ENCLAVE - The command is used to trigger enclave start after the
154 * enclave resources, such as memory and CPU, have been set.
155 * The enclave start info is an input / output parameter. It
156 * includes info provided by the caller - enclave cid and
157 * flags - and returns the cid (if input cid is 0).
158 * The ioctl can be invoked on the enclave fd, after an
159 * enclave slot is created and resources, such as memory and
160 * vCPUs are set for an enclave.
161 *
162 * Context: Process context.
163 * Return:
164 * * 0 - Logic succesfully completed.
165 * * -1 - There was a failure in the ioctl logic.
166 * On failure, errno is set to:
167 * * EFAULT - copy_from_user() / copy_to_user() failure.
168 * * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state
169 * (init = before being started).
170 * * NE_ERR_NO_MEM_REGIONS_ADDED - No memory regions are set.
171 * * NE_ERR_NO_VCPUS_ADDED - No vCPUs are set.
172 * * NE_ERR_FULL_CORES_NOT_USED - Full core(s) not set for the enclave.
173 * * NE_ERR_ENCLAVE_MEM_MIN_SIZE - Enclave memory is less than minimum
174 * memory size (64 MiB).
175 * * NE_ERR_INVALID_FLAG_VALUE - The value of the provided flag is invalid.
176 * * NE_ERR_INVALID_ENCLAVE_CID - The provided enclave CID is invalid.
177 * * Error codes from the NE PCI device request.
178 */
179#define NE_START_ENCLAVE _IOWR(0xAE, 0x24, struct ne_enclave_start_info)
180
181/**
182 * DOC: NE specific error codes
183 */
184
185/**
186 * NE_ERR_VCPU_ALREADY_USED - The provided vCPU is already used.
187 */
188#define NE_ERR_VCPU_ALREADY_USED (256)
189/**
190 * NE_ERR_VCPU_NOT_IN_CPU_POOL - The provided vCPU is not available in the
191 * NE CPU pool.
192 */
193#define NE_ERR_VCPU_NOT_IN_CPU_POOL (257)
194/**
195 * NE_ERR_VCPU_INVALID_CPU_CORE - The core id of the provided vCPU is invalid
196 * or out of range of the NE CPU pool.
197 */
198#define NE_ERR_VCPU_INVALID_CPU_CORE (258)
199/**
200 * NE_ERR_INVALID_MEM_REGION_SIZE - The user space memory region size is not
201 * multiple of 2 MiB.
202 */
203#define NE_ERR_INVALID_MEM_REGION_SIZE (259)
204/**
205 * NE_ERR_INVALID_MEM_REGION_ADDR - The user space memory region address range
206 * is invalid.
207 */
208#define NE_ERR_INVALID_MEM_REGION_ADDR (260)
209/**
210 * NE_ERR_UNALIGNED_MEM_REGION_ADDR - The user space memory region address is
211 * not aligned.
212 */
213#define NE_ERR_UNALIGNED_MEM_REGION_ADDR (261)
214/**
215 * NE_ERR_MEM_REGION_ALREADY_USED - The user space memory region is already used.
216 */
217#define NE_ERR_MEM_REGION_ALREADY_USED (262)
218/**
219 * NE_ERR_MEM_NOT_HUGE_PAGE - The user space memory region is not backed by
220 * contiguous physical huge page(s).
221 */
222#define NE_ERR_MEM_NOT_HUGE_PAGE (263)
223/**
224 * NE_ERR_MEM_DIFFERENT_NUMA_NODE - The user space memory region is backed by
225 * pages from different NUMA nodes than the CPUs.
226 */
227#define NE_ERR_MEM_DIFFERENT_NUMA_NODE (264)
228/**
229 * NE_ERR_MEM_MAX_REGIONS - The supported max memory regions per enclaves has
230 * been reached.
231 */
232#define NE_ERR_MEM_MAX_REGIONS (265)
233/**
234 * NE_ERR_NO_MEM_REGIONS_ADDED - The command to start an enclave is triggered
235 * and no memory regions are added.
236 */
237#define NE_ERR_NO_MEM_REGIONS_ADDED (266)
238/**
239 * NE_ERR_NO_VCPUS_ADDED - The command to start an enclave is triggered and no
240 * vCPUs are added.
241 */
242#define NE_ERR_NO_VCPUS_ADDED (267)
243/**
244 * NE_ERR_ENCLAVE_MEM_MIN_SIZE - The enclave memory size is lower than the
245 * minimum supported.
246 */
247#define NE_ERR_ENCLAVE_MEM_MIN_SIZE (268)
248/**
249 * NE_ERR_FULL_CORES_NOT_USED - The command to start an enclave is triggered and
250 * full CPU cores are not set.
251 */
252#define NE_ERR_FULL_CORES_NOT_USED (269)
253/**
254 * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state when setting
255 * resources or triggering start.
256 */
257#define NE_ERR_NOT_IN_INIT_STATE (270)
258/**
259 * NE_ERR_INVALID_VCPU - The provided vCPU is out of range of the available CPUs.
260 */
261#define NE_ERR_INVALID_VCPU (271)
262/**
263 * NE_ERR_NO_CPUS_AVAIL_IN_POOL - The command to create an enclave is triggered
264 * and no CPUs are available in the pool.
265 */
266#define NE_ERR_NO_CPUS_AVAIL_IN_POOL (272)
267/**
268 * NE_ERR_INVALID_PAGE_SIZE - The user space memory region is not backed by pages
269 * multiple of 2 MiB.
270 */
271#define NE_ERR_INVALID_PAGE_SIZE (273)
272/**
273 * NE_ERR_INVALID_FLAG_VALUE - The provided flag value is invalid.
274 */
275#define NE_ERR_INVALID_FLAG_VALUE (274)
276/**
277 * NE_ERR_INVALID_ENCLAVE_CID - The provided enclave CID is invalid, either
278 * being a well-known value or the CID of the
279 * parent / primary VM.
280 */
281#define NE_ERR_INVALID_ENCLAVE_CID (275)
282
283/**
284 * DOC: Image load info flags
285 */
286
287/**
288 * NE_EIF_IMAGE - Enclave Image Format (EIF)
289 */
290#define NE_EIF_IMAGE (0x01)
291
292#define NE_IMAGE_LOAD_MAX_FLAG_VAL (0x02)
293
294/**
295 * struct ne_image_load_info - Info necessary for in-memory enclave image
296 * loading (in / out).
297 * @flags: Flags to determine the enclave image type
298 * (e.g. Enclave Image Format - EIF) (in).
299 * @memory_offset: Offset in enclave memory where to start placing the
300 * enclave image (out).
301 */
302struct ne_image_load_info {
303 __u64 flags;
304 __u64 memory_offset;
305};
306
307/**
308 * DOC: User memory region flags
309 */
310
311/**
312 * NE_DEFAULT_MEMORY_REGION - Memory region for enclave general usage.
313 */
314#define NE_DEFAULT_MEMORY_REGION (0x00)
315
316#define NE_MEMORY_REGION_MAX_FLAG_VAL (0x01)
317
318/**
319 * struct ne_user_memory_region - Memory region to be set for an enclave (in).
320 * @flags: Flags to determine the usage for the memory region (in).
321 * @memory_size: The size, in bytes, of the memory region to be set for
322 * an enclave (in).
323 * @userspace_addr: The start address of the userspace allocated memory of
324 * the memory region to set for an enclave (in).
325 */
326struct ne_user_memory_region {
327 __u64 flags;
328 __u64 memory_size;
329 __u64 userspace_addr;
330};
331
332/**
333 * DOC: Enclave start info flags
334 */
335
336/**
337 * NE_ENCLAVE_PRODUCTION_MODE - Start enclave in production mode.
338 */
339#define NE_ENCLAVE_PRODUCTION_MODE (0x00)
340/**
341 * NE_ENCLAVE_DEBUG_MODE - Start enclave in debug mode.
342 */
343#define NE_ENCLAVE_DEBUG_MODE (0x01)
344
345#define NE_ENCLAVE_START_MAX_FLAG_VAL (0x02)
346
347/**
348 * struct ne_enclave_start_info - Setup info necessary for enclave start (in / out).
349 * @flags: Flags for the enclave to start with (e.g. debug mode) (in).
350 * @enclave_cid: Context ID (CID) for the enclave vsock device. If 0 as
351 * input, the CID is autogenerated by the hypervisor and
352 * returned back as output by the driver (in / out).
353 */
354struct ne_enclave_start_info {
355 __u64 flags;
356 __u64 enclave_cid;
357};
358
359#endif /* _UAPI_LINUX_NITRO_ENCLAVES_H_ */
include/uapi/linux/nl80211.h+174−22
@@ -252,9 +252,13 @@ · 251 unmodified lines
252 * DOC: SAE authentication offload252 * DOC: SAE authentication offload
253 *253 *
254 * By setting @NL80211_EXT_FEATURE_SAE_OFFLOAD flag drivers can indicate they254 * By setting @NL80211_EXT_FEATURE_SAE_OFFLOAD flag drivers can indicate they
255 * support offloading SAE authentication for WPA3-Personal networks. In255 * support offloading SAE authentication for WPA3-Personal networks in station
256 * %NL80211_CMD_CONNECT the password for SAE should be specified using256 * mode. Similarly @NL80211_EXT_FEATURE_SAE_OFFLOAD_AP flag can be set by
257 * %NL80211_ATTR_SAE_PASSWORD.257 * drivers indicating the offload support in AP mode.
258 *
259 * The password for SAE should be specified using %NL80211_ATTR_SAE_PASSWORD in
260 * %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP for station and AP mode
261 * respectively.
258 */262 */
259 263
260/**264/**
@@ -647,13 +651,9 @@ · 386 unmodified lines
647 * authentication/association or not receiving a response from the AP.651 * authentication/association or not receiving a response from the AP.
648 * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as652 * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as
649 * well to remain backwards compatible.653 * well to remain backwards compatible.
650 * When establishing a security association, drivers that support 4 way
651 * handshake offload should send %NL80211_CMD_PORT_AUTHORIZED event when
652 * the 4 way handshake is completed successfully.
653 * @NL80211_CMD_ROAM: Notification indicating the card/driver roamed by itself.654 * @NL80211_CMD_ROAM: Notification indicating the card/driver roamed by itself.
654 * When a security association was established with the new AP (e.g. if655 * When a security association was established on an 802.1X network using
655 * the FT protocol was used for roaming or the driver completed the 4 way656 * fast transition, this event should be followed by an
656 * handshake), this event should be followed by an
657 * %NL80211_CMD_PORT_AUTHORIZED event.657 * %NL80211_CMD_PORT_AUTHORIZED event.
658 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify658 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
659 * userspace that a connection was dropped by the AP or due to other659 * userspace that a connection was dropped by the AP or due to other
@@ -1067,13 +1067,11 @@ · 407 unmodified lines
1067 * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously1067 * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
1068 * configured PMK for the authenticator address identified by1068 * configured PMK for the authenticator address identified by
1069 * %NL80211_ATTR_MAC.1069 * %NL80211_ATTR_MAC.
1070 * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way1070 * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates an 802.1X FT roam was
1071 * handshake was completed successfully by the driver. The BSSID is1071 * completed successfully. Drivers that support 4 way handshake offload
1072 * specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake1072 * should send this event after indicating 802.1X FT assocation with
1073 * offload should send this event after indicating 802.11 association with1073 * %NL80211_CMD_ROAM. If the 4 way handshake failed %NL80211_CMD_DISCONNECT
1074 * %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed1074 * should be indicated instead.
1075 * %NL80211_CMD_DISCONNECT should be indicated instead.
1076 *
1077 * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request1075 * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request
1078 * and RX notification. This command is used both as a request to transmit1076 * and RX notification. This command is used both as a request to transmit
1079 * a control port frame and as a notification that a control port frame1077 * a control port frame and as a notification that a control port frame
@@ -2082,10 +2080,10 @@ enum nl80211_commands { · 1002 unmodified lines
2082 * operation).2080 * operation).
2083 * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information2081 * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
2084 * for the time while performing a channel switch.2082 * for the time while performing a channel switch.
2085 * @NL80211_ATTR_CSA_C_OFF_BEACON: An array of offsets (u16) to the channel2083 * @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
2086 * switch counters in the beacons tail (%NL80211_ATTR_BEACON_TAIL).2084 * switch or color change counters in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
2087 * @NL80211_ATTR_CSA_C_OFF_PRESP: An array of offsets (u16) to the channel2085 * @NL80211_ATTR_CNTDWN_OFFS_PRESP: An array of offsets (u16) to the channel
2088 * switch counters in the probe response (%NL80211_ATTR_PROBE_RESP).2086 * switch or color change counters in the probe response (%NL80211_ATTR_PROBE_RESP).
2089 *2087 *
2090 * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32.2088 * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32.
2091 * As specified in the &enum nl80211_rxmgmt_flags.2089 * As specified in the &enum nl80211_rxmgmt_flags.
@@ -2515,6 +2513,20 @@ enum nl80211_commands { · 423 unmodified lines
2515 * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from2513 * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from
2516 * association request when used with NL80211_CMD_NEW_STATION).2514 * association request when used with NL80211_CMD_NEW_STATION).
2517 *2515 *
2516 * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS
2517 * discovery. It is a nested attribute, see
2518 * &enum nl80211_fils_discovery_attributes.
2519 *
2520 * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure
2521 * unsolicited broadcast probe response. It is a nested attribute, see
2522 * &enum nl80211_unsol_bcast_probe_resp_attributes.
2523 *
2524 * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from
2525 * association request when used with NL80211_CMD_NEW_STATION)
2526 * @NL80211_ATTR_S1G_CAPABILITY_MASK: S1G Capability Information element
2527 * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
2528 * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
2529 *
2518 * @NUM_NL80211_ATTR: total number of nl80211_attrs available2530 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
2519 * @NL80211_ATTR_MAX: highest attribute number currently defined2531 * @NL80211_ATTR_MAX: highest attribute number currently defined
2520 * @__NL80211_ATTR_AFTER_LAST: internal use2532 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2821,8 +2833,8 @@ enum nl80211_attrs { · 300 unmodified lines
2821 NL80211_ATTR_CH_SWITCH_COUNT,2833 NL80211_ATTR_CH_SWITCH_COUNT,
2822 NL80211_ATTR_CH_SWITCH_BLOCK_TX,2834 NL80211_ATTR_CH_SWITCH_BLOCK_TX,
2823 NL80211_ATTR_CSA_IES,2835 NL80211_ATTR_CSA_IES,
2824 NL80211_ATTR_CSA_C_OFF_BEACON,2836 NL80211_ATTR_CNTDWN_OFFS_BEACON,
2825 NL80211_ATTR_CSA_C_OFF_PRESP,2837 NL80211_ATTR_CNTDWN_OFFS_PRESP,
2826 2838
2827 NL80211_ATTR_RXMGMT_FLAGS,2839 NL80211_ATTR_RXMGMT_FLAGS,
2828 2840
@@ -2997,6 +3009,13 @@ enum nl80211_attrs { · 168 unmodified lines
2997 3009
2998 NL80211_ATTR_HE_6GHZ_CAPABILITY,3010 NL80211_ATTR_HE_6GHZ_CAPABILITY,
2999 3011
3012 NL80211_ATTR_FILS_DISCOVERY,
3013
3014 NL80211_ATTR_UNSOL_BCAST_PROBE_RESP,
3015
3016 NL80211_ATTR_S1G_CAPABILITY,
3017 NL80211_ATTR_S1G_CAPABILITY_MASK,
3018
3000 /* add attributes here, update the policy in nl80211.c */3019 /* add attributes here, update the policy in nl80211.c */
3001 3020
3002 __NL80211_ATTR_AFTER_LAST,3021 __NL80211_ATTR_AFTER_LAST,
@@ -3009,6 +3028,8 @@ enum nl80211_attrs { · 6 unmodified lines
3009#define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG3028#define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
3010#define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER3029#define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
3011#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA3030#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
3031#define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON
3032#define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP
3012 3033
3013/*3034/*
3014 * Allow user space programs to use #ifdef on new attributes by defining them3035 * Allow user space programs to use #ifdef on new attributes by defining them
@@ -3186,6 +3207,18 @@ enum nl80211_he_gi { · 171 unmodified lines
3186 NL80211_RATE_INFO_HE_GI_3_2,3207 NL80211_RATE_INFO_HE_GI_3_2,
3187};3208};
3188 3209
3210/**
3211 * enum nl80211_he_ltf - HE long training field
3212 * @NL80211_RATE_INFO_HE_1xLTF: 3.2 usec
3213 * @NL80211_RATE_INFO_HE_2xLTF: 6.4 usec
3214 * @NL80211_RATE_INFO_HE_4xLTF: 12.8 usec
3215 */
3216enum nl80211_he_ltf {
3217 NL80211_RATE_INFO_HE_1XLTF,
3218 NL80211_RATE_INFO_HE_2XLTF,
3219 NL80211_RATE_INFO_HE_4XLTF,
3220};
3221
3189/**3222/**
3190 * enum nl80211_he_ru_alloc - HE RU allocation values3223 * enum nl80211_he_ru_alloc - HE RU allocation values
3191 * @NL80211_RATE_INFO_HE_RU_ALLOC_26: 26-tone RU allocation3224 * @NL80211_RATE_INFO_HE_RU_ALLOC_26: 26-tone RU allocation
@@ -3725,6 +3758,16 @@ enum nl80211_wmm_rule { · 533 unmodified lines
3725 * @NL80211_FREQUENCY_ATTR_NO_HE: HE operation is not allowed on this channel3758 * @NL80211_FREQUENCY_ATTR_NO_HE: HE operation is not allowed on this channel
3726 * in current regulatory domain.3759 * in current regulatory domain.
3727 * @NL80211_FREQUENCY_ATTR_OFFSET: frequency offset in KHz3760 * @NL80211_FREQUENCY_ATTR_OFFSET: frequency offset in KHz
3761 * @NL80211_FREQUENCY_ATTR_1MHZ: 1 MHz operation is allowed
3762 * on this channel in current regulatory domain.
3763 * @NL80211_FREQUENCY_ATTR_2MHZ: 2 MHz operation is allowed
3764 * on this channel in current regulatory domain.
3765 * @NL80211_FREQUENCY_ATTR_4MHZ: 4 MHz operation is allowed
3766 * on this channel in current regulatory domain.
3767 * @NL80211_FREQUENCY_ATTR_8MHZ: 8 MHz operation is allowed
3768 * on this channel in current regulatory domain.
3769 * @NL80211_FREQUENCY_ATTR_16MHZ: 16 MHz operation is allowed
3770 * on this channel in current regulatory domain.
3728 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number3771 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
3729 * currently defined3772 * currently defined
3730 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use3773 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -3756,6 +3799,11 @@ enum nl80211_frequency_attr { · 25 unmodified lines
3756 NL80211_FREQUENCY_ATTR_WMM,3799 NL80211_FREQUENCY_ATTR_WMM,
3757 NL80211_FREQUENCY_ATTR_NO_HE,3800 NL80211_FREQUENCY_ATTR_NO_HE,
3758 NL80211_FREQUENCY_ATTR_OFFSET,3801 NL80211_FREQUENCY_ATTR_OFFSET,
3802 NL80211_FREQUENCY_ATTR_1MHZ,
3803 NL80211_FREQUENCY_ATTR_2MHZ,
3804 NL80211_FREQUENCY_ATTR_4MHZ,
3805 NL80211_FREQUENCY_ATTR_8MHZ,
3806 NL80211_FREQUENCY_ATTR_16MHZ,
3759 3807
3760 /* keep last */3808 /* keep last */
3761 __NL80211_FREQUENCY_ATTR_AFTER_LAST,3809 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -4049,6 +4097,7 @@ enum nl80211_user_reg_hint_type { · 287 unmodified lines
4049 * receiving frames destined to the local BSS4097 * receiving frames destined to the local BSS
4050 * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number4098 * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
4051 * currently defined4099 * currently defined
4100 * @NL80211_SURVEY_INFO_FREQUENCY_OFFSET: center frequency offset in KHz
4052 * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use4101 * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
4053 */4102 */
4054enum nl80211_survey_info {4103enum nl80211_survey_info {
@@ -4064,6 +4113,7 @@ enum nl80211_survey_info { · 9 unmodified lines
4064 NL80211_SURVEY_INFO_TIME_SCAN,4113 NL80211_SURVEY_INFO_TIME_SCAN,
4065 NL80211_SURVEY_INFO_PAD,4114 NL80211_SURVEY_INFO_PAD,
4066 NL80211_SURVEY_INFO_TIME_BSS_RX,4115 NL80211_SURVEY_INFO_TIME_BSS_RX,
4116 NL80211_SURVEY_INFO_FREQUENCY_OFFSET,
4067 4117
4068 /* keep last */4118 /* keep last */
4069 __NL80211_SURVEY_INFO_AFTER_LAST,4119 __NL80211_SURVEY_INFO_AFTER_LAST,
@@ -4741,6 +4791,10 @@ enum nl80211_key_attributes { · 671 unmodified lines
4741 * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection,4791 * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection,
4742 * see &struct nl80211_txrate_vht4792 * see &struct nl80211_txrate_vht
4743 * @NL80211_TXRATE_GI: configure GI, see &enum nl80211_txrate_gi4793 * @NL80211_TXRATE_GI: configure GI, see &enum nl80211_txrate_gi
4794 * @NL80211_TXRATE_HE: HE rates allowed for TX rate selection,
4795 * see &struct nl80211_txrate_he
4796 * @NL80211_TXRATE_HE_GI: configure HE GI, 0.8us, 1.6us and 3.2us.
4797 * @NL80211_TXRATE_HE_LTF: configure HE LTF, 1XLTF, 2XLTF and 4XLTF.
4744 * @__NL80211_TXRATE_AFTER_LAST: internal4798 * @__NL80211_TXRATE_AFTER_LAST: internal
4745 * @NL80211_TXRATE_MAX: highest TX rate attribute4799 * @NL80211_TXRATE_MAX: highest TX rate attribute
4746 */4800 */
@@ -4750,6 +4804,9 @@ enum nl80211_tx_rate_attributes { · 3 unmodified lines
4750 NL80211_TXRATE_HT,4804 NL80211_TXRATE_HT,
4751 NL80211_TXRATE_VHT,4805 NL80211_TXRATE_VHT,
4752 NL80211_TXRATE_GI,4806 NL80211_TXRATE_GI,
4807 NL80211_TXRATE_HE,
4808 NL80211_TXRATE_HE_GI,
4809 NL80211_TXRATE_HE_LTF,
4753 4810
4754 /* keep last */4811 /* keep last */
4755 __NL80211_TXRATE_AFTER_LAST,4812 __NL80211_TXRATE_AFTER_LAST,
@@ -4767,6 +4824,15 @@ struct nl80211_txrate_vht { · 11 unmodified lines
4767 __u16 mcs[NL80211_VHT_NSS_MAX];4824 __u16 mcs[NL80211_VHT_NSS_MAX];
4768};4825};
4769 4826
4827#define NL80211_HE_NSS_MAX 8
4828/**
4829 * struct nl80211_txrate_he - HE MCS/NSS txrate bitmap
4830 * @mcs: MCS bitmap table for each NSS (array index 0 for 1 stream, etc.)
4831 */
4832struct nl80211_txrate_he {
4833 __u16 mcs[NL80211_HE_NSS_MAX];
4834};
4835
4770enum nl80211_txrate_gi {4836enum nl80211_txrate_gi {
4771 NL80211_TXRATE_DEFAULT_GI,4837 NL80211_TXRATE_DEFAULT_GI,
4772 NL80211_TXRATE_FORCE_SGI,4838 NL80211_TXRATE_FORCE_SGI,
@@ -5821,6 +5887,15 @@ enum nl80211_feature_flags { · 1048 unmodified lines
5821 * handshake with PSK in AP mode (PSK is passed as part of the start AP5887 * handshake with PSK in AP mode (PSK is passed as part of the start AP
5822 * command).5888 * command).
5823 *5889 *
5890 * @NL80211_EXT_FEATURE_SAE_OFFLOAD_AP: Device wants to do SAE authentication
5891 * in AP mode (SAE password is passed as part of the start AP command).
5892 *
5893 * @NL80211_EXT_FEATURE_FILS_DISCOVERY: Driver/device supports FILS discovery
5894 * frames transmission
5895 *
5896 * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports
5897 * unsolicited broadcast probe response transmission
5898 *
5824 * @NUM_NL80211_EXT_FEATURES: number of extended features.5899 * @NUM_NL80211_EXT_FEATURES: number of extended features.
5825 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.5900 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
5826 */5901 */
@@ -5878,6 +5953,9 @@ enum nl80211_ext_feature_index { · 51 unmodified lines
5878 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,5953 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,
5879 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION,5954 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION,
5880 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK,5955 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK,
5956 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP,
5957 NL80211_EXT_FEATURE_FILS_DISCOVERY,
5958 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
5881 5959
5882 /* add new features before the definition below */5960 /* add new features before the definition below */
5883 NUM_NL80211_EXT_FEATURES,5961 NUM_NL80211_EXT_FEATURES,
@@ -5992,6 +6070,8 @@ enum nl80211_timeout_reason { · 108 unmodified lines
5992 * @NL80211_SCAN_FLAG_FREQ_KHZ: report scan results with6070 * @NL80211_SCAN_FLAG_FREQ_KHZ: report scan results with
5993 * %NL80211_ATTR_SCAN_FREQ_KHZ. This also means6071 * %NL80211_ATTR_SCAN_FREQ_KHZ. This also means
5994 * %NL80211_ATTR_SCAN_FREQUENCIES will not be included.6072 * %NL80211_ATTR_SCAN_FREQUENCIES will not be included.
6073 * @NL80211_SCAN_FLAG_COLOCATED_6GHZ: scan for colocated APs reported by
6074 * 2.4/5 GHz APs
5995 */6075 */
5996enum nl80211_scan_flags {6076enum nl80211_scan_flags {
5997 NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0,6077 NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0,
@@ -6008,6 +6088,7 @@ enum nl80211_scan_flags { · 10 unmodified lines
6008 NL80211_SCAN_FLAG_RANDOM_SN = 1<<11,6088 NL80211_SCAN_FLAG_RANDOM_SN = 1<<11,
6009 NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12,6089 NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12,
6010 NL80211_SCAN_FLAG_FREQ_KHZ = 1<<13,6090 NL80211_SCAN_FLAG_FREQ_KHZ = 1<<13,
6091 NL80211_SCAN_FLAG_COLOCATED_6GHZ = 1<<14,
6011};6092};
6012 6093
6013/**6094/**
@@ -6910,6 +6991,13 @@ enum nl80211_peer_measurement_ftm_resp { · 896 unmodified lines
6910 *6991 *
6911 * @NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET: the OBSS PD minimum tx power offset.6992 * @NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET: the OBSS PD minimum tx power offset.
6912 * @NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET: the OBSS PD maximum tx power offset.6993 * @NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET: the OBSS PD maximum tx power offset.
6994 * @NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET: the non-SRG OBSS PD maximum
6995 * tx power offset.
6996 * @NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP: bitmap that indicates the BSS color
6997 * values used by members of the SRG.
6998 * @NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP: bitmap that indicates the partial
6999 * BSSID values used by members of the SRG.
7000 * @NL80211_HE_OBSS_PD_ATTR_SR_CTRL: The SR Control field of SRP element.
6913 *7001 *
6914 * @__NL80211_HE_OBSS_PD_ATTR_LAST: Internal7002 * @__NL80211_HE_OBSS_PD_ATTR_LAST: Internal
6915 * @NL80211_HE_OBSS_PD_ATTR_MAX: highest OBSS PD attribute.7003 * @NL80211_HE_OBSS_PD_ATTR_MAX: highest OBSS PD attribute.
@@ -6919,6 +7007,10 @@ enum nl80211_obss_pd_attributes { · 3 unmodified lines
6919 7007
6920 NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET,7008 NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET,
6921 NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET,7009 NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET,
7010 NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET,
7011 NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP,
7012 NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP,
7013 NL80211_HE_OBSS_PD_ATTR_SR_CTRL,
6922 7014
6923 /* keep last */7015 /* keep last */
6924 __NL80211_HE_OBSS_PD_ATTR_LAST,7016 __NL80211_HE_OBSS_PD_ATTR_LAST,
@@ -6972,4 +7064,64 @@ enum nl80211_iftype_akm_attributes { · 47 unmodified lines
6972 NL80211_IFTYPE_AKM_ATTR_MAX = __NL80211_IFTYPE_AKM_ATTR_LAST - 1,7064 NL80211_IFTYPE_AKM_ATTR_MAX = __NL80211_IFTYPE_AKM_ATTR_LAST - 1,
6973};7065};
6974 7066
7067/**
7068 * enum nl80211_fils_discovery_attributes - FILS discovery configuration
7069 * from IEEE Std 802.11ai-2016, Annex C.3 MIB detail.
7070 *
7071 * @__NL80211_FILS_DISCOVERY_ATTR_INVALID: Invalid
7072 *
7073 * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU).
7074 * Allowed range: 0..10000 (TU = Time Unit)
7075 * @NL80211_FILS_DISCOVERY_ATTR_INT_MAX: Maximum packet interval (u32, TU).
7076 * Allowed range: 0..10000 (TU = Time Unit)
7077 * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action
7078 * frame including the headers.
7079 *
7080 * @__NL80211_FILS_DISCOVERY_ATTR_LAST: Internal
7081 * @NL80211_FILS_DISCOVERY_ATTR_MAX: highest attribute
7082 */
7083enum nl80211_fils_discovery_attributes {
7084 __NL80211_FILS_DISCOVERY_ATTR_INVALID,
7085
7086 NL80211_FILS_DISCOVERY_ATTR_INT_MIN,
7087 NL80211_FILS_DISCOVERY_ATTR_INT_MAX,
7088 NL80211_FILS_DISCOVERY_ATTR_TMPL,
7089
7090 /* keep last */
7091 __NL80211_FILS_DISCOVERY_ATTR_LAST,
7092 NL80211_FILS_DISCOVERY_ATTR_MAX = __NL80211_FILS_DISCOVERY_ATTR_LAST - 1
7093};
7094
7095/*
7096 * FILS discovery template minimum length with action frame headers and
7097 * mandatory fields.
7098 */
7099#define NL80211_FILS_DISCOVERY_TMPL_MIN_LEN 42
7100
7101/**
7102 * enum nl80211_unsol_bcast_probe_resp_attributes - Unsolicited broadcast probe
7103 * response configuration. Applicable only in 6GHz.
7104 *
7105 * @__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INVALID: Invalid
7106 *
7107 * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU).
7108 * Allowed range: 0..20 (TU = Time Unit). IEEE P802.11ax/D6.0
7109 * 26.17.2.3.2 (AP behavior for fast passive scanning).
7110 * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response
7111 * frame template (binary).
7112 *
7113 * @__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST: Internal
7114 * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX: highest attribute
7115 */
7116enum nl80211_unsol_bcast_probe_resp_attributes {
7117 __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INVALID,
7118
7119 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT,
7120 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL,
7121
7122 /* keep last */
7123 __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST,
7124 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX =
7125 __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1
7126};
6975#endif /* __LINUX_NL80211_H */7127#endif /* __LINUX_NL80211_H */
include/uapi/linux/pci_regs.h+5−1
@@ -76,6 +76,7 @@ · 75 unmodified lines
76#define PCI_CACHE_LINE_SIZE 0x0c /* 8 bits */76#define PCI_CACHE_LINE_SIZE 0x0c /* 8 bits */
77#define PCI_LATENCY_TIMER 0x0d /* 8 bits */77#define PCI_LATENCY_TIMER 0x0d /* 8 bits */
78#define PCI_HEADER_TYPE 0x0e /* 8 bits */78#define PCI_HEADER_TYPE 0x0e /* 8 bits */
79#define PCI_HEADER_TYPE_MASK 0x7f
79#define PCI_HEADER_TYPE_NORMAL 080#define PCI_HEADER_TYPE_NORMAL 0
80#define PCI_HEADER_TYPE_BRIDGE 181#define PCI_HEADER_TYPE_BRIDGE 1
81#define PCI_HEADER_TYPE_CARDBUS 282#define PCI_HEADER_TYPE_CARDBUS 2
@@ -246,7 +247,7 @@ · 164 unmodified lines
246#define PCI_PM_CAP_PME_D0 0x0800 /* PME# from D0 */247#define PCI_PM_CAP_PME_D0 0x0800 /* PME# from D0 */
247#define PCI_PM_CAP_PME_D1 0x1000 /* PME# from D1 */248#define PCI_PM_CAP_PME_D1 0x1000 /* PME# from D1 */
248#define PCI_PM_CAP_PME_D2 0x2000 /* PME# from D2 */249#define PCI_PM_CAP_PME_D2 0x2000 /* PME# from D2 */
249#define PCI_PM_CAP_PME_D3 0x4000 /* PME# from D3 (hot) */250#define PCI_PM_CAP_PME_D3hot 0x4000 /* PME# from D3 (hot) */
250#define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */251#define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */
251#define PCI_PM_CAP_PME_SHIFT 11 /* Start of the PME Mask in PMC */252#define PCI_PM_CAP_PME_SHIFT 11 /* Start of the PME Mask in PMC */
252#define PCI_PM_CTRL 4 /* PM control and status register */253#define PCI_PM_CTRL 4 /* PM control and status register */
@@ -532,6 +533,8 @@ · 279 unmodified lines
532#define PCI_EXP_LNKCAP_SLS_32_0GB 0x00000005 /* LNKCAP2 SLS Vector bit 4 */533#define PCI_EXP_LNKCAP_SLS_32_0GB 0x00000005 /* LNKCAP2 SLS Vector bit 4 */
533#define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */534#define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */
534#define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */535#define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */
536#define PCI_EXP_LNKCAP_ASPM_L0S 0x00000400 /* ASPM L0s Support */
537#define PCI_EXP_LNKCAP_ASPM_L1 0x00000800 /* ASPM L1 Support */
535#define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */538#define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */
536#define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */539#define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */
537#define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* Clock Power Management */540#define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* Clock Power Management */
@@ -1056,6 +1059,7 @@ · 518 unmodified lines
1056#define PCI_L1SS_CTL1_PCIPM_L1_1 0x00000002 /* PCI-PM L1.1 Enable */1059#define PCI_L1SS_CTL1_PCIPM_L1_1 0x00000002 /* PCI-PM L1.1 Enable */
1057#define PCI_L1SS_CTL1_ASPM_L1_2 0x00000004 /* ASPM L1.2 Enable */1060#define PCI_L1SS_CTL1_ASPM_L1_2 0x00000004 /* ASPM L1.2 Enable */
1058#define PCI_L1SS_CTL1_ASPM_L1_1 0x00000008 /* ASPM L1.1 Enable */1061#define PCI_L1SS_CTL1_ASPM_L1_1 0x00000008 /* ASPM L1.1 Enable */
1062#define PCI_L1SS_CTL1_L1_2_MASK 0x00000005
1059#define PCI_L1SS_CTL1_L1SS_MASK 0x0000000f1063#define PCI_L1SS_CTL1_L1SS_MASK 0x0000000f
1060#define PCI_L1SS_CTL1_CM_RESTORE_TIME 0x0000ff00 /* Common_Mode_Restore_Time */1064#define PCI_L1SS_CTL1_CM_RESTORE_TIME 0x0000ff00 /* Common_Mode_Restore_Time */
1061#define PCI_L1SS_CTL1_LTR_L12_TH_VALUE 0x03ff0000 /* LTR_L1.2_THRESHOLD_Value */1065#define PCI_L1SS_CTL1_LTR_L12_TH_VALUE 0x03ff0000 /* LTR_L1.2_THRESHOLD_Value */
include/uapi/linux/perf_event.h+1−1
@@ -1200,7 +1200,7 @@ union perf_mem_data_src { · 1199 unmodified lines
1200 1200
1201#define PERF_MEM_SNOOPX_FWD 0x01 /* forward */1201#define PERF_MEM_SNOOPX_FWD 0x01 /* forward */
1202/* 1 free */1202/* 1 free */
1203#define PERF_MEM_SNOOPX_SHIFT 371203#define PERF_MEM_SNOOPX_SHIFT 38
1204 1204
1205/* locked instruction */1205/* locked instruction */
1206#define PERF_MEM_LOCK_NA 0x01 /* not available */1206#define PERF_MEM_LOCK_NA 0x01 /* not available */
include/uapi/linux/pidfd.h+12−0
@@ -0,0 +1,12 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
3#ifndef _UAPI_LINUX_PIDFD_H
4#define _UAPI_LINUX_PIDFD_H
5
6#include <linux/types.h>
7#include <linux/fcntl.h>
8
9/* Flags for pidfd_open(). */
10#define PIDFD_NONBLOCK O_NONBLOCK
11
12#endif /* _UAPI_LINUX_PIDFD_H */
include/uapi/linux/prctl.h+9−0
@@ -233,6 +233,15 @@ struct prctl_mm_map { · 232 unmodified lines
233#define PR_SET_TAGGED_ADDR_CTRL 55233#define PR_SET_TAGGED_ADDR_CTRL 55
234#define PR_GET_TAGGED_ADDR_CTRL 56234#define PR_GET_TAGGED_ADDR_CTRL 56
235# define PR_TAGGED_ADDR_ENABLE (1UL << 0)235# define PR_TAGGED_ADDR_ENABLE (1UL << 0)
236/* MTE tag check fault modes */
237# define PR_MTE_TCF_SHIFT 1
238# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
239# define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
240# define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
241# define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
242/* MTE tag inclusion mask */
243# define PR_MTE_TAG_SHIFT 3
244# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
236 245
237/* Control reclaim behavior when allocating memory */246/* Control reclaim behavior when allocating memory */
238#define PR_SET_IO_FLUSHER 57247#define PR_SET_IO_FLUSHER 57
include/uapi/linux/rxrpc.h+1−1
@@ -51,11 +51,11 @@ enum rxrpc_cmsg_type { · 50 unmodified lines
51 RXRPC_BUSY = 6, /* -r: server busy received [terminal] */51 RXRPC_BUSY = 6, /* -r: server busy received [terminal] */
52 RXRPC_LOCAL_ERROR = 7, /* -r: local error generated [terminal] */52 RXRPC_LOCAL_ERROR = 7, /* -r: local error generated [terminal] */
53 RXRPC_NEW_CALL = 8, /* -r: [Service] new incoming call notification */53 RXRPC_NEW_CALL = 8, /* -r: [Service] new incoming call notification */
54 RXRPC_ACCEPT = 9, /* s-: [Service] accept request */
55 RXRPC_EXCLUSIVE_CALL = 10, /* s-: Call should be on exclusive connection */54 RXRPC_EXCLUSIVE_CALL = 10, /* s-: Call should be on exclusive connection */
56 RXRPC_UPGRADE_SERVICE = 11, /* s-: Request service upgrade for client call */55 RXRPC_UPGRADE_SERVICE = 11, /* s-: Request service upgrade for client call */
57 RXRPC_TX_LENGTH = 12, /* s-: Total length of Tx data */56 RXRPC_TX_LENGTH = 12, /* s-: Total length of Tx data */
58 RXRPC_SET_CALL_TIMEOUT = 13, /* s-: Set one or more call timeouts */57 RXRPC_SET_CALL_TIMEOUT = 13, /* s-: Set one or more call timeouts */
58 RXRPC_CHARGE_ACCEPT = 14, /* s-: Charge the accept pool with a user call ID */
59 RXRPC__SUPPORTED59 RXRPC__SUPPORTED
60};60};
61 61
include/uapi/linux/snmp.h+1−0
@@ -288,6 +288,7 @@ enum · 287 unmodified lines
288 LINUX_MIB_TCPTIMEOUTREHASH, /* TCPTimeoutRehash */288 LINUX_MIB_TCPTIMEOUTREHASH, /* TCPTimeoutRehash */
289 LINUX_MIB_TCPDUPLICATEDATAREHASH, /* TCPDuplicateDataRehash */289 LINUX_MIB_TCPDUPLICATEDATAREHASH, /* TCPDuplicateDataRehash */
290 LINUX_MIB_TCPDSACKRECVSEGS, /* TCPDSACKRecvSegs */290 LINUX_MIB_TCPDSACKRECVSEGS, /* TCPDSACKRecvSegs */
291 LINUX_MIB_TCPDSACKIGNOREDDUBIOUS, /* TCPDSACKIgnoredDubious */
291 __LINUX_MIB_MAX292 __LINUX_MIB_MAX
292};293};
293 294
include/uapi/linux/tc_act/tc_mpls.h+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
10#define TCA_MPLS_ACT_PUSH 210#define TCA_MPLS_ACT_PUSH 2
11#define TCA_MPLS_ACT_MODIFY 311#define TCA_MPLS_ACT_MODIFY 3
12#define TCA_MPLS_ACT_DEC_TTL 412#define TCA_MPLS_ACT_DEC_TTL 4
13#define TCA_MPLS_ACT_MAC_PUSH 5
13 14
14struct tc_mpls {15struct tc_mpls {
15 tc_gen; /* generic TC action fields. */16 tc_gen; /* generic TC action fields. */
include/uapi/linux/tc_act/tc_vlan.h+4−0
@@ -16,6 +16,8 @@ · 15 unmodified lines
16#define TCA_VLAN_ACT_POP 116#define TCA_VLAN_ACT_POP 1
17#define TCA_VLAN_ACT_PUSH 217#define TCA_VLAN_ACT_PUSH 2
18#define TCA_VLAN_ACT_MODIFY 318#define TCA_VLAN_ACT_MODIFY 3
19#define TCA_VLAN_ACT_POP_ETH 4
20#define TCA_VLAN_ACT_PUSH_ETH 5
19 21
20struct tc_vlan {22struct tc_vlan {
21 tc_gen;23 tc_gen;
@@ -30,6 +32,8 @@ enum { · 8 unmodified lines
30 TCA_VLAN_PUSH_VLAN_PROTOCOL,32 TCA_VLAN_PUSH_VLAN_PROTOCOL,
31 TCA_VLAN_PAD,33 TCA_VLAN_PAD,
32 TCA_VLAN_PUSH_VLAN_PRIORITY,34 TCA_VLAN_PUSH_VLAN_PRIORITY,
35 TCA_VLAN_PUSH_ETH_DST,
36 TCA_VLAN_PUSH_ETH_SRC,
33 __TCA_VLAN_MAX,37 __TCA_VLAN_MAX,
34};38};
35#define TCA_VLAN_MAX (__TCA_VLAN_MAX - 1)39#define TCA_VLAN_MAX (__TCA_VLAN_MAX - 1)
include/uapi/linux/tee.h+13−0
@@ -51,6 +51,9 @@ · 50 unmodified lines
51#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */51#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */
52#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */52#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */
53#define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */53#define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */
54#define TEE_GEN_CAP_MEMREF_NULL (1 << 3)/* NULL MemRef support */
55
56#define TEE_MEMREF_NULL (__u64)(-1) /* NULL MemRef Buffer */
54 57
55/*58/*
56 * TEE Implementation ID59 * TEE Implementation ID
@@ -200,6 +203,16 @@ struct tee_ioctl_buf_data { · 143 unmodified lines
200 * a part of a shared memory by specifying an offset (@a) and size (@b) of203 * a part of a shared memory by specifying an offset (@a) and size (@b) of
201 * the object. To supply the entire shared memory object set the offset204 * the object. To supply the entire shared memory object set the offset
202 * (@a) to 0 and size (@b) to the previously returned size of the object.205 * (@a) to 0 and size (@b) to the previously returned size of the object.
206 *
207 * A client may need to present a NULL pointer in the argument
208 * passed to a trusted application in the TEE.
209 * This is also a requirement in GlobalPlatform Client API v1.0c
210 * (section 3.2.5 memory references), which can be found at
211 * http://www.globalplatform.org/specificationsdevice.asp
212 *
213 * If a NULL pointer is passed to a TA in the TEE, the (@c)
214 * IOCTL parameters value must be set to TEE_MEMREF_NULL indicating a NULL
215 * memory reference.
203 */216 */
204struct tee_ioctl_param {217struct tee_ioctl_param {
205 __u64 attr;218 __u64 attr;
include/uapi/linux/tipc.h+2−0
@@ -254,6 +254,8 @@ static inline int tipc_aead_key_size(struct tipc_aead_key *key) · 253 unmodified lines
254 return sizeof(*key) + key->keylen;254 return sizeof(*key) + key->keylen;
255}255}
256 256
257#define TIPC_REKEYING_NOW (~0U)
258
257/* The macros and functions below are deprecated:259/* The macros and functions below are deprecated:
258 */260 */
259 261
include/uapi/linux/tipc_netlink.h+2−0
@@ -165,6 +165,8 @@ enum { · 164 unmodified lines
165 TIPC_NLA_NODE_UP, /* flag */165 TIPC_NLA_NODE_UP, /* flag */
166 TIPC_NLA_NODE_ID, /* data */166 TIPC_NLA_NODE_ID, /* data */
167 TIPC_NLA_NODE_KEY, /* data */167 TIPC_NLA_NODE_KEY, /* data */
168 TIPC_NLA_NODE_KEY_MASTER, /* flag */
169 TIPC_NLA_NODE_REKEYING, /* u32 */
168 170
169 __TIPC_NLA_NODE_MAX,171 __TIPC_NLA_NODE_MAX,
170 TIPC_NLA_NODE_MAX = __TIPC_NLA_NODE_MAX - 1172 TIPC_NLA_NODE_MAX = __TIPC_NLA_NODE_MAX - 1
include/uapi/linux/v4l2-controls.h+25−0
@@ -375,6 +375,7 @@ enum v4l2_mpeg_video_aspect { · 374 unmodified lines
375enum v4l2_mpeg_video_bitrate_mode {375enum v4l2_mpeg_video_bitrate_mode {
376 V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,376 V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
377 V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,377 V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
378 V4L2_MPEG_VIDEO_BITRATE_MODE_CQ = 2,
378};379};
379#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)380#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
380#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)381#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
@@ -650,6 +651,23 @@ enum v4l2_mpeg_video_vp9_profile { · 269 unmodified lines
650 V4L2_MPEG_VIDEO_VP9_PROFILE_2 = 2,651 V4L2_MPEG_VIDEO_VP9_PROFILE_2 = 2,
651 V4L2_MPEG_VIDEO_VP9_PROFILE_3 = 3,652 V4L2_MPEG_VIDEO_VP9_PROFILE_3 = 3,
652};653};
654#define V4L2_CID_MPEG_VIDEO_VP9_LEVEL (V4L2_CID_MPEG_BASE+513)
655enum v4l2_mpeg_video_vp9_level {
656 V4L2_MPEG_VIDEO_VP9_LEVEL_1_0 = 0,
657 V4L2_MPEG_VIDEO_VP9_LEVEL_1_1 = 1,
658 V4L2_MPEG_VIDEO_VP9_LEVEL_2_0 = 2,
659 V4L2_MPEG_VIDEO_VP9_LEVEL_2_1 = 3,
660 V4L2_MPEG_VIDEO_VP9_LEVEL_3_0 = 4,
661 V4L2_MPEG_VIDEO_VP9_LEVEL_3_1 = 5,
662 V4L2_MPEG_VIDEO_VP9_LEVEL_4_0 = 6,
663 V4L2_MPEG_VIDEO_VP9_LEVEL_4_1 = 7,
664 V4L2_MPEG_VIDEO_VP9_LEVEL_5_0 = 8,
665 V4L2_MPEG_VIDEO_VP9_LEVEL_5_1 = 9,
666 V4L2_MPEG_VIDEO_VP9_LEVEL_5_2 = 10,
667 V4L2_MPEG_VIDEO_VP9_LEVEL_6_0 = 11,
668 V4L2_MPEG_VIDEO_VP9_LEVEL_6_1 = 12,
669 V4L2_MPEG_VIDEO_VP9_LEVEL_6_2 = 13,
670};
653 671
654/* CIDs for HEVC encoding. */672/* CIDs for HEVC encoding. */
655 673
@@ -742,6 +760,13 @@ enum v4l2_cid_mpeg_video_hevc_size_of_length_field { · 86 unmodified lines
742#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_MPEG_BASE + 642)760#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_MPEG_BASE + 642)
743#define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_MPEG_BASE + 643)761#define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_MPEG_BASE + 643)
744#define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_MPEG_BASE + 644)762#define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_MPEG_BASE + 644)
763#define V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (V4L2_CID_MPEG_BASE + 645)
764#define V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_BASE + 646)
765enum v4l2_mpeg_video_frame_skip_mode {
766 V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED = 0,
767 V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1,
768 V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2,
769};
745 770
746/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */771/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
747#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)772#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
include/uapi/linux/v4l2-mediabus.h+13−2
@@ -16,6 +16,8 @@ · 15 unmodified lines
16#include <linux/types.h>16#include <linux/types.h>
17#include <linux/videodev2.h>17#include <linux/videodev2.h>
18 18
19#define V4L2_MBUS_FRAMEFMT_SET_CSC 0x0001
20
19/**21/**
20 * struct v4l2_mbus_framefmt - frame format on the media bus22 * struct v4l2_mbus_framefmt - frame format on the media bus
21 * @width: image width23 * @width: image width
@@ -24,8 +26,11 @@ · 2 unmodified lines
24 * @field: used interlacing type (from enum v4l2_field)26 * @field: used interlacing type (from enum v4l2_field)
25 * @colorspace: colorspace of the data (from enum v4l2_colorspace)27 * @colorspace: colorspace of the data (from enum v4l2_colorspace)
26 * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding)28 * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding)
29 * @hsv_enc: HSV encoding of the data (from enum v4l2_hsv_encoding)
27 * @quantization: quantization of the data (from enum v4l2_quantization)30 * @quantization: quantization of the data (from enum v4l2_quantization)
28 * @xfer_func: transfer function of the data (from enum v4l2_xfer_func)31 * @xfer_func: transfer function of the data (from enum v4l2_xfer_func)
32 * @flags: flags (V4L2_MBUS_FRAMEFMT_*)
33 * @reserved: reserved bytes that can be later used
29 */34 */
30struct v4l2_mbus_framefmt {35struct v4l2_mbus_framefmt {
31 __u32 width;36 __u32 width;
@@ -33,10 +38,16 @@ struct v4l2_mbus_framefmt { · 1 unmodified line
33 __u32 code;38 __u32 code;
34 __u32 field;39 __u32 field;
35 __u32 colorspace;40 __u32 colorspace;
36 __u16 ycbcr_enc;41 union {
42 /* enum v4l2_ycbcr_encoding */
43 __u16 ycbcr_enc;
44 /* enum v4l2_hsv_encoding */
45 __u16 hsv_enc;
46 };
37 __u16 quantization;47 __u16 quantization;
38 __u16 xfer_func;48 __u16 xfer_func;
39 __u16 reserved[11];49 __u16 flags;
50 __u16 reserved[10];
40};51};
41 52
42#ifndef __KERNEL__53#ifndef __KERNEL__
include/uapi/linux/v4l2-subdev.h+9−1
@@ -65,19 +65,27 @@ struct v4l2_subdev_crop { · 64 unmodified lines
65 __u32 reserved[8];65 __u32 reserved[8];
66};66};
67 67
68#define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001
69#define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002
70#define V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC 0x00000004
71#define V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC
72#define V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION 0x00000008
73
68/**74/**
69 * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration75 * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration
70 * @pad: pad number, as reported by the media API76 * @pad: pad number, as reported by the media API
71 * @index: format index during enumeration77 * @index: format index during enumeration
72 * @code: format code (MEDIA_BUS_FMT_ definitions)78 * @code: format code (MEDIA_BUS_FMT_ definitions)
73 * @which: format type (from enum v4l2_subdev_format_whence)79 * @which: format type (from enum v4l2_subdev_format_whence)
80 * @flags: flags set by the driver, (V4L2_SUBDEV_MBUS_CODE_*)
74 */81 */
75struct v4l2_subdev_mbus_code_enum {82struct v4l2_subdev_mbus_code_enum {
76 __u32 pad;83 __u32 pad;
77 __u32 index;84 __u32 index;
78 __u32 code;85 __u32 code;
79 __u32 which;86 __u32 which;
80 __u32 reserved[8];87 __u32 flags;
88 __u32 reserved[7];
81};89};
82 90
83/**91/**
include/uapi/linux/vfio.h+28−1
@@ -201,8 +201,11 @@ struct vfio_device_info { · 200 unmodified lines
201#define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */201#define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */
202#define VFIO_DEVICE_FLAGS_CCW (1 << 4) /* vfio-ccw device */202#define VFIO_DEVICE_FLAGS_CCW (1 << 4) /* vfio-ccw device */
203#define VFIO_DEVICE_FLAGS_AP (1 << 5) /* vfio-ap device */203#define VFIO_DEVICE_FLAGS_AP (1 << 5) /* vfio-ap device */
204#define VFIO_DEVICE_FLAGS_FSL_MC (1 << 6) /* vfio-fsl-mc device */
205#define VFIO_DEVICE_FLAGS_CAPS (1 << 7) /* Info supports caps */
204 __u32 num_regions; /* Max region index + 1 */206 __u32 num_regions; /* Max region index + 1 */
205 __u32 num_irqs; /* Max IRQ index + 1 */207 __u32 num_irqs; /* Max IRQ index + 1 */
208 __u32 cap_offset; /* Offset within info struct of first cap */
206};209};
207#define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7)210#define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7)
208 211
@@ -218,6 +221,15 @@ struct vfio_device_info { · 9 unmodified lines
218#define VFIO_DEVICE_API_CCW_STRING "vfio-ccw"221#define VFIO_DEVICE_API_CCW_STRING "vfio-ccw"
219#define VFIO_DEVICE_API_AP_STRING "vfio-ap"222#define VFIO_DEVICE_API_AP_STRING "vfio-ap"
220 223
224/*
225 * The following capabilities are unique to s390 zPCI devices. Their contents
226 * are further-defined in vfio_zdev.h
227 */
228#define VFIO_DEVICE_INFO_CAP_ZPCI_BASE 1
229#define VFIO_DEVICE_INFO_CAP_ZPCI_GROUP 2
230#define VFIO_DEVICE_INFO_CAP_ZPCI_UTIL 3
231#define VFIO_DEVICE_INFO_CAP_ZPCI_PFIP 4
232
221/**233/**
222 * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8,234 * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8,
223 * struct vfio_region_info)235 * struct vfio_region_info)
@@ -462,7 +474,7 @@ struct vfio_region_gfx_edid { · 238 unmodified lines
462 * 5. Resumed474 * 5. Resumed
463 * |--------->|475 * |--------->|
464 *476 *
465 * 0. Default state of VFIO device is _RUNNNG when the user application starts.477 * 0. Default state of VFIO device is _RUNNING when the user application starts.
466 * 1. During normal shutdown of the user application, the user application may478 * 1. During normal shutdown of the user application, the user application may
467 * optionally change the VFIO device state from _RUNNING to _STOP. This479 * optionally change the VFIO device state from _RUNNING to _STOP. This
468 * transition is optional. The vendor driver must support this transition but480 * transition is optional. The vendor driver must support this transition but
@@ -1039,6 +1051,21 @@ struct vfio_iommu_type1_info_cap_migration { · 570 unmodified lines
1039 __u64 max_dirty_bitmap_size; /* in bytes */1051 __u64 max_dirty_bitmap_size; /* in bytes */
1040};1052};
1041 1053
1054/*
1055 * The DMA available capability allows to report the current number of
1056 * simultaneously outstanding DMA mappings that are allowed.
1057 *
1058 * The structure below defines version 1 of this capability.
1059 *
1060 * avail: specifies the current number of outstanding DMA mappings allowed.
1061 */
1062#define VFIO_IOMMU_TYPE1_INFO_DMA_AVAIL 3
1063
1064struct vfio_iommu_type1_info_dma_avail {
1065 struct vfio_info_cap_header header;
1066 __u32 avail;
1067};
1068
1042#define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)1069#define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
1043 1070
1044/**1071/**
include/uapi/linux/vfio_zdev.h+78−0
@@ -0,0 +1,78 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * VFIO Region definitions for ZPCI devices
4 *
5 * Copyright IBM Corp. 2020
6 *
7 * Author(s): Pierre Morel <pmorel@linux.ibm.com>
8 * Matthew Rosato <mjrosato@linux.ibm.com>
9 */
10
11#ifndef _VFIO_ZDEV_H_
12#define _VFIO_ZDEV_H_
13
14#include <linux/types.h>
15#include <linux/vfio.h>
16
17/**
18 * VFIO_DEVICE_INFO_CAP_ZPCI_BASE - Base PCI Function information
19 *
20 * This capability provides a set of descriptive information about the
21 * associated PCI function.
22 */
23struct vfio_device_info_cap_zpci_base {
24 struct vfio_info_cap_header header;
25 __u64 start_dma; /* Start of available DMA addresses */
26 __u64 end_dma; /* End of available DMA addresses */
27 __u16 pchid; /* Physical Channel ID */
28 __u16 vfn; /* Virtual function number */
29 __u16 fmb_length; /* Measurement Block Length (in bytes) */
30 __u8 pft; /* PCI Function Type */
31 __u8 gid; /* PCI function group ID */
32};
33
34/**
35 * VFIO_DEVICE_INFO_CAP_ZPCI_GROUP - Base PCI Function Group information
36 *
37 * This capability provides a set of descriptive information about the group of
38 * PCI functions that the associated device belongs to.
39 */
40struct vfio_device_info_cap_zpci_group {
41 struct vfio_info_cap_header header;
42 __u64 dasm; /* DMA Address space mask */
43 __u64 msi_addr; /* MSI address */
44 __u64 flags;
45#define VFIO_DEVICE_INFO_ZPCI_FLAG_REFRESH 1 /* Program-specified TLB refresh */
46 __u16 mui; /* Measurement Block Update Interval */
47 __u16 noi; /* Maximum number of MSIs */
48 __u16 maxstbl; /* Maximum Store Block Length */
49 __u8 version; /* Supported PCI Version */
50};
51
52/**
53 * VFIO_DEVICE_INFO_CAP_ZPCI_UTIL - Utility String
54 *
55 * This capability provides the utility string for the associated device, which
56 * is a device identifier string made up of EBCDID characters. 'size' specifies
57 * the length of 'util_str'.
58 */
59struct vfio_device_info_cap_zpci_util {
60 struct vfio_info_cap_header header;
61 __u32 size;
62 __u8 util_str[];
63};
64
65/**
66 * VFIO_DEVICE_INFO_CAP_ZPCI_PFIP - PCI Function Path
67 *
68 * This capability provides the PCI function path string, which is an identifier
69 * that describes the internal hardware path of the device. 'size' specifies
70 * the length of 'pfip'.
71 */
72struct vfio_device_info_cap_zpci_pfip {
73 struct vfio_info_cap_header header;
74 __u32 size;
75 __u8 pfip[];
76};
77
78#endif
include/uapi/linux/vhost.h+4−0
@@ -146,4 +146,8 @@ · 145 unmodified lines
146 146
147/* Set event fd for config interrupt*/147/* Set event fd for config interrupt*/
148#define VHOST_VDPA_SET_CONFIG_CALL _IOW(VHOST_VIRTIO, 0x77, int)148#define VHOST_VDPA_SET_CONFIG_CALL _IOW(VHOST_VIRTIO, 0x77, int)
149
150/* Get the valid iova range */
151#define VHOST_VDPA_GET_IOVA_RANGE _IOR(VHOST_VIRTIO, 0x78, \
152 struct vhost_vdpa_iova_range)
149#endif153#endif
include/uapi/linux/vhost_types.h+9−0
@@ -138,6 +138,15 @@ struct vhost_vdpa_config { · 137 unmodified lines
138 __u8 buf[0];138 __u8 buf[0];
139};139};
140 140
141/* vhost vdpa IOVA range
142 * @first: First address that can be mapped by vhost-vDPA
143 * @last: Last address that can be mapped by vhost-vDPA
144 */
145struct vhost_vdpa_iova_range {
146 __u64 first;
147 __u64 last;
148};
149
141/* Feature bits */150/* Feature bits */
142/* Log all write descriptors. Can be changed while device is active. */151/* Log all write descriptors. Can be changed while device is active. */
143#define VHOST_F_LOG_ALL 26152#define VHOST_F_LOG_ALL 26
include/uapi/linux/videodev2.h+16−20
@@ -191,8 +191,6 @@ enum v4l2_memory { · 190 unmodified lines
191 V4L2_MEMORY_DMABUF = 4,191 V4L2_MEMORY_DMABUF = 4,
192};192};
193 193
194#define V4L2_FLAG_MEMORY_NON_CONSISTENT (1 << 0)
195
196/* see also http://vektor.theorem.ca/graphics/ycbcr/ */194/* see also http://vektor.theorem.ca/graphics/ycbcr/ */
197enum v4l2_colorspace {195enum v4l2_colorspace {
198 /*196 /*
@@ -375,9 +373,9 @@ enum v4l2_hsv_encoding { · 176 unmodified lines
375 373
376enum v4l2_quantization {374enum v4l2_quantization {
377 /*375 /*
378 * The default for R'G'B' quantization is always full range, except376 * The default for R'G'B' quantization is always full range.
379 * for the BT2020 colorspace. For Y'CbCr the quantization is always377 * For Y'CbCr the quantization is always limited range, except
380 * limited range, except for COLORSPACE_JPEG: this is full range.378 * for COLORSPACE_JPEG: this is full range.
381 */379 */
382 V4L2_QUANTIZATION_DEFAULT = 0,380 V4L2_QUANTIZATION_DEFAULT = 0,
383 V4L2_QUANTIZATION_FULL_RANGE = 1,381 V4L2_QUANTIZATION_FULL_RANGE = 1,
@@ -386,14 +384,13 @@ enum v4l2_quantization { · 2 unmodified lines
386 384
387/*385/*
388 * Determine how QUANTIZATION_DEFAULT should map to a proper quantization.386 * Determine how QUANTIZATION_DEFAULT should map to a proper quantization.
389 * This depends on whether the image is RGB or not, the colorspace and the387 * This depends on whether the image is RGB or not, the colorspace.
390 * Y'CbCr encoding.388 * The Y'CbCr encoding is not used anymore, but is still there for backwards
389 * compatibility.
391 */390 */
392#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb_or_hsv, colsp, ycbcr_enc) \391#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb_or_hsv, colsp, ycbcr_enc) \
393 (((is_rgb_or_hsv) && (colsp) == V4L2_COLORSPACE_BT2020) ? \392 (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \
394 V4L2_QUANTIZATION_LIM_RANGE : \393 V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE)
395 (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \
396 V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))
397 394
398/*395/*
399 * Deprecated names for opRGB colorspace (IEC 61966-2-5)396 * Deprecated names for opRGB colorspace (IEC 61966-2-5)
@@ -778,6 +775,7 @@ struct v4l2_pix_format { · 378 unmodified lines
778 775
779/* Flags */776/* Flags */
780#define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001777#define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001
778#define V4L2_PIX_FMT_FLAG_SET_CSC 0x00000002
781 779
782/*780/*
783 * F O R M A T E N U M E R A T I O N781 * F O R M A T E N U M E R A T I O N
@@ -797,6 +795,11 @@ struct v4l2_fmtdesc { · 13 unmodified lines
797#define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004795#define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004
798#define V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008796#define V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008
799#define V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL 0x0010797#define V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL 0x0010
798#define V4L2_FMT_FLAG_CSC_COLORSPACE 0x0020
799#define V4L2_FMT_FLAG_CSC_XFER_FUNC 0x0040
800#define V4L2_FMT_FLAG_CSC_YCBCR_ENC 0x0080
801#define V4L2_FMT_FLAG_CSC_HSV_ENC V4L2_FMT_FLAG_CSC_YCBCR_ENC
802#define V4L2_FMT_FLAG_CSC_QUANTIZATION 0x0100
800 803
801 /* Frame Size and frame rate enumeration */804 /* Frame Size and frame rate enumeration */
802/*805/*
@@ -949,10 +952,7 @@ struct v4l2_requestbuffers { · 146 unmodified lines
949 __u32 type; /* enum v4l2_buf_type */952 __u32 type; /* enum v4l2_buf_type */
950 __u32 memory; /* enum v4l2_memory */953 __u32 memory; /* enum v4l2_memory */
951 __u32 capabilities;954 __u32 capabilities;
952 union {955 __u32 reserved[1];
953 __u32 flags;
954 __u32 reserved[1];
955 };
956};956};
957 957
958/* capabilities for struct v4l2_requestbuffers and v4l2_create_buffers */958/* capabilities for struct v4l2_requestbuffers and v4l2_create_buffers */
@@ -2456,9 +2456,6 @@ struct v4l2_dbg_chip_info { · 1497 unmodified lines
2456 * @memory: enum v4l2_memory; buffer memory type2456 * @memory: enum v4l2_memory; buffer memory type
2457 * @format: frame format, for which buffers are requested2457 * @format: frame format, for which buffers are requested
2458 * @capabilities: capabilities of this buffer type.2458 * @capabilities: capabilities of this buffer type.
2459 * @flags: additional buffer management attributes (ignored unless the
2460 * queue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability
2461 * and configured for MMAP streaming I/O).
2462 * @reserved: future extensions2459 * @reserved: future extensions
2463 */2460 */
2464struct v4l2_create_buffers {2461struct v4l2_create_buffers {
@@ -2467,8 +2464,7 @@ struct v4l2_create_buffers { · 2 unmodified lines
2467 __u32 memory;2464 __u32 memory;
2468 struct v4l2_format format;2465 struct v4l2_format format;
2469 __u32 capabilities;2466 __u32 capabilities;
2470 __u32 flags;2467 __u32 reserved[7];
2471 __u32 reserved[6];
2472};2468};
2473 2469
2474/*2470/*
include/uapi/linux/virtio_fs.h+3−0
@@ -16,4 +16,7 @@ struct virtio_fs_config { · 15 unmodified lines
16 __le32 num_request_queues;16 __le32 num_request_queues;
17} __attribute__((packed));17} __attribute__((packed));
18 18
19/* For the id field in virtio_pci_shm_cap */
20#define VIRTIO_FS_SHMCAP_ID_CACHE 0
21
19#endif /* _UAPI_LINUX_VIRTIO_FS_H */22#endif /* _UAPI_LINUX_VIRTIO_FS_H */
include/uapi/linux/virtio_gpu.h+19−0
@@ -50,6 +50,10 @@ · 49 unmodified lines
50 * VIRTIO_GPU_CMD_GET_EDID50 * VIRTIO_GPU_CMD_GET_EDID
51 */51 */
52#define VIRTIO_GPU_F_EDID 152#define VIRTIO_GPU_F_EDID 1
53/*
54 * VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID
55 */
56#define VIRTIO_GPU_F_RESOURCE_UUID 2
53 57
54enum virtio_gpu_ctrl_type {58enum virtio_gpu_ctrl_type {
55 VIRTIO_GPU_UNDEFINED = 0,59 VIRTIO_GPU_UNDEFINED = 0,
@@ -66,6 +70,7 @@ enum virtio_gpu_ctrl_type { · 10 unmodified lines
66 VIRTIO_GPU_CMD_GET_CAPSET_INFO,70 VIRTIO_GPU_CMD_GET_CAPSET_INFO,
67 VIRTIO_GPU_CMD_GET_CAPSET,71 VIRTIO_GPU_CMD_GET_CAPSET,
68 VIRTIO_GPU_CMD_GET_EDID,72 VIRTIO_GPU_CMD_GET_EDID,
73 VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID,
69 74
70 /* 3d commands */75 /* 3d commands */
71 VIRTIO_GPU_CMD_CTX_CREATE = 0x0200,76 VIRTIO_GPU_CMD_CTX_CREATE = 0x0200,
@@ -87,6 +92,7 @@ enum virtio_gpu_ctrl_type { · 15 unmodified lines
87 VIRTIO_GPU_RESP_OK_CAPSET_INFO,92 VIRTIO_GPU_RESP_OK_CAPSET_INFO,
88 VIRTIO_GPU_RESP_OK_CAPSET,93 VIRTIO_GPU_RESP_OK_CAPSET,
89 VIRTIO_GPU_RESP_OK_EDID,94 VIRTIO_GPU_RESP_OK_EDID,
95 VIRTIO_GPU_RESP_OK_RESOURCE_UUID,
90 96
91 /* error responses */97 /* error responses */
92 VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200,98 VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200,
@@ -340,4 +346,17 @@ enum virtio_gpu_formats { · 247 unmodified lines
340 VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM = 134,346 VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM = 134,
341};347};
342 348
349/* VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID */
350struct virtio_gpu_resource_assign_uuid {
351 struct virtio_gpu_ctrl_hdr hdr;
352 __le32 resource_id;
353 __le32 padding;
354};
355
356/* VIRTIO_GPU_RESP_OK_RESOURCE_UUID */
357struct virtio_gpu_resp_resource_uuid {
358 struct virtio_gpu_ctrl_hdr hdr;
359 __u8 uuid[16];
360};
361
343#endif362#endif
include/uapi/linux/virtio_mmio.h+11−0
@@ -122,6 +122,17 @@ · 121 unmodified lines
122#define VIRTIO_MMIO_QUEUE_USED_LOW 0x0a0122#define VIRTIO_MMIO_QUEUE_USED_LOW 0x0a0
123#define VIRTIO_MMIO_QUEUE_USED_HIGH 0x0a4123#define VIRTIO_MMIO_QUEUE_USED_HIGH 0x0a4
124 124
125/* Shared memory region id */
126#define VIRTIO_MMIO_SHM_SEL 0x0ac
127
128/* Shared memory region length, 64 bits in two halves */
129#define VIRTIO_MMIO_SHM_LEN_LOW 0x0b0
130#define VIRTIO_MMIO_SHM_LEN_HIGH 0x0b4
131
132/* Shared memory region base address, 64 bits in two halves */
133#define VIRTIO_MMIO_SHM_BASE_LOW 0x0b8
134#define VIRTIO_MMIO_SHM_BASE_HIGH 0x0bc
135
125/* Configuration atomicity value */136/* Configuration atomicity value */
126#define VIRTIO_MMIO_CONFIG_GENERATION 0x0fc137#define VIRTIO_MMIO_CONFIG_GENERATION 0x0fc
127 138
include/uapi/linux/virtio_pci.h+10−1
@@ -113,6 +113,8 @@ · 112 unmodified lines
113#define VIRTIO_PCI_CAP_DEVICE_CFG 4113#define VIRTIO_PCI_CAP_DEVICE_CFG 4
114/* PCI configuration access */114/* PCI configuration access */
115#define VIRTIO_PCI_CAP_PCI_CFG 5115#define VIRTIO_PCI_CAP_PCI_CFG 5
116/* Additional shared memory capability */
117#define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8
116 118
117/* This is the PCI capability header: */119/* This is the PCI capability header: */
118struct virtio_pci_cap {120struct virtio_pci_cap {
@@ -121,11 +123,18 @@ struct virtio_pci_cap { · 2 unmodified lines
121 __u8 cap_len; /* Generic PCI field: capability length */123 __u8 cap_len; /* Generic PCI field: capability length */
122 __u8 cfg_type; /* Identifies the structure. */124 __u8 cfg_type; /* Identifies the structure. */
123 __u8 bar; /* Where to find it. */125 __u8 bar; /* Where to find it. */
124 __u8 padding[3]; /* Pad to full dword. */126 __u8 id; /* Multiple capabilities of the same type */
127 __u8 padding[2]; /* Pad to full dword. */
125 __le32 offset; /* Offset within bar. */128 __le32 offset; /* Offset within bar. */
126 __le32 length; /* Length of the structure, in bytes. */129 __le32 length; /* Length of the structure, in bytes. */
127};130};
128 131
132struct virtio_pci_cap64 {
133 struct virtio_pci_cap cap;
134 __le32 offset_hi; /* Most sig 32 bits of offset */
135 __le32 length_hi; /* Most sig 32 bits of length */
136};
137
129struct virtio_pci_notify_cap {138struct virtio_pci_notify_cap {
130 struct virtio_pci_cap cap;139 struct virtio_pci_cap cap;
131 __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */140 __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */