/*
 * livepatch_main.c - kernel live patch main infrastructure
 *
 * Copyright (c) 2014 SUSE
 *  Author: Miroslav Benes <mbenes@suse.cz>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 */

#include <linux/livepatch.h>
#include <linux/module.h>
#include <linux/types.h>

#include "uname_patch/livepatch_uname.h"

/* Auto expanded KLP_PATCHES_INCLUDES: */
#include "bsc1230998/livepatch_bsc1230998.h"
#include "bsc1231676/livepatch_bsc1231676.h"
#include "bsc1231943/livepatch_bsc1231943.h"
#include "bsc1231993/livepatch_bsc1231993.h"
#include "bsc1232271/livepatch_bsc1232271.h"
#include "bsc1232384/livepatch_bsc1232384.h"
#include "bsc1232900/livepatch_bsc1232900.h"
#include "bsc1232908/livepatch_bsc1232908.h"
#include "bsc1232927/livepatch_bsc1232927.h"
#include "bsc1232929/livepatch_bsc1232929.h"
#include "bsc1233019/livepatch_bsc1233019.h"
#include "bsc1233072/livepatch_bsc1233072.h"
#include "bsc1233118/livepatch_bsc1233118.h"
#include "bsc1233227/livepatch_bsc1233227.h"
#include "bsc1233245/livepatch_bsc1233245.h"
#include "bsc1233677/livepatch_bsc1233677.h"
#include "bsc1233678/livepatch_bsc1233678.h"
#include "bsc1233679/livepatch_bsc1233679.h"
#include "bsc1233680/livepatch_bsc1233680.h"
#include "bsc1233708/livepatch_bsc1233708.h"
#include "bsc1234847/livepatch_bsc1234847.h"
#include "bsc1234854/livepatch_bsc1234854.h"
#include "bsc1234885/livepatch_bsc1234885.h"
#include "bsc1234892/livepatch_bsc1234892.h"
#include "bsc1235005/livepatch_bsc1235005.h"
#include "bsc1235008/livepatch_bsc1235008.h"
#include "bsc1235062/livepatch_bsc1235062.h"
#include "bsc1235086/livepatch_bsc1235086.h"
#include "bsc1235129/livepatch_bsc1235129.h"
#include "bsc1235218/livepatch_bsc1235218.h"
#include "bsc1235231/livepatch_bsc1235231.h"
#include "bsc1235250/livepatch_bsc1235250.h"
#include "bsc1235431/livepatch_bsc1235431.h"
#include "bsc1235452/livepatch_bsc1235452.h"
#include "bsc1235769/livepatch_bsc1235769.h"
#include "bsc1235916/livepatch_bsc1235916.h"
#include "bsc1235921/livepatch_bsc1235921.h"
#include "bsc1236207/livepatch_bsc1236207.h"
#include "bsc1236244/livepatch_bsc1236244.h"
#include "bsc1236701/livepatch_bsc1236701.h"
#include "bsc1236783/livepatch_bsc1236783.h"
#include "bsc1237048/livepatch_bsc1237048.h"
#include "bsc1238912/livepatch_bsc1238912.h"
#include "bsc1239077/livepatch_bsc1239077.h"
#include "bsc1239096/livepatch_bsc1239096.h"
#include "bsc1240744/livepatch_bsc1240744.h"
#include "bsc1240840/livepatch_bsc1240840.h"
#include "bsc1241579/livepatch_bsc1241579.h"
#include "bsc1242579/livepatch_bsc1242579.h"
#include "bsc1243648/livepatch_bsc1243648.h"
#include "bsc1243650/livepatch_bsc1243650.h"
#include "bsc1245218/livepatch_bsc1245218.h"
#include "bsc1245350/livepatch_bsc1245350.h"
#include "bsc1245505/livepatch_bsc1245505.h"
#include "bsc1245509/livepatch_bsc1245509.h"
#include "bsc1245685/livepatch_bsc1245685.h"
#include "bsc1245791/livepatch_bsc1245791.h"
#include "bsc1245793/livepatch_bsc1245793.h"
#include "bsc1245794/livepatch_bsc1245794.h"
#include "bsc1245795/livepatch_bsc1245795.h"
#include "bsc1245797/livepatch_bsc1245797.h"
#include "bsc1245804/livepatch_bsc1245804.h"
#include "bsc1245805/livepatch_bsc1245805.h"
#include "bsc1246001/livepatch_bsc1246001.h"
#include "bsc1246019/livepatch_bsc1246019.h"
#include "bsc1246030/livepatch_bsc1246030.h"
#include "bsc1246075/livepatch_bsc1246075.h"
#include "bsc1246356/livepatch_bsc1246356.h"
#include "bsc1247158/livepatch_bsc1247158.h"
#include "bsc1247315/livepatch_bsc1247315.h"
#include "bsc1247350/livepatch_bsc1247350.h"
#include "bsc1247452/livepatch_bsc1247452.h"
#include "bsc1247499/livepatch_bsc1247499.h"
#include "bsc1248298/livepatch_bsc1248298.h"
#include "bsc1248376/livepatch_bsc1248376.h"
#include "bsc1248631/livepatch_bsc1248631.h"
#include "bsc1248673/livepatch_bsc1248673.h"
#include "bsc1248749/livepatch_bsc1248749.h"
#include "bsc1249207/livepatch_bsc1249207.h"
#include "bsc1249208/livepatch_bsc1249208.h"
#include "bsc1249458/livepatch_bsc1249458.h"
#include "bsc1249534/livepatch_bsc1249534.h"


static struct klp_object objs[] = {
	/* Auto expanded KLP_PATCHES_OBJS: */
	{
		.name = NULL,
		.funcs = (struct klp_func[]) {
			{
			  .old_name = __stringify(KLP_SYSCALL_SYM(newuname)),
			  .new_func = KLP_SYSCALL_SYM(klp_newuname),
			},
#ifdef KLP_ARCH_HAS_SYSCALL_COMPAT_STUBS
			{
			  .old_name = __stringify(KLP_SYSCALL_COMPAT_STUB_SYM(newuname)),
			  .new_func = KLP_SYSCALL_COMPAT_STUB_SYM(klp_newuname),
			},
#endif
			{ .old_name = __stringify(remap_pfn_range_notrack), .new_func = klpp_remap_pfn_range_notrack, },
			{ .old_name = __stringify(bfq_insert_requests), .new_func = klpp_bfq_insert_requests, },
			{ .old_name = __stringify(tcp_rearm_rto), .new_func = klpp_tcp_rearm_rto, },
			{ .old_name = __stringify(tcp_schedule_loss_probe), .new_func = klpp_tcp_schedule_loss_probe, },
			{ .old_name = __stringify(inet_csk_reqsk_queue_drop), .new_func = klpp_inet_csk_reqsk_queue_drop, },
			{ .old_name = __stringify(reqsk_timer_handler), .new_func = klpp_reqsk_timer_handler, },
			{ .old_name = __stringify(dax_file_unshare), .new_func = klpp_dax_file_unshare, },
#if IS_ENABLED(CONFIG_HID)
			{ .old_name = __stringify(hid_alloc_report_buf), .new_func = klpp_hid_alloc_report_buf, },
#endif
			{ .old_name = __stringify(search_nested_keyrings), .new_func = klpp_search_nested_keyrings, },
			{ .old_name = __stringify(bfq_limit_depth), .new_func = klpp_bfq_limit_depth, },
			{ .old_name = __stringify(inet6_create), .new_func = klpp_inet6_create, },
			{ .old_name = __stringify(inet_create), .new_func = klpp_inet_create, },
			{ .old_name = __stringify(__sock_map_delete), .new_func = klpp___sock_map_delete, },
			{ .old_name = __stringify(mptcp_established_options), .new_func = klpp_mptcp_established_options, },
			{ .old_name = __stringify(netdev_nl_napi_get_doit), .new_func = klpp_netdev_nl_napi_get_doit, },
			{ .old_name = __stringify(netdev_nl_napi_fill_one), .new_func = klpp_netdev_nl_napi_fill_one, },
			{ .old_name = __stringify(mac_partition), .new_func = klpp_mac_partition, },
			{ .old_name = __stringify(__ip_local_out), .new_func = klpp___ip_local_out, },
			{ .old_name = __stringify(ip6_xmit), .new_func = klpp_ip6_xmit, },
			{ .old_name = __stringify(__ip6_local_out), .new_func = klpp___ip6_local_out, },
			{ .old_name = __stringify(rawv6_sendmsg), .new_func = klpp_rawv6_sendmsg, },
			{ .old_name = __stringify(proc_get_inode), .new_func = klpp_proc_get_inode, },
			{ .old_name = __stringify(proc_create_seq_private), .new_func = klpp_proc_create_seq_private, },
			{ .old_name = __stringify(proc_create_single_data), .new_func = klpp_proc_create_single_data, },
			{ .old_name = __stringify(tc_ctl_tclass), .new_func = klpp_tc_ctl_tclass, },
			{ .old_name = __stringify(pfifo_tail_enqueue), .new_func = klpp_pfifo_tail_enqueue, },
			{ .old_name = __stringify(find_equal_scalars), .new_func = klpp_find_equal_scalars, },
			{ .old_name = __stringify(ethnl_ops_begin), .new_func = klpp_ethnl_ops_begin, },
			{ .old_name = __stringify(calipso_req_setattr), .new_func = klpp_calipso_req_setattr, .old_sympos = 1, },
			{ .old_name = __stringify(calipso_req_delattr), .new_func = klpp_calipso_req_delattr, .old_sympos = 1, },
			{ .old_name = __stringify(shm_destroy_orphaned), .new_func = klpp_shm_destroy_orphaned, },
#if defined(CONFIG_SECRETMEM)
			{ .old_name = __stringify(KLP_SYSCALL_SYM(memfd_secret)), .new_func = KLP_SYSCALL_SYM(klpp_memfd_secret), },
#endif
#if defined(KLP_ARCH_HAS_SYSCALL_COMPAT_STUBS) && defined(CONFIG_SECRETMEM)
			{ .old_name = __stringify(KLP_SYSCALL_COMPAT_STUB_SYM(memfd_secret)), .new_func = KLP_SYSCALL_COMPAT_STUB_SYM(klpp_memfd_secret), },
#endif
			{ .old_name = __stringify(__anon_inode_getfile), .new_func = klpp___anon_inode_getfile, },
#if IS_ENABLED(CONFIG_HID)
			{ .old_name = __stringify(__hid_request), .new_func = klpp___hid_request, },
#endif
			{ .old_name = __stringify(path_mount), .new_func = klpp_path_mount, },
			{ .old_name = __stringify(clone_private_mount), .new_func = klpp_clone_private_mount, },
			{ }
		}
	},
	{
		.name = "af_packet",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(packet_set_ring), .new_func = klpp_packet_set_ring, },
			{ }
		}
	},
	{
		.name = "algif_hash",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(hash_accept), .new_func = klpp_hash_accept, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_ATH9K_HTC)
	{
		.name = "ath9k_htc",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(htc_connect_service), .new_func = klpp_htc_connect_service, },
			{ }
		}
	},
#endif
#if IS_ENABLED(CONFIG_BT)
	{
		.name = "bluetooth",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(iso_sock_timeout), .new_func = klpp_iso_sock_timeout, },
			{ .old_name = __stringify(iso_conn_del), .new_func = klpp_iso_conn_del, },
			{ .old_name = __stringify(sco_sock_timeout), .new_func = klpp_sco_sock_timeout, },
			{ .old_name = __stringify(sco_conn_del), .new_func = klpp_sco_conn_del, },
			{ .old_name = __stringify(l2cap_sock_create), .new_func = klpp_l2cap_sock_create, },
			{ .old_name = __stringify(l2cap_sock_new_connection_cb), .new_func = klpp_l2cap_sock_new_connection_cb, },
			{ .old_name = __stringify(mgmt_set_powered_complete), .new_func = klpp_mgmt_set_powered_complete, },
			{ .old_name = __stringify(set_powered_sync), .new_func = klpp_set_powered_sync, },
			{ .old_name = __stringify(mgmt_remove_adv_monitor_complete), .new_func = klpp_mgmt_remove_adv_monitor_complete, },
			{ .old_name = __stringify(mgmt_remove_adv_monitor_sync), .new_func = klpp_mgmt_remove_adv_monitor_sync, },
			{ .old_name = __stringify(hci_event_packet), .new_func = klpp_hci_event_packet, },
			{ }
		}
	},
#endif
#if IS_ENABLED(CONFIG_INFINIBAND_BNXT_RE)
	{
		.name = "bnxt_re",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(bnxt_qplib_alloc_init_hwq), .new_func = klpp_bnxt_qplib_alloc_init_hwq, },
			{ }
		}
	},
#endif
	{
		.name = "btrfs",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(close_ctree), .new_func = klpp_close_ctree, },
			{ .old_name = __stringify(btrfs_encoded_read_endio), .new_func = klpp_btrfs_encoded_read_endio, },
			{ .old_name = __stringify(btrfs_create_pending_block_groups), .new_func = klpp_btrfs_create_pending_block_groups, },
			{ }
		}
	},
	{
		.name = "dm_cache",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(cache_preresume), .new_func = klpp_cache_preresume, },
			{ }
		}
	},
	{
		.name = "exfat",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(exfat_free_upcase_table), .new_func = klpp_exfat_free_upcase_table, },
			{ }
		}
	},
	{
		.name = "hsr",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(hsr_forward_skb), .new_func = klpp_hsr_forward_skb, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_ICE)
	{
		.name = "ice",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ice_copy_and_init_pkg), .new_func = klpp_ice_copy_and_init_pkg, },
			{ }
		}
	},
#endif
	{
		.name = "ip_gre",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(gre_fill_metadata_dst), .new_func = klpp_gre_fill_metadata_dst, },
			{ }
		}
	},
	{
		.name = "ip_tunnel",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ip_tunnel_xmit), .new_func = klpp_ip_tunnel_xmit, },
			{ .old_name = __stringify(ip_md_tunnel_xmit), .new_func = klpp_ip_md_tunnel_xmit, },
			{ .old_name = __stringify(ip_tunnel_bind_dev), .new_func = klpp_ip_tunnel_bind_dev, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_IWLMVM)
	{
		.name = "iwlmvm",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(iwl_mvm_mac_remove_interface), .new_func = klpp_iwl_mvm_mac_remove_interface, },
			{ }
		}
	},
#endif
#if IS_ENABLED(CONFIG_KVM_AMD)
	{
		.name = "kvm_amd",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nested_svm_get_tdp_pdptr), .new_func = klpp_nested_svm_get_tdp_pdptr, },
			{ }
		}
	},
#endif
#if IS_ENABLED(CONFIG_USB_LIBCOMPOSITE)
	{
		.name = "libcomposite",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(composite_os_desc_req_prepare), .new_func = klpp_composite_os_desc_req_prepare, },
			{ }
		}
	},
#endif
	{
		.name = "libphy",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(__mdiobus_c45_read), .new_func = klpp___mdiobus_c45_read, },
			{ .old_name = __stringify(__mdiobus_c45_write), .new_func = klpp___mdiobus_c45_write, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_MAC80211)
	{
		.name = "mac80211",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ieee80211_tdls_oper), .new_func = klpp_ieee80211_tdls_oper, },
			{ }
		}
	},
#endif
	{
		.name = "mlx5_core",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(mlx5_eswitch_enable_pf_vf_vports), .new_func = klpp_mlx5_eswitch_enable_pf_vf_vports, },
			{ .old_name = __stringify(mlx5_eswitch_disable_pf_vf_vports), .new_func = klpp_mlx5_eswitch_disable_pf_vf_vports, },
			{ }
		}
	},
	{
		.name = "mlxsw_spectrum",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(mlxsw_sp_span_gretap4_route), .new_func = klpp_mlxsw_sp_span_gretap4_route, },
			{ }
		}
	},
	{
		.name = "nbd",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nbd_xmit_timeout), .new_func = klpp_nbd_xmit_timeout, },
			{ .old_name = __stringify(nbd_queue_rq), .new_func = klpp_nbd_queue_rq, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_BT)
	{
		.name = "net/bluetooth/bluetooth",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(hci_conn_del_sysfs), .new_func = klpp_hci_conn_del_sysfs, },
			{ }
		}
	},
#endif
	{
		.name = "nfsd",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nfsd4_copy), .new_func = klpp_nfsd4_copy, },
			{ .old_name = __stringify(decode_cb_compound4res), .new_func = klpp_decode_cb_compound4res, },
			{ .old_name = __stringify(e_show), .new_func = klpp_e_show, },
			{ }
		}
	},
	{
		.name = "nfsv4",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nfs4_open_release), .new_func = klpp_nfs4_open_release, },
			{ }
		}
	},
	{
		.name = "nf_tables",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nf_tables_newchain), .new_func = klpp_nf_tables_newchain, },
			{ .old_name = __stringify(nf_tables_newflowtable), .new_func = klpp_nf_tables_newflowtable, },
			{ }
		}
	},
	{
		.name = "pktgen",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(pktgen_if_write), .new_func = klpp_pktgen_if_write, },
			{ }
		}
	},
	{
		.name = "sch_cake",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(cake_enqueue), .new_func = klpp_cake_enqueue, },
			{ }
		}
	},
	{
		.name = "sch_choke",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(choke_enqueue), .new_func = klpp_choke_enqueue, },
			{ }
		}
	},
	{
		.name = "sch_ets",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ets_class_change), .new_func = klpp_ets_class_change, },
			{ .old_name = __stringify(ets_class_graft), .new_func = klpp_ets_class_graft, },
			{ .old_name = __stringify(ets_class_leaf), .new_func = klpp_ets_class_leaf, },
			{ .old_name = __stringify(ets_class_qlen_notify), .new_func = klpp_ets_class_qlen_notify, },
			{ .old_name = __stringify(ets_class_dump), .new_func = klpp_ets_class_dump, },
			{ .old_name = __stringify(ets_class_dump_stats), .new_func = klpp_ets_class_dump_stats, },
			{ }
		}
	},
	{
		.name = "sch_hfsc",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(hfsc_enqueue), .new_func = klpp_hfsc_enqueue, },
			{ .old_name = __stringify(hfsc_change_class), .new_func = klpp_hfsc_change_class, },
			{ .old_name = __stringify(hfsc_dequeue), .new_func = klpp_hfsc_dequeue, },
			{ .old_name = __stringify(update_ed), .new_func = klpp_update_ed, },
			{ .old_name = __stringify(hfsc_qlen_notify), .new_func = klpp_hfsc_qlen_notify, },
			{ }
		}
	},
	{
		.name = "sch_netem",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(netem_enqueue), .new_func = klpp_netem_enqueue, },
			{ }
		}
	},
	{
		.name = "sch_prio",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(prio_tune), .new_func = klpp_prio_tune, },
			{ }
		}
	},
	{
		.name = "sch_qfq",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(qfq_change_class), .new_func = klpp_qfq_change_class, },
			{ .old_name = __stringify(qfq_delete_class), .new_func = klpp_qfq_delete_class, },
			{ .old_name = __stringify(qfq_dump_class), .new_func = klpp_qfq_dump_class, },
			{ .old_name = __stringify(qfq_dump_class_stats), .new_func = klpp_qfq_dump_class_stats, },
			{ .old_name = __stringify(qfq_destroy_qdisc), .new_func = klpp_qfq_destroy_qdisc, },
			{ }
		}
	},
	{
		.name = "sch_sfq",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(sfq_init), .new_func = klpp_sfq_init, },
			{ }
		}
	},
	{
		.name = "sch_taprio",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(taprio_change), .new_func = klpp_taprio_change, },
			{ .old_name = __stringify(taprio_dev_notifier), .new_func = klpp_taprio_dev_notifier, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)
	{
		.name = "snd_seq_oss",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(snd_seq_oss_synth_sysex), .new_func = klpp_snd_seq_oss_synth_sysex, },
			{ }
		}
	},
#endif
	{
		.name = "sunrpc",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(svc_create_socket), .new_func = klpp_svc_create_socket, },
			{ .old_name = __stringify(xs_tcp_setup_socket), .new_func = klpp_xs_tcp_setup_socket, },
			{ .old_name = __stringify(xs_udp_setup_socket), .new_func = klpp_xs_udp_setup_socket, },
			{ .old_name = __stringify(svc_process_common), .new_func = klpp_svc_process_common, },
			{ .old_name = __stringify(svc_tcp_read_msg), .new_func = klpp_svc_tcp_read_msg, },
			{ .old_name = __stringify(svc_tcp_recvfrom), .new_func = klpp_svc_tcp_recvfrom, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_TDX_GUEST_DRIVER)
	{
		.name = "tdx_guest",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(tdx_guest_init), .new_func = klpp_tdx_guest_init, },
			{ }
		}
	},
#endif
	{
		.name = "tls",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(tls_strp_check_rcv), .new_func = klpp_tls_strp_check_rcv, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_USB_VIDEO_CLASS)
	{
		.name = "uvcvideo",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(uvc_parse_format), .new_func = klpp_uvc_parse_format, },
			{ }
		}
	},
#endif
	{
		.name = "vfio_pci_core",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(vfio_pci_config_rw), .new_func = klpp_vfio_pci_config_rw, },
			{ }
		}
	},
	{
		.name = "virtio_net",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(virtnet_probe), .new_func = klpp_virtnet_probe, },
			{ }
		}
	},
	{
		.name = "vsock",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(vsock_remove_sock), .new_func = klpp_vsock_remove_sock, },
			{ .old_name = __stringify(__vsock_release), .new_func = klpp___vsock_release, },
			{ .old_name = __stringify(__vsock_bind), .new_func = klpp___vsock_bind, },
			{ }
		}
	},
	{
		.name = "x_tables",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(xt_find_table_lock), .new_func = klpp_xt_find_table_lock, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_LED)
	{
		.name = "xt_LED",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(led_tg_check), .new_func = klpp_led_tg_check, },
			{ }
		}
	},
#endif
	{ }
};

static struct klp_patch patch = {
	.mod = THIS_MODULE,
	.objs = objs,
	.replace = true,
};

static int __init klp_patch_init(void)
{
	int retval;

	pr_info("livepatch: initializing\n");

	/* Auto expanded KLP_PATCHES_INIT_CALLS: */
	retval = livepatch_bsc1230998_init();
	if (retval)
		goto err_bsc1230998;

	retval = livepatch_bsc1231676_init();
	if (retval)
		goto err_bsc1231676;

	retval = livepatch_bsc1231943_init();
	if (retval)
		goto err_bsc1231943;

	retval = livepatch_bsc1231993_init();
	if (retval)
		goto err_bsc1231993;

	retval = livepatch_bsc1232271_init();
	if (retval)
		goto err_bsc1232271;

	retval = livepatch_bsc1232384_init();
	if (retval)
		goto err_bsc1232384;

	retval = livepatch_bsc1232900_init();
	if (retval)
		goto err_bsc1232900;

	retval = livepatch_bsc1232908_init();
	if (retval)
		goto err_bsc1232908;

	retval = livepatch_bsc1232927_init();
	if (retval)
		goto err_bsc1232927;

	retval = livepatch_bsc1232929_init();
	if (retval)
		goto err_bsc1232929;

	retval = livepatch_bsc1233019_init();
	if (retval)
		goto err_bsc1233019;

	retval = livepatch_bsc1233072_init();
	if (retval)
		goto err_bsc1233072;

	retval = livepatch_bsc1233118_init();
	if (retval)
		goto err_bsc1233118;

	retval = livepatch_bsc1233227_init();
	if (retval)
		goto err_bsc1233227;

	retval = livepatch_bsc1233245_init();
	if (retval)
		goto err_bsc1233245;

	retval = livepatch_bsc1233677_init();
	if (retval)
		goto err_bsc1233677;

	retval = livepatch_bsc1233678_init();
	if (retval)
		goto err_bsc1233678;

	retval = livepatch_bsc1233679_init();
	if (retval)
		goto err_bsc1233679;

	retval = livepatch_bsc1233680_init();
	if (retval)
		goto err_bsc1233680;

	retval = livepatch_bsc1233708_init();
	if (retval)
		goto err_bsc1233708;

	retval = livepatch_bsc1234847_init();
	if (retval)
		goto err_bsc1234847;

	retval = livepatch_bsc1234854_init();
	if (retval)
		goto err_bsc1234854;

	retval = livepatch_bsc1234885_init();
	if (retval)
		goto err_bsc1234885;

	retval = livepatch_bsc1234892_init();
	if (retval)
		goto err_bsc1234892;

	retval = livepatch_bsc1235005_init();
	if (retval)
		goto err_bsc1235005;

	retval = livepatch_bsc1235008_init();
	if (retval)
		goto err_bsc1235008;

	retval = livepatch_bsc1235062_init();
	if (retval)
		goto err_bsc1235062;

	retval = livepatch_bsc1235086_init();
	if (retval)
		goto err_bsc1235086;

	retval = livepatch_bsc1235129_init();
	if (retval)
		goto err_bsc1235129;

	retval = livepatch_bsc1235218_init();
	if (retval)
		goto err_bsc1235218;

	retval = livepatch_bsc1235231_init();
	if (retval)
		goto err_bsc1235231;

	retval = livepatch_bsc1235250_init();
	if (retval)
		goto err_bsc1235250;

	retval = livepatch_bsc1235431_init();
	if (retval)
		goto err_bsc1235431;

	retval = livepatch_bsc1235452_init();
	if (retval)
		goto err_bsc1235452;

	retval = livepatch_bsc1235769_init();
	if (retval)
		goto err_bsc1235769;

	retval = livepatch_bsc1235916_init();
	if (retval)
		goto err_bsc1235916;

	retval = livepatch_bsc1235921_init();
	if (retval)
		goto err_bsc1235921;

	retval = livepatch_bsc1236207_init();
	if (retval)
		goto err_bsc1236207;

	retval = livepatch_bsc1236244_init();
	if (retval)
		goto err_bsc1236244;

	retval = livepatch_bsc1236701_init();
	if (retval)
		goto err_bsc1236701;

	retval = livepatch_bsc1236783_init();
	if (retval)
		goto err_bsc1236783;

	retval = livepatch_bsc1237048_init();
	if (retval)
		goto err_bsc1237048;

	retval = livepatch_bsc1238912_init();
	if (retval)
		goto err_bsc1238912;

	retval = livepatch_bsc1239077_init();
	if (retval)
		goto err_bsc1239077;

	retval = livepatch_bsc1239096_init();
	if (retval)
		goto err_bsc1239096;

	retval = livepatch_bsc1240744_init();
	if (retval)
		goto err_bsc1240744;

	retval = livepatch_bsc1240840_init();
	if (retval)
		goto err_bsc1240840;

	retval = livepatch_bsc1241579_init();
	if (retval)
		goto err_bsc1241579;

	retval = livepatch_bsc1242579_init();
	if (retval)
		goto err_bsc1242579;

	retval = livepatch_bsc1243648_init();
	if (retval)
		goto err_bsc1243648;

	retval = livepatch_bsc1243650_init();
	if (retval)
		goto err_bsc1243650;

	retval = livepatch_bsc1245218_init();
	if (retval)
		goto err_bsc1245218;

	retval = livepatch_bsc1245350_init();
	if (retval)
		goto err_bsc1245350;

	retval = livepatch_bsc1245505_init();
	if (retval)
		goto err_bsc1245505;

	retval = livepatch_bsc1245509_init();
	if (retval)
		goto err_bsc1245509;

	retval = livepatch_bsc1245685_init();
	if (retval)
		goto err_bsc1245685;

	retval = livepatch_bsc1245791_init();
	if (retval)
		goto err_bsc1245791;

	retval = livepatch_bsc1245793_init();
	if (retval)
		goto err_bsc1245793;

	retval = livepatch_bsc1245794_init();
	if (retval)
		goto err_bsc1245794;

	retval = livepatch_bsc1245795_init();
	if (retval)
		goto err_bsc1245795;

	retval = livepatch_bsc1245797_init();
	if (retval)
		goto err_bsc1245797;

	retval = livepatch_bsc1245804_init();
	if (retval)
		goto err_bsc1245804;

	retval = livepatch_bsc1245805_init();
	if (retval)
		goto err_bsc1245805;

	retval = livepatch_bsc1246001_init();
	if (retval)
		goto err_bsc1246001;

	retval = livepatch_bsc1246019_init();
	if (retval)
		goto err_bsc1246019;

	retval = livepatch_bsc1246030_init();
	if (retval)
		goto err_bsc1246030;

	retval = livepatch_bsc1246075_init();
	if (retval)
		goto err_bsc1246075;

	retval = livepatch_bsc1246356_init();
	if (retval)
		goto err_bsc1246356;

	retval = livepatch_bsc1247158_init();
	if (retval)
		goto err_bsc1247158;

	retval = livepatch_bsc1247315_init();
	if (retval)
		goto err_bsc1247315;

	retval = livepatch_bsc1247350_init();
	if (retval)
		goto err_bsc1247350;

	retval = livepatch_bsc1247452_init();
	if (retval)
		goto err_bsc1247452;

	retval = livepatch_bsc1247499_init();
	if (retval)
		goto err_bsc1247499;

	retval = livepatch_bsc1248298_init();
	if (retval)
		goto err_bsc1248298;

	retval = livepatch_bsc1248376_init();
	if (retval)
		goto err_bsc1248376;

	retval = livepatch_bsc1248631_init();
	if (retval)
		goto err_bsc1248631;

	retval = livepatch_bsc1248673_init();
	if (retval)
		goto err_bsc1248673;

	retval = livepatch_bsc1248749_init();
	if (retval)
		goto err_bsc1248749;

	retval = livepatch_bsc1249207_init();
	if (retval)
		goto err_bsc1249207;

	retval = livepatch_bsc1249208_init();
	if (retval)
		goto err_bsc1249208;

	retval = livepatch_bsc1249458_init();
	if (retval)
		goto err_bsc1249458;

	retval = livepatch_bsc1249534_init();
	if (retval)
		goto err_bsc1249534;

	retval = klp_enable_patch(&patch);
	if (!retval)
		return retval;

	/* Auto expanded KLP_PATCHES_INIT_ERR_HANDLERS: */
	livepatch_bsc1249534_cleanup();
err_bsc1249534:
	livepatch_bsc1249458_cleanup();
err_bsc1249458:
	livepatch_bsc1249208_cleanup();
err_bsc1249208:
	livepatch_bsc1249207_cleanup();
err_bsc1249207:
	livepatch_bsc1248749_cleanup();
err_bsc1248749:
	livepatch_bsc1248673_cleanup();
err_bsc1248673:
	livepatch_bsc1248631_cleanup();
err_bsc1248631:
	livepatch_bsc1248376_cleanup();
err_bsc1248376:
	livepatch_bsc1248298_cleanup();
err_bsc1248298:
	livepatch_bsc1247499_cleanup();
err_bsc1247499:
	livepatch_bsc1247452_cleanup();
err_bsc1247452:
	livepatch_bsc1247350_cleanup();
err_bsc1247350:
	livepatch_bsc1247315_cleanup();
err_bsc1247315:
	livepatch_bsc1247158_cleanup();
err_bsc1247158:
	livepatch_bsc1246356_cleanup();
err_bsc1246356:
	livepatch_bsc1246075_cleanup();
err_bsc1246075:
	livepatch_bsc1246030_cleanup();
err_bsc1246030:
	livepatch_bsc1246019_cleanup();
err_bsc1246019:
	livepatch_bsc1246001_cleanup();
err_bsc1246001:
	livepatch_bsc1245805_cleanup();
err_bsc1245805:
	livepatch_bsc1245804_cleanup();
err_bsc1245804:
	livepatch_bsc1245797_cleanup();
err_bsc1245797:
	livepatch_bsc1245795_cleanup();
err_bsc1245795:
	livepatch_bsc1245794_cleanup();
err_bsc1245794:
	livepatch_bsc1245793_cleanup();
err_bsc1245793:
	livepatch_bsc1245791_cleanup();
err_bsc1245791:
	livepatch_bsc1245685_cleanup();
err_bsc1245685:
	livepatch_bsc1245509_cleanup();
err_bsc1245509:
	livepatch_bsc1245505_cleanup();
err_bsc1245505:
	livepatch_bsc1245350_cleanup();
err_bsc1245350:
	livepatch_bsc1245218_cleanup();
err_bsc1245218:
	livepatch_bsc1243650_cleanup();
err_bsc1243650:
	livepatch_bsc1243648_cleanup();
err_bsc1243648:
	livepatch_bsc1242579_cleanup();
err_bsc1242579:
	livepatch_bsc1241579_cleanup();
err_bsc1241579:
	livepatch_bsc1240840_cleanup();
err_bsc1240840:
	livepatch_bsc1240744_cleanup();
err_bsc1240744:
	livepatch_bsc1239096_cleanup();
err_bsc1239096:
	livepatch_bsc1239077_cleanup();
err_bsc1239077:
	livepatch_bsc1238912_cleanup();
err_bsc1238912:
	livepatch_bsc1237048_cleanup();
err_bsc1237048:
	livepatch_bsc1236783_cleanup();
err_bsc1236783:
	livepatch_bsc1236701_cleanup();
err_bsc1236701:
	livepatch_bsc1236244_cleanup();
err_bsc1236244:
	livepatch_bsc1236207_cleanup();
err_bsc1236207:
	livepatch_bsc1235921_cleanup();
err_bsc1235921:
	livepatch_bsc1235916_cleanup();
err_bsc1235916:
	livepatch_bsc1235769_cleanup();
err_bsc1235769:
	livepatch_bsc1235452_cleanup();
err_bsc1235452:
	livepatch_bsc1235431_cleanup();
err_bsc1235431:
	livepatch_bsc1235250_cleanup();
err_bsc1235250:
	livepatch_bsc1235231_cleanup();
err_bsc1235231:
	livepatch_bsc1235218_cleanup();
err_bsc1235218:
	livepatch_bsc1235129_cleanup();
err_bsc1235129:
	livepatch_bsc1235086_cleanup();
err_bsc1235086:
	livepatch_bsc1235062_cleanup();
err_bsc1235062:
	livepatch_bsc1235008_cleanup();
err_bsc1235008:
	livepatch_bsc1235005_cleanup();
err_bsc1235005:
	livepatch_bsc1234892_cleanup();
err_bsc1234892:
	livepatch_bsc1234885_cleanup();
err_bsc1234885:
	livepatch_bsc1234854_cleanup();
err_bsc1234854:
	livepatch_bsc1234847_cleanup();
err_bsc1234847:
	livepatch_bsc1233708_cleanup();
err_bsc1233708:
	livepatch_bsc1233680_cleanup();
err_bsc1233680:
	livepatch_bsc1233679_cleanup();
err_bsc1233679:
	livepatch_bsc1233678_cleanup();
err_bsc1233678:
	livepatch_bsc1233677_cleanup();
err_bsc1233677:
	livepatch_bsc1233245_cleanup();
err_bsc1233245:
	livepatch_bsc1233227_cleanup();
err_bsc1233227:
	livepatch_bsc1233118_cleanup();
err_bsc1233118:
	livepatch_bsc1233072_cleanup();
err_bsc1233072:
	livepatch_bsc1233019_cleanup();
err_bsc1233019:
	livepatch_bsc1232929_cleanup();
err_bsc1232929:
	livepatch_bsc1232927_cleanup();
err_bsc1232927:
	livepatch_bsc1232908_cleanup();
err_bsc1232908:
	livepatch_bsc1232900_cleanup();
err_bsc1232900:
	livepatch_bsc1232384_cleanup();
err_bsc1232384:
	livepatch_bsc1232271_cleanup();
err_bsc1232271:
	livepatch_bsc1231993_cleanup();
err_bsc1231993:
	livepatch_bsc1231943_cleanup();
err_bsc1231943:
	livepatch_bsc1231676_cleanup();
err_bsc1231676:
	livepatch_bsc1230998_cleanup();
err_bsc1230998:

	return retval;
}

static void __exit klp_patch_cleanup(void)
{
	pr_info("livepatch: removed\n");

	/* Auto expanded KLP_PATCHES_CLEANUP_CALLS: */
	livepatch_bsc1230998_cleanup();
	livepatch_bsc1231676_cleanup();
	livepatch_bsc1231943_cleanup();
	livepatch_bsc1231993_cleanup();
	livepatch_bsc1232271_cleanup();
	livepatch_bsc1232384_cleanup();
	livepatch_bsc1232900_cleanup();
	livepatch_bsc1232908_cleanup();
	livepatch_bsc1232927_cleanup();
	livepatch_bsc1232929_cleanup();
	livepatch_bsc1233019_cleanup();
	livepatch_bsc1233072_cleanup();
	livepatch_bsc1233118_cleanup();
	livepatch_bsc1233227_cleanup();
	livepatch_bsc1233245_cleanup();
	livepatch_bsc1233677_cleanup();
	livepatch_bsc1233678_cleanup();
	livepatch_bsc1233679_cleanup();
	livepatch_bsc1233680_cleanup();
	livepatch_bsc1233708_cleanup();
	livepatch_bsc1234847_cleanup();
	livepatch_bsc1234854_cleanup();
	livepatch_bsc1234885_cleanup();
	livepatch_bsc1234892_cleanup();
	livepatch_bsc1235005_cleanup();
	livepatch_bsc1235008_cleanup();
	livepatch_bsc1235062_cleanup();
	livepatch_bsc1235086_cleanup();
	livepatch_bsc1235129_cleanup();
	livepatch_bsc1235218_cleanup();
	livepatch_bsc1235231_cleanup();
	livepatch_bsc1235250_cleanup();
	livepatch_bsc1235431_cleanup();
	livepatch_bsc1235452_cleanup();
	livepatch_bsc1235769_cleanup();
	livepatch_bsc1235916_cleanup();
	livepatch_bsc1235921_cleanup();
	livepatch_bsc1236207_cleanup();
	livepatch_bsc1236244_cleanup();
	livepatch_bsc1236701_cleanup();
	livepatch_bsc1236783_cleanup();
	livepatch_bsc1237048_cleanup();
	livepatch_bsc1238912_cleanup();
	livepatch_bsc1239077_cleanup();
	livepatch_bsc1239096_cleanup();
	livepatch_bsc1240744_cleanup();
	livepatch_bsc1240840_cleanup();
	livepatch_bsc1241579_cleanup();
	livepatch_bsc1242579_cleanup();
	livepatch_bsc1243648_cleanup();
	livepatch_bsc1243650_cleanup();
	livepatch_bsc1245218_cleanup();
	livepatch_bsc1245350_cleanup();
	livepatch_bsc1245505_cleanup();
	livepatch_bsc1245509_cleanup();
	livepatch_bsc1245685_cleanup();
	livepatch_bsc1245791_cleanup();
	livepatch_bsc1245793_cleanup();
	livepatch_bsc1245794_cleanup();
	livepatch_bsc1245795_cleanup();
	livepatch_bsc1245797_cleanup();
	livepatch_bsc1245804_cleanup();
	livepatch_bsc1245805_cleanup();
	livepatch_bsc1246001_cleanup();
	livepatch_bsc1246019_cleanup();
	livepatch_bsc1246030_cleanup();
	livepatch_bsc1246075_cleanup();
	livepatch_bsc1246356_cleanup();
	livepatch_bsc1247158_cleanup();
	livepatch_bsc1247315_cleanup();
	livepatch_bsc1247350_cleanup();
	livepatch_bsc1247452_cleanup();
	livepatch_bsc1247499_cleanup();
	livepatch_bsc1248298_cleanup();
	livepatch_bsc1248376_cleanup();
	livepatch_bsc1248631_cleanup();
	livepatch_bsc1248673_cleanup();
	livepatch_bsc1248749_cleanup();
	livepatch_bsc1249207_cleanup();
	livepatch_bsc1249208_cleanup();
	livepatch_bsc1249458_cleanup();
	livepatch_bsc1249534_cleanup();

}

module_init(klp_patch_init);
module_exit(klp_patch_cleanup);

MODULE_LICENSE("GPL");
MODULE_INFO(livepatch, "Y");
MODULE_INFO(klpgitrev, "0aadf7a84f55ad879fe97f07e606c8fdba265e4a");
