lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4TjzzB8NSnTy_Wa@linux.ibm.com>
Date: Mon, 13 Jan 2025 15:28:39 +0530
From: Vishal Chourasia <vishalc@...ux.ibm.com>
To: bpf@...r.kernel.org, daniel@...earbox.net, maciej.fijalkowski@...el.com,
        sdf@...ichev.me, netdev@...r.kernel.org, sdf@...gle.com,
        kuba@...nel.org, yoong.siang.song@...el.com, ast@...nel.org
Subject: [RFC] Fix mismatch in if_xdp.h between tools and kernel UAPI

Hello all,

While building libbpf, I encountered the following warning:

Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'

A brief diff shows discrepancies in the doc comments regarding `union
xsk_tx_metadata` vs. `struct xsk_tx_metadata` references. Below is the
relevant snippet:
$ diff tools/include/uapi/linux/if_xdp.h include/uapi/linux/if_xdp.h
120c120
<  * field of union xsk_tx_metadata.
---
>  * field of struct xsk_tx_metadata.
125c125
<  * are communicated via csum_start and csum_offset fields of union
---
>  * are communicated via csum_start and csum_offset fields of struct

This patch aligns the documentation in
`tools/include/uapi/linux/if_xdp.h` with the kernel UAPI header in
`include/uapi/linux/if_xdp.h` to remove the mismatch and associated
warning.

Please consider applying this fix. Let me know if there are any
questions or if additional changes are needed.

vishal.c

diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/uapi/linux/if_xdp.h
index 2f082b01ff228..42ec5ddaab8dc 100644
--- a/tools/include/uapi/linux/if_xdp.h
+++ b/tools/include/uapi/linux/if_xdp.h
@@ -117,12 +117,12 @@ struct xdp_options {
        ((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1)

 /* Request transmit timestamp. Upon completion, put it into tx_timestamp
- * field of union xsk_tx_metadata.
+ * field of struct xsk_tx_metadata.
  */
 #define XDP_TXMD_FLAGS_TIMESTAMP               (1 << 0)

 /* Request transmit checksum offload. Checksum start position and offset
- * are communicated via csum_start and csum_offset fields of union
+ * are communicated via csum_start and csum_offset fields of struct
  * xsk_tx_metadata.
  */
 #define XDP_TXMD_FLAGS_CHECKSUM                        (1 << 1)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ