Commit Graph

1146218 Commits

Author SHA1 Message Date
Ulises Mendez Martinez
b38e72d30c ANDROID: Add initial symbols list for db845c
* This update the ABI [STG] definition:

197 function symbol(s) added
  'int __clk_mux_determine_rate(struct clk_hw*, struct clk_rate_request*)'
  'struct clk_hw* __devm_clk_hw_register_divider(struct device*, struct device_node*, const char*, const char*, const struct clk_hw*, const struct clk_parent_data*, unsigned long, void*, u8, u8, u8, const struct clk_div_table*, spinlock_t*)'
  'struct clk_hw* __devm_clk_hw_register_mux(struct device*, struct device_node*, const char*, u8, const char* const*, const struct clk_hw**, const struct clk_parent_data*, unsigned long, void*, u8, u32, u8, const u32*, spinlock_t*)'
  'int __devm_reset_control_bulk_get(struct device*, int, struct reset_control_bulk_data*, bool, bool, bool)'
  'struct spi_controller* __devm_spi_alloc_controller(struct device*, unsigned int, bool)'
  'struct dma_chan* __dma_request_channel(const dma_cap_mask_t*, dma_filter_fn, void*, struct device_node*)'
  'void __drm_atomic_helper_plane_reset(struct drm_plane*, struct drm_plane_state*)'
  'struct reset_control* __of_reset_control_get(struct device_node*, const char*, int, bool, bool, bool)'
  'struct reset_control* __reset_control_get(struct device*, const char*, int, bool, bool, bool)'
  'wait_queue_head_t* __var_waitqueue(void*)'
  'void* __vmalloc(unsigned long, gfp_t)'
  'struct clk* clk_hw_get_clk(struct clk_hw*, const char*)'
  'int component_compare_of(struct device*, void*)'
  'int crypto_register_shash(struct shash_alg*)'
  'void crypto_unregister_shash(struct shash_alg*)'
  'int dapm_regulator_event(struct snd_soc_dapm_widget*, struct snd_kcontrol*, int)'
  'struct dev_pm_opp* dev_pm_opp_find_level_exact(struct device*, unsigned int)'
  'unsigned int dev_pm_opp_get_level(struct dev_pm_opp*)'
  'struct device_node* dev_pm_opp_get_of_node(struct dev_pm_opp*)'
  'struct device_node* dev_pm_opp_of_get_opp_desc_node(struct device*)'
  'int device_get_mac_address(struct device*, char*)'
  'struct fwnode_handle* device_get_named_child_node(struct device*, const char*)'
  'int devm_clk_bulk_get_optional(struct device*, int, struct clk_bulk_data*)'
  'struct clk_hw* devm_clk_hw_register_fixed_factor_parent_hw(struct device*, const char*, const struct clk_hw*, unsigned long, unsigned int, unsigned int)'
  'struct devfreq* devm_devfreq_add_device(struct device*, struct devfreq_dev_profile*, const char*, void*)'
  'struct clk* devm_get_clk_from_child(struct device*, struct device_node*, const char*)'
  'struct gpio_desc* devm_gpiod_get_index(struct device*, const char*, unsigned int, enum gpiod_flags)'
  'void devm_gpiod_put(struct device*, struct gpio_desc*)'
  'int devm_led_classdev_multicolor_register_ext(struct device*, struct led_classdev_mc*, struct led_init_data*)'
  'void* devm_memremap(struct device*, resource_size_t, size_t, unsigned long)'
  'int devm_pm_clk_create(struct device*)'
  'int devm_pm_opp_of_add_table(struct device*)'
  'int devm_pm_opp_set_config(struct device*, struct dev_pm_opp_config*)'
  'int devm_pm_runtime_enable(struct device*)'
  'struct qcom_smem_state* devm_qcom_smem_state_get(struct device*, const char*, unsigned int*)'
  'int devm_regulator_bulk_get_const(struct device*, int, const struct regulator_bulk_data*, struct regulator_bulk_data**)'
  'struct reset_control* devm_reset_control_array_get(struct device*, bool, bool)'
  'int devm_spi_register_controller(struct device*, struct spi_controller*)'
  'int devm_watchdog_register_device(struct device*, struct watchdog_device*)'
  'void* dma_pool_alloc(struct dma_pool*, gfp_t, dma_addr_t*)'
  'struct dma_pool* dma_pool_create(const char*, struct device*, size_t, size_t, size_t)'
  'void dma_pool_destroy(struct dma_pool*)'
  'void dma_pool_free(struct dma_pool*, void*, dma_addr_t)'
  'void dma_resv_describe(struct dma_resv*, struct seq_file*)'
  'struct dma_fence* dma_resv_iter_first(struct dma_resv_iter*)'
  'struct dma_fence* dma_resv_iter_next(struct dma_resv_iter*)'
  'struct drm_bridge_state* drm_atomic_get_new_bridge_state(struct drm_atomic_state*, struct drm_bridge*)'
  'void drm_atomic_print_new_state(const struct drm_atomic_state*, struct drm_printer*)'
  'void drm_bridge_connector_enable_hpd(struct drm_connector*)'
  'struct drm_connector* drm_bridge_connector_init(struct drm_device*, struct drm_encoder*)'
  'enum drm_connector_status drm_bridge_detect(struct drm_bridge*)'
  'void drm_bridge_hpd_notify(struct drm_bridge*, enum drm_connector_status)'
  'bool drm_crtc_vblank_helper_get_vblank_timestamp(struct drm_crtc*, int*, ktime_t*, bool)'
  'bool drm_edid_block_valid(u8*, int, bool, bool*)'
  'void drm_flip_work_cleanup(struct drm_flip_work*)'
  'void drm_flip_work_commit(struct drm_flip_work*, struct workqueue_struct*)'
  'void drm_flip_work_init(struct drm_flip_work*, const char*, drm_flip_func_t)'
  'void drm_flip_work_queue(struct drm_flip_work*, void*)'
  'void drm_gem_lru_init(struct drm_gem_lru*, struct mutex*)'
  'void drm_gem_lru_move_tail(struct drm_gem_lru*, struct drm_gem_object*)'
  'unsigned long drm_gem_lru_scan(struct drm_gem_lru*, unsigned int, bool(*)(struct drm_gem_object*))'
  'int drm_gem_plane_helper_prepare_fb(struct drm_plane*, struct drm_plane_state*)'
  'bool drm_handle_vblank(struct drm_device*, unsigned int)'
  'int drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe*, const struct drm_connector*, const struct drm_display_mode*)'
  'void drm_helper_move_panel_connectors_to_head(struct drm_device*)'
  'int drm_mode_config_helper_resume(struct drm_device*)'
  'int drm_mode_config_helper_suspend(struct drm_device*)'
  'void drm_mode_destroy(struct drm_device*, struct drm_display_mode*)'
  'void drm_modeset_lock_init(struct drm_modeset_lock*)'
  'void drm_plane_enable_fb_damage_clips(struct drm_plane*)'
  'int drm_prime_sg_to_page_array(struct sg_table*, struct page**, int)'
  'bool drm_probe_ddc(struct i2c_adapter*)'
  'void drm_puts(struct drm_printer*, const char*)'
  'int drm_rect_calc_hscale(const struct drm_rect*, const struct drm_rect*, int, int)'
  'int drm_rect_calc_vscale(const struct drm_rect*, const struct drm_rect*, int, int)'
  'void drm_state_dump(struct drm_device*, struct drm_printer*)'
  'void drm_syncobj_add_point(struct drm_syncobj*, struct dma_fence_chain*, struct dma_fence*, uint64_t)'
  'struct drm_syncobj* drm_syncobj_find(struct drm_file*, u32)'
  'int drm_syncobj_find_fence(struct drm_file*, u32, u64, u64, struct dma_fence**)'
  'void drm_syncobj_free(struct kref*)'
  'void drm_syncobj_replace_fence(struct drm_syncobj*, struct dma_fence*)'
  'int drm_writeback_connector_init_with_encoder(struct drm_device*, struct drm_writeback_connector*, struct drm_encoder*, const struct drm_connector_funcs*, const u32*, int)'
  'struct usb_role_switch* fwnode_usb_role_switch_get(struct fwnode_handle*)'
  'void* gen_pool_dma_alloc_align(struct gen_pool*, size_t, dma_addr_t*, int)'
  'void* gen_pool_dma_zalloc_align(struct gen_pool*, size_t, dma_addr_t*, int)'
  'void guid_gen(guid_t*)'
  'int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe*)'
  'ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe*, void*, size_t)'
  'ssize_t hdmi_infoframe_pack(union hdmi_infoframe*, void*, size_t)'
  'int i2c_generic_scl_recovery(struct i2c_adapter*)'
  'void i2c_parse_fw_timings(struct device*, struct i2c_timings*, bool)'
  'int i2c_recover_bus(struct i2c_adapter*)'
  'int icc_disable(struct icc_path*)'
  'int icc_enable(struct icc_path*)'
  'int icc_std_aggregate(struct icc_node*, u32, u32, u32, u32*, u32*)'
  'void init_wait_var_entry(struct wait_bit_queue_entry*, void*, int)'
  'unsigned long invalidate_mapping_pages(struct address_space*, unsigned long, unsigned long)'
  'char* kstrdup_quotable_cmdline(struct task_struct*, gfp_t)'
  'int led_mc_calc_color_components(struct led_classdev_mc*, enum led_brightness)'
  'void memcpy_and_pad(void*, size_t, const void*, size_t, int)'
  'void netdev_notice(const struct net_device*, const char*, ...)'
  'int nvmem_cell_read_variable_le_u32(struct device*, const char*, u32*)'
  'struct clk_hw* of_clk_hw_onecell_get(struct of_phandle_args*, void*)'
  'int of_clk_set_defaults(struct device_node*, bool)'
  'int of_device_request_module(struct device*)'
  'struct device_node* of_get_compatible_child(const struct device_node*, const char*)'
  'struct i2c_adapter* of_get_i2c_adapter_by_node(struct device_node*)'
  'int of_pm_clk_add_clks(struct device*)'
  'int pci_enable_msi(struct pci_dev*)'
  'struct pci_dev* pci_get_slot(struct pci_bus*, unsigned int)'
  'const struct pci_device_id* pci_match_id(const struct pci_device_id*, struct pci_dev*)'
  'int pcie_capability_write_word(struct pci_dev*, int, u16)'
  'int phy_configure(struct phy*, union phy_configure_opts*)'
  'int pinctrl_generic_add_group(struct pinctrl_dev*, const char*, int*, int, void*)'
  'int pinctrl_generic_get_group_count(struct pinctrl_dev*)'
  'const char* pinctrl_generic_get_group_name(struct pinctrl_dev*, unsigned int)'
  'int pinctrl_generic_get_group_pins(struct pinctrl_dev*, unsigned int, const unsigned int**, unsigned int*)'
  'int pinctrl_generic_remove_group(struct pinctrl_dev*, unsigned int)'
  'int pinctrl_pm_select_idle_state(struct device*)'
  'int pm_generic_runtime_resume(struct device*)'
  'int pm_generic_runtime_suspend(struct device*)'
  'void qcom_smem_state_put(struct qcom_smem_state*)'
  'void regcache_cache_bypass(struct regmap*, bool)'
  'int register_vmap_purge_notifier(struct notifier_block*)'
  'int regmap_get_val_bytes(struct regmap*)'
  'int regmap_irq_set_type_config_simple(unsigned int**, unsigned int, const struct regmap_irq*, int)'
  'int regmap_noinc_read(struct regmap*, unsigned int, void*, size_t)'
  'int regmap_noinc_write(struct regmap*, unsigned int, const void*, size_t)'
  'int regulator_bulk_get(struct device*, int, struct regulator_bulk_data*)'
  'int regulator_get_current_limit_regmap(struct regulator_dev*)'
  'unsigned int regulator_get_linear_step(struct regulator*)'
  'int regulator_set_current_limit_regmap(struct regulator_dev*, int, int)'
  'int reset_control_bulk_assert(int, struct reset_control_bulk_data*)'
  'int reset_control_bulk_deassert(int, struct reset_control_bulk_data*)'
  'void reset_control_put(struct reset_control*)'
  'struct rpmsg_device* rpmsg_create_channel(struct rpmsg_device*, struct rpmsg_channel_info*)'
  'struct rpmsg_endpoint* rpmsg_create_ept(struct rpmsg_device*, rpmsg_rx_cb_t, void*, struct rpmsg_channel_info)'
  'int rpmsg_release_channel(struct rpmsg_device*, struct rpmsg_channel_info*)'
  'u64 rproc_elf_get_boot_addr(struct rproc*, const struct firmware*)'
  'void sb800_prefetch(struct device*, int)'
  'void shmem_truncate_range(struct inode*, loff_t, loff_t)'
  'int snd_dma_alloc_dir_pages(int, struct device*, enum dma_data_direction, size_t, struct snd_dma_buffer*)'
  'void snd_dma_free_pages(struct snd_dma_buffer*)'
  'int snd_pcm_create_iec958_consumer_default(u8*, size_t)'
  'int snd_pcm_fill_iec958_consumer(struct snd_pcm_runtime*, u8*, size_t)'
  'int snd_pcm_fill_iec958_consumer_hw_params(struct snd_pcm_hw_params*, u8*, size_t)'
  'int snd_pcm_hw_constraint_eld(struct snd_pcm_runtime*, void*)'
  'int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime*, snd_pcm_hw_param_t, unsigned int, unsigned int)'
  'int snd_pcm_hw_constraint_step(struct snd_pcm_runtime*, unsigned int, snd_pcm_hw_param_t, unsigned long)'
  'unsigned int snd_soc_component_read_field(struct snd_soc_component*, unsigned int, unsigned int)'
  'int snd_soc_component_write_field(struct snd_soc_component*, unsigned int, unsigned int, unsigned int)'
  'void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link*)'
  'int snd_soc_dai_set_fmt(struct snd_soc_dai*, unsigned int)'
  'struct snd_soc_dapm_context* snd_soc_dapm_kcontrol_dapm(struct snd_kcontrol*)'
  'int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card*, const char*)'
  'int snd_soc_of_parse_aux_devs(struct snd_soc_card*, const char*)'
  'int snd_soc_of_parse_pin_switches(struct snd_soc_card*, const char*)'
  'int snd_soc_tplg_component_load(struct snd_soc_component*, struct snd_soc_tplg_ops*, const struct firmware*)'
  'int snd_soc_tplg_component_remove(struct snd_soc_component*)'
  'int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget*, const struct snd_soc_tplg_widget_events*, int, u16)'
  'int spi_async(struct spi_device*, struct spi_message*)'
  'void spi_finalize_current_transfer(struct spi_controller*)'
  'const struct spi_device_id* spi_get_device_id(const struct spi_device*)'
  'struct spi_message* spi_get_next_queued_message(struct spi_controller*)'
  'int spi_write_then_read(struct spi_device*, const void*, unsigned int, void*, unsigned int)'
  'int typec_find_port_data_role(const char*)'
  'int typec_find_port_power_role(const char*)'
  'int typec_set_orientation(struct typec_port*, enum typec_orientation)'
  'void typec_unregister_port(struct typec_port*)'
  'int ufshcd_dme_configure_adapt(struct ufs_hba*, int, int)'
  'int ufshcd_get_pwr_dev_param(const struct ufs_dev_params*, const struct ufs_pa_layer_attr*, struct ufs_pa_layer_attr*)'
  'void ufshcd_init_pwr_dev_param(struct ufs_dev_params*)'
  'int unregister_vmap_purge_notifier(struct notifier_block*)'
  'void usb_amd_dev_put()'
  'bool usb_amd_prefetch_quirk()'
  'bool usb_amd_quirk_pll_check()'
  'void usb_amd_quirk_pll_disable()'
  'void usb_amd_quirk_pll_enable()'
  'long usb_calc_bus_time(int, int, int, int)'
  'void usb_hc_died(struct usb_hcd*)'
  'int usb_hcd_pci_probe(struct pci_dev*, const struct hc_driver*)'
  'void usb_hcd_pci_remove(struct pci_dev*)'
  'void usb_hcd_pci_shutdown(struct pci_dev*)'
  'void usb_role_switch_put(struct usb_role_switch*)'
  'void usb_root_hub_lost_power(struct usb_device*)'
  'int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler*)'
  'struct v4l2_ctrl* v4l2_ctrl_new_std_compound(struct v4l2_ctrl_handler*, const struct v4l2_ctrl_ops*, u32, union v4l2_ctrl_ptr)'
  'void v4l2_m2m_buf_remove_by_buf(struct v4l2_m2m_queue_ctx*, struct vb2_v4l2_buffer*)'
  'struct vb2_v4l2_buffer* v4l2_m2m_buf_remove_by_idx(struct v4l2_m2m_queue_ctx*, unsigned int)'
  'int v4l2_m2m_ioctl_create_bufs(struct file*, void*, struct v4l2_create_buffers*)'
  'int v4l2_m2m_ioctl_expbuf(struct file*, void*, struct v4l2_exportbuffer*)'
  'int v4l2_m2m_ioctl_prepare_buf(struct file*, void*, struct v4l2_buffer*)'
  'int v4l2_m2m_ioctl_qbuf(struct file*, void*, struct v4l2_buffer*)'
  'int v4l2_m2m_ioctl_try_decoder_cmd(struct file*, void*, struct v4l2_decoder_cmd*)'
  'int v4l2_m2m_ioctl_try_encoder_cmd(struct file*, void*, struct v4l2_encoder_cmd*)'
  'void vb2_queue_error(struct vb2_queue*)'
  'void wake_up_var(void*)'

5 variable symbol(s) added
  'atomic_long_t nr_swap_pages'
  'struct ww_class reservation_ww_class'
  'const struct dev_pm_ops usb_hcd_pci_pm_ops'
  'unsigned long usb_hcds_loaded'
  'const struct vb2_mem_ops vb2_dma_contig_memops'

Bug: 270670362
Change-Id: I8b3fd2b73ccc3ad91267515c647bc8242695fb52
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-02-27 11:32:18 +00:00
ChanWoo Lee
186b73e3d2 FROMGIT: scsi: ufs: ufs-mediatek: Remove unnecessary return code
Modify to remove unnecessary 'return 0' code.

Change-Id: I4d3c3e308e9acf9571d013d7c57f303f06f6f1cd
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
Link: https://lore.kernel.org/r/20221121003338.11034-1-cw9316.lee@samsung.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit d29c32efeb git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 23:07:36 +00:00
Charan Teja Reddy
73017e11a4 ANDROID: mm: add reclaim_shmem_address_space() for faster reclaims
Add the functionality that allow users of shmem to reclaim its pages
without going through the kswapd/direct reclaim path. An example usecase
is: Say that device allocates a larger amount of shmem pages and shares
it with hardware. To faster reclaims such pages, drivers can register
the shrinkers and call reclaim_shmem_address_space().

This commit is a squash of changes that contains all the fixes in the
reclaim_shmem_address_space() API.

Bug: 201263305
Change-Id: I03d2c3b9610612af977f89ddeabb63b8e9e50918
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
2023-02-23 22:51:35 +00:00
ChanWoo Lee
33ed2524ee FROMGIT: scsi: ufs: ufs-mediatek: Modify the return value
Be consistent with the rest of driver wrt. functions returning bool.

  91: 	return !!(host->caps & UFS_MTK_CAP_BOOST_CRYPT_ENGINE);
  98: 	return !!(host->caps & UFS_MTK_CAP_VA09_PWR_CTRL);
  105:	return !!(host->caps & UFS_MTK_CAP_BROKEN_VCC);

Change-Id: Ia0954d5ce13b0dabb886958850eb63745b92e062
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
Link: https://lore.kernel.org/r/20221118045242.2770-1-cw9316.lee@samsung.com
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 96a2dfa1df git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 18:36:54 +00:00
ChanWoo Lee
fb3ee331e0 FROMGIT: scsi: ufs: ufs-mediatek: Remove unneeded code
Remove unnecessary if/goto code.

Change-Id: I74ccbcb37fa5fced936832015afb3525ed9e501c
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
Link: https://lore.kernel.org/r/20221118044136.921-1-cw9316.lee@samsung.com
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 5415552853 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 18:36:54 +00:00
ChanWoo Lee
b30308f3f7 FROMGIT: scsi: ufs: core: Fix unnecessary operation for early return
Setting bitmap_len is not required when returning early. Defer until it is
needed.

Change-Id: I74dc52fc89427d23e96d070142c750d1f662d525
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
Link: https://lore.kernel.org/r/20221111062301.7423-1-cw9316.lee@samsung.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 222d227f37 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 18:26:43 +00:00
ChanWoo Lee
974aa27262 FROMGIT: scsi: ufs: core: Switch 'check_for_bkops' to bool
Only checks true and false so it can be converted to bool.

Change-Id: I7c0723987b3c703b8d19189f7d00b3ee7fcc12d0
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
Link: https://lore.kernel.org/r/20221111062209.7365-1-cw9316.lee@samsung.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 5277326d07 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 18:26:43 +00:00
ChanWoo Lee
5a7704daeb FROMGIT: scsi: ufs: core: Separate function name and message
Separate the function name and message to make it easier to check the log.
Modify messages to fit the format of others.

Change-Id: Ib772867acc2465715137b9047ec6cfad2be8787c
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
Link: https://lore.kernel.org/r/20221111062126.7307-1-cw9316.lee@samsung.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 859ed37c9c git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 18:26:43 +00:00
Bart Van Assche
6167e91d12 FROMGIT: scsi: ufs: core: Introduce ufshcd_abort_all()
Move the code for aborting all SCSI commands and TMFs into a new function.
This patch makes the ufshcd_err_handler() easier to read. Except for adding
more logging, this patch does not change any functionality.

Change-Id: I55c4c5ab2e0d98977ba74c57e249b0d9573c016a
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221031183433.2443554-1-bvanassche@acm.org
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b817e6ffba git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:54:33 +00:00
Keoseong Park
6736ee5ff1 FROMGIT: scsi: ufs: core: Refactor ufshcd_hba_enable()
Use "if error return" style in ufshcd_hba_enable().  No functional change.

Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Change-Id: Ie09f41d834bc7ed65d61bbc9c38af5c47196bfd2
Signed-off-by: Keoseong Park <keosung.park@samsung.com>
Link: https://lore.kernel.org/r/20221028073553epcms2p6dc4f8bdbebdc8f96f43fc4197b3edd0c@epcms2p6
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit bc77fb9ce4 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:54:33 +00:00
Bean Huo
a1b3bcf98d FROMGIT: scsi: ufs: core: Use is_visible to control UFS unit descriptor sysfs nodes
UFS Boot and Device W-LUs do not have unit descriptors and RPMB does not
support WB. Use is_visible() to control which nodes are visible and which
are not.

Change-Id: I24942df70a1d077fff291a23df9cbbd0d5e8f1df
Signed-off-by: Bean Huo <beanhuo@micron.com>
Link: https://lore.kernel.org/r/20221025222430.277768-4-beanhuo@iokpp.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Arthur Simchaev <arthur.simchaev@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 9d266e792b git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:44:21 +00:00
Bean Huo
a0de7900a4 FROMGIT: scsi: ufs: core: Clean up ufshcd_slave_alloc()
Combine ufshcd_get_lu_power_on_wp_status() and ufshcd_set_queue_depth()
into one single ufshcd_lu_init(), so that we only need to read the LUN
descriptor once.

Change-Id: I16a12cb5986bd32450586befe01fddc186fffd8c
Signed-off-by: Bean Huo <beanhuo@micron.com>
Link: https://lore.kernel.org/r/20221025222430.277768-3-beanhuo@iokpp.de
Reviewed-by: Arthur Simchaev <arthur.simchaev@wdc.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit dca899bc02 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:44:21 +00:00
Bean Huo
12cfa179ed FROMGIT: scsi: ufs: core: Revert "WB is only available on LUN #0 to #7"
Ccommit d3d9c45702 ("scsi: ufs: Fix memory corruption by
ufshcd_read_desc_param()") has properly fixed stack overflow issue.

As a result, commit a2fca52ee6 ("scsi: ufs: WB is only available on LUN

Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Change-Id: I503994b57d5c96b6104ac6cd4a99c79bd1fe4968
Signed-off-by: Bean Huo <beanhuo@micron.com>
Link: https://lore.kernel.org/r/20221025222430.277768-2-beanhuo@iokpp.de
Reviewed-by: Arthur Simchaev <arthur.simchaev@wdc.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b43678ea5b git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:37:20 +00:00
Chris Goldsworthy
45c6896387 ANDROID: ABI: Update QCOM symbol list
Add the following symbols in order to get info on processes.

4 function symbol(s) added
  'int cgroup_path_ns(struct cgroup*, char*, size_t, struct cgroup_namespace*)'
  'struct task_struct* find_task_by_vpid(pid_t)'
  'struct nlattr* nla_reserve_64bit(struct sk_buff*, int, int, int)'
  'pid_t pid_nr_ns(struct pid*, struct pid_namespace*)'

Bug: 233972073
Change-Id: I3ed02480b5e349562f2fe0f421d1d297db3c43d1
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-02-23 17:14:24 +00:00
Peter Wang
dca2221551 FROMGIT: scsi: ufs: core: Print events for WLUN suspend and resume failures
WLUN suspend and resume events are currently not handled by
ufshcd_print_evt_hist(). Add the missing events.

Change-Id: If5425432cfa5a1c1e1235b8aa7009632b2896c18
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Link: https://lore.kernel.org/r/20221024120602.30019-1-peter.wang@mediatek.com
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Asutosh Das <quic_asutoshd@quicinc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit a301d487d7 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:09:21 +00:00
Christoph Hellwig
0188abead5 FROMGIT: blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue
The fact that blk_mq_destroy_queue also drops a queue reference leads
to various places having to grab an extra reference.  Move the call to
blk_put_queue into the callers to allow removing the extra references.

Change-Id: Ic79ef3c0dbc005013f78c580aa27b5434f143bd9
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20221018135720.670094-2-hch@lst.de
[axboe: fix fabrics_q vs admin_q conflict in nvme core.c]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 2b3f056f72 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:09:21 +00:00
Bart Van Assche
06a25b851e FROMGIT: scsi: ufs: Introduce the function ufshcd_execute_start_stop()
Open-code scsi_execute() because a later patch will modify scmd->flags and
because scsi_execute() does not support setting scmd->flags. No
functionality is changed.

Change-Id: I235f7bef144f877266a9f103dcd74098c3327f91
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221018202958.1902564-10-bvanassche@acm.org
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 6a354a7e74 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:09:21 +00:00
Bart Van Assche
95af8a44d2 FROMGIT: scsi: ufs: Try harder to change the power mode
Instead of only retrying the START STOP UNIT command if a unit attention is
reported, repeat it if any SCSI error is reported by the device or if the
command timed out.

Change-Id: Icbf27c75ee9c48510533d802476a123ed0357c90
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221018202958.1902564-8-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 579a4e9dbd git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 17:09:21 +00:00
Guru Das Srinagesh
1750bb4088 ANDROID: ABI: Add scheduler-specific tracepoints to QCOM list
Add the following symbols:

  __traceiter_android_rvh_check_preempt_tick
  __traceiter_android_rvh_check_preempt_wakeup_ignore
  __traceiter_android_rvh_cpu_overutilized
  __traceiter_android_rvh_dequeue_entity
  __traceiter_android_rvh_dequeue_task
  __traceiter_android_rvh_dequeue_task_fair
  __traceiter_android_rvh_enqueue_entity
  __traceiter_android_rvh_enqueue_task
  __traceiter_android_rvh_enqueue_task_fair
  __traceiter_android_rvh_entity_tick
  __traceiter_android_rvh_find_busiest_group
  __traceiter_android_rvh_finish_prio_fork
  __traceiter_android_rvh_pick_next_entity
  __traceiter_android_rvh_place_entity
  __traceiter_android_rvh_prepare_prio_fork
  __traceiter_android_rvh_rtmutex_prepare_setprio
  __traceiter_android_rvh_sched_balance_rt
  __traceiter_android_rvh_sched_fork
  __traceiter_android_rvh_sched_rebalance_domains
  __traceiter_android_rvh_schedule_bug
  __traceiter_android_rvh_select_fallback_rq
  __traceiter_android_rvh_setscheduler
  __traceiter_android_rvh_set_user_nice
  __traceiter_android_rvh_uclamp_eff_get
  __traceiter_android_rvh_util_est_update
  __traceiter_android_vh_build_sched_domains
  __traceiter_android_vh_dump_throttled_rt_tasks
  __traceiter_android_vh_free_task
  __traceiter_android_vh_setscheduler_uclamp
  __tracepoint_android_rvh_check_preempt_tick
  __tracepoint_android_rvh_check_preempt_wakeup_ignore
  __tracepoint_android_rvh_cpu_overutilized
  __tracepoint_android_rvh_dequeue_entity
  __tracepoint_android_rvh_dequeue_task
  __tracepoint_android_rvh_dequeue_task_fair
  __tracepoint_android_rvh_enqueue_entity
  __tracepoint_android_rvh_enqueue_task
  __tracepoint_android_rvh_enqueue_task_fair
  __tracepoint_android_rvh_entity_tick
  __tracepoint_android_rvh_find_busiest_group
  __tracepoint_android_rvh_finish_prio_fork
  __tracepoint_android_rvh_pick_next_entity
  __tracepoint_android_rvh_place_entity
  __tracepoint_android_rvh_prepare_prio_fork
  __tracepoint_android_rvh_rtmutex_prepare_setprio
  __tracepoint_android_rvh_sched_balance_rt
  __tracepoint_android_rvh_sched_fork
  __tracepoint_android_rvh_sched_rebalance_domains
  __tracepoint_android_rvh_schedule_bug
  __tracepoint_android_rvh_select_fallback_rq
  __tracepoint_android_rvh_setscheduler
  __tracepoint_android_rvh_set_user_nice
  __tracepoint_android_rvh_uclamp_eff_get
  __tracepoint_android_rvh_util_est_update
  __tracepoint_android_vh_build_sched_domains
  __tracepoint_android_vh_dump_throttled_rt_tasks
  __tracepoint_android_vh_free_task
  __tracepoint_android_vh_setscheduler_uclamp

Bug: 270242311
Change-Id: I9df60220f88ba5979d07f7bdf9fdf01e0cb01ced
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2023-02-23 13:39:15 +00:00
Will Deacon
3e8fa2c041 ANDROID: modpost: Don't complain about empty non-allocatable ELF sections
Depending upon the toolchain, empty ELF sections in the object files
of a hypervisor module can be emitted with unusual flags such as
"Writeable, non-allocatable" which modpost gets grumpy about:

  | WARNING: modpost: drivers/misc/pkvm-pl011/pkvm_pl011.o (.hyp.rodata): unexpected non-allocatable section.

Since these sections are empty, whether or not they are allocatable is
not of any concern to the module loader, so adjust the check in modpost
to quietly tolerate this insanity.

Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 269245057
Change-Id: I6bf0ccdb1c0440b0a117ea0a0949aff47f7ccadb
2023-02-23 10:36:51 +00:00
Bart Van Assche
8f07b7dc97 FROMGIT: scsi: ufs: Use 'else' in ufshcd_set_dev_pwr_mode()
Convert if (ret) { ... } if (!ret) { ... } into
if (ret) { ... } else { ... }.

Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Change-Id: I26c213012452b4489be2c8d2914c472aac53f332
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221018202958.1902564-6-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 836d322d73 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 01:02:57 +00:00
Bart Van Assche
e590fcc2e0 FROMGIT: scsi: ufs: Remove an outdated comment
Although the host lock had to be held by ufshcd_clk_scaling_start_busy()
callers when that function was introduced, that is no longer the case
today. Hence remove the comment that claims that callers of this function
must hold the host lock.

Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Change-Id: Ia7e828b4f0e767e04d39a47bf40f6a809834f188
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221018202958.1902564-5-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 1626c7bba1 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 01:02:57 +00:00
Bart Van Assche
32b7f5cde9 FROMGIT: scsi: ufs: Simplify ufshcd_set_dev_pwr_mode()
Simplify the code for incrementing the SCSI device reference count in
ufshcd_set_dev_pwr_mode(). This commit removes one scsi_device_put() call
that happens from atomic context.

Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Avri Altman <avri.altman@wdc.com>
Change-Id: I3cc9bfa289530ef8e3c39e67cc2a8bf6b913cb2f
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221015002418.30955-7-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 6d1aa3b058 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-23 01:02:57 +00:00
Prasad Sodagudi
a065fa8bfe ANDROID: pstore/ram: Add backward compatibility for ramoops reserved region
Some of the platforms might be still expecting dedicated memory region
for ramoops node. So add logic to detect the start and size of the
ramoops memory region by looking up reserved memory region with
of_reserved_mem_lookup() when platform_get_resource() failed.

Bug: 191636717
Change-Id: Idc479b45fb3f637f7235efd6eabac62059d5e92b
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
(cherry picked from commit 9b136eab76)
2023-02-22 20:23:47 +00:00
Isaac J. Manjarres
d9bddef6fc FROMLIST: pstore/ram: Rework logic for detecting ramoops reserved memory region
The reserved memory region for ramoops is assumed to be at a fixed
and known location when read from the devicetree. This is not desirable
in environments where it is preferred for the region to be dynamically
allocated at runtime, as opposed to it being fixed at compile time.

Change the logic for detecting the start and size of the ramoops
memory region by looking up the reserved memory region instead of
using platform_get_resource(), which assumes that the location
of the memory is known ahead of time.

Bug: 191636717
Link: https://lore.kernel.org/patchwork/patch/1451704/
Change-Id: I24066de9f4fe1f1575cb1bbb1687c37a2b1938a4
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
(cherry picked from commit bd2ca0ba5b)
2023-02-22 20:23:47 +00:00
Paul Lawrence
ae068d4b32 ANDROID: incremental fs: Move throttling to outside page lock
Bug: 241479010
Test: incfs_test passes, play confirm behavior in bug is fixed
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ie51f2b76d0873057f54fecf7fcc793c66df20969
2023-02-22 19:22:01 +00:00
Paul Lawrence
96e377f2cd ANDROID: incremental fs: Fix race between truncate and write last block
Also fix race whereby multiple providers writinig the same block would
actually write out the same block.

Note that multiple_providers_test started failing when incfs was ported
to 5.15, and these fixes are needed to make the test reliable

Bug: 264703896
Test: incfs-test passes, specifically multiple_providers_test. Ran 100
      times
Change-Id: I05ad5b2b2f62cf218256222cecb79bbe9953bd97
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2023-02-22 19:22:01 +00:00
Alice Chao
1b6a307d82 ANDROID: ufs: Add vendor hook for ufs sdev update
Add android vendor hook: android_vh_ufs_update_sdev()
- To notify ufs driver on sdev added

Bug: 269427233
Change-Id: I0fadcdfe39ce7777929c5f457b67d5c830522be3
Signed-off-by: Alice Chao <alice.chao@mediatek.com>
2023-02-22 18:25:44 +00:00
Kalesh Singh
cdded86118 ANDROID: MGLRU: Don't skip anon reclaim if swap low
MGLRU tries to avoid doing unnecessary anon reclaim work if swap is
low by checking if the available swap is less than the MIN_BATCH_SIZE
(256kB). This can lead to unintened consequences where PSI pressure is
less and LMKD doesn't wake up in time to avoid file cache thrashing.

Remove this check to preserve the old bahavior. This can be improved
later on once we have a low swap notification event from the kernel.

Bug: 268574308
Change-Id: Id381316931a9cf6e7ea8b1ea7800c77f176c9892
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-02-22 17:17:07 +00:00
Vincent Donnefort
1646655d88 ANDROID: KVM: arm64: Addr sanity check for pKVM HVC registration
Use the assert_in_mod_range() to validate the registered callback is
part of a module VA space. This feature requires CONFIG_NVHE_EL2_DEBUG.

Bug: 269245057
Change-Id: I4c4d60ac77882fc2d36c3c73b096f4ba9afb83e5
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-02-22 17:06:47 +00:00
Guru Das Srinagesh
3671b1b88c ANDROID: ABI: Update QCOM symbol list
Add the following symbols to the symbol list:

  - irq_do_set_affinity
  - __traceiter_android_rvh_gic_v3_set_affinity
  - __tracepoint_android_rvh_gic_v3_set_affinity

Bug: 269786647
Change-Id: I5e081606476f3eea727dd7ec94e6290a7ce1acc1
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2023-02-22 15:16:48 +00:00
Greg Kroah-Hartman
dafc2fae4d Merge 6.1.13 into android14-6.1
Changes in 6.1.13
	mptcp: sockopt: make 'tcp_fastopen_connect' generic
	mptcp: fix locking for setsockopt corner-case
	mptcp: deduplicate error paths on endpoint creation
	mptcp: fix locking for in-kernel listener creation
	btrfs: move the auto defrag code to defrag.c
	btrfs: lock the inode in shared mode before starting fiemap
	ASoC: amd: yc: Add DMI support for new acer/emdoor platforms
	ASoC: SOF: sof-audio: start with the right widget type
	ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum610 Wireless
	ASoC: Intel: sof_rt5682: always set dpcm_capture for amplifiers
	ASoC: Intel: sof_cs42l42: always set dpcm_capture for amplifiers
	ASoC: Intel: sof_nau8825: always set dpcm_capture for amplifiers
	ASoC: Intel: sof_ssp_amp: always set dpcm_capture for amplifiers
	selftests/bpf: Verify copy_register_state() preserves parent/live fields
	ALSA: hda: Do not unset preset when cleaning up codec
	ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022 into DMI table
	bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself
	ASoC: cs42l56: fix DT probe
	tools/virtio: fix the vringh test for virtio ring changes
	vdpa: ifcvf: Do proper cleanup if IFCVF init fails
	net/rose: Fix to not accept on connected socket
	selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility
	net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC
	powerpc/64: Fix perf profiling asynchronous interrupt handlers
	fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work()
	drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETED
	net: ethernet: mtk_eth_soc: Avoid truncating allocation
	net: sched: sch: Bounds check priority
	s390/decompressor: specify __decompress() buf len to avoid overflow
	nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association
	nvme: clear the request_queue pointers on failure in nvme_alloc_admin_tag_set
	nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set
	drm/amd/display: Add missing brackets in calculation
	drm/amd/display: Adjust downscaling limits for dcn314
	drm/amd/display: Unassign does_plane_fit_in_mall function from dcn3.2
	drm/amd/display: Reset DMUB mailbox SW state after HW reset
	drm/amdgpu: enable HDP SD for gfx 11.0.3
	drm/amdgpu: Enable vclk dclk node for gc11.0.3
	drm/amd/display: Properly handle additional cases where DCN is not supported
	platform/x86: touchscreen_dmi: Add Chuwi Vi8 (CWI501) DMI match
	ceph: move mount state enum to super.h
	ceph: blocklist the kclient when receiving corrupted snap trace
	selftests: mptcp: userspace: fix v4-v6 test in v6.1
	of: reserved_mem: Have kmemleak ignore dynamically allocated reserved mem
	kasan: fix Oops due to missing calls to kasan_arch_is_ready()
	mm: shrinkers: fix deadlock in shrinker debugfs
	aio: fix mremap after fork null-deref
	vmxnet3: move rss code block under eop descriptor
	fbdev: Fix invalid page access after closing deferred I/O devices
	drm: Disable dynamic debug as broken
	drm/amd/amdgpu: fix warning during suspend
	drm/amd/display: Fail atomic_check early on normalize_zpos error
	drm/vmwgfx: Stop accessing buffer objects which failed init
	drm/vmwgfx: Do not drop the reference to the handle too soon
	mmc: jz4740: Work around bug on JZ4760(B)
	mmc: meson-gx: fix SDIO mode if cap_sdio_irq isn't set
	mmc: sdio: fix possible resource leaks in some error paths
	mmc: mmc_spi: fix error handling in mmc_spi_probe()
	ALSA: hda: Fix codec device field initializan
	ALSA: hda/conexant: add a new hda codec SN6180
	ALSA: hda/realtek - fixed wrong gpio assigned
	ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform.
	ALSA: hda/realtek: Enable mute/micmute LEDs and speaker support for HP Laptops
	ata: ahci: Add Tiger Lake UP{3,4} AHCI controller
	ata: libata-core: Disable READ LOG DMA EXT for Samsung MZ7LH
	sched/psi: Fix use-after-free in ep_remove_wait_queue()
	hugetlb: check for undefined shift on 32 bit architectures
	nilfs2: fix underflow in second superblock position calculations
	mm/MADV_COLLAPSE: set EAGAIN on unexpected page refcount
	mm/filemap: fix page end in filemap_get_read_batch
	mm/migrate: fix wrongly apply write bit after mkdirty on sparc64
	gpio: sim: fix a memory leak
	freezer,umh: Fix call_usermode_helper_exec() vs SIGKILL
	coredump: Move dump_emit_page() to kill unused warning
	Revert "mm: Always release pages to the buddy allocator in memblock_free_late()."
	net: Fix unwanted sign extension in netdev_stats_to_stats64()
	revert "squashfs: harden sanity check in squashfs_read_xattr_id_table"
	drm/vc4: crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking
	drm/vc4: Fix YUV plane handling when planes are in different buffers
	drm/i915/gen11: Wa_1408615072/Wa_1407596294 should be on GT list
	ice: fix lost multicast packets in promisc mode
	ixgbe: allow to increase MTU to 3K with XDP enabled
	i40e: add double of VLAN header when computing the max MTU
	net: bgmac: fix BCM5358 support by setting correct flags
	net: ethernet: ti: am65-cpsw: Add RX DMA Channel Teardown Quirk
	sctp: sctp_sock_filter(): avoid list_entry() on possibly empty list
	net/sched: tcindex: update imperfect hash filters respecting rcu
	ice: xsk: Fix cleaning of XDP_TX frames
	dccp/tcp: Avoid negative sk_forward_alloc by ipv6_pinfo.pktoptions.
	net/usb: kalmia: Don't pass act_len in usb_bulk_msg error path
	net/sched: act_ctinfo: use percpu stats
	net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()
	net: stmmac: fix order of dwmac5 FlexPPS parametrization sequence
	bnxt_en: Fix mqprio and XDP ring checking logic
	tracing: Make trace_define_field_ext() static
	net: stmmac: Restrict warning on disabling DMA store and fwd mode
	net: use a bounce buffer for copying skb->mark
	tipc: fix kernel warning when sending SYN message
	net: mpls: fix stale pointer if allocation fails during device rename
	igb: conditionalize I2C bit banging on external thermal sensor support
	igb: Fix PPS input and output using 3rd and 4th SDP
	ixgbe: add double of VLAN header when computing the max MTU
	ipv6: Fix datagram socket connection with DSCP.
	ipv6: Fix tcp socket connection with DSCP.
	mm/gup: add folio to list when folio_isolate_lru() succeed
	mm: extend max struct page size for kmsan
	i40e: Add checking for null for nlmsg_find_attr()
	net/sched: tcindex: search key must be 16 bits
	nvme-tcp: stop auth work after tearing down queues in error recovery
	nvme-rdma: stop auth work after tearing down queues in error recovery
	KVM: x86/pmu: Disable vPMU support on hybrid CPUs (host PMUs)
	kvm: initialize all of the kvm_debugregs structure before sending it to userspace
	perf/x86: Refuse to export capabilities for hybrid PMUs
	alarmtimer: Prevent starvation by small intervals and SIG_IGN
	nvme-pci: refresh visible attrs for cmb attributes
	ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak
	net: sched: sch: Fix off by one in htb_activate_prios()
	Linux 6.1.13

Change-Id: I8a1e4175939c14f726c545001061b95462566386
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-02-22 12:32:41 +00:00
Greg Kroah-Hartman
1ac8758e02 Linux 6.1.13
Link: https://lore.kernel.org/r/20230220133600.368809650@linuxfoundation.org
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:56 +01:00
Dan Carpenter
4419cb8e5b net: sched: sch: Fix off by one in htb_activate_prios()
commit 9cec2aaffe upstream.

The > needs be >= to prevent an out of bounds access.

Fixes: de5ca4c385 ("net: sched: sch: Bounds check priority")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/Y+D+KN18FQI2DKLq@kili
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:56 +01:00
Pierre-Louis Bossart
0c89a43beb ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak
commit 1f810d2b6b upstream.

The HDaudio stream allocation is done first, and in a second step the
LOSIDV parameter is programmed for the multi-link used by a codec.

This leads to a possible stream_tag leak, e.g. if a DisplayAudio link
is not used. This would happen when a non-Intel graphics card is used
and userspace unconditionally uses the Intel Display Audio PCMs without
checking if they are connected to a receiver with jack controls.

We should first check that there is a valid multi-link entry to
configure before allocating a stream_tag. This change aligns the
dma_assign and dma_cleanup phases.

Complements: b0cd60f3e9 ("ALSA/ASoC: hda: clarify bus_get_link() and bus_link_get() helpers")
Link: https://github.com/thesofproject/linux/issues/4151
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230216162340.19480-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:56 +01:00
Keith Busch
02f81e0256 nvme-pci: refresh visible attrs for cmb attributes
commit e917a849c3 upstream.

The sysfs group containing the cmb attributes is registered before the
driver knows if they need to be visible or not. Update the group when
cmb attributes are known to exist so the visibility setting is correct.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217037
Fixes: 86adbf0cdb ("nvme: simplify transport specific device attribute handling")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:56 +01:00
Thomas Gleixner
70fdd9831a alarmtimer: Prevent starvation by small intervals and SIG_IGN
commit d125d1349a upstream.

syzbot reported a RCU stall which is caused by setting up an alarmtimer
with a very small interval and ignoring the signal. The reproducer arms the
alarm timer with a relative expiry of 8ns and an interval of 9ns. Not a
problem per se, but that's an issue when the signal is ignored because then
the timer is immediately rearmed because there is no way to delay that
rearming to the signal delivery path.  See posix_timer_fn() and commit
58229a1899 ("posix-timers: Prevent softirq starvation by small intervals
and SIG_IGN") for details.

The reproducer does not set SIG_IGN explicitely, but it sets up the timers
signal with SIGCONT. That has the same effect as explicitely setting
SIG_IGN for a signal as SIGCONT is ignored if there is no handler set and
the task is not ptraced.

The log clearly shows that:

   [pid  5102] --- SIGCONT {si_signo=SIGCONT, si_code=SI_TIMER, si_timerid=0, si_overrun=316014, si_int=0, si_ptr=NULL} ---

It works because the tasks are traced and therefore the signal is queued so
the tracer can see it, which delays the restart of the timer to the signal
delivery path. But then the tracer is killed:

   [pid  5087] kill(-5102, SIGKILL <unfinished ...>
   ...
   ./strace-static-x86_64: Process 5107 detached

and after it's gone the stall can be observed:

   syzkaller login: [   79.439102][    C0] hrtimer: interrupt took 68471 ns
   [  184.460538][    C1] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
   ...
   [  184.658237][    C1] rcu: Stack dump where RCU GP kthread last ran:
   [  184.664574][    C1] Sending NMI from CPU 1 to CPUs 0:
   [  184.669821][    C0] NMI backtrace for cpu 0
   [  184.669831][    C0] CPU: 0 PID: 5108 Comm: syz-executor192 Not tainted 6.2.0-rc6-next-20230203-syzkaller #0
   ...
   [  184.670036][    C0] Call Trace:
   [  184.670041][    C0]  <IRQ>
   [  184.670045][    C0]  alarmtimer_fired+0x327/0x670

posix_timer_fn() prevents that by checking whether the interval for
timers which have the signal ignored is smaller than a jiffie and
artifically delay it by shifting the next expiry out by a jiffie. That's
accurate vs. the overrun accounting, but slightly inaccurate
vs. timer_gettimer(2).

The comment in that function says what needs to be done and there was a fix
available for the regular userspace induced SIG_IGN mechanism, but that did
not work due to the implicit ignore for SIGCONT and similar signals. This
needs to be worked on, but for now the only available workaround is to do
exactly what posix_timer_fn() does:

Increase the interval of self-rearming timers, which have their signal
ignored, to at least a jiffie.

Interestingly this has been fixed before via commit ff86bf0c65
("alarmtimer: Rate limit periodic intervals") already, but that fix got
lost in a later rework.

Reported-by: syzbot+b9564ba6e8e00694511b@syzkaller.appspotmail.com
Fixes: f2c45807d3 ("alarmtimer: Switch over to generic set/get/rearm routine")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/87k00q1no2.ffs@tglx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:55 +01:00
Sean Christopherson
cfc2faf3a6 perf/x86: Refuse to export capabilities for hybrid PMUs
commit 4b4191b8ae upstream.

Now that KVM disables vPMU support on hybrid CPUs, WARN and return zeros
if perf_get_x86_pmu_capability() is invoked on a hybrid CPU.  The helper
doesn't provide an accurate accounting of the PMU capabilities for hybrid
CPUs and needs to be enhanced if KVM, or anything else outside of perf,
wants to act on the PMU capabilities.

Cc: stable@vger.kernel.org
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: https://lore.kernel.org/all/20220818181530.2355034-1-kan.liang@linux.intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230208204230.1360502-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:55 +01:00
Greg Kroah-Hartman
747ca7c8a0 kvm: initialize all of the kvm_debugregs structure before sending it to userspace
commit 2c10b61421 upstream.

When calling the KVM_GET_DEBUGREGS ioctl, on some configurations, there
might be some unitialized portions of the kvm_debugregs structure that
could be copied to userspace.  Prevent this as is done in the other kvm
ioctls, by setting the whole structure to 0 before copying anything into
it.

Bonus is that this reduces the lines of code as the explicit flag
setting and reserved space zeroing out can be removed.

Cc: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: <x86@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: stable <stable@kernel.org>
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Message-Id: <20230214103304.3689213-1-gregkh@linuxfoundation.org>
Tested-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:55 +01:00
Sean Christopherson
9ca0910b2d KVM: x86/pmu: Disable vPMU support on hybrid CPUs (host PMUs)
commit 4d7404e5ee upstream.

Disable KVM support for virtualizing PMUs on hosts with hybrid PMUs until
KVM gains a sane way to enumeration the hybrid vPMU to userspace and/or
gains a mechanism to let userspace opt-in to the dangers of exposing a
hybrid vPMU to KVM guests.  Virtualizing a hybrid PMU, or at least part of
a hybrid PMU, is possible, but it requires careful, deliberate
configuration from userspace.

E.g. to expose full functionality, vCPUs need to be pinned to pCPUs to
prevent migrating a vCPU between a big core and a little core, userspace
must enumerate a reasonable topology to the guest, and guest CPUID must be
curated per vCPU to enumerate accurate vPMU capabilities.

The last point is especially problematic, as KVM doesn't control which
pCPU it runs on when enumerating KVM's vPMU capabilities to userspace,
i.e. userspace can't rely on KVM_GET_SUPPORTED_CPUID in it's current form.

Alternatively, userspace could enable vPMU support by enumerating the
set of features that are common and coherent across all cores, e.g. by
filtering PMU events and restricting guest capabilities.  But again, that
requires userspace to take action far beyond reflecting KVM's supported
feature set into the guest.

For now, simply disable vPMU support on hybrid CPUs to avoid inducing
seemingly random #GPs in guests, and punt support for hybrid CPUs to a
future enabling effort.

Reported-by: Jianfeng Gao <jianfeng.gao@intel.com>
Cc: stable@vger.kernel.org
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: https://lore.kernel.org/all/20220818181530.2355034-1-kan.liang@linux.intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230208204230.1360502-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:55 +01:00
Sagi Grimberg
8017a161e8 nvme-rdma: stop auth work after tearing down queues in error recovery
[ Upstream commit 91c11d5f32 ]

when starting error recovery there might be a authentication work
running, and it involves I/O commands. Given the controller is tearing
down there is no chance for the I/O to complete other than timing out
which may unnecessarily take a full io timeout.

So first tear down the queues, fail/cancel all inflight I/O (including
potentially authentication) and only then stop authentication. This
ensures that failover is not stalled due to blocked authentication I/O.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-22 12:59:55 +01:00
Sagi Grimberg
e94e1ea596 nvme-tcp: stop auth work after tearing down queues in error recovery
[ Upstream commit 1f1a4f8956 ]

when starting error recovery there might be a authentication work
running, and it involves I/O commands. Given the controller is tearing
down there is no chance for the I/O to complete other than timing out
which may unnecessarily take a full io timeout.

So first tear down the queues, fail/cancel all inflight I/O (including
potentially authentication) and only then stop authentication. This
ensures that failover is not stalled due to blocked authentication I/O.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-22 12:59:55 +01:00
Pedro Tammela
513e4b876e net/sched: tcindex: search key must be 16 bits
[ Upstream commit 42018a322b ]

Syzkaller found an issue where a handle greater than 16 bits would trigger
a null-ptr-deref in the imperfect hash area update.

general protection fault, probably for non-canonical address
0xdffffc0000000015: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000000a8-0x00000000000000af]
CPU: 0 PID: 5070 Comm: syz-executor456 Not tainted
6.2.0-rc7-syzkaller-00112-gc68f345b7c42 #0
Hardware name: Google Google Compute Engine/Google Compute Engine,
BIOS Google 01/21/2023
RIP: 0010:tcindex_set_parms+0x1a6a/0x2990 net/sched/cls_tcindex.c:509
Code: 01 e9 e9 fe ff ff 4c 8b bd 28 fe ff ff e8 0e 57 7d f9 48 8d bb
a8 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c
02 00 0f 85 94 0c 00 00 48 8b 85 f8 fd ff ff 48 8b 9b a8 00
RSP: 0018:ffffc90003d3ef88 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000015 RSI: ffffffff8803a102 RDI: 00000000000000a8
RBP: ffffc90003d3f1d8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88801e2b10a8
R13: dffffc0000000000 R14: 0000000000030000 R15: ffff888017b3be00
FS: 00005555569af300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056041c6d2000 CR3: 000000002bfca000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
tcindex_change+0x1ea/0x320 net/sched/cls_tcindex.c:572
tc_new_tfilter+0x96e/0x2220 net/sched/cls_api.c:2155
rtnetlink_rcv_msg+0x959/0xca0 net/core/rtnetlink.c:6132
netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942
sock_sendmsg_nosec net/socket.c:714 [inline]
sock_sendmsg+0xd3/0x120 net/socket.c:734
____sys_sendmsg+0x334/0x8c0 net/socket.c:2476
___sys_sendmsg+0x110/0x1b0 net/socket.c:2530
__sys_sendmmsg+0x18f/0x460 net/socket.c:2616
__do_sys_sendmmsg net/socket.c:2645 [inline]
__se_sys_sendmmsg net/socket.c:2642 [inline]
__x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2642
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80

Fixes: ee059170b1 ("net/sched: tcindex: update imperfect hash filters respecting rcu")
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-22 12:59:55 +01:00
Natalia Petrova
49f04300d4 i40e: Add checking for null for nlmsg_find_attr()
[ Upstream commit 7fa0b526f8 ]

The result of nlmsg_find_attr() 'br_spec' is dereferenced in
nla_for_each_nested(), but it can take NULL value in nla_find() function,
which will result in an error.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 51616018dd ("i40e: Add support for getlink, setlink ndo ops")
Signed-off-by: Natalia Petrova <n.petrova@fintech.ru>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20230209172833.3596034-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-22 12:59:54 +01:00
Arnd Bergmann
974cfed82c mm: extend max struct page size for kmsan
commit 3770e52fd4 upstream.

After x86 enabled support for KMSAN, it has become possible to have larger
'struct page' than was expected when commit 5470dea49f ("mm: use
mm_zero_struct_page from SPARC on all 64b architectures") was merged:

include/linux/mm.h:156:10: warning: no case matching constant switch condition '96'
        switch (sizeof(struct page)) {

Extend the maximum accordingly.

Link: https://lkml.kernel.org/r/20230130130739.563628-1-arnd@kernel.org
Fixes: 5470dea49f ("mm: use mm_zero_struct_page from SPARC on all 64b architectures")
Fixes: 4ca8cc8d1b ("x86: kmsan: enable KMSAN builds for x86")
Fixes: f80be4571b ("kmsan: add KMSAN runtime core")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Alex Sierra <alex.sierra@amd.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:54 +01:00
Kuan-Ying Lee
eaba8521fd mm/gup: add folio to list when folio_isolate_lru() succeed
commit aa1e6a932c upstream.

If we call folio_isolate_lru() successfully, we will get return value 0.
We need to add this folio to the movable_pages_list.

Link: https://lkml.kernel.org/r/20230131063206.28820-1-Kuan-Ying.Lee@mediatek.com
Fixes: 67e139b02d ("mm/gup.c: refactor check_and_migrate_movable_pages()")
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Reviewed-by: Alistair Popple <apopple@nvidia.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Andrew Yang <andrew.yang@mediatek.com>
Cc: Chinwen Chang <chinwen.chang@mediatek.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:54 +01:00
Guillaume Nault
f16e2f7c52 ipv6: Fix tcp socket connection with DSCP.
commit 8230680f36 upstream.

Take into account the IPV6_TCLASS socket option (DSCP) in
tcp_v6_connect(). Otherwise fib6_rule_match() can't properly
match the DSCP value, resulting in invalid route lookup.

For example:

  ip route add unreachable table main 2001:db8::10/124

  ip route add table 100 2001:db8::10/124 dev eth0
  ip -6 rule add dsfield 0x04 table 100

  echo test | socat - TCP6:[2001:db8::11]:54321,ipv6-tclass=0x04

Without this patch, socat fails at connect() time ("No route to host")
because the fib-rule doesn't jump to table 100 and the lookup ends up
being done in the main table.

Fixes: 2cc67cc731 ("[IPV6] ROUTE: Routing by Traffic Class.")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:54 +01:00
Guillaume Nault
22e6dc0653 ipv6: Fix datagram socket connection with DSCP.
commit e010ae08c7 upstream.

Take into account the IPV6_TCLASS socket option (DSCP) in
ip6_datagram_flow_key_init(). Otherwise fib6_rule_match() can't
properly match the DSCP value, resulting in invalid route lookup.

For example:

  ip route add unreachable table main 2001:db8::10/124

  ip route add table 100 2001:db8::10/124 dev eth0
  ip -6 rule add dsfield 0x04 table 100

  echo test | socat - UDP6:[2001:db8::11]:54321,ipv6-tclass=0x04

Without this patch, socat fails at connect() time ("No route to host")
because the fib-rule doesn't jump to table 100 and the lookup ends up
being done in the main table.

Fixes: 2cc67cc731 ("[IPV6] ROUTE: Routing by Traffic Class.")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:54 +01:00
Jason Xing
b6eabfb05c ixgbe: add double of VLAN header when computing the max MTU
commit 0967bf8377 upstream.

Include the second VLAN HLEN into account when computing the maximum
MTU size as other drivers do.

Fixes: fabf1bce10 ("ixgbe: Prevent unsupported configurations with XDP")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:54 +01:00
Miroslav Lichvar
55c96c5e8e igb: Fix PPS input and output using 3rd and 4th SDP
commit 207ce626ad upstream.

Fix handling of the tsync interrupt to compare the pin number with
IGB_N_SDP instead of IGB_N_EXTTS/IGB_N_PEROUT and fix the indexing to
the perout array.

Fixes: cf99c1dd7b ("igb: move PEROUT and EXTTS isr logic to separate functions")
Reported-by: Matt Corallo <ntp-lists@mattcorallo.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20230213185822.3960072-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:54 +01:00