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] [day] [month] [year] [list]
Message-ID: <3df479c7-e42f-41e1-bc5e-88f3d783c5d1@samba.org>
Date: Tue, 3 Jun 2025 11:22:33 +0200
From: Stefan Metzmacher <metze@...ba.org>
To: Mina Almasry <almasrymina@...gle.com>, Byungchul Park <byungchul@...com>
Cc: willy@...radead.org, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org, kernel_team@...ynix.com,
 kuba@...nel.org, ilias.apalodimas@...aro.org, harry.yoo@...cle.com,
 hawk@...nel.org, akpm@...ux-foundation.org, davem@...emloft.net,
 john.fastabend@...il.com, andrew+netdev@...n.ch, asml.silence@...il.com,
 toke@...hat.com, tariqt@...dia.com, edumazet@...gle.com, pabeni@...hat.com,
 saeedm@...dia.com, leon@...nel.org, ast@...nel.org, daniel@...earbox.net,
 david@...hat.com, lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com,
 vbabka@...e.cz, rppt@...nel.org, surenb@...gle.com, mhocko@...e.com,
 horms@...nel.org, linux-rdma@...r.kernel.org, bpf@...r.kernel.org,
 vishal.moola@...il.com
Subject: Re: [RFC v3 01/18] netmem: introduce struct netmem_desc mirroring
 struct page

Hi Mina,

>> Do you mean?
>>
>>    struct net_iov {
>>      /* Union for anonymous aliasing: */
>>      union {
>>        struct netmem_desc desc;
>>        struct {
>>           unsigned long _flags;
>>           unsigned long pp_magic;
>>           struct page_pool *pp;
>>           unsigned long _pp_mapping_pad;
>>           unsigned long dma_addr;
>>           atomic_long_t pp_ref_count;
>>        };
>>      };
>>      struct net_iov_area *owner;
>>      enum net_iov_type type;
>>    };
>>
>> Right?  If so, I will.
>>
> 
> Yes, sounds good.
> 
> Also, maybe having a union with the same fields for anonymous aliasing
> can be error prone if someone updates netmem_desc and forgets to
> update the mirror in struct net_iov. If you can think of a way to deal
> with that, great, if not lets maybe put a comment on top of struct
> netmem_desc:

I haven't looked at the patch in detail, but to me it sounds
a bit like the checks io_uring_init is doing.

I hope this is in same way helpful here :-)

metze


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ