Commit graph

974,243 commits

Author SHA1 Message Date
Michael Bestas
bcbb7b0ac2
Merge tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0 into android13-5.4-lahaina
"LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0:
  Release 2.0.8.34R
  qcacld-3.0: Do not aggregate checksum failure packets in FISA
  Release 2.0.8.34Q
  qcacld-3.0: Handle assoc request frm in ROAM sync crypto update
  Release 2.0.8.34P
  qcacld-3.0: Send the user configured MFP state in RSO command
  qcacld-3.0: Update key management after bss create response
  qcacld-3.0: Add support for max 5 number of AKMs in connect req
  qcacld-3.0: Add support for allowed_authmode
  qcacld-3.0: Add support for security scoring
  Release 2.0.8.34O
  qcacld-3.0: Return vendor abort status to userspace

Change-Id: I5e0e2cfca7fad7129262440fd46a2aabba659598
2024-06-22 17:48:46 +03:00
Michael Bestas
cb395f2c6b
Merge tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn into android13-5.4-lahaina
"LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn:
  qcacmn: Add length checks for noninheritance_ie
  qcacmn: Fix OOB reads in util_gen_new_ie
  qcacmn: Fix OOB reads in util_gen_new_ie
  qcacmn: Add length checks for noninheritance_ie
  qcacmn: Send the user configured MFP state in RSO command
  qcacmn: Add support for handling the NL crypto params
  qcacmn: Update key management after bss create response
  qcacmn: Update BSS score calculation based on Security Profile
  qcacmn: Add check to avoid NULL pointer deference in parse MBSSID
  qcacmn: Fix use-after-free issue in util_scan_parse_mbssid
  qcacmn: Fix memleak in MBSSIE handler
  qcacmn: Fix potential OOB read in util_scan_is_split_prof_found()
  qcacmn: Fix potential OOB read in util_scan_parse_mbssid()
  qcacmn: Fix potential OOB read in util_scan_is_split_prof_found()
  qcacmn: Fix potential OOB read in util_scan_parse_mbssid()

Change-Id: Iad0fb4d1bbcc122af81f9fed96436d246798a6dc
2024-06-22 17:48:12 +03:00
Michael Bestas
8ddefe282c
Merge tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api into android13-5.4-lahaina
"LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api:
  fw-api: CL 26661427 - update fw common interface files
  fw-api: CL 26642966 - update fw common interface files
  fw-api: CL 26614150 - update fw common interface files
  fw-api: CL 26587627 - update fw common interface files
  fw-api: CL 26534623 - update fw common interface files
  fw-api: CL 26517090 - update fw common interface files
  fw-api: CL 26515400 - update fw common interface files
  fw-api: CL 26515067 - update fw common interface files
  fw-api: CL 26511260 - update fw common interface files
  fw-api: CL 26496317 - update fw common interface files
  fw-api: CL 26403375 - update fw common interface files
  fw-api: CL 26392958 - update fw common interface files
  fw-api: CL 26384461 - update fw common interface files

Change-Id: Ic4c7051fcac756955520b7299883facca6dfabf0
2024-06-22 17:47:40 +03:00
Michael Bestas
bb1bc18ab1
Merge tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
"LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-14100-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4:
  msm: adsprpc: use-after-free (UAF) in global maps
  sdxnightJar.config: kernel changes for TRIGGER target
  msm: mhi_dev: Add UCI support if client req > TRE length
  usb: gadget: f_cdev: Call function wakeup if func_wakeup_pending is set
  usb: gadget: f_cdev: Bail out from cer_resume if func_suspended
  msm: kgsl: Do not release dma and anon buffers if unmap fails
  ALSA: compress: Remove redefinition
  BACKPORT: media: venus: hfi: fix the check in session buffer requirement
  msm: kgsl: Do not free sharedmem if it cannot be unmapped
  ALSA: compress: allow pause and resume during draining
  securemsm-kernel: Fix multiple listener registration on same fd
  Configured process_madvise with upstream syscall number
  msm: kgsl: Limit the syncpoint count for AUX commands
  msm: kgsl: Prevent wrap around during user address mapping
  iommu: Fix missing return check of arm_lpae_init_pte

Change-Id: I59256059b3d15fed896a7ce58d09f0950829dabb
2024-06-22 17:46:18 +03:00
Michael Bestas
de85e91821
Merge tag 'LA.UM.9.16.r1-14900-MANNAR.QSSI14.0' into android13-5.4-lahaina
* tag 'LA.UM.9.16.r1-14900-MANNAR.QSSI14.0':
  ARM: dts: msm: Add 4k HDMI display support for yupik

Change-Id: I095be95b960ba03670b004f48e5a780c54b4b35a
2024-06-19 11:36:01 +03:00
Michael Bestas
9e25363edc
Merge tag 'LA.UM.9.16.r1-14900-MANNAR.QSSI14.0' into android13-5.4-lahaina
* tag 'LA.UM.9.16.r1-14900-MANNAR.QSSI14.0':
  ARM: dts: msm: Add camera device tree for yupik

Change-Id: Ic3021cb2d1b2dde17b48ad6e7b48e76ef34ebdef
2024-06-19 11:34:24 +03:00
Michael Bestas
6c1db1cab2
Merge tag 'LA.UM.9.16.r1-14900-MANNAR.QSSI14.0' into android13-5.4-lahaina
* tag 'LA.UM.9.16.r1-14900-MANNAR.QSSI14.0':
  ARM: dts: msm: Set refclock base address for sdxnightjar
  ARM: dts: qcom: Add qcom minidump id for sdxlemur
  ARM: dts: msm: Add non-wake-svc node
  ARM: dts: msm: Add APQ-XR support for Blair
  ARM: dts: qcom: Set number of descriptors to 1024
  ARM: dts: qcom: Add property for multiple rx queues
  ARM: dts: qcom: Add pcie node for Realtek r8168 driver
  ARM: dts: msm: add backlight properties for eDP

Change-Id: I1321fe0f79f87f670fe20de4d1635103964638af
2024-06-19 11:31:49 +03:00
Alexander Winkowski
1d9f6dc0d0
nvmem: core: Add missing sysfs_attr_init
Change-Id: Id8acb569a52aa98699e27924fdb67fe625dc5db6
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-06-12 15:24:27 +00:00
Samantha Tran
f7386b4ad7
disp: msm: retry dma buf attach on msm_gem_delayed_import error
In the event when msm_gem_delayed_import returns an error, reset
the obj_dirty property to true to allow the buffer to detach and
attach again.

Change-Id: Ib8da8f237c5a4ab696675cbcf66f1a3dfae02639
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-06-12 15:24:26 +00:00
Sharat Masetty
d939e53a6b
msm: kgsl: Call dma_buf_unmap_attachment() early
When we import an ION buffer, we call the dma_buf_map_attachment().
The intent is to not map it to the dma device(which in this case is the
KGSl device), but to only get the sg_table. Once we have the sg_table
we later map the physical pages to the GPU SMMU manually and not by using
the dma device ops.

The ION driver as part of the partial cache maintenance requires that
all the sg_tables of the attached devices to the buffer have a single
segment. This creates a problem for KGSL since in this case the kgsl is
a dummy device, so the buffer for KGSL always has multiple segments.

This patch calls the dma_buf_unmap_attachment() as soon we get a hold of
the sg_table as doing so a) we don't need the buffer to be mapped to a
dummy device, b) removes the buffer from the cache maintenance constraints
of the ION driver.

Change-Id: I0675e62c4a27b4e368d53ea6310c9244b687baa6
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-06-12 15:24:26 +00:00
LuK1337
2ade12f6b1
dsp: q6lsm: Handle payload_size = sizeof(uint32_t) gracefully
q6lsm_mmapcallback: payload has invalid size[4]

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/7269
Change-Id: Icf54b28b9c47585f9e56bba9e0dc417079856885
2024-06-12 10:02:23 +02:00
Santosh Sakore
e9218e2bb1 msm: adsprpc: use-after-free (UAF) in global maps
Currently, remote heap maps get added to the global list before the
fastrpc_internal_mmap function completes the mapping. Meanwhile, the
fastrpc_internal_munmap function accesses the map, starts unmapping, and
frees the map before the fastrpc_internal_mmap function completes,
resulting in a use-after-free (UAF) issue. Add the map to the list after
the fastrpc_internal_mmap function completes the mapping.

Change-Id: Ia524f142edba57a1f389dd0e5c83a1967c7f5a59
Acked-by: Abhishek Singh <abhishes@qti.qualcomm.com>
Signed-off-by: Santosh Sakore <quic_ssakore@quicinc.com>
(cherry picked from commit 6f9f631c90)
2024-06-10 22:16:46 -07:00
Linux Build Service Account
41c1fcc28f Merge 9a7916c74a on remote branch
Change-Id: Iff50d97686b2d6c5184bcaaa74a5abc64b8f0d18
2024-06-09 23:41:35 -07:00
Linux Build Service Account
a0c7bdfd54 Merge f140d0102a on remote branch
Change-Id: I3ff612c10c66274596ae3431ec270cb94a8ff5b1
2024-06-09 23:37:52 -07:00
Linux Build Service Account
f98edd1120 Merge 63fb6de36e on remote branch
Change-Id: I060cbefab4d3ea165951f67b248ebe9bf675c74d
2024-06-09 23:37:24 -07:00
Michael Bestas
0edbb3c4df
Merge tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel into android13-5.4-lahaina
"LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel:
  msm: camera: memmgr: Add refcount to track umd in use buffers
  msm: camera: memmgr: Add refcount to track umd in use buffers
  msm: camera: sensor: Handling race condition in util api

Change-Id: I4708288ccf2096b70148fbeb2bb543991ac8df4d
2024-05-29 03:04:52 +03:00
Michael Bestas
bb0f246e35
Merge tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel into android13-5.4-lahaina
"LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel:
  Asoc: dsp: Fix to check the list is empty or not
  dsp: q6lsm: Check size of payload before access
  Fix for OOB access issue
  dsp: q6asm increase the locking range
  ASoC: msm-pcm-q6-v2: Add size check
  ASoC : Add proper copyright marking.
  dsp: afe: Add check for num_spks
  soc: pinctrl-lpi: remove pm ops
  asoc: msm-compress: Fix compress_pause failure on gki
  Audio legacy: Integer overflow in msm_lsm_ioctl_compat during audio playback usecase. size = sizeof(p_info_32) + p_info_32.param_size; This overflow issue may result heap overflow during copying the data: memcpy(param_info_rsp, &p_info_32, sizeof(p_info_32));
  ASoC : Add macro to differentiate auto code
  ASoC: msm: get CoPP index based on FE id
  asoc: codecs: add array bound check
  soc: Address SWR rate mismatch interrupt
  asoc : add configuration about SLIMBUS_7_TX
  asoc: lahaina: add support for aud_ref_clk_sel mux
  dsp: afe: add support for aud_ref_clk_sel mux
  ASoC: dsp: Release lock before return
  ASoC: wcd937x: Add flag to decide RX_MUTE for HPHL and EAR
  ASoC: bolero: Add check for CMPDR switch
  ASoC : add support of HDMI controller for rb3gen2 platform
  asoc: lahaina: fractional sample rate support for TDM
  asoc: support for fractional sample rate over tdm
  Revert "asoc: msm-compress : Fix for CTS-on-gsi with gki"
  audio-kernel:swr: Add dynamic SWRM clk support
  asoc: codec: make mclk freq configurable in Bolero
  asoc: lahaina: Add ext clk source support
  asoc: ext-clk: Add support for configuring ext clk
  dsp: afe: Enhance and expose API for configuring ext clk
  dsp: q6voice: Handle mutex lock-unlock
  asoc: msm-compress : Fix for CTS-on-gsi with gki

Change-Id: I21b8e5f5ef608bf298230419123e4ee37c9b0797
2024-05-29 03:04:05 +03:00
Michael Bestas
d9c4f23b02
Merge tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0 into android13-5.4-lahaina
"LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0:
  Release 2.0.8.34N
  qcacld-3.0: Reset roaming_in_progress upon VDEV down

Change-Id: I5a55a8b81c7c182b1798e57acc7e8b26137e5aa0
2024-05-29 03:03:32 +03:00
Michael Bestas
adb424d0a1
Merge tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn into android13-5.4-lahaina
"LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn:
  qcacmn: Fix OOB reads in util_gen_new_ie
  qcacmn: Add length checks for noninheritance_ie
  qcacmn: Add check to avoid NULL pointer deference in parse MBSSID
  qcacmn: Fix use-after-free issue in util_scan_parse_mbssid
  qcacmn: Fix memleak in MBSSIE handler
  qcacmn: Fix potential OOB read in util_scan_parse_mbssid()
  qcacmn: Fix potential OOB read in util_scan_is_split_prof_found()
  qcacmn: Fix out of bound read issue in ESP ie parse

Change-Id: I1b4880946cbe1c20838957274bffc0d60253c3d9
2024-05-29 03:03:01 +03:00
Michael Bestas
6053e63a3c
Merge tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api into android13-5.4-lahaina
"LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api:
  fw-api: CL 26368984 - update fw common interface files
  fw-api: CL 26367617 - update fw common interface files
  fw-api: CL 26367611 - update fw common interface files
  fw-api: CL 26351133 - update fw common interface files
  fw-api: CL 26304529 - update fw common interface files
  fw-api: CL 26304560 - update fw common interface files
  fw-api: CL 26301574 - update fw common interface files
  fw-api: CL 26280447 - update fw common interface files
  fw-api: CL 26269344 - update fw common interface files
  fw-api: CL 26268167 - update fw common interface files
  fw-api: CL 26238739, 26268166 - update fw common interface file txmon_tlvs.h #3
  fw-api: CL 26242685 - update fw common interface files
  fw-api: CL 26241114 - update fw common interface files
  fw-api: CL 26238739 - update fw common interface files
  fw-api: CL 26238735 - update fw common interface files
  fw-api: CL 26228983 - update fw common interface files
  fw-api: CL 26228979 - update fw common interface files
  fw-api: CL 26220780 - update fw common interface files
  fw-api: CL 26206720 - update fw common interface files
  fw-api: CL 26206715 - update fw common interface files
  fw-api: CL 26205559 - update fw common interface files
  fw-api: CL 26197005 - update fw common interface files
  fw-api: CL 26180835 - update fw common interface files
  fw-api: CL 26150181 - update fw common interface files
  fw-api: CL 26149972 - update fw common interface files
  fw-api: CL 26129651 - update fw common interface files
  fw-api: add TLV struct for sigb details
  fw-api: CL 26118792 - update fw common interface files
  fw-api: CL 26106643 - update fw common interface files
  fw-api: CL 26082151 - update fw common interface files
  fw-api: CL 26071804 - update fw common interface files
  fw-api: CL 26041862 - update fw common interface files
  fw-api: CL 26026870 - update fw common interface files
  fw-api: CL 26017002 - update fw common interface files
  fw-api: Incremental hw header file update for WCN7750
  fw-api: CL 25999327 - update fw common interface files

Change-Id: I6b14b90c99f8c68376776eebfe29e74e070d7afa
2024-05-29 03:02:12 +03:00
Michael Bestas
71d8fed9fd
Merge tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
"LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-24700-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4:
  msm: npu v1: Fix OOB issue in IPC between driver and firmware
  mmc: sdhci-msm: Disable partial_init and clk-scaling to avoid RED error
  slimbus: qcom-ngd-ctrl: Avoid accessing deallocated stack
  msm_ipa: new structure for tunnel design for uC
  msm: ipa3: change variable name for indication of rx tlv format
  soc: qcom: llcc: Handle a second device without data corruption
  msm: eva: User after free fix in msm_cvp_mark_user_persist
  rpmsg: slatecom: out of bound read from process_cmd
  soc: qcom: msm_minidump: Configurable Encryption support
  defconfig: arm64: Disable trimming non-whitelisted symbols
  soc: qcom: add out of bound check for AON fifo
  rpmsg: slatecom: maintain rx_size to read
  Revert LLCC changes
  bus: mhi: Fix potential out-of-bound access

 Conflicts:
	arch/arm64/boot/dts/vendor/bindings/interrupt-controller/ti,sci-intr.txt
	drivers/soc/qcom/llcc-slice.c
	drivers/usb/dwc3/core.c
	kernel/events/core.c
	mm/memory-failure.c

Change-Id: Ie4d89454f0766d0a48ebd4f2e6facb6deca9ea57
2024-05-29 02:59:55 +03:00
Ravindra Konda
f140d0102a Release 2.0.8.34R
Release 2.0.8.34R

Change-Id: I13682504174550139a786ac53caa20ff3dca0923
CRs-Fixed: 774533
2024-05-23 09:17:24 -07:00
Karthik Kantamneni
40ef76f8a2 qcacld-3.0: Do not aggregate checksum failure packets in FISA
When MSDU fails for checksum validation, do not aggregate those
packets and make sure current flow is flushed. Since checksum
failure packet data is not trust worthy it is not advisable to
build aggregated skb on top of checksum failure packets.

Change-Id: I09d8c4aeb656e6b0b5d268a60d72147534f2a2ab
CRs-Fixed: 3805053
2024-05-23 09:17:23 -07:00
Jia Ding
4034a73005
qcacmn: Dynamically allocate memory for ipa_wdi_conn_in_params
Currently struct ipa_wdi_conn_in_params occupies 1588 bytes and putting
it on the stack is rather expensive, which could potentially lead to
stack corruption.

Fix is to reduce stack usage in dp_ipa_setup by dynamically allocating
struct ipa_wdi_conn_in_params on the heap.

Change-Id: I8f71f44906a5c95f37627f7573b57b7825daaa7e
CRs-Fixed: 2852027
2024-05-18 23:10:53 +03:00
Sarannya S
ea009740e9
net: qrtr: Use xa_load in qrtr_get_service_id
In qrtr_get_service_id, use xa_load instead of node_get to check
if the node exists or not. Calling node_get from interrupt context
can cause potential deadlock since it calls into xa_store to
allocate the node if it does not exist.

Change-Id: Ida9f7a113417f0d184c0903004d94dd2eca6c472
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
2024-05-18 18:07:50 +00:00
Tony Truong
691b019901
net: qrtr: fix type for size in smd
The return value for of_property_count_u32_elems can be negative in the
case of an error or the property is not found. It is incorrect to use
size_t, unsigned type, as this can cause an overflow. Switch size from
type size_t to int.

Change-Id: Ica0425abd034b82994ab32087f04d602ce3dd9e9
Signed-off-by: Tony Truong <quic_truong@quicinc.com>
2024-05-18 18:07:49 +00:00
YangYi
5fd8516a12
penang: device suspend tests fail
Penang:
fix the problem of device suspend tests fail.

Change-Id: I2477d57440b40dcf930fff27631554c2024ec444
Signed-off-by: YangYi <yangyi31@motorola.com>
Reviewed-on: https://gerrit.mot.com/2424757
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-05-18 18:07:49 +00:00
YangYi
f378e9d0ba
Penang: resolve kasan panic
Penang:
KASAN: slab-out-of-bounds in qrtr_endpoint_register

Change-Id: I7542a0f2af0ceb0fdd04291b86795ba942ffe8d7
Signed-off-by: YangYi <yangyi31@motorola.com>
Reviewed-on: https://gerrit.mot.com/2413704
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-05-18 18:07:48 +00:00
Lei Chen
1be799e9f5
topolygy:fix kansan panic at topology_parse_cpu_capacity
BUG: KASAN: slab-out-of-bounds in topology_parse_cpu_capacity
Write of size 4 at addr ffffffa64515031c by task swapper/0/1
Revert the changes I90055f96c320b15960efac10d8d92c69413eeb6b
Fix the kasan panic.

Change-Id: I7a8701e29a9de82c175e3c4e265a9bf179e32f91
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2649556
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-05-18 18:07:48 +00:00
Jishnu Prakash
1bd12c499c
leds: qpnp-flash-v2: Fix compilation error
Fix a compilation error seen when casting void pointer to
int by casting it to uintptr_t instead.

Change-Id: I679da04f21041c386fa7ad8905ede94e12ea160c
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
2024-05-18 18:07:47 +00:00
Michael Bestas
c340e37c45
thermal: max31760_fan: Fix unused result warning
../drivers/thermal/qcom/max31760_fan.c:331:3: error: ignoring return
value of function declared with 'warn_unused_result' attribute
[-Werror,-Wunused-result]
                (pdata->vdd_reg);
                ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

Change-Id: I06fb07da60cb765e4daf98c38afdb97690491c6f
2024-05-18 18:07:47 +00:00
Michael Bestas
57c2c02859
input: touchscreen: Fix unused result warnings
Fixes:
../drivers/input/touchscreen/focaltech_touch/focaltech_core.c:979:3:
error: ignoring return value of function declared with
'warn_unused_result' attribute [-Werror,-Wunused-result]
                PTR_ERR(acl_desc);
                ^~~~~~~ ~~~~~~~~
../drivers/input/touchscreen/focaltech_touch/focaltech_core.c:986:3:
error: ignoring return value of function declared with
'warn_unused_result' attribute [-Werror,-Wunused-result]
                PTR_ERR(sgl_desc);
                ^~~~~~~ ~~~~~~~~

Change-Id: I941c32696a52a84a0a9272d4f969755932925aaa
2024-05-18 18:07:46 +00:00
vantoman
27a903f872
tcp: fix a bitfield constant conversion
../net/ipv4/tcp_timer.c:202:27: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
                icsk->icsk_mtup.enabled = 1;

Change-Id: I7e1b4013ba6a67fad27a611d30f98939ceaa5109
2024-05-18 18:07:46 +00:00
vantoman
21834caf71
ipa_v3: Fix enum conversion warnings
../techpack/dataipa/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c:510:41: warning: implicit conversion from enumeration type 'enum ipa_ip_type_enum_v01' to different enumeration type 'enum ipa_ip_type' [-Wenum-conversion]
        q6_ul_flt_rule_ptr->ip = flt_spec_ptr->ip_type;
                               ~ ~~~~~~~~~~~~~~^~~~~~~
../techpack/dataipa/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c:511:45: warning: implicit conversion from enumeration type 'enum ipa_filter_action_enum_v01' to different enumeration type 'enum ipa_flt_action' [-Wenum-conversion]
        q6_ul_flt_rule_ptr->action = flt_spec_ptr->filter_action;
                                   ~ ~~~~~~~~~~~~~~^~~~~~~~~~~~~

Change-Id: I0eb68d707151cd103676a30659ab81bf6fced131
2024-05-18 18:07:45 +00:00
Chenglu Lin
c3af0b80cf
gki_defconfig: enable CONFIG_CC_WERROR
Ensures that no new warnings are introduced to the build.

Bug: 141372918
Change-Id: I4107af91f5c1ddd655037823350e005e8362d588
Signed-off-by: Chenglu Lin <chenglulin@google.com>
2024-05-18 18:07:45 +00:00
Chenglu Lin
d57b564745
kernel: Add CC_WERROR config to turn warnings into errors
Add configuration option CONFIG_CC_WERROR to prevent warnings
from creeping in.

Bug: 141372918
Change-Id: Ie2d067c0177d8f13e9aaa9a78867998e390f89ee
Signed-off-by: Chenglu Lin <chenglulin@google.com>
2024-05-18 18:07:44 +00:00
Ben Dai
c69129daaf
ANDROID: arm64: Fix the address of ftrace_call compiled with CFI_CLANG
When CONFIG_CFI_CLANG and CONFIG_DYNAMIC_FTRACE are enabled, LLVM will
generate a jump function named ftrace_call.cfi_jt for ftrace_call, which
makes "&ftrace_call" in ftrace_update_ftrace_func() actually the address
of ftrace_call.cfi_jt. As a result, the tracer can't be really enabled
through runtime modification. Use __va_function() to get the actual address
of ftrace_call to fix the issue.

Bug: 184105181
Signed-off-by: Ben Dai <ben.dai@unisoc.com>
Change-Id: Ic9272cd4ab447b3b145d8e397e5c9010c49f7a12
2024-05-18 18:07:44 +00:00
Sami Tolvanen
e06e6248a2
ANDROID: arm64: Place CFI jump table sections in .text
After the switch to non-canonical CFI jump tables, the jump table
sections were placed after the .text section. Merge these sections
into .text to fix issues with error injection and kallsyms.

Bug: 225079388
Bug: 190422440
Change-Id: I6c81b3e4dbba62739f7fc5f6b45271c54f278c8f
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2024-05-18 18:07:43 +00:00
Kishore Sri venkata Ganesh Bolisetty
4e24aaf585
msm_perf: fix warnings to enable msm_perf
Handle error checks in reading attributes.

Change-Id: I12b693e469b8a8de21a2bef36c92a012e5a2c034
Signed-off-by: Kishore Sri venkata Ganesh Bolisetty <quic_bsrivenk@quicinc.com>
[dereference23: Backport to msm-5.4]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-18 18:07:43 +00:00
Jeevan Shriram
04664d5d69
drivers: soc: spss_utils: Handle error return from copy_to_user
Handle error return value from copy_to_user() in ioctls to avoid
following compilation failure.

"error: ignoring return value of function declared with 'warn_unused_result'
 attribute".

Change-Id: I92944ade7fb88e0543ca4254fab226da5777def7
Signed-off-by: Jeevan Shriram <quic_jshriram@quicinc.com>
2024-05-18 18:07:43 +00:00
Alexander Winkowski
7b962f9da1
ANDROID: gki_defconfig: Enable __must_check attribute
It never hurts to know if drivers have some flaws.

Change-Id: Iba3acda0eeec9448fc907def5b3d25f117bc818b
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-18 18:07:42 +00:00
Diab Neiroukh
4130e755f5
crypto: qcedev: Const-ify the SHA initialisation vectors
Change-Id: Id199c8b1cbfea15e16e7d540c8f079d66cd49f70
Suggested-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Diab Neiroukh <lazerl0rd@thezest.dev>
2024-05-18 18:07:42 +00:00
Nathan Chancellor
2160b12922
kbuild: Remove '-mno-global-merge'
This flag is specific to clang, where it is only used by the 32-bit and
64-bit ARM backends. In certain situations, the presence of this flag
will cause a warning, as shown by commit 6580c5c18fb3 ("um: clang: Strip
out -mno-global-merge from USER_CFLAGS").

Since commit 61163efae0 ("kbuild: LLVMLinux: Add Kbuild support for
building kernel with Clang") that added this flag back in 2014, there
have been quite a few changes to the GlobalMerge pass in LLVM. Building
several different ARCH=arm and ARCH=arm64 configurations with LLVM 11
(minimum) and 15 (current main version) with this flag removed (i.e.,
with the default of '-mglobal-merge') reveals no modpost warnings, so it
is likely that the issue noted in the comment is no longer relevant due
to changes in LLVM or modpost, meaning this flag can be removed.

If any new warnings show up that are a result of the removal of this
flag, it can be added back under arch/arm{,64}/Makefile to avoid
warnings on other architectures.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: David Gow <davidgow@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
(cherry picked from commit cf300b83c793c25c6b485fdaf7a4447d8ea4c655)
Change-Id: Ice39a960619319828b83c8091798fe383395a2b0
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-18 18:07:41 +00:00
Alexander Winkowski
8f2a69d5a3
techpack: audio: Fix false positive -Wstrlcpy-strlcat-size
strlen(swr_dmic_name_prefix_of) + 1 bytes are allocated for prefix_name just above

techpack/audio/asoc/codecs/swr-dmic.c:685:11: error: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Werror,-Wstrlcpy-strlcat-size]
                        strlen(swr_dmic_name_prefix_of) + 1);
                        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Change-Id: I808b4f135d42fc50587eeb9348848f7e0a3561cc
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-18 18:07:41 +00:00
Alexander Winkowski
4f5bf3d147
coresight-tmc: Fix false positive -Wfortify-source
The size is checked just above.

../drivers/hwtracing/coresight/coresight-tmc.c:423:26: warning: 'sscanf' may overflow; destination buffer in argument 3 has size 10, but the corresponding specifier may require size 11 [-Wfortify-source]
  423 |         if (sscanf(buf, "%10s", str) != 1)
      |                                 ^
../drivers/hwtracing/coresight/coresight-tmc.c:464:26: warning: 'sscanf' may overflow; destination buffer in argument 3 has size 10, but the corresponding specifier may require size 11 [-Wfortify-source]
  464 |         if (sscanf(buf, "%10s", str) != 1)
      |                                 ^
2 warnings generated.

Change-Id: I5db199a85ba0c7dfc15fae5d62c9c4d8c550d3e7
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-18 18:07:40 +00:00
Alexander Winkowski
4e8fdc63e9
input: touchscreen: nt36xxx: Fix -Wfortify-source
../drivers/input/touchscreen/nt36xxx/nt36xxx_mp_ctrlram.c:1096:3: warning: 'snprintf' size argument is too large; destination buffer has size 32, but size argument is 4096 [-Wfortify-source]
 1096 |                 snprintf(mpcriteria, PAGE_SIZE, "novatek-mp-criteria-%04X", ts->nvt_pid);
      |                 ^
1 warning generated.

Change-Id: I84e8c8d932ad1a26b52b020990435f8567e8c282
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-18 18:07:40 +00:00
Alexander Winkowski
d6254684dc
soc: qcom: minidump: Fix -Wstrlcpy-strlcat-size
Extracted from I54b58226e3d6de0b674ac4ca1407138d1c9707e8

../drivers/soc/qcom/msm_minidump.c:521:39: warning: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]
  521 |         strlcpy(banner, linux_banner, strlen(linux_banner) + 1);
      |                                       ~~~~~~~^~~~~~~~~~~~~~~~~
1 warning generated.

Change-Id: I43fa5006150dd402405f8c942571f08da0eb714a
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-18 18:07:39 +00:00
Alexander Winkowski
deac4ca723
thermal_debugfs: Avoid sscanf buffer overflow
Only 19 characters out of total 20 can be used due to the '\0' terminator.

Change-Id: I34883be26f97a16fdcb5ff97ff326d98f4d93c18
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-18 18:07:39 +00:00
Danny Lin
2a468765ee
Makefile: Remove obsolete -fno-builtin flag
CAF cherry-picked an obsolete LLVMLinux patch from 2014 in commit
a2a31f1ddc that introduced this
unnecessary flag. Now that the functions used by Clang's libcall
optimizations have been implemented, we can allow Clang to perform said
optimizations for a minor performance bump in certain code paths.

Change-Id: Ifa6b731c9702973be2c656d341e33a6186ed7cf2
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2024-05-18 18:07:38 +00:00
Danny Lin
27cb5cc179
Revert "ANDROID: HACK: arm64, LLVMLinux: use -mno-implicit-float"
This reverts commit 1210d2329b.

Unnecessary with Clang 6.0+.

Change-Id: I6f29ca050566e9027e51605e64bf6893602344ef
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2024-05-18 18:07:38 +00:00