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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1bef81ba-be81-49df-9d86-3cc0cc4bf864@163.com>
Date: Thu, 18 Dec 2025 22:59:13 -0800
From: Zhu Yanjun <mounter625@....com>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
 Zhu Yanjun <yanjun.zhu@...ux.dev>, Leon Romanovsky <leon@...nel.org>
Cc: Jason Gunthorpe <jgg@...dia.com>,
 "Gustavo A. R. Silva" <gustavoars@...nel.org>,
 Zhu Yanjun <zyjzyj2000@...il.com>, linux-rdma@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] RDMA/rxe: Avoid -Wflex-array-member-not-at-end
 warnings


在 2025/12/18 21:48, Gustavo A. R. Silva 写道:
>
>> The struct rxe_recv_wqe is as below.
>>
>> struct rxe_recv_wqe {
>>      __aligned_u64       wr_id;
>>      __u32           reserved;
>>      __u32           padding;
>>      struct rxe_dma_info dma;
>
> Expand struct rxe_dma_info here.

Thanks. In struct rxe_dma_info, the struct is

struct rxe_sge {
        __aligned_u64 addr;
        __u32   length;
        __u32   lkey;
};

But in your commit, struct ib_sge is used.

struct ib_sge {
     u64 addr;
     u32 length;
     u32 lkey;
};
__aligned_u64 is a 64-bit integer with a guaranteed 8-byte alignment,

used to preserve ABI correctness across architectures and between

userspace and kernel, while u64 has architecture-dependent alignment.

I am not sure if we can treate "struct rxe_sge" as the same with "struct 
ib_sge".


Leon and Jason, please comment on it.


Yanjun.Zhu

>
>> };
>>
>> But I can not find dma.sge in the above struct. Can you explain it?
>>
>> To be honest, I read your original commit for several times, but I 
>> can not get it.  Can you explain the MACRO TRAILING_OVERLAP? And how 
>> can it replace the following struct?
>
> This is clearly explained in the changelog text. I think what you're
> missing will be clear once you understand how nested structures
> work. See my comment above.
>
> -Gustavo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ