History

Merge tag 'v5.12-rc8' into sched/core, to pick up fixes

Ingo Molnar committed 5 years ago

Commit d0d252b2 parents 9406415 bf05bf11874 files · +16503 −9476Browse files

Showing the changes to include/uapi (10 of 1874 files). Show all

Unified · Split

10 files
  1. include/uapi/linux/blkpg.h +2 −26
  2. include/uapi/linux/bpf.h +11 −6
  3. include/uapi/linux/can.h +1 −1
  4. include/uapi/linux/ethtool.h +33 −21
  5. include/uapi/linux/fuse.h +2 −1
  6. include/uapi/linux/idxd.h +2 −2
  7. include/uapi/linux/l2tp.h +1 −0
  8. include/uapi/linux/netfilter/nfnetlink_cthelper.h +1 −1
  9. include/uapi/linux/psample.h +1 −4
  10. include/uapi/linux/rfkill.h +68 −12
include/uapi/linux/blkpg.h+2−26
@@ -2,29 +2,6 @@ · 1 unmodified line
2#ifndef _UAPI__LINUX_BLKPG_H2#ifndef _UAPI__LINUX_BLKPG_H
3#define _UAPI__LINUX_BLKPG_H3#define _UAPI__LINUX_BLKPG_H
4 4
5/*
6 * Partition table and disk geometry handling
7 *
8 * A single ioctl with lots of subfunctions:
9 *
10 * Device number stuff:
11 * get_whole_disk() (given the device number of a partition,
12 * find the device number of the encompassing disk)
13 * get_all_partitions() (given the device number of a disk, return the
14 * device numbers of all its known partitions)
15 *
16 * Partition stuff:
17 * add_partition()
18 * delete_partition()
19 * test_partition_in_use() (also for test_disk_in_use)
20 *
21 * Geometry stuff:
22 * get_geometry()
23 * set_geometry()
24 * get_bios_drivedata()
25 *
26 * For today, only the partition stuff - aeb, 990515
27 */
28#include <linux/compiler.h>5#include <linux/compiler.h>
29#include <linux/ioctl.h>6#include <linux/ioctl.h>
30 7
@@ -52,9 +29,8 @@ struct blkpg_partition { · 21 unmodified lines
52 long long start; /* starting offset in bytes */29 long long start; /* starting offset in bytes */
53 long long length; /* length in bytes */30 long long length; /* length in bytes */
54 int pno; /* partition number */31 int pno; /* partition number */
55 char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2,32 char devname[BLKPG_DEVNAMELTH]; /* unused / ignored */
56 to be used in kernel messages */33 char volname[BLKPG_VOLNAMELTH]; /* unused / ignore */
57 char volname[BLKPG_VOLNAMELTH]; /* volume label */
58};34};
59 35
60#endif /* _UAPI__LINUX_BLKPG_H */36#endif /* _UAPI__LINUX_BLKPG_H */
include/uapi/linux/bpf.h+11−6
@@ -3850,8 +3850,7 @@ union bpf_attr { · 3849 unmodified lines
3850 *3850 *
3851 * long bpf_check_mtu(void *ctx, u32 ifindex, u32 *mtu_len, s32 len_diff, u64 flags)3851 * long bpf_check_mtu(void *ctx, u32 ifindex, u32 *mtu_len, s32 len_diff, u64 flags)
3852 * Description3852 * Description
3853 3853 * Check packet size against exceeding MTU of net device (based
3854 * Check ctx packet size against exceeding MTU of net device (based
3855 * on *ifindex*). This helper will likely be used in combination3854 * on *ifindex*). This helper will likely be used in combination
3856 * with helpers that adjust/change the packet size.3855 * with helpers that adjust/change the packet size.
3857 *3856 *
@@ -3868,6 +3867,14 @@ union bpf_attr { · 10 unmodified lines
3868 * against the current net device. This is practical if this isn't3867 * against the current net device. This is practical if this isn't
3869 * used prior to redirect.3868 * used prior to redirect.
3870 *3869 *
3870 * On input *mtu_len* must be a valid pointer, else verifier will
3871 * reject BPF program. If the value *mtu_len* is initialized to
3872 * zero then the ctx packet size is use. When value *mtu_len* is
3873 * provided as input this specify the L3 length that the MTU check
3874 * is done against. Remember XDP and TC length operate at L2, but
3875 * this value is L3 as this correlate to MTU and IP-header tot_len
3876 * values which are L3 (similar behavior as bpf_fib_lookup).
3877 *
3871 * The Linux kernel route table can configure MTUs on a more3878 * The Linux kernel route table can configure MTUs on a more
3872 * specific per route level, which is not provided by this helper.3879 * specific per route level, which is not provided by this helper.
3873 * For route level MTU checks use the **bpf_fib_lookup**\ ()3880 * For route level MTU checks use the **bpf_fib_lookup**\ ()
@@ -3892,11 +3899,9 @@ union bpf_attr { · 18 unmodified lines
3892 *3899 *
3893 * On return *mtu_len* pointer contains the MTU value of the net3900 * On return *mtu_len* pointer contains the MTU value of the net
3894 * device. Remember the net device configured MTU is the L3 size,3901 * device. Remember the net device configured MTU is the L3 size,
3895 * which is returned here and XDP and TX length operate at L2.3902 * which is returned here and XDP and TC length operate at L2.
3896 * Helper take this into account for you, but remember when using3903 * Helper take this into account for you, but remember when using
3897 * MTU value in your BPF-code. On input *mtu_len* must be a valid3904 * MTU value in your BPF-code.
3898 * pointer and be initialized (to zero), else verifier will reject
3899 * BPF program.
3900 *3905 *
3901 * Return3906 * Return
3902 * * 0 on success, and populate MTU value in *mtu_len* pointer.3907 * * 0 on success, and populate MTU value in *mtu_len* pointer.
include/uapi/linux/can.h+1−1
@@ -113,7 +113,7 @@ struct can_frame { · 112 unmodified lines
113 */113 */
114 __u8 len;114 __u8 len;
115 __u8 can_dlc; /* deprecated */115 __u8 can_dlc; /* deprecated */
116 };116 } __attribute__((packed)); /* disable padding added in some ABIs */
117 __u8 __pad; /* padding */117 __u8 __pad; /* padding */
118 __u8 __res0; /* reserved / padding */118 __u8 __res0; /* reserved / padding */
119 __u8 len8_dlc; /* optional DLC for 8 byte payload length (9 .. 15) */119 __u8 len8_dlc; /* optional DLC for 8 byte payload length (9 .. 15) */
include/uapi/linux/ethtool.h+33−21
@@ -26,6 +26,14 @@ · 25 unmodified lines
26 * have the same layout for 32-bit and 64-bit userland.26 * have the same layout for 32-bit and 64-bit userland.
27 */27 */
28 28
29/* Note on reserved space.
30 * Reserved fields must not be accessed directly by user space because
31 * they may be replaced by a different field in the future. They must
32 * be initialized to zero before making the request, e.g. via memset
33 * of the entire structure or implicitly by not being set in a structure
34 * initializer.
35 */
36
29/**37/**
30 * struct ethtool_cmd - DEPRECATED, link control and status38 * struct ethtool_cmd - DEPRECATED, link control and status
31 * This structure is DEPRECATED, please use struct ethtool_link_settings.39 * This structure is DEPRECATED, please use struct ethtool_link_settings.
@@ -67,6 +75,7 @@ · 35 unmodified lines
67 * and other link features that the link partner advertised75 * and other link features that the link partner advertised
68 * through autonegotiation; 0 if unknown or not applicable.76 * through autonegotiation; 0 if unknown or not applicable.
69 * Read-only.77 * Read-only.
78 * @reserved: Reserved for future use; see the note on reserved space.
70 *79 *
71 * The link speed in Mbps is split between @speed and @speed_hi. Use80 * The link speed in Mbps is split between @speed and @speed_hi. Use
72 * the ethtool_cmd_speed() and ethtool_cmd_speed_set() functions to81 * the ethtool_cmd_speed() and ethtool_cmd_speed_set() functions to
@@ -155,6 +164,7 @@ static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep) · 82 unmodified lines
155 * @bus_info: Device bus address. This should match the dev_name()164 * @bus_info: Device bus address. This should match the dev_name()
156 * string for the underlying bus device, if there is one. May be165 * string for the underlying bus device, if there is one. May be
157 * an empty string.166 * an empty string.
167 * @reserved2: Reserved for future use; see the note on reserved space.
158 * @n_priv_flags: Number of flags valid for %ETHTOOL_GPFLAGS and168 * @n_priv_flags: Number of flags valid for %ETHTOOL_GPFLAGS and
159 * %ETHTOOL_SPFLAGS commands; also the number of strings in the169 * %ETHTOOL_SPFLAGS commands; also the number of strings in the
160 * %ETH_SS_PRIV_FLAGS set170 * %ETH_SS_PRIV_FLAGS set
@@ -356,6 +366,7 @@ struct ethtool_eeprom { · 195 unmodified lines
356 * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting366 * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting
357 * its tx lpi (after reaching 'idle' state). Effective only when eee367 * its tx lpi (after reaching 'idle' state). Effective only when eee
358 * was negotiated and tx_lpi_enabled was set.368 * was negotiated and tx_lpi_enabled was set.
369 * @reserved: Reserved for future use; see the note on reserved space.
359 */370 */
360struct ethtool_eee {371struct ethtool_eee {
361 __u32 cmd;372 __u32 cmd;
@@ -374,6 +385,7 @@ struct ethtool_eee { · 12 unmodified lines
374 * @cmd: %ETHTOOL_GMODULEINFO385 * @cmd: %ETHTOOL_GMODULEINFO
375 * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx386 * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx
376 * @eeprom_len: Length of the eeprom387 * @eeprom_len: Length of the eeprom
388 * @reserved: Reserved for future use; see the note on reserved space.
377 *389 *
378 * This structure is used to return the information to390 * This structure is used to return the information to
379 * properly size memory for a subsequent call to %ETHTOOL_GMODULEEEPROM.391 * properly size memory for a subsequent call to %ETHTOOL_GMODULEEEPROM.
@@ -579,9 +591,7 @@ struct ethtool_pauseparam { · 199 unmodified lines
579 __u32 tx_pause;591 __u32 tx_pause;
580};592};
581 593
582/**594/* Link extended state */
583 * enum ethtool_link_ext_state - link extended state
584 */
585enum ethtool_link_ext_state {595enum ethtool_link_ext_state {
586 ETHTOOL_LINK_EXT_STATE_AUTONEG,596 ETHTOOL_LINK_EXT_STATE_AUTONEG,
587 ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE,597 ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE,
@@ -595,10 +605,7 @@ enum ethtool_link_ext_state { · 7 unmodified lines
595 ETHTOOL_LINK_EXT_STATE_OVERHEAT,605 ETHTOOL_LINK_EXT_STATE_OVERHEAT,
596};606};
597 607
598/**608/* More information in addition to ETHTOOL_LINK_EXT_STATE_AUTONEG. */
599 * enum ethtool_link_ext_substate_autoneg - more information in addition to
600 * ETHTOOL_LINK_EXT_STATE_AUTONEG.
601 */
602enum ethtool_link_ext_substate_autoneg {609enum ethtool_link_ext_substate_autoneg {
603 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 1,610 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 1,
604 ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED,611 ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED,
@@ -608,9 +615,7 @@ enum ethtool_link_ext_substate_autoneg { · 3 unmodified lines
608 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD,615 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD,
609};616};
610 617
611/**618/* More information in addition to ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE.
612 * enum ethtool_link_ext_substate_link_training - more information in addition to
613 * ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE.
614 */619 */
615enum ethtool_link_ext_substate_link_training {620enum ethtool_link_ext_substate_link_training {
616 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 1,621 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 1,
@@ -619,9 +624,7 @@ enum ethtool_link_ext_substate_link_training { · 2 unmodified lines
619 ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT,624 ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT,
620};625};
621 626
622/**627/* More information in addition to ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH.
623 * enum ethtool_link_ext_substate_logical_mismatch - more information in addition
624 * to ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH.
625 */628 */
626enum ethtool_link_ext_substate_link_logical_mismatch {629enum ethtool_link_ext_substate_link_logical_mismatch {
627 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 1,630 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 1,
@@ -631,19 +634,14 @@ enum ethtool_link_ext_substate_link_logical_mismatch { · 3 unmodified lines
631 ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED,634 ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED,
632};635};
633 636
634/**637/* More information in addition to ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY.
635 * enum ethtool_link_ext_substate_bad_signal_integrity - more information in
636 * addition to ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY.
637 */638 */
638enum ethtool_link_ext_substate_bad_signal_integrity {639enum ethtool_link_ext_substate_bad_signal_integrity {
639 ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 1,640 ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 1,
640 ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE,641 ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE,
641};642};
642 643
643/**644/* More information in addition to ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE. */
644 * enum ethtool_link_ext_substate_cable_issue - more information in
645 * addition to ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE.
646 */
647enum ethtool_link_ext_substate_cable_issue {645enum ethtool_link_ext_substate_cable_issue {
648 ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 1,646 ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 1,
649 ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE,647 ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE,
@@ -661,6 +659,7 @@ enum ethtool_link_ext_substate_cable_issue { · 11 unmodified lines
661 * now deprecated659 * now deprecated
662 * @ETH_SS_FEATURES: Device feature names660 * @ETH_SS_FEATURES: Device feature names
663 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names661 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
662 * @ETH_SS_TUNABLES: tunable names
664 * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS663 * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
665 * @ETH_SS_PHY_TUNABLES: PHY tunable names664 * @ETH_SS_PHY_TUNABLES: PHY tunable names
666 * @ETH_SS_LINK_MODES: link mode names665 * @ETH_SS_LINK_MODES: link mode names
@@ -670,6 +669,8 @@ enum ethtool_link_ext_substate_cable_issue { · 3 unmodified lines
670 * @ETH_SS_TS_TX_TYPES: timestamping Tx types669 * @ETH_SS_TS_TX_TYPES: timestamping Tx types
671 * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters670 * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
672 * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types671 * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
672 *
673 * @ETH_SS_COUNT: number of defined string sets
673 */674 */
674enum ethtool_stringset {675enum ethtool_stringset {
675 ETH_SS_TEST = 0,676 ETH_SS_TEST = 0,
@@ -715,6 +716,7 @@ struct ethtool_gstrings { · 39 unmodified lines
715/**716/**
716 * struct ethtool_sset_info - string set information717 * struct ethtool_sset_info - string set information
717 * @cmd: Command number = %ETHTOOL_GSSET_INFO718 * @cmd: Command number = %ETHTOOL_GSSET_INFO
719 * @reserved: Reserved for future use; see the note on reserved space.
718 * @sset_mask: On entry, a bitmask of string sets to query, with bits720 * @sset_mask: On entry, a bitmask of string sets to query, with bits
719 * numbered according to &enum ethtool_stringset. On return, a721 * numbered according to &enum ethtool_stringset. On return, a
720 * bitmask of those string sets queried that are supported.722 * bitmask of those string sets queried that are supported.
@@ -759,6 +761,7 @@ enum ethtool_test_flags { · 38 unmodified lines
759 * @flags: A bitmask of flags from &enum ethtool_test_flags. Some761 * @flags: A bitmask of flags from &enum ethtool_test_flags. Some
760 * flags may be set by the user on entry; others may be set by762 * flags may be set by the user on entry; others may be set by
761 * the driver on return.763 * the driver on return.
764 * @reserved: Reserved for future use; see the note on reserved space.
762 * @len: On return, the number of test results765 * @len: On return, the number of test results
763 * @data: Array of test results766 * @data: Array of test results
764 *767 *
@@ -959,6 +962,7 @@ union ethtool_flow_union { · 194 unmodified lines
959 * @vlan_etype: VLAN EtherType962 * @vlan_etype: VLAN EtherType
960 * @vlan_tci: VLAN tag control information963 * @vlan_tci: VLAN tag control information
961 * @data: user defined data964 * @data: user defined data
965 * @padding: Reserved for future use; see the note on reserved space.
962 *966 *
963 * Note, @vlan_etype, @vlan_tci, and @data are only valid if %FLOW_EXT967 * Note, @vlan_etype, @vlan_tci, and @data are only valid if %FLOW_EXT
964 * is set in &struct ethtool_rx_flow_spec @flow_type.968 * is set in &struct ethtool_rx_flow_spec @flow_type.
@@ -1134,7 +1138,8 @@ struct ethtool_rxfh_indir { · 169 unmodified lines
1134 * hardware hash key.1138 * hardware hash key.
1135 * @hfunc: Defines the current RSS hash function used by HW (or to be set to).1139 * @hfunc: Defines the current RSS hash function used by HW (or to be set to).
1136 * Valid values are one of the %ETH_RSS_HASH_*.1140 * Valid values are one of the %ETH_RSS_HASH_*.
1137 * @rsvd: Reserved for future extensions.1141 * @rsvd8: Reserved for future use; see the note on reserved space.
1142 * @rsvd32: Reserved for future use; see the note on reserved space.
1138 * @rss_config: RX ring/queue index for each hash value i.e., indirection table1143 * @rss_config: RX ring/queue index for each hash value i.e., indirection table
1139 * of @indir_size __u32 elements, followed by hash key of @key_size1144 * of @indir_size __u32 elements, followed by hash key of @key_size
1140 * bytes.1145 * bytes.
@@ -1302,7 +1307,9 @@ struct ethtool_sfeatures { · 161 unmodified lines
1302 * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMPING flags1307 * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMPING flags
1303 * @phc_index: device index of the associated PHC, or -1 if there is none1308 * @phc_index: device index of the associated PHC, or -1 if there is none
1304 * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration values1309 * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration values
1310 * @tx_reserved: Reserved for future use; see the note on reserved space.
1305 * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumeration values1311 * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumeration values
1312 * @rx_reserved: Reserved for future use; see the note on reserved space.
1306 *1313 *
1307 * The bits in the 'tx_types' and 'rx_filters' fields correspond to1314 * The bits in the 'tx_types' and 'rx_filters' fields correspond to
1308 * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,1315 * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,
@@ -1958,6 +1965,11 @@ enum ethtool_reset_flags { · 649 unmodified lines
1958 * autonegotiation; 0 if unknown or not applicable. Read-only.1965 * autonegotiation; 0 if unknown or not applicable. Read-only.
1959 * @transceiver: Used to distinguish different possible PHY types,1966 * @transceiver: Used to distinguish different possible PHY types,
1960 * reported consistently by PHYLIB. Read-only.1967 * reported consistently by PHYLIB. Read-only.
1968 * @master_slave_cfg: Master/slave port mode.
1969 * @master_slave_state: Master/slave port state.
1970 * @reserved: Reserved for future use; see the note on reserved space.
1971 * @reserved1: Reserved for future use; see the note on reserved space.
1972 * @link_mode_masks: Variable length bitmaps.
1961 *1973 *
1962 * If autonegotiation is disabled, the speed and @duplex represent the1974 * If autonegotiation is disabled, the speed and @duplex represent the
1963 * fixed link mode and are writable if the driver supports multiple1975 * fixed link mode and are writable if the driver supports multiple
include/uapi/linux/fuse.h+2−1
@@ -903,7 +903,8 @@ struct fuse_notify_retrieve_in { · 902 unmodified lines
903};903};
904 904
905/* Device ioctls: */905/* Device ioctls: */
906#define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t)906#define FUSE_DEV_IOC_MAGIC 229
907#define FUSE_DEV_IOC_CLONE _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t)
907 908
908struct fuse_lseek_in {909struct fuse_lseek_in {
909 uint64_t fh;910 uint64_t fh;
include/uapi/linux/idxd.h+2−2
@@ -247,8 +247,8 @@ struct dsa_completion_record { · 246 unmodified lines
247 uint32_t rsvd2:8;247 uint32_t rsvd2:8;
248 };248 };
249 249
250 uint16_t delta_rec_size;250 uint32_t delta_rec_size;
251 uint16_t crc_val;251 uint32_t crc_val;
252 252
253 /* DIF check & strip */253 /* DIF check & strip */
254 struct {254 struct {
include/uapi/linux/l2tp.h+1−0
@@ -145,6 +145,7 @@ enum { · 144 unmodified lines
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_RX_COOKIE_DISCARDS, /* u64 */
148 L2TP_ATTR_RX_INVALID, /* u64 */
148 __L2TP_ATTR_STATS_MAX,149 __L2TP_ATTR_STATS_MAX,
149};150};
150 151
include/uapi/linux/netfilter/nfnetlink_cthelper.h+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
5#define NFCT_HELPER_STATUS_DISABLED 05#define NFCT_HELPER_STATUS_DISABLED 0
6#define NFCT_HELPER_STATUS_ENABLED 16#define NFCT_HELPER_STATUS_ENABLED 1
7 7
8enum nfnl_acct_msg_types {8enum nfnl_cthelper_msg_types {
9 NFNL_MSG_CTHELPER_NEW,9 NFNL_MSG_CTHELPER_NEW,
10 NFNL_MSG_CTHELPER_GET,10 NFNL_MSG_CTHELPER_GET,
11 NFNL_MSG_CTHELPER_DEL,11 NFNL_MSG_CTHELPER_DEL,
include/uapi/linux/psample.h+1−4
@@ -3,7 +3,6 @@ · 2 unmodified lines
3#define __UAPI_PSAMPLE_H3#define __UAPI_PSAMPLE_H
4 4
5enum {5enum {
6 /* sampled packet metadata */
7 PSAMPLE_ATTR_IIFINDEX,6 PSAMPLE_ATTR_IIFINDEX,
8 PSAMPLE_ATTR_OIFINDEX,7 PSAMPLE_ATTR_OIFINDEX,
9 PSAMPLE_ATTR_ORIGSIZE,8 PSAMPLE_ATTR_ORIGSIZE,
@@ -11,10 +10,8 @@ enum { · 1 unmodified line
11 PSAMPLE_ATTR_GROUP_SEQ,10 PSAMPLE_ATTR_GROUP_SEQ,
12 PSAMPLE_ATTR_SAMPLE_RATE,11 PSAMPLE_ATTR_SAMPLE_RATE,
13 PSAMPLE_ATTR_DATA,12 PSAMPLE_ATTR_DATA,
14 PSAMPLE_ATTR_TUNNEL,
15
16 /* commands attributes */
17 PSAMPLE_ATTR_GROUP_REFCOUNT,13 PSAMPLE_ATTR_GROUP_REFCOUNT,
14 PSAMPLE_ATTR_TUNNEL,
18 15
19 __PSAMPLE_ATTR_MAX16 __PSAMPLE_ATTR_MAX
20};17};
include/uapi/linux/rfkill.h+68−12
@@ -86,34 +86,90 @@ enum rfkill_hard_block_reasons { · 85 unmodified lines
86 * @op: operation code86 * @op: operation code
87 * @hard: hard state (0/1)87 * @hard: hard state (0/1)
88 * @soft: soft state (0/1)88 * @soft: soft state (0/1)
89 *
90 * Structure used for userspace communication on /dev/rfkill,
91 * used for events from the kernel and control to the kernel.
92 */
93struct rfkill_event {
94 __u32 idx;
95 __u8 type;
96 __u8 op;
97 __u8 soft;
98 __u8 hard;
99} __attribute__((packed));
100
101/**
102 * struct rfkill_event_ext - events for userspace on /dev/rfkill
103 * @idx: index of dev rfkill
104 * @type: type of the rfkill struct
105 * @op: operation code
106 * @hard: hard state (0/1)
107 * @soft: soft state (0/1)
89 * @hard_block_reasons: valid if hard is set. One or several reasons from108 * @hard_block_reasons: valid if hard is set. One or several reasons from
90 * &enum rfkill_hard_block_reasons.109 * &enum rfkill_hard_block_reasons.
91 *110 *
92 * Structure used for userspace communication on /dev/rfkill,111 * Structure used for userspace communication on /dev/rfkill,
93 * used for events from the kernel and control to the kernel.112 * used for events from the kernel and control to the kernel.
113 *
114 * See the extensibility docs below.
94 */115 */
95struct rfkill_event {116struct rfkill_event_ext {
96 __u32 idx;117 __u32 idx;
97 __u8 type;118 __u8 type;
98 __u8 op;119 __u8 op;
99 __u8 soft;120 __u8 soft;
100 __u8 hard;121 __u8 hard;
122
123 /*
124 * older kernels will accept/send only up to this point,
125 * and if extended further up to any chunk marked below
126 */
127
101 __u8 hard_block_reasons;128 __u8 hard_block_reasons;
102} __attribute__((packed));129} __attribute__((packed));
103 130
104/*131/**
105 * We are planning to be backward and forward compatible with changes132 * DOC: Extensibility
106 * to the event struct, by adding new, optional, members at the end.133 *
107 * When reading an event (whether the kernel from userspace or vice134 * Originally, we had planned to allow backward and forward compatible
108 * versa) we need to accept anything that's at least as large as the135 * changes by just adding fields at the end of the structure that are
109 * version 1 event size, but might be able to accept other sizes in136 * then not reported on older kernels on read(), and not written to by
110 * the future.137 * older kernels on write(), with the kernel reporting the size it did
138 * accept as the result.
139 *
140 * This would have allowed userspace to detect on read() and write()
141 * which kernel structure version it was dealing with, and if was just
142 * recompiled it would have gotten the new fields, but obviously not
143 * accessed them, but things should've continued to work.
144 *
145 * Unfortunately, while actually exercising this mechanism to add the
146 * hard block reasons field, we found that userspace (notably systemd)
147 * did all kinds of fun things not in line with this scheme:
148 *
149 * 1. treat the (expected) short writes as an error;
150 * 2. ask to read sizeof(struct rfkill_event) but then compare the
151 * actual return value to RFKILL_EVENT_SIZE_V1 and treat any
152 * mismatch as an error.
153 *
154 * As a consequence, just recompiling with a new struct version caused
155 * things to no longer work correctly on old and new kernels.
156 *
157 * Hence, we've rolled back &struct rfkill_event to the original version
158 * and added &struct rfkill_event_ext. This effectively reverts to the
159 * old behaviour for all userspace, unless it explicitly opts in to the
160 * rules outlined here by using the new &struct rfkill_event_ext.
161 *
162 * Userspace using &struct rfkill_event_ext must adhere to the following
163 * rules
111 *164 *
112 * One exception is the kernel -- we already have two event sizes in165 * 1. accept short writes, optionally using them to detect that it's
113 * that we've made the 'hard' member optional since our only option166 * running on an older kernel;
114 * is to ignore it anyway.167 * 2. accept short reads, knowing that this means it's running on an
168 * older kernel;
169 * 3. treat reads that are as long as requested as acceptable, not
170 * checking against RFKILL_EVENT_SIZE_V1 or such.
115 */171 */
116#define RFKILL_EVENT_SIZE_V1 8172#define RFKILL_EVENT_SIZE_V1 sizeof(struct rfkill_event)
117 173
118/* ioctl for turning off rfkill-input (if present) */174/* ioctl for turning off rfkill-input (if present) */
119#define RFKILL_IOC_MAGIC 'R'175#define RFKILL_IOC_MAGIC 'R'