* [PATCH] doc: announce changes in structure alignments for UBSan
@ 2025-07-09 12:40 David Marchand
2025-07-09 12:49 ` Bruce Richardson
2025-07-09 12:58 ` Morten Brørup
0 siblings, 2 replies; 3+ messages in thread
From: David Marchand @ 2025-07-09 12:40 UTC (permalink / raw)
To: dev; +Cc: thomas, techboard
As part of the effort to limit undefined behaviors in DPDK code, some
structure alignments revealed not to be accurate enough.
At the moment two structures have been identified but others may be
found while running more parts of DPDK with UBSan.
Though the calling code can explicitly request alignment,
we would prefer to put the alignment constraints as part of the
structure definition itself.
Such changes are ABI breakages.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
doc/guides/rel_notes/deprecation.rst | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e2d4125308..4ae561d670 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -57,6 +57,10 @@ Deprecation Notices
``__atomic_thread_fence`` must be used for patches that need to be merged in
20.08 onwards. This change will not introduce any performance degradation.
+* lib: multiple issues relating to unaligned accesses have been detected using the UBSan checker.
+ As part of resolving those issues, alignment in some structures will be updated in 25.11,
+ namely (but not exhaustively): ``struct rte_stack_lf_head`` and ``struct rte_mp_msg``.
+
* lib: will fix extending some enum/define breaking the ABI. There are multiple
samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
used by iterators, and arrays holding these values are sized with this
--
2.50.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] doc: announce changes in structure alignments for UBSan
2025-07-09 12:40 [PATCH] doc: announce changes in structure alignments for UBSan David Marchand
@ 2025-07-09 12:49 ` Bruce Richardson
2025-07-09 12:58 ` Morten Brørup
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-07-09 12:49 UTC (permalink / raw)
To: David Marchand; +Cc: dev, thomas, techboard
On Wed, Jul 09, 2025 at 02:40:22PM +0200, David Marchand wrote:
> As part of the effort to limit undefined behaviors in DPDK code, some
> structure alignments revealed not to be accurate enough.
> At the moment two structures have been identified but others may be
> found while running more parts of DPDK with UBSan.
>
> Though the calling code can explicitly request alignment,
> we would prefer to put the alignment constraints as part of the
> structure definition itself.
>
> Such changes are ABI breakages.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] doc: announce changes in structure alignments for UBSan
2025-07-09 12:40 [PATCH] doc: announce changes in structure alignments for UBSan David Marchand
2025-07-09 12:49 ` Bruce Richardson
@ 2025-07-09 12:58 ` Morten Brørup
1 sibling, 0 replies; 3+ messages in thread
From: Morten Brørup @ 2025-07-09 12:58 UTC (permalink / raw)
To: David Marchand, dev; +Cc: thomas, techboard
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Wednesday, 9 July 2025 14.40
>
> As part of the effort to limit undefined behaviors in DPDK code, some
> structure alignments revealed not to be accurate enough.
> At the moment two structures have been identified but others may be
> found while running more parts of DPDK with UBSan.
>
> Though the calling code can explicitly request alignment,
> we would prefer to put the alignment constraints as part of the
> structure definition itself.
>
> Such changes are ABI breakages.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index e2d4125308..4ae561d670 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -57,6 +57,10 @@ Deprecation Notices
> ``__atomic_thread_fence`` must be used for patches that need to be
> merged in
> 20.08 onwards. This change will not introduce any performance
> degradation.
>
> +* lib: multiple issues relating to unaligned accesses have been
> detected using the UBSan checker.
> + As part of resolving those issues, alignment in some structures will
> be updated in 25.11,
> + namely (but not exhaustively): ``struct rte_stack_lf_head`` and
> ``struct rte_mp_msg``.
> +
> * lib: will fix extending some enum/define breaking the ABI. There are
> multiple
> samples in DPDK that enum/define terminated with a ``.*MAX.*`` value
> which is
> used by iterators, and arrays holding these values are sized with
> this
> --
> 2.50.0
Yes, please.
Acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-09 12:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-09 12:40 [PATCH] doc: announce changes in structure alignments for UBSan David Marchand
2025-07-09 12:49 ` Bruce Richardson
2025-07-09 12:58 ` Morten Brørup
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).