lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a576df84ad459d13b18377bb64309fa80f1ea7f2.camel@kylinos.cn>
Date:   Fri, 14 Apr 2023 16:58:21 +0800
From:   zongmin zhou <zhouzongmin@...inos.cn>
To:     Zack Rusin <zackr@...are.com>,
        "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
        Pv-drivers <Pv-drivers@...are.com>,
        Linux-graphics-maintainer <Linux-graphics-maintainer@...are.com>
Cc:     "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Input: vmmouse - add macros to enable vmmouse relative
 mode

On Fri, 2023-04-14 at 01:22 +0000, Zack Rusin wrote:
> On Thu, 2023-04-13 at 16:56 +0800, Zongmin Zhou wrote:
> > Add macros to enable request relative mode.
> > 
> > Change the REL_Y value passed by input_report_rel function,
> > to match the direction of mouse movement.
> 
> Thanks for the patch, but in its current form it's a nack. First of
> all we don't
> want any defines in the driver code that affect compilation, it's
> never going to be
> tested or compiled in. Either a kconfig or a module parameter would
> be acceptable
> but that's only if you can actually explain what it is that you're
> fixing. The
> current single line description just mentions what the effect it has
> (not completely
> correctly either because for merged packets absolute will still be
> x=x, y=y, but
> relative will be x += dx, y -= dy) but not why it's done, what it's
> fixing and how
> to reproduce.
> 
> z
> 
Dear zack:

Firstly,thanks for your reply.

The reason I want to add macros to request different vmmouse
modes(relative or absolute) is that the vmmouse drivers currently only
supports request absolute mode.But in some case we want request
relative mode so that Pointer acceleration feature can be used.(as I
know,libinput module only support Pointer acceleration feature in
relative mode.)
So I think we can provide two vmmouse modes to facilitate the use of
different needs.
If need,I can change it to a kconfig or a module parameter.

The reasons of fix for REL_Y value,are as follows:
When I request relative vmmouse mode,and let mouse move up,the mouse
pointer moved down instead.
Similarly, when I move the mouse down, the mouse pointer moved up.
it obviously with a wrong motion direction in y.

Actually,I understand that the value of y here is the end calculation
result of relative coordinate movement,the real calculation is in
motion_event() of spice-gtk and  legacy_mouse_event() of qemu.

Test scenario:
1) start virtual machine with qemu command "vmport=on",also with spice
protocal.
2) modify guest vmmouse drivers to request relative mode.
3) move the mouse,will observe the pointer freezed,it's because driver
not match the condition 'status & VMMOUSE_RELATIVE_PACKET',can't find
correct input device.need merge this patch in qemu:
https://lore.kernel.org/all/20230413081526.2229916-1-zhouzongmin@kylinos.cn/
4) after merge the patch in qemu,we can observe the issue of wrong
motion direction in y.

Looking forward to your reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ