From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH 3/5] dbus: Add and validate the UNIX_FDS msg header field
Date: Mon, 02 May 2016 22:17:13 -0500 [thread overview]
Message-ID: <57281839.3040609@gmail.com> (raw)
In-Reply-To: <CAOq732JefaOUbNfy0DLLVFK+8Oaq8cFv1=ngAb6x+sxzdXUjGA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]
Hi Andrew,
> Elsewhere in the code we treat messages with too few / missing FDs as
> valid and I think I commented on this in one of the commit messages,
git show 439e259835d8b2788ca28c1dbe06badbd178dccf
This one only deals with num_fds > L_ARRAY_SIZE(message->fds), which
makes sense.
git show 1e1aa1aa63be7b50a4d35aa01d14c001bf591fd1
Also sort of makes sense...
> another thing to consider is that we currently hardcode an FD limit of
> 16 per message and will happily generate such messages ourselves. So
> the code can handle the situation when unix_fds > num_fds and there's
> nothing specific we have to do unless we decide to make it an error.
Which I think we should by the way. If the message tells us we have 3
fds, and we only receive 1 or 0, then that should be fatal. It would
most likely indicate an error in our transport code logic. I'd actually
like to make this verbose and see if this ever happens. AFAIK,
dbus-daemon does not allow this.
Since kdbus uses message_from_blob and dbus-1 uses message_build, do you
want to have different constraints between those two?
>
> If we want to be really smart about queuing up FDs in a circular
> buffer to assign to messages by unix_fds value then we would probably
> want a separate function that would take a header and just return the
> unix_fds value.
I was hoping we could avoid that via use of MSG_WAITALL. I suspect
you're right and we need to.
Regards,
-Denis
next prev parent reply other threads:[~2016-05-03 3:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 22:43 [PATCH 1/5] dbus: Handle the 'h' type in append_arguments Andrew Zaborowski
2016-04-29 22:43 ` [PATCH 2/5] dbus: Remove memcpy and fix setting of FD_CLOEXEC on FDs Andrew Zaborowski
2016-04-29 23:20 ` Denis Kenzior
2016-04-29 22:44 ` [PATCH 3/5] dbus: Add and validate the UNIX_FDS msg header field Andrew Zaborowski
2016-04-29 23:17 ` Denis Kenzior
2016-04-29 23:52 ` Andrzej Zaborowski
2016-04-30 1:15 ` Denis Kenzior
2016-04-30 14:58 ` Andrzej Zaborowski
2016-05-02 15:10 ` Denis Kenzior
2016-05-02 22:25 ` Andrzej Zaborowski
2016-05-03 3:17 ` Denis Kenzior [this message]
2016-04-29 22:44 ` [PATCH 4/5] unit: Add UNIX_FDS header fields in FD test messages Andrew Zaborowski
2016-04-29 23:20 ` Denis Kenzior
2016-04-29 22:44 ` [PATCH 5/5] unit: End to end FD passing test Andrew Zaborowski
2016-04-29 23:21 ` Denis Kenzior
2016-04-29 23:20 ` [PATCH 1/5] dbus: Handle the 'h' type in append_arguments Denis Kenzior
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=57281839.3040609@gmail.com \
--to=denkenz@gmail.com \
--cc=ell@lists.01.org \
/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 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.