Commit graph

606370 commits

Author SHA1 Message Date
Linux Build Service Account
0434b31d56 Merge "dwc3-msm: Fix dwc3_drd_state_string for undefined state" 2019-06-11 04:12:22 -07:00
Linux Build Service Account
411c38c969 Merge "usb: dwc3-msm: Ensure hardware is reset during role change" 2019-06-11 04:12:21 -07:00
Linux Build Service Account
8dce56fa0c Merge "usb: dwc3-msm: add enum for drd_states to remove otg_state usage" 2019-06-11 04:12:20 -07:00
Linux Build Service Account
06ceb6bb61 Merge "msm: ipa3: Fix to validate check for IP type" 2019-06-10 07:50:14 -07:00
Linux Build Service Account
c7c174351b Merge "diag: Prevent out-of-bound access while processing non-hdlc pkt" 2019-06-10 07:50:12 -07:00
Praveen Kurapati
bc914679ea msm: ipa3: Fix to validate check for IP type
Add proper check for validating the IP type while
sending request for ul-filter-rule install.

Change-Id: I170230310884f176cf41d5ae20287f6d74a4bc29
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2019-06-10 04:34:31 -07:00
Hardik Arya
f275209c75 diag: Prevent out-of-bound access while processing non-hdlc pkt
While parsing non-hdlc packet buffer length passed to hdlc
recovery is not updated after parsing partial packet, Which
can lead to out-of-bound access. The patch passes the updated
buffer length for the same.

Change-Id: I5596f8c5a72680684c9c9056dccaf33e3c36832c
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2019-06-10 02:38:02 -07:00
Linux Build Service Account
77b17af341 Merge "ARM: dts: msm: Add support for float charger detection on MSM8996" 2019-06-10 00:58:15 -07:00
Linux Build Service Account
c9c1e20784 Merge "phy: qusb: Add support for DP DM pulsing for HS PHY" 2019-06-10 00:58:14 -07:00
Linux Build Service Account
5c004decb3 Merge "dsp: afe: check for minimum size before payload access" 2019-06-07 12:19:16 -07:00
Linux Build Service Account
f7f2404ce1 Merge "soc: msm8998: Add 16ch playback and record support for TDM" 2019-06-07 12:19:14 -07:00
Karthikeyan Mani
0ee7041000 dsp: afe: check for minimum size before payload access
Check if payload data is atleast the minimum expected size
before accessing the data in it.

Change-Id: Ia1295ca5ad5d002122e416fae53588681da687ea
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-07 10:50:42 -07:00
Linux Build Service Account
074cdf9e72 Merge "cnss2: Return failure if bus type do not match" 2019-06-06 23:35:12 -07:00
Linux Build Service Account
f73796d0e9 Merge "asoc: Update max channels for TDM ports" 2019-06-06 11:49:37 -07:00
Dhanalakshmi Siddani
3691a75c38 soc: msm8998: Add 16ch playback and record support for TDM
Add support for 16ch playback and record usecase support
for primary and quaternary TDM ports.
Add mixer controls to set slot width, slot mapping and
calculate bit clock dynamically. Set bit clock for all
TDM ports dynamically.

Change-Id: I9d356d61f29ba18dd77138bd895139042a3c01f6
Signed-off-by: Dhanalakshmi Siddani <dsiddani@codeaurora.org>
2019-06-06 17:57:27 +05:30
Linux Build Service Account
4067f83f16 Merge "ARM: dts: msm: Enable DP DM pulsing support on MSM8996" 2019-06-05 07:33:30 -07:00
Linux Build Service Account
ced9c94ab1 Merge "soc: qcom: hab: Add open local-cancel and compiler warning fixes" 2019-06-05 07:33:29 -07:00
Linux Build Service Account
1058027c8d Merge "msm: ipa: fix to validate input parameters" 2019-06-04 23:06:03 -07:00
Linux Build Service Account
c53f4c9b5b Merge "net: sockev: avoid races between sockev and socket_close" 2019-06-04 23:06:02 -07:00
Vamsi Krishna Samavedam
9600b86489 dwc3-msm: Fix dwc3_drd_state_string for undefined state
dwc3_drd_state_string() will return null for undefined state and
fix it by adding undefined name to state_names.

Change-Id: I40be0b14c098fe2e9d77df3ff1108c3d4d55a30f
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
2019-06-04 19:31:00 +05:30
Manu Gautam
cc96e09152 usb: dwc3-msm: Ensure hardware is reset during role change
Introduce additional WAIT_FOR_LPM input flag to ensure USB
enters low power mode after stop_peripheral or stop_host.
This makes sure that USB hardware is reset after LPM for
cases where quick transition to host mode happens while
its child was still preventing dwc3 to enter low power mode.
In the absence of h/w reset after stop_peripheral, host mode
doesn't work.

Change-Id: I67e4fcdc11a3337e3e90b4ca8f461e328a6e8ecf
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2019-06-04 19:26:13 +05:30
Manu Gautam
02d74bda34 usb: dwc3-msm: add enum for drd_states to remove otg_state usage
otg_state enum defines states for USB OTG devices. Since, driver
supports only role change (DRD) and no OTG support, hence, instead
of using otg_states create separate drd_state enums.

Change-Id: Ifda1fac712e751c980ce51b60b473e5921f2001d
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2019-06-04 19:18:09 +05:30
Abhishek Choubey
c447f451f2 msm: ipa: fix to validate input parameters
Validate the input parameters to avoid any unexpected
scenarios.

Change-Id: If77ac66470baf937b160800174ea14f1a8cb6408
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
Signed-off-by: Abhishek Choubey <abchoube@codeaurora.org>
2019-06-04 04:55:17 -07:00
Sriharsha Allenki
0e71405de3 phy: qusb: Add support for DP DM pulsing for HS PHY
PMIC on certain targets does not support DP DM pulsing.
This is needed to support detection of HVDCP chargers.
Add support for DP DM pulsing in the HS PHY driver that
PMIC can rely on, to dectect these chargers.

Change-Id: Ib889f57c88658e9d232872ca17270fe8cac2648d
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2019-06-04 02:27:17 -07:00
Sriharsha Allenki
923d660f4f ARM: dts: msm: Add support for float charger detection on MSM8996
Set the "qcom,check-for-float" flag for MSM8996 MTP to
support float charger detection by USB.

Change-Id: Ib456e0b5bf660e0e5e1b59e5ffb09f0c26e9b2e8
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2019-06-04 02:27:05 -07:00
Sriharsha Allenki
669f503685 usb: dwc3: Support float charger detection
Chargers on some platforms do not support FLOAT charger
detection. On these platforms, the float charger can be
detected depending on the state of the DP and DM lines as
detected by the PHY.
So, on these platforms check for the DP DM line state
and if found floating, do not start the peripheral mode
and notify PMIC -ETIMEDOUT implying the connected
charger is of type float.

Change-Id: I6bf54b0d5c143a849ce9ea7bc515d62204ed2f33
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2019-06-04 14:40:53 +05:30
Sharath Chandra Vurukala
b924e5efad net: sockev: avoid races between sockev and socket_close
Use-after-free is seen when sending a sockev netlink message
since socket is not held which can race with sk_free.

KASAN: use-after-free in sockev_client_cb+0x41c/0x4b8
	in net/core/sockev_nlmcast.c:104
Read of size 2 at addr <ffffffc08420c550>
Call trace:
dump_backtrace+0x0/0x388 arch/arm64/kernel/time.c:55
show_stack+0x24/0x30 arch/arm64/kernel/traps.c:152
__dump_stack+0x24/0x2c lib/dump_stack.c:17
dump_stack+0x8c/0xd0 lib/dump_stack.c:53
print_address_description+0x74/0x234 mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report+0x240/0x264 mm/kasan/report.c:412
__asan_report_load2_noabort+0x2c/0x38 mm/kasan/report.c:431
sockev_client_cb+0x41c/0x4b8 net/core/sockev_nlmcast.c:104
notifier_call_chain+0x104/0x158 kernel/notifier.c:93
__blocking_notifier_call_chain+0x80/0xb0 kernel/notifier.c:317
blocking_notifier_call_chain+0x3c/0x4c kernel/notifier.c:328
sockev_notify+0x30/0x3c net/socket.c:181
SYSC_bind net/socket.c:1509 [inline]
SyS_bind+0x1ec/0x30c net/socket.c:1489
el0_svc_naked+0x34/0x38
Freed by task 19460:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
__kasan_slab_free+0x134/0x20c mm/kasan/kasan.c:520
kasan_slab_free+0x10/0x1c mm/kasan/kasan.c:527
slab_free_hook mm/slub.c:1401 [inline]
slab_free_freelist_hook mm/slub.c:1422 [inline]
slab_free mm/slub.c:2979 [inline]
kmem_cache_free+0x114/0x664 mm/slub.c:3001
sk_prot_free net/core/sock.c:1504 [inline]
__sk_destruct+0x324/0x3c0 net/core/sock.c:1585
__sk_free+0x180/0x200 net/core/sock.c:1601
sk_free+0x44/0x50 net/core/sock.c:1612
sock_put include/net/sock.h:1643 [inline]
sk_common_release+0x198/0x20c net/core/sock.c:3014
raw_close+0x38/0x44 net/ipv4/raw.c:703
inet_release+0x128/0x15c net/ipv4/af_inet.c:446
__sock_release+0xb8/0x258 net/socket.c:614
sock_close+0x24/0x34 net/socket.c:1150
__fput+0x1f4/0x4e4 fs/file_table.c:345
____fput+0x20/0x2c fs/file_table.c:380
task_work_run+0x9c/0x174 kernel/task_work.c:113

Change-Id: Idb4335889b6e4228f36d76ca5b6156cc5e5838da
Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org>
Signed-off-by: Kaustubh Pandey <kapandey@codeaurora.org>
2019-06-04 09:49:19 +05:30
xianzhu
ecf5d04a09 i2c: add virtual i2c driver
add virtual i2c driver for virtualization platform.

Change-Id: I5aafa3b9db1e06d990b25a393f54f8763e73f9aa
Signed-off-by: xianzhu <xianzhu@codeaurora.org>
2019-06-03 18:28:20 -07:00
Dhanalakshmi Siddani
3973929bb0 asoc: Update max channels for TDM ports
Update max channels supported for TDM ports from 8 to 16.
Update pcm driver to support 32 channels and 32bit format.

Change-Id: I3d3b42983fff22e0102b9eb2aaca1a5698820605
Signed-off-by: Dhanalakshmi Siddani <dsiddani@codeaurora.org>
2019-06-03 22:13:42 +05:30
Linux Build Service Account
f5b94d9b13 Merge "fbdev: msm: check the length of the external input buffer properly" 2019-06-03 07:47:57 -07:00
Linux Build Service Account
866e7cab76 Merge "power: qpnp-smbcharger: Add support for dpdm pulsing" 2019-06-03 07:47:52 -07:00
Linux Build Service Account
69b14d87db Merge "diag: Prevent out-of-bound access while processing dci transaction" 2019-06-02 23:35:05 -07:00
Linux Build Service Account
16819b1724 Merge "diag: Prevent out-of-bound access while processing mask commands" 2019-06-02 23:35:03 -07:00
Linux Build Service Account
77b2a51180 Merge "soc: qcom: smem: validate fields of shared structures" 2019-05-31 04:24:53 -07:00
Linux Build Service Account
9c9f59ad52 Merge "msm: mdss: assign block_id for INTF_3" 2019-05-31 04:24:52 -07:00
Linux Build Service Account
9482fdb2ac Merge "asoc: Ratelimit error logs to avoid excessive logging" 2019-05-31 04:24:50 -07:00
Sriharsha Allenki
c0d5faa72d ARM: dts: msm: Enable DP DM pulsing support on MSM8996
The charger associated with MSM8996 does not support
HVDCP detection by default. Enable DP DM pulsing support
so that charger driver can support HVDCP detection.

Change-Id: I552851242b30d41a08fd908218130c12934b012f
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2019-05-29 22:40:59 -07:00
Shiju Mathew
20cff2eff8 soc: qcom: hab: Add open local-cancel and compiler warning fixes
Allow user to call close with mmid to do open local-cancel.Fix various
compiler warning regarding uninitialized variable and type mismatch. Add
more parameter check during physical channel send to avoid corner cases.

Change-Id: I0a557d7b1a3dac327a758cdb96052609fc8959cc
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
2019-05-29 11:43:40 -04:00
Kavya Nunna
2835220d65 power: qpnp-smbcharger: Add support for dpdm pulsing
The charger for msm8996 doesn't support HVDCP detection
by default. It depends on usb driver for dpdm pulsing,
set the dpdm property so that usb driver can initiate pulsing.

Change-Id: Ib2561f0429338375982dafbf8e71fd2d7ad32ef0
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2019-05-29 16:08:11 +05:30
Linux Build Service Account
705aac6195 Merge "msm: ais : Lock Implementation for avoid race condition" 2019-05-29 00:58:55 -07:00
Nirav Shah
e405d025f3 cnss2: Return failure if bus type do not match
Return failure in bus register if bus_type do not
match between cnss and wlan driver.

Change-Id: I9c322e4f6eca3220f1de18a6031715381ba495d7
Signed-off-by: Nirav Shah <nnshah@codeaurora.org>
2019-05-29 13:25:19 +05:30
Deepak Kumar Singh
cce4227225 soc: qcom: smem: validate fields of shared structures
Structures in shared memory that can be modified by remote
processors may have untrusted values, they should be validated
before use.

Adding proper validation before using fields of shared
structures.

CRs-Fixed: 2421602
Change-Id: I947ed5b0fe5705e5223d75b0ea8aafb36113ca5a
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2019-05-28 21:36:57 +05:30
Linux Build Service Account
24cedeb244 Merge "Merge android-4.4.180 (71cb827) into msm-4.4" 2019-05-28 08:37:19 -07:00
raghavendra ambadas
01fcd88c0f fbdev: msm: check the length of the external input buffer properly
dchdr->dlen is a short variable controlled by the user-provided data.
If the value is negative, loop continues, also increasing the value
of "len". As a result buffer overflow occurs. So define the len as
unsigned and check with length of string input from user space.

Change-Id: I8bb9ab33d543c826eb330e16ae116385d823ca98
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
2019-05-28 11:54:47 +05:30
Linux Build Service Account
2f6ef8a30b Merge "usb: f_gsi: Increase max control transfer size to 8K" 2019-05-27 21:57:43 -07:00
Linux Build Service Account
cfb05dba82 Merge "msm: ipa_v2: Protect ipa default routing table" 2019-05-27 08:01:49 -07:00
Linux Build Service Account
44607545fc Merge "qcom: smcinvoke: Fix stack overflow for arr_filp" 2019-05-27 00:42:19 -07:00
Linux Build Service Account
b29d59a33d Merge "defconfig: msm8996: Enable radio configs" 2019-05-27 00:42:16 -07:00
Anmolpreet Kaur
fa9dbbba72 qcom: smcinvoke: Fix stack overflow for arr_filp
arr_filp is an alias to filp_to_release. It is exposed
to access indices greater than allotted space of 15 bytes,
equal to size of OBJECT_COUNTS_MAX_OO. This change fixes
the stack overflow by taking an independent variable to track
the number of output objects.

Change-Id: Idca9cef3c69693d27d4ca3d0e0b4845fc27c998a
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
2019-05-26 23:22:34 -07:00
E V Ravi
17fe44d6eb msm: ais : Lock Implementation for avoid race condition
Lock Implementation for avoid race condition leading
to out-of-bound write in "msm_vb2_queue_setup

Change-Id: I386f1709bdf3328ae0c1db44980db8453849babf
Signed-off-by: E V Ravi <evenka@codeaurora.org>
2019-05-24 00:26:13 -07:00