Commit graph

889,595 commits

Author SHA1 Message Date
Liam Mark
f03a6783a0 dma-buf: Cache the dma-buf inode number
Now that dma-buf has switched to handling its release from the
file_operations' release function to the dentry_operations' d_release
function there is a potential use-after-free when accessing the
buf_obj->file->f_inode as the path called by __fput eventually calls
__dentry_kill which frees the inode before calling the dentry_operations'
d_release function, so buf_obj->file->f_inode may no longer be valid.

It doesn't look like there is a clean way to check if the inode is valid.
For example using dentry->d_lock to look at the dentry inode would first
involve getting the dentry via a call to file_dentry which potentially
uses buf_obj->file->f_inode and it may no longer be valid.

It looks safer to simply cache the inode number since it is a useful value
to have as it identifies dma-buf objects.

KASAN log gave the following:
KASAN: use-after-free in dma_buf_debug_show+0x190/0x660
E : Read of size 8 at addr ffffff81051d7740 by task cat/19499
I Call trace:
I : dump_backtrace+0x0/0x2c8
I : show_stack+0x20/0x2c
I : dump_stack+0x154/0x1f4
I : print_address_description+0x84/0x580
I : __kasan_report+0x1b8/0x218
I : kasan_report+0x10/0x18
I : __asan_load8+0x90/0x98
I : dma_buf_debug_show+0x190/0x660
I : seq_read+0x2dc/0x830
I : full_proxy_read+0xbc/0x110
I : __vfs_read+0xd8/0x3d0
I : vfs_read+0x158/0x278
I : ksys_read+0x114/0x1e0
I : __arm64_sys_read+0x4c/0x5c
I : el0_svc_common+0x130/0x294
I : el0_svc_handler+0xdc/0xec
I : el0_svc+0x8/0xc
E : Allocated by task 912:
I : __kasan_kmalloc+0xfc/0x1b8
I : kasan_slab_alloc+0x14/0x1c
I : kmem_cache_alloc+0x320/0x3c4
I : new_inode_pseudo+0xbc/0x168
I : alloc_anon_inode+0x28/0x170
I : dma_buf_export+0x1e0/0x3ec
I : ion_dmabuf_alloc+0x168/0x1d4
I : ion_ioctl+0x24c/0x5c8
I : do_vfs_ioctl+0x55c/0xcb4
I : __arm64_sys_ioctl+0xa0/0xe4
I : el0_svc_common+0x130/0x294
I : el0_svc_handler+0xdc/0xec
I : el0_svc+0x8/0xc
E : Freed by task 40:
I : __kasan_slab_free+0x160/0x22c
I : kasan_slab_free+0x10/0x1c
I : slab_free_freelist_hook+0xdc/0x15c
I : kmem_cache_free+0xf8/0x350
I : i_callback+0x48/0x220
I : rcu_do_batch+0x2e8/0x594
I : nocb_cb_wait+0x158/0x930
I : rcu_nocb_cb_kthread+0x20/0x44
I : kthread+0x1ec/0x204

Change-Id: Ic3cfabf3524d2d34fe8b341e84f2ff259e4fad63
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2020-09-04 14:09:47 -07:00
qctecmdr
2542e1edab Merge "cpuidle: record state entry failed statistics" 2020-08-28 07:16:00 -07:00
qctecmdr
e7ded32c7a Merge "usb: pd: Add support for IIO based properties" 2020-08-28 07:16:00 -07:00
qctecmdr
eadb3200ae Merge "NFC: Fix NFC firmware download issue" 2020-08-28 07:15:59 -07:00
qctecmdr
6712a5f2f7 Merge "interconnect: qcom: Add support for utility factor" 2020-08-28 07:15:59 -07:00
qctecmdr
e9105b301b Merge "BACKPORT: cfg80211: Squash of all 6GHz changes" 2020-08-28 07:15:59 -07:00
qctecmdr
96eb22e5b8 Merge "defconfig: arm64: Enable data configs" 2020-08-28 07:15:59 -07:00
qctecmdr
e55853d876 Merge "drivers: qcom: rpmh-rsc: check for control TCS availablilty" 2020-08-28 07:15:58 -07:00
qctecmdr
0cbcc5e197 Merge "defconfig: sdxlemur: Enable drivers required for PMIC devices" 2020-08-28 07:15:58 -07:00
Veerendranath Jakkam
3290a9818c BACKPORT: cfg80211: Squash of all 6GHz changes
Add support for Wi-Fi 6GHz band. squash of commits listed below.

ad8b601 BACKPORT: cfg80211: express channels with a KHz component
666ce0c BACKPORT: cfg80211: fix 6 GHz frequencies to kHz
a4d60a7 BACKPORT: cfg80211: adapt to new channelization of the 6GHz band
2ed68ba BACKPORT: cfg80211: add a helper to identify 6 GHz PSCs
6f5ad8f BACKPORT: ieee80211: add code to obtain and parse 6 GHz operation field
e66b8b1c BACKPORT: ieee80211: add HE ext EIDs and 6 GHz capability defines
bc79097 BACKPORT: cfg80211: handle 6 GHz capability of new station
e3a7357 BACKPORT: cfg80211: add and expose HE 6 GHz band capabilities
b8318c9 BACKPORT: mac80211: add HE 6 GHz Band Capability element
df67878 BACKPORT: mac80211: Add HE 6GHz capabilities element to probe request
0403f9c BACKPORT: cfg80211: treat 6 GHz channels as valid regardless of capability
92a570f BACKPORT: cfg80211: reject HT/VHT capabilities on 6 GHz band
dd5425c BACKPORT: cfg80211: require HE capabilities for 6 GHz band

CRs-Fixed: 2760276
Change-Id: Icecbe2587aba927dcb83bc4a574249dbe408d311
Signed-off-by: Vamsi Krishna <vamsin@codeaurora.org>
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
Git-commit: 934f4c7dd3a544bb8000f7436f1f0e12e04ebc37
Git-commit: 5e9cf0f0a3e98992184442de24253fe1b9c40f2e
Git-commit: d1a1646c0de7b0083d42a1ada72a3ec243bfcc6d
Git-commit: afbc9c9e8bfe71e8bd12a8c01bedd969fbab8f0e
Git-commit: 821273a5a502eebaae005557907d122d1e9b7b98
Git-commit: 8b30808d9be4183fab17f0b0e68eea88c94ff15a
Git-commit: 43e64bf301fd8c54f0082d91c6ffd4de861baf96
Git-commit: 223952177296c34d9c8de9cde33204caffe55725
Git-commit: 24a2042cb22fdfc7feef0df9622f0d9d71b8ced1
Git-commit: 2ad2274c58ee2dcaf9ccde5c63ff30f59b138f77
Git-commit: ba8f6a037f790147438173029799f54c9d3065f2
Git-commit: 461ce35d5535c1479384f67fcf4bfc3f3610edca
Git-commit: f438136528482f98535889c9a6f99bbacdd92870
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
2020-08-28 13:44:28 +05:30
Odelu Kukatla
d5ccb61353 interconnect: qcom: Add support for utility factor
Utility factor needs to be applied for aggregated bandwidth
so as to run the bus clock at required frequency.

Change-Id: Ic166f72b0719fa88db4c04b9acdc163483faf538
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2020-08-27 23:15:27 +05:30
Kaustubh Pandey
d29d8ce04b defconfig: arm64: Enable data configs
Enable config required for wifi calling and perf scenarios
for holi.

Change-Id: I4ff83a9a61d65d42bf25f63895390e1ac0b688c3
Signed-off-by: Kaustubh Pandey <kapandey@codeaurora.org>
2020-08-27 22:33:44 +05:30
qctecmdr
4141c87590 Merge "ANDROID: kernel: cgroup: cpuset: Clear cpus_requested for empty buf" 2020-08-27 07:36:29 -07:00
qctecmdr
8a8f1bc057 Merge "defconfig: lahaina-gki: enable PMIC PON log parser driver" 2020-08-27 07:36:29 -07:00
qctecmdr
f1ca04cd4f Merge "drivers: soc: qcom: update sct table for LLCC on Shima" 2020-08-27 07:36:29 -07:00
qctecmdr
99a483720b Merge "i2c: i2c-msm-geni: Avoid usage of dma chan_id in case of GSI transfer" 2020-08-27 07:36:28 -07:00
qctecmdr
f431103bbb Merge "interconnect: qcom: Add L3 support for Holi" 2020-08-27 04:10:55 -07:00
qctecmdr
2059691c06 Merge "msm: adsprpc: store glink transaction history in global buffer" 2020-08-27 04:10:54 -07:00
qctecmdr
31f38cb506 Merge "sched: Cleanup allowed cpus in task placement" 2020-08-27 04:10:54 -07:00
qctecmdr
e9ea070923 Merge "leds: qti-flash: Fix early return in qti_flash_led_disable()" 2020-08-27 04:10:53 -07:00
qctecmdr
0649f39174 Merge "sched: Enable latency sensitive feature" 2020-08-27 04:10:53 -07:00
qctecmdr
50ddda0136 Merge "leds: qti-flash: Show on_time and off_time in microseconds" 2020-08-27 04:10:53 -07:00
qctecmdr
4ac26a7bf5 Merge "cnss2: Set PCIe link state in proper state during resume" 2020-08-27 04:10:52 -07:00
qctecmdr
9f15b033b8 Merge "msm: cvp: Print detail NOC error info" 2020-08-27 04:10:52 -07:00
Tapas Dey
e671da4acd NFC: Fix NFC firmware download issue
Due to insufficient kernel buffer size, NFC firmware
download fails during NFC initialization.

Increased kernel buffer size to support
frame size of 554 in FW download mode.

Change-Id: I1e870389da1221a01b1a785ff1e5b6b175a88117
Signed-off-by: Tapas Dey <tdey@codeaurora.org>
2020-08-27 13:35:40 +05:30
qctecmdr
67847f22f2 Merge "cpuidle: menu: trace menu governor decisions" 2020-08-27 00:31:45 -07:00
qctecmdr
3d48305c26 Merge "cnss2: Add prefix to firmware name based on device ID" 2020-08-27 00:31:45 -07:00
qctecmdr
4be08dcbe9 Merge "mmc: core: Fix uninitialized clock scaling's freq table" 2020-08-27 00:31:44 -07:00
qctecmdr
6c9cb4c4f7 Merge "cnss2: set high 32bit of MSI addr only when device is 64 bit capable" 2020-08-27 00:31:44 -07:00
qctecmdr
d3ad4ca78e Merge "debug-pagealloc: Panic on pagealloc corruption" 2020-08-27 00:31:43 -07:00
qctecmdr
fdf561d7c8 Merge "Delay opening slimbus ports for A2DP for Apache" 2020-08-27 00:31:41 -07:00
qctecmdr
f6ed83af50 Merge "Revert "mmc: sdhci-msm: skip eMMC slot probe if eMMC isn't a bootdevice"" 2020-08-27 00:31:41 -07:00
qctecmdr
77eb6919f3 Merge "pinctrl: qcom: Update reserved GPIOs for Shima" 2020-08-27 00:31:40 -07:00
Mukesh Ojha
35c2fef8bf drivers: soc: qcom: update sct table for LLCC on Shima
Update the LLCC SCT table for Shima for clients to request
slices from system cache.

- Added new entries for cpuss1 and cpu_hwt.
- Changed the priority for modemhp_grow and display.
- Change the alignment of the table column to look readable.

Change-Id: I9289a9cc8a029d51429aeb44453e0620021daf75
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2020-08-26 23:35:22 -07:00
qctecmdr
d12f827442 Merge "msm: kgsl: Save and restore the power ctrl_flags during recovery" 2020-08-26 20:58:49 -07:00
qctecmdr
8097d6d615 Merge "defconfig: Cleanup of wlan related config flags for holi" 2020-08-26 20:58:49 -07:00
qctecmdr
08dfe9aa1f Merge "msm: pcie: fix race between DRV suspend/resume and RPMSG operations" 2020-08-26 20:58:48 -07:00
qctecmdr
dbd09eb095 Merge "mhi: core: prioritize BHI error debug registers set dump" 2020-08-26 20:58:48 -07:00
qctecmdr
7831531dd4 Merge "arm64: defconfig: Enable selinux config" 2020-08-26 20:58:48 -07:00
qctecmdr
5a3c177b1e Merge "soc: qcom: ramdump: Fix 'complete ramdump' collection" 2020-08-26 20:58:47 -07:00
qctecmdr
032d9702eb Merge "mhi: core: Make sure to powerdown if mhi_sync_power_up fails" 2020-08-26 20:58:47 -07:00
qctecmdr
34715bc934 Merge "cnss2: Notify MSM PCIe bus driver when detect link down" 2020-08-26 17:22:52 -07:00
qctecmdr
c1d2ca05ee Merge "block: Fix a race in the runtime power management code" 2020-08-26 17:22:51 -07:00
qctecmdr
f575f7eefa Merge "power: supply: qti_battery_charger: allow setting ICL for USB_PD charger" 2020-08-26 17:22:51 -07:00
qctecmdr
bbc10f107e Merge "soc: qcom: hyp_core_ctl: Catch uninitialized freq QOS object" 2020-08-26 17:22:51 -07:00
qctecmdr
e45a6c183b Merge "scsi: ufs: Remove ufshcd-qti driver" 2020-08-26 17:22:50 -07:00
qctecmdr
042b36b17b Merge "sched/cpupri: skip isolated cpus" 2020-08-26 17:22:50 -07:00
qctecmdr
0544515468 Merge "cfg80211: Indicate support for AKM advertisement per interface" 2020-08-26 17:22:50 -07:00
qctecmdr
21eb7ccbc4 Merge "arm64: defconfig: Add qcom debug config for perf build in HOLI" 2020-08-26 17:22:49 -07:00
qctecmdr
c786d5a718 Merge "usb: gadget: u_ether: Add skb check in eth_start_xmit" 2020-08-26 17:22:49 -07:00