* [PATCH] RDMA/irdma: fix irdma_alloc_ucontext_resp padding
@ 2025-12-08 13:38 Arnd Bergmann
2025-12-15 6:42 ` Geert Uytterhoeven
2025-12-17 1:46 ` Jason Gunthorpe
0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2025-12-08 13:38 UTC (permalink / raw)
To: Krzysztof Czurylo, Tatyana Nikolova, Jason Gunthorpe,
Leon Romanovsky, Faisal Latif
Cc: Arnd Bergmann, Mustafa Ismail, linux-rdma, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
A recent modified struct irdma_alloc_ucontext_resp by adding a member
with implicit padding in front of it, changing the ABI in an
incompatibible way on all architectures other than m68k, as
reported by scripts/check-uapi.sh:
==== ABI differences detected in include/rdma/irdma-abi.h from 1dd7bde2e91c -> HEAD ====
[C] 'struct irdma_alloc_ucontext_resp' changed:
type size changed from 704 to 640 (in bits)
1 data member deletion:
'__u8 rsvd3[2]', at offset 640 (in bits) at irdma-abi.h:61:1
1 data member insertion:
'__u8 revd3[2]', at offset 592 (in bits) at irdma-abi.h:60:1
Change the ABI back to the previous version, by moving the new
max_hw_srq_quanta member into a naturally aligned location.
Fixes: 563e1feb5f6e ("RDMA/irdma: Add SRQ support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/uapi/rdma/irdma-abi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/rdma/irdma-abi.h b/include/uapi/rdma/irdma-abi.h
index f7788d33376b..36f20802bcc8 100644
--- a/include/uapi/rdma/irdma-abi.h
+++ b/include/uapi/rdma/irdma-abi.h
@@ -57,8 +57,8 @@ struct irdma_alloc_ucontext_resp {
__u8 rsvd2;
__aligned_u64 comp_mask;
__u16 min_hw_wq_size;
+ __u8 revd3[2];
__u32 max_hw_srq_quanta;
- __u8 rsvd3[2];
};
struct irdma_alloc_pd_resp {
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] RDMA/irdma: fix irdma_alloc_ucontext_resp padding
2025-12-08 13:38 [PATCH] RDMA/irdma: fix irdma_alloc_ucontext_resp padding Arnd Bergmann
@ 2025-12-15 6:42 ` Geert Uytterhoeven
2025-12-16 14:17 ` Jacob Moroni
2025-12-17 1:46 ` Jason Gunthorpe
1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2025-12-15 6:42 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Krzysztof Czurylo, Tatyana Nikolova, Jason Gunthorpe,
Leon Romanovsky, Faisal Latif, Arnd Bergmann, Mustafa Ismail,
linux-rdma, linux-kernel
Hi Arnd,
On Mon, 8 Dec 2025 at 14:39, Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> A recent modified struct irdma_alloc_ucontext_resp by adding a member
> with implicit padding in front of it, changing the ABI in an
> incompatibible way on all architectures other than m68k, as
> reported by scripts/check-uapi.sh:
>
> ==== ABI differences detected in include/rdma/irdma-abi.h from 1dd7bde2e91c -> HEAD ====
> [C] 'struct irdma_alloc_ucontext_resp' changed:
> type size changed from 704 to 640 (in bits)
> 1 data member deletion:
> '__u8 rsvd3[2]', at offset 640 (in bits) at irdma-abi.h:61:1
> 1 data member insertion:
> '__u8 revd3[2]', at offset 592 (in bits) at irdma-abi.h:60:1
>
> Change the ABI back to the previous version, by moving the new
> max_hw_srq_quanta member into a naturally aligned location.
>
> Fixes: 563e1feb5f6e ("RDMA/irdma: Add SRQ support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for the discussion in Tokyo!
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] RDMA/irdma: fix irdma_alloc_ucontext_resp padding
2025-12-15 6:42 ` Geert Uytterhoeven
@ 2025-12-16 14:17 ` Jacob Moroni
2025-12-16 16:06 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: Jacob Moroni @ 2025-12-16 14:17 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Arnd Bergmann, Krzysztof Czurylo, Tatyana Nikolova,
Jason Gunthorpe, Leon Romanovsky, Faisal Latif, Arnd Bergmann,
Mustafa Ismail, linux-rdma, linux-kernel
Hi,
This doesn't change the offset of max_hw_srq_quanta on my system, but I tested
with a verbs provider built with the previous and new proposed change
just in case,
and both worked.
Out of curiosity, what is the policy for increasing the size of these
uverbs driver
response structures? I think the response gets silently truncated if the user
provides a smaller buffer, so this shouldn't have broken any user applications
using the old ABI IIUC.
Thanks!
Tested-by: Jacob Moroni <jmoroni@google.com>
On Mon, Dec 15, 2025 at 1:43 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Arnd,
>
> On Mon, 8 Dec 2025 at 14:39, Arnd Bergmann <arnd@kernel.org> wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > A recent modified struct irdma_alloc_ucontext_resp by adding a member
> > with implicit padding in front of it, changing the ABI in an
> > incompatibible way on all architectures other than m68k, as
> > reported by scripts/check-uapi.sh:
> >
> > ==== ABI differences detected in include/rdma/irdma-abi.h from 1dd7bde2e91c -> HEAD ====
> > [C] 'struct irdma_alloc_ucontext_resp' changed:
> > type size changed from 704 to 640 (in bits)
> > 1 data member deletion:
> > '__u8 rsvd3[2]', at offset 640 (in bits) at irdma-abi.h:61:1
> > 1 data member insertion:
> > '__u8 revd3[2]', at offset 592 (in bits) at irdma-abi.h:60:1
> >
> > Change the ABI back to the previous version, by moving the new
> > max_hw_srq_quanta member into a naturally aligned location.
> >
> > Fixes: 563e1feb5f6e ("RDMA/irdma: Add SRQ support")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Thanks for the discussion in Tokyo!
>
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] RDMA/irdma: fix irdma_alloc_ucontext_resp padding
2025-12-16 14:17 ` Jacob Moroni
@ 2025-12-16 16:06 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2025-12-16 16:06 UTC (permalink / raw)
To: Jacob Moroni
Cc: Arnd Bergmann, Krzysztof Czurylo, Tatyana Nikolova,
Jason Gunthorpe, Leon Romanovsky, Faisal Latif, Arnd Bergmann,
Mustafa Ismail, linux-rdma, linux-kernel
Hi Jacob,
On Tue, 16 Dec 2025 at 15:17, Jacob Moroni <jmoroni@google.com> wrote:
> This doesn't change the offset of max_hw_srq_quanta on my system, but I tested
> with a verbs provider built with the previous and new proposed change
> just in case,
> and both worked.
It indeed doesn't change the offset of that field (except on m68k),
but it should restore the size of the structure to what it was before.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RDMA/irdma: fix irdma_alloc_ucontext_resp padding
2025-12-08 13:38 [PATCH] RDMA/irdma: fix irdma_alloc_ucontext_resp padding Arnd Bergmann
2025-12-15 6:42 ` Geert Uytterhoeven
@ 2025-12-17 1:46 ` Jason Gunthorpe
1 sibling, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2025-12-17 1:46 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Krzysztof Czurylo, Tatyana Nikolova, Leon Romanovsky,
Faisal Latif, Arnd Bergmann, Mustafa Ismail, linux-rdma,
linux-kernel
On Mon, Dec 08, 2025 at 02:38:44PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> A recent modified struct irdma_alloc_ucontext_resp by adding a member
> with implicit padding in front of it, changing the ABI in an
> incompatibible way on all architectures other than m68k, as
> reported by scripts/check-uapi.sh:
The growth of the structure should be tolerated, that is how the ABI
is expected to work, though this is wrong and should be fixed while we
still can.
Applied to for-rc
Thanks,
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-12-17 1:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-08 13:38 [PATCH] RDMA/irdma: fix irdma_alloc_ucontext_resp padding Arnd Bergmann
2025-12-15 6:42 ` Geert Uytterhoeven
2025-12-16 14:17 ` Jacob Moroni
2025-12-16 16:06 ` Geert Uytterhoeven
2025-12-17 1:46 ` Jason Gunthorpe
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).