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: <8e75c573-c66d-f79b-ad09-bbac280a5c91@kernel.org>
Date:   Fri, 26 Jun 2020 12:43:21 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Tammo Block <tammo.block@...il.com>, linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v0 2/5] Make it possible to enable/disable SRG mouse
 reporting

On 26. 06. 20, 9:22, Tammo Block wrote:
> The report protocol stored in vc_report_mouse is not a bitmask, the
> protocols are mutually exclusive, last one wins. Values are chosen to
> maximize compatibility.
> 
> Signed-off-by: Tammo Block <tammo.block@...il.com>
> ---
>  drivers/tty/vt/vt.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index 48a8199f7845..d52ac57034e0 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -1890,13 +1890,22 @@ static void set_mode(struct vc_data *vc, int on_off)
>  					clr_kbd(vc, decarm);
>  				break;
>  			case 9:
> -				vc->vc_report_mouse = on_off ? 1 : 0;
> +				vc->vc_report_mouse = on_off ? TIOCL_REPORTBTNPRESS : 0;
>  				break;
>  			case 25:		/* Cursor on/off */
>  				vc->vc_deccm = on_off;
>  				break;
>  			case 1000:
> -				vc->vc_report_mouse = on_off ? 2 : 0;
> +				vc->vc_report_mouse = on_off ? TIOCL_REPORTRELEASE : 0;
> +				break;
> +			case 1002:
> +				vc->vc_report_mouse = on_off ? TIOCL_REPORTDRAG : 0;
> +				break;
> +			case 1003:
> +				vc->vc_report_mouse = on_off ? TIOCL_REPORTANYMOVE : 0;
> +				break;
> +			case 1006:
> +				vc->vc_proto_mouse = on_off ? 1 : 0;

So simply:
vc->vc_proto_mouse = on_off;

The others could be "on_off * TIOCL_XXX", but I don't think it would
improve anything.

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ