From: "H. Peter Anvin" <hpa@zytor.com>
To: "Arnd Bergmann" <arnd@arndb.de>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Eric Dumazet" <edumazet@google.com>,
"Kuniyuki Iwashima" <kuniyu@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Willem de Bruijn" <willemb@google.com>,
"Xi Ruoyao" <libc-alpha@sourceware.org>,
"Carlos O'Donell" <carlos@redhat.com>,
"Adhemerval Zanella Netto" <adhemerval.zanella@linaro.org>,
"Rich Felker" <dalias@libc.org>
Cc: Netdev <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
klibc@zytor.com
Subject: Re: [klibc] [PATCH net-next] net: uapi: Provide an UAPI definition of 'struct sockaddr'
Date: Tue, 20 Jan 2026 15:20:18 -0800 [thread overview]
Message-ID: <0f257cd0-27cf-4c11-b79c-724f4e22c4bf@zytor.com> (raw)
In-Reply-To: <212d2e51-abc1-47bb-8666-755917cad889@app.fastmail.com>
On 2026-01-20 14:31, Arnd Bergmann wrote:
>>
> I must have accidentally cut that from my reply, sorry.
> Looking at it again now, I think I ran into problems with the
> flexible array that was removed from the in-kernel sockaddr
> structure in commit 2b5e9f9b7e41 ("net: Convert struct sockaddr
> to fixed-size "sa_data[14]""), so there is a good chance it works
> now with the (once more) fixed-size version.
>
> The other problem is that the structures that embed 'sockaddr'
> are used a lot inside of the kernel, in particular in 'ifreq',
> so changing the uapi sockaddr to __kernel_sockaddr requires
> additional changes wherever the struct members are passed
> by reference.
>
Well, the kernel should do what opting-in libcs do:
#define sockaddr __kernel_sockaddr
or
struct sockaddr { struct __kernel_sockaddr; };
... now when we have ms extensions turned on. Unfortunately gcc/clang don't
support them without the option even with __extension__, so user space is
limited to using macros.
-hpa
next prev parent reply other threads:[~2026-01-20 23:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 8:25 [PATCH net-next] net: uapi: Provide an UAPI definition of 'struct sockaddr' Thomas Weißschuh
2026-01-05 13:50 ` Arnd Bergmann
2026-01-20 18:50 ` [klibc] " H. Peter Anvin
2026-01-20 22:31 ` Arnd Bergmann
2026-01-20 23:20 ` H. Peter Anvin [this message]
2026-01-30 11:02 ` Thomas Weißschuh
2026-01-05 17:57 ` Jakub Kicinski
2026-01-06 10:32 ` Thomas Weißschuh
2026-01-06 23:13 ` Jakub Kicinski
2026-01-09 12:56 ` Arnd Bergmann
2026-01-12 11:42 ` Florian Weimer
2026-01-12 11:55 ` Thomas Weißschuh
2026-01-12 13:25 ` Florian Weimer
2026-01-12 13:33 ` Thomas Weißschuh
2026-01-12 13:37 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f257cd0-27cf-4c11-b79c-724f4e22c4bf@zytor.com \
--to=hpa@zytor.com \
--cc=adhemerval.zanella@linaro.org \
--cc=arnd@arndb.de \
--cc=carlos@redhat.com \
--cc=dalias@libc.org \
--cc=edumazet@google.com \
--cc=klibc@zytor.com \
--cc=kuniyu@google.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.weissschuh@linutronix.de \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox