Commit graph

904,664 commits

Author SHA1 Message Date
qctecmdr
b1d4c68617 Merge "msm: adsprpc: Handle UAF in process shell memory" 2021-12-03 04:17:07 -08:00
qctecmdr
f41fdcc116 Merge "defconfig: sdxlemur: Enable CTR crypto in kernel" 2021-12-03 04:17:06 -08:00
qctecmdr
7f0235fa21 Merge "usb: pd: Do not respond to SVDM messages in PD 2.0" 2021-12-03 04:17:05 -08:00
qctecmdr
9ea9441514 Merge "usb: pd: Clear vdm_tx if SVDM message is sent on SOP'" 2021-12-03 04:17:05 -08:00
qctecmdr
f51f324009 Merge "usb: pd: Reset pd protocol during cable disconnect" 2021-12-03 04:17:04 -08:00
qctecmdr
fdc7322f76 Merge "Merge android11-5.4.147+ (e785a25) into msm-5.4" 2021-12-03 00:18:06 -08:00
Liangwei Dong
036089f311 defconfig: sdxlemur: Enable CTR crypto in kernel
CTR crypto is used in FILS (Fast Initial Link Setup - 802.11ai) AEAD
Encryption and Decryption. Hence add changes to enable CTR crypto in
kernel.

Change-Id: I223b8323362a2dcaf88a40a902f43279ba0fd86e
Signed-off-by: Liangwei Dong <quic_liangwei@quicinc.com>
2021-11-30 18:20:20 +08:00
prabha
eec9f0cfa9 msm: adsprpc: Handle UAF in process shell memory
Added flag to indicate memory used
in process initialization. And, this memory
would not removed in internal unmap to avoid
UAF or double free.

Change-Id: Ie470fe58ac334421d186feb41fa67bd24bb5efea
Signed-off-by: prabha <prabha@codeaurora.org>
2021-11-30 10:49:33 +05:30
qctecmdr
5e3cf80f1b Merge "msm: mhi_dev: Fail start command if fails to allocate reqs" 2021-11-28 21:19:01 -08:00
Konstantin Dorfman
991ca50f4b soc: qcom: spcom: maintain wakeup window when active packet exchange
This change activate PM wakeup source in following way:
1. Activate on receive a spcom request from SPU
2. Close window in the end of packet exchange or timeout:
   - end of tx of spcom response to SPU (server case)
   - end of delivery of spcom request to usersace (client case)
   - timeout for handling a packet exchange for 2 seconds

Change-Id: Ibbb6ba9870226299e5731fda6133c3dde780ca25
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
2021-11-27 22:52:46 -08:00
qctecmdr
8b0fa0a0cf Merge "msm: mhi_dev: Adding mhi and pcie state change logs to console" 2021-11-26 21:59:37 -08:00
qctecmdr
738d523efe Merge "msm: ipa: Add macsec mode ioctl" 2021-11-25 02:19:30 -08:00
Srinivasarao Pathipati
2603172e50 Merge android11-5.4.147+ (e785a25) into msm-5.4
* refs/heads/tmp-e785a25:
  Revert "ANDROID: GKI: Enable CHACHA20POLY1305 and XCBC"
  ANDROID: GKI: rework the ANDROID_KABI_USE() macro to not use __UNIQUE()
  UPSTREAM: security: selinux: allow per-file labeling for bpffs
  ANDROID: GKI: Enable CHACHA20POLY1305 and XCBC
  ANDROID: Incremental fs: Fix dentry get/put imbalance on vfs_mkdir() failure
  ANDROID: f2fs: fix potential deadlock by android ftrace

Change-Id: I261a5fa5682452c021ad0ba4bb4da085ee340ab3
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
2021-11-25 14:17:09 +05:30
Ilia Lin
f3c056ad48 msm: ipa: Add macsec mode ioctl
Introducing a new ioctl and corresponding data structures
to map or unmap one or more physical ethernet NICs
to macsec interface/s.

Change-Id: I15f5f88226ffa07818526f591468053992ad78e9
Signed-off-by: Ilia Lin <quic_ilial@quicinc.com>
2021-11-24 23:28:14 -08:00
qctecmdr
3762d49204 Merge "drivers: thermal: Add devfreq vdd floor cooling device" 2021-11-24 21:19:07 -08:00
urevanth
cb0218278f Dm-verity: Enable dm_device_wait parameter
Set dm_device_wait parameter through rootwait
to eliminate dm-verity timing issue for emmc.

Change-Id: I7a5065f2c020c98c3a308d2c17ad3610a7ae0c07
Signed-off-by: urevanth <quic_urevanth@quicinc.com>
2021-11-23 17:12:39 -08:00
qctecmdr
e6d9ead216 Merge "dma-mapping-fast: Fix iova address leak with non-zero scatterlist offset" 2021-11-23 02:28:59 -08:00
Patrick Daly
6508829687 dma-mapping-fast: Fix iova address leak with non-zero scatterlist offset
The underlying arm-smmu hardware only supports mapping addresses
aligned to PAGE_SIZE. Thus the actual mapped region may be larger than
the range returned by iommu_map_sg():

[sg_dma_address(), sg_dma_address() + sg->length)

When unmapping, ensure the same alignment requirements are applied
in order to avoid leaking iova addresses.

Change-Id: I1f5d5185d003cfe104b4a67efc1fe88f105f015f
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2021-11-22 22:18:05 -08:00
qctecmdr
ba64e46bda Merge "msm:pci: Usage of disable_pc in multiclient scenario" 2021-11-22 22:10:22 -08:00
Sai Chaitanya Kaveti
02ccb1d6dd msm: mhi_dev: Adding mhi and pcie state change logs to console
Adding mhi and pcie state change logs to console to make testing and
debugging easier.

Change-Id: I1fe176fc532a99de9de862ad556df831b6db6bf6
Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
2021-11-21 20:37:23 -08:00
qctecmdr
8876d1c1a1 Merge "usb: gadget: f_fs: Use stream_open() for endpoint files" 2021-11-20 03:23:56 -08:00
qctecmdr
4fd1eea424 Merge "Merge android11-5.4.147+ (dc8c919) into msm-5.4" 2021-11-19 22:36:17 -08:00
Veerabhadrarao Badiganti
0ec602298e msm: mhi_dev: Fail start command if fails to allocate reqs
Fail the start command if we fails to allocate buffer for event
requests.

Change-Id: I05e9acb093f53f1675a4f711182730ab420e0e5a
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
2021-11-19 22:31:45 +05:30
Veerabhadrarao Badiganti
eb29f2d763 msm: mhi_dev: Ensure event buffer size reflects the right size
We are setting event buffer size with the requested size and then
allocating the buffer for event requests (ereqs). But if the memory
allocation for ereq buffer fails, the event-buffer-size variable
is not getting set to zero.

Due to this, if a client calls open channel multiple times,
our logic proceeded without really allocating the buffer for ereqs.
And while processing completion events, we are observing null pointer
dereference issues.

Change-Id: I10bee8428d178ef5a7f0fe5fcd93fcce8dcbe27d
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
2021-11-19 22:31:21 +05:30
Pavankumar Kondeti
283ff9717c usb: gadget: f_fs: Use stream_open() for endpoint files
Function fs endpoint file operations are synchronized via an interruptible
mutex wait. However we see threads that do ep file operations concurrently
are getting blocked for the mutex lock in __fdget_pos(). This is an
uninterruptible wait and we see hung task warnings and kernel panic
if hung_task_panic systcl is enabled if host does not send/receive
the data for long time.

The reason for threads getting blocked in __fdget_pos() is due to
the file position protection introduced by the commit 9c225f2655
("vfs: atomic f_pos accesses as per POSIX"). Since function fs
endpoint files does not have the notion of the file position, switch
to the stream mode. This will bypass the file position mutex and
threads will be blocked in interruptible state for the function fs
mutex.

It should not affects user space as we are only changing the task state
changes the task state from UNINTERRUPTIBLE to INTERRUPTIBLE while waiting
for the USB transfers to be finished. However there is a slight change to
the O_NONBLOCK behavior. Earlier threads that are using O_NONBLOCK are also
getting blocked inside fdget_pos(). Now they reach to function fs and error
code is returned. The non blocking behavior is actually honoured now.

Reviewed-by: John Keeping <john@metanate.com>
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Link: https://lore.kernel.org/r/1636712682-1226-1-git-send-email-quic_pkondeti@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Git-commit: c76ef96fc00eb398c8fc836b0eb2f82bcc619dc7
Change-Id: Ifb99336a4da7587c7e71a6c45999a36948194d7a
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
2021-11-19 09:40:32 +05:30
Ramya SR
f9f4c25c5b msm:pci: Usage of disable_pc in multiclient scenario
In PCIe driver disable power collapse is
a bool variable, this causes problem in
multi client scenario as there is no vote
aggregation.

This Change is to support enable/disable power collapse
in multi client envirnoment.

Change-Id: Ib126958a18c4be831bf2b993e3a96eaae1a59435
Signed-off-by: Ramya SR <rsr@codeaurora.org>
2021-11-18 10:58:26 +05:30
Tushar Nimkar
115920effa defconfig: lahaina: Enable subsystem_sleep_stats driver
subsystem_sleep_stats provide IOCTL interface to
statistical information and can be useful where debugfs
not present.

This change enables this driver.

Change-Id: Id53650408d00781aece49aa29d87b389cd409d43
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-11-17 18:48:55 -08:00
Tushar Nimkar
437ab87f24 drivers: qcom: subsystem_sleep_stats: reg property as optional
Allow subsystem_sleep_stats to support only master stats though reg
not provided.

Change-Id: I85edaf4edf089efe7f22140418d6a56880e57dc2
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-11-18 08:10:51 +05:30
Tushar Nimkar
11a0c92017 drivers: qcom: subsystem_sleep_stats: Reuse apss stats if available
rpmh_master_stats driver maintained apss master stats. If it does
apss_master_stats.version_id get updated to non-zero value.

This change adds support to reuse already calculated data. Also
while doing this converts duration(ticks) to msec.

Change-Id: I5a1db5cc9543deba68e3c047223f6e93c635b733
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-11-17 03:48:14 -08:00
Tushar Nimkar
e224659967 drivers: qcom: rpmh_master_stats: export API to get apss_master_stats info
This change provides a API to get apss_master_stats info to other driver.
In this way stats information can be reuse instead of maintaining again.

Change-Id: Iea7d905cc71ac46b6b0d73617e94a89e15a1fec0
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-11-17 03:48:03 -08:00
Minghao Zhang
48a235fb41 soc: qcom: subsystem_sleep_stats: Add support soc sleep info
This change enhances subsystem_sleep_stats driver to give soc sleep
information including aosd, cxsd, ddr and ddr_stats.

Change-Id: I7be161158d5dc9b5d06a940cc69cf883d73fd803
Signed-off-by: Minghao Zhang <minghao@codeaurora.org>
2021-11-17 03:47:20 -08:00
Alistair Delva
e785a25f52 Revert "ANDROID: GKI: Enable CHACHA20POLY1305 and XCBC"
This reverts commit 051373292b.

Reason for revert: tests will be dropped from gsi

Change-Id: I435df6e02114a3e66591f2f6d2d2136d7893842a
Signed-off-by: Alistair Delva <adelva@google.com>
2021-11-15 22:20:27 +00:00
qctecmdr
3c9afc139b Merge "msm: ipa3: Define socksv5 function in ipa_fmwk" 2021-11-15 04:54:36 -08:00
qctecmdr
8824baad32 Merge "config: enable default cpufreq governors for sdxnightjar target" 2021-11-15 04:54:36 -08:00
qctecmdr
7bdf76449c Merge "msm: kgsl: check for number of commands in kgsl_ioctl_gpu_aux_command" 2021-11-15 04:54:35 -08:00
Gopala Krishna Nuthaki
d4f65badf3 drivers: thermal: Update a variable type in QMI encode logic
Change a variable type in QMI encode logic to avoid
buffer overflow scenario.

Change-Id: I11b10cce0e9ab5b02738b2ba13e637df979e9310
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
2021-11-14 21:50:41 -08:00
Pranav Patel
ade36fe563 msm: kgsl: check for number of commands in kgsl_ioctl_gpu_aux_command
kgsl_ioctl_gpu_aux_command creates a separate drawobj for each command
in numcmds sent from userspace. All drawbojs created will have same
timestamp. We can not queue more than one drawobj with same timestamp.
Each new drawobj must have timestamp greater than previously queued
drawobjs. This results in failure of kgsl_ioctl_gpu_aux_command.
Add proper check and return early when numcmds is invalid.

Change-Id: I06413c16b0a21abcffb121b2e332752eb71e6be0
Signed-off-by: Pranav Patel <pranavp@codeaurora.org>
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
2021-11-11 21:44:42 -08:00
Priyansh Jain
716281bdde drivers: thermal: Add devfreq vdd floor cooling device
This implements a mitigation device to place a minimum frequency floor
on a particular devfreq device. This mitigation device will be used by
low temperature reliability rules to mitigate a devfreq device at
minimum operating level.

Change-Id: Iaae6ea4ffa12735145fc2b573ddfa98183b379fe
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Signed-off-by: Priyansh Jain <priyjain@codeaurora.org>
2021-11-11 19:35:48 -08:00
qctecmdr
756bbb2594 Merge "usb: host: Fix unclocked access in xhci_suspend in case of pm suspend" 2021-11-11 08:32:57 -08:00
Pooja Kumari
0cabdeed70 msm: ipa3: Define socksv5 function in ipa_fmwk
Define socksv5 function in ipa_fmwk.

Change-Id: I8f1126632f0e2c61a8b2abf55ce29737527eeecb
Signed-off-by: Pooja Kumari <quic_kumarip@quicinc.com>
2021-11-11 01:45:51 -08:00
qctecmdr
1b9ba19839 Merge "usb: dwc3: Resume the controller before setting device active in sm_work" 2021-11-11 01:45:01 -08:00
qctecmdr
520c82a4cf Merge "msm: kgsl: Update the IFPC power up reglist" 2021-11-11 01:45:01 -08:00
qctecmdr
27ce3c2545 Merge "msm: ep_pcie: Send pme from panic/reboot handler while in D3hot" 2021-11-11 01:45:00 -08:00
Rohith Kollalsi
8c54875c34 usb: host: Fix unclocked access in xhci_suspend in case of pm suspend
When runtime suspend occurs xhci_suspend is called and now all the
clocks are turned off. Now if pm_suspend happens xhci_suspend is again
called which leads to unclocked access of registers in function
xhci_disable_hub_port_wake. Fix this by considering second
call of xhci_suspend due to pm_suspend as no-op.

Change-Id: Ic053636ac1d6c54150b40e5477b5eb373fcdbeb3
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2021-11-11 14:47:06 +05:30
Santosh Mardi
e84b1ba30e config: enable default cpufreq governors for sdxnightjar target
Enable the default available cpufreq governor used to scale
cpu frequency based on the load for sdxnightjar perf config.

Change-Id: I93aeb27350562fe1c488c22d5ac24b80b4a9fdf4
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2021-11-10 05:36:16 -08:00
Priyansh Jain
79b770a9a4 drivers: thermal: qmi_cooling: update modem cdev names for waipio
update modem cdev names for waipio as per
latest recommendation.

Change-Id: I32ef91f258791b43d6d31c325f7e42bbae111e0e
Signed-off-by: Priyansh Jain <priyjain@codeaurora.org>
2021-11-10 05:10:23 -08:00
Rohith Kollalsi
66a28a886a usb: dwc3: Resume the controller before setting device active in sm_work
Driver core invokes runtime PM idle after the device is probed. When the
runtime idle callback returns 0, platform bus proceed to runtime suspend.
If this races with state machine work which marks the runtime state as
active and enables runtime PM, there is a possibility that the runtime
PM thinks device is suspended. Because the runtime PM suspend patch
returns simply because in_lpm is true. Now, state machine work calls
dwc3_msm_resume() which sets WAIT_FOR_LPM flag hoping that it would be
cleared while runtime suspend happens via pm_runtime_put_sync(). Though
the device is in resume state, runtime PM core thinks it is suspended
due to the race mentioned above. The fact that WAIT_FOR_LPM is set,
state machine for ever stuck in DRD_STATE_IDLE waiting for this flag to
be cleared.

Fix this by calling dwc3_msm_resume before setting device as active so
that the corresponding pm_runtime_put_sync operation happens correctly.

Change-Id: I3ee58ca01d2afdf169b1f52816d7d4d448cbf8e6
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2021-11-10 04:33:42 -08:00
Greg Kroah-Hartman
bfb2ce3eb1 ANDROID: GKI: rework the ANDROID_KABI_USE() macro to not use __UNIQUE()
The __UNIQUE_ID() macro causes problems as it turns out to not be
deterministic across different compiler runs as it relies on the
__COUNTER__ macro which could have been used on other .h files previous
to this .h file being included.

This shows up specifically when building with "LTO=thin" vs. "LTO=full"
as different build paths seem to be triggered.

As the structure name isn't really needed at all here, we were just
including it for older compilers that could not handle anonymous
structures in a union, just drop the whole thing which resolves the abi
naming issue.

Bug: 210255585
Reported-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6b9449fa9d26ffc5d66b2f0f3b41e2d5f3003f68
2021-11-09 18:38:36 +01:00
qctecmdr
70d4bf5f0c Merge "input: qcom-hv-haptics: use OL_TLRA if getting CL_TLRA failed" 2021-11-09 04:04:06 -08:00
qctecmdr
938b49e74b Merge "i2c: i2c-msm-geni: WAR to halt cancel if IOS not in good state" 2021-11-09 04:04:06 -08:00