Commit graph

893,362 commits

Author SHA1 Message Date
qctecmdr
cd70e1f455 Merge "input: touchscreen: nt36xxx: Fix Propagation" 2020-12-05 23:42:40 -08:00
qctecmdr
0249e58009 Merge "sched/walt: Improve the scheduler" 2020-12-05 23:42:40 -08:00
qctecmdr
ca8993b29a Merge "block: disable multi-page bvec" 2020-12-04 22:41:50 -08:00
Marc Zyngier
e7eb07515d UPSTREAM: HID: core: Correctly handle ReportSize being zero
commit bce1305c0ece3dc549663605e567655dd701752c upstream.

It appears that a ReportSize value of zero is legal, even if a bit
non-sensical. Most of the HID code seems to handle that gracefully,
except when computing the total size in bytes. When fed as input to
memset, this leads to some funky outcomes.

Detect the corner case and correctly compute the size.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bce1305c0ece3dc549663605e567655dd701752c)
Change-Id: I5ab5febc22b8d5d8c5d398c3ff93f73cb3c90e05
Signed-off-by: Todd Kjos <tkjos@google.com>
2020-12-04 23:36:51 +00:00
Marc Zyngier
bdf78f318d UPSTREAM: HID: core: Sanitize event code and type when mapping input
commit 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 upstream.

When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.

This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmable".

Instead of taking the event code at face value, check that it actually
fits the corresponding bitmap, and if it doesn't:
- spit out a warning so that we know which device is acting up
- NULLify the bitmap pointer so that we catch unexpected uses

Code paths that can make use of untrusted inputs can now check
that the mapping was indeed correct and bail out if not.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 35556bed836f8dc07ac55f69c8d17dce3e7f0e25)
Change-Id: Ie4dc11f43ed1eae2d09feaf9cff17d6d16cf9987
Signed-off-by: Todd Kjos <tkjos@google.com>
2020-12-04 23:13:47 +00:00
Bao D. Nguyen
6809250dff scsi: ufs: Correct H8_ENTER_COND_MASK
Correct the parameters passed to GENMASK macro
for H8_ENTER_COND_MASK.

Change-Id: If9997c7fb18d28aacce58697666c1c36a56b9a68
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
2020-12-04 11:31:44 -08:00
qctecmdr
2376e2a4b4 Merge "defconfig: Enable EUD on sdxlemur" 2020-12-04 11:18:01 -08:00
qctecmdr
b5aa72cc8f Merge "msm: adsprpc: Change perf module design" 2020-12-04 11:18:01 -08:00
Blagovest Kolenichev
2ae07b4ea0 Merge android11-5.4.61+ (559c23e) into msm-5.4
* refs/heads/tmp-559c23e:
  ANDROID: vmlinux.lds.h: merge compound literal sections
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: ABI: update allowed list for QCOM
  ANDROID: GKI: add allowed list for Exynosauto SoC
  ANDROID: GKI: update allowed list for Exynosauto SoC

Change-Id: Ie14c0cd26fa28df04f104ce5249e4cebc7e43083
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-12-04 11:10:37 -08:00
qctecmdr
5fd6cfbf0f Merge "msm: kgsl: Including drawobj flag for msm-perf api" 2020-12-04 05:45:45 -08:00
qctecmdr
8b2cfb34e8 Merge "usb: gadget: Don't giveback request if ep command times out" 2020-12-04 05:45:44 -08:00
qctecmdr
7b64f46b79 Merge "iommu: arm-smmu: defer tlbi invalidation" 2020-12-04 05:45:44 -08:00
qctecmdr
f1971555ee Merge "proc/meminfo: update offline region in Memtotal" 2020-12-04 05:45:44 -08:00
qctecmdr
93fe7227e1 Merge "drivers: soc: ddr_stats: Initialize the uninitialized variable" 2020-12-04 05:45:44 -08:00
qctecmdr
5116273a38 Merge "drivers: staging: ion: mark secure page private" 2020-12-04 05:45:43 -08:00
qctecmdr
a3ecd679dc Merge "msm: ADSPRPC: Handle Null pointer De-reference" 2020-12-04 05:45:43 -08:00
qctecmdr
75e68a7d23 Merge "soc: qcom: glink_probe: use lock while sending ssr notification" 2020-12-04 05:45:43 -08:00
Prudhvi Yarlagadda
8d08ca8e48 serial: msm_geni_serial: Correct start rx sequence
Correct start_rx sequence to keep the dma buffers available
before starting rx engine.
This is needed to handle rx data which might come between
starting of rx engine and having dma buffer available.

Change-Id: I194890ba8f51d6a917d6b1682f6b21ca443ca38b
Signed-off-by: Prudhvi Yarlagadda <pyarlaga@codeaurora.org>
2020-12-04 05:17:02 -08:00
Aman Mehta
b712bdb81b msm: kgsl: Including drawobj flag for msm-perf api
The inclusion of draw object flag for msm_perf_events_update.
Since user-space thread is triggered based on kgsl events
this will be vital to distinguish the events based on frame
states and prevent undesirable user-space thread wake-ups.

Change-Id: I28040808d6c114b718aad0e0ab63554683e77460
Signed-off-by: Aman Mehta <amanmeht@codeaurora.org>
2020-12-04 01:24:32 -08:00
qctecmdr
3402a7974e Merge "mailbox: apcs-ipc: Add compatible string for sdxnightjar" 2020-12-04 01:05:25 -08:00
qctecmdr
68d460cb7d Merge "haven: remove config to disable hyp uart" 2020-12-04 01:05:24 -08:00
qctecmdr
6efa9b3e62 Merge "defconfig: enable MDF core for WCD support for sdxnightjar" 2020-12-04 01:05:24 -08:00
qctecmdr
e73c8ff3a8 Merge "input: touchscreen: nt36xxx: add new touch driver" 2020-12-04 01:05:23 -08:00
Asish Bhattacharya
3cbf423423 defconfig: enable MDF core for WCD support for sdxnightjar
Enable the Kconfig to expose mfd APIs.

Change-Id: Id401ba94222df508a901c330443b705b35265883
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2020-12-04 07:13:14 +05:30
Asish Bhattacharya
9fc7c22ea4 msm: mfd: Enable MFD for WCD support
Add support to enable MFD core.

Change-Id: I512c2024498ff426fb45127d64b7035d63c65694
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2020-12-04 07:12:57 +05:30
Murali Nalajala
feb7397985 haven: remove config to disable hyp uart
Hyp uart is default disabled from ABL now. There is no need of
CONFIG_HH_DISABLE_UART option anymore. Hyp uart now can be controlled
using DEBUG_FS interface.

Change-Id: Ie1a0986399d30b89bf62468a23633994c8d6b11b
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2020-12-03 17:19:56 -08:00
Raghavendra Rao Ananta
ddcb1352e3 pinctrl: qcom: Add flexibility to disable the wakeup capability
By default, the system firmware enables the mpm wakeup functionality
of all the supported GPIOs. However, certain usecases demand that
this capability be disabled on certain gpios. Hence, provide a
generic interface to disable the GPIOs as needed.

Change-Id: I3b051bf676a157410880a3c596b784212a927a36
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
2020-12-03 16:44:28 -08:00
Murali Nalajala
704f8b0a03 haven: ctrl: add debugfs interface to control hyp uart
Hyp uart is disabled default today in ABL. Provide debugfs
interface to users when they want to enable hyp uart to
debug hypervisor and VM issues.

Change-Id: I5e2c0501ed309a65c9dff1304b2e88e0d58917ae
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2020-12-03 16:38:09 -08:00
Siddartha Mohanadoss
4a4ec3c5af mhi_dev: add MHI device driver snapshot
Snapshot of PCIe MHI device driver as of msm-4.14.
'commit <adeff59> (""drivers: clk: msm:
fix compilation for non DEBUG_FS build"")'.

Fix several warnings as part of propagation to 5.4.

Change-Id: I48b88d8e8900cb6e166c24ad2322a6fa2ec6fb8a
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2020-12-03 13:23:57 -08:00
Ashok Vuyyuru
1483d01dc1 msm: Add dataipa to SDXNIGHTJAR compilation
Add IPA to sdx nightjar defconfig file.

Change-Id: Iab97b4384bed2c4e56643ab520179a67ed85ca98
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-12-04 00:48:11 +05:30
Jeya R
7041312492 ADSPRPC: Enable ram dumps collection
Enabled ram dump collection for CMA memory
that is used for remote heap and dynamic loading memory.

Change-Id: I07fe071ee90b39204822aee368b52b7e63b5600d
Acked-by: Krishnaiah Tadakamalla <ktadakam@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
Signed-off-by: Vamsi krishna Gattupalli <vgattupa@codeaurora.org>
2020-12-03 23:24:10 +05:30
qctecmdr
b0d1963b89 Merge "arm64: defconfig: Add support for GPUCC for YUPIK" 2020-12-03 06:20:07 -08:00
qctecmdr
11b5bc34f4 Merge "usb: dwc3-msm: Avoid access of gsi_reg for non-GSI targets" 2020-12-03 06:20:07 -08:00
qctecmdr
5161b65167 Merge "cnss_utils: Compile wlan service file as part of GPL module" 2020-12-03 06:20:06 -08:00
qctecmdr
d3cbb54d34 Merge "msm: ipa: Support hardware accelerated DIAG over qdss with ipa_fmwk" 2020-12-03 06:20:06 -08:00
qctecmdr
f79ed0dbae Merge "selinux: move ibpkeys code under CONFIG_SECURITY_INFINIBAND" 2020-12-03 06:20:06 -08:00
qctecmdr
bdd0d3a7cc Merge "drivers: soc: qcom: Check if readq_relaxed macro is defined" 2020-12-03 06:20:05 -08:00
Linus Torvalds
16a3a08dc9 mm: fix misplaced unlock_page in do_wp_page()
Commit 09854ba94c6a ("mm: do_wp_page() simplification") reorganized all
the code around the page re-use vs copy, but in the process also moved
the final unlock_page() around to after the wp_page_reuse() call.

That normally doesn't matter - but it means that the unlock_page() is
now done after releasing the page table lock.  Again, not a big deal,
you'd think.

But it turns out that it's very wrong indeed, because once we've
released the page table lock, we've basically lost our only reference to
the page - the page tables - and it could now be free'd at any time.  We
do hold the mmap_sem, so no actual unmap() can happen, but madvise can
come in and a MADV_DONTNEED will zap the page range - and free the page.

So now the page may be free'd just as we're unlocking it, which in turn
will usually trigger a "Bad page state" error in the freeing path.  To
make matters more confusing, by the time the debug code prints out the
page state, the unlock has typically completed and everything looks fine
again.

This all doesn't happen in any normal situations, but it does trigger
with the dirtyc0w_child LTP test.  And it seems to trigger much more
easily (but not expclusively) on s390 than elsewhere, probably because
s390 doesn't do the "batch pages up for freeing after the TLB flush"
that gives the unlock_page() more time to complete and makes the race
harder to hit.

Fixes: 09854ba94c6a ("mm: do_wp_page() simplification")
Link: https://lore.kernel.org/lkml/a46e9bbef2ed4e17778f5615e818526ef848d791.camel@redhat.com/
Link: https://lore.kernel.org/linux-mm/c41149a8-211e-390b-af1d-d5eee690fecb@linux.alibaba.com/
Reported-by: Qian Cai <cai@redhat.com>
Reported-by: Alex Shi <alex.shi@linux.alibaba.com>
Bisected-and-analyzed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Tested-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: be068f29034fb00530a053d18b8cf140c32b12b3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[zhenhuah@codeaurora.org: resolved conflict]
Change-Id: I775e3706aa5d6be6b8352e8f59cb10e8d9326c5c
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2020-12-03 21:35:12 +08:00
Peter Xu
305560476f mm/gup: Remove enfornced COW mechanism
With the more strict (but greatly simplified) page reuse logic in
do_wp_page(), we can safely go back to the world where cow is not
enforced with writes.

This essentially reverts commit 17839856fd58 ("gup: document and work
around 'COW can break either way' issue").  There are some context
differences due to some changes later on around it:

  2170ecfa7688 ("drm/i915: convert get_user_pages() --> pin_user_pages()", 2020-06-03)
  376a34efa4ee ("mm/gup: refactor and de-duplicate gup_fast() code", 2020-06-03)

Some lines moved back and forth with those, but this revert patch should
have striped out and covered all the enforced cow bits anyways.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: a308c71bf1e6e19cc2e4ced31853ee0fc7cb439a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[zhenhuah@codeaurora.org: resolve trivial merge conflict]
Change-Id: I1e72c780c74b324efe6dbeed17ab131657254f16
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2020-12-03 21:23:22 +08:00
Prakash Gupta
ed8be7b855 proc/meminfo: update offline region in Memtotal
When memory block is logically offlined, it is still part of System RAM but
is inactive, and can be made active or Onlined anytime.
Take totalram snapshot to include offlined memory in Memtotal.
This method avoids taking device_hotplug lock to meminfo.

Fixes: dc00b6d99a ("proc/meminfo: include offlined region for mem total")
Change-Id: I2b69444e6f066e1c1928278707616840308b00d0
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2020-12-03 02:42:01 -08:00
Prakash Gupta
88d7aafe84 iommu: arm-smmu: defer tlbi invalidation
With QCOM quirks, the invalidations are agrregated to reduce map/unmap
time.  In absenence of CONFIG_QCOM_IOMMU_TLBI_QUIRKS enabled, the map/unmap
latency impact time critical usecases. Hence defer TLB invalidation when
CONFIG_QCOM_IOMMU_TLBI_QUIRKS is not enabled.

Change-Id: I866b4211901f71fe054bbd9f465b4df5c7dac82c
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2020-12-03 02:29:26 -08:00
Deepak Kumar Singh
c3c08ac7a1 soc: qcom: glink_probe: use lock while sending ssr notification
In ssr handling of remote subsystem down, all rpmsg devices are removed
for that edge. If at the same time ssr down is received for other remote
subsystem, it may try to notify already down remote and end up using
invalid rpmsg device which causes use after free.

Store device state in ssr context and update this with holding a lock.
SSR notification function should also use the same lock and perform
check for validity of rpmsg device.

CRs-Fixed: 2580433
Change-Id: I339e228a527f7b6a737944d8e9e53caa31992914
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2020-12-03 13:49:27 +05:30
Deepak Kumar Singh
95d601bb7f soc: qcom: glink_probe: Use ref count for holding ssr context
During ssr rpmsg ssr device will unregister, which can result
in use of stale device pointer in ssr callback function.

Now incrementing refcount inside ssr callback function to
prevent release of rpmsg device.

CRs-Fixed: 2551255
Change-Id: If3fc57c4635378dc6fdcb7df120c83dca0e83758
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2020-12-03 13:49:09 +05:30
Puranam V G Tejaswi
8e563d86c4 msm: kgsl: Allocate user_ctxt_record based on preemption feature flag
Allocation of memory to user_ctxt_record is done based on adreno_device
flag. If a context is created when preemption is disabled, the memory
to user_ctxt_record is not allocated. Now if we enable preemption,
through the sysfs knob, the device flag is again set. We may try to
access user_ctxt_record in preemption_pre_ibsubmit(). So allocate memory
to user_ctxt_record based on the preemption feature flag instead
of preemption device flag.

Change-Id: I947ef5a1bfbd8bff471427fae60d7fcd507b85a2
Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
Signed-off-by: Harshitha Sai Neelati <hsaine@codeaurora.org>
2020-12-03 00:12:37 -08:00
Ravikanth Tuniki
6b33e5f704 input: touchscreen: nt36xxx: Fix Propagation
This change propagates the missing fixes in novatek tcm touch
driver from msm-4.19 to msm-5.4.

Change-Id: Ie404c8412f7efa847b8e14965bcaf45568225502
Signed-off-by: Ravikanth Tuniki <rtunik@codeaurora.org>
2020-12-03 13:26:01 +05:30
Matthias Maennich
cd02993624 FROMLIST: scripts: merge_config: add strict mode to fail upon any redefinition
When merging configuration fragments, it might be of interest to
identify mismatches (redefinitions) programmatically. Hence add the
option -s (strict mode) to instruct merge_config.sh to bail out in
case any redefinition has been detected.

With strict mode, warnings are emitted as before, but the script
terminates with rc=1. If -y is set to define "builtin having
precedence over modules", fragments are still allowed to set =m (while
the base config has =y). Strict mode will tolerate that as demotions
from =y to =m are ignored when setting -y.

Bug: 174454795
Link: https://lore.kernel.org/linux-kbuild/20201202151238.3776616-1-maennich@google.com/
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Ib982a87811956e48b718a15680f06474a39dc19d
(cherry picked from commit 32164038495558fbc6d47f36033bac3014f53b8e)
2020-12-03 07:16:08 +00:00
Armaan Siddiqui
d3634cfade msm: ipa3: add support on sockv5 info
Add the header file changes for socksv5
info passed from other modules.

Change-Id: I24c0bbb3344fd97d0468a78b9d5fa95f05fbe198
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2020-12-03 12:07:09 +05:30
chenx
46689bcfc2 input: touchscreen: nt36xxx: add new touch driver
Add this new touch driver code here.

Change-Id: Ibc8c382cb67246ccc0fad570648bf78963cc7f51
Signed-off-by: chenx <luxh0702@thundersoft.com>
Git-commit: 7af455f1e6f65871f9c722dff4c1c9de6989500b
Git-repo: https://source.codeaurora.org/external/thundersoft/ihvjointlab/sensor-driver/commit/?h=Novatek_nt36xxx
Signed-off-by: Fei Mao <feim1@codeaurora.org>
2020-12-02 21:37:55 -08:00
Vamsi krishna Gattupalli
7b145c3ad4 msm: ADSPRPC: Handle third party applications
Reject the session when third party applications
try to spawn signed PD and  channel configured as secure.

Change-Id: Iab18ad364985372f8007b6dda933ef4e5adf0213
Acked-by: Nishant Chaubey <chaubey@qti.qualcomm.com>
Signed-off-by: Vamsi krishna Gattupalli <vgattupa@codeaurora.org>
2020-12-03 11:06:29 +05:30
Jishnu Prakash
348ea390bc iio: adc: Add support to read ADC5 current channels
Add scaling function required to read PMIC5 current ADC channels
so that channel 0xA5 (ADC5_PARALLEL_ISENSE) can use that.

Change-Id: I55ede0c736c6f350df8ac92ea8661db4129da13c
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-12-03 10:49:08 +05:30