Commit Graph
821802 Commits
Author SHA1 Message Date
Wei Tan 5b284b6c49 misc: Add Nordic driver sleep mode support
Add HMD nordic driver suspend and sleep
mode when standlone or bonded with
remote controllers.

Change-Id: I0dda7e5d474341f8636b78a07ff70f5a164dd082
Signed-off-by: Wei Tan <quic_weitan@quicinc.com>
2023-01-18 18:42:06 -08:00
qctecmdr 0589df7994 Merge "clk: qcom: Enable ftrace for clock frequency measurement" 2023-01-16 03:30:06 -08:00
Kalpak Kawadkar 96287e1d14 clk: qcom: Enable ftrace for clock frequency measurement
Enable ftrace support for clocks so that clients can measure
frequency of the clock through ftraces.

Change-Id: Ie923ac538b670598bb1be009e892a68c4f1e2a38
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
2023-01-11 16:47:09 +05:30
Sarannya S 4a0114e93a net: qrtr: fifo: Add bounds check on tx path
Add bounds check on values read from shared memory in the tx path. In
cases where the VM is misbehaving, the qrtr transport should exit and
print a warning when bogus values may cause out of bounds to be read.

Change-Id: I7ebef28ed8eba4c4da0b32d5114365bbe6bea390
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
2023-01-10 20:04:24 -08:00
Linux Build Service Account fa4a3cdddd Merge fce2d2f29d on remote branch
Change-Id: I50382ca028848e574add1c6d3788b56e047184d4
2023-01-05 21:53:04 -08:00
qctecmdr ca4e701ecd Merge "net: qrtr: fifo: Add bounds check on tx path" 2023-01-04 03:41:25 -08:00
qctecmdr 9bd0c6bcd4 Merge "net: qrtr: fifo: Add bounds check in rx path" 2023-01-03 22:58:13 -08:00
qctecmdr bba14e940d Merge "sched: fixes sched_boost_disable" 2023-01-03 01:59:36 -08:00
qctecmdr 6f02ecff86 Merge "msm: synx: Remove synx handle status details from logging" 2023-01-02 21:45:24 -08:00
Ankit Sharma f4b0ef33a4 sched: fixes sched_boost_disable
Everytime a boost level is disabled, if its refcount is zero, its exit
routine and the entry routine of the next boost level are called. This
causes an issue when the previous boost level and the next boost level
are same as it increments the boost count of the next boost level.This
is fixed by not calling the entry and exit routines, when the previous
and the next boost levels are same.

Change-Id: I482d0ee70c082bc647768958ffa5fcd6f5ee8e5b
Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com>
2023-01-03 10:33:09 +05:30
Sarannya S a714b4b326 net: qrtr: fifo: Add bounds check on tx path
Add bounds check on values read from shared memory in the tx path. In
cases where the VM is misbehaving, the qrtr transport should exit and
print a warning when bogus values may cause out of bounds to be read.

Change-Id: I7ebef28ed8eba4c4da0b32d5114365bbe6bea390
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
2023-01-02 04:30:39 -08:00
qctecmdr fce2d2f29d Merge "soc: qcom: socinfo: Code clean-up" 2022-12-29 04:03:22 -08:00
qctecmdr f7f4d0fdcb Merge "icnss2: Add data length validation in cnss_wlfw_qdss_data_send_sync()" 2022-12-28 23:03:09 -08:00
Ram Nagesh d392b913b1 msm: synx: Remove synx handle status details from logging
This change removes synx status call from each row to avoid
rare race condition resulting in UAF.

Moreover, remove unnecessary mutex lock.

Change-Id: I0e7bfdb3aa1a9b4408d14d0181de651a699919af
Signed-off-by: Ram Nagesh <quic_ramnages@quicinc.com>
2022-12-28 15:33:11 +05:30
qctecmdr 3429628c5f Merge "cnss2: Validate maximum number of memory segments" 2022-12-26 20:59:28 -08:00
Sarannya S 27eb9f4b4d net: qrtr: fifo: Add bounds check in rx path
Validate the values read from shared memory in the receive path.
In the case where a VM is misbehaving, the qrtr transport should
return immediately and print a warning.

Change-Id: I088f6cc77433dfcd099e5c117b9ca6408c40f09e
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
2022-12-23 15:40:54 +05:30
Alan Chen ab00366dac icnss2: Add data length validation in cnss_wlfw_qdss_data_send_sync()
Add a data length validation check in fw response message in
qdss_data_send_sync().

Change-Id: I750f46549bc914698baaf4e24f1710536ca8e356
CRs-Fixed: 3366343
Signed-off-by: Alan Chen <quic_alache@quicinc.com>
2022-12-21 21:05:37 -08:00
qctecmdr ed7a20b656 Merge "cnss2: Unregister host driver during PCI remove" 2022-12-21 01:34:13 -08:00
Naman Padhiar 0d2eaa86d9 cnss2: Validate maximum number of memory segments
For WIN use case maximum number of memory segments requested
by FW is increased to 52 in QMI layer. Since CNSS2 driver uses
same QMI header files and message structures the same maximum
number of segment is applicable for CNSS2. It means for memory
allocation, FW can request 52 memory segments to CNSS2 via QMI
indication but local CNSS2 variable which get segment info from
indication supports maximum 32 segments.
To fix it, change CNSS2 array variable size to same as number of
maximum segment supported in QMI layer.

Change-Id: I661b55b53cb31327da12f064d0a516884159eb5b
Signed-off-by: Naman Padhiar <quic_npadhiar@quicinc.com>
2022-12-20 17:49:28 +05:30
Ram Nagesh 0110b73bfb msm: synx: protect clean up with mutex lock
While cleaning up synx table entry, hold the lock for that particular
entry. This will make sure that any other read/write for same entry waits
till cleaning is done.

Also, Change log level of empty table entries from warning to debug.

Change-Id: Ib092f41a12fb943ed184c031dca481a75d3446e3
Signed-off-by: Ram Nagesh <quic_ramnages@quicinc.com>
2022-12-15 14:58:16 +05:30
Naman Padhiar b9c738c963 cnss2: Unregister host driver during PCI remove
CNSS2 registers as both platform and PCI driver. PCI
device can be removed via sysfs exposed by kernel during
PCI device creation. When PCI device gets removed, CNSS
PCI remove ops gets called. In cnss_pci_remove, unregister
host driver and shutdown WLAN chip to cleanly remove PCI
device.

Change-Id: Ia60e8b69bda2b3bdd5990cb83f47c082d6667283
Signed-off-by: Naman Padhiar <quic_npadhiar@quicinc.com>
2022-12-15 12:51:06 +05:30
Naini Singh efd4404fd9 soc: qcom: socinfo: Code clean-up
Performing code clean up.

Change-Id: I13aef8793bcbad485b0b56cb437b65cfb97a6086
Signed-off-by: Naini Singh <quic_nainsing@quicinc.com>
2022-12-15 10:13:46 +05:30
Linux Build Service Account ad6455333f Merge 13879e29de on remote branch
Change-Id: Ida5be0ad1aed4b49259bb3f41320da69090e0474
2022-12-08 03:36:09 -08:00
qctecmdr e0b641d7b3 Merge "net: usb: Get rid of inline before func definition" 2022-12-07 01:25:09 -08:00
qctecmdr 08e7431559 Merge "msm: synx: Handling the base in idr_alloc" 2022-12-06 21:16:12 -08:00
Chang Chen 9733975a7e net: usb: Get rid of inline before func definition
This change is to solve the compilation issue caused by inline.

Change-Id: Iab320101e9b30dc6fa9ceb80b321f4be00607bbd
Signed-off-by: Chang Chen <quic_chach@quicinc.com>
2022-12-07 11:31:31 +08:00
qctecmdr 10dd54ff40 Merge "UPSTREAM: binderfs: use __u32 for device numbers" 2022-12-04 19:28:07 -08:00
qctecmdr 66e6c9a4a7 Merge "memshare: Free QMI handle only if its valid" 2022-12-01 13:30:37 -08:00
qctecmdr 3086e620ed Merge "msm: adsprpc: fix UAF process init_mem" 2022-12-01 09:21:19 -08:00
Manoj Prabhu B e6fa19adf1 memshare: Free QMI handle only if its valid
Avoid possible use-after-free access for a QMI handle
during driver deinit by ensuring the free happens only for
valid QMI handle and is marked NULL post free.

Change-Id: I4314dff560de2fc3aea30d636f935d7a02067a57
Signed-off-by: Manoj Prabhu B <quic_bmanoj@quicinc.com>
2022-12-01 19:12:23 +05:30
Ram Nagesh 3ab5bbee26 msm: synx: Handling the base in idr_alloc
In idr_alloc the base value is becoming less than zero after some
iteration.so we are make it positive when the value is less than zero..

Change-Id: Iafa53f9f09a9ac029e57b8deee0e0b30b7851acd
Signed-off-by: Ram Nagesh <quic_ramnages@quicinc.com>
2022-12-01 03:24:56 -08:00
Vamsi Krishna Gattupalli 2b4159d5f0 msm: adsprpc: fix UAF process init_mem
Process init memory allowed to initialize only once
to fix possible improper acecss from remote processor.

Change-Id: Ic1a13738146fcf0d170abd76b50bdc6a75871755
Acked-by: Abhinav Parihar <parihar@qti.qualcomm.com>
Signed-off-by: Vamsi Krishna Gattupalli <quic_vgattupa@quicinc.com>
2022-12-01 15:42:04 +05:30
Christian Brauner aa212532cf UPSTREAM: binderfs: use __u32 for device numbers
We allow more then 255 binderfs binder devices to be created since there
are workloads that require more than that. If we use __u8 we'll overflow
after 255. So let's use a __u32.
Note that there's no released kernel with binderfs out there so this is
not a regression.

Signed-off-by: Christian Brauner <christian@brauner.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 7d0174065f4903fb0ce0bab3d5047284faa7226d)
Bug: 228263403
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: If143c0d6511946fac6349c5db7c013535950de4a
Git-commit: b155e0447d
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
2022-11-30 20:56:33 -08:00
Vijayavardhan Vennapusa 6401a85525 phy: msm: qusb: Fix BC1.2 compliance failures
For Battery charging 1.2 compliance, device needs to apply VDP_SRC
for DCP charger after charger detection. Hence add required change
to apply VDP_SRC for DCP case. Also fix command time out issue
with CDP case as turning off regulators results in command timeout
while enabling Ep0 for enumeration.

Change-Id: I311a8c76d28bdb351c6d0c72f4430c95d79f0595
Signed-off-by: Vijayavardhan Vennapusa <quic_vvreddy@quicinc.com>
2022-12-01 09:15:13 +05:30
Vijayavardhan Vennapusa b6abc79373 dwc3: msm: Add module parameter to disable dp pulse
Add module parameter to disable sending pulse on D+ for CDP
charger, which can be enabled while running BC1.2 compliance.
Else could see CDP test failure, as compliance tester see pullup
on D+ line and starts enumeration.

Change-Id: I25dbad69ca4e6dcdf7555617ccd6eb9b34b08d40
Signed-off-by: Vijayavardhan Vennapusa <quic_vvreddy@quicinc.com>
2022-11-29 07:22:03 -08:00
Yao Zhao 0f715024db net: usb: Upgrade ax88179a driver
This change is to update usb to ethernet AX88179A driver
cause old sensor AX88179 has stopped production
need to update AX88179 hardware and software meanwhile.

Code from ASIX web site:
https://www.asix.com.tw/en/product/USBEthernet/Super-Speed_USB_Ethernet/AX88179A.

Change-Id: I0cd53a569ddac58d1d5fb7556c95b3c18992a56d
[quic_yaozhao: addressed checkpatch issues]
Signed-off-by: Yao Zhao <quic_yaozhao@quicinc.com>
Signed-off-by: Vijay Kamble <quic_vkamble@quicinc.com>
2022-11-25 00:45:45 -08:00
qctecmdr 13879e29de Merge "msm: cvp: Resuming DSP if power collapse fails" 2022-11-22 00:11:24 -08:00
Haseeb Khan 84dbfbca26 msm: cvp: Resuming DSP if power collapse fails
If PC fails due to any reason, make sure to resume the DSP back
as DSP might still have the pending transactions.

Change-Id: I82bd288869327b9bf84e9ab9bdd31b8d2983d817
Signed-off-by: Haseeb Khan <quic_hkhan@quicinc.com>
2022-11-18 13:20:58 +05:30
Sayantan Majumder 06e573b707 include: v4l2-controls: Inclusion of layered intra-refresh
Adding of only base layered intra-refresh v4l2 API.

Change-Id: I552421ce2c35cc82001737097e687e9fb96186d0
Signed-off-by: Sayantan Majumder <quic_smajumde@quicinc.com>
2022-11-17 20:55:50 +05:30
qctecmdr edd205328e Merge "serial: msm_geni_serial: Extend packing configurations" 2022-11-16 23:05:36 -08:00
Visweswara Tanuku fe811ab219 serial: msm_geni_serial: Extend packing configurations
Currently packing configuration is done for 8bits per
transfer word as default as part of baud rate change.

Extend packing configuration when there is a request for
5bits/6bits/7bits per transfer word from set_termios.

Change-Id: I01341c94eef3b3697db3fce7846042cbe9e9f2af
Signed-off-by: Visweswara Tanuku <quic_vtanuku@quicinc.com>
2022-11-15 23:43:12 -08:00
Balaji Pothunoori 9fba472326 wifi: cfg80211: fix BSS refcounting bugs
There are multiple refcounting bugs related to multi-BSSID:
 - In bss_ref_get(), if the BSS has a hidden_beacon_bss, then
   the bss pointer is overwritten before checking for the
   transmitted BSS, which is clearly wrong. Fix this by using
   the bss_from_pub() macro.
 - In cfg80211_bss_update() we copy the transmitted_bss pointer
   from tmp into new, but then if we release new, we'll unref
   it erroneously. We already set the pointer and ref it, but
   need to NULL it since it was copied from the tmp data.
 - In cfg80211_inform_single_bss_data(), if adding to the non-
   transmitted list fails, we unlink the BSS and yet still we
   return it, but this results in returning an entry without
   a reference. We shouldn't return it anyway if it was broken
   enough to not get added there.

This fixes CVE-2022-42720.

Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
Tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
Fixes: a3584f56de1c ("cfg80211: Properly track transmitting and non-transmitting BSS")
Link: https://lore.kernel.org/lkml/20221013175147.168042993@linuxfoundation.org/
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Change-Id: If6ed330dc65fdf387ee8584b5a69840242edf5cc
Signed-off-by: Balaji Pothunoori <quic_bpothuno@quicinc.com>
2022-11-11 16:23:30 +05:30
Johannes Berg 85a4975817 wifi: cfg80211: fix u8 overflow in cfg80211_update_notlisted_nontrans()
In the copy code of the elements, we do the following calculation
to reach the end of the MBSSID element:

	/* copy the IEs after MBSSID */
	cpy_len = mbssid[1] + 2;

This looks fine, however, cpy_len is a u8, the same as mbssid[1],
so the addition of two can overflow. In this case the subsequent
memcpy() will overflow the allocated buffer, since it copies 256
bytes too much due to the way the allocation and memcpy() sizes
are calculated.

Fix this by using size_t for the cpy_len variable.

This fixes CVE-2022-41674.

Reported-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
Tested-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Link: https://lore.kernel.org/lkml/20221013175147.067414219@linuxfoundation.org/
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: aebe9f4639b13a1f4e9a6b42cdd2e38c617b442d
Git-repo: https://android.googlesource.com/kernel/common

Change-Id: If6ed330dc65fdf387ee8584b5a69840242edf5cf
Signed-off-by: Vulupala Shashank Reddy<quic_vulupa@quicinc.com>
2022-11-10 20:23:03 -08:00
Srikanth Marepalli 587da9fcbc wifi: cfg80211: avoid nontransmitted BSS list corruption
If a non-transmitted BSS shares enough information (both
SSID and BSSID!) with another non-transmitted BSS of a
different AP, then we can find and update it, and then
try to add it to the non-transmitted BSS list. We do a
search for it on the transmitted BSS, but if it's not
there (but belongs to another transmitted BSS), the list
gets corrupted.

Since this is an erroneous situation, simply fail the
list insertion in this case and free the non-transmitted
BSS.

This fixes CVE-2022-42721.

Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
Tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Link: https://lore.kernel.org/all/20221013175145.382242160@linuxfoundation.org/
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: bcca852027e5878aec911a347407ecc88d6fff7f
Git-repo: https://android.googlesource.com/kernel/common

Change-Id: Icb2106b5ac5ff5e3ecb50bd09440bce5560fbb05
Signed-off-by: Srikanth Marepalli <quic_srimarep@quicinc.com>
2022-11-10 21:42:21 +05:30
Linux Build Service Account 27f90c04ad Merge 67bf63c259 on remote branch
Change-Id: I7898ed93735a57d843ae828329004291173c7a2b
2022-11-06 22:38:34 -08:00
qctecmdr 2dc5013d4a Merge "qcedev: check num_fds during unmap" 2022-11-04 09:21:26 -07:00
Gaurav Kashyap 860b36b885 qcedev: check num_fds during unmap
check the num_fds passed into unmap buf ioctl,
or else it can lead to an out of bounds access.

Test: Build compilation. qcedev tests.

Change-Id: I206ba01dfa989346ade769a0f68b372b21f84043
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Signed-off-by: Pranav Lavhate <quic_plavhate@quicinc.com>
2022-11-04 02:36:16 -07:00
qctecmdr f89727309e Merge "msm: ipa: add skb recycle if dma fails during replenish" 2022-11-04 01:11:47 -07:00
Jagadeesh Ponduru 4a85a0fcb2 msm: ipa: remove initing head again if dma mapping fails
Remove Initializing rx_pkt link if dma mapping fails.

Change-Id: I49d08555c875fc9039805ef8775be3b676f51d08
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
2022-11-03 11:34:54 -07:00
Jagadeesh Ponduru 1186a4d5d8 msm: ipa: add skb recycle if dma fails during replenish
Add skb recycle when dma mapping fails during rx cache
replenishing.

Change-Id: I4ea2b1581f4d9a404248ce39bb916e58e368b7e4
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
2022-11-03 11:34:31 -07:00