[PATCH v5 wayland 3/3] wayland-server: log an error for events with wrong client objects

Pekka Paalanen ppaalanen at gmail.com
Wed Jan 25 13:55:02 UTC 2017


On Tue, 24 Jan 2017 12:07:21 -0600
Derek Foreman <derekf at osg.samsung.com> wrote:

> Check that all the objects in an event belong to the same client as
> the resource posting it.  This prevents a compositor from accidentally
> mixing client objects and posting an event that causes a client to
> abort with a cryptic message.
> 
> Instead the client will now be disconnected as it is when the compositor
> tries to send a null for a non-nullable object, and a log message
> will be printed by the compositor.
> 
> Reviewed-by: Yong Bakos <ybakos at humanoriented.com>
> Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---
> 
> This started life as an assert, became an abort, and now it's a log
> and disconnect.  Log and disconnect is already how we manage nullable
> violation on the compositor side, so I'm hoping it won't be too
> controversial.
> 
> For EFL clients the disconnect is recoverable under some circumstances with
> our session recovery protocol, but the current client-abort()s behaviour
> is not.
> 
> Changes from v1:
> uses get_next_arguemnts and arg_count_for_signature instead of a bespoke
> implementation.
> 
> Changes from v2:
> Tests new_id objects as well
> logs and disconnects instead of assert()/abort()
> superficial changes to the log text
> 
> Changes from v3:
> Actually printing the interface name and message name make this
> useful for debugging - instead of actually less informative
> than it was with a client side error.
> 
> Changes from v4:
> Rebased on top of previous two patches in this series.

Hi,

all three patches pushed with my R-b:
   c44eed1..de90865  master -> master

Seems safe enough for post-alpha even.

> There's a test case for this in patchwork as well, but I've not re-sent it
> since it's unchanged.

Oh, I should probably dig that up then.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170125/ebcd2841/attachment.sig>


More information about the wayland-devel mailing list