diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 88042d5b20bc..86c4dcbfb904 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -215,7 +215,9 @@ + + @@ -250,6 +252,8 @@ + + @@ -299,6 +303,7 @@ + @@ -522,7 +527,9 @@ + + @@ -544,6 +551,7 @@ + @@ -857,6 +865,7 @@ + @@ -1569,9 +1578,11 @@ + + @@ -1717,6 +1728,7 @@ + @@ -1821,11 +1833,13 @@ + + @@ -3025,6 +3039,7 @@ + @@ -3065,10 +3080,12 @@ + + @@ -3427,6 +3444,7 @@ + @@ -4206,6 +4224,7 @@ + @@ -4319,6 +4338,7 @@ + @@ -4449,34 +4469,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4568,6 +4560,7 @@ + @@ -4842,7 +4835,7 @@ - + @@ -4991,7 +4984,7 @@ - + @@ -5412,198 +5405,198 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -12158,6 +12151,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -12338,7 +12355,7 @@ - + @@ -12346,7 +12363,7 @@ - + @@ -12354,7 +12371,7 @@ - + @@ -14165,7 +14182,7 @@ - + @@ -14179,7 +14196,7 @@ - + @@ -14453,6 +14470,7 @@ + @@ -15298,7 +15316,6 @@ - @@ -15318,6 +15335,20 @@ + + + + + + + + + + + + + + @@ -17307,6 +17338,17 @@ + + + + + + + + + + + @@ -17383,6 +17425,7 @@ + @@ -17417,6 +17460,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17454,6 +17536,7 @@ + @@ -17601,6 +17684,17 @@ + + + + + + + + + + + @@ -18338,7 +18432,7 @@ - + @@ -18354,12 +18448,12 @@ - + - + @@ -18441,7 +18535,7 @@ - + @@ -18832,7 +18926,7 @@ - + @@ -19069,7 +19163,7 @@ - + @@ -19210,7 +19304,7 @@ - + @@ -20025,6 +20119,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -20042,7 +20174,7 @@ - + @@ -20173,44 +20305,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -20841,7 +20935,7 @@ - + @@ -20863,7 +20957,7 @@ - + @@ -21548,7 +21642,7 @@ - + @@ -21556,7 +21650,7 @@ - + @@ -21570,6 +21664,7 @@ + @@ -22722,6 +22817,13 @@ + + + + + + + @@ -28885,6 +28987,17 @@ + + + + + + + + + + + @@ -28924,6 +29037,7 @@ + @@ -28976,6 +29090,17 @@ + + + + + + + + + + + @@ -29049,6 +29174,7 @@ + @@ -31299,7 +31425,6 @@ - @@ -32094,7 +32219,6 @@ - @@ -37533,14 +37657,6 @@ - - - - - - - - @@ -38476,13 +38592,13 @@ - + - + @@ -38565,7 +38681,7 @@ - + @@ -38963,7 +39079,7 @@ - + @@ -39156,6 +39272,9 @@ + + + @@ -39724,6 +39843,17 @@ + + + + + + + + + + + @@ -39744,6 +39874,8 @@ + + @@ -39760,6 +39892,11 @@ + + + + + @@ -39838,6 +39975,7 @@ + @@ -40797,6 +40935,7 @@ + @@ -40827,11 +40966,23 @@ + + + + + + + + + + + + @@ -42222,6 +42373,17 @@ + + + + + + + + + + + @@ -42285,6 +42447,7 @@ + @@ -42760,6 +42923,17 @@ + + + + + + + + + + + @@ -42960,6 +43134,7 @@ + @@ -46037,7 +46212,7 @@ - + @@ -46136,7 +46311,7 @@ - + @@ -48045,7 +48220,7 @@ - + @@ -48558,7 +48733,7 @@ - + @@ -48682,7 +48857,7 @@ - + @@ -49191,7 +49366,7 @@ - + @@ -49255,7 +49430,7 @@ - + @@ -49312,7 +49487,7 @@ - + @@ -49451,7 +49626,7 @@ - + @@ -49482,7 +49657,7 @@ - + @@ -49493,7 +49668,7 @@ - + @@ -49752,7 +49927,7 @@ - + @@ -49771,7 +49946,7 @@ - + @@ -49808,7 +49983,7 @@ - + @@ -49932,7 +50107,7 @@ - + @@ -49953,7 +50128,7 @@ - + @@ -49990,7 +50165,7 @@ - + @@ -50084,7 +50259,7 @@ - + @@ -50143,7 +50318,7 @@ - + @@ -51155,6 +51330,7 @@ + @@ -51214,7 +51390,6 @@ - @@ -52138,7 +52313,7 @@ - + @@ -52146,7 +52321,7 @@ - + @@ -52588,7 +52763,7 @@ - + @@ -52639,7 +52814,7 @@ - + @@ -52865,7 +53040,7 @@ - + @@ -53510,6 +53685,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -53956,17 +54166,6 @@ - - - - - - - - - - - @@ -55059,7 +55258,7 @@ - + @@ -55083,7 +55282,18 @@ - + + + + + + + + + + + + @@ -55229,7 +55439,7 @@ - + @@ -55517,6 +55727,7 @@ + @@ -59549,6 +59760,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -59645,7 +60017,7 @@ - + @@ -60713,7 +61085,7 @@ - + @@ -60919,8 +61291,8 @@ - - + + @@ -61044,7 +61416,7 @@ - + @@ -61058,7 +61430,7 @@ - + @@ -61100,7 +61472,7 @@ - + @@ -62303,7 +62675,7 @@ - + @@ -62863,7 +63235,7 @@ - + @@ -64068,7 +64440,7 @@ - + @@ -64079,7 +64451,7 @@ - + @@ -64087,7 +64459,7 @@ - + @@ -64103,7 +64475,7 @@ - + @@ -64119,7 +64491,7 @@ - + @@ -64127,7 +64499,7 @@ - + @@ -64141,7 +64513,7 @@ - + @@ -64152,7 +64524,7 @@ - + @@ -64160,7 +64532,7 @@ - + @@ -64168,7 +64540,7 @@ - + @@ -64176,7 +64548,7 @@ - + @@ -64184,7 +64556,7 @@ - + @@ -64203,7 +64575,7 @@ - + @@ -64366,6 +64738,17 @@ + + + + + + + + + + + @@ -64395,7 +64778,7 @@ - + @@ -64475,6 +64858,7 @@ + @@ -64527,6 +64911,17 @@ + + + + + + + + + + + @@ -64584,6 +64979,7 @@ + @@ -64732,14 +65128,6 @@ - - - - - - - - @@ -65090,6 +65478,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -65851,12 +66262,6 @@ - - - - - - @@ -70760,6 +71165,20 @@ + + + + + + + + + + + + + + @@ -74140,6 +74559,17 @@ + + + + + + + + + + + @@ -74238,7 +74668,7 @@ - + @@ -74419,6 +74849,7 @@ + @@ -76967,6 +77398,17 @@ + + + + + + + + + + + @@ -76978,6 +77420,7 @@ + @@ -77121,11 +77564,6 @@ - - - - - @@ -79072,6 +79510,17 @@ + + + + + + + + + + + @@ -79140,8 +79589,20 @@ + + + + + + + + + + + + @@ -79154,6 +79615,7 @@ + @@ -80766,6 +81228,17 @@ + + + + + + + + + + + @@ -81220,17 +81693,6 @@ - - - - - - - - - - - @@ -86074,7 +86536,7 @@ - + @@ -86634,6 +87096,17 @@ + + + + + + + + + + + @@ -86672,6 +87145,7 @@ + @@ -87082,6 +87556,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87194,7 +87694,7 @@ - + @@ -87225,32 +87725,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -87320,7 +87794,7 @@ - + @@ -87540,6 +88014,14 @@ + + + + + + + + @@ -87929,7 +88411,7 @@ - + @@ -87952,7 +88434,7 @@ - + @@ -88232,23 +88714,18 @@ - + - + - - - - - - + - + - + @@ -88276,14 +88753,6 @@ - - - - - - - - @@ -88626,6 +89095,17 @@ + + + + + + + + + + + @@ -88680,7 +89160,7 @@ - + @@ -88688,7 +89168,7 @@ - + @@ -88710,7 +89190,7 @@ - + @@ -88943,6 +89423,7 @@ + @@ -88971,12 +89452,8 @@ - - - - @@ -90423,11 +90900,23 @@ + + + + + + + + + + + + @@ -90592,7 +91081,11 @@ + + + + @@ -91340,7 +91833,7 @@ - + @@ -91765,6 +92258,17 @@ + + + + + + + + + + + @@ -91855,6 +92359,7 @@ + @@ -92105,10 +92610,22 @@ + + + + + + + + + + + + @@ -92354,34 +92871,34 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -92395,16 +92912,16 @@ - - + + - - - - - - + + + + + + @@ -92758,6 +93275,8 @@ + + @@ -92803,6 +93322,15 @@ + + + + + + + + + @@ -93072,7 +93600,7 @@ - + @@ -93306,7 +93834,6 @@ - @@ -95326,7 +95853,7 @@ - + @@ -95448,7 +95975,7 @@ - + @@ -95487,7 +96014,7 @@ - + @@ -99027,7 +99554,7 @@ - + @@ -99520,13 +100047,13 @@ - + - + - + @@ -99568,7 +100095,7 @@ - + @@ -101639,6 +102166,17 @@ + + + + + + + + + + + @@ -102076,7 +102614,7 @@ - + @@ -102699,6 +103237,7 @@ + @@ -103731,7 +104270,7 @@ - + @@ -103747,7 +104286,7 @@ - + @@ -103755,7 +104294,7 @@ - + @@ -103769,7 +104308,7 @@ - + @@ -103777,7 +104316,7 @@ - + @@ -103785,7 +104324,8 @@ - + + @@ -103800,6 +104340,11 @@ + + + + + @@ -103813,6 +104358,18 @@ + + + + + + + + + + + + @@ -104163,6 +104720,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104214,6 +104797,8 @@ + + @@ -104272,6 +104857,7 @@ + @@ -104543,6 +105129,17 @@ + + + + + + + + + + + @@ -104623,6 +105220,7 @@ + @@ -106740,6 +107338,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -106847,26 +107465,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -107089,23 +107687,6 @@ - - - - - - - - - - - - - - - - - @@ -107618,6 +108199,10 @@ + + + + @@ -107649,238 +108234,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -108035,18 +108405,7 @@ - - - - - - - - - - - @@ -108229,13 +108588,6 @@ - - - - - - - @@ -108243,10 +108595,6 @@ - - - - @@ -108521,6 +108869,17 @@ + + + + + + + + + + + @@ -108551,6 +108910,7 @@ + @@ -108673,33 +109033,11 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -108883,6 +109221,14 @@ + + + + + + + + @@ -108985,7 +109331,7 @@ - + @@ -109139,7 +109485,7 @@ - + @@ -109676,6 +110022,14 @@ + + + + + + + + @@ -109907,7 +110261,7 @@ - + @@ -110370,7 +110724,7 @@ - + @@ -110450,14 +110804,6 @@ - - - - - - - - @@ -110997,6 +111343,14 @@ + + + + + + + + @@ -111284,6 +111638,14 @@ + + + + + + + + @@ -111433,7 +111795,7 @@ - + @@ -111448,40 +111810,27 @@ - + - + - + - + - - - - - - + - - - - - - - - - + @@ -111495,6 +111844,7 @@ + @@ -112213,7 +112563,19 @@ - + + + + + + + + + + + + + @@ -112221,7 +112583,7 @@ - + @@ -112229,6 +112591,22 @@ + + + + + + + + + + + + + + + + @@ -113080,7 +113458,7 @@ - + @@ -113244,7 +113622,7 @@ - + @@ -114128,14 +114506,6 @@ - - - - - - - - @@ -115116,7 +115486,7 @@ - + @@ -115543,7 +115913,6 @@ - @@ -116383,7 +116752,7 @@ - + @@ -116406,22 +116775,34 @@ - + - + - + + + + + + + + + + + + + @@ -116932,7 +117313,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -116947,6 +117581,18 @@ + + + + + + + + + + + + @@ -117004,6 +117650,17 @@ + + + + + + + + + + + @@ -118137,6 +118794,17 @@ + + + + + + + + + + + @@ -120118,7 +120786,7 @@ - + @@ -121564,6 +122232,7 @@ + @@ -121624,7 +122293,7 @@ - + @@ -121642,14 +122311,6 @@ - - - - - - - - @@ -122094,6 +122755,11 @@ + + + + + @@ -122180,6 +122846,13 @@ + + + + + + + @@ -122367,6 +123040,8 @@ + + @@ -122390,6 +123065,10 @@ + + + + @@ -122922,6 +123601,11 @@ + + + + + @@ -122934,7 +123618,7 @@ - + @@ -122955,7 +123639,7 @@ - + @@ -123089,42 +123773,20 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + @@ -123378,7 +124040,7 @@ - + @@ -128225,6 +128887,11 @@ + + + + + @@ -129380,6 +130047,6 @@ diff --git a/android/abi_gki_aarch64_exynos b/android/abi_gki_aarch64_exynos index 0b41a3f16cad..4222e5233d9d 100644 --- a/android/abi_gki_aarch64_exynos +++ b/android/abi_gki_aarch64_exynos @@ -3,6 +3,7 @@ add_timer_on add_uevent_var add_wait_queue + add_wait_queue_exclusive adjust_managed_page_count alarm_cancel alarm_init @@ -18,6 +19,7 @@ amba_driver_register amba_driver_unregister anon_inode_getfd + __arch_clear_user __arch_copy_from_user __arch_copy_in_user __arch_copy_to_user @@ -34,6 +36,7 @@ _bcd2bin bcmp _bin2bcd + bin2hex bio_crypt_should_process __bitmap_clear __bitmap_parse @@ -56,6 +59,7 @@ bpf_trace_run6 bpf_trace_run7 bpf_trace_run9 + __break_lease build_skb bus_find_device bus_for_each_dev @@ -78,9 +82,11 @@ __cfg80211_alloc_event_skb __cfg80211_alloc_reply_skb cfg80211_chandef_create + cfg80211_chandef_valid cfg80211_ch_switch_notify cfg80211_classify8021d cfg80211_connect_done + cfg80211_conn_failed cfg80211_del_sta_sinfo cfg80211_disconnected cfg80211_external_auth_request @@ -93,6 +99,7 @@ cfg80211_new_sta cfg80211_put_bss cfg80211_ready_on_channel + cfg80211_ref_bss cfg80211_remain_on_channel_expired cfg80211_roamed cfg80211_rx_mgmt @@ -106,9 +113,13 @@ __class_create class_create_file_ns class_destroy + class_dev_iter_exit + class_dev_iter_init + class_dev_iter_next class_find_device __class_register class_unregister + clear_inode clear_page clk_bulk_disable clk_bulk_enable @@ -155,6 +166,7 @@ config_ep_by_speed config_group_init_type_name console_lock + console_stop console_trylock console_unlock __const_udelay @@ -206,14 +218,18 @@ csum_partial csum_tcpudp_nofold _ctype + d_add dapm_pinctrl_event dapm_regulator_event datagram_poll + d_drop + deactivate_locked_super default_llseek default_wake_function delayed_work_timer_fn del_timer del_timer_sync + dentry_open destroy_workqueue dev_alloc_name _dev_crit @@ -311,6 +327,7 @@ devm_request_threaded_irq devm_reset_control_array_get __devm_reset_control_get + devm_rtc_allocate_device devm_rtc_device_register devm_snd_dmaengine_pcm_register devm_snd_soc_register_card @@ -341,7 +358,10 @@ devres_release dev_set_mac_address dev_set_name + dev_vprintk_emit _dev_warn + dget_parent + d_instantiate disable_irq disable_irq_nosync disable_percpu_irq @@ -394,6 +414,7 @@ dma_free_attrs dma_get_slave_caps dma_get_slave_channel + d_make_root dmam_alloc_attrs dma_mmap_attrs dma_pool_alloc @@ -414,6 +435,7 @@ down_trylock down_write d_path + dput driver_find driver_find_device driver_register @@ -465,10 +487,19 @@ freq_qos_add_request freq_qos_remove_request freq_qos_update_request + fs_kobj + fsstack_copy_attr_all fwnode_property_present fwnode_property_read_u16_array generic_file_llseek + generic_file_mmap + generic_file_read_iter + generic_file_splice_read generic_handle_irq + generic_read_dir + generic_shutdown_super + genl_family_attrbuf + genlmsg_multicast_allns genlmsg_put genl_register_family genl_unregister_family @@ -542,6 +573,7 @@ i2c_del_driver i2c_for_each_dev i2c_get_adapter + i2c_new_device i2c_new_dummy i2c_put_adapter i2c_register_driver @@ -564,13 +596,17 @@ ieee80211_channel_to_freq_khz ieee80211_freq_khz_to_channel ieee80211_get_channel_khz + iget5_locked ignore_console_lock_warning + ihold iio_channel_get iio_channel_release + iio_convert_raw_to_processed iio_device_alloc iio_device_free __iio_device_register iio_device_unregister + iio_get_channel_type iio_read_channel_processed iio_read_channel_raw in4_pton @@ -582,6 +618,8 @@ init_timer_key init_wait_entry __init_waitqueue_head + inode_init_once + inode_init_owner input_allocate_device input_event input_free_device @@ -639,6 +677,7 @@ iounmap __iowrite32_copy ip_send_check + iput __irq_alloc_descs irq_create_mapping __irq_domain_add @@ -664,6 +703,7 @@ irq_to_desc irq_work_queue is_console_locked + iterate_dir jiffies jiffies_64 jiffies_64_to_clock_t @@ -673,7 +713,9 @@ kasprintf kernel_kobj kernel_read + kernel_restart kernel_write + kern_path keyslot_manager_create_passthrough keyslot_manager_private __kfifo_alloc @@ -752,10 +794,16 @@ llist_add_batch __local_bh_enable_ip __lock_buffer + lockref_get + lock_rename lock_sock_nested + lookup_one_len loops_per_jiffy + LZ4_decompress_safe map_vm_area + match_int match_string + match_token media_create_intf_link media_create_pad_link media_device_register_entity @@ -841,6 +889,7 @@ no_llseek nonseekable_open noop_llseek + notify_change nr_cpu_ids nr_irqs nsecs_to_jiffies @@ -916,6 +965,7 @@ of_usb_get_phy_mode of_usb_host_tpl_support oops_in_progress + pagecache_get_page panic panic_notifier_list param_array_ops @@ -929,6 +979,8 @@ param_ops_ullong param_ops_ulong param_set_uint + path_get + path_put pci_alloc_irq_vectors_affinity pci_bus_type pci_d3cold_disable @@ -1121,6 +1173,7 @@ register_chrdev_region register_console register_die_notifier + register_filesystem register_inet6addr_notifier register_inetaddr_notifier register_netdev @@ -1177,13 +1230,17 @@ reset_control_reset return_address rfkill_alloc + rfkill_blocked rfkill_destroy rfkill_register rfkill_unregister rps_needed + rtc_add_group rtc_class_close rtc_class_open rtc_read_time + __rtc_register_device + rtc_set_time rtc_time64_to_tm rtc_tm_to_time64 rtc_update_irq @@ -1211,6 +1268,7 @@ seq_printf seq_puts seq_read + set_anon_super set_cpus_allowed_ptr set_normalized_timespec64 set_page_dirty_lock @@ -1218,6 +1276,7 @@ sg_alloc_table sg_alloc_table_from_pages sg_copy_to_buffer + sget sg_free_table sg_init_one sg_init_table @@ -1230,8 +1289,11 @@ __sg_page_iter_start sg_pcopy_from_buffer sg_pcopy_to_buffer + simple_getattr simple_open simple_read_from_buffer + simple_setattr + simple_statfs simple_strtol simple_strtoul simple_write_to_buffer @@ -1301,6 +1363,7 @@ snd_soc_dai_set_fmt snd_soc_dai_set_sysclk snd_soc_dai_set_tdm_slot + snd_soc_dai_set_tristate snd_soc_dapm_add_routes snd_soc_dapm_disable_pin snd_soc_dapm_enable_pin @@ -1369,6 +1432,8 @@ sock_no_shutdown sock_no_socketpair sock_queue_rcv_skb + __sock_recv_timestamp + __sock_recv_wifi_status sock_register sock_unregister softnet_data @@ -1412,11 +1477,13 @@ strncat strncmp strncpy + strndup_user strnlen strnstr strpbrk strrchr strsep + strspn strstr submit_bh subsys_system_register @@ -1425,6 +1492,7 @@ __sync_dirty_buffer sync_file_create sync_file_get_fence + sync_filesystem synchronize_irq synchronize_rcu syscon_regmap_lookup_by_phandle @@ -1481,6 +1549,7 @@ __tracepoint_android_vh_is_fpsimd_save __tracepoint_device_pm_callback_end __tracepoint_device_pm_callback_start + __tracepoint_gpu_mem_total __tracepoint_pelt_cfs_tp tracepoint_probe_register __tracepoint_suspend_resume @@ -1490,6 +1559,7 @@ __trace_puts trace_raw_output_prep trace_seq_printf + truncate_inode_pages try_module_get __tty_alloc_driver tty_flip_buffer_push @@ -1529,14 +1599,19 @@ ufshcd_dme_get_attr ufshcd_dme_set_attr ufshcd_pltfrm_init + ufshcd_query_descriptor_retry ufshcd_remove ufshcd_shutdown ufshcd_system_resume ufshcd_system_suspend ufshcd_wb_ctrl + unlock_new_inode + unlock_page + unlock_rename unmap_mapping_range __unregister_chrdev unregister_chrdev_region + unregister_filesystem unregister_inet6addr_notifier unregister_inetaddr_notifier unregister_netdev @@ -1642,6 +1717,7 @@ usb_unregister_notify usb_wakeup_notification __usecs_to_jiffies + user_path_at_empty usleep_range v4l2_ctrl_handler_free v4l2_ctrl_handler_init_class @@ -1692,9 +1768,20 @@ vb2_streamon vb2_wait_for_all_buffers vfree + vfs_create + vfs_fallocate vfs_fsync + vfs_getattr + vfs_getxattr + vfs_link + vfs_listxattr vfs_llseek + vfs_mkdir + vfs_rename + vfs_rmdir + vfs_setxattr vfs_statx + vfs_unlink video_devdata video_device_alloc video_device_release @@ -1703,6 +1790,7 @@ video_unregister_device vmalloc vmalloc_to_page + vmalloc_to_pfn vmalloc_user vmap vmemmap @@ -1712,6 +1800,7 @@ vm_map_pages vm_map_ram vm_unmap_ram + vprintk_emit vscnprintf vsnprintf vsprintf @@ -1724,12 +1813,14 @@ wait_for_completion_timeout __wait_on_buffer __wake_up + __wake_up_locked_key wake_up_process wakeup_source_add wakeup_source_create wakeup_source_destroy wakeup_source_register wakeup_source_unregister + __wake_up_sync __warn_printk watchdog_init_timeout watchdog_register_device diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index 6c2539bdd013..7185732b36b2 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -21,6 +21,8 @@ alloc_skb_with_frags alloc_workqueue amba_bustype + amba_driver_register + amba_driver_unregister anon_inode_getfile arch_bpf_jit_check_func __arch_clear_user @@ -870,6 +872,7 @@ find_next_zero_bit find_snd_usb_substream find_vma + find_vpid finish_wait firmware_request_nowarn flow_keys_basic_dissector @@ -1665,6 +1668,7 @@ phy_start phy_stop physvirt_offset + pid_task pinconf_generic_dt_node_to_map pinctrl_dev_get_drvdata pinctrl_force_default @@ -1975,6 +1979,7 @@ sched_clock sched_setattr sched_setscheduler + sched_setscheduler_nocheck schedule schedule_timeout schedule_timeout_interruptible diff --git a/android/abi_gki_aarch64_xiaomi b/android/abi_gki_aarch64_xiaomi index 7b58413581e8..95acdab2fb70 100644 --- a/android/abi_gki_aarch64_xiaomi +++ b/android/abi_gki_aarch64_xiaomi @@ -16,6 +16,10 @@ regcache_drop_region snd_soc_dapm_del_routes +# required by tfa98xx_dlkm.ko + device_remove_bin_file + snd_pcm_hw_constraint_mask64 + # required by q6_dlkm.ko down_interruptible __kfifo_alloc diff --git a/arch/Kconfig b/arch/Kconfig index e2465e92ca21..d53afd0c8323 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -605,6 +605,7 @@ endchoice config CFI_CLANG bool "Use Clang's Control Flow Integrity (CFI)" depends on LTO_CLANG && KALLSYMS + depends on !GCOV_KERNEL help This option enables Clang's Control Flow Integrity (CFI), which adds runtime checking for indirect function calls. diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig index 3c3ad78c51db..b30790cd7704 100644 --- a/arch/arm64/configs/gki_defconfig +++ b/arch/arm64/configs/gki_defconfig @@ -230,8 +230,10 @@ CONFIG_PCI=y CONFIG_PCIEPORTBUS=y # CONFIG_PCIEAER is not set CONFIG_PCI_HOST_GENERIC=y +CONFIG_PCIE_DW_PLAT_EP=y CONFIG_PCIE_QCOM=y CONFIG_PCIE_KIRIN=y +CONFIG_PCI_ENDPOINT=y CONFIG_FW_LOADER_USER_HELPER=y CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y # CONFIG_FW_CACHE is not set @@ -443,6 +445,7 @@ CONFIG_HWSPINLOCK=y CONFIG_MTK_TIMER=y CONFIG_MAILBOX=y CONFIG_IOMMU_LIMIT_IOVA_ALIGNMENT=y +CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y CONFIG_REMOTEPROC=y CONFIG_RPMSG_CHAR=y CONFIG_DEVFREQ_GOV_PERFORMANCE=y diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig index 5f6b1e4dd7f3..7da7f03361ca 100644 --- a/arch/x86/configs/gki_defconfig +++ b/arch/x86/configs/gki_defconfig @@ -48,6 +48,7 @@ CONFIG_SLAB_FREELIST_HARDENED=y CONFIG_SHUFFLE_PAGE_ALLOCATOR=y CONFIG_PROFILING=y CONFIG_SMP=y +CONFIG_X86_X2APIC=y CONFIG_HYPERVISOR_GUEST=y CONFIG_PARAVIRT=y CONFIG_NR_CPUS=32 @@ -204,6 +205,8 @@ CONFIG_PCI=y CONFIG_PCIEPORTBUS=y # CONFIG_PCIEAER is not set CONFIG_PCI_MSI=y +CONFIG_PCIE_DW_PLAT_EP=y +CONFIG_PCI_ENDPOINT=y CONFIG_FW_LOADER_USER_HELPER=y CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y # CONFIG_FW_CACHE is not set diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 02df51ede095..85a6a7cb3cd1 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -230,7 +230,7 @@ static struct binder_transaction_log_entry *binder_transaction_log_add( struct binder_work { struct list_head entry; - enum { + enum binder_work_type { BINDER_WORK_TRANSACTION = 1, BINDER_WORK_TRANSACTION_COMPLETE, BINDER_WORK_RETURN_ERROR, @@ -917,27 +917,6 @@ static struct binder_work *binder_dequeue_work_head_ilocked( return w; } -/** - * binder_dequeue_work_head() - Dequeues the item at head of list - * @proc: binder_proc associated with list - * @list: list to dequeue head - * - * Removes the head of the list if there are items on the list - * - * Return: pointer dequeued binder_work, NULL if list was empty - */ -static struct binder_work *binder_dequeue_work_head( - struct binder_proc *proc, - struct list_head *list) -{ - struct binder_work *w; - - binder_inner_proc_lock(proc); - w = binder_dequeue_work_head_ilocked(list); - binder_inner_proc_unlock(proc); - return w; -} - static void binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer); static void binder_free_thread(struct binder_thread *thread); @@ -4753,13 +4732,17 @@ static void binder_release_work(struct binder_proc *proc, struct list_head *list) { struct binder_work *w; + enum binder_work_type wtype; while (1) { - w = binder_dequeue_work_head(proc, list); + binder_inner_proc_lock(proc); + w = binder_dequeue_work_head_ilocked(list); + wtype = w ? w->type : 0; + binder_inner_proc_unlock(proc); if (!w) return; - switch (w->type) { + switch (wtype) { case BINDER_WORK_TRANSACTION: { struct binder_transaction *t; @@ -4793,9 +4776,11 @@ static void binder_release_work(struct binder_proc *proc, kfree(death); binder_stats_deleted(BINDER_STAT_DEATH); } break; + case BINDER_WORK_NODE: + break; default: pr_err("unexpected work type, %d, not freed\n", - w->type); + wtype); break; } } diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c index 4cb394937700..6c08e991c9b0 100644 --- a/drivers/iommu/io-pgtable-arm-v7s.c +++ b/drivers/iommu/io-pgtable-arm-v7s.c @@ -50,20 +50,26 @@ */ #define ARM_V7S_ADDR_BITS 32 #define _ARM_V7S_LVL_BITS(lvl) (16 - (lvl) * 4) +/* MediaTek: totally 34bits, 14bits at lvl1 and 8bits at lvl2. */ +#define _ARM_V7S_LVL_BITS_MTK(lvl) (20 - (lvl) * 6) #define ARM_V7S_LVL_SHIFT(lvl) (ARM_V7S_ADDR_BITS - (4 + 8 * (lvl))) #define ARM_V7S_TABLE_SHIFT 10 -#define ARM_V7S_PTES_PER_LVL(lvl) (1 << _ARM_V7S_LVL_BITS(lvl)) -#define ARM_V7S_TABLE_SIZE(lvl) \ - (ARM_V7S_PTES_PER_LVL(lvl) * sizeof(arm_v7s_iopte)) +#define ARM_V7S_PTES_PER_LVL(lvl, cfg) ({ \ + !arm_v7s_is_mtk_enabled(cfg) ? \ + (1 << _ARM_V7S_LVL_BITS(lvl)) : (1 << _ARM_V7S_LVL_BITS_MTK(lvl));\ +}) + +#define ARM_V7S_TABLE_SIZE(lvl, cfg) \ + (ARM_V7S_PTES_PER_LVL(lvl, cfg) * sizeof(arm_v7s_iopte)) #define ARM_V7S_BLOCK_SIZE(lvl) (1UL << ARM_V7S_LVL_SHIFT(lvl)) #define ARM_V7S_LVL_MASK(lvl) ((u32)(~0U << ARM_V7S_LVL_SHIFT(lvl))) #define ARM_V7S_TABLE_MASK ((u32)(~0U << ARM_V7S_TABLE_SHIFT)) -#define _ARM_V7S_IDX_MASK(lvl) (ARM_V7S_PTES_PER_LVL(lvl) - 1) -#define ARM_V7S_LVL_IDX(addr, lvl) ({ \ +#define _ARM_V7S_IDX_MASK(lvl, cfg) (ARM_V7S_PTES_PER_LVL(lvl, cfg) - 1) +#define ARM_V7S_LVL_IDX(addr, lvl, cfg) ({ \ int _l = lvl; \ - ((u32)(addr) >> ARM_V7S_LVL_SHIFT(_l)) & _ARM_V7S_IDX_MASK(_l); \ + ((addr) >> ARM_V7S_LVL_SHIFT(_l)) & _ARM_V7S_IDX_MASK(_l, cfg); \ }) /* @@ -112,9 +118,10 @@ #define ARM_V7S_TEX_MASK 0x7 #define ARM_V7S_ATTR_TEX(val) (((val) & ARM_V7S_TEX_MASK) << ARM_V7S_TEX_SHIFT) -/* MediaTek extend the two bits for PA 32bit/33bit */ +/* MediaTek extend the bits below for PA 32bit/33bit/34bit */ #define ARM_V7S_ATTR_MTK_PA_BIT32 BIT(9) #define ARM_V7S_ATTR_MTK_PA_BIT33 BIT(4) +#define ARM_V7S_ATTR_MTK_PA_BIT34 BIT(5) /* *well, except for TEX on level 2 large pages, of course :( */ #define ARM_V7S_CONT_PAGE_TEX_SHIFT 6 @@ -196,6 +203,8 @@ static arm_v7s_iopte paddr_to_iopte(phys_addr_t paddr, int lvl, pte |= ARM_V7S_ATTR_MTK_PA_BIT32; if (paddr & BIT_ULL(33)) pte |= ARM_V7S_ATTR_MTK_PA_BIT33; + if (paddr & BIT_ULL(34)) + pte |= ARM_V7S_ATTR_MTK_PA_BIT34; return pte; } @@ -220,6 +229,8 @@ static phys_addr_t iopte_to_paddr(arm_v7s_iopte pte, int lvl, paddr |= BIT_ULL(32); if (pte & ARM_V7S_ATTR_MTK_PA_BIT33) paddr |= BIT_ULL(33); + if (pte & ARM_V7S_ATTR_MTK_PA_BIT34) + paddr |= BIT_ULL(34); return paddr; } @@ -236,7 +247,7 @@ static void *__arm_v7s_alloc_table(int lvl, gfp_t gfp, struct device *dev = cfg->iommu_dev; phys_addr_t phys; dma_addr_t dma; - size_t size = ARM_V7S_TABLE_SIZE(lvl); + size_t size = ARM_V7S_TABLE_SIZE(lvl, cfg); void *table = NULL; if (lvl == 1) @@ -282,7 +293,7 @@ static void __arm_v7s_free_table(void *table, int lvl, { struct io_pgtable_cfg *cfg = &data->iop.cfg; struct device *dev = cfg->iommu_dev; - size_t size = ARM_V7S_TABLE_SIZE(lvl); + size_t size = ARM_V7S_TABLE_SIZE(lvl, cfg); if (!cfg->coherent_walk) dma_unmap_single(dev, __arm_v7s_dma_addr(table), size, @@ -426,7 +437,7 @@ static int arm_v7s_init_pte(struct arm_v7s_io_pgtable *data, arm_v7s_iopte *tblp; size_t sz = ARM_V7S_BLOCK_SIZE(lvl); - tblp = ptep - ARM_V7S_LVL_IDX(iova, lvl); + tblp = ptep - ARM_V7S_LVL_IDX(iova, lvl, cfg); if (WARN_ON(__arm_v7s_unmap(data, NULL, iova + i * sz, sz, lvl, tblp) != sz)) return -EINVAL; @@ -479,7 +490,7 @@ static int __arm_v7s_map(struct arm_v7s_io_pgtable *data, unsigned long iova, int num_entries = size >> ARM_V7S_LVL_SHIFT(lvl); /* Find our entry at the current level */ - ptep += ARM_V7S_LVL_IDX(iova, lvl); + ptep += ARM_V7S_LVL_IDX(iova, lvl, cfg); /* If we can install a leaf entry at this level, then do so */ if (num_entries) @@ -552,7 +563,7 @@ static void arm_v7s_free_pgtable(struct io_pgtable *iop) struct arm_v7s_io_pgtable *data = io_pgtable_to_data(iop); int i; - for (i = 0; i < ARM_V7S_PTES_PER_LVL(1); i++) { + for (i = 0; i < ARM_V7S_PTES_PER_LVL(1, &data->iop.cfg); i++) { arm_v7s_iopte pte = data->pgd[i]; if (ARM_V7S_PTE_IS_TABLE(pte, 1)) @@ -604,9 +615,9 @@ static size_t arm_v7s_split_blk_unmap(struct arm_v7s_io_pgtable *data, if (!tablep) return 0; /* Bytes unmapped */ - num_ptes = ARM_V7S_PTES_PER_LVL(2); + num_ptes = ARM_V7S_PTES_PER_LVL(2, cfg); num_entries = size >> ARM_V7S_LVL_SHIFT(2); - unmap_idx = ARM_V7S_LVL_IDX(iova, 2); + unmap_idx = ARM_V7S_LVL_IDX(iova, 2, cfg); pte = arm_v7s_prot_to_pte(arm_v7s_pte_to_prot(blk_pte, 1), 2, cfg); if (num_entries > 1) @@ -648,7 +659,7 @@ static size_t __arm_v7s_unmap(struct arm_v7s_io_pgtable *data, if (WARN_ON(lvl > 2)) return 0; - idx = ARM_V7S_LVL_IDX(iova, lvl); + idx = ARM_V7S_LVL_IDX(iova, lvl, &iop->cfg); ptep += idx; do { pte[i] = READ_ONCE(ptep[i]); @@ -719,7 +730,7 @@ static size_t arm_v7s_unmap(struct io_pgtable_ops *ops, unsigned long iova, { struct arm_v7s_io_pgtable *data = io_pgtable_ops_to_data(ops); - if (WARN_ON(upper_32_bits(iova))) + if (WARN_ON(iova >= (1ULL << data->iop.cfg.ias))) return 0; return __arm_v7s_unmap(data, gather, iova, size, 1, data->pgd); @@ -734,7 +745,7 @@ static phys_addr_t arm_v7s_iova_to_phys(struct io_pgtable_ops *ops, u32 mask; do { - ptep += ARM_V7S_LVL_IDX(iova, ++lvl); + ptep += ARM_V7S_LVL_IDX(iova, ++lvl, &data->iop.cfg); pte = READ_ONCE(*ptep); ptep = iopte_deref(pte, lvl, data); } while (ARM_V7S_PTE_IS_TABLE(pte, lvl)); @@ -753,10 +764,10 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg, { struct arm_v7s_io_pgtable *data; - if (cfg->ias > ARM_V7S_ADDR_BITS) + if (cfg->ias > (arm_v7s_is_mtk_enabled(cfg) ? 34 : ARM_V7S_ADDR_BITS)) return NULL; - if (cfg->oas > (arm_v7s_is_mtk_enabled(cfg) ? 34 : ARM_V7S_ADDR_BITS)) + if (cfg->oas > (arm_v7s_is_mtk_enabled(cfg) ? 35 : ARM_V7S_ADDR_BITS)) return NULL; if (cfg->quirks & ~(IO_PGTABLE_QUIRK_ARM_NS | @@ -777,8 +788,8 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg, spin_lock_init(&data->split_lock); data->l2_tables = kmem_cache_create("io-pgtable_armv7s_l2", - ARM_V7S_TABLE_SIZE(2), - ARM_V7S_TABLE_SIZE(2), + ARM_V7S_TABLE_SIZE(2, cfg), + ARM_V7S_TABLE_SIZE(2, cfg), ARM_V7S_TABLE_SLAB_FLAGS, NULL); if (!data->l2_tables) goto out_free_data; diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 3dd2e2697294..d6d9667c947a 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -18,6 +18,7 @@ void dw_pcie_ep_linkup(struct dw_pcie_ep *ep) pci_epc_linkup(epc); } +EXPORT_SYMBOL_GPL(dw_pcie_ep_linkup); static void __dw_pcie_ep_reset_bar(struct dw_pcie *pci, enum pci_barno bar, int flags) @@ -607,3 +608,4 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep) return 0; } +EXPORT_SYMBOL_GPL(dw_pcie_ep_init); diff --git a/include/linux/io-pgtable.h b/include/linux/io-pgtable.h index cd6b768d3735..89f660f502f8 100644 --- a/include/linux/io-pgtable.h +++ b/include/linux/io-pgtable.h @@ -92,8 +92,8 @@ struct io_pgtable_cfg { * TLB maintenance when mapping as well as when unmapping. * * IO_PGTABLE_QUIRK_ARM_MTK_EXT: (ARM v7s format) MediaTek IOMMUs extend - * to support up to 34 bits PA where the bit32 and bit33 are - * encoded in the bit9 and bit4 of the PTE respectively. + * to support up to 35 bits PA where the bit32, bit33 and bit34 are + * encoded in the bit9, bit4 and bit5 of the PTE respectively. * * IO_PGTABLE_QUIRK_NON_STRICT: Skip issuing synchronous leaf TLBIs * on unmap, for DMA domains using the flush queue mechanism for diff --git a/include/linux/module.h b/include/linux/module.h index 996e81a51fbf..5246cbce5881 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -346,6 +346,11 @@ struct klp_modinfo { }; #endif +struct module_kabi_preserve_1 { + u64 using_gplonly_symbols:1; + u64 free:63; +}; + struct module { enum module_state state; @@ -515,7 +520,7 @@ struct module { struct error_injection_entry *ei_funcs; unsigned int num_ei_funcs; #endif - ANDROID_KABI_RESERVE(1); + ANDROID_KABI_USE(1, struct module_kabi_preserve_1 m1); ANDROID_KABI_RESERVE(2); ANDROID_KABI_RESERVE(3); ANDROID_KABI_RESERVE(4); @@ -573,34 +578,14 @@ struct module *find_module(const char *name); struct symsearch { const struct kernel_symbol *start, *stop; const s32 *crcs; - enum { + enum mod_license { NOT_GPL_ONLY, GPL_ONLY, WILL_BE_GPL_ONLY, - } licence; + } license; bool unused; }; -/* - * Search for an exported symbol by name. - * - * Must be called with module_mutex held or preemption disabled. - */ -const struct kernel_symbol *find_symbol(const char *name, - struct module **owner, - const s32 **crc, - bool gplok, - bool warn); - -/* - * Walk the exported symbol table - * - * Must be called with module_mutex held or preemption disabled. - */ -bool each_symbol_section(bool (*fn)(const struct symsearch *arr, - struct module *owner, - void *data), void *data); - /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if symnum out of range. */ int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, @@ -648,7 +633,6 @@ static inline void __module_get(struct module *module) #define symbol_put_addr(p) do { } while (0) #endif /* CONFIG_MODULE_UNLOAD */ -int ref_module(struct module *a, struct module *b); /* This is a #define so the string doesn't get put in every .o file */ #define module_name(mod) \ diff --git a/kernel/module.c b/kernel/module.c index 63c0a2d1db66..36e15ead5a80 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -419,7 +419,7 @@ static bool each_symbol_in_section(const struct symsearch *arr, } /* Returns true as soon as fn returns true, otherwise false. */ -bool each_symbol_section(bool (*fn)(const struct symsearch *arr, +static bool each_symbol_section(bool (*fn)(const struct symsearch *arr, struct module *owner, void *data), void *data) @@ -481,7 +481,6 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr, } return false; } -EXPORT_SYMBOL_GPL(each_symbol_section); struct find_symbol_arg { /* Input */ @@ -493,6 +492,7 @@ struct find_symbol_arg { struct module *owner; const s32 *crc; const struct kernel_symbol *sym; + enum mod_license license; }; static bool check_exported_symbol(const struct symsearch *syms, @@ -502,9 +502,9 @@ static bool check_exported_symbol(const struct symsearch *syms, struct find_symbol_arg *fsa = data; if (!fsa->gplok) { - if (syms->licence == GPL_ONLY) + if (syms->license == GPL_ONLY) return false; - if (syms->licence == WILL_BE_GPL_ONLY && fsa->warn) { + if (syms->license == WILL_BE_GPL_ONLY && fsa->warn) { pr_warn("Symbol %s is being used by a non-GPL module, " "which will not be allowed in the future\n", fsa->name); @@ -526,6 +526,7 @@ static bool check_exported_symbol(const struct symsearch *syms, fsa->owner = owner; fsa->crc = symversion(syms->crcs, symnum); fsa->sym = &syms->start[symnum]; + fsa->license = syms->license; return true; } @@ -582,9 +583,10 @@ static bool find_exported_symbol_in_section(const struct symsearch *syms, /* Find an exported symbol and return it, along with, (optional) crc and * (optional) module which owns it. Needs preempt disabled or module_mutex. */ -const struct kernel_symbol *find_symbol(const char *name, +static const struct kernel_symbol *find_symbol(const char *name, struct module **owner, const s32 **crc, + enum mod_license *license, bool gplok, bool warn) { @@ -599,13 +601,14 @@ const struct kernel_symbol *find_symbol(const char *name, *owner = fsa.owner; if (crc) *crc = fsa.crc; + if (license) + *license = fsa.license; return fsa.sym; } pr_debug("Failed to find symbol %s\n", name); return NULL; } -EXPORT_SYMBOL_GPL(find_symbol); /* * Search for module by name: must hold module_mutex (or preempt disabled @@ -866,7 +869,7 @@ static int add_module_usage(struct module *a, struct module *b) } /* Module a uses b: caller needs module_mutex() */ -int ref_module(struct module *a, struct module *b) +static int ref_module(struct module *a, struct module *b) { int err; @@ -885,7 +888,6 @@ int ref_module(struct module *a, struct module *b) } return 0; } -EXPORT_SYMBOL_GPL(ref_module); /* Clear the unload stuff of the module. */ static void module_unload_free(struct module *mod) @@ -1074,7 +1076,7 @@ void __symbol_put(const char *symbol) struct module *owner; preempt_disable(); - if (!find_symbol(symbol, &owner, NULL, true, false)) + if (!find_symbol(symbol, &owner, NULL, NULL, true, false)) BUG(); module_put(owner); preempt_enable(); @@ -1165,11 +1167,10 @@ static inline void module_unload_free(struct module *mod) { } -int ref_module(struct module *a, struct module *b) +static int ref_module(struct module *a, struct module *b) { return strong_try_module_get(b); } -EXPORT_SYMBOL_GPL(ref_module); static inline int module_unload_init(struct module *mod) { @@ -1352,7 +1353,7 @@ static inline int check_modstruct_version(const struct load_info *info, * locking is necessary -- use preempt_disable() to placate lockdep. */ preempt_disable(); - if (!find_symbol("module_layout", NULL, &crc, true, false)) { + if (!find_symbol("module_layout", NULL, &crc, NULL, true, false)) { preempt_enable(); BUG(); } @@ -1426,6 +1427,24 @@ static int verify_namespace_is_imported(const struct load_info *info, return 0; } +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) { + pr_err("%s: module using GPL-only symbols uses symbols from proprietary module %s.\n", + mod->name, owner->name); + return false; + } + + if (!test_bit(TAINT_PROPRIETARY_MODULE, &mod->taints)) { + pr_warn("%s: module uses symbols from proprietary module %s, inheriting taint.\n", + mod->name, owner->name); + set_bit(TAINT_PROPRIETARY_MODULE, &mod->taints); + } + return true; +} /* Resolve a symbol for this module. I.e. if we find one, record usage. */ static const struct kernel_symbol *resolve_symbol(struct module *mod, @@ -1436,6 +1455,7 @@ static const struct kernel_symbol *resolve_symbol(struct module *mod, struct module *owner; const struct kernel_symbol *sym; const s32 *crc; + enum mod_license license; int err; /* @@ -1445,11 +1465,19 @@ static const struct kernel_symbol *resolve_symbol(struct module *mod, */ sched_annotate_sleep(); mutex_lock(&module_mutex); - sym = find_symbol(name, &owner, &crc, + sym = find_symbol(name, &owner, &crc, &license, !(mod->taints & (1 << TAINT_PROPRIETARY_MODULE)), true); if (!sym) goto unlock; + if (license == GPL_ONLY) + mod->m1.using_gplonly_symbols = true; + + if (!inherit_taint(mod, owner)) { + sym = NULL; + goto getname; + } + if (!check_version(info, name, mod, crc)) { sym = ERR_PTR(-EINVAL); goto getname; @@ -2267,7 +2295,7 @@ void *__symbol_get(const char *symbol) const struct kernel_symbol *sym; preempt_disable(); - sym = find_symbol(symbol, &owner, NULL, true, true); + sym = find_symbol(symbol, &owner, NULL, NULL, true, true); if (sym && strong_try_module_get(owner)) sym = NULL; preempt_enable(); @@ -2302,7 +2330,7 @@ static int verify_exported_symbols(struct module *mod) for (i = 0; i < ARRAY_SIZE(arr); i++) { for (s = arr[i].sym; s < arr[i].sym + arr[i].num; s++) { if (find_symbol(kernel_symbol_name(s), &owner, NULL, - true, false)) { + NULL, true, false)) { pr_err("%s: exports duplicate symbol %s" " (owned by %s)\n", mod->name, kernel_symbol_name(s), @@ -4320,10 +4348,10 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, static void cfi_init(struct module *mod) { #ifdef CONFIG_CFI_CLANG - rcu_read_lock(); + rcu_read_lock_sched(); mod->cfi_check = (cfi_check_fn)find_kallsyms_symbol_value(mod, CFI_CHECK_FN_NAME); - rcu_read_unlock(); + rcu_read_unlock_sched(); cfi_module_add(mod, module_addr_min, module_addr_max); #endif } @@ -4526,7 +4554,6 @@ struct module *__module_address(unsigned long addr) } return mod; } -EXPORT_SYMBOL_GPL(__module_address); /* * is_module_text_address - is this address inside module code? @@ -4565,7 +4592,6 @@ struct module *__module_text_address(unsigned long addr) } return mod; } -EXPORT_SYMBOL_GPL(__module_text_address); /* Don't grab lock, we're oopsing. */ void print_modules(void) diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index f9b19524da11..42ad2f95e2f2 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -529,6 +529,9 @@ static int find_secsym_ndx(unsigned const txtndx, if (txtndx == get_symindex(symp, symtab, symtab_shndx) /* avoid STB_WEAK */ && (STB_LOCAL == st_bind || STB_GLOBAL == st_bind)) { + /* avoid file symbols */ + if (ELF_ST_TYPE(symp->st_info) == STT_FILE) + continue; /* function symbols on ARM have quirks, avoid them */ if (w2(ehdr->e_machine) == EM_ARM && ELF_ST_TYPE(symp->st_info) == STT_FUNC)