android_kernel_samsung_sm8650/drivers/pci
Prudhvi Yarlagadda 393195e775 pci: msm: Iterate over the aer stats array
Iterate over the stats array instead of the strings
arrays in aer_stats_dev_attr API. This is to avoid the
array out of bounds access cases for the stats array.

This change is similar to the change in upstream
commit <5e6ae050955b566484f3cc6a66e3925eae87a0ed>
("PCI/AER: Iterate over error counters instead
of error strings").

Since strings array is of size 32 and the stats arrays
are of the sizes AER_MAX_TYPEOF_COR_ERRS = 16 and
AER_MAX_TYPEOF_UNCOR_ERRS = 27, there can be a case where
stats array will be accessed out of bounds as we are iterating
over the strings array.

So with this change, we will be iterrating over the stats array
instead of the strings array.

Change-Id: I6f78605a25962a8efebdbfada8d9cacff2dab947
Signed-off-by: Prudhvi Yarlagadda <quic_pyarlaga@quicinc.com>
2023-06-01 12:00:57 -07:00
..
controller pci: msm: Iterate over the aer stats array 2023-06-01 12:00:57 -07:00
endpoint PCI: endpoint: pci-epf-vntb: Add epf_ntb_mw_bar_clear() num_mws kernel-doc 2023-03-10 09:33:31 +01:00
hotplug PCI: pciehp: Add Qualcomm quirk for Command Completed erratum 2023-03-11 13:55:40 +01:00
msi PCI/MSI: Correct 'can_mask' test in msi_add_msi_desc() 2022-08-26 10:47:54 -05:00
pcie PCI/DPC: Await readiness of secondary bus after reset 2023-03-10 09:34:31 +01:00
switch PCI: switchtec: Return -EFAULT for copy_to_user() errors 2023-03-10 09:33:31 +01:00
access.c
ats.c UPSTREAM: PCI: Enable PASID only when ACS RR & UF enabled on upstream path 2023-04-12 02:08:27 +00:00
bus.c PCI: s390: Fix use-after-free of PCI resources with per-function hotplug 2023-03-22 13:33:45 +01:00
doe.c PCI/DOE: Fix memory leak with CONFIG_DEBUG_OBJECTS=y 2023-04-13 16:55:25 +02:00
ecam.c
host-bridge.c
iov.c PCI/IOV: Enlarge virtfn sysfs name buffer 2023-03-10 09:33:31 +01:00
irq.c PCI: Check for alloc failure in pci_request_irq() 2022-12-31 13:32:33 +01:00
Kconfig cxl for 6.0 2022-08-10 11:07:26 -07:00
Makefile PCI/DOE: Add DOE mailbox support functions 2022-07-19 15:38:04 -07:00
mmap.c PCI: Remove pci_mmap_page_range() wrapper 2022-07-29 12:08:44 -05:00
of.c IOMMU Updates for Linux v5.19 2022-05-31 09:56:54 -07:00
p2pdma.c PCI/P2PDMA: Use for_each_pci_dev() helper 2022-09-19 13:44:38 -05:00
pci-acpi.c PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() 2023-03-11 13:55:33 +01:00
pci-bridge-emul.c PCI: pci-bridge-emul: Set position of PCI capabilities to real HW value 2022-08-25 12:07:56 +02:00
pci-bridge-emul.h PCI: pci-bridge-emul: Set position of PCI capabilities to real HW value 2022-08-25 12:07:56 +02:00
pci-driver.c PCI: Unify delay handling for reset and resume 2023-03-10 09:34:30 +01:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI/sysfs: Fix double free in error path 2023-01-07 11:11:53 +01:00
pci.c Revert "Revert "PCI: loongson: Prevent LS7A MRRS increases"" 2023-03-30 12:23:02 +01:00
pci.h PCI/DPC: Await readiness of secondary bus after reset 2023-03-10 09:34:31 +01:00
probe.c PCI: Fix dropping valid root bus resources with .end = zero 2023-03-10 09:33:38 +01:00
proc.c PCI: Remove pci_mmap_page_range() wrapper 2022-07-29 12:08:44 -05:00
quirks.c PCI: Add ACS quirk for Wangxun NICs 2023-03-11 13:55:39 +01:00
remove.c
rom.c
search.c
setup-bus.c PCI: Distribute available resources for root buses, too 2023-03-11 13:55:38 +01:00
setup-irq.c
setup-res.c PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge 2022-09-21 17:52:47 -05:00
slot.c
syscall.c
vc.c
vgaarb.c
vpd.c
xen-pcifront.c xen/pcifront: move xenstore config scanning into sub-function 2022-10-07 07:36:44 +02:00