Merge tag 'ASB-2024-04-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina

https://source.android.com/docs/security/bulletin/2024-04-01

* tag 'ASB-2024-04-05_11-5.4' of https://android.googlesource.com/kernel/common:
  FROMLIST: binder: check offset alignment in binder_get_object()
  BACKPORT: f2fs: expose # of overprivision segments
  ANDROID: GKI: Update symbol list for Zebra
  ANDROID: GKI: db845c: Update symbols list and ABI
  UPSTREAM: drm/msm/dsi: Enable runtime PM
  UPSTREAM: PM: runtime: Have devm_pm_runtime_enable() handle pm_runtime_dont_use_autosuspend()
  UPSTREAM: PM: runtime: add devm_pm_runtime_enable helper

Change-Id: Ie646a1c4ae01dacb93625c5ef26283c0d9f5df33
This commit is contained in:
Michael Bestas 2024-04-19 23:55:43 +03:00
commit 6120cc56e9
No known key found for this signature in database
GPG Key ID: CC95044519BE6669
9 changed files with 80578 additions and 83972 deletions

View File

@ -347,3 +347,8 @@ Date: April 2020
Contact: "Daeho Jeong" <daehojeong@google.com>
Description: Give a way to change iostat_period time. 3secs by default.
The new iostat trace gives stats gap given the period.
What: /sys/fs/f2fs/<disk>/ovp_segments
Date: March 2021
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
Description: Shows the number of overprovision segments.

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,6 @@
device_register
device_set_wakeup_capable
device_unregister
device_wakeup_enable
_dev_info
__dev_kfree_skb_any
devm_add_action
@ -236,6 +235,7 @@
__memcpy_fromio
memremap
memset
memunmap
misc_deregister
misc_register
mod_timer
@ -425,6 +425,7 @@
strlen
strncmp
strncpy
strscpy
strscpy_pad
__sw_hweight32
__sw_hweight64
@ -595,7 +596,6 @@
skb_copy
skb_realloc_headroom
strlcat
strscpy
__sw_hweight16
__sw_hweight8
synchronize_net
@ -610,8 +610,8 @@
pci_clear_master
pci_disable_device
pci_disable_msi
pcie_capability_clear_and_set_word
pcie_capability_read_word
pcie_capability_write_word
pci_enable_device
pci_enable_msi
pci_iomap
@ -620,6 +620,7 @@
pci_set_master
# required by ath10k_snoc.ko
__bitmap_clear
devm_regulator_get_optional
dmam_alloc_attrs
kernel_connect
@ -650,6 +651,7 @@
# required by dwc3-qcom.ko
devm_extcon_register_notifier
of_clk_get_parent_count
platform_device_del
# required by dwc3.ko
dev_fwnode
@ -661,7 +663,6 @@
of_usb_get_phy_mode
phy_pm_runtime_get_sync
phy_pm_runtime_put_sync
platform_device_add_data
platform_get_irq_byname_optional
pm_runtime_barrier
system_freezable_wq
@ -839,6 +840,7 @@
devm_clk_register
devm_devfreq_add_device
devm_ioremap_nocache
devm_pm_runtime_enable
devm_regulator_get_exclusive
dev_pm_opp_find_freq_ceil
dev_pm_opp_find_freq_exact
@ -1048,7 +1050,6 @@
kvmalloc_node
llist_add_batch
memparse
memunmap
mipi_dsi_create_packet
mipi_dsi_host_register
mipi_dsi_host_unregister
@ -1127,6 +1128,7 @@
usb_amd_prefetch_quirk
# required by ohci-platform.ko
device_wakeup_enable
usb_create_hcd
# required by phy-qcom-qmp.ko
@ -1444,6 +1446,7 @@
# required by xhci-hcd.ko
add_timer
iommu_get_domain_for_dev
mod_delayed_work_on
__num_online_cpus
param_ops_ullong
@ -1482,3 +1485,7 @@
# required by xhci-plat-hcd.ko
of_usb_host_tpl_support
__usb_create_hcd
# preserved by --additions-only
pcie_capability_write_word
platform_device_add_data

View File

@ -13,4 +13,5 @@
kobject_add
sock_wfree
dev_change_flags
netdev_master_upper_dev_get
netdev_master_upper_dev_get
prandom_bytes

View File

@ -1825,8 +1825,10 @@ static size_t binder_get_object(struct binder_proc *proc,
size_t object_size = 0;
read_size = min_t(size_t, sizeof(*object), buffer->data_size - offset);
if (offset > buffer->data_size || read_size < sizeof(*hdr))
if (offset > buffer->data_size || read_size < sizeof(*hdr) ||
!IS_ALIGNED(offset, sizeof(u32)))
return 0;
if (u) {
if (copy_from_user(object, u + offset, read_size))
return 0;

View File

@ -1475,6 +1475,28 @@ void pm_runtime_enable(struct device *dev)
}
EXPORT_SYMBOL_GPL(pm_runtime_enable);
static void pm_runtime_disable_action(void *data)
{
pm_runtime_dont_use_autosuspend(data);
pm_runtime_disable(data);
}
/**
* devm_pm_runtime_enable - devres-enabled version of pm_runtime_enable.
*
* NOTE: this will also handle calling pm_runtime_dont_use_autosuspend() for
* you at driver exit time if needed.
*
* @dev: Device to handle.
*/
int devm_pm_runtime_enable(struct device *dev)
{
pm_runtime_enable(dev);
return devm_add_action_or_reset(dev, pm_runtime_disable_action, dev);
}
EXPORT_SYMBOL_GPL(devm_pm_runtime_enable);
/**
* pm_runtime_forbid - Block runtime PM of a device.
* @dev: Device to handle.

View File

@ -606,6 +606,10 @@ static int dsi_phy_driver_probe(struct platform_device *pdev)
goto fail;
}
ret = devm_pm_runtime_enable(&pdev->dev);
if (ret)
return ret;
/* PLL init will call into clk_register which requires
* register access, so we need to enable power and ahb clock.
*/

View File

@ -87,6 +87,13 @@ static ssize_t free_segments_show(struct f2fs_attr *a,
(unsigned long long)(free_segments(sbi)));
}
static ssize_t ovp_segments_show(struct f2fs_attr *a,
struct f2fs_sb_info *sbi, char *buf)
{
return sprintf(buf, "%llu\n",
(unsigned long long)(overprovision_segments(sbi)));
}
static ssize_t lifetime_write_kbytes_show(struct f2fs_attr *a,
struct f2fs_sb_info *sbi, char *buf)
{
@ -570,6 +577,7 @@ F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, data_io_flag, data_io_flag);
F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, node_io_flag, node_io_flag);
F2FS_GENERAL_RO_ATTR(dirty_segments);
F2FS_GENERAL_RO_ATTR(free_segments);
F2FS_GENERAL_RO_ATTR(ovp_segments);
F2FS_GENERAL_RO_ATTR(lifetime_write_kbytes);
F2FS_GENERAL_RO_ATTR(features);
F2FS_GENERAL_RO_ATTR(current_reserved_blocks);
@ -659,6 +667,7 @@ static struct attribute *f2fs_attrs[] = {
ATTR_LIST(node_io_flag),
ATTR_LIST(dirty_segments),
ATTR_LIST(free_segments),
ATTR_LIST(ovp_segments),
ATTR_LIST(unusable),
ATTR_LIST(lifetime_write_kbytes),
ATTR_LIST(features),

View File

@ -60,6 +60,8 @@ extern void pm_runtime_put_suppliers(struct device *dev);
extern void pm_runtime_new_link(struct device *dev);
extern void pm_runtime_drop_link(struct device_link *link);
extern int devm_pm_runtime_enable(struct device *dev);
static inline void pm_suspend_ignore_children(struct device *dev, bool enable)
{
dev->power.ignore_children = enable;
@ -156,6 +158,8 @@ static inline void __pm_runtime_disable(struct device *dev, bool c) {}
static inline void pm_runtime_allow(struct device *dev) {}
static inline void pm_runtime_forbid(struct device *dev) {}
static inline int devm_pm_runtime_enable(struct device *dev) { return 0; }
static inline void pm_suspend_ignore_children(struct device *dev, bool enable) {}
static inline void pm_runtime_get_noresume(struct device *dev) {}
static inline void pm_runtime_put_noidle(struct device *dev) {}
@ -292,6 +296,11 @@ static inline void pm_runtime_disable(struct device *dev)
__pm_runtime_disable(dev, true);
}
/**
* NOTE: It's important to undo this with pm_runtime_dont_use_autosuspend()
* at driver exit time unless your driver initially enabled pm_runtime
* with devm_pm_runtime_enable() (which handles it for you).
*/
static inline void pm_runtime_use_autosuspend(struct device *dev)
{
__pm_runtime_use_autosuspend(dev, true);