Commit Graph
610 Commits
Author SHA1 Message Date
Josh Boyer a64bb0c26c Input: powermate - fix oops with malicious USB descriptors
[ Upstream commit 9c6ba456711687b794dcf285856fc14e2c76074f ]

The powermate driver expects at least one valid USB endpoint in its
probe function.  If given malicious descriptors that specify 0 for
the number of endpoints, it will crash.  Validate the number of
endpoints on the interface before using them.

The full report for this issue can be found here:
http://seclists.org/bugtraq/2016/Mar/85

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
CVE-2016-2186
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>

Change-Id: Ib8a42fc7e0ca5d095c36b34ea328f19d28fe83cc
2019-08-06 12:17:40 +02:00
Vladis Dronov 4990546f1e Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
[ Upstream commit 950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d ]

The ati_remote2 driver expects at least two interfaces with one
endpoint each. If given malicious descriptor that specify one
interface or no endpoints, it will crash in the probe function.
Ensure there is at least two interfaces and one endpoint for each
interface before using it.

The full disclosure: http://seclists.org/bugtraq/2016/Mar/90

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
CVE-2016-2185
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>

Change-Id: I9274b674d6aa90617a22930618ab571910444d29
2019-08-06 12:17:40 +02:00
Kevin F. Haggerty 0fdd45c3ac Merge remote-tracking branch 'google-common/deprecated/android-3.4' into lineage-16.0
Change-Id: I363f9d4d0623906eaffffb3747a162ccbc92ccb0
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-06 11:41:21 +02:00
Francescodario Cuzzocrea 85baa390bf misc: Import SM-G900H kernel source code
* Samsung Package Version: G800HXXU1CRJ1
    * CAF Tag: LA.BF.1.1.3-00110-8x26.0
2019-08-02 15:14:10 +02:00
Sahil Kataria a110fa2087 input: misc: Kconfig: Fix misplaced endif
This patch fixes the misplaced endif that could cause some misc input
drivers not being listed when running the kernel configurator.

CRs-Fixed: 663748
Change-Id: I31cb24bd3fa5559b197bc227789c325edda736b0
Signed-off-by: Sahil Kataria <sahilk@codeaurora.org>
2014-05-27 11:37:02 -07:00
Bingzhe Cai 24401c06c1 input: sensors: fix accelerometer output data rate issue
Accelerometer data output rate is limited by device ODR register,
no need to configure this register in polling mode.

CRs-Fixed: 641705
Change-Id: If59900b244b31f813dd17e72b19c7fd2ca4b4ba1
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2014-04-09 17:19:44 +08:00
Bingzhe Cai 1e18e7d0ca input: sensors: fix deadlock issue during accelerometer disabling.
Accelerometer mma8x5x driver may struck in disabling procedure due
to deadlock on workqueue flush.

Change-Id: Ibcd6ebe92bc2fece459fde5f76e5bfe1f90586a0
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2014-03-25 21:25:55 +08:00
Linux Build Service Account f9afab15d9 Merge "input: sensors: fix mma8x5x interrupt mode output rate issue" 2014-03-05 02:53:31 -08:00
Bingzhe Cai 067bf04977 input: sensors: fix mma8x5x interrupt mode output rate issue
Accelerometer mma8x5x cannot change data output rate correctly in
interrupt due to wrong configuration value has been used.

Change-Id: I010cdf992267119cc8c54a855a33206920fc08e2
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2014-02-24 16:18:41 +08:00
Bingzhe Cai 393801906b input: sensors: use work queue for mma8x5x data polling
Accelerometer mma8x5x driver register polling device for data
polling, but polling device only update polling interval on
new polling cycle, this will cause delay on change polling
interval in some case.

Change-Id: I391dc5507a40e6bfc7e8127a0db89cb685eaf192
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2014-02-20 11:17:09 +08:00
Jing Lin e45d040883 input: misc: add input driver for HBTP
This driver provides service to Host Based Touch Processing
in three aspects:
- It serves as an input device driver to send touch events from user
  space to the kernel input core.
- It monitors LCD on/off and sends uevent accordingly.
- It performs power management for the touch AFE (Analog Front End).

Change-Id: Ibfb7c6a8d2c895ea0a277b8f0bf810e0263260e6
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2014-01-31 11:31:36 -08:00
Bingzhe Cai 43bed2b931 input: misc: enable mma8x5x interrupt mode
Allow mma8x5x accelerometer work on interrupt mode and issue
interrupt to wake up application processor when data is ready.

Change-Id: Iadecfa9aeaa8e225098d049659802dcd7f976f48
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2014-01-18 17:45:52 -08:00
Linux Build Service Account 46892cdf20 Merge "input: sensors: fix the bmp18x driver request regulator multiple times" 2014-01-10 01:29:55 -08:00
Oliver Wang 2f1fbdaa1c input: sensors: fix the bmp18x driver request regulator multiple times
The bmp18x driver may call regulator_get in resume routine. However,
regulator_get will call the sysfs APIs to create duplicated files
in sysfs. This will trigger the kernel warnings and backtrace.

Change-Id: I758f2866adae69fd8f8a9477c12aa714303ab6f2
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2014-01-10 09:40:53 +08:00
Oliver Wang c8e39270f2 input: sensors: correct the min_delay of mpu3050
The unit of min_delay should be in us rather than ms.

Change-Id: I07a0c37232cf8e8b36c30e8be41690e379ad56b1
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2014-01-08 19:03:08 -08:00
Linux Build Service Account d41fb26815 Merge "input: sensors: add enable and poll_delay handle for cm36283 sensor driver" 2014-01-07 08:49:48 -08:00
Oliver Wang 720707b359 input: sensors: add enable and poll_delay handle for cm36283 sensor driver
Add enable and poll_delay handle functions for the cm36283 light and
proximity sensor driver. The system will create the general enable and
poll_delay handles in the "/sys/class/sensors/xxx/" for each sensor
drvier which is using the sensor class driver.

Change-Id: Ib8503a60991577737b372f512bb07b064319ce35
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2014-01-07 17:47:39 +08:00
Oliver Wang 0f8750c6fc input: sensors: add enable handler for mma8x5x
The kernel will create the general enable interface in "/sys/class
/sensors/xxx" for each sensor driver using sensor class interface.

Change-Id: I214f99ba96ff4c1124b277f0f49ca46a4837e202
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2014-01-05 04:46:41 -08:00
Linux Build Service Account 27dec62d54 Merge "input: misc: mma8x5x cannot change polling delay" 2014-01-02 03:14:01 -08:00
Linux Build Service Account 1f11fc7eef Merge "sensors: unify the poll delay interface name of bmp18x sensor driver" 2013-12-30 07:51:42 -08:00
Linux Build Service Account af5a448bec Merge "input: sensors: add enable and poll_delay handler for mpu3050 sensor driver" 2013-12-30 07:51:39 -08:00
Bingzhe Cai 8f8142e068 input: misc: mma8x5x cannot change polling delay
Change polling delay of accelerometer mma8x5x will not take effect
because driver never use this new delay.

Change-Id: I8dcc457de46970b90ffcedd0c76dca4da5010884
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2013-12-30 23:44:57 +08:00
Jie Cheng 6734289d62 sensors: unify the poll delay interface name of bmp18x sensor driver
Change the bmp18x sensor poll delay interface name from "delay" to
"poll_delay", because the "poll_delay" is used as uniform interface.

Change-Id: I380c5d32518eacb9f14985424c22c43d7d985658
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-30 05:46:44 -08:00
Oliver Wang 3b68b418ff input: sensors: add enable and poll_delay handler for mpu3050 sensor driver
The kernel will create the general enable and poll_delay interfaces
in the "/sys/class/sensors/xxx" for each sensor driver using sensor
class interface.

Change-Id: I17ca9822b759ec16393a184ce6bd16458a51ff65
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-12-30 18:44:35 +08:00
Jie Cheng 45524a1792 sensors: add enable and poll_delay handle for stk3x1x sensor drver
Add enable and poll_delay handle functions for the stk3x1x light and
proximity sensor driver. The system will create the general enable and
poll_delay handles in the "/sys/class/sensors/xxx/" for each sensor
drvier which is using the sensor class driver.

Change-Id: Ib082d3bbc278ef5c75ae38b3e702f84a13bca7a8
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-29 23:46:31 -08:00
Linux Build Service Account 18b8af6665 Merge "sensors: add enable and poll_delay handle for bmp18x sensor drver" 2013-12-27 04:30:55 -08:00
Jie Cheng d6e43a1b4d sensors: add enable and poll_delay handle for bmp18x sensor drver
Add enable and poll_delay handle functions for the bmp18x pressure
driver. The system will create the general enable and poll_delay handles
in the "/sys/class/sensors/xxx/" for each sensor drvier which is using
the sensor class driver.

Change-Id: I1e24cbc6a63c5e1e5eb4db66049bd7be85b81352
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-26 20:47:00 -08:00
Oliver Wang 1621edf0df input: sensor: adjust the cm36283 sysfs interface path
The cm36283 sysfs interface path did not follow the sensor sysfs
path conventions, thus lead to the sensor HAL complicated.

Change-Id: Idc0c49a71eddb331736e2fb42eaa198a5bffba95
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-12-26 19:12:20 -08:00
Linux Build Service Account 2101ee7dfa Merge "sensors: add enable and poll_delay handle for kxtj9 sensor drver" 2013-12-26 10:01:22 -08:00
Jie Cheng 251dfdebd8 sensors: add enable and poll_delay handle for kxtj9 sensor drver
Add enable and poll_delay handle functions for the kxtj9 accelerometer
driver. The system will create the general enable and poll_delay handles
in the "/sys/class/sensors/xxx/" for each sensor drvier which is using
the sensor class driver.

Change-Id: I7ff71bd554f864c62b642791222c7d575d4c6b7f
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-26 12:33:14 +08:00
Bingzhe Cai 0c4de11513 input: misc: stk3x1x: remove unnecessary log message
Remove unnecessary log message from stk3x1x ALPS driver, driver
should be quiet in normal operation.

Change-Id: I25366c1bf34ed8ef75b83914c0f3cbe3e2fff8ef
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2013-12-24 07:46:40 -08:00
Linux Build Service Account 123e472de0 Merge "input: sensor: cm36283: Remove earlysuspend code" 2013-12-19 07:00:59 -08:00
Linux Build Service Account 37d7333c0e Merge "input: sensor: fix mpu3050 not connected due to power logic error" 2013-12-19 03:45:13 -08:00
Linux Build Service Account 15e0676c51 Merge "input: sensor: remove the input open/close interface for mpu3050" 2013-12-19 03:45:11 -08:00
Stephen Boyd e42c22204e input: sensor: cm36283: Remove earlysuspend code
Earlysuspend is gone, remove it from this driver.

Change-Id: Ie7e3006b907c965928dfb50575379cce25f36c3f
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[mengmeng: cherry-picked from kernel/msm-3.10.git 6006e74]
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-12-19 18:14:25 +08:00
Oliver Wang 93ac8fd70b input: sensor: fix mpu3050 not connected due to power logic error
The power management logic was not correctly handled and caused
the sensor chip in the wrong state. Fix this issue by add some
restrictions to the runtime power management usage counter.

Change-Id: Ib456137190c295491443b6eadbc4cfbb409b3457
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-12-18 13:12:30 +08:00
Oliver Wang 5c10e2c2aa input: sensor: remove the input open/close interface for mpu3050
The mpu3050_input_open and mpu3050_input_close hold an usage counter
of the device and may prevent the device entering runtime suspend.
So remove the code to save the runtime power consumption for mpu3050.

Change-Id: Idb55b3388c39851291b5330fa7add5d12374cf80
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-12-17 17:43:25 +08:00
Zhoulu Luo bf45171730 Merge remote-tracking branch 'remotes/quic/jb_3.2' into HEAD
Conflicts:
	arch/arm/configs/msm8226-perf_defconfig
	arch/arm/configs/msm8226_defconfig
	arch/arm/mach-msm/clock-8974.c
	arch/arm/mach-msm/clock-local2.c
	arch/arm/mach-msm/clock-mdss-8974.c
	arch/arm/mach-msm/clock-mdss-8974.h
	drivers/gpu/msm/kgsl_device.h
	drivers/input/touchscreen/synaptics_i2c_rmi4.c
	drivers/media/platform/msm/vidc/msm_vidc.c
	drivers/media/platform/msm/vidc/venus_hfi.c
	drivers/media/platform/msm/vidc/vidc_hfi_io.h
	drivers/misc/qseecom.c
	drivers/thermal/msm_thermal.c
	drivers/video/msm/mdss/mdp3.c
	drivers/video/msm/mdss/mdp3.h
	drivers/video/msm/mdss/mdp3_ctrl.c
	drivers/video/msm/mdss/mdss_fb.c
	drivers/video/msm/mdss/mdss_mdp_overlay.c
	drivers/video/msm/mdss/mdss_mdp_pp.c
	sound/soc/codecs/msm_hdmi_codec_rx.c
	sound/soc/codecs/wcd9306.c
	sound/soc/codecs/wcd9xxx-resmgr.c
	sound/soc/msm/qdsp6v2/audio_acdb.c

Change-Id: Ibc13fd9186ff593bb11e9fa61bb03b10c22a3383
2013-12-12 13:01:47 -08:00
Linux Build Service Account f3a79b5481 Merge "sensors: Add the class device support for cm36283 sensor" 2013-12-10 09:00:36 -08:00
Linux Build Service Account 44481914c0 Merge "sensors: Add the class device support for mma8x5x sensor" 2013-12-10 09:00:34 -08:00
Linux Build Service Account e87b241b87 Merge "sensors: Add the class device support for bmp18x sensor" 2013-12-10 09:00:31 -08:00
Linux Build Service Account 611442570b Merge "sensors: Add the class device support for mpu3050 sensor" 2013-12-10 09:00:30 -08:00
Jie Cheng ead5d46d27 sensors: Add the class device support for cm36283 sensor
Add the sensor class device support for the cm36283 light and
proximity sensor. By using the class device, the driver will
create the subfolder in the "/sys/class/sensors/". The userspace
app could detect the sensors by searching this folder.

Change-Id: I4d96ed54ee647069a5f1cf592c4aea1d8636a0f5
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-08 21:12:49 -08:00
Jie Cheng 8386f403e5 sensors: Add the class device support for mma8x5x sensor
Add the sensor class device support for the mma8x5x accelerometer
sensor. By using the class device, the driver will create the
subfolder in the "/sys/class/sensors/" and the userspace app could
detect the sensors by searching this folder.

Change-Id: I6b96c43fa6da78d84a950f67843c62a41e03aa99
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-08 21:01:06 -08:00
Jie Cheng b7d7234666 sensors: Add the class device support for mpu3050 sensor
Add the sensor class device support for the mpu3050 gyroscope
sensor. By using the class device, the driver will create the
subfolder in the "/sys/class/sensors/". The userspace app
could detect the sensors by searching this folder.

Change-Id: Ieba9cebaa2bb62da223d78290b64865142c945f7
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-08 20:46:13 -08:00
Jie Cheng f9b07b80bf sensors: Add the class device support for bmp18x sensor
Add the sensor class device support for the bmp18x pressure
sensor. By using the class device, the driver will create the
subfolder in the "/sys/class/sensors/" and the userspace app
could detect the sensors by searching this folder.

Change-Id: Id947e8b7dd101d15bc7ffcbe5a01fa9c6cf28efe
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-08 20:28:25 -08:00
Jie Cheng 246a9362f8 sensors: Add the class device support for stk3x1x sensor
Add the sensor class device support for the stk3x1x light and
proximity sensor. By using the class device, the driver will
create the subfolder in the "/sys/class/sensors/". The userspace
app could detect the sensors by searching this folder.

Change-Id: Id601679ec219ce541e8ee92837185461c9dc74bd
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-08 20:22:19 -08:00
Jie Cheng 421ff3df74 sensors: Add the class device support for kxtj9 sensor
Add the sensor class device support for the kxtj9 accelerometer
sensor.

Change-Id: I4548c6787f8bc4654c1b3e08d65fa4cb1727bef5
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-11-28 10:50:48 +08:00
Linux Build Service Account 6d811b126d Merge "input: sensors: remove undesired kxtj9 accelerometer power up and access" 2013-11-26 12:14:09 -08:00
Linux Build Service Account b80cfa0b28 Merge "input: sensors: remove undesired kxtj9 accelerometer power up and access" 2013-11-26 07:57:57 -08:00