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: <YiJcIso43MWFUcMp@kroah.com>
Date:   Fri, 4 Mar 2022 19:36:18 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc:     Jiri Kosina <jikos@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, Shuah Khan <shuah@...nel.org>,
        Dave Marchevsky <davemarchevsky@...com>,
        Joe Stringer <joe@...ium.io>,
        Tero Kristo <tero.kristo@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 11/28] samples/bpf: add a report descriptor
 fixup

On Fri, Mar 04, 2022 at 06:28:35PM +0100, Benjamin Tissoires wrote:
> the program inverts the definition of X and Y at a given place in the
> report descriptor of my mouse.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
> 
> ---
> 
> changes in v2:
> - split the series by bpf/libbpf/hid/selftests and samples
> ---
>  samples/bpf/hid_mouse_kern.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/samples/bpf/hid_mouse_kern.c b/samples/bpf/hid_mouse_kern.c
> index c24a12e06b40..958820caaf5d 100644
> --- a/samples/bpf/hid_mouse_kern.c
> +++ b/samples/bpf/hid_mouse_kern.c
> @@ -62,5 +62,30 @@ int hid_x_event(struct hid_bpf_ctx *ctx)
>  	return 0;
>  }
>  
> +SEC("hid/rdesc_fixup")
> +int hid_rdesc_fixup(struct hid_bpf_ctx *ctx)

No comment here to show the same as you put in the changelog saying what
this function is doing?

Otherwise it's hard for a non-HID developer to know that:

> +
> +	ctx->data[39] = 0x31;
> +	ctx->data[41] = 0x30;

Is flipping things.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ