Commit graph

969,442 commits

Author SHA1 Message Date
Michael Bestas
16c3dd1c00
Merge tag 'LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel into android13-5.4-lahaina
"LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel:

Change-Id: If22bd24ac6c1ab91864214fab8771ad20a033c0e
2023-08-29 03:58:14 +03:00
Michael Bestas
25bf8c0cd2
Merge tag 'LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel into android13-5.4-lahaina
"LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel:
  dsp: q6lsm: Address use after free for mmap handle
  ASoC: Resolve use after free in listen sound client
  dsp: q6lsm: Add check for payload buffer
  ASoC: dsp: q6core: Avoid use after free
  dsp:  afe: check for param size before copying
  dsp: q6core: validate payload size before access for AVCS
  asoc: copyright fix

Change-Id: I6e86a207e0a4651c87724cc8333258bd1d7b5dce
2023-08-29 03:57:28 +03:00
Michael Bestas
2dff8b07c9
Merge tag 'LA.UM.9.14.1.r1-10900-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-10900-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0:
  Release 2.0.8.33E
  qcacld-3.0: Update channel before user space update
  Release 2.0.8.33D
  qcacld-3.0: Fix for code error
  Release 2.0.8.33C
  qcacld-3.0: Fix ofdm and cck flag info for mon mode data packets
  qcacld-3.0: tx rate update for data packet in legacy modes
  qcacld-3.0: update mcs value for HT and VHT mode for mon mode
  qcacld-3.0: Fix OOB in wma_scan_roam.c
  qcacld-3.0: Update the channel only if AUTH resp is successful
  qcacld-3.0: Update preauth candidate entry to scan table
  qcacld-3.0: Optimize the roam latency time
  qcacld-3.0: Add support to configure 6G roam scan dwell time
  qcacld-3.0: Reduce the log level to optimise the roam time
  qcacld-3.0: Do not reserve NAN discovery vdev in case of FTM mode
  qcacld-3.0: roam latency optimisation changes
  qcacld-3.0: revert Disable TX_AGGREGATION_SIZE ini for HSP
  qcacld-3.0: Deliver tx offload mgmt pkts based on filter
  qcacld-3.0: Add check for mgmt/ctrl tx packets in pkt capture
  qcacld-3.0: Add check for mgmt/ctrl rx packets in pkt capture
  qcacld-3.0: Add filter for data packets in packet capture mode
  qcacld-3.0: Add check for data tx rx based on vendor command
  qcacld-3.0: Add tgt support to send beacon report period to FW
  qcacld-3.0: Add support to send config to FW based on filter
  qcacld-3.0: Add support to send mode to FW based on frame filter
  qcacld-3.0: vendor command changes to configure parameters for monitor mode
  qcacld-3.0: Set frame filter based on vendor command
  Revert "qcacld-3.0: Set frame filter based on vendor command"
  Revert "qcacld-3.0: vendor command changes to configure parameters for monitor mode"
  Revert "qcacld-3.0: Add support to send mode to FW based on frame filter"
  Revert "qcacld-3.0: Add support to send config to FW based on filter"
  Revert "qcacld-3.0: Add tgt support to send beacon report period to FW"
  Revert "qcacld-3.0: Add check for data tx rx based on vendor command"
  Revert "qcacld-3.0: Add filter for data packets in packet capture mode"
  Revert "qcacld-3.0: Add check for mgmt/ctrl rx packets in pkt capture"
  Revert "qcacld-3.0: Add check for mgmt/ctrl tx packets in pkt capture"
  Revert "qcacld-3.0: Deliver tx offload mgmt pkts based on filter"
  qcacld-3.0: vendor command changes to configure parameters for monitor mode
  qcacld-3.0: Deliver tx offload mgmt pkts based on filter
  qcacld-3.0: Add check for mgmt/ctrl tx packets in pkt capture
  qcacld-3.0: Add check for mgmt/ctrl rx packets in pkt capture
  qcacld-3.0: Add filter for data packets in packet capture mode
  qcacld-3.0: Add check for data tx rx based on vendor command
  qcacld-3.0: Add tgt support to send beacon report period to FW
  qcacld-3.0: Add support to send config to FW based on filter
  qcacld-3.0: Add support to send mode to FW based on frame filter
  qcacld-3.0: Set frame filter based on vendor command
  qcacld-3.0: Map monitor interface vdev during SSR
  qcacld-3.0: Don't delete monitor interface when STA interface is down
  Revert "Revert "Revert "qcacld-3.0: enable ini based tx aggregation for HSP"""
  Revert "Revert "qcacld-3.0: enable ini based tx aggregation for HSP""
  Revert "Revert "qcacld-3.0: Enable TX_AGGREGATION_SIZE_ENABLE for HST""
  Revert "qcacld-3.0: revert Disable TX_AGGREGATION_SIZE ini for HSP"
  Revert "qcacld-3.0: tx aggr support based on firmware capability"
  qcacld-3.0: tx aggr support based on firmware capability
  qcacld-3.0: revert Disable TX_AGGREGATION_SIZE ini for HSP
  Revert "qcacld-3.0: Enable TX_AGGREGATION_SIZE_ENABLE for HST"
  Revert "qcacld-3.0: enable ini based tx aggregation for HSP"
  qcacld-3.0: enable ini based tx aggregation for HSP
  Revert "qcacld-3.0: Fix No AMSDU/MPDU aggregation issue"

Change-Id: I44a17c2cfe623512283622757fab0ba8ec4de5fc
2023-08-29 03:56:49 +03:00
Michael Bestas
b326ec1ff9
Merge tag 'LA.UM.9.14.1.r1-10900-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-10900-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn:
  qcacmn: Fix low TPC power for vendor DTPC IE
  qcacmn: set pdev id to 0xFF when set country code
  qcacmn: Update preauth candidate entry to scan table
  qcacmn: Dont add the wmi header size while allocating the wmi buff
  qcacmn: Reduce the log level from error to info
  qcacmn: add vendor command to configure the parameters for monitor mode
  Revert "qcacmn: add vendor command to configure the parameters for monitor mode"
  qcacmn: Add cdp api to update the packet capture mode
  qcacmn: add vendor command to configure the parameters for monitor mode
  qcacmn: Add APIs to get data packets info
  qcacmn: Drop non-eapol packets for unauthorized peer
  qcacmn: Fix possible OOB in wmi_extract_dbr_buf_release_entry
  Revert "qcacmn: add wmi service for tx aggregation support"
  qcacmn: add wmi service for tx aggregation support

Change-Id: I1bc6d399f20e906c9366e0a816952cb5dfe865b6
2023-08-29 03:56:09 +03:00
Michael Bestas
49244f4559
Merge tag 'LA.UM.9.14.1.r1-10900-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-10900-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api:
  Revert "fw-api: update below 4 CLs in fw common interface files".
  fw-api: update below 4 CLs in fw common interface files

Change-Id: Ib291ad69feefd8daa92547e9352d9c3889f11aac
2023-08-29 03:55:31 +03:00
Michael Bestas
d9b72de2cf
Merge tag 'LA.UM.9.14.1.r1-10900-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-10900-QCM6490.QSSI14.0"

* tag 'LA.UM.9.14.1.r1-10900-QCM6490.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4:
  msm: kgsl: Defer drawobj_sync_timeline_fence_work() to a workqueue
  BACKPORT: of: base: Skip CPU nodes with "fail"/"fail-..." status
  qcom: cpufreq-hw: Use the topology coreid for offset
  msm: kgsl: Check user generated timestamp before queuing drawobjs
  msm: kgsl: Keep postamble packets in a privileged buffer
  net: qrtr: haven: Add bounds check on tx path
  pci: msm: Add support to retry for sending rpmsg
  cpu-topology: Change the size of allocation for cpu's
  devfreq: memlat: Correct the num_cpus in memlat-mon
  core_ctl: Add check for available cpus before accessing per_cpus
  msm: kgsl: Remove protected GPUCC registers from snapshot
  wifi: cfg80211: fix BSS refcounting bugs
  wifi: cfg80211: avoid nontransmitted BSS list corruption
  wifi: cfg80211: fix u8 overflow in cfg80211_update_notlisted_nontrans()
  cnss2: Add code to fallback to non-contiguous FW mem allocation
  msm: kgsl: Fix gpuaddr_in_range() to check upper bound
  msm: kgsl: Remove 'fd' dependency to get dma_buf handle
  msm: kgsl: Zap performance counters across context switches
  msm: kgsl: Update the IFPC power up reglist
  msm: kgsl: Update register protection config
  msm: kgsl: Add support for A643 GPU

Change-Id: Ie958b06794787ef0672bb2cdd0c12911b819f3d5
2023-08-29 03:54:00 +03:00
Michael Bestas
1cbc6feae2
Merge branch 'master' of https://github.com/namjaejeon/linux-exfat-oot into android13-5.4-lahaina
* 'master' of https://github.com/namjaejeon/linux-exfat-oot:
  exfat: add necessary header for vmalloc
  exfat: release s_lock before calling dir_emit()
  exfat: check if filename entries exceeds max filename length
  exfat: github action: make space for running xfstests
  exfat: use kvmalloc_array/kvfree instead of kmalloc_array/kfree
  exfat: splice: Use filemap_splice_read() instead of generic_file_splice_read()
  exfat: fs: build the legacy direct I/O code conditionally
  exfat: fs: port ->rename() to pass mnt_idmap
  exfat: fs: port ->mkdir() to pass mnt_idmap
  exfat: fs: port ->create() to pass mnt_idmap
  exfat: fs: port ->getattr() to pass mnt_idmap
  exfat: fs: port ->setattr() to pass mnt_idmap
  exfat: fix the newly allocated clusters are not freed in error handling
  exfat: don't print error log in normal case
  exfat: remove unneeded code from exfat_alloc_cluster()
  exfat: remove ->writepage
  exfat: handle unreconized benign secondary entries
  exfat: fix inode->i_blocks for non-512 byte sector size device
  exfat: redefine DIR_DELETED as the bad cluster number
  exfat: fix reporting fs error when reading dir beyond EOF
  exfat: fix unexpected EOF while reading dir
  exfat: reuse exfat_find_location() to simplify exfat_get_dentry_set()
  exfat: fix overflow in sector and cluster conversion
  exfat: remove i_size_write() from __exfat_truncate()
  exfat: remove argument 'size' from exfat_truncate()
  exfat: remove unnecessary arguments from exfat_find_dir_entry()
  exfat: remove unneeded codes from __exfat_rename()
  exfat: remove call ilog2() from exfat_readdir()
  exfat: remove generic/286
  exfat: fix python package installation failure
  exfat: github actions: add apt-get update command
  exfat: treewide: use get_random_u32() when possible
  exfat: replace magic numbers with Macros
  exfat: rename exfat_free_dentry_set() to exfat_put_dentry_set()
  exfat: move exfat_entry_set_cache from heap to stack
  exfat: support dynamic allocate bh for exfat_entry_set_cache
  exfat: reduce the size of exfat_entry_set_cache
  exfat: add SECTOR_SIZE macro
  exfat: hint the empty entry which at the end of cluster chain
  exfat: simplify empty entry hint
  exfat: add auto-test using github action
  exfat: remove travis-CI test
  exfat: release 6.0.0 version
  exfat: fix overflow for large capacity partition
  exfat: add auto build-test and simple stability test using travis-CI
  exfat: Drop superfluous new line for error messages
  exfat: Downgrade ENAMETOOLONG error message to debug messages
  exfat: Expand exfat_err() and co directly to pr_*() macro
  exfat: Define NLS_NAME_* as bit flags explicitly
  exfat: Return ENAMETOOLONG consistently for oversized paths
  exfat: simplified by using round_up()
  fs: Convert mpage_readpage to mpage_read_folio
  fs: Remove flags parameter from aops->write_begin
  fs: Remove aop flags parameter from cont_write_begin()
  block: add a bdev_discard_granularity helper
  block: remove QUEUE_FLAG_DISCARD
  exfat: remove duplicate write inode for extending dir/file
  exfat: remove duplicate write inode for truncating file
  exfat: reuse __exfat_write_inode() to update directory entry
  exfat: use updated exfat_chain directly during renaming

Change-Id: Ib68d90de9ea596296407f446fa611525034db193
2023-08-25 12:15:07 +03:00
Michael Bestas
d76bd768e3
Merge tag 'LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel into android13-5.4-lahaina
"LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0"

* tag 'LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel:
  msm: camera: fd: Fix compilation issue
  msm: camera: sensor: Add changes to prevent unmap buffers
  msm: camera: mem_mgr: Add refcount to track in use buffers
  msm: camera: core: validation of session/device/link handle

Change-Id: Ib788e6976d983169dbfc15ef0584cff7dc936dd9
2023-08-25 12:14:13 +03:00
Michael Bestas
ed068fccfe
Merge tag 'LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel into android13-5.4-lahaina
"LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0"

* tag 'LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel:
  ASoC: msm-pcm-q6-v2: Add dsp buf check
  ASoC: Add the judgment for TDM
  asoc: swrm: disable bus reset based on swrm verison
  dsp: afe: Add check for sidetone iir config copy size
  ASoC: msm-pcm-host-voice: Address buffer overflow in hpcm playback copy
  ASoC: msm-pcm-voip: Avoid interger underflow
  dsp: asm: validate payload size before access
  dsp:  afe: check for param size before copying
  dsp: q6core: validate payload size before access for AVCS
  dsp: afe: Add check for num_channels
  soc: swr-mstr-ctrl: add new lock to sync runtime_resume and runtime_suspend
  soc: reduce the auto suspend timeout when swr event finished

Change-Id: I82d3446a3ecf6cf47f75ab34a292557f24339ebb
2023-08-25 12:12:56 +03:00
Michael Bestas
5b907c9a3a
Merge tag 'LA.UM.9.14.r1-22200-LAHAINA.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.r1-22200-LAHAINA.QSSI14.0"

* tag 'LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api:
  fw-api: CL 23575205 - update fw common interface files
  fw-api: CL 23566455 - update fw common interface files
  fw-api: CL 23557966 - update fw common interface files
  fw-api: CL 23542073 - update fw common interface files
  fw-api: CL 23529709 - update fw common interface files
  fw-api: CL 23523211 - update fw common interface files
  fw-api: CL 23520891 - update fw common interface files
  fw-api: CL 23507997 - update fw common interface files
  fw-api: CL 23504182 - update fw common interface files
  fw-api: Changes in monitor headers to support Big endian
  fw-api: CL 23485853 - update fw common interface files
  fw-api: CL 23485848 - update fw common interface files
  fw-api: CL 23467477 - update fw common interface files
  fw-api: CL 23459857 - update fw common interface files
  fw-api: CL 23459166 - update fw common interface files
  fw-api: CL 23441442 - update fw common interface files
  fw-api: CL 23420522 - update fw common interface files
  fw-api: CL 23329795 - update fw common interface files
  fw-api: CL 23307781 - update fw common interface files
  fw-api: CL 23242420 - update fw common interface files
  fw-api: CL 23191762 - update fw common interface files
  fw-api: CL 23190594 - update fw common interface files
  fw-api: CL 23178089 - update fw common interface files
  fw-api: CL 23138893 - update fw common interface files
  fw-api: CL 23101916 - update fw common interface files

Change-Id: Ia96694f553b1f5e2734acf5607d7460f5d779ab4
2023-08-25 12:12:11 +03:00
Michael Bestas
36c61ad7d9
Merge tag 'LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
"LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0"

* tag 'LA.UM.9.14.r1-22200-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4:
  usb: gadget: cdev: Add spinlock to synchronize ports->cbits_updated
  msm: ep_pcie: Set clock power management bit for EP
  msm: Add config option for R8168 IOSS glue driver
  ipa_eth: Header change to pass more info from ETH to GSI

Change-Id: Ib6b27009e9867a605881464b80926daf6e0da25b
2023-08-25 12:11:25 +03:00
Linux Build Service Account
6493c14af5 Merge "ASoC: dsp: q6core: Avoid use after free" into audio-drivers.lnx.5.0.r8-rel 2023-08-17 02:48:49 -07:00
Linux Build Service Account
06a107fbb1 Merge changes I367f8a41,I54709831 into audio-drivers.lnx.5.0.r8-rel
* changes:
  dsp: q6lsm: Address use after free for mmap handle
  dsp: q6lsm: Add check for payload buffer
2023-08-17 02:47:58 -07:00
Soumya Managoli
047d3ada0e dsp: q6lsm: Address use after free for mmap handle
The global declared mmap_handle can be left dangling
for case when the handle is freed by the calling function.
Fix is to address this. Also add a check to make sure
the mmap_handle is accessed legally.

Change-Id: I367f8a41339aa0025b545b125ee820220efedeee
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-17 02:26:20 -07:00
Soumya Managoli
e948d97002 ASoC: Resolve use after free in listen sound client
Updated get_param_payload buffer ptr to NULL
after free to avoid use after free issue.

Change-Id: I86da8c12a0bdccce690f67b037198b67640e339b
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-17 02:25:57 -07:00
Soumya Managoli
a503967b64 dsp: q6lsm: Add check for payload buffer
Check get_param_payload buffer ptr before accessing.

Change-Id: I5470983188dffeec14965a5cdec30747b98735e7
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-17 02:25:37 -07:00
Soumya Managoli
881cda130f ASoC: dsp: q6core: Avoid use after free
Add check for AVCS_CMD_RSP_LOAD_MODULE response payload
to avoid its access after free.

Change-Id: I3023e6676a27fe33d2cc0f44a49813f0ed0ebe3b
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-17 02:25:16 -07:00
Lynus Vaz
7be109d700 msm: kgsl: Defer drawobj_sync_timeline_fence_work() to a workqueue
drawobj_sync_timeline_fence_work() does a cleanup of fence and syncobj
allocations. Doing this cleanup in irq context requires the irq_work
struct to remain valid after the function executes. Avoid this constraint
by deferring this work to the memory workqueue.

Change-Id: Icf648a61686c1ef3fd84467a2376b11a9a4bb803
Signed-off-by: Lynus Vaz <quic_lvaz@quicinc.com>
2023-08-17 02:24:45 -07:00
Alexander Winkowski
368983dd6c
techpack: camera: Avoid OOB access to struct cam_axi_per_path_bw_vote
Change-Id: I36c6366aa77f8e747a18d30b11c9f4f10ab60a82
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2023-08-15 17:53:46 +00:00
Soumya Managoli
e9e1988e85
ASoC: Fix overflow error in routing driver
The reg in soc_dapm_mux is 32-bit. The BE DAI ID passed
as shift(to be operated on the reg) may be more than 31,
which may cause overflow.
Set reg field to SND_SOC_NOPM to avoid any DAPM operation
while passing BE IDs in shift_l field and hence avoid overflow.

Change-Id: Ibbbca04c61b7c56eb4c5a7485a4e93dc28a09709
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
[dereference23: Forward port to msm-5.4]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2023-08-15 17:50:24 +00:00
Gangadhar Kavalastramath
abd1a7c44c
qcacld-3.0: Initialize local struct objects
Initialize struct cm_roam_values_copy to avoid using uninitialized
parameters in wlan_cm_roam_cfg_set_value().
Initialize struct pdev_params to zero to avoid using uninitialized
parameters in wmi_unified_pdev_param_send().

Change-Id: I820db09840431487f1756695a0562f8a794f549f
CRs-Fixed: 3187194
2023-08-15 17:49:59 +00:00
Manaf Meethalavalappu Pallikunhi
7d3114211e
disp: msm: limit display brightness max cooling device level
Based on panel hardware support, display brightness levels can
be very high value. This high value display brightness cooling
device levels can cause exceeding PAGE_SIZE for cooling device stat
buffer. It leads to buffer failure for cooling device stat feature.

Limit display panel mitigation level max to 255. If hardware
supports more than 255, then scale brightness levels fit
into above limit.

Change-Id: Ieeee4ff2aa5cd884819b30b4fd9839e48ac4d804
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2023-08-15 17:49:42 +00:00
Linux Build Service Account
e88a5cceb1 Merge c99a841d40 on remote branch
Change-Id: I1568e21baded8139319e266649bffde810e4a8a5
2023-07-19 02:18:12 -07:00
Linux Build Service Account
bef14fa7f2 Merge f81db81382 on remote branch
Change-Id: I31f0b6b78c6a47c9a3eaa55d4b614fd2af047e29
2023-07-19 01:59:24 -07:00
Linux Build Service Account
d5e4529e8b Merge b9736f2024 on remote branch
Change-Id: Ieac36f04437394214eb963fddf1bfcb90e18de53
2023-07-19 01:54:34 -07:00
Linux Build Service Account
43c4367cfa Merge f47869b550 on remote branch
Change-Id: I74a048c76fb5f41d4c05ded978e3862210293001
2023-07-19 01:43:00 -07:00
HiGarfield
2a0023bc28 exfat: add necessary header for vmalloc
This fixes building on Linux 4.4.

Signed-off-by: HiGarfield <higarfield@126.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-16 23:58:02 +09:00
Sungjong Seo
803d714374 exfat: release s_lock before calling dir_emit()
There is a potential deadlock reported by syzbot as below:

======================================================
WARNING: possible circular locking dependency detected
6.4.0-next-20230707-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor330/5073 is trying to acquire lock:
ffff8880218527a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock_killable include/linux/mmap_lock.h:151 [inline]
ffff8880218527a0 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5293 [inline]
ffff8880218527a0 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x369/0x510 mm/memory.c:5344
but task is already holding lock:
ffff888019f760e0 (&sbi->s_lock){+.+.}-{3:3}, at: exfat_iterate+0x117/0xb50 fs/exfat/dir.c:232

which lock already depends on the new lock.

Chain exists of:
  &mm->mmap_lock --> mapping.invalidate_lock#3 --> &sbi->s_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&sbi->s_lock);
                               lock(mapping.invalidate_lock#3);
                               lock(&sbi->s_lock);
  rlock(&mm->mmap_lock);

Let's try to avoid above potential deadlock condition by moving dir_emit*()
out of sbi->s_lock coverage.

Fixes: ca06197382bd ("exfat: add directory operations")
Cc: stable@vger.kernel.org #v5.7+
Reported-by: syzbot+1741a5d9b79989c10bdc@syzkaller.appspotmail.com
Link: https://lore.kernel.org/lkml/00000000000078ee7e060066270b@google.com/T/#u
Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-15 23:12:22 +09:00
Namjae Jeon
0bf9ccffd2 exfat: check if filename entries exceeds max filename length
exfat_extract_uni_name copies characters from a given file name entry into
the 'uniname' variable. This variable is actually defined on the stack of
the exfat_readdir() function. According to the definition of
the 'exfat_uni_name' type, the file name should be limited 255 characters
(+ null teminator space), but the exfat_get_uniname_from_ext_entry()
function can write more characters because there is no check if filename
entries exceeds max filename length. This patch add the check not to copy
filename characters when exceeding max filename length.

Cc: stable@vger.kernel.org
Cc: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-14 17:10:50 +09:00
Namjae Jeon
17c7881225 exfat: github action: make space for running xfstests
github action seems to decrease disk space of each users. This patch try
to remove file creation test and reset test images in the middle of testing xfstests

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-14 17:08:12 +09:00
Linux Build Service Account
b0f4412db3 Merge f81db81382 on remote branch
Change-Id: Ib7eaa74a7665a4508797d38da7127c79d6a2a901
2023-07-13 06:17:01 -07:00
Linux Build Service Account
8e23a47538 Merge c53391f022 on remote branch
Change-Id: I125ca16d0b542e342dc246006beac84c1092fe29
2023-07-13 06:05:07 -07:00
Linux Build Service Account
dac7a5ea37 Merge b7e74f81db on remote branch
Change-Id: I9f7f7e118aae08c5652b5c43530b386b139796bc
2023-07-13 06:03:37 -07:00
Linux Build Service Account
2059fb87c9 Merge f33e86393b on remote branch
Change-Id: Ic9055d7bc21f0e2235b7a49b85553124fa8b3bdf
2023-07-13 05:55:48 -07:00
Linux Build Service Account
a0b2074e7b Merge f47869b550 on remote branch
Change-Id: Iee276e57f4ba195c8989856ad74c9cd1e644ce98
2023-07-13 05:41:00 -07:00
Namjae Jeon
7d8b1148d8 exfat: use kvmalloc_array/kvfree instead of kmalloc_array/kfree
The call stack shown below is a scenario in the Linux 4.19 kernel.
Allocating memory failed where exfat fs use kmalloc_array due to
system memory fragmentation, while the u-disk was inserted without
recognition.
Devices such as u-disk using the exfat file system are pluggable and
may be insert into the system at any time.
However, long-term running systems cannot guarantee the continuity of
physical memory. Therefore, it's necessary to address this issue.

Binder:2632_6: page allocation failure: order:4,
 mode:0x6040c0(GFP_KERNEL|__GFP_COMP), nodemask=(null)
Call trace:
[242178.097582]  dump_backtrace+0x0/0x4
[242178.097589]  dump_stack+0xf4/0x134
[242178.097598]  warn_alloc+0xd8/0x144
[242178.097603]  __alloc_pages_nodemask+0x1364/0x1384
[242178.097608]  kmalloc_order+0x2c/0x510
[242178.097612]  kmalloc_order_trace+0x40/0x16c
[242178.097618]  __kmalloc+0x360/0x408
[242178.097624]  load_alloc_bitmap+0x160/0x284
[242178.097628]  exfat_fill_super+0xa3c/0xe7c
[242178.097635]  mount_bdev+0x2e8/0x3a0
[242178.097638]  exfat_fs_mount+0x40/0x50
[242178.097643]  mount_fs+0x138/0x2e8
[242178.097649]  vfs_kern_mount+0x90/0x270
[242178.097655]  do_mount+0x798/0x173c
[242178.097659]  ksys_mount+0x114/0x1ac
[242178.097665]  __arm64_sys_mount+0x24/0x34
[242178.097671]  el0_svc_common+0xb8/0x1b8
[242178.097676]  el0_svc_handler+0x74/0x90
[242178.097681]  el0_svc+0x8/0x340

By analyzing the exfat code,we found that continuous physical memory
is not required here,so kvmalloc_array is used can solve this problem.

Signed-off-by: gaoming <gaoming20@hihonor.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-12 23:32:11 +09:00
Pratham Pratap
c99a841d40 usb: gadget: cdev: Add spinlock to synchronize ports->cbits_updated
Consider a scenario in which open, write and close of AT port is being
done repeatedly. At some point in time, cbits_updated in f_cdev
structure gets overwritten by the previous close instance causing the AT
port to go unresponsive. This prevents port bridge service from sending
DTR/RTS settings to at_mdm0 from at_usb0.

Fix this by adding spinlock to synchronise the updation of
ports->cbits_updated field in f_cdev structure.

Change-Id: Ibf39aa90f3918cd5f22e32a3b06685db4c4298ae
Signed-off-by: Pratham Pratap <quic_ppratap@quicinc.com>
2023-07-11 11:59:48 -07:00
David Howells
331d3f5c42 exfat: splice: Use filemap_splice_read() instead of generic_file_splice_read()
Replace pointers to generic_file_splice_read() with calls to
filemap_splice_read().

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christian Brauner <brauner@kernel.org>
cc: Jens Axboe <axboe@kernel.dk>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: David Hildenbrand <david@redhat.com>
cc: John Hubbard <jhubbard@nvidia.com>
cc: linux-mm@kvack.org
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20230522135018.2742245-29-dhowells@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:35:55 +09:00
Christoph Hellwig
796bbd0726 exfat: fs: build the legacy direct I/O code conditionally
Add a new LEGACY_DIRECT_IO config symbol that is only selected by the
file systems that still use the legacy blockdev_direct_IO code, so that
kernels without support for those file systems don't need to build the
code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20230125065839.191256-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:35:47 +09:00
Christian Brauner (Microsoft)
d8b0edab69 exfat: fs: port ->rename() to pass mnt_idmap
Convert to struct mnt_idmap.

Last cycle we merged the necessary infrastructure in
256c8aed2b42 ("fs: introduce dedicated idmap type for mounts").
This is just the conversion to struct mnt_idmap.

Currently we still pass around the plain namespace that was attached to a
mount. This is in general pretty convenient but it makes it easy to
conflate namespaces that are relevant on the filesystem with namespaces
that are relevent on the mount level. Especially for non-vfs developers
without detailed knowledge in this area this can be a potential source for
bugs.

Once the conversion to struct mnt_idmap is done all helpers down to the
really low-level helpers will take a struct mnt_idmap argument instead of
two namespace arguments. This way it becomes impossible to conflate the two
eliminating the possibility of any bugs. All of the vfs and all filesystems
only operate on struct mnt_idmap.

Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:34:25 +09:00
Christian Brauner (Microsoft)
88c55a85d0 exfat: fs: port ->mkdir() to pass mnt_idmap
Convert to struct mnt_idmap.

Last cycle we merged the necessary infrastructure in
256c8aed2b42 ("fs: introduce dedicated idmap type for mounts").
This is just the conversion to struct mnt_idmap.

Currently we still pass around the plain namespace that was attached to a
mount. This is in general pretty convenient but it makes it easy to
conflate namespaces that are relevant on the filesystem with namespaces
that are relevent on the mount level. Especially for non-vfs developers
without detailed knowledge in this area this can be a potential source for
bugs.

Once the conversion to struct mnt_idmap is done all helpers down to the
really low-level helpers will take a struct mnt_idmap argument instead of
two namespace arguments. This way it becomes impossible to conflate the two
eliminating the possibility of any bugs. All of the vfs and all filesystems
only operate on struct mnt_idmap.

Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:20:56 +09:00
Christian Brauner (Microsoft)
1610136b56 exfat: fs: port ->create() to pass mnt_idmap
Convert to struct mnt_idmap.

Last cycle we merged the necessary infrastructure in
256c8aed2b42 ("fs: introduce dedicated idmap type for mounts").
This is just the conversion to struct mnt_idmap.

Currently we still pass around the plain namespace that was attached to a
mount. This is in general pretty convenient but it makes it easy to
conflate namespaces that are relevant on the filesystem with namespaces
that are relevent on the mount level. Especially for non-vfs developers
without detailed knowledge in this area this can be a potential source for
bugs.

Once the conversion to struct mnt_idmap is done all helpers down to the
really low-level helpers will take a struct mnt_idmap argument instead of
two namespace arguments. This way it becomes impossible to conflate the two
eliminating the possibility of any bugs. All of the vfs and all filesystems
only operate on struct mnt_idmap.

Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:20:54 +09:00
Christian Brauner (Microsoft)
eb2bd5c43a exfat: fs: port ->getattr() to pass mnt_idmap
Convert to struct mnt_idmap.

Last cycle we merged the necessary infrastructure in
256c8aed2b42 ("fs: introduce dedicated idmap type for mounts").
This is just the conversion to struct mnt_idmap.

Currently we still pass around the plain namespace that was attached to a
mount. This is in general pretty convenient but it makes it easy to
conflate namespaces that are relevant on the filesystem with namespaces
that are relevent on the mount level. Especially for non-vfs developers
without detailed knowledge in this area this can be a potential source for
bugs.

Once the conversion to struct mnt_idmap is done all helpers down to the
really low-level helpers will take a struct mnt_idmap argument instead of
two namespace arguments. This way it becomes impossible to conflate the two
eliminating the possibility of any bugs. All of the vfs and all filesystems
only operate on struct mnt_idmap.

Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:20:50 +09:00
Christian Brauner (Microsoft)
f4f94fa720 exfat: fs: port ->setattr() to pass mnt_idmap
Convert to struct mnt_idmap.

Last cycle we merged the necessary infrastructure in
256c8aed2b42 ("fs: introduce dedicated idmap type for mounts").
This is just the conversion to struct mnt_idmap.

Currently we still pass around the plain namespace that was attached to a
mount. This is in general pretty convenient but it makes it easy to
conflate namespaces that are relevant on the filesystem with namespaces
that are relevent on the mount level. Especially for non-vfs developers
without detailed knowledge in this area this can be a potential source for
bugs.

Once the conversion to struct mnt_idmap is done all helpers down to the
really low-level helpers will take a struct mnt_idmap argument instead of
two namespace arguments. This way it becomes impossible to conflate the two
eliminating the possibility of any bugs. All of the vfs and all filesystems
only operate on struct mnt_idmap.

Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:20:47 +09:00
Yuezhang Mo
03ab6855b1 exfat: fix the newly allocated clusters are not freed in error handling
In error handling 'free_cluster', before num_alloc clusters allocated,
p_chain->size will not updated and always 0, thus the newly allocated
clusters are not freed.

Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:20:45 +09:00
Yuezhang Mo
7a55bf46a5 exfat: don't print error log in normal case
When allocating a new cluster, exFAT first allocates from the
next cluster of the last cluster of the file. If the last cluster
of the file is the last cluster of the volume, allocate from the
first cluster. This is a normal case, but the following error log
will be printed. It makes users confused, so this commit removes
the error log.

[1960905.181545] exFAT-fs (sdb1): hint_cluster is invalid (262130)

Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:20:42 +09:00
Yuezhang Mo
cd17de5006 exfat: remove unneeded code from exfat_alloc_cluster()
In the removed code, num_clusters is 0, nothing is done in
exfat_chain_cont_cluster(), so it is unneeded, remove it.

Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:20:40 +09:00
Christoph Hellwig
0e44fbe12d exfat: remove ->writepage
Patch series "start removing writepage instances v2".

The VM doesn't need or want ->writepage for writeback and is fine with
just having ->writepages as long as ->migrate_folio is implemented.

This series removes all ->writepage instances that use
block_write_full_page directly and also have a plain mpage_writepages
based ->writepages.

This patch (of 7):

->writepage is a very inefficient method to write back data, and only used
through write_cache_pages or a a fallback when no ->migrate_folio method
is present.

Set ->migrate_folio to the generic buffer_head based helper, and remove
the ->writepage implementation.

Link: https://lkml.kernel.org/r/20221202102644.770505-1-hch@lst.de
Link: https://lkml.kernel.org/r/20221202102644.770505-2-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Dave Kleikamp <shaggy@kernel.org>
Cc: Jan Kara <jack@suse.com>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-07-11 22:20:39 +09:00
Michael Bestas
c66e4a1259
Merge tag 'LA.UM.9.14.r1-22000-LAHAINA.QSSI12.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/datarmnet-ext into android13-5.4-lahaina
"LA.UM.9.14.r1-22000-LAHAINA.QSSI12.0"

* tag 'LA.UM.9.14.r1-22000-LAHAINA.QSSI12.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/datarmnet-ext:
  rmnet_offload: I590f620cea3770efb8bc319e3a0322bbc8acaf85
  rmnet_offload: I3835da78f030c175bb6ce15cbcb73c50272dd7f2

Change-Id: I1769c803edba359f5ceaecd3aac9e23647f24253
2023-07-11 15:55:17 +03:00
Michael Bestas
e11e13749b
Merge tag 'LA.UM.9.14.r1-22000-LAHAINA.QSSI12.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/datarmnet into android13-5.4-lahaina
"LA.UM.9.14.r1-22000-LAHAINA.QSSI12.0"

* tag 'LA.UM.9.14.r1-22000-LAHAINA.QSSI12.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/datarmnet:
  rmnet_core: Strengthen IPv6 fragment check in rmnet_frag_skip_exthdr()
  rmnet_core: Manually checksum csum_valid = 0 packets

Change-Id: Ic8d02b333ceb430f12209e5f8de32c42d617bd17
2023-07-11 15:53:54 +03:00