Commit Graph

1067648 Commits

Author SHA1 Message Date
Arve Hjønnevåg
12d161b7ae FROMLIST: sched/wait: Fix a kthread_park race with wait_woken()
kthread_park and wait_woken have a similar race that kthread_stop and
wait_woken used to have before it was fixed in
cb6538e740. Extend that fix to also cover
kthread_park.

Bug: 274686101
Link: https://lore.kernel.org/lkml/20230406194053.876844-1-arve@android.com/
Change-Id: Iaec960d7e30862f4ccac5c98dd43d32bbcf9a72b
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 69eba53950444890063b1e0469a61b69f8301767)
2023-04-14 21:07:17 +00:00
Badhri Jagan Sridharan
3d9d54cf37 ANDROID: Update the ABI symbol list typec mux
2 function symbol(s) added
  'void* typec_mux_get_drvdata(struct typec_mux*)'
  'struct typec_mux* typec_mux_register(struct device*, const struct typec_mux_desc*)'

Bug: 260915739
Change-Id: Ic3113c5cb932002c55674a565d3db9539669238d
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
2023-04-14 15:22:31 +00:00
Badhri Jagan Sridharan
0d708da1f5 ANDROID: Update the ABI symbol list typec port management
2 function symbol(s) added
  'void tcpm_port_clean(struct tcpm_port*)'
  'bool tcpm_port_is_toggling(struct tcpm_port*)'

Bug: 215766959
Change-Id: Iffaa5ac3a4af04d70d473d11de975c887450f702
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
2023-04-13 21:26:14 +00:00
Qinglin Li
9d04dbf3ec ANDROID: GKI: Add usb and pcie ABI Symbol list for Amlogic SOC
Add usb and pcie ABI Symbol list for Amlogic SOC

31 function symbol(s) added
  'int __uio_register_device(struct module*, struct device*, struct uio_info*)'
  'void* devm_pci_remap_cfg_resource(struct device*, struct resource*)'
  'struct usb_phy* devm_usb_get_phy(struct device*, enum usb_phy_type)'
  'void dw_pcie_host_deinit(struct pcie_port*)'
  'int dw_pcie_wait_for_link(struct dw_pcie*)'
  'int generic_file_open(struct inode*, struct file*)'
  'ssize_t generic_file_splice_read(struct file*, loff_t*, struct pipe_inode_info*, size_t, unsigned int)'
  'void generic_fillattr(struct user_namespace*, struct inode*, struct kstat*)'
  'int get_tree_bdev(struct fs_context*, int(*)(struct super_block*, struct fs_context*))'
  'loff_t inode_get_bytes(struct inode*)'
  'void inode_set_bytes(struct inode*, loff_t)'
  'void invalidate_bdev(struct block_device*)'
  'ssize_t iter_file_splice_write(struct pipe_inode_info*, struct file*, loff_t*, size_t, unsigned int)'
  'void kill_block_super(struct super_block*)'
  'struct nls_table* load_nls_default()'
  'char* mangle_path(char*, const char*, const char*)'
  'struct pci_bus* pci_find_next_bus(const struct pci_bus*)'
  'void pci_lock_rescan_remove()'
  'void pci_stop_and_remove_bus_device_locked(struct pci_dev*)'
  'void pci_unlock_rescan_remove()'
  'int posix_acl_chmod(struct user_namespace*, struct inode*, umode_t)'
  'void* proc_get_parent_data(const struct inode*)'
  'int sb_set_blocksize(struct super_block*, int)'
  'int sync_blockdev(struct block_device*)'
  'int sync_filesystem(struct super_block*)'
  'void uio_unregister_device(struct uio_info*)'
  'void unload_nls(struct nls_table*)'
  'int usb_add_phy_dev(struct usb_phy*)'
  'int usb_gadget_probe_driver(struct usb_gadget_driver*)'
  'int usb_gadget_unregister_driver(struct usb_gadget_driver*)'
  'int vfs_fsync(struct file*, int)'

Bug: 276863283
Change-Id: I42d5006236004fade1b03772ee1151b3de491ab1
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
f9bf714530 ANDROID: GKI: Add file system ABI Symbol list for Amlogic SOC
Add file system ABI Symbol list for Amlogic SOC

69 function symbol(s) added
  'int __fs_parse(struct p_log*, const struct fs_parameter_spec*, struct fs_parameter*, struct fs_parse_result*)'
  'struct buffer_head* __getblk_gfp(struct block_device*, sector_t, unsigned int, gfp_t)'
  'void __lock_buffer(struct buffer_head*)'
  'void __mark_inode_dirty(struct inode*, int)'
  'int __set_page_dirty_buffers(struct page*)'
  'void __wait_on_buffer(struct buffer_head*)'
  'struct dentry* d_find_alias(struct inode*)'
  'void d_instantiate(struct dentry*, struct inode*)'
  'struct dentry* d_make_root(struct inode*)'
  'struct dentry* d_obtain_alias(struct inode*)'
  'struct dentry* d_splice_alias(struct inode*, struct dentry*)'
  'char* dentry_path_raw(const struct dentry*, char*, int)'
  'void discard_new_inode(struct inode*)'
  'void dput(struct dentry*)'
  'void drop_nlink(struct inode*)'
  'void end_buffer_read_sync(struct buffer_head*, int)'
  'int fiemap_fill_next_extent(struct fiemap_extent_info*, u64, u64, u64, u32)'
  'int fiemap_prep(struct inode*, struct fiemap_extent_info*, u64, u64*, u32)'
  'int file_remove_privs(struct file*)'
  'int file_update_time(struct file*)'
  'int fs_param_is_string(struct p_log*, const struct fs_parameter_spec*, struct fs_parameter*, struct fs_parse_result*)'
  'int fs_param_is_u32(struct p_log*, const struct fs_parameter_spec*, struct fs_parameter*, struct fs_parse_result*)'
  'sector_t generic_block_bmap(struct address_space*, sector_t, get_block_t*)'
  'struct dentry* generic_fh_to_dentry(struct super_block*, struct fid*, int, int, struct inode*(*)(struct super_block*, u64, u32))'
  'struct dentry* generic_fh_to_parent(struct super_block*, struct fid*, int, int, struct inode*(*)(struct super_block*, u64, u32))'
  'int generic_file_fsync(struct file*, loff_t, loff_t, int)'
  'int generic_permission(struct user_namespace*, struct inode*, int)'
  'ssize_t generic_read_dir(struct file*, char*, size_t, loff_t*)'
  'int generic_write_end(struct file*, struct address_space*, loff_t, unsigned int, unsigned int, struct page*, void*)'
  'struct inode* iget5_locked(struct super_block*, unsigned long, int(*)(struct inode*, void*), int(*)(struct inode*, void*), void*)'
  'void iget_failed(struct inode*)'
  'void ihold(struct inode*)'
  'struct inode* ilookup(struct super_block*, unsigned long)'
  'void inc_nlink(struct inode*)'
  'void init_special_inode(struct inode*, umode_t, dev_t)'
  'void inode_dio_wait(struct inode*)'
  'void inode_init_once(struct inode*)'
  'void inode_init_owner(struct user_namespace*, struct inode*, const struct inode*, umode_t)'
  'int inode_needs_sync(struct inode*)'
  'int inode_newsize_ok(const struct inode*, loff_t)'
  'void inode_nohighmem(struct inode*)'
  'int insert_inode_locked(struct inode*)'
  'void invalidate_inode_buffers(struct inode*)'
  'bool is_bad_inode(struct inode*)'
  'void kfree_link(void*)'
  'void ll_rw_block(int, int, int, struct buffer_head**)'
  'struct nls_table* load_nls(char*)'
  'void logfc(struct fc_log*, const char*, char, const char*, ...)'
  'void make_bad_inode(struct inode*)'
  'void mark_buffer_dirty(struct buffer_head*)'
  'void mpage_readahead(struct readahead_control*, get_block_t*)'
  'int mpage_readpage(struct page*, get_block_t*)'
  'int mpage_writepages(struct address_space*, struct writeback_control*, get_block_t*)'
  'struct inode* new_inode(struct super_block*)'
  'int register_filesystem(struct file_system_type*)'
  'void set_bh_page(struct buffer_head*, struct page*, unsigned long)'
  'void set_nlink(struct inode*, unsigned int)'
  'void setattr_copy(struct user_namespace*, struct inode*, const struct iattr*)'
  'int setattr_prepare(struct user_namespace*, struct dentry*, struct iattr*)'
  'int submit_bh(int, int, struct buffer_head*)'
  'int sync_dirty_buffer(struct buffer_head*)'
  'int sync_inode_metadata(struct inode*, int)'
  'int sync_mapping_buffers(struct address_space*)'
  'void unlock_buffer(struct buffer_head*)'
  'void unlock_new_inode(struct inode*)'
  'int unregister_filesystem(struct file_system_type*)'
  'int utf16s_to_utf8s(const wchar_t*, int, enum utf16_endian, u8*, int)'
  'int utf8_to_utf32(const u8*, int, unicode_t*)'
  'int write_inode_now(struct inode*, int)'

1 variable symbol(s) added
  'struct kmem_cache* names_cachep'

Bug: 276863283
Change-Id: I5addeb8f83362c80e87a33726297d72bccc2f2ed
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
42dd91524e ANDROID: GKI: Add kernel base and lib ABI Symbol list for Amlogic SOC
Add kernel base and lib ABI Symbol list for Amlogic SOC

62 function symbol(s) added
  'void __devm_release_region(struct device*, struct resource*, resource_size_t, resource_size_t)'
  'int __kfifo_from_user(struct __kfifo*, const void*, unsigned long, unsigned int*)'
  'unsigned int __kfifo_in_r(struct __kfifo*, const void*, unsigned int, size_t)'
  'unsigned int __kfifo_out_r(struct __kfifo*, void*, unsigned int, size_t)'
  'int __kfifo_to_user(struct __kfifo*, void*, unsigned long, unsigned int*)'
  'int __traceiter_android_vh_iommu_iovad_free_iova(void*, struct iova_domain*, dma_addr_t, size_t)'
  'int __traceiter_android_vh_sched_show_task(void*, struct task_struct*)'
  'unsigned long _find_last_bit(const unsigned long*, unsigned long)'
  'int default_wake_function(wait_queue_entry_t*, unsigned int, int, void*)'
  'int des_expand_key(struct des_ctx*, const u8*, unsigned int)'
  'void dev_pm_clear_wake_irq(struct device*)'
  'struct device* dev_pm_domain_attach_by_id(struct device*, unsigned int)'
  'int dev_pm_set_wake_irq(struct device*, int)'
  'int device_get_phy_mode(struct device*)'
  'char* devm_kvasprintf(struct device*, gfp_t, const char*, va_list)'
  'int down_timeout(struct semaphore*, long)'
  'size_t fault_in_iov_iter_readable(const struct iov_iter*, size_t)'
  'void flush_signals(struct task_struct*)'
  'bool fwnode_device_is_available(const struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_graph_get_next_endpoint(const struct fwnode_handle*, struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_graph_get_port_parent(const struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_graph_get_remote_endpoint(const struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_graph_get_remote_port_parent(const struct fwnode_handle*)'
  'int fwnode_graph_parse_endpoint(const struct fwnode_handle*, struct fwnode_endpoint*)'
  'struct fwnode_handle* fwnode_handle_get(struct fwnode_handle*)'
  'int fwnode_property_get_reference_args(const struct fwnode_handle*, const char*, const char*, unsigned int, unsigned int, struct fwnode_reference_args*)'
  'int fwnode_property_read_u64_array(const struct fwnode_handle*, const char*, u64*, size_t)'
  'phys_addr_t gen_pool_virt_to_phys(struct gen_pool*, unsigned long)'
  'int get_device_system_crosststamp(int(*)(ktime_t*, struct system_counterval_t*, void*), void*, struct system_time_snapshot*, struct system_device_crosststamp*)'
  'void* ioremap_cache(phys_addr_t, size_t)'
  'void iov_iter_init(struct iov_iter*, unsigned int, const struct iovec*, unsigned long, size_t)'
  'size_t iov_iter_zero(size_t, struct iov_iter*)'
  'unsigned int irq_create_fwspec_mapping(struct irq_fwspec*)'
  'void irq_domain_free_irqs_parent(struct irq_domain*, unsigned int, unsigned int)'
  'void kernel_sigaction(int, __sighandler_t)'
  'int kill_pid(struct pid*, int, int)'
  'void lockref_get(struct lockref*)'
  'char* next_arg(char*, char**, char**)'
  'int nla_append(struct sk_buff*, int, const void*)'
  'int param_get_charp(char*, const struct kernel_param*)'
  'int param_get_string(char*, const struct kernel_param*)'
  'int param_set_charp(const char*, const struct kernel_param*)'
  'int param_set_copystring(const char*, const struct kernel_param*)'
  'int platform_get_irq_byname_optional(struct platform_device*, const char*)'
  'struct rb_node* rb_last(const struct rb_root*)'
  'u64 read_sanitised_ftr_reg(u32)'
  'int register_module_notifier(struct notifier_block*)'
  'struct perf_event** register_wide_hw_breakpoint(struct perf_event_attr*, perf_overflow_handler_t, void*)'
  'int regmap_irq_chip_get_base(struct regmap_irq_chip_data*)'
  'int release_resource(struct resource*)'
  'size_t sg_copy_from_buffer(struct scatterlist*, unsigned int, const void*, size_t)'
  'size_t sg_copy_to_buffer(struct scatterlist*, unsigned int, void*, size_t)'
  'int sg_nents(struct scatterlist*)'
  'ssize_t show_class_attr_string(struct class*, struct class_attribute*, char*)'
  'void show_regs(struct pt_regs*)'
  'int smpboot_register_percpu_thread(struct smp_hotplug_thread*)'
  'void stack_trace_print(const unsigned long*, unsigned int, int)'
  'char* strchrnul(const char*, int)'
  'void symbol_put_addr(void*)'
  'int unregister_module_notifier(struct notifier_block*)'
  'void unregister_wide_hw_breakpoint(struct perf_event**)'
  'void yield()'

12 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_iommu_iovad_free_iova'
  'struct tracepoint __tracepoint_android_vh_sched_show_task'
  'struct cma* dma_contiguous_default_area'
  'const char hex_asc[17]'
  'u64 jiffies_64'
  'int overflowgid'
  'int overflowuid'
  'const struct kernel_param_ops param_ops_short'
  'const struct kernel_param_ops param_ops_ullong'
  'const struct kernel_param_ops param_ops_ushort'
  'struct workqueue_struct* pm_wq'
  'const uuid_t uuid_null'

Bug: 276863283
Change-Id: I22fc86f1e769c06744948a8b60254b1172364e3f
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
6c73bb759c ANDROID: GKI: Add mmc gpio pwm etc ABI Symbol list for Amlogic SOC
Add mmc gpio pwm etc ABI Symbol list for Amlogic SOC

71 function symbol(s) added
  'int __device_reset(struct device*, bool)'
  'int __mmc_claim_host(struct mmc_host*, struct mmc_ctx*, atomic_t*)'
  'void dev_pm_opp_free_cpufreq_table(struct device*, struct cpufreq_frequency_table**)'
  'struct opp_table* dev_pm_opp_get_opp_table(struct device*)'
  'int dev_pm_opp_init_cpufreq_table(struct device*, struct cpufreq_frequency_table**)'
  'int dev_pm_opp_of_add_table_indexed(struct device*, int)'
  'void dev_pm_opp_put_opp_table(struct opp_table*)'
  'int devm_clk_hw_register_clkdev(struct device*, struct clk_hw*, const char*, const char*)'
  'struct pwm_device* devm_of_pwm_get(struct device*, struct device_node*, const char*)'
  'struct pwm_device* devm_pwm_get(struct device*, const char*)'
  'int extcon_dev_register(struct extcon_dev*)'
  'int extcon_set_state(struct extcon_dev*, unsigned int, bool)'
  'struct gpio_desc* gpiod_get_index(struct device*, const char*, unsigned int, enum gpiod_flags)'
  'int hwspin_lock_register(struct hwspinlock_device*, struct device*, const struct hwspinlock_ops*, int, int)'
  'int hwspin_lock_unregister(struct hwspinlock_device*)'
  'void iio_buffer_init(struct iio_buffer*)'
  'void iio_buffer_put(struct iio_buffer*)'
  'int iio_device_attach_buffer(struct iio_dev*, struct iio_buffer*)'
  's64 iio_get_time_ns(const struct iio_dev*)'
  'int iio_push_to_buffers(struct iio_dev*, const void*)'
  'void led_trigger_blink_oneshot(struct led_trigger*, unsigned long*, unsigned long*, int)'
  'void led_trigger_event(struct led_trigger*, enum led_brightness)'
  'int led_trigger_register(struct led_trigger*)'
  'void led_trigger_register_simple(const char*, struct led_trigger**)'
  'void led_trigger_unregister(struct led_trigger*)'
  'void led_trigger_unregister_simple(struct led_trigger*)'
  'bool mmc_card_is_blockaddr(struct mmc_card*)'
  'void mmc_detect_change(struct mmc_host*, unsigned long)'
  'void mmc_release_host(struct mmc_host*)'
  'void mmc_set_data_timeout(struct mmc_data*, const struct mmc_card*)'
  'int mmc_sw_reset(struct mmc_host*)'
  'int mmc_switch(struct mmc_card*, u8, u8, u8, unsigned int)'
  'void mmc_wait_for_req(struct mmc_host*, struct mmc_request*)'
  'struct reset_control* of_reset_control_array_get(struct device_node*, bool, bool, bool)'
  'int pwm_adjust_config(struct pwm_device*)'
  'int pwm_apply_state(struct pwm_device*, const struct pwm_state*)'
  'int regulator_list_voltage(struct regulator*, unsigned int)'
  'int regulator_map_voltage_iterate(struct regulator_dev*, int, int)'
  'int rtc_add_group(struct rtc_device*, const struct attribute_group*)'
  'unsigned int sdio_align_size(struct sdio_func*, unsigned int)'
  'void sdio_claim_host(struct sdio_func*)'
  'int sdio_claim_irq(struct sdio_func*, sdio_irq_handler_t*)'
  'int sdio_disable_func(struct sdio_func*)'
  'int sdio_enable_func(struct sdio_func*)'
  'unsigned char sdio_f0_readb(struct sdio_func*, unsigned int, int*)'
  'void sdio_f0_writeb(struct sdio_func*, unsigned char, unsigned int, int*)'
  'mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func*)'
  'u8 sdio_readb(struct sdio_func*, unsigned int, int*)'
  'u32 sdio_readl(struct sdio_func*, unsigned int, int*)'
  'int sdio_readsb(struct sdio_func*, void*, unsigned int, int)'
  'u16 sdio_readw(struct sdio_func*, unsigned int, int*)'
  'int sdio_register_driver(struct sdio_driver*)'
  'void sdio_release_host(struct sdio_func*)'
  'int sdio_release_irq(struct sdio_func*)'
  'void sdio_retune_crc_disable(struct sdio_func*)'
  'void sdio_retune_crc_enable(struct sdio_func*)'
  'void sdio_retune_hold_now(struct sdio_func*)'
  'void sdio_retune_release(struct sdio_func*)'
  'int sdio_set_host_pm_flags(struct sdio_func*, mmc_pm_flag_t)'
  'void sdio_unregister_driver(struct sdio_driver*)'
  'void sdio_writeb(struct sdio_func*, u8, unsigned int, int*)'
  'void sdio_writel(struct sdio_func*, u32, unsigned int, int*)'
  'int sdio_writesb(struct sdio_func*, unsigned int, void*, int)'
  'void sdio_writew(struct sdio_func*, u16, unsigned int, int*)'
  'struct spi_device* spi_alloc_device(struct spi_controller*)'
  'struct spi_controller* spi_busnum_to_master(u16)'
  'int spi_mem_adjust_op_size(struct spi_mem*, struct spi_mem_op*)'
  'bool spi_mem_default_supports_op(struct spi_mem*, const struct spi_mem_op*)'
  'bool spi_mem_supports_op(struct spi_mem*, const struct spi_mem_op*)'
  'struct spi_device* spi_new_device(struct spi_controller*, struct spi_board_info*)'
  'void uart_insert_char(struct uart_port*, unsigned int, unsigned int, unsigned int, unsigned int)'

Bug: 276863283
Change-Id: I1df1316a23a6dcaf69b6244cb9d63b5c64fcd37a
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
77fd1bdf70 ANDROID: GKI: Add net and memory ABI Symbol list for Amlogic SOC
Add net and memory ABI Symbol list for Amlogic SOC

66 function symbol(s) added
  'struct net_device* __dev_get_by_name(struct net*, const char*)'
  'ssize_t __generic_file_write_iter(struct kiocb*, struct iov_iter*)'
  'int __ipv6_addr_type(const struct in6_addr*)'
  'struct sk_buff* __pskb_copy_fclone(struct sk_buff*, int, gfp_t, bool)'
  'struct net_device* devm_alloc_etherdev_mqs(struct device*, int, unsigned int, unsigned int)'
  'int eth_header(struct sk_buff*, struct net_device*, unsigned short, const void*, const void*, unsigned int)'
  'int eth_header_parse(const struct sk_buff*, unsigned char*)'
  'int filemap_fdatawait_range(struct address_space*, loff_t, loff_t)'
  'int filemap_fdatawrite(struct address_space*)'
  'int filemap_fdatawrite_range(struct address_space*, loff_t, loff_t)'
  'int filemap_flush(struct address_space*)'
  'int filemap_write_and_wait_range(struct address_space*, loff_t, loff_t)'
  'int flow_block_cb_setup_simple(struct flow_block_offload*, struct list_head*, flow_setup_cb_t*, void*, void*, bool)'
  'void flow_rule_match_basic(const struct flow_rule*, struct flow_match_basic*)'
  'void flow_rule_match_ipv4_addrs(const struct flow_rule*, struct flow_match_ipv4_addrs*)'
  'void flow_rule_match_ports(const struct flow_rule*, struct flow_match_ports*)'
  'void flow_rule_match_vlan(const struct flow_rule*, struct flow_match_vlan*)'
  'int generic_file_mmap(struct file*, struct vm_area_struct*)'
  'int get_kernel_pages(const struct kvec*, int, int, struct page**)'
  'unsigned long get_pfnblock_flags_mask(const struct page*, unsigned long, unsigned long)'
  'struct page* grab_cache_page_write_begin(struct address_space*, unsigned long, unsigned int)'
  'char* iwe_stream_add_event(struct iw_request_info*, char*, char*, struct iw_event*, int)'
  'char* iwe_stream_add_point(struct iw_request_info*, char*, char*, struct iw_event*, char*)'
  'char* iwe_stream_add_value(struct iw_request_info*, char*, char*, char*, struct iw_event*, int)'
  'void mod_node_page_state(struct pglist_data*, enum node_stat_item, long)'
  'void netdev_printk(const char*, const struct net_device*, const char*, ...)'
  'void netdev_rss_key_fill(void*, size_t)'
  'int of_get_phy_mode(struct device_node*, phy_interface_t*)'
  'struct page* page_pool_alloc_pages(struct page_pool*, gfp_t)'
  'struct page_pool* page_pool_create(const struct page_pool_params*)'
  'void page_pool_destroy(struct page_pool*)'
  'void page_pool_put_page(struct page_pool*, struct page*, unsigned int, bool)'
  'void page_pool_release_page(struct page_pool*, struct page*)'
  'struct page* pagecache_get_page(struct address_space*, unsigned long, int, gfp_t)'
  'int pagecache_write_begin(struct file*, struct address_space*, loff_t, unsigned int, unsigned int, struct page**, void**)'
  'int pagecache_write_end(struct file*, struct address_space*, loff_t, unsigned int, unsigned int, struct page*, void*)'
  'struct page* read_cache_page(struct address_space*, unsigned long, int(*)(void*, struct page*), void*)'
  'bool rfkill_set_sw_state(struct rfkill*, bool)'
  'void* skb_pull_rcsum(struct sk_buff*, unsigned int)'
  'void skb_scrub_packet(struct sk_buff*, bool)'
  'void truncate_inode_pages_final(struct address_space*)'
  'void truncate_pagecache(struct inode*, loff_t)'
  'void truncate_setsize(struct inode*, loff_t)'
  'void unpin_user_pages(struct page**, unsigned long)'
  'int vm_insert_page(struct vm_area_struct*, unsigned long, struct page*)'
  'void vm_unmap_aliases()'
  'unsigned long vmalloc_to_pfn(const void*)'
  'void wireless_send_event(struct net_device*, unsigned int, union iwreq_data*, const char*)'
  'bool xdp_rxq_info_is_reg(struct xdp_rxq_info*)'
  'void xdp_rxq_info_unreg_mem_model(struct xdp_rxq_info*)'
  'struct xdp_buff* xp_alloc(struct xsk_buff_pool*)'
  'int xp_dma_map(struct xsk_buff_pool*, struct device*, unsigned long, struct page**, u32)'
  'void xp_dma_sync_for_cpu_slow(struct xdp_buff_xsk*)'
  'void xp_dma_sync_for_device_slow(struct xsk_buff_pool*, dma_addr_t, size_t)'
  'void xp_dma_unmap(struct xsk_buff_pool*, unsigned long)'
  'void xp_free(struct xdp_buff_xsk*)'
  'dma_addr_t xp_raw_get_dma(struct xsk_buff_pool*, u64)'
  'void xp_set_rxq_info(struct xsk_buff_pool*, struct xdp_rxq_info*)'
  'void xsk_clear_rx_need_wakeup(struct xsk_buff_pool*)'
  'struct xsk_buff_pool* xsk_get_pool_from_qid(struct net_device*, u16)'
  'void xsk_set_rx_need_wakeup(struct xsk_buff_pool*)'
  'void xsk_set_tx_need_wakeup(struct xsk_buff_pool*)'
  'void xsk_tx_completed(struct xsk_buff_pool*, u32)'
  'bool xsk_tx_peek_desc(struct xsk_buff_pool*, struct xdp_desc*)'
  'void xsk_tx_release(struct xsk_buff_pool*)'
  'bool xsk_uses_need_wakeup(struct xsk_buff_pool*)'

2 variable symbol(s) added
  'void* high_memory'
  'struct backing_dev_info noop_backing_dev_info'

Bug: 276863283
Change-Id: I5fe6034fb0580e8c9cb81fa0128b6785069c3f3d
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
2da1dda224 ANDROID: GKI: Add net ABI Symbol list for Amlogic SOC
Add net ABI Symbol list for Amlogic SOC

54 function symbol(s) added
  'int __of_mdiobus_register(struct mii_bus*, struct device_node*, struct module*)'
  'int genphy_aneg_done(struct phy_device*)'
  'int genphy_read_status(struct phy_device*)'
  'int genphy_restart_aneg(struct phy_device*)'
  'int genphy_resume(struct phy_device*)'
  'int genphy_soft_reset(struct phy_device*)'
  'int genphy_suspend(struct phy_device*)'
  'int genphy_update_link(struct phy_device*)'
  'struct mdio_device* mdio_device_create(struct mii_bus*, int)'
  'void mdio_device_free(struct mdio_device*)'
  'struct mii_bus* mdiobus_alloc_size(size_t)'
  'void mdiobus_free(struct mii_bus*)'
  'struct phy_device* mdiobus_get_phy(struct mii_bus*, int)'
  'int mdiobus_read(struct mii_bus*, int, u32)'
  'void mdiobus_unregister(struct mii_bus*)'
  'int mdiobus_write(struct mii_bus*, int, u32, u16)'
  'void netdev_alert(const struct net_device*, const char*, ...)'
  'struct mii_bus* of_mdio_find_bus(struct device_node*)'
  'bool of_phy_is_fixed_link(struct device_node*)'
  'void phy_attached_info(struct phy_device*)'
  'int phy_drivers_register(struct phy_driver*, int, struct module*)'
  'void phy_drivers_unregister(struct phy_driver*, int)'
  'void phy_error(struct phy_device*)'
  'int phy_init_eee(struct phy_device*, bool)'
  'void phy_print_status(struct phy_device*)'
  'void phy_trigger_machine(struct phy_device*)'
  'int phylink_connect_phy(struct phylink*, struct phy_device*)'
  'struct phylink* phylink_create(struct phylink_config*, struct fwnode_handle*, phy_interface_t, const struct phylink_mac_ops*)'
  'void phylink_destroy(struct phylink*)'
  'void phylink_disconnect_phy(struct phylink*)'
  'int phylink_ethtool_get_eee(struct phylink*, struct ethtool_eee*)'
  'void phylink_ethtool_get_pauseparam(struct phylink*, struct ethtool_pauseparam*)'
  'void phylink_ethtool_get_wol(struct phylink*, struct ethtool_wolinfo*)'
  'int phylink_ethtool_ksettings_get(struct phylink*, struct ethtool_link_ksettings*)'
  'int phylink_ethtool_ksettings_set(struct phylink*, const struct ethtool_link_ksettings*)'
  'int phylink_ethtool_nway_reset(struct phylink*)'
  'int phylink_ethtool_set_eee(struct phylink*, struct ethtool_eee*)'
  'int phylink_ethtool_set_pauseparam(struct phylink*, struct ethtool_pauseparam*)'
  'int phylink_ethtool_set_wol(struct phylink*, struct ethtool_wolinfo*)'
  'int phylink_get_eee_err(struct phylink*)'
  'int phylink_mii_ioctl(struct phylink*, struct ifreq*, int)'
  'int phylink_of_phy_connect(struct phylink*, struct device_node*, u32)'
  'void phylink_resume(struct phylink*)'
  'void phylink_set_pcs(struct phylink*, struct phylink_pcs*)'
  'void phylink_set_port_modes(unsigned long*)'
  'int phylink_speed_down(struct phylink*, bool)'
  'int phylink_speed_up(struct phylink*)'
  'void phylink_start(struct phylink*)'
  'void phylink_stop(struct phylink*)'
  'void phylink_suspend(struct phylink*, bool)'
  'void ptp_clock_event(struct ptp_clock*, struct ptp_clock_event*)'
  'int ptp_clock_index(struct ptp_clock*)'
  'struct ptp_clock* ptp_clock_register(struct ptp_clock_info*, struct device*)'
  'int ptp_clock_unregister(struct ptp_clock*)'

Bug: 276863283
Change-Id: I11ada9bfd5d7c7b97bd50aba19fc37d1f2eb3f02
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
9ff310d286 ANDROID: GKI: Add media gpu and sound ABI Symbol list for Amlogic SOC
Add media gpu and sound ABI Symbol list for Amlogic SOC

49 function symbol(s) added
  'void __drm_atomic_helper_connector_reset(struct drm_connector*, struct drm_connector_state*)'
  'unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream*)'
  'void drm_atomic_helper_async_commit(struct drm_device*, struct drm_atomic_state*)'
  'void drm_atomic_helper_commit_tail_rpm(struct drm_atomic_state*)'
  'int drm_atomic_helper_resume(struct drm_device*, struct drm_atomic_state*)'
  'struct drm_atomic_state* drm_atomic_helper_suspend(struct drm_device*)'
  'int drm_atomic_set_mode_for_crtc(struct drm_crtc_state*, const struct drm_display_mode*)'
  'int drm_connector_attach_content_protection_property(struct drm_connector*, bool)'
  'int drm_connector_attach_content_type_property(struct drm_connector*)'
  'int drm_connector_attach_max_bpc_property(struct drm_connector*, int, int)'
  'int drm_connector_attach_vrr_capable_property(struct drm_connector*)'
  'void drm_connector_set_vrr_capable_property(struct drm_connector*, bool)'
  'struct drm_crtc* drm_crtc_from_index(struct drm_device*, int)'
  'struct drm_framebuffer* drm_framebuffer_lookup(struct drm_device*, struct drm_file*, uint32_t)'
  'int drm_gem_handle_delete(struct drm_file*, u32)'
  'void drm_hdcp_update_content_protection(struct drm_connector*, u64)'
  'struct drm_display_mode* drm_mode_create(struct drm_device*)'
  'void drm_mode_get_hv_timing(const struct drm_display_mode*, int*, int*)'
  'int drm_property_add_enum(struct drm_property*, uint64_t, const char*)'
  'void drm_property_destroy(struct drm_device*, struct drm_property*)'
  'void drm_self_refresh_helper_update_avg_times(struct drm_atomic_state*, unsigned int, unsigned int)'
  'void hdmi_avi_infoframe_init(struct hdmi_avi_infoframe*)'
  'int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe*)'
  'ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe*, void*, size_t)'
  'int hdmi_infoframe_unpack(union hdmi_infoframe*, const void*, size_t)'
  'ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe*, void*, size_t)'
  'int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe*)'
  'ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe*, void*, size_t)'
  'int snd_pcm_kernel_ioctl(struct snd_pcm_substream*, unsigned int, void*)'
  'int snd_pcm_lib_default_mmap(struct snd_pcm_substream*, struct vm_area_struct*)'
  'unsigned int snd_pcm_rate_to_rate_bit(unsigned int)'
  'int snd_pcm_stop(struct snd_pcm_substream*, snd_pcm_state_t)'
  'int snd_pcm_stop_xrun(struct snd_pcm_substream*)'
  'void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream*, unsigned long)'
  'int snd_soc_add_card_controls(struct snd_soc_card*, const struct snd_kcontrol_new*, int)'
  'void snd_soc_jack_free_gpios(struct snd_soc_jack*, int, struct snd_soc_jack_gpio*)'
  'int snd_soc_of_get_slot_mask(struct device_node*, const char*, unsigned int*)'
  'int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card*, const char*)'
  'int snd_soc_of_parse_tdm_slot(struct device_node*, unsigned int*, unsigned int*, unsigned int*, unsigned int*)'
  'int v4l2_ctrl_subscribe_event(struct v4l2_fh*, const struct v4l2_event_subscription*)'
  'int v4l2_device_register_subdev(struct v4l2_device*, struct v4l2_subdev*)'
  'void v4l2_device_unregister_subdev(struct v4l2_subdev*)'
  'void v4l2_event_queue_fh(struct v4l2_fh*, const struct v4l2_event*)'
  'int v4l2_event_subscribe(struct v4l2_fh*, const struct v4l2_event_subscription*, unsigned int, const struct v4l2_subscribed_event_ops*)'
  'int v4l2_event_unsubscribe(struct v4l2_fh*, const struct v4l2_event_subscription*)'
  'void v4l2_i2c_subdev_init(struct v4l2_subdev*, struct i2c_client*, const struct v4l2_subdev_ops*)'
  '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_src_change_event_subscribe(struct v4l2_fh*, const struct v4l2_event_subscription*)'

2 variable symbol(s) added
  'const struct vm_operations_struct drm_gem_cma_vm_ops'
  'const struct vb2_mem_ops vb2_dma_contig_memops'

Bug: 276863283
Change-Id: I609bdb9c65d7db391550fd85507d8c961d1034e7
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Vincent Donnefort
086eb3eacb ANDROID: CONFIG_PKVM_MODULE_PATH to /lib/modules/
Android places by default the modules into /lib/modules/ instead of using
the default path /lib/modules/<uname>.

Bug: 254835242
Change-Id: I49ed4be25c29302fc9b99a9f2ef5f1c84df3adc9
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-13 11:27:05 +01:00
Vincent Donnefort
b147bc4b64 ANDROID: KVM: arm64: Add a fallback for pKVM module loading
Fallback to the default module path (/lib/modules/<uname>) if module
loading failed for the selected path in CONFIG_PKVM_MODULE_PATH. This
intends to follow the same mechanism as Android init.

Bug: 254835242
Change-Id: Ia7764d57fe71521e4a1fe6d2c85ba057790069a8
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-13 11:19:33 +01:00
Vincent Donnefort
09ed60476a ANDROID: KVM: arm64: Add a custom module path for pKVM module loading
Currently, no module path will be given to modprobe when loading a pKVM
module, the module must then be found in /lib/modules/<uname>. Add
CONFIG_PKVM_MODULE_PATH to allow setting a different path from the
kernel config.

Bug: 254835242
Change-Id: I4f355518628b44ac03de2cee3d7a90e1ad5bf1e2
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-13 11:19:33 +01:00
Yu Zhao
18580efd2f UPSTREAM: mm: multi-gen LRU: simplify arch_has_hw_pte_young() check
Scanning page tables when hardware does not set the accessed bit has
no real use cases.

Link: https://lkml.kernel.org/r/20221222041905.2431096-9-yuzhao@google.com
Change-Id: If6c1232a5d5f8f7e3ce3e076f7e865c18ee2a6c0
Signed-off-by: Yu Zhao <yuzhao@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michael Larabel <Michael@MichaelLarabel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit f386e93140)
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Yu Zhao
4c26a5c7ca UPSTREAM: mm: support POSIX_FADV_NOREUSE
This patch adds POSIX_FADV_NOREUSE to vma_has_recency() so that the LRU
algorithm can ignore access to mapped files marked by this flag.

The advantages of POSIX_FADV_NOREUSE are:
1. Unlike MADV_SEQUENTIAL and MADV_RANDOM, it does not alter the
   default readahead behavior.
2. Unlike MADV_SEQUENTIAL and MADV_RANDOM, it does not split VMAs and
   therefore does not take mmap_lock.
3. Unlike MADV_COLD, setting it has a negligible cost, regardless of
   how many pages it affects.

Its limitations are:
1. Like POSIX_FADV_RANDOM and POSIX_FADV_SEQUENTIAL, it currently does
   not support range. IOW, its scope is the entire file.
2. It currently does not ignore access through file descriptors.
   Specifically, for the active/inactive LRU, given a file page shared
   by two users and one of them having set POSIX_FADV_NOREUSE on the
   file, this page will be activated upon the second user accessing
   it. This corner case can be covered by checking POSIX_FADV_NOREUSE
   before calling folio_mark_accessed() on the read path. But it is
   considered not worth the effort.

There have been a few attempts to support POSIX_FADV_NOREUSE, e.g., [1].
This time the goal is to fill a niche: a few desktop applications, e.g.,
large file transferring and video encoding/decoding, want fast file
streaming with mmap() rather than direct IO.  Among those applications, an
SVT-AV1 regression was reported when running with MGLRU [2].  The
following test can reproduce that regression.

  kb=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
  kb=$((kb - 8*1024*1024))

  modprobe brd rd_nr=1 rd_size=$kb
  dd if=/dev/zero of=/dev/ram0 bs=1M

  mkfs.ext4 /dev/ram0
  mount /dev/ram0 /mnt/
  swapoff -a

  fallocate -l 8G /mnt/swapfile
  mkswap /mnt/swapfile
  swapon /mnt/swapfile

  wget http://ultravideo.cs.tut.fi/video/Bosphorus_3840x2160_120fps_420_8bit_YUV_Y4M.7z
  7z e -o/mnt/ Bosphorus_3840x2160_120fps_420_8bit_YUV_Y4M.7z
  SvtAv1EncApp --preset 12 -w 3840 -h 2160 \
               -i /mnt/Bosphorus_3840x2160.y4m

For MGLRU, the following change showed a [9-11]% increase in FPS,
which makes it on par with the active/inactive LRU.

  patch Source/App/EncApp/EbAppMain.c <<EOF
  31a32
  > #include <fcntl.h>
  35d35
  < #include <fcntl.h> /* _O_BINARY */
  117a118
  >             posix_fadvise(config->mmap.fd, 0, 0, POSIX_FADV_NOREUSE);
  EOF

[1] https://lore.kernel.org/r/1308923350-7932-1-git-send-email-andrea@betterlinux.com/
[2] https://openbenchmarking.org/result/2209259-PTS-MGLRU8GB57

Link: https://lkml.kernel.org/r/20221230215252.2628425-2-yuzhao@google.com
Change-Id: Iee2a7df5ccd86162089e007e32f9fa9b2b9f198b
Signed-off-by: Yu Zhao <yuzhao@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Righi <andrea.righi@canonical.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michael Larabel <Michael@MichaelLarabel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 17e810229c)
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Yu Zhao
3b9ab09cf5 BACKPORT: mm: add vma_has_recency()
Add vma_has_recency() to indicate whether a VMA may exhibit temporal
locality that the LRU algorithm relies on.

This function returns false for VMAs marked by VM_SEQ_READ or
VM_RAND_READ.  While the former flag indicates linear access, i.e., a
special case of spatial locality, both flags indicate a lack of temporal
locality, i.e., the reuse of an area within a relatively small duration.

"Recency" is chosen over "locality" to avoid confusion between temporal
and spatial localities.

Before this patch, the active/inactive LRU only ignored the accessed bit
from VMAs marked by VM_SEQ_READ.  After this patch, the active/inactive
LRU and MGLRU share the same logic: they both ignore the accessed bit if
vma_has_recency() returns false.

For the active/inactive LRU, the following fio test showed a [6, 8]%
increase in IOPS when randomly accessing mapped files under memory
pressure.

  kb=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
  kb=$((kb - 8*1024*1024))

  modprobe brd rd_nr=1 rd_size=$kb
  dd if=/dev/zero of=/dev/ram0 bs=1M

  mkfs.ext4 /dev/ram0
  mount /dev/ram0 /mnt/
  swapoff -a

  fio --name=test --directory=/mnt/ --ioengine=mmap --numjobs=8 \
      --size=8G --rw=randrw --time_based --runtime=10m \
      --group_reporting

The discussion that led to this patch is here [1].  Additional test
results are available in that thread.

[1] https://lore.kernel.org/r/Y31s%2FK8T85jh05wH@google.com/

Link: https://lkml.kernel.org/r/20221230215252.2628425-1-yuzhao@google.com
Change-Id: I3e0dfa1ca2a3c14fb0239b8f612c697e1d8d6a64
Signed-off-by: Yu Zhao <yuzhao@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Righi <andrea.righi@canonical.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michael Larabel <Michael@MichaelLarabel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 8788f67814)
[TJ: #include <linux/mm_inline.h>, folio -> page renames]
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Juergen Gross
23811798a3 UPSTREAM: mm: introduce arch_has_hw_nonleaf_pmd_young()
When running as a Xen PV guests commit eed9a328aa ("mm: x86: add
CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG") can cause a protection violation in
pmdp_test_and_clear_young():

 BUG: unable to handle page fault for address: ffff8880083374d0
 #PF: supervisor write access in kernel mode
 #PF: error_code(0x0003) - permissions violation
 PGD 3026067 P4D 3026067 PUD 3027067 PMD 7fee5067 PTE 8010000008337065
 Oops: 0003 [#1] PREEMPT SMP NOPTI
 CPU: 7 PID: 158 Comm: kswapd0 Not tainted 6.1.0-rc5-20221118-doflr+ #1
 RIP: e030:pmdp_test_and_clear_young+0x25/0x40

This happens because the Xen hypervisor can't emulate direct writes to
page table entries other than PTEs.

This can easily be fixed by introducing arch_has_hw_nonleaf_pmd_young()
similar to arch_has_hw_pte_young() and test that instead of
CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.

Link: https://lkml.kernel.org/r/20221123064510.16225-1-jgross@suse.com
Fixes: eed9a328aa ("mm: x86: add CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG")
Change-Id: Ib88d54891c619feccc7eb40a14d5ba6e349912d6
Signed-off-by: Juergen Gross <jgross@suse.com>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: Yu Zhao <yuzhao@google.com>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: David Hildenbrand <david@redhat.com>	[core changes]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 4aaf269c76)
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Juergen Gross
7f400d66ad BACKPORT: mm: add dummy pmd_young() for architectures not having it
In order to avoid #ifdeffery add a dummy pmd_young() implementation as a
fallback.  This is required for the later patch "mm: introduce
arch_has_hw_nonleaf_pmd_young()".

Link: https://lkml.kernel.org/r/fd3ac3cd-7349-6bbd-890a-71a9454ca0b3@suse.com
Change-Id: I3e62702e3eed4b2adb2b49c2bce7aecc349a337c
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Yu Zhao <yuzhao@google.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 6617da8fb5)
[TJ: loongarch is not present]
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Carlos Llamas
f9e7e861b5 ANDROID: 4/12/2023 KMI update
Set KMI_GENERATION=4 for 4/12 KMI update

function symbol 'struct block_device* I_BDEV(struct inode*)' changed
  CRC changed from 0x6d0d2bcc to 0xf2df037e

function symbol 'void* PDE_DATA(const struct inode*)' changed
  CRC changed from 0xbb8786db to 0x3c36f860

function symbol 'void __ClearPageMovable(struct page*)' changed
  CRC changed from 0x6cd6821a to 0xafefd4e

... 2828 omitted; 2831 symbols have only CRC changes

type 'struct dentry_operations' changed
  member changed from 'void(* d_canonical_path)(const struct path*, struct path*)' to 'int(* d_canonical_path)(const struct path*, struct path*)'
    type changed from 'void(*)(const struct path*, struct path*)' to 'int(*)(const struct path*, struct path*)'
      pointed-to type changed from 'void(const struct path*, struct path*)' to 'int(const struct path*, struct path*)'
        return type changed from 'void' to 'int'

Bug: 277759776
Change-Id: I5f3ed46e6804dcf0db745d4e6dc7c3a317f64648
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2023-04-11 22:13:26 +00:00
Paul Lawrence
3f5c9f5cf5 ANDROID: fuse: Support errors from fuse daemon in canonical path
Previously errors from the daemon in FUSE_CANONICAL_PATH were simply
ignored. In order to block inotifys, it is useful to be able to return
errors from this opcode.

Bug: 238619640
Test: inotify no longer works on /storage/emulated/0/Android/media but
      does on child folders
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Icb15c090c6286c174338471a787712f8388de316
2023-04-11 20:43:00 +00:00
Jim Wylder
aacdf4e7ea ANDROID: Update the ABI symbol list
Add the following symbols:
  - gpiod_get_direction
  - irq_domain_simple_ops
  - regmap_get_max_register

Bug: 275412100
Change-Id: I25479fa4134130698f5e52274c66f73861486095
Signed-off-by: Jim Wylder <jwylder@google.com>
2023-04-11 19:02:03 +00:00
Will Deacon
18c78ecd82 ANDROID: arm64: Implement hypervisor workaround for SoCs with DMA beyond the PoC
SoCs featuring peripherals that can issue non-coherent DMA traffic
beyond the point of coherency (PoC) present multiple challenges for the
DMA-API implementation in Linux. Many of these challenges can be
overcome by suitable configuration of the interconnect, however the
presence of a cacheable alias for non-cacheable buffers can still lead
to coherence issues arising when stale clean lines are back-snooped from
the cache hierarchy to satisfy a non-cacheable transaction at the PoC.

Removing all cacheable aliases on a case-by-cases basis is both
error-prone and expensive. Instead, leverage the stage-2 identity
mapping installed by pKVM to enforce consistent cacheability for all
stage-1 aliases.

Bug: 240786634
Change-Id: I78b0aa51fe3e23811bbd25481173086aa957c4bf
Signed-off-by: Will Deacon <willdeacon@google.com>
2023-04-11 18:13:47 +00:00
Varad Gokhale
148ab83891 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - i3c_generic_ibi_alloc_pool
  - i3c_generic_ibi_free_pool
  - i3c_generic_ibi_get_free_slot
  - i3c_generic_ibi_recycle_slot
  - i3c_master_add_i3c_dev_locked
  - i3c_master_defslvs_locked
  - i3c_master_disec_locked
  - i3c_master_do_daa
  - i3c_master_enec_locked
  - i3c_master_entdaa_locked
  - i3c_master_get_free_addr
  - i3c_master_queue_ibi
  - i3c_master_register
  - i3c_master_set_info
  - i3c_master_unregister

Bug: 277319736

Change-Id: I2908c0f02bc7deee742bd0f992fd181238d0ef06
Signed-off-by: Varad Gokhale <gokv@google.com>
2023-04-11 17:21:46 +00:00
Peter Collingbourne
a4758044f9 FROMLIST: kasan: call clear_page with a match-all tag instead of changing page tag
Instead of changing the page's tag solely in order to obtain a pointer
with a match-all tag and then changing it back again, just convert the
pointer that we get from kmap_atomic() into one with a match-all tag
before passing it to clear_page().

On a certain microarchitecture, this has been observed to cause a
measurable improvement in microbenchmark performance, presumably as a
result of being able to avoid the atomic operations on the page tag.

Link: https://lore.kernel.org/r/20230216195924.3287772-1-pcc@google.com
Signed-off-by: Peter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/I0249822cc29097ca7a04ad48e8eb14871f80e711
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Change-Id: I0249822cc29097ca7a04ad48e8eb14871f80e711
Bug: 268383694
2023-04-11 16:04:36 +00:00
Chungkai Mei
b436639db2 ANDROID: Update the ABI symbol list
Add the following symbols:
  - __traceiter_android_rvh_find_busiest_group
  - __tracepoint_android_rvh_find_busiest_group

Bug: 261703915
Test: Build
Change-Id: I61656b386a983c25018b2f645917e0aa4cb779ed
Signed-off-by: Chungkai Mei <chungkai@google.com>
2023-04-11 15:56:30 +00:00
Wanwei Jiang
9f7633af27 ANDROID: GKI: Add Initial ABI Symbol list for Amlogic SOC
Add Initial ABI Symbol list for Amlogic SOC

50 function symbol(s) added
  'int __bitmap_and(unsigned long*, const unsigned long*, const unsigned long*, unsigned int)'
  'void __bitmap_shift_left(unsigned long*, const unsigned long*, unsigned int, unsigned int)'
  'void __bitmap_shift_right(unsigned long*, const unsigned long*, unsigned int, unsigned int)'
  'ssize_t __blockdev_direct_IO(struct kiocb*, struct inode*, struct block_device*, struct iov_iter*, get_block_t*, dio_iodone_t*, dio_submit_t*, int)'
  'struct buffer_head* __bread_gfp(struct block_device*, sector_t, unsigned int, gfp_t)'
  'void __brelse(struct buffer_head*)'
  'void balance_dirty_pages_ratelimited(struct address_space*)'
  'void bitmap_free(const unsigned long*)'
  'unsigned long* bitmap_zalloc(unsigned int, gfp_t)'
  'void blk_finish_plug(struct blk_plug*)'
  'void blk_start_plug(struct blk_plug*)'
  'int blkdev_issue_discard(struct block_device*, sector_t, sector_t, gfp_t, unsigned long)'
  'int block_truncate_page(struct address_space*, loff_t, get_block_t*)'
  'int block_write_begin(struct address_space*, loff_t, unsigned int, unsigned int, struct page**, get_block_t*)'
  'int block_write_end(struct file*, struct address_space*, loff_t, unsigned int, unsigned int, struct page*, void*)'
  'int block_write_full_page(struct page*, get_block_t*, struct writeback_control*)'
  'void cec_notifier_set_phys_addr(struct cec_notifier*, u16)'
  'void cec_notifier_set_phys_addr_from_edid(struct cec_notifier*, const struct edid*)'
  'void cfg80211_assoc_failure(struct net_device*, struct cfg80211_assoc_failure*)'
  'void cfg80211_ft_event(struct net_device*, struct cfg80211_ft_event_params*)'
  'void cfg80211_gtk_rekey_notify(struct net_device*, const u8*, const u8*, gfp_t)'
  'void cfg80211_pmksa_candidate_notify(struct net_device*, int, const u8*, bool, gfp_t)'
  'void cfg80211_rx_unprot_mlme_mgmt(struct net_device*, const u8*, size_t)'
  'void cfg80211_tdls_oper_request(struct net_device*, const u8*, enum nl80211_tdls_operation, u16, gfp_t)'
  'void class_remove_file_ns(struct class*, const struct class_attribute*, const void*)'
  'void clean_bdev_aliases(struct block_device*, sector_t, sector_t)'
  'void clear_inode(struct inode*)'
  'void clear_nlink(struct inode*)'
  'struct clk* clk_get_sys(const char*, const char*)'
  'int clk_hw_set_parent(struct clk_hw*, struct clk_hw*)'
  'int clk_mux_determine_rate_flags(struct clk_hw*, struct clk_rate_request*, unsigned long)'
  'unsigned int clk_mux_index_to_val(u32*, unsigned int, u8)'
  'int clk_mux_val_to_index(struct clk_hw*, u32*, unsigned int, unsigned int)'
  'struct clk* clk_register_composite(struct device*, const char*, const char* const*, int, struct clk_hw*, const struct clk_ops*, struct clk_hw*, const struct clk_ops*, struct clk_hw*, const struct clk_ops*, unsigned long)'
  'long copy_from_kernel_nofault(void*, const void*, size_t)'
  'size_t copy_page_from_iter_atomic(struct page*, unsigned int, size_t, struct iov_iter*)'
  'int cpufreq_boost_enabled()'
  'int cpufreq_generic_suspend(struct cpufreq_policy*)'
  'void create_empty_buffers(struct page*, unsigned long, unsigned long)'
  'int crypto_ahash_digest(struct ahash_request*)'
  'struct crypto_ahash* crypto_alloc_ahash(const char*, u32, u32)'
  'struct crypto_async_request* crypto_dequeue_request(struct crypto_queue*)'
  'int crypto_enqueue_request(struct crypto_queue*, struct crypto_async_request*)'
  'void crypto_init_queue(struct crypto_queue*, unsigned int)'
  'int crypto_sha1_finup(struct shash_desc*, const u8*, unsigned int, u8*)'
  'int crypto_sha1_update(struct shash_desc*, const u8*, unsigned int)'
  'void crypto_unregister_ahash(struct ahash_alg*)'
  'void crypto_unregister_skcipher(struct skcipher_alg*)'
  'struct timespec64 current_time(struct inode*)'
  'int current_umask()'

5 variable symbol(s) added
  'struct super_block* blockdev_superblock'
  'const struct clk_ops clk_divider_ops'
  'const struct clk_ops clk_gate_ops'
  'const struct clk_ops clk_mux_ops'
  'const struct clk_ops clk_mux_ro_ops'

Bug: 276863283
Change-Id: I361d2e276d88ab5f870a31786fc88c948f7b6fb9
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-04-11 15:40:43 +00:00
Neill Kapron
26d5939276 ANDROID: GKI: Enable CONFIG_USB_CONFIGFS_F_UAC2
Enable UAC2 function driver in x86 gki_defconfig for feature parity with
arm64 gki_defconfig.

Bug: 277271545
Change-Id: I4c602a2e791ecc03dc7d63c131dbe0982f1998c8
Signed-off-by: Neill Kapron <nkapron@google.com>
(cherry picked from commit a6ef8539c18177fbd541cc577ddd6562c9c343a1)
2023-04-10 22:42:56 +00:00
Peter Collingbourne
bdc9f35c77 UPSTREAM: Revert "kasan: drop skip_kasan_poison variable in free_pages_prepare"
This reverts commit 487a32ec24.

should_skip_kasan_poison() reads the PG_skip_kasan_poison flag from
page->flags.  However, this line of code in free_pages_prepare():

	page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;

clears most of page->flags, including PG_skip_kasan_poison, before calling
should_skip_kasan_poison(), which meant that it would never return true as
a result of the page flag being set.  Therefore, fix the code to call
should_skip_kasan_poison() before clearing the flags, as we were doing
before the reverted patch.

This fixes a measurable performance regression introduced in the reverted
commit, where munmap() takes longer than intended if HW tags KASAN is
supported and enabled at runtime.  Without this patch, we see a
single-digit percentage performance regression in a particular
mmap()-heavy benchmark when enabling HW tags KASAN, and with the patch,
there is no statistically significant performance impact when enabling HW
tags KASAN.

Link: https://lkml.kernel.org/r/20230310042914.3805818-2-pcc@google.com
Fixes: 487a32ec24 ("kasan: drop skip_kasan_poison variable in free_pages_prepare")
  Link: https://linux-review.googlesource.com/id/Ic4f13affeebd20548758438bb9ed9ca40e312b79
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com> [arm64]
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: <stable@vger.kernel.org>	[6.1]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit f446883d12)
Change-Id: Ic4f13affeebd20548758438bb9ed9ca40e312b79
Bug: 268383694
2023-04-07 12:35:01 -07:00
Ramji Jiyani
ee8815e209 ANDROID: GKI: Convert 80211 modules as unprotected
Convert cfg80211 & mac80211 GKI modules as unprotected.
This allows vendors to override these modules with
unsigned vendor versions.

Bug: 274416891
Test: TH
Change-Id: I50b854c0f0c7f0eeb516b440c69533921cb998f0
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-04-06 18:45:43 +00:00
Greg Kroah-Hartman
ea78df75c6 FROMLIST: staging: greybus: drop loopback test files
The greybus loopback test tool does not belong burried down in a
driver-specific directory.  If it is needed, it should be somewhere
else, like in the testing directory.  But as the loopback driver is
probably never going to be merged out of the staging directory, let's
just delete the test alltogether for now.  If it's needed in the future,
it can be brought back with a revert.

Also, having an Android.mk file in the kernel source tree breaks some
Android build systems when trying to build from a read-only source tree,
the report of which prompted this being a good reason to remove it as
well.

Cc: Johan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: Jack Schofield <schofija@oregonstate.edu>
Cc: Vaibhav Nagare <vnagare@redhat.com>
Cc: greybus-dev@lists.linaro.org
Change-Id: Ie19bcd87d0062d8453ff0d3d998224a7e478f3d0
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 275824813
Link: https://lore.kernel.org/r/2023040613-huntsman-goldsmith-4a41@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-06 15:46:06 +00:00
Vincent Donnefort
65ccd1af45 ANDROID: KVM: arm64: Fix pKVM module loading close
The HVC number limit must be the id inside the enum, not the fully
encoded version. Without this fix, all HVC would be rejected after
closing the pKVM modules door.

Bug: 254835242
Change-Id: Ia338859e07412ea1c2377b90ddee2c29c6fb0755
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-06 14:20:42 +00:00
Vincent Donnefort
af3a2c6853 ANDROID: KVM: arm64: Prevent pKVM module loading after IOMMU init
As a fail-safe mechanism, disable pKVM module loading after the IOMMU
init is complete. This intends to make sure nothing can be loaded after
the IOMMU driver is ready, in case a vendor would forget to call
__pkvm_close_module_registration

Bug: 254835242
Change-Id: I32a9752e145a8ef9787dae6319e37ba38544739b
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-06 14:19:23 +00:00
Vincent Donnefort
c4c48a21c0 ANDROID: KVM: arm64: Handle permission issue while loading pKVM module
pKVM module loading is disabled by rejecting the HVCs. This is a problem
for kvm_call_hyp_nvhe(__pkvm_alloc_module_va). First a WARN will be
trigger, then the res.a1 being very much likely non 0 the error will
not be caught. The loading would then proceed (even though no EL2 code
will be actually loaded).

Fix this behaviour by catching when the HVC is blocked, so the user gets
a meaningful error returned and the driver is not half-loaded.

Bug: 254835242
Change-Id: Ieeca6eebb083d99f8d6b79ebbc486a7c9f7d334e
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-06 14:16:43 +00:00
Fuad Tabba
7d3bde28a6 ANDROID: KVM: arm64: Factor out logic for setting SVE vector length at hyp
Factor out the logic for setting the SVE vector length at the
hypervisor in pKVM to the maximum hardware supported value when
saving and restoring host SVE state.

This shares common code, and elides an unused variable warning
when SVE is not configured.

Change-Id: Ibaa58e5bb44e4f85b9548a6abb498f0a769f6a4b
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
2023-04-06 13:19:18 +00:00
RD Babiera
1cb8f1d22c FROMGIT: usb: typec: altmodes/displayport: Fix configure initial pin assignment
While determining the initial pin assignment to be sent in the configure
message, using the DP_PIN_ASSIGN_DP_ONLY_MASK mask causes the DFP_U to
send both Pin Assignment C and E when both are supported by the DFP_U and
UFP_U. The spec (Table 5-7 DFP_U Pin Assignment Selection Mandates,
VESA DisplayPort Alt Mode Standard v2.0) indicates that the DFP_U never
selects Pin Assignment E when Pin Assignment C is offered.

Update the DP_PIN_ASSIGN_DP_ONLY_MASK conditional to intially select only
Pin Assignment C if it is available.

Fixes: 0e3bb7d689 ("usb: typec: Add driver for DisplayPort alternate mode")
Cc: stable@vger.kernel.org
Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230329215159.2046932-1-rdbabiera@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 271912353
(cherry picked from commit eddebe3960
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus)
Change-Id: If1c2515e35a538e32d3b51f0c304b6de507df407
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-04-06 09:29:56 +00:00
Greg Kroah-Hartman
83e0304b4e Merge 5.15.106 into android14-5.15
Changes in 5.15.106
	fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY
	usb: dwc3: gadget: move cmd_endtransfer to extra function
	usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC
	kernel: kcsan: kcsan_test: build without structleak plugin
	kcsan: avoid passing -g for test
	ksmbd: don't terminate inactive sessions after a few seconds
	bus: imx-weim: fix branch condition evaluates to a garbage value
	xfrm: Zero padding when dumping algos and encap
	ASoC: codecs: tx-macro: Fix for KASAN: slab-out-of-bounds
	md: avoid signed overflow in slot_store()
	x86/PVH: obtain VGA console info in Dom0
	net: hsr: Don't log netdev_err message on unknown prp dst node
	ALSA: asihpi: check pao in control_message()
	ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set()
	fbdev: tgafb: Fix potential divide by zero
	sched_getaffinity: don't assume 'cpumask_size()' is fully initialized
	fbdev: nvidia: Fix potential divide by zero
	fbdev: intelfb: Fix potential divide by zero
	fbdev: lxfb: Fix potential divide by zero
	fbdev: au1200fb: Fix potential divide by zero
	tools/power turbostat: Fix /dev/cpu_dma_latency warnings
	tools/power turbostat: fix decoding of HWP_STATUS
	tracing: Fix wrong return in kprobe_event_gen_test.c
	ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()
	mips: bmips: BCM6358: disable RAC flush for TP1
	ALSA: usb-audio: Fix recursive locking at XRUN during syncing
	platform/x86: think-lmi: add missing type attribute
	platform/x86: think-lmi: use correct possible_values delimiters
	platform/x86: think-lmi: only display possible_values if available
	platform/x86: think-lmi: Add possible_values for ThinkStation
	mtd: rawnand: meson: invalidate cache on polling ECC bit
	SUNRPC: fix shutdown of NFS TCP client socket
	sfc: ef10: don't overwrite offload features at NIC reset
	scsi: megaraid_sas: Fix crash after a double completion
	scsi: mpt3sas: Don't print sense pool info twice
	ptp_qoriq: fix memory leak in probe()
	net: dsa: microchip: ksz8863_smi: fix bulk access
	r8169: fix RTL8168H and RTL8107E rx crc error
	regulator: Handle deferred clk
	net/net_failover: fix txq exceeding warning
	net: stmmac: don't reject VLANs when IFF_PROMISC is set
	drm/i915/tc: Fix the ICL PHY ownership check in TC-cold state
	platform/x86/intel/pmc: Alder Lake PCH slp_s0_residency fix
	can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write
	s390/vfio-ap: fix memory leak in vfio_ap device driver
	loop: suppress uevents while reconfiguring the device
	loop: LOOP_CONFIGURE: send uevents for partitions
	net: mvpp2: classifier flow fix fragmentation flags
	net: mvpp2: parser fix QinQ
	net: mvpp2: parser fix PPPoE
	smsc911x: avoid PHY being resumed when interface is not up
	ice: add profile conflict check for AVF FDIR
	ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg()
	ALSA: ymfpci: Create card with device-managed snd_devm_card_new()
	ALSA: ymfpci: Fix BUG_ON in probe function
	net: ipa: compute DMA pool size properly
	i40e: fix registers dump after run ethtool adapter self test
	bnxt_en: Fix reporting of test result in ethtool selftest
	bnxt_en: Fix typo in PCI id to device description string mapping
	bnxt_en: Add missing 200G link speed reporting
	net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only
	net: ethernet: mtk_eth_soc: fix flow block refcounting logic
	pinctrl: ocelot: Fix alt mode for ocelot
	iommu/vt-d: Allow zero SAGAW if second-stage not supported
	Input: alps - fix compatibility with -funsigned-char
	Input: focaltech - use explicitly signed char type
	cifs: prevent infinite recursion in CIFSGetDFSRefer()
	cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL
	Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table
	btrfs: fix race between quota disable and quota assign ioctls
	btrfs: scan device in non-exclusive mode
	zonefs: Always invalidate last cached page on append write
	can: j1939: prevent deadlock by moving j1939_sk_errqueue()
	xen/netback: don't do grant copy across page boundary
	net: phy: dp83869: fix default value for tx-/rx-internal-delay
	pinctrl: amd: Disable and mask interrupts on resume
	pinctrl: at91-pio4: fix domain name assignment
	powerpc: Don't try to copy PPR for task with NULL pt_regs
	NFSv4: Fix hangs when recovering open state after a server reboot
	ALSA: hda/conexant: Partial revert of a quirk for Lenovo
	ALSA: usb-audio: Fix regression on detection of Roland VS-100
	ALSA: hda/realtek: Add quirks for some Clevo laptops
	ALSA: hda/realtek: Add quirk for Lenovo ZhaoYang CF4620Z
	xtensa: fix KASAN report for show_stack
	rcu: Fix rcu_torture_read ftrace event
	drm/etnaviv: fix reference leak when mmaping imported buffer
	drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub
	KVM: arm64: Disable interrupts while walking userspace PTs
	s390/uaccess: add missing earlyclobber annotations to __clear_user()
	KVM: VMX: Move preemption timer <=> hrtimer dance to common x86
	KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32
	KVM: x86: Purge "highest ISR" cache when updating APICv state
	zonefs: Fix error message in zonefs_file_dio_append()
	selftests/bpf: Test btf dump for struct with padding only fields
	libbpf: Fix BTF-to-C converter's padding logic
	selftests/bpf: Add few corner cases to test padding handling of btf_dump
	libbpf: Fix btf_dump's packed struct determination
	hsr: ratelimit only when errors are printed
	x86/PVH: avoid 32-bit build warning when obtaining VGA console info
	Linux 5.15.106

Change-Id: I3197b16c9f82b9bd6a17d4637a00b15e9bd5b873
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-05 14:15:04 +00:00
Greg Kroah-Hartman
d86dfc4d95 Linux 5.15.106
Link: https://lore.kernel.org/r/20230403140356.079638751@linuxfoundation.org
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Chris Paterson (CIP) <chris.paterson2@renesas.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Tested-by: Ron Economos <re@w6rz.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:02 +02:00
Jan Beulich
06a948b834 x86/PVH: avoid 32-bit build warning when obtaining VGA console info
commit aadbd07ff8 upstream.

In the commit referenced below I failed to pay attention to this code
also being buildable as 32-bit. Adjust the type of "ret" - there's no
real need for it to be wider than 32 bits.

Fixes: 934ef33ee7 ("x86/PVH: obtain VGA console info in Dom0")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Link: https://lore.kernel.org/r/2d2193ff-670b-0a27-e12d-2c5c4c121c79@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2023-04-05 11:25:02 +02:00
Matthieu Baerts
3abdf6d71f hsr: ratelimit only when errors are printed
commit 1b0120e4db upstream.

Recently, when automatically merging -net and net-next in MPTCP devel
tree, our CI reported [1] a conflict in hsr, the same as the one
reported by Stephen in netdev [2].

When looking at the conflict, I noticed it is in fact the v1 [3] that
has been applied in -net and the v2 [4] in net-next. Maybe the v1 was
applied by accident.

As mentioned by Jakub Kicinski [5], the new condition makes more sense
before the net_ratelimit(), not to update net_ratelimit's state which is
unnecessary if we're not going to print either way.

Here, this modification applies the v2 but in -net.

Link: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/4423171069 [1]
Link: https://lore.kernel.org/netdev/20230315100914.53fc1760@canb.auug.org.au/ [2]
Link: https://lore.kernel.org/netdev/20230307133229.127442-1-koverskeid@gmail.com/ [3]
Link: https://lore.kernel.org/netdev/20230309092302.179586-1-koverskeid@gmail.com/ [4]
Link: https://lore.kernel.org/netdev/20230308232001.2fb62013@kernel.org/ [5]
Fixes: 28e8cabe80 ("net: hsr: Don't log netdev_err message on unknown prp dst node")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Link: https://lore.kernel.org/r/20230315-net-20230315-hsr_framereg-ratelimit-v1-1-61d2ef176d11@tessares.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:02 +02:00
Andrii Nakryiko
fcc09ef87e libbpf: Fix btf_dump's packed struct determination
[ Upstream commit 4fb877aaa1 ]

Fix bug in btf_dump's logic of determining if a given struct type is
packed or not. The notion of "natural alignment" is not needed and is
even harmful in this case, so drop it altogether. The biggest difference
in btf_is_struct_packed() compared to its original implementation is
that we don't really use btf__align_of() to determine overall alignment
of a struct type (because it could be 1 for both packed and non-packed
struct, depending on specifci field definitions), and just use field's
actual alignment to calculate whether any field is requiring packing or
struct's size overall necessitates packing.

Add two simple test cases that demonstrate the difference this change
would make.

Fixes: ea2ce1ba99 ("libbpf: Fix BTF-to-C converter's padding logic")
Reported-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/20221215183605.4149488-1-andrii@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-05 11:25:02 +02:00
Andrii Nakryiko
74059587b2 selftests/bpf: Add few corner cases to test padding handling of btf_dump
[ Upstream commit b148c8b9b9 ]

Add few hand-crafted cases and few randomized cases found using script
from [0] that tests btf_dump's padding logic.

  [0] https://lore.kernel.org/bpf/85f83c333f5355c8ac026f835b18d15060725fcb.camel@ericsson.com/

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20221212211505.558851-7-andrii@kernel.org
Stable-dep-of: 4fb877aaa1 ("libbpf: Fix btf_dump's packed struct determination")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-05 11:25:02 +02:00
Andrii Nakryiko
c74ae8678d libbpf: Fix BTF-to-C converter's padding logic
[ Upstream commit ea2ce1ba99 ]

Turns out that btf_dump API doesn't handle a bunch of tricky corner
cases, as reported by Per, and further discovered using his testing
Python script ([0]).

This patch revamps btf_dump's padding logic significantly, making it
more correct and also avoiding unnecessary explicit padding, where
compiler would pad naturally. This overall topic turned out to be very
tricky and subtle, there are lots of subtle corner cases. The comments
in the code tries to give some clues, but comments themselves are
supposed to be paired with good understanding of C alignment and padding
rules. Plus some experimentation to figure out subtle things like
whether `long :0;` means that struct is now forced to be long-aligned
(no, it's not, turns out).

Anyways, Per's script, while not completely correct in some known
situations, doesn't show any obvious cases where this logic breaks, so
this is a nice improvement over the previous state of this logic.

Some selftests had to be adjusted to accommodate better use of natural
alignment rules, eliminating some unnecessary padding, or changing it to
`type: 0;` alignment markers.

Note also that for when we are in between bitfields, we emit explicit
bit size, while otherwise we use `: 0`, this feels much more natural in
practice.

Next patch will add few more test cases, found through randomized Per's
script.

  [0] https://lore.kernel.org/bpf/85f83c333f5355c8ac026f835b18d15060725fcb.camel@ericsson.com/

Reported-by: Per Sundström XP <per.xp.sundstrom@ericsson.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20221212211505.558851-6-andrii@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-05 11:25:01 +02:00
Eduard Zingerman
17a61d1e94 selftests/bpf: Test btf dump for struct with padding only fields
[ Upstream commit d503f1176b ]

Structures with zero regular fields but some padding constitute a
special case in btf_dump.c:btf_dump_emit_struct_def with regards to
newline before closing '}'.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221001104425.415768-2-eddyz87@gmail.com
Stable-dep-of: ea2ce1ba99 ("libbpf: Fix BTF-to-C converter's padding logic")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-05 11:25:01 +02:00
Damien Le Moal
6777291c7b zonefs: Fix error message in zonefs_file_dio_append()
commit 88b170088a upstream.

Since the expected write location in a sequential file is always at the
end of the file (append write), when an invalid write append location is
detected in zonefs_file_dio_append(), print the invalid written location
instead of the expected write location.

Fixes: a608da3bd7 ("zonefs: Detect append writes at invalid locations")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:01 +02:00
Sean Christopherson
71ab5c1d50 KVM: x86: Purge "highest ISR" cache when updating APICv state
commit 97a71c444a upstream.

Purge the "highest ISR" cache when updating APICv state on a vCPU.  The
cache must not be used when APICv is active as hardware may emulate EOIs
(and other operations) without exiting to KVM.

This fixes a bug where KVM will effectively block IRQs in perpetuity due
to the "highest ISR" never getting reset if APICv is activated on a vCPU
while an IRQ is in-service.  Hardware emulates the EOI and KVM never gets
a chance to update its cache.

Fixes: b26a695a1d ("kvm: lapic: Introduce APICv update helper function")
Cc: stable@vger.kernel.org
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230106011306.85230-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:01 +02:00
Sean Christopherson
61e0863dc8 KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32
commit ab52be1b31 upstream.

Reject attempts to set bits 63:32 for 32-bit x2APIC registers, i.e. all
x2APIC registers except ICR.  Per Intel's SDM:

  Non-zero writes (by WRMSR instruction) to reserved bits to these
  registers will raise a general protection fault exception

Opportunistically fix a typo in a nearby comment.

Reported-by: Marc Orr <marcorr@google.com>
Cc: stable@vger.kernel.org
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20230107011025.565472-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:01 +02:00
Sean Christopherson
4483dc41d1 KVM: VMX: Move preemption timer <=> hrtimer dance to common x86
commit 98c25ead5e upstream.

Handle the switch to/from the hypervisor/software timer when a vCPU is
blocking in common x86 instead of in VMX.  Even though VMX is the only
user of a hypervisor timer, the logic and all functions involved are
generic x86 (unless future CPUs do something completely different and
implement a hypervisor timer that runs regardless of mode).

Handling the switch in common x86 will allow for the elimination of the
pre/post_blocks hooks, and also lets KVM switch back to the hypervisor
timer if and only if it was in use (without additional params).  Add a
comment explaining why the switch cannot be deferred to kvm_sched_out()
or kvm_vcpu_block().

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20211208015236.1616697-8-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[ta: Fix conflicts in vmx_pre_block and vmx_post_block as per Paolo's
suggestion. Add Reported-by and Link tags.]
Reported-by: syzbot+b6a74be92b5063a0f1ff@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?id=489beb3d76ef14cc6cd18125782dc6f86051a605
Tested-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:01 +02:00
Heiko Carstens
a58d4e6671 s390/uaccess: add missing earlyclobber annotations to __clear_user()
commit 89aba4c26f upstream.

Add missing earlyclobber annotation to size, to, and tmp2 operands of the
__clear_user() inline assembly since they are modified or written to before
the last usage of all input operands. This can lead to incorrect register
allocation for the inline assembly.

Fixes: 6c2a9e6df6 ("[S390] Use alternative user-copy operations for new hardware.")
Reported-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/all/20230321122514.1743889-3-mark.rutland@arm.com/
Cc: stable@vger.kernel.org
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:01 +02:00
Marc Zyngier
1dfccde646 KVM: arm64: Disable interrupts while walking userspace PTs
commit e86fc1a3a3 upstream.

We walk the userspace PTs to discover what mapping size was
used there. However, this can race against the userspace tables
being freed, and we end-up in the weeds.

Thankfully, the mm code is being generous and will IPI us when
doing so. So let's implement our part of the bargain and disable
interrupts around the walk. This ensures that nothing terrible
happens during that time.

We still need to handle the removal of the page tables before
the walk. For that, allow get_user_mapping_size() to return an
error, and make sure this error can be propagated all the way
to the the exit handler.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230316174546.3777507-2-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:01 +02:00
Fangzhi Zuo
25e74e7281 drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub
commit f4f3b7dedb upstream.

Traditional synaptics hub has one MST branch device without virtual dpcd.
Synaptics cascaded hub has two chained MST branch devices. DSC decoding
is performed via root MST branch device, instead of the second MST branch
device.

Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:01 +02:00