16 Oct, 2020

1 commit


09 Sep, 2020

1 commit

  • This code doesn't check if "settings->startup_profile" is within bounds
    and that could result in an out of bounds array access. What the code
    does do is it checks if the settings can be written to the firmware, so
    it's possible that the firmware has a bounds check? It's safer and
    easier to verify when the bounds checking is done in the kernel.

    Fixes: 14bf62cde794 ("HID: add driver for Roccat Kone gaming mouse")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Jiri Kosina

    Dan Carpenter
     

24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

20 Feb, 2019

1 commit

  • In preparation to enabling -Wimplicit-fallthrough, mark switch
    cases where we are expecting to fall through.

    This patch fixes the following warning:

    drivers/hid/hid-roccat-kone.c: In function ‘kone_keep_values_up_to_date’:
    drivers/hid/hid-roccat-kone.c:784:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
    kone->actual_dpi = kone->profiles[event->value - 1].
    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    startup_dpi;
    ~~~~~~~~~~~
    drivers/hid/hid-roccat-kone.c:786:2: note: here
    case kone_mouse_event_osd_profile:
    ^~~~

    Warning level 3 was used: -Wimplicit-fallthrough=3

    This patch is part of the ongoing efforts to enable
    -Wimplicit-fallthrough.

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Jiri Kosina

    Gustavo A. R. Silva
     

28 Dec, 2015

1 commit


29 Oct, 2014

1 commit


30 Sep, 2013

1 commit


07 Sep, 2013

1 commit

  • Pull HID updates from Jiri Kosina:
    "Highlights:

    - conversion of HID subsystem to use devm-based resource management,
    from Benjamin Tissoires

    - i2c-hid support for DT bindings, from Benjamin Tissoires

    - much improved support for Win8-multitouch devices, from Benjamin
    Tissoires

    - cleanup of core code using common hidinput_input_event(), from
    David Herrmann

    - fix for bug in implement() access to the bit stream (causing oops)
    that has been present in the code for ages, but devices that are
    able to trigger it have started to appear only now, from Jiri
    Kosina

    - fixes for CVE-2013-2899, CVE-2013-2898, CVE-2013-2896,
    CVE-2013-2892, CVE-2013-2888 (all triggerable only by specially
    crafted malicious HW devices plugged into the system), from Kees
    Cook

    - hidraw oops fix, from Manoj Chourasia

    - various smaller fixes here and there, support for a bunch of new
    devices by various contributors"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (53 commits)
    HID: MAINTAINERS: add roccat drivers
    HID: hid-sensor-hub: change kmalloc + memcpy by kmemdup
    HID: hid-sensor-hub: move to devm_kzalloc
    HID: hid-sensor-hub: fix indentation accross the code
    HID: move HID_REPORT_TYPES closer to the report-definitions
    HID: check for NULL field when setting values
    HID: picolcd_core: validate output report details
    HID: sensor-hub: validate feature report details
    HID: ntrig: validate feature report details
    HID: pantherlord: validate output report details
    HID: hid-wiimote: print small buffers via %*phC
    HID: uhid: improve uhid example client
    HID: Correct the USB IDs for the new Macbook Air 6
    HID: wiimote: add support for Guitar-Hero guitars
    HID: wiimote: add support for Guitar-Hero drums
    Input: introduce BTN/ABS bits for drums and guitars
    HID: battery: don't do DMA from stack
    HID: roccat: add support for KonePureOptical v2
    HID: picolcd: Prevent NULL pointer dereference on _remove()
    HID: usbhid: quirk for N-Trig DuoSense Touch Screen
    ...

    Linus Torvalds
     

20 Aug, 2013

3 commits


23 Jul, 2013

1 commit


08 Apr, 2013

1 commit


28 Jun, 2012

1 commit


20 Nov, 2011

1 commit


07 Sep, 2011

3 commits


13 Jun, 2011

2 commits

  • On rare occassions raw events can be triggered before drvdata gets set up
    which leads to NULL pointer dereferences. This was only observed with pyra on
    2.6.39, but is fixed for all devices now to play it save.
    kovaplus returned wrong actual values when profile change was initiated from host.
    Added range checks for setting actual profile on all devices.

    Signed-off-by: Stefan Achatz
    Signed-off-by: Jiri Kosina

    Stefan Achatz
     
  • Removed analog feature report enums and modified code in roccat_common
    to reflect this. Non standard conform Kone got its own copy of the old
    code. That helps extracting more generalizations for newer devices.

    Signed-off-by: Stefan Achatz
    Signed-off-by: Jiri Kosina

    Stefan Achatz
     

03 Feb, 2011

4 commits


08 Jan, 2011

2 commits


10 Dec, 2010

1 commit

  • Neaten current uses of dev_ by adding and using
    hid specific hid_ macros.

    Convert existing uses of dev_ uses to hid_.
    Convert hid-pidff printk uses to hid_.

    Remove err_hid and use hid_err instead.

    Add missing newlines to logging messages where necessary.
    Coalesce format strings.

    Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt

    Other miscellaneous changes:

    Add const struct hid_device * argument to hid-core functions
    extract() and implement() so hid_ can be used by them.
    Fix bad indentation in hid-core hid_input_field function
    that calls extract() function above.

    Signed-off-by: Joe Perches
    Signed-off-by: Jiri Kosina

    Joe Perches
     

21 Jun, 2010

2 commits


31 May, 2010

2 commits


25 May, 2010

1 commit

  • Module roccat is a char device used to report special events of roccat hardware
    to userland. These events include requests for on-screen-display of profile or
    dpi settings or requests for execution of macro sequences that are not stored
    in device. The information in these events depends on hid device implementation
    and contains data that is not available in a single hid event or else hidraw
    could have been used.

    It is inspired by hidraw, but uses only one circular buffer for all readers.
    The device is as generic as possible so that the functionality is usable by all
    (kone and upcomming) roccat device drivers.

    Signed-off-by: Stefan Achatz
    Signed-off-by: Jiri Kosina

    Stefan Achatz
     

24 May, 2010

1 commit

  • After merging the driver-core tree, today's linux-next build (x86_64
    allmodconfig) produced these warnings:

    drivers/hid/hid-roccat-kone.c:694: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:696: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:701: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:703: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:708: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:710: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:715: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:717: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:722: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:724: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:729: warning: initialization from incompatible pointer type
    drivers/hid/hid-roccat-kone.c:731: warning: initialization from incompatible pointer type

    Introduced by commit 867040163f10f2b52b45bc573f330d6eb28f5914 ("sysfs:
    add struct file* to bin_attr callbacks") from the driver-core tree
    interacting with commit 14bf62cde79423a02a590e02664ed29a36facec1 ("HID:
    add driver for Roccat Kone gaming mouse") from the hid tree.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Jiri Kosina

    Stephen Rothwell
     

19 May, 2010

3 commits


18 May, 2010

1 commit


30 Mar, 2010

1 commit

  • Implicit slab.h inclusion via percpu.h is about to go away. Make sure
    gfp.h or slab.h is included as necessary.

    Signed-off-by: Tejun Heo
    Cc: Stephen Rothwell
    Cc: Jiri Kosina
    Signed-off-by: Jiri Kosina

    Tejun Heo
     

22 Mar, 2010

1 commit

  • This Patch adds support for Kone gaming mouse from Roccat.
    It provides access to profiles, settings, firmware, weight,
    actual settings etc. through sysfs attributes.
    Event handling of this mouse differs from standard hid behaviour
    in that tilt button press is reported in each move event which
    results in strange behaviour if not handled by the driver.

    This is a heavily reworked version of the previously introduced driver.
    The changes include most of the previously raised concerns,
    memory leak and other fixes, code cleanups, adoption of additional
    achieved knowlege about the hardware and is (IMHO) a much better version
    than before even when I exchanged reduced USB-IO with a bigger memory
    consumption.

    I refused to implement one mentioned point:
    Removing the 'just-because-we-can' attributes. Motivation:
    Reading the clipped in weight: I'm no gamer and can't determine the
    usefulness of this feature but if the manufacturer implements such a
    feature it might make sense to someone and I would unwillingly limit the
    functionality besides its such a small feature.
    Reading the actual profile and dpi settings: Here I can testify that one
    can get lost of the actual settings when switching back and forth.
    The manufacturers windows driver has the ability for on-screen-display
    of the values and there is a mouse in the market that has an lcd on the
    underside of it to show these values. So I think this feature makes sense
    not only for me and shouldn't be removed.

    Signed-off-by: Stefan Achatz
    Signed-off-by: Jiri Kosina

    Stefan Achatz