From: Michael Tokarev <mjt@tls.msk.ru>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PATCH] qemu-sockets: fix unix socket path copy (again)
Date: Tue, 31 Aug 2021 22:26:00 +0300 [thread overview]
Message-ID: <b4b9e0af-2709-68ba-7687-a8209641d90c@msgid.tls.msk.ru> (raw)
In-Reply-To: <CAMxuvayrgXYBU0dcmmO2=Po1fBLFugxP7JS7KrR83iVQZE9fKg@mail.gmail.com>
31.08.2021 22:21, Marc-André Lureau wrote:
...
> Seems right to me, however there are some notes in libc bits/socket.h
> /* Structure large enough to hold any socket address (with the historical
> exception of AF_UNIX). */
>
> And also this
> https://idea.popcount.org/2019-12-06-addressing/#fn:sockaddr_storage <https://idea.popcount.org/2019-12-06-addressing/#fn:sockaddr_storage>
>
> I must say I feel confused by those comments :) Is it large enough or not??
It was my first thought too when I first saw the prototype
of this very function we're patching here:
socket_sockaddr_to_address_unix(struct sockaddr_storage *sa, ...)
it uses sockaddr_storage and I swear I always thought sockaddr_storage
is for sockaddr_in and sockaddr_in6 but NOT for sockaddr_un.
If this is the case we're in trouble actually and all this stuff
needs serious review.
However by fact sockaddr_storage is actually LARGER than sockaddr_un.
I dunno how universal it is.
/mjt
next prev parent reply other threads:[~2021-08-31 19:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-31 18:26 Michael Tokarev
2021-08-31 19:21 ` Marc-André Lureau
2021-08-31 19:26 ` Michael Tokarev [this message]
2021-09-01 9:12 ` Daniel P. Berrangé
2021-09-01 9:20 ` Michael Tokarev
2021-08-31 19:47 ` Peter Maydell
2021-09-01 8:29 ` Michael Tokarev
2021-09-01 9:52 ` Peter Maydell
2021-09-01 11:45 ` Michael Tokarev
2021-09-01 11:58 ` Daniel P. Berrangé
2021-09-01 11:57 ` Daniel P. Berrangé
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=b4b9e0af-2709-68ba-7687-a8209641d90c@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--subject='Re: [PATCH] qemu-sockets: fix unix socket path copy (again)' \
/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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.