From 6ca1e28c7f152eb8a03fd46345900a4c0c2634dd Mon Sep 17 00:00:00 2001 From: Sangmoon Kim Date: Wed, 21 Oct 2020 21:41:22 +0900 Subject: [PATCH 01/35] FROMLIST: char: misc: increase DYNAMIC_MINORS value DYNAMIC_MINORS value has been set to 64. Due to this reason, we are facing a module loading fail problem of device driver like below. [ 45.712771] pdic_misc_init - return error : -16 We need to increase this value for registering more misc devices. Signed-off-by: Sangmoon Kim Bug: 171370390 Link: https://lore.kernel.org/lkml/20201029070552.GA3062343@kroah.com/ Change-Id: I04ab486ce7674dde3118506c3d783f0e4e211bac Signed-off-by: Sangmoon Kim --- drivers/char/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/misc.c b/drivers/char/misc.c index f6a147427029..ca5141ed5ef3 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -60,7 +60,7 @@ static DEFINE_MUTEX(misc_mtx); /* * Assigned numbers, used for dynamic minors */ -#define DYNAMIC_MINORS 64 /* like dynamic majors */ +#define DYNAMIC_MINORS 128 /* like dynamic majors */ static DECLARE_BITMAP(misc_minors, DYNAMIC_MINORS); #ifdef CONFIG_PROC_FS From a273b843acd781a87995d294e39b8a45390b6aa0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 29 Oct 2020 17:42:30 +0100 Subject: [PATCH 02/35] ANDROID: ABI: update allowed list for galaxy Update Galaxy list of symbols with ones that are already in the .xml file to make further patches much smaller and easier to review. Bug: 171954519 Cc: Jeehong Kim Signed-off-by: Greg Kroah-Hartman Change-Id: Ic30a89e6254cddb7669a473e06263d2aef8f9703 --- android/abi_gki_aarch64_galaxy | 112 +++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/android/abi_gki_aarch64_galaxy b/android/abi_gki_aarch64_galaxy index 690d1f72c4b0..a885f2f6961a 100644 --- a/android/abi_gki_aarch64_galaxy +++ b/android/abi_gki_aarch64_galaxy @@ -38,6 +38,7 @@ __cpuhp_setup_state __cpuhp_setup_state_cpuslocked __dev_kfree_skb_any + __dev_kfree_skb_irq __devm_iio_device_register __devm_irq_alloc_descs __devm_of_phy_provider_register @@ -115,6 +116,7 @@ __pm_runtime_suspend __pm_runtime_use_autosuspend __pm_stay_awake + __printk_ratelimit __pskb_pull_tail __put_cred __put_page @@ -136,6 +138,7 @@ __sdhci_add_host __sg_page_iter_next __sg_page_iter_start + __skb_get_hash __skb_pad __spi_alloc_controller __spi_register_driver @@ -149,13 +152,17 @@ __tasklet_hi_schedule __tasklet_schedule __trace_bprintk + __trace_puts + __tracepoint_android_vh_ipi_stop __tracepoint_android_vh_is_fpsimd_save __tracepoint_android_vh_kfree_skb __tracepoint_android_vh_ptype_head __tracepoint_device_pm_callback_end __tracepoint_device_pm_callback_start + __tracepoint_gpu_mem_total __tracepoint_pelt_cfs_tp __tracepoint_suspend_resume + __tty_alloc_driver __tty_insert_flip_char __udelay __uio_register_device @@ -253,6 +260,7 @@ bitmap_zalloc blk_execute_rq_nowait blk_get_request + blk_lookup_devt blk_mq_rq_cpu blk_put_request blk_queue_bounce_limit @@ -262,6 +270,7 @@ blk_rq_map_user_iov blk_rq_unmap_user blk_verify_command + blkdev_get_by_dev blkdev_get_by_path blkdev_put blocking_notifier_call_chain @@ -289,10 +298,12 @@ bus_unregister bus_unregister_notifier cache_line_size + call_rcu cancel_delayed_work cancel_delayed_work_sync cancel_work_sync capable + cdc_parse_cdc_header cdev_add cdev_alloc cdev_del @@ -428,6 +439,7 @@ cpufreq_register_notifier cpufreq_table_index_unsorted cpufreq_unregister_driver + cpufreq_unregister_notifier cpuhp_tasks_frozen cpuidle_pause_and_lock cpuidle_resume_and_unlock @@ -435,6 +447,7 @@ cpumask_next_and cpus_read_lock cpus_read_unlock + crc16 crc32_le crc8 crc8_populate_msb @@ -444,10 +457,12 @@ crypto_register_rngs crypto_shash_digest crypto_unregister_rngs + csum_partial d_add d_drop d_instantiate d_make_root + d_path dapm_pinctrl_event dapm_regulator_event datagram_poll @@ -702,6 +717,7 @@ downgrade_write dput drain_workqueue + driver_attach driver_find driver_find_device driver_register @@ -935,7 +951,9 @@ eth_type_trans eth_validate_addr ether_setup + ethtool_convert_legacy_u32_to_link_mode ethtool_op_get_link + ethtool_op_get_ts_info event_triggers_call extcon_find_edev_by_node extcon_get_edev_by_phandle @@ -949,6 +967,8 @@ fb_mode_option fd_install fget + filp_close + filp_open find_get_pid find_last_bit find_next_bit @@ -972,6 +992,7 @@ free_pages_exact free_percpu free_percpu_irq + free_reserved_area freezing_slow_path freq_qos_add_request freq_qos_remove_request @@ -1000,6 +1021,7 @@ generic_file_read_iter generic_file_splice_read generic_handle_irq + generic_mii_ioctl generic_read_dir generic_shutdown_super genl_register_family @@ -1013,6 +1035,8 @@ get_pid_task get_random_bytes get_random_u32 + get_task_exe_file + get_task_mm get_task_pid get_thermal_instance get_unmapped_area @@ -1145,6 +1169,9 @@ idr_preload idr_remove idr_replace + ieee80211_channel_to_freq_khz + ieee80211_freq_khz_to_channel + ieee80211_get_channel_khz iget5_locked ignore_console_lock_warning ihold @@ -1297,6 +1324,7 @@ jiffies_64_to_clock_t jiffies_to_msecs jiffies_to_usecs + jiffies64_to_msecs kasprintf kern_path kernel_bind @@ -1428,6 +1456,7 @@ media_entity_pads_init media_entity_remove_links media_remove_intf_links + memblock_free memchr memcmp memcpy @@ -1441,6 +1470,9 @@ memweight mfd_add_devices mfd_remove_devices + mii_check_media + mii_ethtool_gset + mii_nway_restart mipi_dsi_create_packet mipi_dsi_dcs_set_display_brightness mipi_dsi_dcs_set_tear_off @@ -1464,6 +1496,7 @@ mmc_request_done mmc_send_tuning mmc_wait_for_req + mmput mod_delayed_work_on mod_node_page_state mod_timer @@ -1482,7 +1515,10 @@ napi_gro_flush napi_gro_receive napi_schedule_prep + netdev_err + netdev_info netdev_update_features + netdev_warn netif_carrier_off netif_carrier_on netif_device_attach @@ -1490,8 +1526,10 @@ netif_napi_add netif_napi_del netif_receive_skb + netif_receive_skb_list netif_rx netif_rx_ni + netif_schedule_queue netif_tx_wake_queue netlink_broadcast netlink_kernel_release @@ -1558,6 +1596,7 @@ of_get_child_by_name of_get_cpu_node of_get_dma_window + of_get_mac_address of_get_named_gpio_flags of_get_next_available_child of_get_next_child @@ -1780,8 +1819,11 @@ proc_symlink proto_register proto_unregister + pskb_expand_head put_device put_disk + put_pid + put_tty_driver put_unused_fd pwm_apply_state pwm_get_chip_data @@ -1938,12 +1980,14 @@ rtnl_lock rtnl_unlock save_stack_trace + save_stack_trace_tsk sched_clock sched_setscheduler sched_setscheduler_nocheck sched_show_task schedule schedule_timeout + schedule_timeout_interruptible schedule_timeout_uninterruptible scmd_printk scnprintf @@ -1997,6 +2041,7 @@ seq_putc seq_puts seq_read + seq_release set_anon_super set_cpus_allowed_ptr set_normalized_timespec64 @@ -2202,6 +2247,7 @@ sock_release sock_unregister sock_wfree + softnet_data sort spi_bus_type spi_controller_resume @@ -2293,6 +2339,12 @@ system_wq tasklet_init tasklet_kill + tcp_register_congestion_control + tcp_reno_cong_avoid + tcp_reno_ssthresh + tcp_reno_undo_cwnd + tcp_slow_start + tcp_unregister_congestion_control thermal_cdev_update thermal_cooling_device_unregister thermal_of_cooling_device_register @@ -2322,9 +2374,30 @@ try_module_get try_wait_for_completion tty_flip_buffer_push + tty_hangup tty_insert_flip_string_fixed_flag tty_kref_put + tty_ldisc_deref + tty_ldisc_ref + tty_port_close + tty_port_destroy + tty_port_hangup + tty_port_init + tty_port_open + tty_port_put + tty_port_register_device tty_port_tty_get + tty_port_tty_hangup + tty_port_tty_wakeup + tty_register_driver + tty_set_operations + tty_standard_install + tty_std_termios + tty_termios_baud_rate + tty_termios_copy_hw + tty_unregister_device + tty_unregister_driver + tty_vhangup typec_altmode_get_partner typec_altmode_update_active typec_get_drvdata @@ -2408,6 +2481,7 @@ usb_alloc_dev usb_alloc_streams usb_alloc_urb + usb_altnum_to_altsetting usb_amd_dev_put usb_amd_pt_check_port usb_amd_quirk_pll_check @@ -2417,8 +2491,10 @@ usb_asmedia_modifyflowcontrol usb_assign_descriptors usb_autopm_get_interface + usb_autopm_get_interface_async usb_autopm_get_interface_no_resume usb_autopm_put_interface + usb_autopm_put_interface_async usb_autopm_put_interface_no_suspend usb_bulk_msg usb_choose_configuration @@ -2469,6 +2545,7 @@ usb_get_current_frame_number usb_get_dev usb_get_dr_mode + usb_get_from_anchor usb_get_intf usb_get_maximum_speed usb_get_urb @@ -2497,6 +2574,7 @@ usb_kill_anchored_urbs usb_kill_urb usb_lock_device_for_reset + usb_match_id usb_match_one_id usb_os_desc_prepare_interf_dir usb_otg_state_string @@ -2522,15 +2600,48 @@ usb_sg_cancel usb_sg_init usb_sg_wait + usb_show_dynids usb_speed_string + usb_store_new_id usb_string usb_string_id usb_submit_urb usb_unanchor_urb usb_unlink_urb + usb_unpoison_urb usb_unregister_notify usb_wait_anchor_empty_timeout usb_wakeup_notification + usbnet_change_mtu + usbnet_defer_kevent + usbnet_disconnect + usbnet_get_drvinfo + usbnet_get_endpoints + usbnet_get_ethernet_addr + usbnet_get_link + usbnet_get_link_ksettings + usbnet_get_msglevel + usbnet_get_stats64 + usbnet_link_change + usbnet_manage_power + usbnet_nway_reset + usbnet_open + usbnet_probe + usbnet_read_cmd + usbnet_read_cmd_nopm + usbnet_resume + usbnet_set_link_ksettings + usbnet_set_msglevel + usbnet_skb_return + usbnet_start_xmit + usbnet_stop + usbnet_suspend + usbnet_tx_timeout + usbnet_unlink_rx_urbs + usbnet_update_max_qlen + usbnet_write_cmd + usbnet_write_cmd_async + usbnet_write_cmd_nopm user_path_at_empty usleep_range v4l_bound_align_image @@ -2668,6 +2779,7 @@ wake_up_process wakeup_source_add wakeup_source_register + wakeup_source_remove wakeup_source_unregister watchdog_init_timeout watchdog_register_device From d2a52d0eaaa1bfa70fe60612a48a636264824e44 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 20 Oct 2020 18:20:52 +0200 Subject: [PATCH 03/35] Revert "ANDROID: GKI: fix ABI breakage in module.h" This reverts commit db96212bdede8915d9769eddcd378f70a8e4d279 as it is not needed if we are able to update the Android KABI. Fixes: db96212bdede ("ANDROID: GKI: fix ABI breakage in module.h") Signed-off-by: Greg Kroah-Hartman Change-Id: Ic6f4f449e554240457e1f94c49b53fa158f0d00e --- include/linux/module.h | 8 ++------ kernel/module.c | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 5246cbce5881..4f71785d6bbd 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -346,11 +346,6 @@ struct klp_modinfo { }; #endif -struct module_kabi_preserve_1 { - u64 using_gplonly_symbols:1; - u64 free:63; -}; - struct module { enum module_state state; @@ -387,6 +382,7 @@ struct module { unsigned int num_gpl_syms; const struct kernel_symbol *gpl_syms; const s32 *gpl_crcs; + bool using_gplonly_symbols; #ifdef CONFIG_UNUSED_SYMBOLS /* unused exported symbols. */ @@ -520,7 +516,7 @@ struct module { struct error_injection_entry *ei_funcs; unsigned int num_ei_funcs; #endif - ANDROID_KABI_USE(1, struct module_kabi_preserve_1 m1); + ANDROID_KABI_RESERVE(1); ANDROID_KABI_RESERVE(2); ANDROID_KABI_RESERVE(3); ANDROID_KABI_RESERVE(4); diff --git a/kernel/module.c b/kernel/module.c index 36e15ead5a80..901a6e4158af 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1432,7 +1432,7 @@ static bool inherit_taint(struct module *mod, struct module *owner) if (!owner || !test_bit(TAINT_PROPRIETARY_MODULE, &owner->taints)) return true; - if (mod->m1.using_gplonly_symbols) { + if (mod->using_gplonly_symbols) { pr_err("%s: module using GPL-only symbols uses symbols from proprietary module %s.\n", mod->name, owner->name); return false; @@ -1471,7 +1471,7 @@ static const struct kernel_symbol *resolve_symbol(struct module *mod, goto unlock; if (license == GPL_ONLY) - mod->m1.using_gplonly_symbols = true; + mod->using_gplonly_symbols = true; if (!inherit_taint(mod, owner)) { sym = NULL; From aa445f97a0ef2223df9e3346f1964a01aa8c7e4a Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 20 Oct 2020 15:26:37 -0700 Subject: [PATCH 04/35] ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI 'struct fscrypt_operations' is only used by fs/crypto/ (which is always built-in) and by three filesystems (which are either built-in to GKI, in the case of ext4 and f2fs, or aren't supported by Android, in the case of ubifs). The only way a loadable module could use fscrypt_operations is if the module were a filesystem that used fs/crypto/, which isn't possible since KMI symbol list doesn't include anything in fs/crypto/. However, any change to struct fscrypt_operations changes the symbol CRC of most of the KMI functions exported by any files fs/*.c that include . This is because the definition of fscrypt_operations is visible to them, and in principle it's possible to get to fscrypt_operations from most VFS structs (e.g. inode->i_sb->s_cop), even though there's no reason to do so outside the crypto code. Work around this by putting the definition of struct fscrypt_operations behind #ifdef FSCRYPT_NEED_OPS, and only defining this in the files that actually need the definition. (It could be moved into a separate header instead, but this way keeps the diff from upstream smaller.) This will cause a one-time CRC change of all the affected KMI functions, but afterwards any changes to fscrypt_operations won't "break the KMI". Bug: 170265596 Test: re-generated the ABI, changed struct fscrypt_operations (and struct fscrypt_info as well, just in case), re-generated the ABI again, and verified it didn't change. Change-Id: Ib5dd49550aec81a64b3d6077a0aeb5747be908ff Signed-off-by: Eric Biggers Signed-off-by: Greg Kroah-Hartman --- fs/crypto/fscrypt_private.h | 1 + fs/ext4/ext4.h | 1 + fs/f2fs/f2fs.h | 1 + fs/ubifs/ubifs.h | 1 + include/linux/fscrypt.h | 6 ++++++ 5 files changed, 10 insertions(+) diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h index 588c61c274f5..ea28dd500d2b 100644 --- a/fs/crypto/fscrypt_private.h +++ b/fs/crypto/fscrypt_private.h @@ -11,6 +11,7 @@ #ifndef _FSCRYPT_PRIVATE_H #define _FSCRYPT_PRIVATE_H +#define FSCRYPT_NEED_OPS #include #include #include diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 75f97bf2e507..3ce93d7484cf 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -40,6 +40,7 @@ #include #endif +#define FSCRYPT_NEED_OPS #include #include diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 1cf0dde4799c..0ac02697ed1c 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -24,6 +24,7 @@ #include #include +#define FSCRYPT_NEED_OPS #include #include diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index bff682309fbe..5d20ba451463 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h @@ -31,6 +31,7 @@ #include #include +#define FSCRYPT_NEED_OPS #include #include "ubifs-media.h" diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index 0e28e81aee8a..f226673dd447 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -53,6 +53,7 @@ struct fscrypt_name { */ #define FS_CFLG_OWN_PAGES (1U << 1) +#ifdef FSCRYPT_NEED_OPS /* * crypto operations for filesystems */ @@ -74,6 +75,7 @@ struct fscrypt_operations { void (*get_devices)(struct super_block *sb, struct request_queue **devs); }; +#endif static inline bool fscrypt_has_encryption_key(const struct inode *inode) { @@ -97,6 +99,7 @@ static inline bool fscrypt_needs_contents_encryption(const struct inode *inode) return IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode); } +#ifdef FSCRYPT_NEED_OPS static inline const union fscrypt_context * fscrypt_get_dummy_context(struct super_block *sb) { @@ -104,6 +107,7 @@ fscrypt_get_dummy_context(struct super_block *sb) return NULL; return sb->s_cop->get_dummy_context(sb); } +#endif /* * When d_splice_alias() moves a directory's encrypted alias to its decrypted @@ -801,6 +805,7 @@ static inline int fscrypt_prepare_setattr(struct dentry *dentry, * -ENOKEY if the encryption key is missing, or another -errno code if a problem * occurred while setting up the encryption key. */ +#ifdef FSCRYPT_NEED_OPS static inline int fscrypt_prepare_symlink(struct inode *dir, const char *target, unsigned int len, @@ -816,6 +821,7 @@ static inline int fscrypt_prepare_symlink(struct inode *dir, return -ENAMETOOLONG; return 0; } +#endif /** * fscrypt_encrypt_symlink() - encrypt the symlink target if needed From 854f380681abaaf92deff25b65027dfe8d0f2fe7 Mon Sep 17 00:00:00 2001 From: Alessio Balsini Date: Tue, 27 Oct 2020 13:24:03 +0000 Subject: [PATCH 05/35] ANDROID: vfs: add d_canonical_path for stacked filesystem support Inotify does not currently know when a filesystem is acting as a wrapper around another fs. This means that inotify watchers will miss any modifications to the base file, as well as any made in a separate stacked fs that points to the same file. d_canonical_path solves this problem by allowing the fs to map a dentry to a path in the lower fs. Inotify can use it to find the appropriate place to watch to be informed of all changes to a file. Test: HiKey/X15 + Pie + android-mainline, and HiKey + AOSP Maser + android-mainline, directories under /sdcard created, output of mount is right, CTS test collecting device infor works Bug: 171780975 Change-Id: I09563baffad1711a045e45c1bd0bd8713c2cc0b6 Signed-off-by: Daniel Rosenberg [astrachan: Folded 34df4102216e ("ANDROID: fsnotify: Notify lower fs of open") into this patch] Signed-off-by: Alistair Strachan Signed-off-by: Yongqin Liu Signed-off-by: Alessio Balsini --- fs/notify/inotify/inotify_user.c | 16 ++++++++++++++-- include/linux/dcache.h | 1 + include/linux/fsnotify.h | 7 +++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 81ffc8629fc4..a8c3f31e5eca 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -701,6 +701,8 @@ SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname, struct fsnotify_group *group; struct inode *inode; struct path path; + struct path alteredpath; + struct path *canonical_path = &path; struct fd f; int ret; unsigned flags = 0; @@ -747,13 +749,23 @@ SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname, if (ret) goto fput_and_out; + /* support stacked filesystems */ + if (path.dentry && path.dentry->d_op) { + if (path.dentry->d_op->d_canonical_path) { + path.dentry->d_op->d_canonical_path(&path, + &alteredpath); + canonical_path = &alteredpath; + path_put(&path); + } + } + /* inode held in place by reference to path; group by fget on fd */ - inode = path.dentry->d_inode; + inode = canonical_path->dentry->d_inode; group = f.file->private_data; /* create/update an inode mark */ ret = inotify_update_watch(group, inode, mask); - path_put(&path); + path_put(canonical_path); fput_and_out: fdput(f); return ret; diff --git a/include/linux/dcache.h b/include/linux/dcache.h index a96334500f39..48f86c805676 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -151,6 +151,7 @@ struct dentry_operations { struct vfsmount *(*d_automount)(struct path *); int (*d_manage)(const struct path *, bool); struct dentry *(*d_real)(struct dentry *, const struct inode *); + void (*d_canonical_path)(const struct path *, struct path *); ANDROID_KABI_RESERVE(1); ANDROID_KABI_RESERVE(2); diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index a2d5d175d3c1..e018872b047c 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -262,6 +262,7 @@ static inline void fsnotify_modify(struct file *file) static inline void fsnotify_open(struct file *file) { const struct path *path = &file->f_path; + struct path lower_path; struct inode *inode = file_inode(file); __u32 mask = FS_OPEN; @@ -270,6 +271,12 @@ static inline void fsnotify_open(struct file *file) if (file->f_flags & __FMODE_EXEC) mask |= FS_OPEN_EXEC; + if (path->dentry->d_op && path->dentry->d_op->d_canonical_path) { + path->dentry->d_op->d_canonical_path(path, &lower_path); + fsnotify_parent(&lower_path, NULL, mask); + fsnotify(lower_path.dentry->d_inode, mask, &lower_path, FSNOTIFY_EVENT_PATH, NULL, 0); + path_put(&lower_path); + } fsnotify_path(inode, path, mask); } From 24ab59f6bb42d609543b913e2402137c35b39f35 Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Fri, 22 Apr 2016 00:00:48 -0700 Subject: [PATCH 06/35] ANDROID: fuse: Add support for d_canonical_path Allows FUSE to report to inotify that it is acting as a layered filesystem. The userspace component returns a string representing the location of the underlying file. If the string cannot be resolved into a path, the top level path is returned instead. Bug: 23904372 Bug: 171780975 Test: inotify on cuttlefish Change-Id: Iabdca0bbedfbff59e9c820c58636a68ef9683d9f Signed-off-by: Daniel Rosenberg Signed-off-by: Alessio Balsini --- fs/fuse/dev.c | 7 +++++++ fs/fuse/dir.c | 37 +++++++++++++++++++++++++++++++++++++ fs/fuse/fuse_i.h | 3 +++ include/uapi/linux/fuse.h | 1 + 4 files changed, 48 insertions(+) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 06dd38e76c62..18232eab80ed 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -1899,6 +1900,12 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud, err = copy_out_args(cs, req->args, nbytes); fuse_copy_finish(cs); + if (!err && req->in.h.opcode == FUSE_CANONICAL_PATH) { + char *path = (char *)req->args->out_args[0].value; + path[req->args->out_args[0].size - 1] = 0; + req->out.h.error = kern_path(path, 0, req->args->canonical_path); + } + spin_lock(&fpq->lock); clear_bit(FR_LOCKED, &req->flags); if (!fpq->connected) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index ee190119f45c..ebd1927b2f61 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -298,6 +298,42 @@ static int fuse_dentry_delete(const struct dentry *dentry) return time_before64(fuse_dentry_time(dentry), get_jiffies_64()); } +/* + * Get the canonical path. Since we must translate to a path, this must be done + * in the context of the userspace daemon, however, the userspace daemon cannot + * look up paths on its own. Instead, we handle the lookup as a special case + * inside of the write request. + */ +static void fuse_dentry_canonical_path(const struct path *path, struct path *canonical_path) { + struct inode *inode = d_inode(path->dentry); + struct fuse_conn *fc = get_fuse_conn(inode); + FUSE_ARGS(args); + char *path_name; + int err; + + path_name = (char*)__get_free_page(GFP_KERNEL); + if (!path_name) + goto default_path; + + args.opcode = FUSE_CANONICAL_PATH; + args.nodeid = get_node_id(inode); + args.in_numargs = 0; + args.out_numargs = 1; + args.out_args[0].size = PATH_MAX; + args.out_args[0].value = path_name; + args.canonical_path = canonical_path; + args.out_argvar = 1; + + err = fuse_simple_request(fc, &args); + free_page((unsigned long)path_name); + if (err > 0) + return; +default_path: + canonical_path->dentry = path->dentry; + canonical_path->mnt = path->mnt; + path_get(canonical_path); +} + const struct dentry_operations fuse_dentry_operations = { .d_revalidate = fuse_dentry_revalidate, .d_delete = fuse_dentry_delete, @@ -305,6 +341,7 @@ const struct dentry_operations fuse_dentry_operations = { .d_init = fuse_dentry_init, .d_release = fuse_dentry_release, #endif + .d_canonical_path = fuse_dentry_canonical_path, }; const struct dentry_operations fuse_root_dentry_operations = { diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index d7cde216fc87..bf040533bed3 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -253,6 +253,9 @@ struct fuse_args { struct fuse_in_arg in_args[3]; struct fuse_arg out_args[2]; void (*end)(struct fuse_conn *fc, struct fuse_args *args, int error); + + /* Path used for completing d_canonical_path */ + struct path *canonical_path; }; struct fuse_args_pages { diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index 373cada89815..0a88b2179fda 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h @@ -465,6 +465,7 @@ enum fuse_opcode { FUSE_COPY_FILE_RANGE = 47, FUSE_SETUPMAPPING = 48, FUSE_REMOVEMAPPING = 49, + FUSE_CANONICAL_PATH = 2016, /* CUSE specific operations */ CUSE_INIT = 4096, From b3d5bbd878b0cf6c582568a5a916f657a7aea556 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 27 Oct 2020 19:03:10 +0100 Subject: [PATCH 07/35] ANDROID: GKI: add vendor padding variable in struct sock Some vendors want to add things to 'struct sock', so give them a u64 where they can then have a pointer off to their private data and they can do whatever they want to do without breaking or changing any abi for anyone else. Note, usually an android trace hook is also needed to use this properly, so be aware that this will be required as well. Bug: 171013716 Signed-off-by: Greg Kroah-Hartman Change-Id: I8fdea13b185fba26010e2a2bf397d7982a8fa16e --- include/net/sock.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/net/sock.h b/include/net/sock.h index fb048b2c2c41..eb3c7e89b474 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -69,6 +69,7 @@ #include #include #include +#include /* * This structure really needs to be cleaned up. @@ -521,6 +522,8 @@ struct sock { ANDROID_KABI_RESERVE(6); ANDROID_KABI_RESERVE(7); ANDROID_KABI_RESERVE(8); + + ANDROID_VENDOR_DATA(1); }; enum sk_pacing { From 20dd49792aec66ffab7b046fa431700116dc121d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 28 Oct 2020 08:38:30 +0100 Subject: [PATCH 08/35] ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle Some vendors want to add a field when a 'sruct sock' is added so give a hook to handle this. Any memory allocated when trace_android_rvh_sk_alloc() is called needs to be freed when trace_android_rvh_sk_free() is called. Note, if trace_android_rvh_sk_alloc() fails, be sure to be able to handle this in trace_android_rvh_sk_free(), but that should not be an issue as that needs to be addressed in vendor code that runs for 'struct sock' objects that have been created before the vendor code is loaded no matter what. Bug: 171013716 Signed-off-by: Greg Kroah-Hartman Change-Id: I9ed93e8bffef3cd8fbde4d62fc14596764a85304 --- drivers/android/vendor_hooks.c | 2 ++ include/trace/hooks/net.h | 7 +++++++ net/core/sock.c | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index a1839ddcf05b..7c1467ac24e9 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -47,6 +47,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_wait_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_show_task); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kfree_skb); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sk_alloc); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sk_free); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_arch_set_freq_scale); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_init); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_set_priority); diff --git a/include/trace/hooks/net.h b/include/trace/hooks/net.h index fee1e84fa61a..669a2bc2be8a 100644 --- a/include/trace/hooks/net.h +++ b/include/trace/hooks/net.h @@ -13,14 +13,21 @@ struct packet_type; struct list_head; struct sk_buff; +struct sock; DECLARE_HOOK(android_vh_ptype_head, TP_PROTO(const struct packet_type *pt, struct list_head *vendor_pt), TP_ARGS(pt, vendor_pt)); DECLARE_HOOK(android_vh_kfree_skb, TP_PROTO(struct sk_buff *skb), TP_ARGS(skb)); +DECLARE_RESTRICTED_HOOK(android_rvh_sk_alloc, + TP_PROTO(struct sock *sock), TP_ARGS(sock), 1); +DECLARE_RESTRICTED_HOOK(android_rvh_sk_free, + TP_PROTO(struct sock *sock), TP_ARGS(sock), 1); #else #define trace_android_vh_ptype_head(pt, vendor_pt) #define trace_android_vh_kfree_skb(skb) +#define trace_android_rvh_sk_alloc(sock) +#define trace_android_rvh_sk_free(sock) #endif #endif /* _TRACE_HOOK_NET_VH_H */ /* This part must be outside protection */ diff --git a/net/core/sock.c b/net/core/sock.c index 919f1a1739e9..f87c9f7577fe 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -134,6 +134,7 @@ #include #include +#include #include #include @@ -1608,6 +1609,8 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, if (security_sk_alloc(sk, family, priority)) goto out_free; + trace_android_rvh_sk_alloc(sk); + if (!try_module_get(prot->owner)) goto out_free_sec; sk_tx_queue_clear(sk); @@ -1617,6 +1620,7 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, out_free_sec: security_sk_free(sk); + trace_android_rvh_sk_free(sk); out_free: if (slab != NULL) kmem_cache_free(slab, sk); @@ -1636,6 +1640,7 @@ static void sk_prot_free(struct proto *prot, struct sock *sk) cgroup_sk_free(&sk->sk_cgrp_data); mem_cgroup_sk_free(sk); security_sk_free(sk); + trace_android_rvh_sk_free(sk); if (slab != NULL) kmem_cache_free(slab, sk); else From 0bc7257c7fe5f3a4a025fd1c112bef2fbc62fcf5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 29 Oct 2020 12:44:32 +0100 Subject: [PATCH 09/35] ANDROID: GKI: add vendor padding variable in struct nf_conn Some vendors want to add things to 'struct nf_conn', so give them a u64 where they can then have a pointer off to their private data and they can do whatever they want to do without breaking or changing any abi for anyone else. Note, usually an android trace hook is also needed to use this properly, so be aware that this will be required as well. Bug: 171013716 Signed-off-by: Greg Kroah-Hartman Change-Id: I303d237116f2f1ef6035af98f00436278ec1c23b --- include/net/netfilter/nf_conntrack.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 90690e37a56f..2bde4065553a 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -105,6 +106,8 @@ struct nf_conn { /* Storage reserved for other modules, must be the last member */ union nf_conntrack_proto proto; + + ANDROID_VENDOR_DATA(1); }; static inline struct nf_conn * From 01435b2e919bf5fb121d5e9c35c90f00c4367904 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 29 Oct 2020 12:50:06 +0100 Subject: [PATCH 10/35] ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle Some vendors want to add a field when a 'sruct nf_conn' is added so give a hook to handle this. Any memory allocated when trace_android_rvh_nf_conn_alloc() is called needs to be freed when trace_android_rvh_nf_conn_free() is called. Note, if trace_android_rvh_nf_conn_alloc() fails, be sure to be able to handle this in trace_android_rvh_nf_conn_free(), but that should not be an issue as that needs to be addressed in vendor code that runs for 'struct nf_conn' objects that have been created before the vendor code is loaded no matter what. Bug: 171013716 Signed-off-by: Greg Kroah-Hartman Change-Id: I67a9be129150690f8c1961accf7d5cdf0d5d50cc --- drivers/android/vendor_hooks.c | 4 +++- include/trace/hooks/net.h | 8 ++++++++ net/netfilter/nf_conntrack_core.c | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 7c1467ac24e9..d95612b7d29a 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -49,6 +49,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kfree_skb); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sk_alloc); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sk_free); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_nf_conn_alloc); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_nf_conn_free); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_arch_set_freq_scale); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_init); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_set_priority); @@ -64,4 +66,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_printk_store); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_regs); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sysrq_crash); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group); \ No newline at end of file +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group); diff --git a/include/trace/hooks/net.h b/include/trace/hooks/net.h index 669a2bc2be8a..73ae65a10e57 100644 --- a/include/trace/hooks/net.h +++ b/include/trace/hooks/net.h @@ -14,6 +14,8 @@ struct packet_type; struct list_head; struct sk_buff; struct sock; +struct nf_conn; + DECLARE_HOOK(android_vh_ptype_head, TP_PROTO(const struct packet_type *pt, struct list_head *vendor_pt), TP_ARGS(pt, vendor_pt)); @@ -23,11 +25,17 @@ DECLARE_RESTRICTED_HOOK(android_rvh_sk_alloc, TP_PROTO(struct sock *sock), TP_ARGS(sock), 1); DECLARE_RESTRICTED_HOOK(android_rvh_sk_free, TP_PROTO(struct sock *sock), TP_ARGS(sock), 1); +DECLARE_RESTRICTED_HOOK(android_rvh_nf_conn_alloc, + TP_PROTO(struct nf_conn *nf_conn), TP_ARGS(nf_conn), 1); +DECLARE_RESTRICTED_HOOK(android_rvh_nf_conn_free, + TP_PROTO(struct nf_conn *nf_conn), TP_ARGS(nf_conn), 1); #else #define trace_android_vh_ptype_head(pt, vendor_pt) #define trace_android_vh_kfree_skb(skb) #define trace_android_rvh_sk_alloc(sock) #define trace_android_rvh_sk_free(sock) +#define trace_android_rvh_sk_alloc(nf_conn) +#define trace_android_rvh_sk_free(nf_conn) #endif #endif /* _TRACE_HOOK_NET_VH_H */ /* This part must be outside protection */ diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 200cdad3ff3a..3d4cf16dc0a9 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -1387,6 +1388,8 @@ __nf_conntrack_alloc(struct net *net, nf_ct_zone_add(ct, zone); + trace_android_rvh_nf_conn_alloc(ct); + /* Because we use RCU lookups, we set ct_general.use to zero before * this is inserted in any list. */ @@ -1420,6 +1423,7 @@ void nf_conntrack_free(struct nf_conn *ct) nf_ct_ext_free(ct); kmem_cache_free(nf_conntrack_cachep, ct); smp_mb__before_atomic(); + trace_android_rvh_nf_conn_free(ct); atomic_dec(&net->ct.count); } EXPORT_SYMBOL_GPL(nf_conntrack_free); From 0709341102f32edc3a801e5486e47ac8ac627eb4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 30 Oct 2020 10:00:02 +0100 Subject: [PATCH 11/35] ANDROID: GKI: add vendor padding variable in struct skb_shared_info Some vendors want to add things to 'struct skb_shared_info', so give them an array to place their data. Bug: 171013716 Signed-off-by: Greg Kroah-Hartman Change-Id: Ifaa5942550794b747e9624124c785a0bc85dfe17 --- include/linux/skbuff.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 89301656f985..f26daba301b0 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -41,6 +41,7 @@ #include #endif #include +#include /* The interface for checksum offload between the stack and networking drivers * is as follows... @@ -530,6 +531,8 @@ struct skb_shared_info { * remains valid until skb destructor */ void * destructor_arg; + ANDROID_VENDOR_DATA_ARRAY(1, 3); + /* must be last field, see pskb_expand_head() */ skb_frag_t frags[MAX_SKB_FRAGS]; }; From 95dc56610185b6183621dec7a43c2866ad5154c6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 30 Oct 2020 09:52:06 +0100 Subject: [PATCH 12/35] ANDROID: GKI: add Android ABI padding to struct nf_conn Try to mitigate potential future driver core api changes by adding padding to struct nf_conn; Bug: 151154716 Signed-off-by: Greg Kroah-Hartman Change-Id: Ib18a9a929d351c66556f1f27b217cbf22b733a10 --- include/net/netfilter/nf_conntrack.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 2bde4065553a..502a817bf792 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -107,6 +108,9 @@ struct nf_conn { /* Storage reserved for other modules, must be the last member */ union nf_conntrack_proto proto; + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_VENDOR_DATA(1); }; From d1f4f1327d9643212c81ad7957f4f3a40aaac631 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 31 Oct 2020 09:34:40 +0100 Subject: [PATCH 13/35] ANDROID: GKI: ABI update for Oct 31 KABI break Leaf changes summary: 3380 artifacts changed (154 filtered out) Changed leaf types summary: 282 (120 filtered out) leaf types changed Removed/Changed/Added functions summary: 0 Removed, 3052 Changed (32 filtered out), 0 Added function Removed/Changed/Added variables summary: 0 Removed, 46 Changed (2 filtered out), 0 Added variable 3052 functions with some sub-type change: 46 Changed variables: 'struct dentry_operations at dcache.h:139:1' changed: type size hasn't changed 1 data member insertion: 'void (const path*, path*)* dentry_operations::d_canonical_path', at offset 832 (in bits) at dcache.h:154:1 there are data member changes: 'u64 dentry_operations::android_kabi_reserved1' offset changed from 832 to 896 (in bits) (by +64 bits) 'u64 dentry_operations::android_kabi_reserved2' offset changed from 896 to 960 (in bits) (by +64 bits) 'u64 dentry_operations::android_kabi_reserved3' offset changed from 960 to 1024 (in bits) (by +64 bits) 'u64 dentry_operations::android_kabi_reserved4' offset changed from 1024 to 1088 (in bits) (by +64 bits) 3330 impacted interfaces 'struct inet_connection_sock at inet_connection_sock.h:87:1' changed (indirectly): type size changed from 11840 to 11904 (in bits) there are data member changes: type 'struct inet_sock' of 'inet_connection_sock::icsk_inet' changed: type size changed from 8320 to 8384 (in bits) there are data member changes: type 'struct sock' of 'inet_sock::sk' changed: type size changed from 6656 to 6720 (in bits) 1 data member insertion: 'u64 sock::android_vendor_data1', at offset 6656 (in bits) at sock.h:526:1 422 impacted interfaces 'ipv6_pinfo* inet_sock::pinet6' offset changed from 6656 to 6720 (in bits) (by +64 bits) '__be32 inet_sock::inet_saddr' offset changed from 6720 to 6784 (in bits) (by +64 bits) '__s16 inet_sock::uc_ttl' offset changed from 6752 to 6816 (in bits) (by +64 bits) '__u16 inet_sock::cmsg_flags' offset changed from 6768 to 6832 (in bits) (by +64 bits) '__be16 inet_sock::inet_sport' offset changed from 6784 to 6848 (in bits) (by +64 bits) '__u16 inet_sock::inet_id' offset changed from 6800 to 6864 (in bits) (by +64 bits) 'ip_options_rcu* inet_sock::inet_opt' offset changed from 6848 to 6912 (in bits) (by +64 bits) 'int inet_sock::rx_dst_ifindex' offset changed from 6912 to 6976 (in bits) (by +64 bits) '__u8 inet_sock::tos' offset changed from 6944 to 7008 (in bits) (by +64 bits) '__u8 inet_sock::min_ttl' offset changed from 6952 to 7016 (in bits) (by +64 bits) '__u8 inet_sock::mc_ttl' offset changed from 6960 to 7024 (in bits) (by +64 bits) '__u8 inet_sock::pmtudisc' offset changed from 6968 to 7032 (in bits) (by +64 bits) '__u8 inet_sock::nodefrag' offset changed from 6976 to 7040 (in bits) (by +64 bits) '__u8 inet_sock::rcv_tos' offset changed from 6992 to 7056 (in bits) (by +64 bits) '__u8 inet_sock::convert_csum' offset changed from 7000 to 7064 (in bits) (by +64 bits) 'int inet_sock::uc_index' offset changed from 7008 to 7072 (in bits) (by +64 bits) 'int inet_sock::mc_index' offset changed from 7040 to 7104 (in bits) (by +64 bits) '__be32 inet_sock::mc_addr' offset changed from 7072 to 7136 (in bits) (by +64 bits) 'ip_mc_socklist* inet_sock::mc_list' offset changed from 7104 to 7168 (in bits) (by +64 bits) 'inet_cork_full inet_sock::cork' offset changed from 7168 to 7232 (in bits) (by +64 bits) 2 impacted interfaces 'request_sock_queue inet_connection_sock::icsk_accept_queue' offset changed from 8320 to 8384 (in bits) (by +64 bits) 'inet_bind_bucket* inet_connection_sock::icsk_bind_hash' offset changed from 8960 to 9024 (in bits) (by +64 bits) 'unsigned long int inet_connection_sock::icsk_timeout' offset changed from 9024 to 9088 (in bits) (by +64 bits) 'timer_list inet_connection_sock::icsk_retransmit_timer' offset changed from 9088 to 9152 (in bits) (by +64 bits) 'timer_list inet_connection_sock::icsk_delack_timer' offset changed from 9536 to 9600 (in bits) (by +64 bits) '__u32 inet_connection_sock::icsk_rto' offset changed from 9984 to 10048 (in bits) (by +64 bits) '__u32 inet_connection_sock::icsk_pmtu_cookie' offset changed from 10016 to 10080 (in bits) (by +64 bits) 'const tcp_congestion_ops* inet_connection_sock::icsk_ca_ops' offset changed from 10048 to 10112 (in bits) (by +64 bits) 'const inet_connection_sock_af_ops* inet_connection_sock::icsk_af_ops' offset changed from 10112 to 10176 (in bits) (by +64 bits) 'const tcp_ulp_ops* inet_connection_sock::icsk_ulp_ops' offset changed from 10176 to 10240 (in bits) (by +64 bits) 'void* inet_connection_sock::icsk_ulp_data' offset changed from 10240 to 10304 (in bits) (by +64 bits) 'void (sock*, typedef u32)* inet_connection_sock::icsk_clean_acked' offset changed from 10304 to 10368 (in bits) (by +64 bits) 'hlist_node inet_connection_sock::icsk_listen_portaddr_node' offset changed from 10368 to 10432 (in bits) (by +64 bits) 'unsigned int (sock*, typedef u32)* inet_connection_sock::icsk_sync_mss' offset changed from 10496 to 10560 (in bits) (by +64 bits) '__u8 inet_connection_sock::icsk_ca_dst_locked' offset changed from 10560 to 10624 (in bits) (by +64 bits) '__u8 inet_connection_sock::icsk_retransmits' offset changed from 10568 to 10632 (in bits) (by +64 bits) '__u8 inet_connection_sock::icsk_pending' offset changed from 10576 to 10640 (in bits) (by +64 bits) '__u8 inet_connection_sock::icsk_backoff' offset changed from 10584 to 10648 (in bits) (by +64 bits) '__u8 inet_connection_sock::icsk_syn_retries' offset changed from 10592 to 10656 (in bits) (by +64 bits) '__u8 inet_connection_sock::icsk_probes_out' offset changed from 10600 to 10664 (in bits) (by +64 bits) '__u16 inet_connection_sock::icsk_ext_hdr_len' offset changed from 10608 to 10672 (in bits) (by +64 bits) 'struct {__u8 pending; __u8 quick; __u8 pingpong; __u8 blocked; __u32 ato; unsigned long int timeout; __u32 lrcvtime; __u16 last_seg_size; __u16 rcv_mss;} inet_connection_sock::icsk_ack' offset changed from 10624 to 10688 (in bits) (by +64 bits) 'struct {int enabled; int search_high; int search_low; int probe_size; u32 probe_timestamp;} inet_connection_sock::icsk_mtup' offset changed from 10816 to 10880 (in bits) (by +64 bits) 'u32 inet_connection_sock::icsk_user_timeout' offset changed from 10976 to 11040 (in bits) (by +64 bits) 'u64 inet_connection_sock::icsk_ca_priv[13]' offset changed from 11008 to 11072 (in bits) (by +64 bits) 2 impacted interfaces 'struct module at module.h:354:1' changed: type size hasn't changed 1 data member insertion: 'bool module::using_gplonly_symbols', at offset 2688 (in bits) at module.h:385:1 there are data member changes: anonymous data member union {module_kabi_preserve_1 m1; struct {u64 android_kabi_reserved1;} __UNIQUE_ID_android_kabi_hide201; union {};} at offset 6848 (in bits) became data member 'u64 module::android_kabi_reserved1' 'bool module::sig_ok' offset changed from 2688 to 2696 (in bits) (by +8 bits) 'bool module::async_probe_requested' offset changed from 2696 to 2704 (in bits) (by +8 bits) 3330 impacted interfaces 'struct nf_conn at nf_conntrack.h:58:1' changed: type size changed from 2048 to 2240 (in bits) 3 data member insertions: 'u64 nf_conn::android_kabi_reserved1', at offset 2048 (in bits) at nf_conntrack.h:111:1 'u64 nf_conn::android_kabi_reserved2', at offset 2112 (in bits) at nf_conntrack.h:112:1 'u64 nf_conn::android_vendor_data1', at offset 2176 (in bits) at nf_conntrack.h:114:1 422 impacted interfaces Signed-off-by: Greg Kroah-Hartman Change-Id: Iec13bb17711b4337d6810b6eac45f755497c6ed8 --- android/abi_gki_aarch64.xml | 9947 +++++++++++++++++------------------ 1 file changed, 4698 insertions(+), 5249 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 86c4dcbfb904..4e4a7efe0ff0 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -2,13 +2,13 @@ - - + + - - + + - + @@ -23,32 +23,32 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - + + + + - + @@ -56,68 +56,68 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - + - - - - + + + + - - - + + + - + - - - - - + + + + + - - + + - + - - + + @@ -129,100 +129,100 @@ - + - + - - - - - - - - + + + + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - - - - - + + + + + + + - + - - + + - - - + + + - - + + - - - - + + + + - + - - - - - - - - - + + + + + + + + + - + - - - - - - - + + + + + + + - - - - + + + + @@ -230,45 +230,45 @@ - + - + - - + + - + - + - - - + + + - + - + - - - - - - - - - + + + + + + + + + @@ -296,15 +296,15 @@ - - + + - + @@ -312,26 +312,26 @@ - + - - - - + + + + - + - - - - - - + + + + + + - + - + @@ -339,247 +339,247 @@ - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - - + + + - - - - - - - - - + + + + + + + + + - + - - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - + @@ -590,26 +590,26 @@ - + - - - - - - - - - + + + + + + + + + - + - - - + + + @@ -617,82 +617,82 @@ - + - - + + - + - - + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - + + - + - - - - - - - - - + + + + + + + + + - - + + - + - + - - + + - - - + + + @@ -707,108 +707,108 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -849,234 +849,234 @@ - - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1091,21 +1091,21 @@ - - - - - - - - + + + + + + + + - + - - - + + + @@ -1114,16 +1114,16 @@ - - - - - - - + + + + + + + - + @@ -1132,416 +1132,416 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - + + + - - + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - + - - - - - - + + + + + + - - - - + + + + - - - + + + - - + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - + + + + - + - + - + - + - + - - - + + + - - - - - - - + + + + + + + @@ -1556,141 +1556,141 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - + + + - + - - - + + + - - + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - + + - - - + + + - + @@ -1704,63 +1704,63 @@ - + - - + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + @@ -1773,10 +1773,10 @@ - - - - + + + + @@ -1785,121 +1785,121 @@ - + - - + + - - - + + + - - - - - - - - - + + + + + + + + + - - - + + + - - - - - - + + + + + + - - + + - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - + - - - - - - - + + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + @@ -1907,133 +1907,133 @@ - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - + + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - - - + + + @@ -2043,66 +2043,66 @@ - + - - - + + + - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + @@ -2115,15 +2115,15 @@ - - + + - + @@ -2141,25 +2141,25 @@ - - - - - + + + + + - - - + + + - - + + - - + + - - + + @@ -2177,28 +2177,28 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -2207,53 +2207,53 @@ - - - - + + + + - + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2276,99 +2276,99 @@ - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - + - - - - - - + + + + + + @@ -2377,192 +2377,192 @@ - - - - - - - - - + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - + - - + + - - - + + + - - - - + + + + - - - - + + + + - + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -2576,206 +2576,206 @@ - - - - - - + + + + + + - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2785,10 +2785,10 @@ - - - - + + + + @@ -2796,7 +2796,7 @@ - + @@ -2807,86 +2807,86 @@ - + - - - - + + + + - - - - + + + + - - - + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - + @@ -2908,9 +2908,9 @@ - - - + + + @@ -2918,127 +2918,127 @@ - - - - - - + + + + + + - + - + - - - + + + - - + + - + - + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - + - - + + @@ -3052,123 +3052,123 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - + + - + - - + + - + - - - - + + + + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -3194,144 +3194,144 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - + - - - - + + + + - + - + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3346,234 +3346,234 @@ - - - - - - - - + + + + + + + + - - + + - + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3582,10 +3582,10 @@ - + - + @@ -3594,7 +3594,7 @@ - + @@ -3617,17 +3617,17 @@ - - - - + + + + - - - + + + - - + + @@ -3636,52 +3636,52 @@ - - - - + + + + - - - - - - + + + + + + - + - - - - - + + + + + - - - - - - + + + + + + - + - - - - - + + + + + - + @@ -3689,234 +3689,234 @@ - + - - - - - - + + + + + + - + - + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - + - - + + - + - + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - + - - + + - - + + - - - + + + - + - - - - - - - - - - + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - + + - - - - + + + + - - - - + + + + - + @@ -3929,307 +3929,307 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - + - + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - + - - - - + + + + - - + + - - + + @@ -4244,28 +4244,28 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + @@ -4274,43 +4274,43 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -4344,88 +4344,88 @@ - + - + - + - + - - - + + + - + - + - - + + - - + + - - + + - + - + - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + @@ -4435,13 +4435,13 @@ - - + + - - - + + + @@ -4453,22 +4453,50 @@ - + - - + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4551,6 +4579,7 @@ + @@ -4560,7 +4589,6 @@ - @@ -4673,7 +4701,7 @@ - + @@ -4835,7 +4863,7 @@ - + @@ -4984,7 +5012,7 @@ - + @@ -5054,258 +5082,258 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -5321,38 +5349,38 @@ - + - + - + - + - + - + - - + + - + - + - + - + @@ -5405,202 +5433,205 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -6843,7 +6874,7 @@ - + @@ -7393,7 +7424,7 @@ - + @@ -7877,7 +7908,7 @@ - + @@ -8823,7 +8854,7 @@ - + @@ -9042,7 +9073,7 @@ - + @@ -10100,7 +10131,7 @@ - + @@ -10437,7 +10468,7 @@ - + @@ -10948,16 +10979,19 @@ - + - + - + - + + + + @@ -11345,7 +11379,7 @@ - + @@ -11374,7 +11408,7 @@ - + @@ -11422,7 +11456,7 @@ - + @@ -12151,30 +12185,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -12355,7 +12365,7 @@ - + @@ -12363,7 +12373,7 @@ - + @@ -12371,7 +12381,7 @@ - + @@ -12877,6 +12887,7 @@ + @@ -13938,6 +13949,11 @@ + + + + + @@ -14158,31 +14174,31 @@ - + - + - + - + - + - + - + - + - + - + @@ -14196,7 +14212,7 @@ - + @@ -14283,12 +14299,12 @@ - + - + - + @@ -14358,12 +14374,12 @@ - + - + - + @@ -14416,12 +14432,12 @@ - + - + - + @@ -14432,12 +14448,12 @@ - + - + - + @@ -14470,7 +14486,6 @@ - @@ -14821,11 +14836,11 @@ - + - + @@ -14877,7 +14892,7 @@ - + @@ -14906,7 +14921,7 @@ - + @@ -14914,7 +14929,7 @@ - + @@ -15316,6 +15331,23 @@ + + + + + + + + + + + + + + + + + @@ -15335,20 +15367,6 @@ - - - - - - - - - - - - - - @@ -16115,22 +16133,6 @@ - - - - - - - - - - - - - - - - @@ -16215,7 +16217,7 @@ - + @@ -16449,7 +16451,7 @@ - + @@ -17019,7 +17021,7 @@ - + @@ -17338,17 +17340,6 @@ - - - - - - - - - - - @@ -17425,7 +17416,6 @@ - @@ -17460,45 +17450,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -17536,7 +17487,6 @@ - @@ -17684,17 +17634,6 @@ - - - - - - - - - - - @@ -18416,28 +18355,28 @@ - + - + - + - + - + - + - + - + @@ -18448,12 +18387,12 @@ - + - + @@ -18535,7 +18474,7 @@ - + @@ -18786,7 +18725,7 @@ - + @@ -18917,7 +18856,7 @@ - + @@ -18926,7 +18865,7 @@ - + @@ -19163,7 +19102,7 @@ - + @@ -19304,7 +19243,7 @@ - + @@ -19422,7 +19361,7 @@ - + @@ -19905,7 +19844,7 @@ - + @@ -20119,44 +20058,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -20174,7 +20075,7 @@ - + @@ -20305,6 +20206,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -20526,7 +20465,7 @@ - + @@ -20649,7 +20588,7 @@ - + @@ -20658,7 +20597,7 @@ - + @@ -20935,7 +20874,7 @@ - + @@ -20957,7 +20896,7 @@ - + @@ -21642,7 +21581,7 @@ - + @@ -21650,7 +21589,7 @@ - + @@ -21664,7 +21603,6 @@ - @@ -22420,8 +22358,8 @@ - - + + @@ -22738,7 +22676,7 @@ - + @@ -23183,7 +23121,7 @@ - + @@ -23554,7 +23492,7 @@ - + @@ -24710,7 +24648,7 @@ - + @@ -24765,7 +24703,7 @@ - + @@ -26665,7 +26603,7 @@ - + @@ -26683,7 +26621,7 @@ - + @@ -27893,7 +27831,7 @@ - + @@ -28018,7 +27956,7 @@ - + @@ -28453,7 +28391,7 @@ - + @@ -28987,17 +28925,6 @@ - - - - - - - - - - - @@ -29037,7 +28964,6 @@ - @@ -29090,17 +29016,6 @@ - - - - - - - - - - - @@ -29174,7 +29089,6 @@ - @@ -30170,7 +30084,7 @@ - + @@ -32155,7 +32069,7 @@ - + @@ -33433,7 +33347,7 @@ - + @@ -33596,14 +33510,14 @@ - + - + @@ -33623,7 +33537,7 @@ - + @@ -33925,13 +33839,13 @@ - + - + @@ -33965,7 +33879,7 @@ - + @@ -34036,7 +33950,7 @@ - + @@ -34183,7 +34097,7 @@ - + @@ -34242,7 +34156,7 @@ - + @@ -34407,7 +34321,7 @@ - + @@ -36554,7 +36468,7 @@ - + @@ -37278,7 +37192,7 @@ - + @@ -37459,7 +37373,7 @@ - + @@ -37657,6 +37571,14 @@ + + + + + + + + @@ -38592,14 +38514,14 @@ - + - - + + @@ -38681,7 +38603,7 @@ - + @@ -38896,7 +38818,7 @@ - + @@ -39074,13 +38996,13 @@ - + - - + + @@ -39426,7 +39348,7 @@ - + @@ -39446,7 +39368,7 @@ - + @@ -39459,7 +39381,7 @@ - + @@ -39843,17 +39765,6 @@ - - - - - - - - - - - @@ -39975,7 +39886,6 @@ - @@ -40273,7 +40183,7 @@ - + @@ -40331,7 +40241,7 @@ - + @@ -40357,7 +40267,7 @@ - + @@ -40366,7 +40276,7 @@ - + @@ -40390,7 +40300,7 @@ - + @@ -40451,7 +40361,7 @@ - + @@ -40906,7 +40816,7 @@ - + @@ -41672,7 +41582,7 @@ - + @@ -42373,17 +42283,6 @@ - - - - - - - - - - - @@ -42447,7 +42346,6 @@ - @@ -42685,7 +42583,7 @@ - + @@ -42923,17 +42821,6 @@ - - - - - - - - - - - @@ -43134,7 +43021,6 @@ - @@ -43905,7 +43791,7 @@ - + @@ -44618,7 +44504,7 @@ - + @@ -44663,7 +44549,7 @@ - + @@ -44924,7 +44810,7 @@ - + @@ -44987,7 +44873,7 @@ - + @@ -46029,7 +45915,7 @@ - + @@ -46060,7 +45946,7 @@ - + @@ -46212,7 +46098,7 @@ - + @@ -46311,7 +46197,7 @@ - + @@ -46976,7 +46862,7 @@ - + @@ -46999,7 +46885,7 @@ - + @@ -47149,7 +47035,7 @@ - + @@ -47951,7 +47837,7 @@ - + @@ -48220,7 +48106,7 @@ - + @@ -48299,7 +48185,7 @@ - + @@ -48484,7 +48370,7 @@ - + @@ -48733,7 +48619,7 @@ - + @@ -48804,7 +48690,7 @@ - + @@ -48851,13 +48737,13 @@ - + - + @@ -48941,7 +48827,7 @@ - + @@ -48951,7 +48837,7 @@ - + @@ -49366,7 +49252,7 @@ - + @@ -49430,7 +49316,7 @@ - + @@ -49487,7 +49373,7 @@ - + @@ -49626,7 +49512,7 @@ - + @@ -49657,7 +49543,7 @@ - + @@ -49668,7 +49554,7 @@ - + @@ -49757,7 +49643,7 @@ - + @@ -49927,7 +49813,7 @@ - + @@ -49946,7 +49832,7 @@ - + @@ -49983,7 +49869,7 @@ - + @@ -50107,7 +49993,7 @@ - + @@ -50128,7 +50014,7 @@ - + @@ -50165,7 +50051,7 @@ - + @@ -50259,7 +50145,7 @@ - + @@ -50318,7 +50204,7 @@ - + @@ -51330,7 +51216,6 @@ - @@ -51390,6 +51275,7 @@ + @@ -52298,7 +52184,7 @@ - + @@ -52313,7 +52199,7 @@ - + @@ -52321,7 +52207,7 @@ - + @@ -52598,7 +52484,7 @@ - + @@ -52763,7 +52649,7 @@ - + @@ -52814,7 +52700,7 @@ - + @@ -53040,7 +52926,7 @@ - + @@ -53354,7 +53240,7 @@ - + @@ -53685,41 +53571,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -53923,7 +53774,7 @@ - + @@ -54828,9 +54679,9 @@ - + - + @@ -54859,12 +54710,12 @@ - + - + @@ -55258,7 +55109,7 @@ - + @@ -55282,19 +55133,8 @@ - - - - - - - - - - - - - + + @@ -55439,12 +55279,12 @@ - + - + - + @@ -55456,7 +55296,7 @@ - + @@ -55466,7 +55306,7 @@ - + @@ -55727,7 +55567,6 @@ - @@ -56109,7 +55948,7 @@ - + @@ -56373,7 +56212,7 @@ - + @@ -56395,7 +56234,7 @@ - + @@ -56405,7 +56244,7 @@ - + @@ -56413,17 +56252,17 @@ - + - + - + @@ -56437,16 +56276,16 @@ - + - + - + @@ -56461,7 +56300,7 @@ - + @@ -56476,7 +56315,7 @@ - + @@ -56485,17 +56324,17 @@ - + - + - + @@ -56541,7 +56380,7 @@ - + @@ -56549,13 +56388,13 @@ - + - + @@ -56575,7 +56414,7 @@ - + @@ -56968,7 +56807,7 @@ - + @@ -56978,7 +56817,7 @@ - + @@ -57668,7 +57507,7 @@ - + @@ -57923,7 +57762,7 @@ - + @@ -57935,7 +57774,7 @@ - + @@ -58268,7 +58107,7 @@ - + @@ -58647,7 +58486,7 @@ - + @@ -58678,7 +58517,7 @@ - + @@ -58687,7 +58526,7 @@ - + @@ -59194,547 +59033,550 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -59760,167 +59602,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -60017,41 +59698,41 @@ - + - + - + - + - - + + - + - + - + - + - + - + - + - + @@ -60128,7 +59809,7 @@ - + @@ -60157,7 +59838,7 @@ - + @@ -61085,7 +60766,7 @@ - + @@ -61291,9 +60972,9 @@ - - - + + + @@ -61416,7 +61097,7 @@ - + @@ -61430,7 +61111,7 @@ - + @@ -61472,7 +61153,7 @@ - + @@ -62675,7 +62356,7 @@ - + @@ -63235,8 +62916,8 @@ - - + + @@ -63245,7 +62926,7 @@ - + @@ -63314,7 +62995,7 @@ - + @@ -63322,7 +63003,7 @@ - + @@ -63627,7 +63308,7 @@ - + @@ -63702,12 +63383,12 @@ - + - + @@ -63734,7 +63415,7 @@ - + @@ -64432,15 +64113,15 @@ - + - + - + - + @@ -64451,7 +64132,7 @@ - + @@ -64459,7 +64140,7 @@ - + @@ -64467,15 +64148,15 @@ - + - + - + - + @@ -64483,48 +64164,48 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -64532,15 +64213,15 @@ - + - + - + - + @@ -64548,34 +64229,34 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -64738,17 +64419,6 @@ - - - - - - - - - - - @@ -64778,7 +64448,7 @@ - + @@ -64858,7 +64528,6 @@ - @@ -64911,17 +64580,6 @@ - - - - - - - - - - - @@ -64979,7 +64637,6 @@ - @@ -65294,7 +64951,7 @@ - + @@ -65504,7 +65161,7 @@ - + @@ -65583,7 +65240,7 @@ - + @@ -65653,7 +65310,7 @@ - + @@ -66074,7 +65731,7 @@ - + @@ -66096,7 +65753,7 @@ - + @@ -66105,7 +65762,7 @@ - + @@ -67351,7 +67008,7 @@ - + @@ -67630,7 +67287,7 @@ - + @@ -67702,7 +67359,7 @@ - + @@ -68674,12 +68331,12 @@ - + - + @@ -69632,7 +69289,7 @@ - + @@ -70829,7 +70486,7 @@ - + @@ -71484,8 +71141,6 @@ - - @@ -72029,7 +71684,7 @@ - + @@ -72815,7 +72470,7 @@ - + @@ -72829,7 +72484,7 @@ - + @@ -73019,7 +72674,7 @@ - + @@ -73029,20 +72684,20 @@ - + - + - + @@ -73335,13 +72990,13 @@ - + - + @@ -73453,7 +73108,7 @@ - + @@ -73623,7 +73278,7 @@ - + @@ -73761,7 +73416,7 @@ - + @@ -73820,12 +73475,12 @@ - + - + @@ -73877,7 +73532,7 @@ - + @@ -74321,7 +73976,7 @@ - + @@ -74333,7 +73988,7 @@ - + @@ -74350,7 +74005,7 @@ - + @@ -74381,7 +74036,7 @@ - + @@ -74559,17 +74214,6 @@ - - - - - - - - - - - @@ -74663,12 +74307,12 @@ - + - + @@ -74849,7 +74493,6 @@ - @@ -75086,7 +74729,7 @@ - + @@ -76022,19 +75665,19 @@ - + - + - + @@ -76119,7 +75762,7 @@ - + @@ -76339,7 +75982,7 @@ - + @@ -77398,17 +77041,6 @@ - - - - - - - - - - - @@ -77420,7 +77052,6 @@ - @@ -77501,7 +77132,7 @@ - + @@ -77963,7 +77594,7 @@ - + @@ -78437,7 +78068,7 @@ - + @@ -78447,7 +78078,7 @@ - + @@ -78486,7 +78117,7 @@ - + @@ -78507,7 +78138,7 @@ - + @@ -78540,12 +78171,12 @@ - + - + @@ -78634,7 +78265,7 @@ - + @@ -78646,7 +78277,7 @@ - + @@ -79510,17 +79141,6 @@ - - - - - - - - - - - @@ -79589,20 +79209,8 @@ - - - - - - - - - - - - @@ -79615,7 +79223,6 @@ - @@ -79854,7 +79461,7 @@ - + @@ -81228,17 +80835,6 @@ - - - - - - - - - - - @@ -81574,6 +81170,17 @@ + + + + + + + + + + + @@ -81932,7 +81539,7 @@ - + @@ -81978,7 +81585,7 @@ - + @@ -82057,7 +81664,7 @@ - + @@ -82310,7 +81917,7 @@ - + @@ -83421,7 +83028,7 @@ - + @@ -83444,7 +83051,7 @@ - + @@ -83811,13 +83418,13 @@ - + - + @@ -83860,7 +83467,7 @@ - + @@ -83885,7 +83492,7 @@ - + @@ -83893,7 +83500,7 @@ - + @@ -84145,7 +83752,7 @@ - + @@ -84543,30 +84150,30 @@ - + - + - + - + - + @@ -84625,13 +84232,13 @@ - + - + @@ -85287,7 +84894,7 @@ - + @@ -85296,12 +84903,12 @@ - + - + @@ -85336,7 +84943,7 @@ - + @@ -85345,7 +84952,7 @@ - + @@ -85433,13 +85040,13 @@ - + - + @@ -85489,7 +85096,7 @@ - + @@ -85722,14 +85329,14 @@ - + - + @@ -86536,7 +86143,7 @@ - + @@ -86612,7 +86219,7 @@ - + @@ -86620,7 +86227,7 @@ - + @@ -86631,21 +86238,21 @@ - + - + - + @@ -86654,7 +86261,7 @@ - + @@ -86667,7 +86274,7 @@ - + @@ -86678,26 +86285,26 @@ - + - + - + - + @@ -86739,7 +86346,7 @@ - + @@ -86758,14 +86365,14 @@ - + - + @@ -86776,7 +86383,7 @@ - + @@ -86840,7 +86447,7 @@ - + @@ -86902,7 +86509,7 @@ - + @@ -86949,14 +86556,14 @@ - + - + @@ -87031,7 +86638,7 @@ - + @@ -87096,17 +86703,6 @@ - - - - - - - - - - - @@ -87145,7 +86741,6 @@ - @@ -87556,32 +87151,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -87685,7 +87254,7 @@ - + @@ -87694,7 +87263,7 @@ - + @@ -87725,6 +87294,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87746,13 +87341,13 @@ - + - + @@ -87794,7 +87389,7 @@ - + @@ -87844,7 +87439,7 @@ - + @@ -87877,7 +87472,7 @@ - + @@ -87910,7 +87505,7 @@ - + @@ -88014,14 +87609,6 @@ - - - - - - - - @@ -88142,7 +87729,7 @@ - + @@ -88411,7 +87998,7 @@ - + @@ -88434,7 +88021,7 @@ - + @@ -88535,7 +88122,7 @@ - + @@ -88567,11 +88154,11 @@ - + - + @@ -88714,18 +88301,15 @@ - + - + - + - - - - + @@ -88753,6 +88337,14 @@ + + + + + + + + @@ -88966,7 +88558,7 @@ - + @@ -89095,17 +88687,6 @@ - - - - - - - - - - - @@ -89160,7 +88741,7 @@ - + @@ -89168,7 +88749,7 @@ - + @@ -89190,7 +88771,7 @@ - + @@ -89313,7 +88894,7 @@ - + @@ -89329,7 +88910,7 @@ - + @@ -89423,7 +89004,6 @@ - @@ -89452,8 +89032,12 @@ + + + + @@ -89702,7 +89286,7 @@ - + @@ -89844,7 +89428,7 @@ - + @@ -90189,45 +89773,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -90263,18 +89808,8 @@ - - - - - - - - - - @@ -90323,47 +89858,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -90592,7 +90091,7 @@ - + @@ -90602,7 +90101,7 @@ - + @@ -90868,7 +90367,24 @@ - + + + + + + + + + + + + + + + + + + @@ -90900,23 +90416,11 @@ - - - - - - - - - - - - @@ -91016,7 +90520,7 @@ - + @@ -91081,11 +90585,7 @@ - - - - @@ -91156,7 +90656,7 @@ - + @@ -91833,7 +91333,7 @@ - + @@ -92024,7 +91524,7 @@ - + @@ -92258,17 +91758,6 @@ - - - - - - - - - - - @@ -92359,7 +91848,6 @@ - @@ -92610,22 +92098,10 @@ - - - - - - - - - - - - @@ -92757,7 +92233,7 @@ - + @@ -93307,7 +92783,7 @@ - + @@ -93421,7 +92897,7 @@ - + @@ -93834,6 +93310,7 @@ + @@ -94756,7 +94233,7 @@ - + @@ -94796,7 +94273,7 @@ - + @@ -95853,7 +95330,7 @@ - + @@ -95975,7 +95452,7 @@ - + @@ -96014,7 +95491,7 @@ - + @@ -99129,18 +98606,18 @@ - + - + - + - + - + @@ -99554,7 +99031,7 @@ - + @@ -100047,13 +99524,13 @@ - + - + - + @@ -100095,7 +99572,7 @@ - + @@ -100127,7 +99604,7 @@ - + @@ -100274,7 +99751,7 @@ - + @@ -100524,7 +100001,7 @@ - + @@ -100811,7 +100288,7 @@ - + @@ -101132,7 +100609,7 @@ - + @@ -101512,7 +100989,7 @@ - + @@ -101548,7 +101025,7 @@ - + @@ -102166,19 +101643,8 @@ - - - - - - - - - - - - + @@ -102251,7 +101717,7 @@ - + @@ -102475,7 +101941,7 @@ - + @@ -102483,7 +101949,7 @@ - + @@ -102547,7 +102013,7 @@ - + @@ -102607,14 +102073,14 @@ - + - + @@ -102645,7 +102111,7 @@ - + @@ -102749,7 +102215,7 @@ - + @@ -102990,7 +102456,7 @@ - + @@ -103237,7 +102703,6 @@ - @@ -104270,7 +103735,7 @@ - + @@ -104286,7 +103751,7 @@ - + @@ -104294,7 +103759,7 @@ - + @@ -104308,7 +103773,7 @@ - + @@ -104316,7 +103781,7 @@ - + @@ -104324,8 +103789,7 @@ - - + @@ -104720,32 +104184,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -104767,12 +104205,12 @@ - + - + @@ -104797,8 +104235,6 @@ - - @@ -104857,7 +104293,6 @@ - @@ -105122,24 +104557,13 @@ - + - - - - - - - - - - - @@ -105220,7 +104644,6 @@ - @@ -107049,7 +106472,7 @@ - + @@ -107338,26 +106761,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -107465,6 +106868,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -107687,6 +107110,23 @@ + + + + + + + + + + + + + + + + + @@ -108114,7 +107554,7 @@ - + @@ -108159,7 +107599,7 @@ - + @@ -108237,22 +107677,6 @@ - - - - - - - - - - - - - - - - @@ -108401,7 +107825,7 @@ - + @@ -108810,7 +108234,7 @@ - + @@ -108869,17 +108293,6 @@ - - - - - - - - - - - @@ -108910,7 +108323,6 @@ - @@ -109033,17 +108445,39 @@ - + + + + + + + + + + + + + + + - + - - - - - - + + + + + + + + + + + + + + @@ -109051,15 +108485,15 @@ - - + + - - + + - + @@ -109067,100 +108501,100 @@ - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + @@ -109221,14 +108655,6 @@ - - - - - - - - @@ -109279,7 +108705,7 @@ - + @@ -109352,7 +108778,7 @@ - + @@ -109485,7 +108911,7 @@ - + @@ -109615,119 +109041,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -109745,7 +109171,7 @@ - + @@ -109760,10 +109186,10 @@ - + - + @@ -109787,249 +109213,241 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - @@ -110247,56 +109665,56 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -110508,50 +109926,50 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -110560,78 +109978,78 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -110655,7 +110073,7 @@ - + @@ -110664,25 +110082,25 @@ - + - + - + - + - + - + - + @@ -110724,7 +110142,7 @@ - + @@ -110804,6 +110222,14 @@ + + + + + + + + @@ -111343,14 +110769,6 @@ - - - - - - - - @@ -111522,7 +110940,7 @@ - + @@ -111539,7 +110957,7 @@ - + @@ -111551,7 +110969,7 @@ - + @@ -111624,7 +111042,7 @@ - + @@ -111638,14 +111056,6 @@ - - - - - - - - @@ -111795,7 +111205,7 @@ - + @@ -111810,27 +111220,40 @@ - + - + - + - + - + + + + + + - + + + + + + + + + @@ -111844,7 +111267,6 @@ - @@ -111893,7 +111315,7 @@ - + @@ -111901,26 +111323,26 @@ - + - + - + - + @@ -112113,7 +111535,7 @@ - + @@ -112147,7 +111569,7 @@ - + @@ -112324,7 +111746,7 @@ - + @@ -112534,7 +111956,7 @@ - + @@ -112563,50 +111985,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -113026,7 +112404,7 @@ - + @@ -113384,7 +112762,7 @@ - + @@ -113458,7 +112836,7 @@ - + @@ -113500,12 +112878,12 @@ - + - + @@ -113573,7 +112951,7 @@ - + @@ -113603,7 +112981,7 @@ - + @@ -113616,13 +112994,13 @@ - + - + @@ -113639,7 +113017,7 @@ - + @@ -113655,14 +113033,14 @@ - + - + @@ -113679,7 +113057,7 @@ - + @@ -113695,12 +113073,12 @@ - + - + @@ -114320,52 +113698,52 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -114406,82 +113784,82 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -114506,6 +113884,14 @@ + + + + + + + + @@ -114673,9 +114059,9 @@ - - - + + + @@ -114841,51 +114227,60 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + @@ -114901,24 +114296,24 @@ - + - + - + - + - + - + - + @@ -114948,7 +114343,7 @@ - + @@ -115016,9 +114411,9 @@ - + - + @@ -115164,7 +114559,7 @@ - + @@ -115175,7 +114570,7 @@ - + @@ -115486,7 +114881,7 @@ - + @@ -115595,7 +114990,7 @@ - + @@ -115913,6 +115308,7 @@ + @@ -115948,14 +115344,14 @@ - + - + @@ -116052,7 +115448,7 @@ - + @@ -116349,7 +115745,7 @@ - + @@ -116891,15 +116287,15 @@ - + - + - + - + @@ -117041,7 +116437,7 @@ - + @@ -117555,6 +116951,14 @@ + + + + + + + + @@ -117642,7 +117046,7 @@ - + @@ -117677,6 +117081,17 @@ + + + + + + + + + + + @@ -117686,7 +117101,7 @@ - + @@ -117701,7 +117116,7 @@ - + @@ -118057,7 +117472,7 @@ - + @@ -118337,7 +117752,7 @@ - + @@ -118373,7 +117788,7 @@ - + @@ -118506,7 +117921,7 @@ - + @@ -118558,13 +117973,13 @@ - + - + @@ -118704,7 +118119,7 @@ - + @@ -118747,7 +118162,7 @@ - + @@ -118766,7 +118181,7 @@ - + @@ -118794,17 +118209,6 @@ - - - - - - - - - - - @@ -119012,27 +118416,27 @@ - + - + - + - + @@ -119731,7 +119135,7 @@ - + @@ -119784,7 +119188,7 @@ - + @@ -119798,7 +119202,7 @@ - + @@ -119817,7 +119221,7 @@ - + @@ -119841,7 +119245,7 @@ - + @@ -119967,7 +119371,7 @@ - + @@ -119984,7 +119388,7 @@ - + @@ -120475,7 +119879,7 @@ - + @@ -120764,7 +120168,7 @@ - + @@ -120778,7 +120182,7 @@ - + @@ -120786,7 +120190,7 @@ - + @@ -120952,7 +120356,7 @@ - + @@ -120971,7 +120375,7 @@ - + @@ -121001,7 +120405,7 @@ - + @@ -121147,7 +120551,7 @@ - + @@ -121197,7 +120601,7 @@ - + @@ -121309,7 +120713,7 @@ - + @@ -121355,7 +120759,7 @@ - + @@ -122232,7 +121636,6 @@ - @@ -122245,7 +121648,7 @@ - + @@ -122293,7 +121696,7 @@ - + @@ -122311,8 +121714,16 @@ + + + + + + + + - + @@ -122460,7 +121871,7 @@ - + @@ -122756,12 +122167,12 @@ - + - + @@ -123033,8 +122444,24 @@ + + + + + + + + + + + + + + + + - + @@ -123078,7 +122505,7 @@ - + @@ -123110,7 +122537,7 @@ - + @@ -123618,7 +123045,7 @@ - + @@ -123639,8 +123066,8 @@ - - + + @@ -123707,7 +123134,7 @@ - + @@ -123773,20 +123200,42 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + @@ -124040,7 +123489,7 @@ - + @@ -124333,7 +123782,7 @@ - + @@ -124878,7 +124327,7 @@ - + @@ -125821,7 +125270,7 @@ - + @@ -126643,7 +126092,7 @@ - + @@ -126680,7 +126129,7 @@ - + @@ -126978,7 +126427,7 @@ - + @@ -127040,7 +126489,7 @@ - + @@ -127632,7 +127081,7 @@ - + @@ -127698,13 +127147,13 @@ - + - + @@ -129408,7 +128857,7 @@ - + @@ -130047,6 +129496,6 @@ From 40799f06ce89fef7f7c281505ea4c7fab06033dd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 31 Oct 2020 12:21:18 +0100 Subject: [PATCH 14/35] ANDROID: Input: bump SW_MAX up to 0x3f Bump the userspace-facing value of SW_MAX from 0x10 to 0x3f, allowing out-of-tree input drivers to use the increased space to send input codes to userspace safely. Note, there are no new reserved input code values, so any out-of-tree numbers are not guaranteed to ever remain stable over time, but this allows those drivers to work properly before they get merged upstream to claim a reserved number. Be aware that if you use this increased numberspace, your values will change going forward to new Android and kernel versions, you have been warned. This gives us the free-space for 0x2f new values, which should be enough for a few years grace-period :) This changes the CRC of a number of functions, but no variable sizes have changed: Leaf changes summary: 36 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 36 Changed, 0 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 36 functions with some sub-type change: [C] 'function cec_adapter* cec_allocate_adapter(const cec_adap_ops*, void*, const char*, u32, u8)' at cec-core.c:253:1 has some sub-type changes: [C] 'function void cec_delete_adapter(cec_adapter*)' at cec-core.c:431:1 has some sub-type changes: [C] 'function void cec_received_msg_ts(cec_adapter*, cec_msg*, ktime_t)' at cec-adap.c:1036:1 has some sub-type changes: [C] 'function int cec_register_adapter(cec_adapter*, device*)' at cec-core.c:342:1 has some sub-type changes: [C] 'function void cec_s_phys_addr(cec_adapter*, unsigned short int, bool)' at cec.h:279:1 has some sub-type changes: [C] 'function void cec_s_phys_addr_from_edid(cec_adapter*, const edid*)' at cec-adap.c:1616:1 has some sub-type changes: [C] 'function void cec_transmit_attempt_done_ts(cec_adapter*, u8, ktime_t)' at cec-adap.c:688:1 has some sub-type changes: [C] 'function void cec_transmit_done_ts(cec_adapter*, u8, u8, u8, u8, u8, ktime_t)' at cec-adap.c:591:1 has some sub-type changes: [C] 'function void cec_unregister_adapter(cec_adapter*)' at cec-core.c:412:1 has some sub-type changes: [C] 'function input_dev* devm_input_allocate_device(device*)' at input.h:352:1 has some sub-type changes: [C] 'function void input_alloc_absinfo(input_dev*)' at input.h:466:1 has some sub-type changes: [C] 'function input_dev* input_allocate_device()' at input.h:351:1 has some sub-type changes: [C] 'function void input_close_device(input_handle*)' at input.h:404:1 has some sub-type changes: [C] 'function void input_event(input_dev*, unsigned int, unsigned int, int)' at input.h:411:1 has some sub-type changes: [C] 'function int input_ff_create(input_dev*, unsigned int)' at input.h:555:1 has some sub-type changes: [C] 'function int input_ff_create_memless(input_dev*, void*, int (input_dev*, void*, ff_effect*)*)' at input.h:564:1 has some sub-type changes: [C] 'function void input_ff_destroy(input_dev*)' at input.h:556:1 has some sub-type changes: [C] 'function void input_free_device(input_dev*)' at input.h:353:1 has some sub-type changes: [C] 'function void input_mt_destroy_slots(input_dev*)' at mt.h:78:1 has some sub-type changes: [C] 'function int input_mt_get_slot_by_key(input_dev*, int)' at mt.h:122:1 has some sub-type changes: [C] 'function int input_mt_init_slots(input_dev*, unsigned int, unsigned int)' at mt.h:76:1 has some sub-type changes: [C] 'function void input_mt_report_pointer_emulation(input_dev*, bool)' at mt.h:104:1 has some sub-type changes: [C] 'function bool input_mt_report_slot_state(input_dev*, unsigned int, bool)' at mt.h:100:1 has some sub-type changes: [C] 'function void input_mt_sync_frame(input_dev*)' at mt.h:107:1 has some sub-type changes: [C] 'function int input_open_device(input_handle*)' at input.h:403:1 has some sub-type changes: [C] 'function int input_register_device(input_dev*)' at input.h:376:1 has some sub-type changes: [C] 'function int input_register_handle(input_handle*)' at input.h:397:1 has some sub-type changes: [C] 'function int input_register_handler(input_handler*)' at input.h:387:1 has some sub-type changes: [C] 'function void input_set_abs_params(input_dev*, unsigned int, int, int, int, int)' at input.h:467:1 has some sub-type changes: [C] 'function void input_set_capability(input_dev*, unsigned int, unsigned int)' at input.h:449:1 has some sub-type changes: [C] 'function void input_unregister_device(input_dev*)' at input.h:377:1 has some sub-type changes: [C] 'function void input_unregister_handle(input_handle*)' at input.h:398:1 has some sub-type changes: [C] 'function void input_unregister_handler(input_handler*)' at input.h:388:1 has some sub-type changes: [C] 'function int snd_jack_new(snd_card*, const char*, int, snd_jack**, bool, bool)' at jack.c:198:1 has some sub-type changes: [C] 'function void snd_jack_report(snd_jack*, int)' at jack.c:340:1 has some sub-type changes: [C] 'function int snd_jack_set_key(snd_jack*, snd_jack_types, int)' at jack.c:317:1 has some sub-type changes: Bug: 170534200 Signed-off-by: Greg Kroah-Hartman Change-Id: I28c8b49ac37f42d3ff89554e18fe042a44f5704a --- android/abi_gki_aarch64.xml | 72 +++++++++++++------------- include/linux/mod_devicetable.h | 2 +- include/uapi/linux/input-event-codes.h | 2 +- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 4e4a7efe0ff0..7d0427878a52 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -513,15 +513,15 @@ - - - - - - - - - + + + + + + + + + @@ -961,7 +961,7 @@ - + @@ -1876,30 +1876,30 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + @@ -3386,9 +3386,9 @@ - - - + + + diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 4c56404e53a7..e045fc8e84d7 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -318,7 +318,7 @@ struct pcmcia_device_id { #define INPUT_DEVICE_ID_LED_MAX 0x0f #define INPUT_DEVICE_ID_SND_MAX 0x07 #define INPUT_DEVICE_ID_FF_MAX 0x7f -#define INPUT_DEVICE_ID_SW_MAX 0x10 +#define INPUT_DEVICE_ID_SW_MAX 0x3f #define INPUT_DEVICE_ID_PROP_MAX 0x1f #define INPUT_DEVICE_ID_MATCH_BUS 1 diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 472cd5bc5567..b8902770a989 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -809,7 +809,7 @@ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ #define SW_MACHINE_COVER 0x10 /* set = cover closed */ -#define SW_MAX 0x10 +#define SW_MAX 0x3f #define SW_CNT (SW_MAX+1) /* From ea5b4af68fc48e44cd17a1804381b1f4a73a2c5c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 31 Oct 2020 12:37:57 +0100 Subject: [PATCH 15/35] ANDROID: Update the KMI_GENERATION after KMI changes on October 31 The KMI was changed by several patches on October 31. Update the generation number to notify all tools of this. Bug: 161946584 Cc: Todd Kjos Signed-off-by: Greg Kroah-Hartman Change-Id: I5d96ec5e4fe3ead9aedf19bdedf731b3ee28746a --- build.config.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.config.common b/build.config.common index 26e8f3ac9dfb..a3f1b303f2d1 100644 --- a/build.config.common +++ b/build.config.common @@ -1,5 +1,5 @@ BRANCH=android11-5.4 -KMI_GENERATION=1 +KMI_GENERATION=2 CC=clang LD=ld.lld From a10e83bb35877a4d8691ce4f663d187141272b7b Mon Sep 17 00:00:00 2001 From: Jeehong Kim Date: Thu, 29 Oct 2020 22:31:10 +0900 Subject: [PATCH 16/35] ANDROID: ABI: update allowed list for galaxy Leaf changes summary: 10 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 9 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable 9 Added functions: [A] 'function char* kstrdup_quotable(const char*, gfp_t)' [A] 'function void netdev_state_change(net_device*)' [A] 'function int param_get_uint(char*, const kernel_param*)' [A] 'function int public_key_verify_signature(const public_key*, const public_key_signature*)' [A] 'function void tty_encode_baud_rate(tty_struct*, speed_t, speed_t)' [A] 'function int tty_termios_hw_change(const ktermios*, const ktermios*)' [A] 'function void usbnet_cdc_unbind(usbnet*, usb_interface*)' [A] 'function void usbnet_device_suggests_idle(usbnet*)' [A] 'function int usbnet_generic_cdc_bind(usbnet*, usb_interface*)' 1 Added variable: [A] 'const ipv6_stub* ipv6_stub' Bug: 171954519 Signed-off-by: Jeehong Kim Change-Id: I9066e222d3e30a9434d36c22e4e77159bd57a347 --- android/abi_gki_aarch64.xml | 727 ++++++++++++++++++++++----------- android/abi_gki_aarch64_galaxy | 14 + 2 files changed, 513 insertions(+), 228 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 7d0427878a52..c4038bcef483 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -2123,6 +2123,7 @@ + @@ -2399,6 +2400,7 @@ + @@ -2595,6 +2597,7 @@ + @@ -2869,6 +2872,7 @@ + @@ -3735,6 +3739,7 @@ + @@ -3761,6 +3766,7 @@ + @@ -4030,9 +4036,12 @@ + + + @@ -4390,6 +4399,7 @@ + @@ -14836,7 +14846,7 @@ - + @@ -15332,22 +15342,6 @@ - - - - - - - - - - - - - - - - @@ -16133,6 +16127,22 @@ + + + + + + + + + + + + + + + + @@ -17598,6 +17608,7 @@ + @@ -21682,6 +21693,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -38693,6 +38857,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -44815,7 +45005,7 @@ - + @@ -57162,6 +57352,11 @@ + + + + + @@ -57185,6 +57380,11 @@ + + + + + @@ -58700,6 +58900,10 @@ + + + + @@ -71141,6 +71345,8 @@ + + @@ -71684,7 +71890,7 @@ - + @@ -73532,7 +73738,7 @@ - + @@ -79128,6 +79334,14 @@ + + + + + + + + @@ -79211,11 +79425,18 @@ + + + + + + + @@ -81170,17 +81391,6 @@ - - - - - - - - - - - @@ -81300,6 +81510,17 @@ + + + + + + + + + + + @@ -90367,23 +90588,6 @@ - - - - - - - - - - - - - - - - - @@ -92569,6 +92773,11 @@ + + + + + @@ -106485,6 +106694,11 @@ + + + + + @@ -108071,140 +108285,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -108445,20 +108525,6 @@ - - - - - - - - - - - - - - @@ -111022,6 +111088,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111034,6 +111195,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111985,6 +112235,22 @@ + + + + + + + + + + + + + + + + @@ -112836,7 +113102,7 @@ - + @@ -113000,7 +113266,7 @@ - + @@ -116951,6 +117217,20 @@ + + + + + + + + + + + + + + @@ -117081,17 +117361,6 @@ - - - - - - - - - - - @@ -117101,7 +117370,7 @@ - + @@ -117116,7 +117385,7 @@ - + @@ -121714,7 +121983,7 @@ - + @@ -121722,6 +121991,20 @@ + + + + + + + + + + + + + + @@ -122444,22 +122727,6 @@ - - - - - - - - - - - - - - - - @@ -123421,6 +123688,10 @@ + + + + diff --git a/android/abi_gki_aarch64_galaxy b/android/abi_gki_aarch64_galaxy index a885f2f6961a..400b3a7699ca 100644 --- a/android/abi_gki_aarch64_galaxy +++ b/android/abi_gki_aarch64_galaxy @@ -71,6 +71,7 @@ __ioread32_copy __ioremap __iowrite32_copy + __ipv6_addr_type __irq_alloc_descs __irq_domain_add __irq_set_handler @@ -1188,6 +1189,7 @@ import_iovec in_aton in_egroup_p + in6_pton init_dummy_netdev init_net init_task @@ -1270,6 +1272,7 @@ ion_query_heaps_kernel iounmap iput + ipv6_stub irq_chip_ack_parent irq_chip_disable_parent irq_chip_enable_parent @@ -1372,6 +1375,7 @@ kset_unregister kstat kstrdup + kstrdup_quotable kstrndup kstrtobool kstrtobool_from_user @@ -1517,6 +1521,7 @@ napi_schedule_prep netdev_err netdev_info + netdev_state_change netdev_update_features netdev_warn netif_carrier_off @@ -1664,6 +1669,7 @@ panic_timeout param_array_ops param_get_int + param_get_uint param_ops_bool param_ops_byte param_ops_charp @@ -1820,6 +1826,7 @@ proto_register proto_unregister pskb_expand_head + public_key_verify_signature put_device put_disk put_pid @@ -1979,6 +1986,8 @@ rtnl_is_locked rtnl_lock rtnl_unlock + rt_mutex_lock + rt_mutex_unlock save_stack_trace save_stack_trace_tsk sched_clock @@ -2373,6 +2382,7 @@ truncate_inode_pages try_module_get try_wait_for_completion + tty_encode_baud_rate tty_flip_buffer_push tty_hangup tty_insert_flip_string_fixed_flag @@ -2395,6 +2405,7 @@ tty_std_termios tty_termios_baud_rate tty_termios_copy_hw + tty_termios_hw_change tty_unregister_device tty_unregister_driver tty_vhangup @@ -2612,9 +2623,12 @@ usb_unregister_notify usb_wait_anchor_empty_timeout usb_wakeup_notification + usbnet_cdc_unbind usbnet_change_mtu usbnet_defer_kevent + usbnet_device_suggests_idle usbnet_disconnect + usbnet_generic_cdc_bind usbnet_get_drvinfo usbnet_get_endpoints usbnet_get_ethernet_addr From 1fa8e683984feb4f02a0b3d4969921b35b4783cd Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Mon, 21 Sep 2020 15:36:51 +0100 Subject: [PATCH 17/35] BACKPORT: xfrm: Provide API to register translator module Add a skeleton for xfrm_compat module and provide API to register it in xfrm_state.ko. struct xfrm_translator will have function pointers to translate messages received from 32-bit userspace or to be sent to it from 64-bit kernel. module_get()/module_put() are used instead of rcu_read_lock() as the module will vmalloc() memory for translation. The new API is registered with xfrm_state module, not with xfrm_user as the former needs translator for user_policy set by setsockopt() and xfrm_user already uses functions from xfrm_state. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert (cherry picked from commit c9e7c76d70fa50582ca96759829c93d0dd024662) [adelva: Edited around some context changes] Bug: 163141236 Signed-off-by: Alistair Delva Change-Id: Ic825c6a0367fa192cc3f7af6b7d2682ef8f9d58b --- include/net/xfrm.h | 20 ++++++++++++++ net/xfrm/Kconfig | 10 +++++++ net/xfrm/Makefile | 1 + net/xfrm/xfrm_compat.c | 29 ++++++++++++++++++++ net/xfrm/xfrm_state.c | 60 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 net/xfrm/xfrm_compat.c diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 12aa6e15e43f..6c1a95f75c3a 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1999,4 +1999,24 @@ static inline int xfrm_tunnel_check(struct sk_buff *skb, struct xfrm_state *x, return 0; } + +struct xfrm_translator { + struct module *owner; +}; + +#if IS_ENABLED(CONFIG_XFRM_USER_COMPAT) +extern int xfrm_register_translator(struct xfrm_translator *xtr); +extern int xfrm_unregister_translator(struct xfrm_translator *xtr); +extern struct xfrm_translator *xfrm_get_translator(void); +extern void xfrm_put_translator(struct xfrm_translator *xtr); +#else +static inline struct xfrm_translator *xfrm_get_translator(void) +{ + return NULL; +} +static inline void xfrm_put_translator(struct xfrm_translator *xtr) +{ +} +#endif + #endif /* _NET_XFRM_H */ diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig index 51bb6018f3bf..e3af4e71b346 100644 --- a/net/xfrm/Kconfig +++ b/net/xfrm/Kconfig @@ -28,6 +28,16 @@ config XFRM_USER If unsure, say Y. +config XFRM_USER_COMPAT + tristate "Compatible ABI support" + depends on XFRM_USER && COMPAT_FOR_U64_ALIGNMENT + select WANT_COMPAT_NETLINK_MESSAGES + help + Transformation(XFRM) user configuration interface like IPsec + used by compatible Linux applications. + + If unsure, say N. + config XFRM_INTERFACE tristate "Transformation virtual interface" depends on XFRM && IPV6 diff --git a/net/xfrm/Makefile b/net/xfrm/Makefile index fbc4552d17b8..f32511588d56 100644 --- a/net/xfrm/Makefile +++ b/net/xfrm/Makefile @@ -9,5 +9,6 @@ obj-$(CONFIG_XFRM) := xfrm_policy.o xfrm_state.o xfrm_hash.o \ obj-$(CONFIG_XFRM_STATISTICS) += xfrm_proc.o obj-$(CONFIG_XFRM_ALGO) += xfrm_algo.o obj-$(CONFIG_XFRM_USER) += xfrm_user.o +obj-$(CONFIG_XFRM_USER_COMPAT) += xfrm_compat.o obj-$(CONFIG_XFRM_IPCOMP) += xfrm_ipcomp.o obj-$(CONFIG_XFRM_INTERFACE) += xfrm_interface.o diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c new file mode 100644 index 000000000000..f01d9af41c55 --- /dev/null +++ b/net/xfrm/xfrm_compat.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * XFRM compat layer + * Author: Dmitry Safonov + * Based on code and translator idea by: Florian Westphal + */ +#include +#include +#include + +static struct xfrm_translator xfrm_translator = { + .owner = THIS_MODULE, +}; + +static int __init xfrm_compat_init(void) +{ + return xfrm_register_translator(&xfrm_translator); +} + +static void __exit xfrm_compat_exit(void) +{ + xfrm_unregister_translator(&xfrm_translator); +} + +module_init(xfrm_compat_init); +module_exit(xfrm_compat_exit); +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Dmitry Safonov"); +MODULE_DESCRIPTION("XFRM 32-bit compatibility layer"); diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 787105cc002b..47e596ab28b8 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -2261,6 +2261,66 @@ static bool km_is_alive(const struct km_event *c) return is_alive; } +#if IS_ENABLED(CONFIG_XFRM_USER_COMPAT) +static DEFINE_SPINLOCK(xfrm_translator_lock); +static struct xfrm_translator __rcu *xfrm_translator; + +struct xfrm_translator *xfrm_get_translator(void) +{ + struct xfrm_translator *xtr; + + rcu_read_lock(); + xtr = rcu_dereference(xfrm_translator); + if (unlikely(!xtr)) + goto out; + if (!try_module_get(xtr->owner)) + xtr = NULL; +out: + rcu_read_unlock(); + return xtr; +} +EXPORT_SYMBOL_GPL(xfrm_get_translator); + +void xfrm_put_translator(struct xfrm_translator *xtr) +{ + module_put(xtr->owner); +} +EXPORT_SYMBOL_GPL(xfrm_put_translator); + +int xfrm_register_translator(struct xfrm_translator *xtr) +{ + int err = 0; + + spin_lock_bh(&xfrm_translator_lock); + if (unlikely(xfrm_translator != NULL)) + err = -EEXIST; + else + rcu_assign_pointer(xfrm_translator, xtr); + spin_unlock_bh(&xfrm_translator_lock); + + return err; +} +EXPORT_SYMBOL_GPL(xfrm_register_translator); + +int xfrm_unregister_translator(struct xfrm_translator *xtr) +{ + int err = 0; + + spin_lock_bh(&xfrm_translator_lock); + if (likely(xfrm_translator != NULL)) { + if (rcu_access_pointer(xfrm_translator) != xtr) + err = -EINVAL; + else + RCU_INIT_POINTER(xfrm_translator, NULL); + } + spin_unlock_bh(&xfrm_translator_lock); + synchronize_rcu(); + + return err; +} +EXPORT_SYMBOL_GPL(xfrm_unregister_translator); +#endif + int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen) { int err; From 1d5f89e524856b70fd29972b76abbf684d19fc59 Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Mon, 21 Sep 2020 15:36:52 +0100 Subject: [PATCH 18/35] UPSTREAM: xfrm/compat: Add 64=>32-bit messages translator Provide the kernel-to-user translator under XFRM_USER_COMPAT, that creates for 64-bit xfrm-user message a 32-bit translation and puts it in skb's frag_list. net/compat.c layer provides MSG_CMSG_COMPAT to decide if the message should be taken from skb or frag_list. (used by wext-core which has also an ABI difference) Kernel sends 64-bit xfrm messages to the userspace for: - multicast (monitor events) - netlink dumps Wire up the translator to xfrm_nlmsg_multicast(). Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert (cherry picked from commit 5461fc0c8d9f23956b99f5907f69726a293ccb67) Bug: 163141236 Signed-off-by: Alistair Delva Change-Id: Id8b59587d60feb9b9f0ce96be9d140d694573fe3 --- include/net/xfrm.h | 5 + net/xfrm/xfrm_compat.c | 296 +++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_user.c | 15 ++- 3 files changed, 315 insertions(+), 1 deletion(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 6c1a95f75c3a..9f9bc9f86587 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -2000,7 +2000,12 @@ static inline int xfrm_tunnel_check(struct sk_buff *skb, struct xfrm_state *x, return 0; } +extern const int xfrm_msg_min[XFRM_NR_MSGTYPES]; + struct xfrm_translator { + /* Allocate frag_list and put compat translation there */ + int (*alloc_compat)(struct sk_buff *skb, const struct nlmsghdr *src); + struct module *owner; }; diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c index f01d9af41c55..aece41b44ff2 100644 --- a/net/xfrm/xfrm_compat.c +++ b/net/xfrm/xfrm_compat.c @@ -8,8 +8,304 @@ #include #include +struct compat_xfrm_lifetime_cfg { + compat_u64 soft_byte_limit, hard_byte_limit; + compat_u64 soft_packet_limit, hard_packet_limit; + compat_u64 soft_add_expires_seconds, hard_add_expires_seconds; + compat_u64 soft_use_expires_seconds, hard_use_expires_seconds; +}; /* same size on 32bit, but only 4 byte alignment required */ + +struct compat_xfrm_lifetime_cur { + compat_u64 bytes, packets, add_time, use_time; +}; /* same size on 32bit, but only 4 byte alignment required */ + +struct compat_xfrm_userpolicy_info { + struct xfrm_selector sel; + struct compat_xfrm_lifetime_cfg lft; + struct compat_xfrm_lifetime_cur curlft; + __u32 priority, index; + u8 dir, action, flags, share; + /* 4 bytes additional padding on 64bit */ +}; + +struct compat_xfrm_usersa_info { + struct xfrm_selector sel; + struct xfrm_id id; + xfrm_address_t saddr; + struct compat_xfrm_lifetime_cfg lft; + struct compat_xfrm_lifetime_cur curlft; + struct xfrm_stats stats; + __u32 seq, reqid; + u16 family; + u8 mode, replay_window, flags; + /* 4 bytes additional padding on 64bit */ +}; + +struct compat_xfrm_user_acquire { + struct xfrm_id id; + xfrm_address_t saddr; + struct xfrm_selector sel; + struct compat_xfrm_userpolicy_info policy; + /* 4 bytes additional padding on 64bit */ + __u32 aalgos, ealgos, calgos, seq; +}; + +struct compat_xfrm_userspi_info { + struct compat_xfrm_usersa_info info; + /* 4 bytes additional padding on 64bit */ + __u32 min, max; +}; + +struct compat_xfrm_user_expire { + struct compat_xfrm_usersa_info state; + /* 8 bytes additional padding on 64bit */ + u8 hard; +}; + +struct compat_xfrm_user_polexpire { + struct compat_xfrm_userpolicy_info pol; + /* 8 bytes additional padding on 64bit */ + u8 hard; +}; + +#define XMSGSIZE(type) sizeof(struct type) + +static const int compat_msg_min[XFRM_NR_MSGTYPES] = { + [XFRM_MSG_NEWSA - XFRM_MSG_BASE] = XMSGSIZE(compat_xfrm_usersa_info), + [XFRM_MSG_DELSA - XFRM_MSG_BASE] = XMSGSIZE(xfrm_usersa_id), + [XFRM_MSG_GETSA - XFRM_MSG_BASE] = XMSGSIZE(xfrm_usersa_id), + [XFRM_MSG_NEWPOLICY - XFRM_MSG_BASE] = XMSGSIZE(compat_xfrm_userpolicy_info), + [XFRM_MSG_DELPOLICY - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_id), + [XFRM_MSG_GETPOLICY - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_id), + [XFRM_MSG_ALLOCSPI - XFRM_MSG_BASE] = XMSGSIZE(compat_xfrm_userspi_info), + [XFRM_MSG_ACQUIRE - XFRM_MSG_BASE] = XMSGSIZE(compat_xfrm_user_acquire), + [XFRM_MSG_EXPIRE - XFRM_MSG_BASE] = XMSGSIZE(compat_xfrm_user_expire), + [XFRM_MSG_UPDPOLICY - XFRM_MSG_BASE] = XMSGSIZE(compat_xfrm_userpolicy_info), + [XFRM_MSG_UPDSA - XFRM_MSG_BASE] = XMSGSIZE(compat_xfrm_usersa_info), + [XFRM_MSG_POLEXPIRE - XFRM_MSG_BASE] = XMSGSIZE(compat_xfrm_user_polexpire), + [XFRM_MSG_FLUSHSA - XFRM_MSG_BASE] = XMSGSIZE(xfrm_usersa_flush), + [XFRM_MSG_FLUSHPOLICY - XFRM_MSG_BASE] = 0, + [XFRM_MSG_NEWAE - XFRM_MSG_BASE] = XMSGSIZE(xfrm_aevent_id), + [XFRM_MSG_GETAE - XFRM_MSG_BASE] = XMSGSIZE(xfrm_aevent_id), + [XFRM_MSG_REPORT - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_report), + [XFRM_MSG_MIGRATE - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_id), + [XFRM_MSG_NEWSADINFO - XFRM_MSG_BASE] = sizeof(u32), + [XFRM_MSG_GETSADINFO - XFRM_MSG_BASE] = sizeof(u32), + [XFRM_MSG_NEWSPDINFO - XFRM_MSG_BASE] = sizeof(u32), + [XFRM_MSG_GETSPDINFO - XFRM_MSG_BASE] = sizeof(u32), + [XFRM_MSG_MAPPING - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_mapping) +}; + +static struct nlmsghdr *xfrm_nlmsg_put_compat(struct sk_buff *skb, + const struct nlmsghdr *nlh_src, u16 type) +{ + int payload = compat_msg_min[type]; + int src_len = xfrm_msg_min[type]; + struct nlmsghdr *nlh_dst; + + /* Compat messages are shorter or equal to native (+padding) */ + if (WARN_ON_ONCE(src_len < payload)) + return ERR_PTR(-EMSGSIZE); + + nlh_dst = nlmsg_put(skb, nlh_src->nlmsg_pid, nlh_src->nlmsg_seq, + nlh_src->nlmsg_type, payload, nlh_src->nlmsg_flags); + if (!nlh_dst) + return ERR_PTR(-EMSGSIZE); + + memset(nlmsg_data(nlh_dst), 0, payload); + + switch (nlh_src->nlmsg_type) { + /* Compat message has the same layout as native */ + case XFRM_MSG_DELSA: + case XFRM_MSG_DELPOLICY: + case XFRM_MSG_FLUSHSA: + case XFRM_MSG_FLUSHPOLICY: + case XFRM_MSG_NEWAE: + case XFRM_MSG_REPORT: + case XFRM_MSG_MIGRATE: + case XFRM_MSG_NEWSADINFO: + case XFRM_MSG_NEWSPDINFO: + case XFRM_MSG_MAPPING: + WARN_ON_ONCE(src_len != payload); + memcpy(nlmsg_data(nlh_dst), nlmsg_data(nlh_src), src_len); + break; + /* 4 byte alignment for trailing u64 on native, but not on compat */ + case XFRM_MSG_NEWSA: + case XFRM_MSG_NEWPOLICY: + case XFRM_MSG_UPDSA: + case XFRM_MSG_UPDPOLICY: + WARN_ON_ONCE(src_len != payload + 4); + memcpy(nlmsg_data(nlh_dst), nlmsg_data(nlh_src), payload); + break; + case XFRM_MSG_EXPIRE: { + const struct xfrm_user_expire *src_ue = nlmsg_data(nlh_src); + struct compat_xfrm_user_expire *dst_ue = nlmsg_data(nlh_dst); + + /* compat_xfrm_user_expire has 4-byte smaller state */ + memcpy(dst_ue, src_ue, sizeof(dst_ue->state)); + dst_ue->hard = src_ue->hard; + break; + } + case XFRM_MSG_ACQUIRE: { + const struct xfrm_user_acquire *src_ua = nlmsg_data(nlh_src); + struct compat_xfrm_user_acquire *dst_ua = nlmsg_data(nlh_dst); + + memcpy(dst_ua, src_ua, offsetof(struct compat_xfrm_user_acquire, aalgos)); + dst_ua->aalgos = src_ua->aalgos; + dst_ua->ealgos = src_ua->ealgos; + dst_ua->calgos = src_ua->calgos; + dst_ua->seq = src_ua->seq; + break; + } + case XFRM_MSG_POLEXPIRE: { + const struct xfrm_user_polexpire *src_upe = nlmsg_data(nlh_src); + struct compat_xfrm_user_polexpire *dst_upe = nlmsg_data(nlh_dst); + + /* compat_xfrm_user_polexpire has 4-byte smaller state */ + memcpy(dst_upe, src_upe, sizeof(dst_upe->pol)); + dst_upe->hard = src_upe->hard; + break; + } + case XFRM_MSG_ALLOCSPI: { + const struct xfrm_userspi_info *src_usi = nlmsg_data(nlh_src); + struct compat_xfrm_userspi_info *dst_usi = nlmsg_data(nlh_dst); + + /* compat_xfrm_user_polexpire has 4-byte smaller state */ + memcpy(dst_usi, src_usi, sizeof(src_usi->info)); + dst_usi->min = src_usi->min; + dst_usi->max = src_usi->max; + break; + } + /* Not being sent by kernel */ + case XFRM_MSG_GETSA: + case XFRM_MSG_GETPOLICY: + case XFRM_MSG_GETAE: + case XFRM_MSG_GETSADINFO: + case XFRM_MSG_GETSPDINFO: + default: + WARN_ONCE(1, "unsupported nlmsg_type %d", nlh_src->nlmsg_type); + return ERR_PTR(-EOPNOTSUPP); + } + + return nlh_dst; +} + +static int xfrm_nla_cpy(struct sk_buff *dst, const struct nlattr *src, int len) +{ + return nla_put(dst, src->nla_type, len, nla_data(src)); +} + +static int xfrm_xlate64_attr(struct sk_buff *dst, const struct nlattr *src) +{ + switch (src->nla_type) { + case XFRMA_PAD: + /* Ignore */ + return 0; + case XFRMA_ALG_AUTH: + case XFRMA_ALG_CRYPT: + case XFRMA_ALG_COMP: + case XFRMA_ENCAP: + case XFRMA_TMPL: + return xfrm_nla_cpy(dst, src, nla_len(src)); + case XFRMA_SA: + return xfrm_nla_cpy(dst, src, XMSGSIZE(compat_xfrm_usersa_info)); + case XFRMA_POLICY: + return xfrm_nla_cpy(dst, src, XMSGSIZE(compat_xfrm_userpolicy_info)); + case XFRMA_SEC_CTX: + return xfrm_nla_cpy(dst, src, nla_len(src)); + case XFRMA_LTIME_VAL: + return nla_put_64bit(dst, src->nla_type, nla_len(src), + nla_data(src), XFRMA_PAD); + case XFRMA_REPLAY_VAL: + case XFRMA_REPLAY_THRESH: + case XFRMA_ETIMER_THRESH: + case XFRMA_SRCADDR: + case XFRMA_COADDR: + return xfrm_nla_cpy(dst, src, nla_len(src)); + case XFRMA_LASTUSED: + return nla_put_64bit(dst, src->nla_type, nla_len(src), + nla_data(src), XFRMA_PAD); + case XFRMA_POLICY_TYPE: + case XFRMA_MIGRATE: + case XFRMA_ALG_AEAD: + case XFRMA_KMADDRESS: + case XFRMA_ALG_AUTH_TRUNC: + case XFRMA_MARK: + case XFRMA_TFCPAD: + case XFRMA_REPLAY_ESN_VAL: + case XFRMA_SA_EXTRA_FLAGS: + case XFRMA_PROTO: + case XFRMA_ADDRESS_FILTER: + case XFRMA_OFFLOAD_DEV: + case XFRMA_SET_MARK: + case XFRMA_SET_MARK_MASK: + case XFRMA_IF_ID: + return xfrm_nla_cpy(dst, src, nla_len(src)); + default: + BUILD_BUG_ON(XFRMA_MAX != XFRMA_IF_ID); + WARN_ONCE(1, "unsupported nla_type %d", src->nla_type); + return -EOPNOTSUPP; + } +} + +/* Take kernel-built (64bit layout) and create 32bit layout for userspace */ +static int xfrm_xlate64(struct sk_buff *dst, const struct nlmsghdr *nlh_src) +{ + u16 type = nlh_src->nlmsg_type - XFRM_MSG_BASE; + const struct nlattr *nla, *attrs; + struct nlmsghdr *nlh_dst; + int len, remaining; + + nlh_dst = xfrm_nlmsg_put_compat(dst, nlh_src, type); + if (IS_ERR(nlh_dst)) + return PTR_ERR(nlh_dst); + + attrs = nlmsg_attrdata(nlh_src, xfrm_msg_min[type]); + len = nlmsg_attrlen(nlh_src, xfrm_msg_min[type]); + + nla_for_each_attr(nla, attrs, len, remaining) { + int err = xfrm_xlate64_attr(dst, nla); + + if (err) + return err; + } + + nlmsg_end(dst, nlh_dst); + + return 0; +} + +static int xfrm_alloc_compat(struct sk_buff *skb, const struct nlmsghdr *nlh_src) +{ + u16 type = nlh_src->nlmsg_type - XFRM_MSG_BASE; + struct sk_buff *new = NULL; + int err; + + if (WARN_ON_ONCE(type >= ARRAY_SIZE(xfrm_msg_min))) + return -EOPNOTSUPP; + + if (skb_shinfo(skb)->frag_list == NULL) { + new = alloc_skb(skb->len + skb_tailroom(skb), GFP_ATOMIC); + if (!new) + return -ENOMEM; + skb_shinfo(skb)->frag_list = new; + } + + err = xfrm_xlate64(skb_shinfo(skb)->frag_list, nlh_src); + if (err) { + if (new) { + kfree_skb(new); + skb_shinfo(skb)->frag_list = NULL; + } + return err; + } + + return 0; +} + static struct xfrm_translator xfrm_translator = { .owner = THIS_MODULE, + .alloc_compat = xfrm_alloc_compat, }; static int __init xfrm_compat_init(void) diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 8e4fb35cfc06..0e6ec8d36917 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1083,12 +1083,24 @@ static inline int xfrm_nlmsg_multicast(struct net *net, struct sk_buff *skb, u32 pid, unsigned int group) { struct sock *nlsk = rcu_dereference(net->xfrm.nlsk); + struct xfrm_translator *xtr; if (!nlsk) { kfree_skb(skb); return -EPIPE; } + xtr = xfrm_get_translator(); + if (xtr) { + int err = xtr->alloc_compat(skb, nlmsg_hdr(skb)); + + xfrm_put_translator(xtr); + if (err) { + kfree_skb(skb); + return err; + } + } + return nlmsg_multicast(nlsk, skb, pid, group, GFP_ATOMIC); } @@ -2533,7 +2545,7 @@ static int xfrm_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, #define XMSGSIZE(type) sizeof(struct type) -static const int xfrm_msg_min[XFRM_NR_MSGTYPES] = { +const int xfrm_msg_min[XFRM_NR_MSGTYPES] = { [XFRM_MSG_NEWSA - XFRM_MSG_BASE] = XMSGSIZE(xfrm_usersa_info), [XFRM_MSG_DELSA - XFRM_MSG_BASE] = XMSGSIZE(xfrm_usersa_id), [XFRM_MSG_GETSA - XFRM_MSG_BASE] = XMSGSIZE(xfrm_usersa_id), @@ -2556,6 +2568,7 @@ static const int xfrm_msg_min[XFRM_NR_MSGTYPES] = { [XFRM_MSG_NEWSPDINFO - XFRM_MSG_BASE] = sizeof(u32), [XFRM_MSG_GETSPDINFO - XFRM_MSG_BASE] = sizeof(u32), }; +EXPORT_SYMBOL_GPL(xfrm_msg_min); #undef XMSGSIZE From da1cd0d7ab765a2a8e93c2a29373fcf433565b7b Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Mon, 21 Sep 2020 15:36:53 +0100 Subject: [PATCH 19/35] UPSTREAM: xfrm/compat: Attach xfrm dumps to 64=>32 bit translator Currently nlmsg_unicast() is used by functions that dump structures that can be different in size for compat tasks, see dump_one_state() and dump_one_policy(). The following nlmsg_unicast() users exist today in xfrm: Function | Message can be different | in size on compat -------------------------------------------|------------------------------ xfrm_get_spdinfo() | N xfrm_get_sadinfo() | N xfrm_get_sa() | Y xfrm_alloc_userspi() | Y xfrm_get_policy() | Y xfrm_get_ae() | N Besides, dump_one_state() and dump_one_policy() can be used by filtered netlink dump for XFRM_MSG_GETSA, XFRM_MSG_GETPOLICY. Just as for xfrm multicast, allocate frag_list for compat skb journey down to recvmsg() which will give user the desired skb according to syscall bitness. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert (cherry picked from commit 5f3eea6b7e8f58cf5c8a9d4b9679dc19e9e67ba3) Bug: 163141236 Signed-off-by: Alistair Delva Change-Id: Id1a606ddd9d7dfe73a448eeb252b1bfd8dbd2fcb --- net/xfrm/xfrm_user.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 0e6ec8d36917..42391428e46e 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -975,6 +975,7 @@ static int dump_one_state(struct xfrm_state *x, int count, void *ptr) struct xfrm_dump_info *sp = ptr; struct sk_buff *in_skb = sp->in_skb; struct sk_buff *skb = sp->out_skb; + struct xfrm_translator *xtr; struct xfrm_usersa_info *p; struct nlmsghdr *nlh; int err; @@ -992,6 +993,18 @@ static int dump_one_state(struct xfrm_state *x, int count, void *ptr) return err; } nlmsg_end(skb, nlh); + + xtr = xfrm_get_translator(); + if (xtr) { + err = xtr->alloc_compat(skb, nlh); + + xfrm_put_translator(xtr); + if (err) { + nlmsg_cancel(skb, nlh); + return err; + } + } + return 0; } @@ -1320,6 +1333,7 @@ static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, struct net *net = sock_net(skb->sk); struct xfrm_state *x; struct xfrm_userspi_info *p; + struct xfrm_translator *xtr; struct sk_buff *resp_skb; xfrm_address_t *daddr; int family; @@ -1370,6 +1384,17 @@ static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, goto out; } + xtr = xfrm_get_translator(); + if (xtr) { + err = xtr->alloc_compat(skb, nlmsg_hdr(skb)); + + xfrm_put_translator(xtr); + if (err) { + kfree_skb(resp_skb); + goto out; + } + } + err = nlmsg_unicast(net->xfrm.nlsk, resp_skb, NETLINK_CB(skb).portid); out: @@ -1776,6 +1801,7 @@ static int dump_one_policy(struct xfrm_policy *xp, int dir, int count, void *ptr struct xfrm_userpolicy_info *p; struct sk_buff *in_skb = sp->in_skb; struct sk_buff *skb = sp->out_skb; + struct xfrm_translator *xtr; struct nlmsghdr *nlh; int err; @@ -1800,6 +1826,18 @@ static int dump_one_policy(struct xfrm_policy *xp, int dir, int count, void *ptr return err; } nlmsg_end(skb, nlh); + + xtr = xfrm_get_translator(); + if (xtr) { + err = xtr->alloc_compat(skb, nlh); + + xfrm_put_translator(xtr); + if (err) { + nlmsg_cancel(skb, nlh); + return err; + } + } + return 0; } From 6a2b428110b765f8f7363a7d1de157b35cc693d6 Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Mon, 21 Sep 2020 15:36:55 +0100 Subject: [PATCH 20/35] UPSTREAM: xfrm/compat: Add 32=>64-bit messages translator Provide the user-to-kernel translator under XFRM_USER_COMPAT, that creates for 32-bit xfrm-user message a 64-bit translation. The translation is afterwards reused by xfrm_user code just as if userspace had sent 64-bit message. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert (cherry picked from commit 5106f4a8acff480e244300bc5097c0ad7048c3a2) Bug: 163141236 Signed-off-by: Alistair Delva Change-Id: If15999b86e4704b75307fbcc3d7f0c8d8bc89e7a --- include/net/xfrm.h | 6 + net/xfrm/Kconfig | 3 +- net/xfrm/xfrm_compat.c | 274 +++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_user.c | 54 +++++--- 4 files changed, 321 insertions(+), 16 deletions(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 9f9bc9f86587..ee7102996a15 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -2001,11 +2001,17 @@ static inline int xfrm_tunnel_check(struct sk_buff *skb, struct xfrm_state *x, } extern const int xfrm_msg_min[XFRM_NR_MSGTYPES]; +extern const struct nla_policy xfrma_policy[XFRMA_MAX+1]; struct xfrm_translator { /* Allocate frag_list and put compat translation there */ int (*alloc_compat)(struct sk_buff *skb, const struct nlmsghdr *src); + /* Allocate nlmsg with 64-bit translaton of received 32-bit message */ + struct nlmsghdr *(*rcv_msg_compat)(const struct nlmsghdr *nlh, + int maxtype, const struct nla_policy *policy, + struct netlink_ext_ack *extack); + struct module *owner; }; diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig index e3af4e71b346..e5815cb2c297 100644 --- a/net/xfrm/Kconfig +++ b/net/xfrm/Kconfig @@ -30,7 +30,8 @@ config XFRM_USER config XFRM_USER_COMPAT tristate "Compatible ABI support" - depends on XFRM_USER && COMPAT_FOR_U64_ALIGNMENT + depends on XFRM_USER && COMPAT_FOR_U64_ALIGNMENT && \ + HAVE_EFFICIENT_UNALIGNED_ACCESS select WANT_COMPAT_NETLINK_MESSAGES help Transformation(XFRM) user configuration interface like IPsec diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c index aece41b44ff2..b1b5f972538d 100644 --- a/net/xfrm/xfrm_compat.c +++ b/net/xfrm/xfrm_compat.c @@ -96,6 +96,39 @@ static const int compat_msg_min[XFRM_NR_MSGTYPES] = { [XFRM_MSG_MAPPING - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_mapping) }; +static const struct nla_policy compat_policy[XFRMA_MAX+1] = { + [XFRMA_SA] = { .len = XMSGSIZE(compat_xfrm_usersa_info)}, + [XFRMA_POLICY] = { .len = XMSGSIZE(compat_xfrm_userpolicy_info)}, + [XFRMA_LASTUSED] = { .type = NLA_U64}, + [XFRMA_ALG_AUTH_TRUNC] = { .len = sizeof(struct xfrm_algo_auth)}, + [XFRMA_ALG_AEAD] = { .len = sizeof(struct xfrm_algo_aead) }, + [XFRMA_ALG_AUTH] = { .len = sizeof(struct xfrm_algo) }, + [XFRMA_ALG_CRYPT] = { .len = sizeof(struct xfrm_algo) }, + [XFRMA_ALG_COMP] = { .len = sizeof(struct xfrm_algo) }, + [XFRMA_ENCAP] = { .len = sizeof(struct xfrm_encap_tmpl) }, + [XFRMA_TMPL] = { .len = sizeof(struct xfrm_user_tmpl) }, + [XFRMA_SEC_CTX] = { .len = sizeof(struct xfrm_sec_ctx) }, + [XFRMA_LTIME_VAL] = { .len = sizeof(struct xfrm_lifetime_cur) }, + [XFRMA_REPLAY_VAL] = { .len = sizeof(struct xfrm_replay_state) }, + [XFRMA_REPLAY_THRESH] = { .type = NLA_U32 }, + [XFRMA_ETIMER_THRESH] = { .type = NLA_U32 }, + [XFRMA_SRCADDR] = { .len = sizeof(xfrm_address_t) }, + [XFRMA_COADDR] = { .len = sizeof(xfrm_address_t) }, + [XFRMA_POLICY_TYPE] = { .len = sizeof(struct xfrm_userpolicy_type)}, + [XFRMA_MIGRATE] = { .len = sizeof(struct xfrm_user_migrate) }, + [XFRMA_KMADDRESS] = { .len = sizeof(struct xfrm_user_kmaddress) }, + [XFRMA_MARK] = { .len = sizeof(struct xfrm_mark) }, + [XFRMA_TFCPAD] = { .type = NLA_U32 }, + [XFRMA_REPLAY_ESN_VAL] = { .len = sizeof(struct xfrm_replay_state_esn) }, + [XFRMA_SA_EXTRA_FLAGS] = { .type = NLA_U32 }, + [XFRMA_PROTO] = { .type = NLA_U8 }, + [XFRMA_ADDRESS_FILTER] = { .len = sizeof(struct xfrm_address_filter) }, + [XFRMA_OFFLOAD_DEV] = { .len = sizeof(struct xfrm_user_offload) }, + [XFRMA_SET_MARK] = { .type = NLA_U32 }, + [XFRMA_SET_MARK_MASK] = { .type = NLA_U32 }, + [XFRMA_IF_ID] = { .type = NLA_U32 }, +}; + static struct nlmsghdr *xfrm_nlmsg_put_compat(struct sk_buff *skb, const struct nlmsghdr *nlh_src, u16 type) { @@ -303,9 +336,250 @@ static int xfrm_alloc_compat(struct sk_buff *skb, const struct nlmsghdr *nlh_src return 0; } +/* Calculates len of translated 64-bit message. */ +static size_t xfrm_user_rcv_calculate_len64(const struct nlmsghdr *src, + struct nlattr *attrs[XFRMA_MAX+1]) +{ + size_t len = nlmsg_len(src); + + switch (src->nlmsg_type) { + case XFRM_MSG_NEWSA: + case XFRM_MSG_NEWPOLICY: + case XFRM_MSG_ALLOCSPI: + case XFRM_MSG_ACQUIRE: + case XFRM_MSG_UPDPOLICY: + case XFRM_MSG_UPDSA: + len += 4; + break; + case XFRM_MSG_EXPIRE: + case XFRM_MSG_POLEXPIRE: + len += 8; + break; + default: + break; + } + + if (attrs[XFRMA_SA]) + len += 4; + if (attrs[XFRMA_POLICY]) + len += 4; + + /* XXX: some attrs may need to be realigned + * if !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS + */ + + return len; +} + +static int xfrm_attr_cpy32(void *dst, size_t *pos, const struct nlattr *src, + size_t size, int copy_len, int payload) +{ + struct nlmsghdr *nlmsg = dst; + struct nlattr *nla; + + if (WARN_ON_ONCE(copy_len > payload)) + copy_len = payload; + + if (size - *pos < nla_attr_size(payload)) + return -ENOBUFS; + + nla = dst + *pos; + + memcpy(nla, src, nla_attr_size(copy_len)); + nla->nla_len = nla_attr_size(payload); + *pos += nla_attr_size(payload); + nlmsg->nlmsg_len += nla->nla_len; + + memset(dst + *pos, 0, payload - copy_len); + *pos += payload - copy_len; + + return 0; +} + +static int xfrm_xlate32_attr(void *dst, const struct nlattr *nla, + size_t *pos, size_t size, + struct netlink_ext_ack *extack) +{ + int type = nla_type(nla); + u16 pol_len32, pol_len64; + int err; + + if (type > XFRMA_MAX) { + BUILD_BUG_ON(XFRMA_MAX != XFRMA_IF_ID); + NL_SET_ERR_MSG(extack, "Bad attribute"); + return -EOPNOTSUPP; + } + if (nla_len(nla) < compat_policy[type].len) { + NL_SET_ERR_MSG(extack, "Attribute bad length"); + return -EOPNOTSUPP; + } + + pol_len32 = compat_policy[type].len; + pol_len64 = xfrma_policy[type].len; + + /* XFRMA_SA and XFRMA_POLICY - need to know how-to translate */ + if (pol_len32 != pol_len64) { + if (nla_len(nla) != compat_policy[type].len) { + NL_SET_ERR_MSG(extack, "Attribute bad length"); + return -EOPNOTSUPP; + } + err = xfrm_attr_cpy32(dst, pos, nla, size, pol_len32, pol_len64); + if (err) + return err; + } + + return xfrm_attr_cpy32(dst, pos, nla, size, nla_len(nla), nla_len(nla)); +} + +static int xfrm_xlate32(struct nlmsghdr *dst, const struct nlmsghdr *src, + struct nlattr *attrs[XFRMA_MAX+1], + size_t size, u8 type, struct netlink_ext_ack *extack) +{ + size_t pos; + int i; + + memcpy(dst, src, NLMSG_HDRLEN); + dst->nlmsg_len = NLMSG_HDRLEN + xfrm_msg_min[type]; + memset(nlmsg_data(dst), 0, xfrm_msg_min[type]); + + switch (src->nlmsg_type) { + /* Compat message has the same layout as native */ + case XFRM_MSG_DELSA: + case XFRM_MSG_GETSA: + case XFRM_MSG_DELPOLICY: + case XFRM_MSG_GETPOLICY: + case XFRM_MSG_FLUSHSA: + case XFRM_MSG_FLUSHPOLICY: + case XFRM_MSG_NEWAE: + case XFRM_MSG_GETAE: + case XFRM_MSG_REPORT: + case XFRM_MSG_MIGRATE: + case XFRM_MSG_NEWSADINFO: + case XFRM_MSG_GETSADINFO: + case XFRM_MSG_NEWSPDINFO: + case XFRM_MSG_GETSPDINFO: + case XFRM_MSG_MAPPING: + memcpy(nlmsg_data(dst), nlmsg_data(src), compat_msg_min[type]); + break; + /* 4 byte alignment for trailing u64 on native, but not on compat */ + case XFRM_MSG_NEWSA: + case XFRM_MSG_NEWPOLICY: + case XFRM_MSG_UPDSA: + case XFRM_MSG_UPDPOLICY: + memcpy(nlmsg_data(dst), nlmsg_data(src), compat_msg_min[type]); + break; + case XFRM_MSG_EXPIRE: { + const struct compat_xfrm_user_expire *src_ue = nlmsg_data(src); + struct xfrm_user_expire *dst_ue = nlmsg_data(dst); + + /* compat_xfrm_user_expire has 4-byte smaller state */ + memcpy(dst_ue, src_ue, sizeof(src_ue->state)); + dst_ue->hard = src_ue->hard; + break; + } + case XFRM_MSG_ACQUIRE: { + const struct compat_xfrm_user_acquire *src_ua = nlmsg_data(src); + struct xfrm_user_acquire *dst_ua = nlmsg_data(dst); + + memcpy(dst_ua, src_ua, offsetof(struct compat_xfrm_user_acquire, aalgos)); + dst_ua->aalgos = src_ua->aalgos; + dst_ua->ealgos = src_ua->ealgos; + dst_ua->calgos = src_ua->calgos; + dst_ua->seq = src_ua->seq; + break; + } + case XFRM_MSG_POLEXPIRE: { + const struct compat_xfrm_user_polexpire *src_upe = nlmsg_data(src); + struct xfrm_user_polexpire *dst_upe = nlmsg_data(dst); + + /* compat_xfrm_user_polexpire has 4-byte smaller state */ + memcpy(dst_upe, src_upe, sizeof(src_upe->pol)); + dst_upe->hard = src_upe->hard; + break; + } + case XFRM_MSG_ALLOCSPI: { + const struct compat_xfrm_userspi_info *src_usi = nlmsg_data(src); + struct xfrm_userspi_info *dst_usi = nlmsg_data(dst); + + /* compat_xfrm_user_polexpire has 4-byte smaller state */ + memcpy(dst_usi, src_usi, sizeof(src_usi->info)); + dst_usi->min = src_usi->min; + dst_usi->max = src_usi->max; + break; + } + default: + NL_SET_ERR_MSG(extack, "Unsupported message type"); + return -EOPNOTSUPP; + } + pos = dst->nlmsg_len; + + for (i = 1; i < XFRMA_MAX + 1; i++) { + int err; + + if (i == XFRMA_PAD) + continue; + + if (!attrs[i]) + continue; + + err = xfrm_xlate32_attr(dst, attrs[i], &pos, size, extack); + if (err) + return err; + } + + return 0; +} + +static struct nlmsghdr *xfrm_user_rcv_msg_compat(const struct nlmsghdr *h32, + int maxtype, const struct nla_policy *policy, + struct netlink_ext_ack *extack) +{ + /* netlink_rcv_skb() checks if a message has full (struct nlmsghdr) */ + u16 type = h32->nlmsg_type - XFRM_MSG_BASE; + struct nlattr *attrs[XFRMA_MAX+1]; + struct nlmsghdr *h64; + size_t len; + int err; + + BUILD_BUG_ON(ARRAY_SIZE(xfrm_msg_min) != ARRAY_SIZE(compat_msg_min)); + + if (type >= ARRAY_SIZE(xfrm_msg_min)) + return ERR_PTR(-EINVAL); + + /* Don't call parse: the message might have only nlmsg header */ + if ((h32->nlmsg_type == XFRM_MSG_GETSA || + h32->nlmsg_type == XFRM_MSG_GETPOLICY) && + (h32->nlmsg_flags & NLM_F_DUMP)) + return NULL; + + err = nlmsg_parse_deprecated(h32, compat_msg_min[type], attrs, + maxtype ? : XFRMA_MAX, policy ? : compat_policy, extack); + if (err < 0) + return ERR_PTR(err); + + len = xfrm_user_rcv_calculate_len64(h32, attrs); + /* The message doesn't need translation */ + if (len == nlmsg_len(h32)) + return NULL; + + len += NLMSG_HDRLEN; + h64 = kvmalloc(len, GFP_KERNEL | __GFP_ZERO); + if (!h64) + return ERR_PTR(-ENOMEM); + + err = xfrm_xlate32(h64, h32, attrs, len, type, extack); + if (err < 0) { + kvfree(h64); + return ERR_PTR(err); + } + + return h64; +} + static struct xfrm_translator xfrm_translator = { .owner = THIS_MODULE, .alloc_compat = xfrm_alloc_compat, + .rcv_msg_compat = xfrm_user_rcv_msg_compat, }; static int __init xfrm_compat_init(void) diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 42391428e46e..d0c32a8fcc4a 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1019,7 +1019,6 @@ static int xfrm_dump_sa_done(struct netlink_callback *cb) return 0; } -static const struct nla_policy xfrma_policy[XFRMA_MAX+1]; static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb) { struct net *net = sock_net(skb->sk); @@ -2610,7 +2609,7 @@ EXPORT_SYMBOL_GPL(xfrm_msg_min); #undef XMSGSIZE -static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = { +const struct nla_policy xfrma_policy[XFRMA_MAX+1] = { [XFRMA_SA] = { .len = sizeof(struct xfrm_usersa_info)}, [XFRMA_POLICY] = { .len = sizeof(struct xfrm_userpolicy_info)}, [XFRMA_LASTUSED] = { .type = NLA_U64}, @@ -2642,6 +2641,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = { [XFRMA_SET_MARK_MASK] = { .type = NLA_U32 }, [XFRMA_IF_ID] = { .type = NLA_U32 }, }; +EXPORT_SYMBOL_GPL(xfrma_policy); static const struct nla_policy xfrma_spd_policy[XFRMA_SPD_MAX+1] = { [XFRMA_SPD_IPV4_HTHRESH] = { .len = sizeof(struct xfrmu_spdhthresh) }, @@ -2691,6 +2691,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, struct net *net = sock_net(skb->sk); struct nlattr *attrs[XFRMA_MAX+1]; const struct xfrm_link *link; + struct nlmsghdr *nlh64 = NULL; int type, err; type = nlh->nlmsg_type; @@ -2704,32 +2705,55 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, if (!netlink_net_capable(skb, CAP_NET_ADMIN)) return -EPERM; + if (in_compat_syscall()) { + struct xfrm_translator *xtr = xfrm_get_translator(); + + if (!xtr) + return -EOPNOTSUPP; + + nlh64 = xtr->rcv_msg_compat(nlh, link->nla_max, + link->nla_pol, extack); + xfrm_put_translator(xtr); + if (IS_ERR(nlh64)) + return PTR_ERR(nlh64); + if (nlh64) + nlh = nlh64; + } + if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) || type == (XFRM_MSG_GETPOLICY - XFRM_MSG_BASE)) && (nlh->nlmsg_flags & NLM_F_DUMP)) { - if (link->dump == NULL) - return -EINVAL; + struct netlink_dump_control c = { + .start = link->start, + .dump = link->dump, + .done = link->done, + }; - { - struct netlink_dump_control c = { - .start = link->start, - .dump = link->dump, - .done = link->done, - }; - return netlink_dump_start(net->xfrm.nlsk, skb, nlh, &c); + if (link->dump == NULL) { + err = -EINVAL; + goto err; } + + err = netlink_dump_start(net->xfrm.nlsk, skb, nlh, &c); + goto err; } err = nlmsg_parse_deprecated(nlh, xfrm_msg_min[type], attrs, link->nla_max ? : XFRMA_MAX, link->nla_pol ? : xfrma_policy, extack); if (err < 0) - return err; + goto err; - if (link->doit == NULL) - return -EINVAL; + if (link->doit == NULL) { + err = -EINVAL; + goto err; + } - return link->doit(skb, nlh, attrs); + err = link->doit(skb, nlh, attrs); + +err: + kvfree(nlh64); + return err; } static void xfrm_netlink_rcv(struct sk_buff *skb) From a7982ced0cb4218d4dcf7f4db15d6353cad1aa8e Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Mon, 21 Sep 2020 15:36:56 +0100 Subject: [PATCH 21/35] BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr Provide compat_xfrm_userpolicy_info translation for xfrm setsocketopt(). Reallocate buffer and put the missing padding for 64-bit message. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert (cherry picked from commit 96392ee5a13b992563cfe07d23ee30d333b89126) [adelva: Edited around removed compat check in Android kernels] Bug: 163141236 Signed-off-by: Alistair Delva Change-Id: I32a6495cd92fa13c956fca88aa5d80716155b8ae --- include/net/xfrm.h | 3 +++ net/xfrm/xfrm_compat.c | 26 ++++++++++++++++++++++++++ net/xfrm/xfrm_state.c | 14 ++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index ee7102996a15..083cc349ed08 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -2012,6 +2012,9 @@ struct xfrm_translator { int maxtype, const struct nla_policy *policy, struct netlink_ext_ack *extack); + /* Translate 32-bit user_policy from sockptr */ + int (*xlate_user_policy_sockptr)(u8 **pdata32, int optlen); + struct module *owner; }; diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c index b1b5f972538d..c1dee0696dfb 100644 --- a/net/xfrm/xfrm_compat.c +++ b/net/xfrm/xfrm_compat.c @@ -576,10 +576,36 @@ static struct nlmsghdr *xfrm_user_rcv_msg_compat(const struct nlmsghdr *h32, return h64; } +static int xfrm_user_policy_compat(u8 **pdata32, int optlen) +{ + struct compat_xfrm_userpolicy_info *p = (void *)*pdata32; + u8 *src_templates, *dst_templates; + u8 *data64; + + if (optlen < sizeof(*p)) + return -EINVAL; + + data64 = kmalloc(optlen + 4, GFP_USER | __GFP_NOWARN); + if (!data64) + return -ENOMEM; + + memcpy(data64, *pdata32, sizeof(*p)); + memset(data64 + sizeof(*p), 0, 4); + + src_templates = *pdata32 + sizeof(*p); + dst_templates = data64 + sizeof(*p) + 4; + memcpy(dst_templates, src_templates, optlen - sizeof(*p)); + + kfree(*pdata32); + *pdata32 = data64; + return 0; +} + static struct xfrm_translator xfrm_translator = { .owner = THIS_MODULE, .alloc_compat = xfrm_alloc_compat, .rcv_msg_compat = xfrm_user_rcv_msg_compat, + .xlate_user_policy_sockptr = xfrm_user_policy_compat, }; static int __init xfrm_compat_init(void) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 47e596ab28b8..409270498ab0 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -2342,6 +2342,20 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen if (IS_ERR(data)) return PTR_ERR(data); + if (in_compat_syscall()) { + struct xfrm_translator *xtr = xfrm_get_translator(); + + if (!xtr) + return -EOPNOTSUPP; + + err = xtr->xlate_user_policy_sockptr(&data, optlen); + xfrm_put_translator(xtr); + if (err) { + kfree(data); + return err; + } + } + err = -EINVAL; rcu_read_lock(); list_for_each_entry_rcu(km, &xfrm_km_list, list) { From 77bc008d89a806e7a47e4f88d1409b7424cec0f1 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Mon, 23 Mar 2020 15:49:00 +0100 Subject: [PATCH 22/35] UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller slab does this already, and I want to use this in a memory allocation tracker in drm for stuff that's tied to the lifetime of a drm_device, not the underlying struct device. Kinda like devres, but for drm. Acked-by: Andrew Morton Signed-off-by: Daniel Vetter Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: linux-mm@kvack.org Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-2-daniel.vetter@ffwll.ch (cherry picked from commit fd7cb5753ef49964ea9db5121c3fc9a4ec21ed8e) Bug: 163141236 Signed-off-by: Alistair Delva Change-Id: I10790befc779311a5f2ee441e4d073e51a5a7a62 --- mm/slob.c | 2 ++ mm/slub.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mm/slob.c b/mm/slob.c index fa53e9f73893..ac2aecfbc7a8 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -524,6 +524,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfp, unsigned long caller) { return __do_kmalloc_node(size, gfp, NUMA_NO_NODE, caller); } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, @@ -531,6 +532,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, { return __do_kmalloc_node(size, gfp, node, caller); } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif void kfree(const void *block) diff --git a/mm/slub.c b/mm/slub.c index 709e31002504..2db529348330 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4384,6 +4384,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller) return ret; } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, @@ -4414,6 +4415,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, return ret; } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif #ifdef CONFIG_SYSFS From d0dc5d8586f5d3cb82f59563144a7129af320812 Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Fri, 16 Oct 2020 09:19:23 -0700 Subject: [PATCH 23/35] ANDROID: cfi: ensure RCU is watching in __cfi_slowpath Indirect calls can happen when RCU is not watching, so we need to wake it up again for the CFI shadow and __module_address. As these calls can happen anywhere, use rcu_nmi_enter() similarly to kernel_text_address(), and switch to rcu_read_lock_sched() for shadow access. Bug: 169017431 Change-Id: Iebb857df898e644b4952a62d86fa5ff9852b5711 Signed-off-by: Sami Tolvanen --- kernel/cfi.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/kernel/cfi.c b/kernel/cfi.c index db9971424ed1..31419747b86d 100644 --- a/kernel/cfi.c +++ b/kernel/cfi.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -246,33 +247,36 @@ static inline cfi_check_fn ptr_to_check_fn(const struct cfi_shadow __rcu *s, static inline cfi_check_fn find_module_cfi_check(void *ptr) { + cfi_check_fn f = CFI_CHECK_FN; struct module *mod; preempt_disable(); mod = __module_address((unsigned long)ptr); + if (mod) + f = mod->cfi_check; preempt_enable(); - if (mod) - return mod->cfi_check; - - return CFI_CHECK_FN; + return f; } static inline cfi_check_fn find_cfi_check(void *ptr) { -#ifdef CONFIG_CFI_CLANG_SHADOW + bool rcu; cfi_check_fn f; - if (!rcu_access_pointer(cfi_shadow)) - return CFI_CHECK_FN; /* No loaded modules */ + rcu = rcu_is_watching(); + if (!rcu) + rcu_nmi_enter(); +#ifdef CONFIG_CFI_CLANG_SHADOW /* Look up the __cfi_check function to use */ - rcu_read_lock(); - f = ptr_to_check_fn(rcu_dereference(cfi_shadow), (unsigned long)ptr); - rcu_read_unlock(); + rcu_read_lock_sched(); + f = ptr_to_check_fn(rcu_dereference_sched(cfi_shadow), + (unsigned long)ptr); + rcu_read_unlock_sched(); if (f) - return f; + goto out; /* * Fall back to find_module_cfi_check, which works also for a larger @@ -280,7 +284,13 @@ static inline cfi_check_fn find_cfi_check(void *ptr) */ #endif /* CONFIG_CFI_CLANG_SHADOW */ - return find_module_cfi_check(ptr); + f = find_module_cfi_check(ptr); + +out: + if (!rcu) + rcu_nmi_exit(); + + return f; } void cfi_slowpath_handler(uint64_t id, void *ptr, void *diag) From 23277e650644f0256442a3f01252d8fbc6af07f1 Mon Sep 17 00:00:00 2001 From: Alistair Delva Date: Mon, 2 Nov 2020 10:11:19 -0800 Subject: [PATCH 24/35] ANDROID: GKI: Enable DEBUG_INFO_DWARF4 This is useful for debuggers, and is already the default for clang (incidentally). Make sure it is on for all users/compilers. Bug: 160841764 Change-Id: Ibb9a0c6900728d4cce3eccb57fb4c38268a89f24 Signed-off-by: Alistair Delva --- arch/arm64/configs/gki_defconfig | 1 + arch/x86/configs/gki_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig index d4d9627b93f6..1da021deabe0 100644 --- a/arch/arm64/configs/gki_defconfig +++ b/arch/arm64/configs/gki_defconfig @@ -564,6 +564,7 @@ CONFIG_DMA_CMA=y CONFIG_PRINTK_TIME=y CONFIG_DYNAMIC_DEBUG_CORE=y CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_HEADERS_INSTALL=y # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig index ff6bed6ddf4e..1eb71a655cc3 100644 --- a/arch/x86/configs/gki_defconfig +++ b/arch/x86/configs/gki_defconfig @@ -492,6 +492,7 @@ CONFIG_XZ_DEC=y CONFIG_DMA_CMA=y CONFIG_PRINTK_TIME=y CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_HEADERS_INSTALL=y # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set From 7a0b784363acf97a79ce39fda2d831b3d8b97f7d Mon Sep 17 00:00:00 2001 From: Todd Kjos Date: Mon, 2 Nov 2020 15:35:21 -0800 Subject: [PATCH 25/35] ANDROID: Fix build-break caused by android_rvh_nf_conn_alloc hook The new android_rvh_nf_conn_alloc hook was not declared properly so kernelci builds break if !CONFIG_ANDROID_VENDOR_HOOKS. Fixes: 01435b2e919b ("ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle") Signed-off-by: Todd Kjos Change-Id: I1208dc440836687a9c5621323ff1cf5a5bec862b --- include/trace/hooks/net.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/trace/hooks/net.h b/include/trace/hooks/net.h index 73ae65a10e57..9b69ad26e57b 100644 --- a/include/trace/hooks/net.h +++ b/include/trace/hooks/net.h @@ -34,8 +34,8 @@ DECLARE_RESTRICTED_HOOK(android_rvh_nf_conn_free, #define trace_android_vh_kfree_skb(skb) #define trace_android_rvh_sk_alloc(sock) #define trace_android_rvh_sk_free(sock) -#define trace_android_rvh_sk_alloc(nf_conn) -#define trace_android_rvh_sk_free(nf_conn) +#define trace_android_rvh_nf_conn_alloc(nf_conn) +#define trace_android_rvh_nf_conn_free(nf_conn) #endif #endif /* _TRACE_HOOK_NET_VH_H */ /* This part must be outside protection */ From ee9ce093d659bd6e9ec3df0afcfcc0286bbac2d8 Mon Sep 17 00:00:00 2001 From: Cheng Jui Wang Date: Tue, 27 Oct 2020 14:35:10 +0800 Subject: [PATCH 26/35] ANDROID: arm64: smp: fix Lockdep warning: RCU used illegally from idle CPU. This problem will happened if handle_IPI is called from idle CPU. Use trace_android_vh_ipi_stop_rcuidle() to fix this issue Bug: 171683158 Change-Id: Ic49fc1ddc19a54415dec3f28b68f42fa258ffeea Signed-off-by: Cheng Jui Wang Signed-off-by: Chun-Hung Wu --- arch/arm64/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index d928271934e9..c550b8ac037d 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -901,7 +901,7 @@ void handle_IPI(int ipinr, struct pt_regs *regs) break; case IPI_CPU_STOP: - trace_android_vh_ipi_stop(regs); + trace_android_vh_ipi_stop_rcuidle(regs); irq_enter(); local_cpu_stop(); irq_exit(); From c47964c5dd6c273649e9f1e9c9725ebe6a4e9c9e Mon Sep 17 00:00:00 2001 From: Chenggang Wang Date: Tue, 3 Nov 2020 17:01:43 +0800 Subject: [PATCH 27/35] ANDROID: GKI: Add some symbols to symbol list Leaf changes summary: 7 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 7 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 7 Added functions: [A] 'function int class_for_each_device(class*, device*, void*, int (device*, void*)*)' [A] 'function void device_set_of_node_from_dev(device*, const device*)' [A] 'function void devm_led_classdev_unregister(device*, led_classdev*)' [A] 'function void pinctrl_gpio_free(unsigned int)' [A] 'function void sha_init(unsigned int*)' [A] 'function void sha_transform(unsigned int*, const char*, unsigned int*)' [A] 'function int typec_partner_set_identity(typec_partner*)' Bug: 172305305 Change-Id: I88de74a1eaa097392f7a29f3cf4c8cc55115c968 Signed-off-by: Chenggang Wang --- android/abi_gki_aarch64.xml | 756 +++++++++++++++++++++-------------- android/abi_gki_aarch64_vivo | 7 + 2 files changed, 460 insertions(+), 303 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index c4038bcef483..917068d18374 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -575,6 +575,7 @@ + @@ -917,6 +918,7 @@ + @@ -974,6 +976,7 @@ + @@ -2744,6 +2747,7 @@ + @@ -3266,6 +3270,8 @@ + + @@ -3780,6 +3786,7 @@ + @@ -5043,14 +5050,6 @@ - - - - - - - - @@ -9831,6 +9830,14 @@ + + + + + + + + @@ -17608,7 +17615,6 @@ - @@ -22932,6 +22938,11 @@ + + + + + @@ -38857,32 +38868,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -45005,7 +44990,7 @@ - + @@ -45420,6 +45405,13 @@ + + + + + + + @@ -54207,6 +54199,17 @@ + + + + + + + + + + + @@ -55042,10 +55045,10 @@ - + - + @@ -65427,7 +65430,6 @@ - @@ -67240,6 +67242,10 @@ + + + + @@ -68892,6 +68898,13 @@ + + + + + + + @@ -75431,14 +75444,6 @@ - - - - - - - - @@ -80109,7 +80114,7 @@ - + @@ -80127,7 +80132,7 @@ - + @@ -80161,7 +80166,7 @@ - + @@ -80251,7 +80256,7 @@ - + @@ -80539,7 +80544,7 @@ - + @@ -80585,7 +80590,6 @@ - @@ -80656,7 +80660,7 @@ - + @@ -80746,12 +80750,12 @@ - + - + - + @@ -80844,7 +80848,7 @@ - + @@ -81960,12 +81964,12 @@ - + - + @@ -84617,6 +84621,10 @@ + + + + @@ -88145,7 +88153,7 @@ - + @@ -88875,6 +88883,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -89994,42 +90038,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -90588,17 +90596,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -90609,6 +90643,16 @@ + + + + + + + + + + @@ -90690,10 +90734,10 @@ - - - - + + + + @@ -91670,7 +91714,7 @@ - + @@ -91744,7 +91788,7 @@ - + @@ -108285,6 +108329,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111331,6 +111509,10 @@ + + + + @@ -111547,6 +111729,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111561,6 +111826,7 @@ + @@ -111569,10 +111835,19 @@ + + + + + + + + + @@ -116986,6 +117261,14 @@ + + + + + + + + @@ -117057,6 +117340,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -117116,62 +117455,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -117206,37 +117489,26 @@ - + - + - + - + + + + - + - + - - - - - - - - - - - - - - - + @@ -121983,7 +122255,7 @@ - + @@ -121991,20 +122263,6 @@ - - - - - - - - - - - - - - @@ -123739,114 +123997,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/abi_gki_aarch64_vivo b/android/abi_gki_aarch64_vivo index b0ac1774bc52..283b9083e392 100644 --- a/android/abi_gki_aarch64_vivo +++ b/android/abi_gki_aarch64_vivo @@ -129,6 +129,7 @@ __class_create class_destroy class_find_device + class_for_each_device class_interface_unregister __class_register class_unregister @@ -287,6 +288,7 @@ device_register device_remove_bin_file device_remove_file + device_set_of_node_from_dev device_set_wakeup_capable device_set_wakeup_enable device_show_int @@ -329,6 +331,7 @@ devm_kmemdup devm_kstrdup devm_led_classdev_register_ext + devm_led_classdev_unregister devm_nvmem_cell_get devm_nvmem_device_get devm_nvmem_register @@ -1417,6 +1420,7 @@ pinconf_generic_dt_node_to_map pinctrl_dev_get_drvdata pinctrl_get + pinctrl_gpio_free pinctrl_lookup_state pinctrl_pm_select_default_state pinctrl_pm_select_sleep_state @@ -1770,6 +1774,8 @@ sg_pcopy_from_buffer sg_pcopy_to_buffer sg_scsi_ioctl + sha_init + sha_transform shmem_truncate_range sigprocmask simple_read_from_buffer @@ -2016,6 +2022,7 @@ typec_altmode_update_active typec_get_drvdata typec_partner_register_altmode + typec_partner_set_identity typec_port_register_altmode typec_register_partner typec_register_port From de84825a22b0c5d7ddb94ea632f992eff6e48133 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Mon, 21 Sep 2020 12:31:36 +0200 Subject: [PATCH 28/35] BACKPORT: rcu/tree: Export rcu_idle_{enter,exit} to modules Fix this link error: ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined! ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined! when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light of ARM needing those soon too, they should simply be exported. Link: https://lore.kernel.org/linux-pm/20200921103741.GC5901@zn.tnic/ Bug: 172034763 Change-Id: I26d516d11edbce673f52df6474f6695c5a1e2b07 (cherry picked from commit 3ad1c8ef083bef96ec922688966484be1039e6b5) Fixes: 1fecfdbb7acc ("ACPI: processor: Take over RCU-idle for C3-BM idle") Reported-by: Sven Joachim Suggested-by: Peter Zijlstra Signed-off-by: Borislav Petkov Reviewed-by: Paul E. McKenney Signed-off-by: Rafael J. Wysocki Signed-off-by: Cheng Jui Wang Signed-off-by: Chun-Hung Wu --- kernel/rcu/tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 62e59596a30a..e370d2c19e46 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -603,6 +603,7 @@ void rcu_idle_enter(void) lockdep_assert_irqs_disabled(); rcu_eqs_enter(false); } +EXPORT_SYMBOL_GPL(rcu_idle_enter); #ifdef CONFIG_NO_HZ_FULL /** @@ -768,6 +769,7 @@ void rcu_idle_exit(void) rcu_eqs_exit(false); local_irq_restore(flags); } +EXPORT_SYMBOL_GPL(rcu_idle_exit); #ifdef CONFIG_NO_HZ_FULL /** From d8d40e5b145d970c4aee1a55238e32ba7a5c2e98 Mon Sep 17 00:00:00 2001 From: Todd Kjos Date: Wed, 4 Nov 2020 13:23:08 -0800 Subject: [PATCH 29/35] ANDROID: fix kernelci build-break due to stop_ipi hook Fix build-break for non GKI builds caused by using the _rcuidle() variant of a vendor hook. Fixes: bad091cc4bf3 ("ANDROID: vendor_hooks: Add vendor hooks for getting printk messages") Signed-off-by: Todd Kjos Change-Id: I0dffaf7e0df198a63578818f7c155671efe382b5 --- include/trace/hooks/debug.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/trace/hooks/debug.h b/include/trace/hooks/debug.h index 392525e806d4..9ddb4e45f97e 100644 --- a/include/trace/hooks/debug.h +++ b/include/trace/hooks/debug.h @@ -21,6 +21,7 @@ DECLARE_HOOK(android_vh_printk_store, TP_ARGS(facility, level)) #else #define trace_android_vh_ipi_stop(regs) +#define trace_android_vh_ipi_stop_rcuidle(regs) #define trace_android_vh_printk_store(facility, level) #endif From f7387c317dd0dfa66c2b7644760a45ade9806ca0 Mon Sep 17 00:00:00 2001 From: Mayank Grover Date: Wed, 4 Nov 2020 18:27:07 +0530 Subject: [PATCH 30/35] ANDROID: ABI: update allowed list for QCOM Leaf changes summary: 1 artifact changed (550 filtered out) Changed leaf types summary: 0 (398 filtered out) leaf types changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed (142 filtered out), 1 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed (10 filtered out), 0 Added variable 1 Added function: [A] 'function u64 pm_runtime_autosuspend_expiration(device*)' Bug: 172305298 Change-Id: I4c80ce161c8a593a1df97923d6b37b052a26c8a3 Signed-off-by: Mayank Grover --- android/abi_gki_aarch64.xml | 1242 +++++++++++++++++----------------- android/abi_gki_aarch64_qcom | 1 + 2 files changed, 629 insertions(+), 614 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 917068d18374..9ef07fc43c68 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -2805,6 +2805,7 @@ + @@ -4630,7 +4631,6 @@ - @@ -4718,7 +4718,7 @@ - + @@ -5050,6 +5050,14 @@ + + + + + + + + @@ -5640,7 +5648,7 @@ - + @@ -6883,7 +6891,7 @@ - + @@ -7433,7 +7441,7 @@ - + @@ -7917,7 +7925,7 @@ - + @@ -8863,7 +8871,7 @@ - + @@ -9082,7 +9090,7 @@ - + @@ -9830,14 +9838,6 @@ - - - - - - - - @@ -10148,7 +10148,7 @@ - + @@ -10485,7 +10485,7 @@ - + @@ -11396,7 +11396,7 @@ - + @@ -11425,7 +11425,7 @@ - + @@ -11473,7 +11473,7 @@ - + @@ -14857,7 +14857,7 @@ - + @@ -14909,7 +14909,7 @@ - + @@ -14938,7 +14938,7 @@ - + @@ -14946,7 +14946,7 @@ - + @@ -16234,7 +16234,7 @@ - + @@ -16468,7 +16468,7 @@ - + @@ -17038,7 +17038,7 @@ - + @@ -18372,7 +18372,7 @@ - + @@ -18742,7 +18742,7 @@ - + @@ -18873,7 +18873,7 @@ - + @@ -19378,7 +19378,7 @@ - + @@ -19861,7 +19861,7 @@ - + @@ -20482,7 +20482,7 @@ - + @@ -20605,7 +20605,7 @@ - + @@ -20614,7 +20614,7 @@ - + @@ -21730,7 +21730,7 @@ - + @@ -22846,7 +22846,7 @@ - + @@ -23296,7 +23296,7 @@ - + @@ -23575,6 +23575,10 @@ + + + + @@ -23667,7 +23671,7 @@ - + @@ -24823,7 +24827,7 @@ - + @@ -24878,7 +24882,7 @@ - + @@ -28006,7 +28010,7 @@ - + @@ -28131,7 +28135,7 @@ - + @@ -28566,7 +28570,7 @@ - + @@ -30259,7 +30263,7 @@ - + @@ -32244,7 +32248,7 @@ - + @@ -33522,7 +33526,7 @@ - + @@ -33685,14 +33689,14 @@ - + - + @@ -33712,7 +33716,7 @@ - + @@ -34014,13 +34018,13 @@ - + - + @@ -34054,7 +34058,7 @@ - + @@ -34125,7 +34129,7 @@ - + @@ -34272,7 +34276,7 @@ - + @@ -34331,7 +34335,7 @@ - + @@ -34496,7 +34500,7 @@ - + @@ -36643,7 +36647,7 @@ - + @@ -37367,7 +37371,7 @@ - + @@ -37548,7 +37552,7 @@ - + @@ -38696,7 +38700,7 @@ - + @@ -38993,7 +38997,7 @@ - + @@ -39171,13 +39175,13 @@ - + - + @@ -39523,7 +39527,7 @@ - + @@ -39543,7 +39547,7 @@ - + @@ -39556,7 +39560,7 @@ - + @@ -40358,7 +40362,7 @@ - + @@ -40416,7 +40420,7 @@ - + @@ -40442,7 +40446,7 @@ - + @@ -40451,7 +40455,7 @@ - + @@ -40475,7 +40479,7 @@ - + @@ -40536,7 +40540,7 @@ - + @@ -40991,7 +40995,7 @@ - + @@ -41757,7 +41761,7 @@ - + @@ -42758,7 +42762,7 @@ - + @@ -43966,7 +43970,7 @@ - + @@ -44679,7 +44683,7 @@ - + @@ -44724,7 +44728,7 @@ - + @@ -44985,7 +44989,7 @@ - + @@ -45048,7 +45052,7 @@ - + @@ -46097,7 +46101,7 @@ - + @@ -46128,7 +46132,7 @@ - + @@ -47044,7 +47048,7 @@ - + @@ -47067,7 +47071,7 @@ - + @@ -47217,7 +47221,7 @@ - + @@ -48019,7 +48023,7 @@ - + @@ -48367,7 +48371,7 @@ - + @@ -48552,7 +48556,7 @@ - + @@ -48872,7 +48876,7 @@ - + @@ -48919,7 +48923,7 @@ - + @@ -49009,7 +49013,7 @@ - + @@ -49019,7 +49023,7 @@ - + @@ -49825,7 +49829,7 @@ - + @@ -52366,7 +52370,7 @@ - + @@ -52666,7 +52670,7 @@ - + @@ -53422,7 +53426,7 @@ - + @@ -53956,7 +53960,7 @@ - + @@ -53975,6 +53979,23 @@ + + + + + + + + + + + + + + + + + @@ -54199,17 +54220,6 @@ - - - - - - - - - - - @@ -55045,10 +55055,10 @@ - + - + @@ -55327,7 +55337,7 @@ - + @@ -55489,7 +55499,7 @@ - + @@ -55499,7 +55509,7 @@ - + @@ -57710,7 +57720,7 @@ - + @@ -57965,7 +57975,7 @@ - + @@ -57977,7 +57987,7 @@ - + @@ -58310,7 +58320,7 @@ - + @@ -60016,7 +60026,7 @@ - + @@ -60045,7 +60055,7 @@ - + @@ -61181,7 +61191,7 @@ - + @@ -63124,7 +63134,7 @@ - + @@ -63133,7 +63143,7 @@ - + @@ -63202,7 +63212,7 @@ - + @@ -63210,7 +63220,7 @@ - + @@ -65158,7 +65168,7 @@ - + @@ -65368,7 +65378,7 @@ - + @@ -65430,6 +65440,7 @@ + @@ -65446,7 +65457,7 @@ - + @@ -65516,7 +65527,7 @@ - + @@ -65937,7 +65948,7 @@ - + @@ -65959,7 +65970,7 @@ - + @@ -65968,7 +65979,7 @@ - + @@ -67214,7 +67225,7 @@ - + @@ -67497,7 +67508,7 @@ - + @@ -67569,7 +67580,7 @@ - + @@ -68541,12 +68552,12 @@ - + - + @@ -69506,7 +69517,7 @@ - + @@ -70703,7 +70714,7 @@ - + @@ -71095,6 +71106,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -71162,86 +71208,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -71285,6 +71257,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -71312,41 +71358,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -72689,7 +72700,7 @@ - + @@ -72703,7 +72714,7 @@ - + @@ -72893,7 +72904,7 @@ - + @@ -72903,20 +72914,20 @@ - + - + - + @@ -73209,13 +73220,13 @@ - + - + @@ -73327,7 +73338,7 @@ - + @@ -73497,7 +73508,7 @@ - + @@ -73635,7 +73646,7 @@ - + @@ -73694,12 +73705,12 @@ - + - + @@ -74195,7 +74206,7 @@ - + @@ -74207,7 +74218,7 @@ - + @@ -74224,7 +74235,7 @@ - + @@ -74255,7 +74266,7 @@ - + @@ -74526,7 +74537,7 @@ - + @@ -74948,7 +74959,7 @@ - + @@ -75444,6 +75455,14 @@ + + + + + + + + @@ -75876,19 +75895,19 @@ - + - + - + @@ -75973,7 +75992,7 @@ - + @@ -76193,7 +76212,7 @@ - + @@ -77343,7 +77362,7 @@ - + @@ -77805,7 +77824,7 @@ - + @@ -78279,7 +78298,7 @@ - + @@ -78289,7 +78308,7 @@ - + @@ -78328,7 +78347,7 @@ - + @@ -78349,7 +78368,7 @@ - + @@ -78382,12 +78401,12 @@ - + - + @@ -78476,7 +78495,7 @@ - + @@ -78488,7 +78507,7 @@ - + @@ -79687,7 +79706,7 @@ - + @@ -80114,7 +80133,7 @@ - + @@ -80132,7 +80151,7 @@ - + @@ -80166,7 +80185,7 @@ - + @@ -80256,7 +80275,7 @@ - + @@ -80544,7 +80563,7 @@ - + @@ -80590,6 +80609,7 @@ + @@ -80660,7 +80680,7 @@ - + @@ -80750,12 +80770,12 @@ - + - + - + @@ -80848,7 +80868,7 @@ - + @@ -81764,7 +81784,7 @@ - + @@ -81810,7 +81830,7 @@ - + @@ -81889,7 +81909,7 @@ - + @@ -81964,12 +81984,12 @@ - + - + @@ -82142,7 +82162,7 @@ - + @@ -83253,7 +83273,7 @@ - + @@ -83276,7 +83296,7 @@ - + @@ -83643,13 +83663,13 @@ - + - + @@ -83692,7 +83712,7 @@ - + @@ -83717,7 +83737,7 @@ - + @@ -83725,7 +83745,7 @@ - + @@ -83977,7 +83997,7 @@ - + @@ -84375,30 +84395,30 @@ - + - + - + - + - + @@ -84457,13 +84477,13 @@ - + - + @@ -85123,7 +85143,7 @@ - + @@ -85132,12 +85152,12 @@ - + - + @@ -85172,7 +85192,7 @@ - + @@ -85181,7 +85201,7 @@ - + @@ -85269,13 +85289,13 @@ - + - + @@ -85325,7 +85345,7 @@ - + @@ -85558,14 +85578,14 @@ - + - + @@ -86448,7 +86468,7 @@ - + @@ -86456,7 +86476,7 @@ - + @@ -86467,21 +86487,21 @@ - + - + - + @@ -86490,7 +86510,7 @@ - + @@ -86503,7 +86523,7 @@ - + @@ -86514,26 +86534,26 @@ - + - + - + - + @@ -86575,7 +86595,7 @@ - + @@ -86594,14 +86614,14 @@ - + - + @@ -86612,7 +86632,7 @@ - + @@ -86676,7 +86696,7 @@ - + @@ -86738,7 +86758,7 @@ - + @@ -86785,14 +86805,14 @@ - + - + @@ -86867,7 +86887,7 @@ - + @@ -87317,6 +87337,23 @@ + + + + + + + + + + + + + + + + + @@ -87483,7 +87520,7 @@ - + @@ -87570,13 +87607,13 @@ - + - + @@ -87958,7 +87995,7 @@ - + @@ -88153,7 +88190,7 @@ - + @@ -88351,7 +88388,7 @@ - + @@ -88475,6 +88512,14 @@ + + + + + + + + @@ -88566,14 +88611,14 @@ - - - + + + - - + + - + @@ -88883,42 +88928,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -89014,23 +89023,6 @@ - - - - - - - - - - - - - - - - - @@ -89551,7 +89543,7 @@ - + @@ -89693,7 +89685,7 @@ - + @@ -90038,6 +90030,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -90320,7 +90348,7 @@ - + @@ -90330,7 +90358,7 @@ - + @@ -90397,23 +90425,6 @@ - - - - - - - - - - - - - - - - - @@ -90734,10 +90745,10 @@ - - - - + + + + @@ -90768,7 +90779,7 @@ - + @@ -90904,7 +90915,7 @@ - + @@ -91714,7 +91725,7 @@ - + @@ -91772,7 +91783,7 @@ - + @@ -91788,7 +91799,7 @@ - + @@ -92481,7 +92492,7 @@ - + @@ -93036,7 +93047,7 @@ - + @@ -93150,7 +93161,7 @@ - + @@ -94486,7 +94497,7 @@ - + @@ -94526,7 +94537,7 @@ - + @@ -99857,7 +99868,7 @@ - + @@ -100004,7 +100015,7 @@ - + @@ -100254,7 +100265,7 @@ - + @@ -100541,7 +100552,7 @@ - + @@ -100862,7 +100873,7 @@ - + @@ -101242,7 +101253,7 @@ - + @@ -101278,7 +101289,7 @@ - + @@ -101897,7 +101908,7 @@ - + @@ -101970,7 +101981,7 @@ - + @@ -102194,7 +102205,7 @@ - + @@ -102202,7 +102213,7 @@ - + @@ -102266,7 +102277,7 @@ - + @@ -102326,7 +102337,7 @@ - + @@ -102364,7 +102375,7 @@ - + @@ -102468,7 +102479,7 @@ - + @@ -102709,7 +102720,7 @@ - + @@ -104458,12 +104469,12 @@ - + - + @@ -104810,7 +104821,7 @@ - + @@ -106725,7 +106736,7 @@ - + @@ -107812,7 +107823,7 @@ - + @@ -107857,7 +107868,7 @@ - + @@ -108083,7 +108094,7 @@ - + @@ -108492,7 +108503,7 @@ - + @@ -108703,6 +108714,20 @@ + + + + + + + + + + + + + + @@ -111184,7 +111209,7 @@ - + @@ -111201,7 +111226,7 @@ - + @@ -111213,7 +111238,7 @@ - + @@ -112060,7 +112085,7 @@ - + @@ -112094,7 +112119,7 @@ - + @@ -112481,7 +112506,7 @@ - + @@ -112945,7 +112970,7 @@ - + @@ -113303,7 +113328,7 @@ - + @@ -113419,12 +113444,12 @@ - + - + @@ -113492,7 +113517,7 @@ - + @@ -113522,7 +113547,7 @@ - + @@ -113535,7 +113560,7 @@ - + @@ -113558,7 +113583,7 @@ - + @@ -113574,14 +113599,14 @@ - + - + @@ -113598,7 +113623,7 @@ - + @@ -113614,12 +113639,12 @@ - + - + @@ -114884,7 +114909,7 @@ - + @@ -115100,7 +115125,7 @@ - + @@ -115111,7 +115136,7 @@ - + @@ -115531,7 +115556,7 @@ - + @@ -116978,7 +117003,7 @@ - + @@ -117261,12 +117286,60 @@ - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -117340,62 +117413,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -117489,26 +117506,23 @@ - + - + - + - - - - + - + - + - + @@ -118013,7 +118027,7 @@ - + @@ -118293,7 +118307,7 @@ - + @@ -118329,7 +118343,7 @@ - + @@ -118462,7 +118476,7 @@ - + @@ -118514,13 +118528,13 @@ - + - + @@ -118660,7 +118674,7 @@ - + @@ -118703,7 +118717,7 @@ - + @@ -118722,7 +118736,7 @@ - + @@ -118957,27 +118971,27 @@ - + - + - + - + @@ -119676,7 +119690,7 @@ - + @@ -119729,7 +119743,7 @@ - + @@ -119743,7 +119757,7 @@ - + @@ -119762,7 +119776,7 @@ - + @@ -119786,7 +119800,7 @@ - + @@ -119912,7 +119926,7 @@ - + @@ -119929,7 +119943,7 @@ - + @@ -120420,7 +120434,7 @@ - + @@ -120709,7 +120723,7 @@ - + @@ -120723,7 +120737,7 @@ - + @@ -120897,7 +120911,7 @@ - + @@ -120916,7 +120930,7 @@ - + @@ -120946,7 +120960,7 @@ - + @@ -121092,7 +121106,7 @@ - + @@ -121142,7 +121156,7 @@ - + @@ -121254,7 +121268,7 @@ - + @@ -121300,7 +121314,7 @@ - + @@ -122189,7 +122203,7 @@ - + @@ -122264,7 +122278,7 @@ - + @@ -122412,7 +122426,7 @@ - + @@ -122708,12 +122722,12 @@ - + - + @@ -122986,7 +123000,7 @@ - + @@ -123030,7 +123044,7 @@ - + @@ -123062,7 +123076,7 @@ - + @@ -123592,7 +123606,7 @@ - + @@ -123659,7 +123673,7 @@ - + @@ -124203,7 +124217,7 @@ - + @@ -124748,7 +124762,7 @@ - + @@ -125691,7 +125705,7 @@ - + @@ -126513,7 +126527,7 @@ - + @@ -126550,7 +126564,7 @@ - + @@ -126848,7 +126862,7 @@ - + @@ -126910,7 +126924,7 @@ - + @@ -127502,7 +127516,7 @@ - + @@ -127568,13 +127582,13 @@ - + - + @@ -129278,7 +129292,7 @@ - + @@ -129917,6 +129931,6 @@ diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index ee1f919ac00b..1cab4f5c7d45 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -1727,6 +1727,7 @@ __pm_relax pm_relax pm_runtime_allow + pm_runtime_autosuspend_expiration pm_runtime_barrier __pm_runtime_disable pm_runtime_enable From d5875550206455df71501cd333a27f94db0fe2d2 Mon Sep 17 00:00:00 2001 From: Akash Asthana Date: Wed, 4 Nov 2020 15:08:21 +0530 Subject: [PATCH 31/35] ANDROID: ABI: Update allowed list for QCOM Leaf changes summary: 1 artifact changed (550 filtered out) Changed leaf types summary: 0 (398 filtered out) leaf types changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed (142 filtered out), 1 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed (10 filtered out), 0 Added variable 1 Added function: [A] 'function device_node* of_get_next_parent(device_node*)' Bug: 172412533 Signed-off-by: Akash Asthana Change-Id: Ibd916f38d871469e56888ff3903f0a1bc388b52b Signed-off-by: Todd Kjos --- android/abi_gki_aarch64.xml | 854 +++++++++++++++++------------------ android/abi_gki_aarch64_qcom | 1 + 2 files changed, 428 insertions(+), 427 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 9ef07fc43c68..e933886f53c5 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -2529,6 +2529,7 @@ + @@ -4631,6 +4632,7 @@ + @@ -4718,7 +4720,7 @@ - + @@ -5648,7 +5650,7 @@ - + @@ -6891,7 +6893,7 @@ - + @@ -7441,7 +7443,7 @@ - + @@ -7925,7 +7927,7 @@ - + @@ -8871,7 +8873,7 @@ - + @@ -9090,7 +9092,7 @@ - + @@ -10148,7 +10150,7 @@ - + @@ -10485,7 +10487,7 @@ - + @@ -11396,7 +11398,7 @@ - + @@ -11425,7 +11427,7 @@ - + @@ -11473,7 +11475,7 @@ - + @@ -14857,7 +14859,7 @@ - + @@ -14909,7 +14911,7 @@ - + @@ -14938,7 +14940,7 @@ - + @@ -14946,7 +14948,7 @@ - + @@ -16234,7 +16236,7 @@ - + @@ -16468,7 +16470,7 @@ - + @@ -17038,7 +17040,7 @@ - + @@ -18372,7 +18374,7 @@ - + @@ -18742,7 +18744,7 @@ - + @@ -18873,7 +18875,7 @@ - + @@ -19378,7 +19380,7 @@ - + @@ -19861,7 +19863,7 @@ - + @@ -20482,7 +20484,7 @@ - + @@ -20605,7 +20607,7 @@ - + @@ -20614,7 +20616,7 @@ - + @@ -21730,7 +21732,7 @@ - + @@ -22846,7 +22848,7 @@ - + @@ -23296,7 +23298,7 @@ - + @@ -23671,7 +23673,7 @@ - + @@ -24827,7 +24829,7 @@ - + @@ -24882,7 +24884,7 @@ - + @@ -28010,7 +28012,7 @@ - + @@ -28135,7 +28137,7 @@ - + @@ -28570,7 +28572,7 @@ - + @@ -30263,7 +30265,7 @@ - + @@ -32248,7 +32250,7 @@ - + @@ -33526,7 +33528,7 @@ - + @@ -33689,14 +33691,14 @@ - + - + @@ -33716,7 +33718,7 @@ - + @@ -34018,13 +34020,13 @@ - + - + @@ -34058,7 +34060,7 @@ - + @@ -34129,7 +34131,7 @@ - + @@ -34276,7 +34278,7 @@ - + @@ -34335,7 +34337,7 @@ - + @@ -34500,7 +34502,7 @@ - + @@ -36647,7 +36649,7 @@ - + @@ -37371,7 +37373,7 @@ - + @@ -37552,7 +37554,7 @@ - + @@ -38700,7 +38702,7 @@ - + @@ -38997,7 +38999,7 @@ - + @@ -39175,13 +39177,13 @@ - + - + @@ -39527,7 +39529,7 @@ - + @@ -39547,7 +39549,7 @@ - + @@ -39560,7 +39562,7 @@ - + @@ -40362,7 +40364,7 @@ - + @@ -40420,7 +40422,7 @@ - + @@ -40446,7 +40448,7 @@ - + @@ -40455,7 +40457,7 @@ - + @@ -40479,7 +40481,7 @@ - + @@ -40540,7 +40542,7 @@ - + @@ -40995,7 +40997,7 @@ - + @@ -41761,7 +41763,7 @@ - + @@ -42762,7 +42764,7 @@ - + @@ -43970,7 +43972,7 @@ - + @@ -44683,7 +44685,7 @@ - + @@ -44728,7 +44730,7 @@ - + @@ -44989,7 +44991,7 @@ - + @@ -45052,7 +45054,7 @@ - + @@ -46101,7 +46103,7 @@ - + @@ -46132,7 +46134,7 @@ - + @@ -47048,7 +47050,7 @@ - + @@ -47071,7 +47073,7 @@ - + @@ -47221,7 +47223,7 @@ - + @@ -48023,7 +48025,7 @@ - + @@ -48371,7 +48373,7 @@ - + @@ -48556,7 +48558,7 @@ - + @@ -48876,7 +48878,7 @@ - + @@ -48923,7 +48925,7 @@ - + @@ -49013,7 +49015,7 @@ - + @@ -49023,7 +49025,7 @@ - + @@ -49829,7 +49831,7 @@ - + @@ -52370,7 +52372,7 @@ - + @@ -52670,7 +52672,7 @@ - + @@ -53426,7 +53428,7 @@ - + @@ -53960,7 +53962,7 @@ - + @@ -53979,23 +53981,6 @@ - - - - - - - - - - - - - - - - - @@ -55337,7 +55322,7 @@ - + @@ -55499,7 +55484,7 @@ - + @@ -55509,7 +55494,7 @@ - + @@ -57720,7 +57705,7 @@ - + @@ -57975,7 +57960,7 @@ - + @@ -57987,7 +57972,7 @@ - + @@ -58320,7 +58305,7 @@ - + @@ -60026,7 +60011,7 @@ - + @@ -60055,7 +60040,7 @@ - + @@ -61191,7 +61176,7 @@ - + @@ -63134,7 +63119,7 @@ - + @@ -63143,7 +63128,7 @@ - + @@ -63212,7 +63197,7 @@ - + @@ -63220,7 +63205,7 @@ - + @@ -65168,7 +65153,7 @@ - + @@ -65378,7 +65363,7 @@ - + @@ -65457,7 +65442,7 @@ - + @@ -65527,7 +65512,7 @@ - + @@ -65948,7 +65933,7 @@ - + @@ -65970,7 +65955,7 @@ - + @@ -65979,7 +65964,7 @@ - + @@ -67225,7 +67210,7 @@ - + @@ -67313,6 +67298,12 @@ + + + + + + @@ -67508,7 +67499,7 @@ - + @@ -67580,7 +67571,7 @@ - + @@ -68552,12 +68543,12 @@ - + - + @@ -69517,7 +69508,7 @@ - + @@ -70714,7 +70705,7 @@ - + @@ -72700,7 +72691,7 @@ - + @@ -72714,7 +72705,7 @@ - + @@ -72904,7 +72895,7 @@ - + @@ -72914,20 +72905,20 @@ - + - + - + @@ -73220,13 +73211,13 @@ - + - + @@ -73338,7 +73329,7 @@ - + @@ -73508,7 +73499,7 @@ - + @@ -73646,7 +73637,7 @@ - + @@ -73705,12 +73696,12 @@ - + - + @@ -74206,7 +74197,7 @@ - + @@ -74218,7 +74209,7 @@ - + @@ -74235,7 +74226,7 @@ - + @@ -74266,7 +74257,7 @@ - + @@ -74537,7 +74528,7 @@ - + @@ -74959,7 +74950,7 @@ - + @@ -75895,19 +75886,19 @@ - + - + - + @@ -75992,7 +75983,7 @@ - + @@ -76212,7 +76203,7 @@ - + @@ -77362,7 +77353,7 @@ - + @@ -77824,7 +77815,7 @@ - + @@ -78298,7 +78289,7 @@ - + @@ -78308,7 +78299,7 @@ - + @@ -78347,7 +78338,7 @@ - + @@ -78368,7 +78359,7 @@ - + @@ -78401,12 +78392,12 @@ - + - + @@ -78495,7 +78486,7 @@ - + @@ -78507,7 +78498,7 @@ - + @@ -79706,7 +79697,7 @@ - + @@ -81784,7 +81775,7 @@ - + @@ -81830,7 +81821,7 @@ - + @@ -81909,7 +81900,7 @@ - + @@ -82162,7 +82153,7 @@ - + @@ -83273,7 +83264,7 @@ - + @@ -83296,7 +83287,7 @@ - + @@ -83663,13 +83654,13 @@ - + - + @@ -83712,7 +83703,7 @@ - + @@ -83737,7 +83728,7 @@ - + @@ -83745,7 +83736,7 @@ - + @@ -83997,7 +83988,7 @@ - + @@ -84395,30 +84386,30 @@ - + - + - + - + - + @@ -84477,13 +84468,13 @@ - + - + @@ -85143,7 +85134,7 @@ - + @@ -85152,12 +85143,12 @@ - + - + @@ -85192,7 +85183,7 @@ - + @@ -85201,7 +85192,7 @@ - + @@ -85289,13 +85280,13 @@ - + - + @@ -85345,7 +85336,7 @@ - + @@ -85578,14 +85569,14 @@ - + - + @@ -86468,7 +86459,7 @@ - + @@ -86476,7 +86467,7 @@ - + @@ -86487,21 +86478,21 @@ - + - + - + @@ -86510,7 +86501,7 @@ - + @@ -86523,7 +86514,7 @@ - + @@ -86534,26 +86525,26 @@ - + - + - + - + @@ -86595,7 +86586,7 @@ - + @@ -86614,14 +86605,14 @@ - + - + @@ -86632,7 +86623,7 @@ - + @@ -86696,7 +86687,7 @@ - + @@ -86758,7 +86749,7 @@ - + @@ -86805,14 +86796,14 @@ - + - + @@ -86887,7 +86878,7 @@ - + @@ -87337,23 +87328,6 @@ - - - - - - - - - - - - - - - - - @@ -87520,7 +87494,7 @@ - + @@ -87607,13 +87581,13 @@ - + - + @@ -87995,7 +87969,7 @@ - + @@ -88388,7 +88362,7 @@ - + @@ -88512,14 +88486,6 @@ - - - - - - - - @@ -88611,14 +88577,14 @@ - - - + + + - - + + - + @@ -89023,6 +88989,23 @@ + + + + + + + + + + + + + + + + + @@ -89543,7 +89526,7 @@ - + @@ -89685,7 +89668,7 @@ - + @@ -90348,7 +90331,7 @@ - + @@ -90358,7 +90341,7 @@ - + @@ -90425,6 +90408,23 @@ + + + + + + + + + + + + + + + + + @@ -90745,10 +90745,10 @@ - - - - + + + + @@ -90779,7 +90779,7 @@ - + @@ -90915,7 +90915,7 @@ - + @@ -91783,7 +91783,7 @@ - + @@ -92492,7 +92492,7 @@ - + @@ -93047,7 +93047,7 @@ - + @@ -93161,7 +93161,7 @@ - + @@ -94497,7 +94497,7 @@ - + @@ -94537,7 +94537,7 @@ - + @@ -99868,7 +99868,7 @@ - + @@ -100015,7 +100015,7 @@ - + @@ -100265,7 +100265,7 @@ - + @@ -100552,7 +100552,7 @@ - + @@ -100873,7 +100873,7 @@ - + @@ -101253,7 +101253,7 @@ - + @@ -101289,7 +101289,7 @@ - + @@ -101908,7 +101908,7 @@ - + @@ -101981,7 +101981,7 @@ - + @@ -102205,7 +102205,7 @@ - + @@ -102213,7 +102213,7 @@ - + @@ -102277,7 +102277,7 @@ - + @@ -102337,7 +102337,7 @@ - + @@ -102375,7 +102375,7 @@ - + @@ -102479,7 +102479,7 @@ - + @@ -102720,7 +102720,7 @@ - + @@ -104469,12 +104469,12 @@ - + - + @@ -104821,7 +104821,7 @@ - + @@ -106736,7 +106736,7 @@ - + @@ -107823,7 +107823,7 @@ - + @@ -107868,7 +107868,7 @@ - + @@ -108094,7 +108094,7 @@ - + @@ -108503,7 +108503,7 @@ - + @@ -111209,7 +111209,7 @@ - + @@ -111226,7 +111226,7 @@ - + @@ -111238,7 +111238,7 @@ - + @@ -112085,7 +112085,7 @@ - + @@ -112119,7 +112119,7 @@ - + @@ -112506,7 +112506,7 @@ - + @@ -112970,7 +112970,7 @@ - + @@ -113328,7 +113328,7 @@ - + @@ -113444,12 +113444,12 @@ - + - + @@ -113517,7 +113517,7 @@ - + @@ -113547,7 +113547,7 @@ - + @@ -113560,7 +113560,7 @@ - + @@ -113583,7 +113583,7 @@ - + @@ -113599,14 +113599,14 @@ - + - + @@ -113623,7 +113623,7 @@ - + @@ -113639,12 +113639,12 @@ - + - + @@ -114909,7 +114909,7 @@ - + @@ -115125,7 +115125,7 @@ - + @@ -115136,7 +115136,7 @@ - + @@ -115556,7 +115556,7 @@ - + @@ -117003,7 +117003,7 @@ - + @@ -117286,62 +117286,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -117472,6 +117416,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -118027,7 +118027,7 @@ - + @@ -118307,7 +118307,7 @@ - + @@ -118343,7 +118343,7 @@ - + @@ -118476,7 +118476,7 @@ - + @@ -118528,13 +118528,13 @@ - + - + @@ -118674,7 +118674,7 @@ - + @@ -118717,7 +118717,7 @@ - + @@ -118736,7 +118736,7 @@ - + @@ -118971,27 +118971,27 @@ - + - + - + - + @@ -119690,7 +119690,7 @@ - + @@ -119743,7 +119743,7 @@ - + @@ -119757,7 +119757,7 @@ - + @@ -119776,7 +119776,7 @@ - + @@ -119800,7 +119800,7 @@ - + @@ -119926,7 +119926,7 @@ - + @@ -119943,7 +119943,7 @@ - + @@ -120434,7 +120434,7 @@ - + @@ -120723,7 +120723,7 @@ - + @@ -120737,7 +120737,7 @@ - + @@ -120911,7 +120911,7 @@ - + @@ -120930,7 +120930,7 @@ - + @@ -120960,7 +120960,7 @@ - + @@ -121106,7 +121106,7 @@ - + @@ -121156,7 +121156,7 @@ - + @@ -121268,7 +121268,7 @@ - + @@ -121314,7 +121314,7 @@ - + @@ -122203,7 +122203,7 @@ - + @@ -122278,7 +122278,7 @@ - + @@ -122426,7 +122426,7 @@ - + @@ -122722,12 +122722,12 @@ - + - + @@ -123000,7 +123000,7 @@ - + @@ -123044,7 +123044,7 @@ - + @@ -123076,7 +123076,7 @@ - + @@ -123606,7 +123606,7 @@ - + @@ -123673,7 +123673,7 @@ - + @@ -124217,7 +124217,7 @@ - + @@ -124762,7 +124762,7 @@ - + @@ -125705,7 +125705,7 @@ - + @@ -126527,7 +126527,7 @@ - + @@ -126564,7 +126564,7 @@ - + @@ -126862,7 +126862,7 @@ - + @@ -126924,7 +126924,7 @@ - + @@ -127516,7 +127516,7 @@ - + @@ -127582,13 +127582,13 @@ - + - + @@ -129292,7 +129292,7 @@ - + @@ -129931,6 +129931,6 @@ diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index 1cab4f5c7d45..cfb52bd5cbc8 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -1521,6 +1521,7 @@ of_get_named_gpio_flags of_get_next_available_child of_get_next_child + of_get_next_parent of_get_parent of_get_property of_get_regulator_init_data From 6f6b3fb47081dfef447ad085fc4ddd33e84a7119 Mon Sep 17 00:00:00 2001 From: Alistair Delva Date: Thu, 5 Nov 2020 08:49:49 -0800 Subject: [PATCH 32/35] ANDROID: Temporarily disable XFRM_USER_COMPAT filtering Before 5.10-rc1, the upstream kernel blocked any compat calls into XFRM code with EOPNOTSUPP, however Android kernels had been patching this check out and made userspace match the 64-bit kernel netlink format instead. When the new XFRM_USER_COMPAT feature landed, it added a similar check in two places which returns EOPNOTSUPP only if the XFRM_USER_COMPAT feature is disabled, however that is currently always the case for Android kernels and we do not want to filter these callers. While we work to remove the userspace compatibility mess, disable the filtering of compat calls when XFRM_USER_COMPAT is disabled. If the XFRM_USER_COMPAT feature is enabled, nothing changes. Bug: 163141236 Bug: 172541864 Signed-off-by: Alistair Delva Change-Id: Ifbea109070650dfcb4f93a3cc692c18a8d11ab44 --- net/xfrm/xfrm_state.c | 21 ++++++++++++--------- net/xfrm/xfrm_user.c | 25 ++++++++++++++----------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 409270498ab0..d5a730fa797a 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -2342,17 +2342,20 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen if (IS_ERR(data)) return PTR_ERR(data); - if (in_compat_syscall()) { - struct xfrm_translator *xtr = xfrm_get_translator(); + /* Use the 64-bit / untranslated format on Android, even for compat */ + if (!IS_ENABLED(CONFIG_ANDROID) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) { + if (in_compat_syscall()) { + struct xfrm_translator *xtr = xfrm_get_translator(); - if (!xtr) - return -EOPNOTSUPP; + if (!xtr) + return -EOPNOTSUPP; - err = xtr->xlate_user_policy_sockptr(&data, optlen); - xfrm_put_translator(xtr); - if (err) { - kfree(data); - return err; + err = xtr->xlate_user_policy_sockptr(&data, optlen); + xfrm_put_translator(xtr); + if (err) { + kfree(data); + return err; + } } } diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index d0c32a8fcc4a..49687429adf2 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -2705,19 +2705,22 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, if (!netlink_net_capable(skb, CAP_NET_ADMIN)) return -EPERM; - if (in_compat_syscall()) { - struct xfrm_translator *xtr = xfrm_get_translator(); + /* Use the 64-bit / untranslated format on Android, even for compat */ + if (!IS_ENABLED(CONFIG_ANDROID) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) { + if (in_compat_syscall()) { + struct xfrm_translator *xtr = xfrm_get_translator(); - if (!xtr) - return -EOPNOTSUPP; + if (!xtr) + return -EOPNOTSUPP; - nlh64 = xtr->rcv_msg_compat(nlh, link->nla_max, - link->nla_pol, extack); - xfrm_put_translator(xtr); - if (IS_ERR(nlh64)) - return PTR_ERR(nlh64); - if (nlh64) - nlh = nlh64; + nlh64 = xtr->rcv_msg_compat(nlh, link->nla_max, + link->nla_pol, extack); + xfrm_put_translator(xtr); + if (IS_ERR(nlh64)) + return PTR_ERR(nlh64); + if (nlh64) + nlh = nlh64; + } } if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) || From 4e7a62687a15c935f308b46a741dea56b367eac4 Mon Sep 17 00:00:00 2001 From: Mayank Grover Date: Thu, 5 Nov 2020 16:47:13 +0530 Subject: [PATCH 33/35] ANDROID: modules: cfi cleanup for module load failure Cleanup cfi shadow for failure in module loading, to avoid causing warnings. Bug: 172542186 Change-Id: I1de7ffa7d884c8e46891b8bbc8196ec0d2cef0d6 Signed-off-by: Mayank Grover --- kernel/module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/module.c b/kernel/module.c index 901a6e4158af..9012ff26d838 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -4002,6 +4002,8 @@ static int load_module(struct load_info *info, const char __user *uargs, mutex_unlock(&module_mutex); ddebug_cleanup: + /* Clean up CFI for the module. */ + cfi_cleanup(mod); ftrace_release_mod(mod); dynamic_debug_remove(mod, info->debug); synchronize_rcu(); From f889ae2a8c04f24813f9d97eab4a367771be0f00 Mon Sep 17 00:00:00 2001 From: Maulik Shah Date: Tue, 10 Nov 2020 10:43:48 +0530 Subject: [PATCH 34/35] ANDROID: ABI: Update allowed list for QCOM Add the following symbols to QCOM allowed-list: -- __irq_set_handler -- irq_set_handler_data Bug: 172879351 Change-Id: I6869b60b4893a3f9447d0fb6e7977e0685477386 Signed-off-by: Maulik Shah --- android/abi_gki_aarch64_qcom | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index cfb52bd5cbc8..3bb7000ff0a7 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -1196,6 +1196,8 @@ irq_set_chained_handler_and_data irq_set_chip_and_handler_name irq_set_chip_data + __irq_set_handler + irq_set_handler_data irq_set_irqchip_state irq_set_irq_type irq_set_irq_wake From dc2d5a0ace0577afb180ec1beff71f7878d94cc6 Mon Sep 17 00:00:00 2001 From: Neeraj Soni Date: Wed, 11 Nov 2020 12:32:33 +0530 Subject: [PATCH 35/35] ANDROID: ABI: Update allowed list for QCOM Leaf changes summary: 3 artifact changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 3 Added function: [A] 'function void keyslot_manager_set_max_dun_bytes(keyslot_manager*, unsigned int)' [B] 'function void keyslot_manager_reprogram_all_keys(keyslot_manager*)' [C] 'function void keyslot_manager_destroy(keyslot_manager*)' Bug: 172917070 Change-Id: I8efd18e0bd0d1884634c7358656e4045de039e57 Signed-off-by: Neeraj Soni Signed-off-by: Mukesh Ojha --- android/abi_gki_aarch64.xml | 1082 +++++++++++++++++----------------- android/abi_gki_aarch64_qcom | 3 + 2 files changed, 559 insertions(+), 526 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index e933886f53c5..715bd63ce516 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -2086,6 +2086,7 @@ + @@ -5325,17 +5326,6 @@ - - - - - - - - - - - @@ -14443,6 +14433,17 @@ + + + + + + + + + + + @@ -16631,6 +16632,11 @@ + + + + + @@ -53981,7 +53987,6 @@ - @@ -54005,7 +54010,7 @@ - + @@ -54013,7 +54018,7 @@ - + @@ -54205,6 +54210,17 @@ + + + + + + + + + + + @@ -55203,7 +55219,7 @@ - + @@ -55467,14 +55483,6 @@ - - - - - - - - @@ -55492,8 +55500,8 @@ - - + + @@ -55521,6 +55529,20 @@ + + + + + + + + + + + + + + @@ -55624,17 +55646,17 @@ - + - + - + @@ -55773,14 +55795,14 @@ - + - + @@ -63118,7 +63140,7 @@ - + @@ -63127,7 +63149,7 @@ - + @@ -71097,41 +71119,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -71199,12 +71186,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -71248,80 +71309,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -71349,6 +71336,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -88541,6 +88563,14 @@ + + + + + + + + @@ -92651,12 +92681,12 @@ - - - - - - + + + + + + @@ -107943,9 +107973,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -108098,7 +108359,18 @@ + + + + + + + + + + + @@ -108281,6 +108553,13 @@ + + + + + + + @@ -108288,6 +108567,10 @@ + + + + @@ -108502,7 +108785,7 @@ - + @@ -111347,6 +111630,14 @@ + + + + + + + + @@ -112513,28 +112804,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -114350,7 +114619,29 @@ - + + + + + + + + + + + + + + + + + + + + + + + @@ -114358,7 +114649,7 @@ - + @@ -114366,7 +114657,7 @@ - + @@ -114374,7 +114665,7 @@ - + @@ -114382,7 +114673,7 @@ - + @@ -114390,7 +114681,7 @@ - + @@ -114401,7 +114692,7 @@ - + @@ -114412,15 +114703,7 @@ - - - - - - - - - + @@ -114428,6 +114711,14 @@ + + + + + + + + @@ -114450,7 +114741,7 @@ - + @@ -114520,7 +114811,45 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114528,7 +114857,7 @@ - + @@ -115336,6 +115665,14 @@ + + + + + + + + @@ -116368,6 +116705,14 @@ + + + + + + + + @@ -117275,268 +117620,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -117620,17 +117704,6 @@ - - - - - - - - - - - @@ -122261,20 +122334,15 @@ - + - + - - - - - - + - + @@ -122752,7 +122820,7 @@ - + @@ -122778,13 +122846,13 @@ - + - + @@ -122792,35 +122860,35 @@ - + - + - + - + - + @@ -122829,28 +122897,28 @@ - + - + - + - + @@ -122858,12 +122926,12 @@ - + - + @@ -122871,18 +122939,18 @@ - + - + - + @@ -123739,44 +123807,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -129931,6 +129961,6 @@ diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index 3bb7000ff0a7..bc7e54479399 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -1226,6 +1226,9 @@ kern_path keyslot_manager_create keyslot_manager_private + keyslot_manager_set_max_dun_bytes + keyslot_manager_reprogram_all_keys + keyslot_manager_destroy __kfifo_in __kfifo_out kfree