[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202505201741.AFA146E7F6@keescook>
Date: Tue, 20 May 2025 17:42:32 -0700
From: Kees Cook <kees@...nel.org>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: ahmed.zaki@...el.com, aleksander.lobakin@...el.com,
alex.aring@...il.com, andrew+netdev@...n.ch, ardb@...nel.org,
christophe.leroy@...roup.eu, cratiu@...dia.com,
d.bogdanov@...ro.com, davem@...emloft.net, decui@...rosoft.com,
dianders@...omium.org, ebiggers@...gle.com, edumazet@...gle.com,
fercerpav@...il.com, gmazyland@...il.com, grundler@...omium.org,
haiyangz@...rosoft.com, hayeswang@...ltek.com, hch@....de,
horms@...nel.org, idosch@...dia.com, jiri@...nulli.us,
jv@...sburgh.net, kch@...dia.com, kuba@...nel.org,
kys@...rosoft.com, leiyang@...hat.com,
linux-hardening@...r.kernel.org, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-scsi@...r.kernel.org, linux-usb@...r.kernel.org,
linux-wpan@...r.kernel.org, linux@...blig.org,
martin.petersen@...cle.com, mgurtovoy@...dia.com,
michael.christie@...cle.com, mingzhe.zou@...ystack.cn,
miquel.raynal@...tlin.com, mlombard@...hat.com,
netdev@...r.kernel.org, pabeni@...hat.com, phahn-oss@....de,
sagi@...mberg.me, sam@...dozajonas.com, sdf@...ichev.me,
shaw.leon@...il.com, stefan@...enfreihafen.org,
target-devel@...r.kernel.org, viro@...iv.linux.org.uk,
wei.liu@...nel.org
Subject: Re: [PATCH 0/7] net: Convert dev_set_mac_address() to struct
sockaddr_storage
On Tue, May 20, 2025 at 05:19:20PM -0700, Kuniyuki Iwashima wrote:
> From: Kees Cook <kees@...nel.org>
> Date: Tue, 20 May 2025 15:30:59 -0700
> > Hi,
> >
> > As part of the effort to allow the compiler to reason about object sizes,
> > we need to deal with the problematic variably sized struct sockaddr,
> > which has no internal runtime size tracking. In much of the network
> > stack the use of struct sockaddr_storage has been adopted. Continue the
> > transition toward this for more of the internal APIs. Specifically:
> >
> > - inet_addr_is_any()
> > - netif_set_mac_address()
> > - dev_set_mac_address()
> >
> > Only 3 callers of dev_set_mac_address() needed adjustment; all others
> > were already using struct sockaddr_storage internally.
>
> I guess dev_set_mac_address_user() was missed on the way ?
>
> For example, tap_ioctl() still uses sockaddr and calls
> dev_set_mac_address_user(), which cast it to _storage.
Ah yes, I can include that in the next version if you want? I was trying
to find a stopping point since everything kind of touches everything ...
:P
--
Kees Cook
Powered by blists - more mailing lists