Commit graph

590756 commits

Author SHA1 Message Date
Sriraj Hebbar
9e50d6c84d msm: camera: isp: Handle array out of bound access
The index obtained from pointer req_frm can lead to indexing
stream_info beyond its boundary. Therefore, a bound check has been
included to avoid this.

CRs-fixed: 2008683
Change-Id: I8682e09ff2ab7ba490bbbd9e20db978493c5f3e4
Signed-off-by: Senthil Kumar Rajagopal <skrajago@codeaurora.org>
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
Signed-off-by: Andy Sun <bins@codeaurora.org>
2017-07-17 03:45:38 -07:00
Linux Build Service Account
0530e3fe60 Merge "msm: camera: Use mutex lock to avoid race condition" into dev/msm-4.4-8996au 2017-07-16 07:48:43 -07:00
Linux Build Service Account
390fdea245 Merge "msm: camera: Use mutex lock to avoid race condition" into dev/msm-4.4-8996au 2017-07-16 07:40:24 -07:00
Krupal Divvela
652c891263 msm: camera: Use mutex lock to avoid race condition
Use mutex lock before using queuing ioctls like
queuing, dequeing buffers to avoid race condition.

CRs-Fixed: 2038086
Change-Id: Ia9fdfd5a766add2f8d99003b0c2bfe7d34d57a09
Signed-off-by: Krupal Divvela <kdivvela@codeaurora.org>
Signed-off-by: annamraj <annamraj@codeaurora.org>
Signed-off-by: VijayaKumar T M <vtmuni@codeaurora.org>
2017-07-13 00:39:57 -07:00
Zhiqiang Tu
b1caec8793 defconfig: arm64: msm: Enable PCI on virtual platform
Enable PCI and PCI_HOST_GENERIC on virtual platform.

Change-Id: Ifc9e2b34cc877ad9907811444de9a4577c9f62ec
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-07-12 23:05:41 -07:00
Linux Build Service Account
9d6dcc6f51 Merge "msm: ipa: add L2TP/VLAN messaging" into dev/msm-4.4-8996au 2017-07-12 20:23:00 -07:00
Vinayak Menon
045900c901 arm64: dma-mapping: fix aliasing issues with non-CMA alloc
Cache flush and clearing of logical mapping is done right now
only when the allocation is from CMA, for allocation requests
with DMA_ATTR_STRONGLY_ORDERED or DMA_ATTR_NO_KERNEL_MAPPING
set. Extend this to non-CMA allocations too, to avoid cache
aliasing issues.

Change-Id: I133d34d79665ee7159fe384121e933d7768748c2
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-07-12 20:10:46 -07:00
Shihuan Liu
cf2f223c28 msm: ipa: add L2TP/VLAN messaging
Add L2TP/VLAN messaging support in IPA driver
Conflicts:
	include/uapi/linux/msm_ipa.h

Change-Id: Ifce9adb1eb1946a2000f54933f1990747fe7daef
Acked-by: Shihuan Liu <shihuanl@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2017-07-12 19:26:36 -07:00
Linux Build Service Account
9356b9c45f Merge "msm: isp: camera: Avoid potential out of bound write" into dev/msm-4.4-8996au 2017-07-12 14:02:59 -07:00
Yimin Peng
61ac0efa23 ARM: dts: msm: Enable modem over virtual platform.
Add devices needed for modem.

Change-Id: I513c388df7dabec9ee1eb0b74af5d76cec261be5
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
2017-07-11 02:23:59 -07:00
Yimin Peng
79d3d06f2e defconfig: arm64: msm: Enable modem pass through on virtual platform
Add support to modem on virtual platform.

Change-Id: I0737efca335f695230ebc5f8aaec61778dfc1581
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
2017-07-11 02:19:21 -07:00
Yimin Peng
6b21fd9ece scm: fix potential build error.
References to the header file may cause multi definition.

Change-Id: Iccac423a5906f2493b33b34fd698324138ce9bcb
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
2017-07-11 02:18:13 -07:00
Venu Yeshala
f7de988aaf msm: isp: camera: Avoid potential out of bound write
Check the validity of VFE interface parameter that is
provided from userspace.

Change-Id: I0ebb95c824ab3f832aaf500a6655829cca846c3d
Signed-off-by: Venu Yeshala <vyeshala@codeaurora.org>
2017-07-09 19:38:49 -07:00
Terence Ho
dff0e346e3 msm: camera: Use mutex lock to avoid race condition
Use mutex lock before using queuing ioctls like
queuing, dequeing buffers to avoid race condition.

Change-Id: I59c70f2abe3daddf38761a2f17671d3d49f43989
CRs-fixed: 2038086
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
2017-07-09 19:37:24 -07:00
Linux Build Service Account
3610841a51 Merge "msm: camera: validate num_streams in stream_cfg_cmd before using it" into dev/msm-4.4-8996au 2017-07-07 17:38:05 -07:00
Abdulla Anam
0cf490e7c6 msm: vidc: Allocate memory dynamically for debugfs info_reads
Use dynamically allocated memory for constructing strings in
core_info_read & inst_info_read. This ensures that there is no
contention for a shared memory & hence avoids the requirement of
a lock. Allocate on demand, as the calls implement a debugfs
facility and hence rarely invoked. Statically allocated memory
otherwise remain idle.

Change-Id: I3ae04e0a51801a2fc901591e41e28ff6b7d198b4
Signed-off-by: Abdulla Anam <abdullahanam@codeaurora.org>
2017-07-07 17:16:07 -07:00
Terence Ho
9dc644af56 msm: camera: validate num_streams in stream_cfg_cmd before using it
stream_cfg_cmd->num_streams is from userspace,
need to check it against MSM_ISP_STATS_MAX before using it.

CRs-Fixed: 2029867
Change-Id: I02a71b983947981806470454654d712bcc732077
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
2017-07-07 15:30:22 -07:00
Linux Build Service Account
3258c68559 Merge "msm: camera: fix untrusted pointer for power down setting" into dev/msm-4.4-8996au 2017-07-07 15:29:00 -07:00
VijayaKumar T M
5c0e1f4016 msm: camera: fix untrusted pointer for power down setting
When getting power down setting, there is an untrusted pointer
from a user space pointer. Need to copy to the kernel space first.

CRs-Fixed: 2037398
Change-Id: I64032a96e62ddfeec85eebe984d8ba52754f6148
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
Signed-off-by: VijayaKumar T M <vtmuni@codeaurora.org>
2017-07-07 14:57:17 -07:00
Terence Ho
dd76644c6c msm: camera: fix untrusted pointer for power down setting
When getting power down setting, there is an untrusted pointer
from a user space pointer.Need to copy to the kernel space first.

Change-Id: I0c66e942453581caac5ea00a54a252840a32972f
CRs-Fixed: 2037398 2037403
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
2017-07-07 14:56:57 -07:00
Linux Build Service Account
87dfd9682c Merge "msm📷 correct stats query out of boundary" into dev/msm-4.4-8996au 2017-07-07 12:04:01 -07:00
Fei Zhang
54105d3ed6 msm📷 correct stats query out of boundary
fix one potential out of boundary query of stats info.

CRs-Fixed: 2041066

Change-Id: I13e4bf8802fcce529f9268c272e4727619d5ad8f
Signed-off-by: Fei Zhang <feizhang@codeaurora.org>
2017-07-07 11:47:06 -07:00
Fei Zhang
735884bc87 msm📷 correct stats query out of boundary
Fix a potential out of boundary query of stats info.

CRs-Fixed: 2041066
Change-Id: I76d4aa8c8ddd523fde007bfb6fa387a17930c2ba
Signed-off-by: Fei Zhang <feizhang@codeaurora.org>
2017-07-07 11:29:43 -07:00
Zhiqiang Tu
3f5f639b13 defconfig: arm64: msm: Enable pass through on virtual platform
Enable basic modules on virtual platform for driver pass through,
including pinctrl, gpio, clock, regulator, i2c, spi etc.

Change-Id: I3d4917e754277e0c55c55154a2ddb2f967199b48
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-06-26 22:02:18 -07:00
Linux Build Service Account
1ce84084dc Merge "defconfig: arm64: msm: Enable virtual platform" into dev/msm-4.4-8996au 2017-06-26 21:39:08 -07:00
Linux Build Service Account
18e7648d41 Merge "iommu: Fix compilation errors without CONFIG_IOMMU_API" into dev/msm-4.4-8996au 2017-06-26 21:39:06 -07:00
Zhiqiang Tu
b0b763bf53 ARM: dts: msm: Add spi_9 and i2c_8 on virtual platform
Add spi_9 and i2c_8 as pass through devices.

Change-Id: I6ccd161eee69ffa062bcb1763eebfe7a4db331ec
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-06-26 21:22:36 -07:00
Atul Raut
88dc521fe6 defconfig: arm64: msm: Enable virtual platform
Add support to build msm kernel based virtual
machine.

CRs-Fixed: 2000635
Change-Id: I76f4920a86adc8bac347c1c6c360ef55f84bc453
Signed-off-by: Atul Raut <araut@codeaurora.org>
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-06-24 07:44:17 -07:00
Patrick Daly
b9e9d37141 iommu: Fix compilation errors without CONFIG_IOMMU_API
Move code into appropriate #ifdef, and add an "inline" so the compiler no
longer gives a defined-but-not-used warning.

CRs-Fixed: 2066432
Change-Id: I226242bf994e659d8018a885f20c3a3f80b9b8e5
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
Signed-off-by: Atul Raut <araut@codeaurora.org>
2017-06-23 23:04:05 -07:00
Linux Build Service Account
6fb998c41a Merge "ARM: dts: msm: Add clock and regulator for virtual platform" into dev/msm-4.4-8996au 2017-06-23 01:47:23 -07:00
Zhiqiang Tu
e1ec43ff6d clk: msm: Add fixed rate clock support for dummy clock driver
Virtual platform uses dummy clock driver. It needs dummy clock
driver to support fixed rate clock.

Change-Id: Id0f6ce592447a443c22ad49fddeaa598cf3d047e
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-06-22 21:31:37 -07:00
Zhiqiang Tu
ca6aa324be ARM: dts: msm: Add clock and regulator for virtual platform
Add dummy clock and regulator stub for virutual platform to
bypass clock and regulator operations.

Change-Id: Ic2c15e4b939adc0ea492422c93e3f3eac2d01054
Signed-off-by: Ramachandran Venkataramani <ramavenk@codeaurora.org>
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-06-22 21:30:56 -07:00
Atul Raut
7350d1ad72 arm64: Kconfig: Enable support for guest virtual platform
Enable support for msm kernel based guest virtual machine
runs on QUIN platform.

CRs-Fixed: 2024587
Change-Id: If6b26ca5180f3a148a54c6f8980d4efbb65ab2a9
Signed-off-by: Atul Raut <araut@codeaurora.org>
2017-06-15 09:58:13 -07:00
Robin Murphy
eb7038b13a iommu/dma: Remove bogus dma_supported() implementation
Back when this was first written, dma_supported() was somewhat of a
murky mess, with subtly different interpretations being relied upon in
various places. The "does device X support DMA to address range Y?"
uses assuming Y to be physical addresses, which motivated the current
iommu_dma_supported() implementation and are alluded to in the comment
therein, have since been cleaned up, leaving only the far less ambiguous
"can device X drive address bits Y" usage internal to DMA API mask
setting. As such, there is no reason to keep a slightly misleading
callback which does nothing but duplicate the current default behaviour;
we already constrain IOVA allocations to the iommu_domain aperture where
necessary, so let's leave DMA mask business to architecture-specific
code where it belongs.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Git-commit: a1831bb9403720db6d4c033fe2d6bd0116dd28fe
Git-repo:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

CRs-Fixed: 2040683
Change-Id: I67431608ce196bf5ca981fb9aea2afce826094f0
Signed-off-by: Atul Raut <araut@codeaurora.org>
2017-06-13 21:48:56 -07:00
Zhiqiang Tu
d992f38d6d Merge remote-tracking branch 'remotes/quic/msm-4.4' into dev/msm-4.4-8996au
Conflicts:
	arch/arm64/configs/msm-auto-perf_defconfig

Change-Id: Ibc59804762c3e14031c22b03a52d49ff2acc36d4
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-06-12 15:40:13 +08:00
Linux Build Service Account
c1a2472056 Merge "fbdev: msm: Allocate fd with O_CLOEXEC flag" 2017-06-10 02:20:47 -07:00
Linux Build Service Account
73d6c8e7de Merge "msm: mdss: Buffer overflow while processing gamut table data" 2017-06-10 02:20:46 -07:00
Linux Build Service Account
1bfc4b2e71 Merge "fb: msm_dba: add post-on-sleep support for adv7533 vreg" 2017-06-10 02:20:45 -07:00
Linux Build Service Account
12cf20b0e9 Merge "ARM: dts: msm: update nt35597 panel properties for msm8998" 2017-06-10 02:20:43 -07:00
Linux Build Service Account
0ca5c4d703 Merge "msm: mdss: Do not attempt to request TE irq again if already requested" 2017-06-10 02:20:42 -07:00
Linux Build Service Account
5564915b1f Merge "ARM: dts: msm: Enable secondary USB port for HDK660" 2017-06-10 02:20:41 -07:00
Linux Build Service Account
69e7fcd32e Merge "icnss: Add APIs to store driver load count" 2017-06-09 18:47:16 -07:00
Linux Build Service Account
7c3a65b23d Merge "ARM: dts: msm: Disable MHI node for msm8996" 2017-06-09 18:47:15 -07:00
Linux Build Service Account
d3be51f52b Merge "ARM: dts: msm: add secure smmu cb node for msm8998" 2017-06-09 18:47:14 -07:00
Amar Singhal
e090be48c6 icnss: Add APIs to store driver load count
Host wlan driver needs to know if the drive has been
reloaded and wiphy re-registered with the kernel.
Therefore add APIs to retrieve this information.

CRs-Fixed: 2058292
Change-Id: Ia323e31e9b6779e2f5279f42b6e1860a9259a189
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
2017-06-09 12:45:06 -07:00
Linux Build Service Account
613ad18682 Merge "ARM: dts: msm: move tdm common prop to parent node for msm8996 auto" 2017-06-09 11:23:09 -07:00
Linux Build Service Account
ea7491238f Merge "ASoc: msm: add support for mixing data from different COPPs" 2017-06-09 11:23:08 -07:00
Linux Build Service Account
b93e191754 Merge "defconfig: add cfg80211 internal regdb suuport" 2017-06-09 11:23:07 -07:00
Linux Build Service Account
cf5d29992c Merge "msm: pcie: do not set irq chip data when using QGIC MSI" 2017-06-09 11:23:06 -07:00
Linux Build Service Account
a72ca7d8c8 Merge "msm: pcie: Fix for MDM enumeration issue" 2017-06-09 11:23:05 -07:00