Commit graph

602370 commits

Author SHA1 Message Date
Hardik Arya
b4e96cbba2 soc: qcom: Remove smp2p test support
Smp2p test code is used internally to test the
functionality of drivers and has no real use case
in end product.

Change-Id: I7a50c077bb71068188b5411424c5782b3d0edbb7
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2018-12-26 07:58:27 +01:00
Isaac J. Manjarres
d7a4d79fa6 soc: qcom: service-locator: Free PD list after client use
Currently, when a client invokes the service-locator to get
the domain list for a service, a data structure is dynamically
allocated to hold this information, and that is given to the
client for use. However, after the client uses the domain list,
the data structure is not freed, resulting in a memory leak.

Free domain list data structure after client use to fix
memory leak.

Change-Id: I2b87afefbb35c2c296b4267450fa3152e3725ab9
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2018-12-26 07:58:27 +01:00
Mohammed Javid
9713572a3e msm: ipa3: Fix to validate the user inputs
Adding code changes to validate user inputs.
Before allocating the NAT entry verifying the
NAT entry size in range or not.

Change-Id: I21147f20a12243af5d21aebdc206703964db2be4
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-12-26 07:58:27 +01:00
Yuanyuan Liu
0185d5c847 icnss: NULL terminate the fw build timestamp string
If fw build timestamp passed by QMI is a non-NULL terminated string,
it might result in a out-of-bounds read in icnss_get_soc_info. Hence,
manually NULL terminate the string.

Change-Id: I252196cd12784d841b29303c42591efc59da64f1
CRs-Fixed: 2322317
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2018-12-26 07:58:27 +01:00
Sean Tranchetti
937ca325e1 xfrm: validate template mode
XFRM mode parameters passed as part of the user templates
in the IP_XFRM_POLICY are never properly validated. Passing
values other than valid XFRM modes can cause stack-out-of-bounds
reads to occur later in the XFRM processing:

[  140.535608] ================================================================
[  140.543058] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x17e4/0x1cc4
[  140.550306] Read of size 4 at addr ffffffc0238a7a58 by task repro/5148
[  140.557369]
[  140.558927] Call trace:
[  140.558936] dump_backtrace+0x0/0x388
[  140.558940] show_stack+0x24/0x30
[  140.558946] __dump_stack+0x24/0x2c
[  140.558949] dump_stack+0x8c/0xd0
[  140.558956] print_address_description+0x74/0x234
[  140.558960] kasan_report+0x240/0x264
[  140.558963] __asan_report_load4_noabort+0x2c/0x38
[  140.558967] xfrm_state_find+0x17e4/0x1cc4
[  140.558971] xfrm_resolve_and_create_bundle+0x40c/0x1fb8
[  140.558975] xfrm_lookup+0x238/0x1444
[  140.558977] xfrm_lookup_route+0x48/0x11c
[  140.558984] ip_route_output_flow+0x88/0xc4
[  140.558991] raw_sendmsg+0xa74/0x266c
[  140.558996] inet_sendmsg+0x258/0x3b0
[  140.559002] sock_sendmsg+0xbc/0xec
[  140.559005] SyS_sendto+0x3a8/0x5a8
[  140.559008] el0_svc_naked+0x34/0x38
[  140.559009]
[  140.592245] page dumped becaus: kasan: bad access detected
[  140.597981] page_owner info is not active (free page?)
[  140.603267]
[  140.653503] ================================================================

Change-Id: I5d2fa78a9d950c79d83d759bfd4d0f399fed18a4
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2018-12-26 07:58:27 +01:00
Deepak Kumar
e833a5c714 msm: kgsl: Don't halt dispatcher if device is not in SUSPEND state
Add a check to make sure device actually transitioned to SUSPEND
state before halting dispatcher in adreno_suspend_device function.
kgsl_pwrctrl_change_state(device,KGSL_STATE_SUSPEND) in
kgsl_suspend_device can return zero without actually changing state
to SUSPEND if device state is NONE or INIT.

Change-Id: I4a5a69007c71651ea2cf7fa7360c960c6856031e
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
2018-12-26 07:58:27 +01:00
Swetha Chikkaboraiah
5d63ce78e8 ARM: dts: msm: update dload type imem offset for MSM8998
Dload type imem offset is corrected for MSM8998, so that
correct imem address is updated.

Change-Id: I519603641753ec39d86fbf923bd80afcd6b1345d
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2018-12-26 07:58:27 +01:00
Sahitya Tummala
eef9a048b6 defconfig: msm: Disable EXT2 and EXT3 FS configs for MSM8998
This is required to fix the VTS test case failures which are failing
as the kernel supports EXT2/EXT3 but the tools mkfs.ext2/mkfs.ext3
doesn't exist anymore.

Change-Id: I46aa9e9a9c7ebac4655f18fda1451bd2cf594a25
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2018-12-26 07:58:27 +01:00
Mohammed Javid
8200545876 msm:ipa:Prevent rt rule deletion if rt rule id is invalid
Currently RT is deleted even if rt rule or header proc ctx
is invalid. Add check to prevent it.

Change-Id: Ic37ff9a33fab2b3c0d6393e43452e4b62a91d932
Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-12-26 07:58:27 +01:00
Archana Sriram
004e074541 msm: kgsl: Correct the state transitions in suspend function
GPU should not be forced to SUSPEND state when it is in INIT
or NONE state as this transition is invalid.

Change-Id: Ia3d0fd131348508fe34c57f271c1f991a98afa19
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
2018-12-26 07:58:27 +01:00
Amit Kushwaha
379e7e19ad msm: kgsl: create sysfs entries to expose memory usage
Added sysfs entries to show kgsl memory usage statistics.
gpumem_mapped: kgsl memory mapped in the process address space.
gpumem_unmapped: kgsl allocated memory but not mapped in process.
imported_mem: graphics memory not allocated by the kgsl.

Below is the sysfs path for new entries:
/sys/class/kgsl/kgsl/proc/<pid>/

Change-Id: I08c2014d28dc0ca1e2b54ebf966d00143b303b54
Signed-off-by: Amit Kushwaha <kushwaha@codeaurora.org>
2018-12-26 07:58:27 +01:00
Padmanabhan Komanduru
9328b4af2a clk: qcom: mdss: avoid release of the dynamic fps PLL code memory
Avoid the release of memory for dynamic fps PLL codes. The memory
is part of the continuous splash memory region and will be freed
eventually as part of the splash screen memory cleanup routine.

Change-Id: I67afb46057770298668ae5790637e8b4b08fd030
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-12-26 07:58:27 +01:00
Padmanabhan Komanduru
8dbe0c40bc ARM: dts: msm: update the DSI bit clock for DSI panel on SDM660
Update the DSI bit clock frequencies supported for the NT35597
video mode panel on SDM660 for dynamic bit clock feature.

Change-Id: I597bb43bf8f93aa6d98afff5d5b8973689460b41
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-12-26 07:58:27 +01:00
Padmanabhan Komanduru
423d0998bb ARM: dts: msm: enable dynamic bit clock for SDM660 MTP panel
Add DT properties to enable support for dynamic DSI bit clock
feature on NT35597 dual DSI video mode panel on SDM660.

Change-Id: I9b382a7a79ba546c8f99889a5a14d2733ea8771f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-12-26 07:58:26 +01:00
Padmanabhan Komanduru
22e10c082a msm: mdss: add support to switch the DSI clock dynamically
Add change to support changing the DSI bit clock dynamically
for video mode panels. This helps to avoid interference of
DSI clock with other subsystems runtime.

Change-Id: I05790a6dd9d8a2fc3cf31727d032e5220d6164e5
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-12-26 07:58:26 +01:00
Padmanabhan Komanduru
8a2a881b50 ARM: dts: msm: add DT properties for dynamic refresh for SDM660/SDM630
Add the DT properties in DSI controller/PLL nodes/memory nodes which
are needed for supporting dynamic refresh feature for SDM660/SDM630.

Change-Id: Iccfaf219705de28eb4bd721987075eab09b0120f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-12-26 07:54:00 +01:00
Padmanabhan Komanduru
16f501e1ac clk: qcom: mdss: add support for dynamic refresh on DSI 14nm PLL
Add CLK_SET_RATE_NO_REPARENT flag for the software mux clocks in
DSI 14nm PLL driver which is needed for dynamic refresh feature.
Update the dynamic fps structure to align the PLL codes with
vco frequency instead of fps.

Change-Id: I533f615ce51be7229171b6accac3f14ab2dca949
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-12-26 07:54:00 +01:00
Amine Najahi
c6077ea2a2 fbdev/msm: sanitize debugfs inputs when reading mdp memory
Sanitize debugfs inputs to only allow access to mdp memory block
specified in dtsi file. This change will allow only one single block
to be read at the time and will avoid accessing memory outside of valid
decode space which can trigger AHB error bus response.

Change-Id: Icede9a8939a66faa59d674c18183fb0ebcf67908
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2018-12-26 07:54:00 +01:00
Mohammed Javid
1d0bfe3b3e msm: ipa: Protect ipa default routing table
Protect ipa default routing table from
addition, deletion and modification once after
default rule added by ipa-driver.

Change-Id: I045d9c29fed23edf796d826e440b81124e1f666a
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-12-26 07:54:00 +01:00
Vipin Deep Kaur
53d41a76e1 i2c-msm-v2: Handle Null pointer de-reference
Zero message may be passed causing null pointer de-reference.
Adding check on the number of messages passed to handle the issue.

Change-Id: I7cef6dd2070c5eaaa748698c45540f8aa1d96116
Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
2018-12-26 07:54:00 +01:00
Fei Mao
a430609f8f ARM: dts: msm: remove HOME gpio key for qrd devices
For qrd devices, remove HOME gpio key to fix driver probe issue.

Change-Id: I46ba4ef05c795fced67f2db59a3f5ce183bdeba8
Signed-off-by: Fei Mao <feim1@codeaurora.org>
2018-12-26 07:54:00 +01:00
Liam Mark
062f85fd05 ion: Ensure non-HLOS memory cannot be mapped by CPU
Currently it is possible for an ION client to allocate non-HLOS memory
(ie memory which isn't assigned to the HLOS vmid), map this memory, and
then attempt to access this memory from the CPU.
Attempting to access non-HLOS memory from the CPU will cause a
stage-2 fault.

Fix ION so that non-HLOS memory cannot be mapped by the CPU.

Change-Id: Ifb51de2eabc076cddc744c13f01ef97b4a7c6874
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2018-12-26 07:54:00 +01:00
Ajay Agarwal
140713e20e usb: dwc3-msm: Release PM wakelock in host mode only for auto targets
Currently the driver releases PM wakelock in host mode. This
causes pm_suspend to get triggered. Although pm_suspend bails out
but xhci_bus_suspend transitions the bus to a bad state leading
to host mode failure.
Fix this by releasing wakelock only for targets on which we allow
PM suspend in host mode irrespective of runtimePM.

Change-Id: I6648991272c0f22b032b526bce3a76864fec63a5
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-26 07:54:00 +01:00
Laxminath Kasam
74157fe0fb soc: soundwire: Fix wsa mute issue for stereo playback
When stereo playback start and temperature read
initiated at same time, one of speaker PA bits are
not set in particular race scenario. Handle the
broadcast check in soundwire framework to ensure
broadcast is disabled only when respective gr_sid
slave calls swr_remove_from_group.

CRs-Fixed: 2282230
Change-Id: I6f82a8c3c0f39dc20c1def09c1728ce4c26c2f5d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-12-26 07:53:59 +01:00
Laxminath Kasam
6ab53a6bd6 soc: swr-wcd-ctrl: Fix wsa mute issue for stereo playback
When temperature on a single wsa881x device is being read,
then soundwire master wakes up both wsa881x devices but
regcache_sync is happening only for one wsa881x device on
which the temperature is being read. This results in
audio playback mute after temperature read. Fix the
regcache sync during temperature read and playback usecase.

CRs-Fixed: 2282230
Change-Id: I856b96517c629ac685bbc25caabee841037106c8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-12-26 07:53:59 +01:00
Laxminath Kasam
9da7997716 ASoC: wsa881x: Fix regcache sync issue during playback
When temperature on a single wsa881x device is being read,
then soundwire master wakes up both wsa881x devices but
regcache_sync is happening only for one wsa881x device on
which the temperature is being read. This results in
audio playback mute after temperature read. Fix the
regcache sync during temperature read and playback usecase.

CRs-Fixed: 2282230
Change-Id: I054f4432d7ae7bce922341ad62b20544cccd5865
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-12-26 07:53:58 +01:00
Anurag Chouhan
b025cdfd53 icnss: Add check for rejuvenate in fw_down
Currently, fw_down is not getting set in case of rejuvenate
since the qmi server never exit or arrive in case of rejuvenate.
Add ICNSS_REJUVENATE flag to take care of rejuvenate.

Change-Id: If85e8048cbad9a15e1c94af1c8d0012e004e6150
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
2018-12-26 07:53:57 +01:00
liochen
8148b9d900 Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0
kernel device tree source code for OnePlus 5 & 5T P device

Change-Id: I84f40e66833ea1ce30eb1d9a710d6e1529e9e637
2018-12-26 11:02:39 +08:00
Linux Build Service Account
f5a1f5889a Merge "msm: camera: Fix arbitrary kernel write" into kernel.lnx.4.4.r35-rel 2018-10-06 00:29:28 -07:00
Haibin Liu
003dc4139e msm: camera: Fix arbitrary kernel write
In 64 bit kernel and 32 bit userspace,ioctl_ptr from
kernel space, should NOT call the copy_from_user.

In 64 bit kernel and 64 bit userspace,ioctl_ptr from
user space, use the copy_from_user to copy data.

use the is_compat_task to distinguish two condition.

CRs-Fixed: 2283160
Change-Id: If9205e4f3176a52e52f694a3183dc9c5b7617a97
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
2018-10-06 00:22:48 -07:00
Anurag Chouhan
33220157ed wcnss: Fix buffer overflow in wcnss_prealloc_get
There is potential integer truncation in the wcnss_prealloc_get api.
size_t is 8 byte on x64 platform and "unsigned int" is 4 byte.
To avoid this integer truncation, pass size as size_t instead
of unsigned int.

CRs-Fixed: 2269610
Change-Id: I14b274dd7cad98b55fdce1aaa27783272231afde
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
2018-10-06 00:22:15 -07:00
Linux Build Service Account
de955d190d Merge 785510ce71 on remote branch
Change-Id: I443fb398e9c54bd7353a29cf474b5e44e54e69bc
2018-10-03 05:48:17 -07:00
Linux Build Service Account
785510ce71 Merge "wqcrypto: qcedev: Add null pointer check on sg_src" 2018-09-27 09:00:19 -07:00
Linux Build Service Account
5600f6b446 Merge "ARM: dts: msm: Display changes for SDM455" 2018-09-27 09:00:17 -07:00
Linux Build Service Account
0bbd4b730a Merge "diag: Update the logging codes of events, logs and msgs" 2018-09-27 09:00:16 -07:00
Nirmal Abraham
ec05268f4c ARM: dts: msm: Display changes for SDM455
Disable 'assertive display', 'destination scaler' and
'display port' support for SDM455.

Change-Id: I4de89658a6c5b20c97e9fc0f611aaa81f701a9d7
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
2018-09-24 22:15:05 -07:00
Zhen Kong
058a10e330 qseecom: fix kclient free issue in qseecom_remove
Remove kzfree() after kclient list iteration to avoid invalid
pointer deference.

Change-Id: I78922269e219fcb16d3cff05f8b168a75a3c05ae
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2018-09-24 11:35:44 -07:00
Ramandeep Trehan
6523651f7d wqcrypto: qcedev: Add null pointer check on sg_src
Add a null pointer check on sg_src to avoid a possible
null pointer dereference in qcedev driver.

Change-Id: I9d4f9147ae6c340064110381c98d064f29fd9444
Signed-off-by: Ramandeep Trehan <rtrehan@codeaurora.org>
2018-09-21 16:11:40 +05:30
Manoj Prabhu B
70c285e0b1 diag: Update the logging codes of events, logs and msgs
New msg SSIDs, log and event mask codes for different subsystems
are added as a new requirement for enable logging.

Change-Id: I31e784307e6de388e1de0806baacf00116360c30
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2018-09-19 14:18:32 +05:30
Linux Build Service Account
727593cbf7 Merge "drivers: soc: qcom: qcpe: Fix return values" 2018-09-18 09:44:50 -07:00
Linux Build Service Account
79d712a8a4 Merge "defconfig: Disable CONFIG_INET_LRO to avoid pop up" 2018-09-18 09:44:49 -07:00
Linux Build Service Account
da56125cdc Merge "arm64: Silence first allocation with CONFIG_ARM64_MODULE_PLTS=y" 2018-09-18 09:44:48 -07:00
Linux Build Service Account
5b8d95d021 Merge "mm: Silence vmap() allocation failures based on caller gfp_flags" 2018-09-18 09:44:47 -07:00
Linux Build Service Account
a0c8965866 Merge "soc: qcom: glink: Fix not sending READ_NOTIF command issue" 2018-09-18 09:44:46 -07:00
Linux Build Service Account
1b39365d9e Merge "ARM: Silence first allocation with CONFIG_ARM_MODULE_PLTS=y" 2018-09-18 09:44:45 -07:00
Linux Build Service Account
3c361ea66f Merge "clk: qcom: check for change in RCG configuration during set_rate" 2018-09-18 09:44:42 -07:00
Vara Prasad A V S G
30f7e5cd6c defconfig: Disable CONFIG_INET_LRO to avoid pop up
Disable CONFIG_INET_LRO in sdm660_defconfig
and sdm660-perf_defconfig to avoid pop up.

Change-Id: I62069b3f8df27812f714e9875a0e7b7e20e31d4c
Signed-off-by: Vara Prasad A V S G <vavsg@codeaurora.org>
Signed-off-by: Naitik Bharadiya <bharad@codeaurora.org>
2018-09-18 05:59:13 -07:00
Florian Fainelli
542f97a260 mm: Silence vmap() allocation failures based on caller gfp_flags
If the caller has set __GFP_NOWARN don't print the following message:
vmap allocation for size 15736832 failed: use vmalloc=<size> to increase
size.

This can happen with the ARM/Linux or ARM64/Linux module loader built
with CONFIG_ARM{,64}_MODULE_PLTS=y which does a first attempt at loading
a large module from module space, then falls back to vmalloc space.

Change-Id: Ib907156055959e22a419b79fb424772baea556d0
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-Commit: 03497d761c55438144fd63534d4223418fdfd345
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2018-09-18 02:11:06 -07:00
Florian Fainelli
25535b0409 ARM: Silence first allocation with CONFIG_ARM_MODULE_PLTS=y
When CONFIG_ARM_MODULE_PLTS is enabled, the first allocation using the
module space fails, because the module is too big, and then the module
allocation is attempted from vmalloc space. Silence the first allocation
failure in that case by setting __GFP_NOWARN.

Change-Id: I94ed69d0cb42b16f68b08354f6f62dc22851d84a
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: 75d24d968af8913f641c612930c96acc5399e427
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2018-09-18 01:57:26 -07:00
Florian Fainelli
7fa0962396 arm64: Silence first allocation with CONFIG_ARM64_MODULE_PLTS=y
When CONFIG_ARM64_MODULE_PLTS is enabled, the first allocation using the
module space fails, because the module is too big, and then the module
allocation is attempted from vmalloc space. Silence the first allocation
failure in that case by setting __GFP_NOWARN.

Change-Id: I15999e9fb0405dbd76e74dde5b2f94025899d875
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Git-commit: 0c2cf6d9487cb90be6ad7fac66044dfa8e8e5243
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2018-09-18 01:55:47 -07:00