Question regarding joystick/gamepad support in wayland

박성진 sj76.park at samsung.com
Thu Mar 3 06:58:37 UTC 2016


>I worry less about the joystick node here and more about the ability to open
>other event nodes that are keyboard, followed by sniffing every keyboard
>event that happens. If you have a process in place that checks which devices
>are joysticks and revokes them as needed, then this is mitigated somewhat.
Oh, I see. You meant an environment in which logind opens input device nodes
, allows a process to get the capability to access the nodes by requesting taking
device/control for the nodes.
In my environment, only js node can be read by non-root users.
Event nodes (of keyboard, mouse, ...) can only be read by root user.

Anyway, as logind provides an exclusive access for an input device with it's interface,
we can probably think about providing an exclusive access for the joystick device
with logind like approach.

------- Original Message -------
Sender : Peter Hutterer<peter.hutterer at who-t.net> 
Date   : 2016-03-03 15:13 (GMT+09:00)
Title  : Re: Re: Question regarding joystick/gamepad support in wayland

On Thu, Mar 03, 2016 at 01:52:26AM +0000, 박성진 wrote:
>    Dear Peter, thank you for your quick answer and I agree with you. :)
> 
>    I have one more question below.
> 
> 
>    >As for the most desirable way to support joysticks in Wayland - we
>    don't
>    >quite know, it'll depend on developers coming and saying "we need this
>    and
>    >that", then we can start a conversation on what to do. But right now
>    it
>    >seems a logind-like approach to allow an application to open js0 or
>    the
>    >event node is quite sufficient.
> 
>    Do you imply that there will be security issues regarding the direct
>    access
> 
>    of the joystick node by an application ?
> 
>    Did you mention logind-like approach for another reason ?
> 
>    logind-like approach seems to be good for me, too, from the security
>    point of view.
> 
>    If the joystick node is able to be opened by any application directly
>    and
> 
>    (for instance) if a user starts a game application and tries to make
>    any payment
> 
>    in the game application with a joystick, i think it can make a security
>    issue.
> 
>    Of course, this is just an example and the payment for games needs
>    to be made outside the game application. :)

I worry less about the joystick node here and more about the ability to open
other event nodes that are keyboard, followed by sniffing every keyboard
event that happens. If you have a process in place that checks which devices
are joysticks and revokes them as needed, then this is mitigated somewhat.

Cheers,
   Peter

> 
>    ------- Original Message -------
>    Sender : Peter Hutterer<peter.hutterer at who-t.net>
>    Date   : 2016-03-03 08:42 (GMT+09:00)
>    Title  : Re: Question regarding joystick/gamepad support in wayland
>    On Wed, Mar 02, 2016 at 11:11:06PM +0000, wrote:
>    > Dear all,
>    > I would like to get your opinions regarding joystick/gamepad support
>    in wayland.
>    > What's the desirable way to support joystick/gamepad both in wayland
>    and in linux ?
>    > Plz kindly let me know if there is any previous discussion about
>    this. :)
>    >
>    > Linux supports both joydev(e.g. /dev/input/js0) and evdev(e.g.
>    /dev/input/event0) for joysticks/gamepads.
>    > As far as I know, many games in linux open js node directly within
>    the process itself and read/handle joystick events by itself.
>    > Under Xorg window system, without having X events and X input
>    extension events, why are the games opening joystick nodes directly ?
>    > Are there any reason for doing that ? Are there any performance
>    issues ? Otherwise, is it originated from the lack of X events for
>    joystick?
>    > Lastly, what the most desirable way to support joysticks/gamepads in
>    wayland ?
>    couple of things here:
>    * joystick events require relatively little processing, they are mapped
>    to a
>      function and that's about it. compare that with e.g. touchpads where
>    a lot
>      of stuff is required before we know whether we should send a motion,
>      button or scroll event
>    * joysticks do not have a standard set of functionality. they're all
>    buttons
>      and axes but the layout changes, the functionality differs per
>    device, etc.
>      this makes it really hard to come up with a generic library that
>    handles
>      joysticks. and when you do, it'll likely look like evdev anyway
>    * X hasn't really had joystick support, so now you have the inertia of
>      "everyone is doing it this way already". Couple this with the fact
>    that
>      joysticks aren't used in the normal UI, they're dedicated devices
>    that
>      have a different functionality per application.
>    As for the most desirable way to support joysticks in Wayland - we
>    don't
>    quite know, it'll depend on developers coming and saying "we need this
>    and
>    that", then we can start a conversation on what to do. But right now it
>    seems a logind-like approach to allow an application to open js0 or the
>    event node is quite sufficient.
>    Cheers,
>       Peter
>    _______________________________________________
>    wayland-devel mailing list
>    wayland-devel at lists.freedesktop.org
>    https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>    <p> </p><p> </p>
>    [SeenTimeChecker?do=22f8650517ba6865f664389e9b028c4b5dbc897755441275d27
>    aebe9df5c4cf23da4301b695bc0303962160e7b29716cbe62ff14da03c3bfa728c55b39
>    cc59eacf878f9a26ce15a0]

<p> </p><p> </p>


More information about the wayland-devel mailing list