summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-11-12 11:00:28 -0800
committerJakub Kicinski <kuba@kernel.org>2026-11-12 11:00:30 -0800
commitb40ffe8c3ad6fd4dd411b16014c2926b52c8be4d (patch)
tree37141eb69638149dd0ecb99a5384190e438ee9f9 /include/uapi/linux
parentd079daad4f97b97a1432b69670c6a92148a9858f (diff)
parentd5c0415dfb58b646696292a7af3d084200933f84 (diff)
downloadlinux-next-b40ffe8c3ad6fd4dd411b16014c2926b52c8be4d.tar.gz
linux-next-b40ffe8c3ad6fd4dd411b16014c2926b52c8be4d.zip
Merge tag 'batadv-next-pullrequest-20261111' of https://git.open-mesh.org/batadv
Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - mcast: explicitly initialize mcast.*_want_all_rtr{4,6), by Sven Eckelmann (2 patches) - uapi: add note/clarification on access of reserved bytes/bits, by Linus Lüssing The remaining patches are authored by Sven Eckelmann: - avoid torn u64 counter reads on 32-bit systems - bat_v: initialize last_unicast_tx on neighbor creation - anotate various timestamps with READ/WRITE_ONCE (6 patches) - use matching return types for bool and void functions - mark read-only MAC address parameters as const - use bool for boolean flags - mcast: document the value stored in is_routable * tag 'batadv-next-pullrequest-20261111' of https://git.open-mesh.org/batadv: batman-adv: mcast: document the value stored in is_routable batman-adv: use bool for boolean flags batman-adv: mark read-only MAC address parameters as const batman-adv: use matching return types for bool and void functions batman-adv: annotate hardif_neigh_node last_seen with READ/WRITE_ONCE batman-adv: annotate neigh_node last_seen with READ/WRITE_ONCE batman-adv: annotate originator last_seen with READ/WRITE_ONCE batman-adv: tt: annotate last_seen with READ/WRITE_ONCE batman-adv: bla: avoid negative reported BATADV_ATTR_LAST_SEEN_MSECS batman-adv: dat: annotate last_update with READ/WRITE_ONCE batman-adv: bat_v: initialize last_unicast_tx on neighbor creation batman-adv: avoid torn u64 counter reads on 32-bit systems batman-adv: uapi: add note/clarification on access of reserved bytes/bits batman-adv: mcast: explicitly initialize mcast.want_all_rtr{4,6}_list batman-adv: mcast: explicitly initialize mcast.num_want_all_rtr{4,6) ==================== Link: https://patch.msgid.link/20261111102729.2096241-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/batadv_packet.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/include/uapi/linux/batadv_packet.h b/include/uapi/linux/batadv_packet.h
index 32436560ecc8..67e2bad7407b 100644
--- a/include/uapi/linux/batadv_packet.h
+++ b/include/uapi/linux/batadv_packet.h
@@ -12,6 +12,14 @@
#include <linux/stddef.h>
#include <linux/types.h>
+/* Note on reserved space.
+ * Reserved fields must not be accessed directly by user space because
+ * they may be replaced by a different field in the future. They must
+ * be initialized to zero before making the request, e.g. via memset
+ * of the entire structure or implicitly by not being set in a structure
+ * initializer.
+ */
+
/**
* batadv_tp_is_error() - Check throughput meter return code for error
* @n: throughput meter return code
@@ -216,7 +224,7 @@ struct batadv_bla_claim_dst {
* @seqno: sequence identification
* @orig: address of the source node
* @prev_sender: address of the previous sender
- * @reserved: reserved byte for alignment
+ * @reserved: reserved for alignment; also see note on reserved space
* @tq: transmission quality
* @tvlv_len: length of tvlv data following the ogm header
*/
@@ -312,7 +320,7 @@ struct batadv_icmp_header {
* @dst: address of the destination node
* @orig: address of the source node
* @uid: local ICMP socket identifier
- * @reserved: not used - useful for alignment
+ * @reserved: reserved for alignment; also see note on reserved space
* @seqno: ICMP sequence number
*/
struct batadv_icmp_packet {
@@ -433,7 +441,7 @@ struct batadv_unicast_packet {
* @u: common unicast packet header
* @src: address of the source
* @subtype: packet subtype
- * @reserved: reserved byte for alignment
+ * @reserved: reserved for alignment; also see note on reserved space
*/
struct batadv_unicast_4addr_packet {
struct batadv_unicast_packet u;
@@ -454,7 +462,7 @@ struct batadv_unicast_4addr_packet {
* @orig: originator of the fragment used when merging the packet
* @no: fragment number within this sequence
* @priority: priority of frame, from ToS IP precedence or 802.1p
- * @reserved: reserved byte for alignment
+ * @reserved: reserved for alignment; also see note on reserved space
* @seqno: sequence identification
* @total_size: size of the merged packet
*/
@@ -484,7 +492,7 @@ struct batadv_frag_packet {
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
- * @reserved: reserved byte for alignment
+ * @reserved: reserved for alignment; also see note on reserved space
* @seqno: sequence identification
* @orig: originator of the broadcast packet
*/
@@ -505,7 +513,7 @@ struct batadv_bcast_packet {
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
- * @reserved: reserved byte for alignment
+ * @reserved: reserved for alignment; also see note on reserved space
* @tvlv_len: length of the appended tvlv buffer (in bytes)
*/
struct batadv_mcast_packet {
@@ -559,7 +567,7 @@ struct batadv_coded_packet {
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
- * @reserved: reserved field (for packet alignment)
+ * @reserved: reserved for alignment; also see note on reserved space
* @dst: address of the destination
* @src: address of the source
* @tvlv_len: length of tvlv data following the unicast tvlv header
@@ -604,7 +612,7 @@ struct batadv_tvlv_gateway_data {
* the tt tvlv container
* @crc: crc32 checksum of the entries belonging to this vlan
* @vid: vlan identifier
- * @reserved: unused, useful for alignment purposes
+ * @reserved: reserved for alignment; also see note on reserved space
*/
struct batadv_tvlv_tt_vlan_data {
__be32 crc;
@@ -631,7 +639,7 @@ struct batadv_tvlv_tt_data {
* struct batadv_tvlv_tt_change - translation table diff data
* @flags: status indicators concerning the non-mesh client (see
* batadv_tt_client_flags)
- * @reserved: reserved field - useful for alignment purposes only
+ * @reserved: reserved for alignment; also see note on reserved space
* @addr: mac address of non-mesh client that triggered this tt change
* @vid: VLAN identifier
*/
@@ -655,7 +663,7 @@ struct batadv_tvlv_roam_adv {
/**
* struct batadv_tvlv_mcast_data - payload of a multicast tvlv
* @flags: multicast flags announced by the orig node
- * @reserved: reserved field
+ * @reserved: reserved for alignment; also see note on reserved space
*/
struct batadv_tvlv_mcast_data {
__u8 flags;