/*
 * 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 "bsc1247240/livepatch_bsc1247240.h"
#include "bsc1248631/livepatch_bsc1248631.h"
#include "bsc1249537/livepatch_bsc1249537.h"
#include "bsc1250192/livepatch_bsc1250192.h"
#include "bsc1251787/livepatch_bsc1251787.h"
#include "bsc1252036/livepatch_bsc1252036.h"
#include "bsc1252048/livepatch_bsc1252048.h"
#include "bsc1252689/livepatch_bsc1252689.h"
#include "bsc1253404/livepatch_bsc1253404.h"
#include "bsc1253437/livepatch_bsc1253437.h"
#include "bsc1253439/livepatch_bsc1253439.h"
#include "bsc1253473/livepatch_bsc1253473.h"
#include "bsc1255053/livepatch_bsc1255053.h"
#include "bsc1255066/livepatch_bsc1255066.h"
#include "bsc1255378/livepatch_bsc1255378.h"
#include "bsc1255402/livepatch_bsc1255402.h"
#include "bsc1255895/livepatch_bsc1255895.h"
#include "bsc1256615/livepatch_bsc1256615.h"
#include "bsc1256624/livepatch_bsc1256624.h"
#include "bsc1256644/livepatch_bsc1256644.h"
#include "bsc1256780/livepatch_bsc1256780.h"
#include "bsc1257238/livepatch_bsc1257238.h"
#include "bsc1257669/livepatch_bsc1257669.h"
#include "bsc1258005/livepatch_bsc1258005.h"
#include "bsc1258051/livepatch_bsc1258051.h"
#include "bsc1258183/livepatch_bsc1258183.h"
#include "bsc1258655/livepatch_bsc1258655.h"
#include "bsc1258784/livepatch_bsc1258784.h"
#include "bsc1259126/livepatch_bsc1259126.h"
#include "bsc1259798/livepatch_bsc1259798.h"
#include "bsc1259859/livepatch_bsc1259859.h"
#include "bsc1260524/livepatch_bsc1260524.h"
#include "bsc1260563/livepatch_bsc1260563.h"
#include "bsc1260908/livepatch_bsc1260908.h"
#include "bsc1261640/livepatch_bsc1261640.h"
#include "bsc1262404/livepatch_bsc1262404.h"
#include "bsc1262759/livepatch_bsc1262759.h"
#include "bsc1263088/livepatch_bsc1263088.h"
#include "bsc1263094/livepatch_bsc1263094.h"
#include "bsc1263118/livepatch_bsc1263118.h"
#include "bsc1263177/livepatch_bsc1263177.h"
#include "bsc1263670/livepatch_bsc1263670.h"
#include "bsc1263689/livepatch_bsc1263689.h"
#include "bsc1263902/livepatch_bsc1263902.h"
#include "bsc1264060/livepatch_bsc1264060.h"
#include "bsc1264094/livepatch_bsc1264094.h"
#include "bsc1264096/livepatch_bsc1264096.h"
#include "bsc1264252/livepatch_bsc1264252.h"
#include "bsc1264253/livepatch_bsc1264253.h"
#include "bsc1264459/livepatch_bsc1264459.h"
#include "bsc1264567/livepatch_bsc1264567.h"
#include "bsc1264849/livepatch_bsc1264849.h"
#include "bsc1265117/livepatch_bsc1265117.h"
#include "bsc1265127/livepatch_bsc1265127.h"
#include "bsc1265197/livepatch_bsc1265197.h"
#include "bsc1265224/livepatch_bsc1265224.h"
#include "bsc1265384/livepatch_bsc1265384.h"
#include "bsc1265945/livepatch_bsc1265945.h"
#include "bsc1266015/livepatch_bsc1266015.h"
#include "bsc1266265/livepatch_bsc1266265.h"
#include "bsc1266970/livepatch_bsc1266970.h"
#include "bsc1267206/livepatch_bsc1267206.h"
#include "bsc1267625/livepatch_bsc1267625.h"
#include "bsc1267698/livepatch_bsc1267698.h"
#include "bsc1267723/livepatch_bsc1267723.h"
#include "bsc1267893/livepatch_bsc1267893.h"
#include "bsc1268662/livepatch_bsc1268662.h"
#include "bsc1269023/livepatch_bsc1269023.h"
#include "bsc1271648/livepatch_bsc1271648.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(futex_requeue), .new_func = klpp_futex_requeue, },
			{ .old_name = __stringify(xsk_tx_peek_release_desc_batch), .new_func = klpp_xsk_tx_peek_release_desc_batch, },
			{ .old_name = __stringify(__xsk_generic_xmit), .new_func = klpp___xsk_generic_xmit, },
			{ .old_name = __stringify(xsk_tx_peek_desc), .new_func = klpp_xsk_tx_peek_desc, },
			{ .old_name = __stringify(tcp_conn_request), .new_func = klpp_tcp_conn_request, },
			{ .old_name = __stringify(mptcp_schedule_work), .new_func = klpp_mptcp_schedule_work, },
#if IS_ENABLED(CONFIG_IOMMU_SVA)
			{ .old_name = __stringify(iommu_sva_bind_device), .new_func = klpp_iommu_sva_bind_device, },
#endif
			{ .old_name = __stringify(calipso_skbuff_setattr), .new_func = klpp_calipso_skbuff_setattr, .old_sympos = 1, },
			{ .old_name = __stringify(rt_del_uncached_list), .new_func = klpp_rt_del_uncached_list, },
			{ .old_name = __stringify(rt6_uncached_list_del), .new_func = klpp_rt6_uncached_list_del, },
			{ .old_name = __stringify(aa_unpack), .new_func = klpp_aa_unpack, },
			{ .old_name = __stringify(unpack_pdb), .new_func = klpp_unpack_pdb, },
			{ .old_name = __stringify(__aa_profile_list_release), .new_func = klpp___aa_profile_list_release, },
			{ .old_name = __stringify(aa_remove_profiles), .new_func = klpp_aa_remove_profiles, },
			{ .old_name = __stringify(aa_replace_profiles), .new_func = klpp_aa_replace_profiles, },
			{ .old_name = __stringify(__aa_create_ns), .new_func = klpp___aa_create_ns, },
			{ .old_name = __stringify(aa_dfa_match), .new_func = klpp_aa_dfa_match, },
			{ .old_name = __stringify(aa_dfa_match_len), .new_func = klpp_aa_dfa_match_len, },
			{ .old_name = __stringify(aa_dfa_unpack), .new_func = klpp_aa_dfa_unpack, },
			{ .old_name = __stringify(ns_mkdir_op), .new_func = klpp_ns_mkdir_op, },
			{ .old_name = __stringify(ns_rmdir_op), .new_func = klpp_ns_rmdir_op, },
			{ .old_name = __stringify(profile_load), .new_func = klpp_profile_load, },
			{ .old_name = __stringify(profile_remove), .new_func = klpp_profile_remove, },
			{ .old_name = __stringify(profile_replace), .new_func = klpp_profile_replace, },
			{ .old_name = __stringify(cgwb_release_workfn), .new_func = klpp_cgwb_release_workfn, },
			{ .old_name = __stringify(ip6_append_data), .new_func = klpp_ip6_append_data, },
			{ .old_name = __stringify(ip6_make_skb), .new_func = klpp_ip6_make_skb, },
			{ .old_name = __stringify(__ip_append_data), .new_func = klpp___ip_append_data, },
			{ .old_name = __stringify(ip_append_data), .new_func = klpp_ip_append_data, },
			{ .old_name = __stringify(ip_make_skb), .new_func = klpp_ip_make_skb, },
			{ .old_name = __stringify(ip_send_unicast_reply), .new_func = klpp_ip_send_unicast_reply, },
			{ .old_name = __stringify(io_kbuf_recycle_legacy), .new_func = klpp_io_kbuf_recycle_legacy, },
			{ .old_name = __stringify(__pskb_copy_fclone), .new_func = klpp___pskb_copy_fclone, },
			{ .old_name = __stringify(skb_segment), .new_func = klpp_skb_segment, },
			{ .old_name = __stringify(skb_shift), .new_func = klpp_skb_shift, },
			{ .old_name = __stringify(skb_try_coalesce), .new_func = klpp_skb_try_coalesce, },
			{ .old_name = __stringify(skb_gro_receive), .new_func = klpp_skb_gro_receive, },
			{ .old_name = __stringify(udp_gro_receive), .new_func = klpp_udp_gro_receive, },
			{ .old_name = __stringify(do_exit), .new_func = klpp_do_exit, },
			{ .old_name = __stringify(__ptrace_may_access), .new_func = klpp___ptrace_may_access, },
			{ .old_name = __stringify(ipv6_rthdr_rcv), .new_func = klpp_ipv6_rthdr_rcv, },
			{ .old_name = __stringify(key_alloc), .new_func = klpp_key_alloc, },
			{ .old_name = __stringify(make_task_dead), .new_func = klpp_make_task_dead, },
			{ .old_name = __stringify(pskb_carve_inside_header), .new_func = klpp_pskb_carve_inside_header, },
			{ .old_name = __stringify(pskb_carve_inside_nonlinear), .new_func = klpp_pskb_carve_inside_nonlinear, },
			{ .old_name = __stringify(ip6_err_gen_icmpv6_unreach), .new_func = klpp_ip6_err_gen_icmpv6_unreach, },
			{ }
		}
	},
	{
		.name = "act_pedit",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(tcf_pedit_act), .new_func = klpp_tcf_pedit_act, },
			{ }
		}
	},
	{
		.name = "af_packet",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(packet_release), .new_func = klpp_packet_release, },
			{ }
		}
	},
	{
		.name = "algif_aead",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(aead_recvmsg), .new_func = klpp_aead_recvmsg, },
			{ }
		}
	},
	{
		.name = "authencesn",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(crypto_authenc_esn_decrypt), .new_func = klpp_crypto_authenc_esn_decrypt, },
			{ .old_name = __stringify(crypto_authenc_esn_decrypt_tail), .new_func = klpp_crypto_authenc_esn_decrypt_tail, },
			{ }
		}
	},
	{
		.name = "auth_rpcgss",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(svcauth_gss_accept), .new_func = klpp_svcauth_gss_accept, },
			{ .old_name = __stringify(svcauth_gss_proxy_init), .new_func = klpp_svcauth_gss_proxy_init, },
			{ }
		}
	},
	{
		.name = "bluetooth",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(sco_sock_kill), .new_func = klpp_sco_sock_kill, },
			{ .old_name = __stringify(mgmt_index_removed), .new_func = klpp_mgmt_index_removed, },
			{ }
		}
	},
	{
		.name = "bonding",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(bond_close), .new_func = klpp_bond_close, },
			{ }
		}
	},
	{
		.name = "bridge",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(br_handle_frame_finish), .new_func = klpp_br_handle_frame_finish, },
			{ .old_name = __stringify(br_handle_frame), .new_func = klpp_br_handle_frame, },
			{ .old_name = __stringify(br_cfm_cc_peer_mep_add), .new_func = klpp_br_cfm_cc_peer_mep_add, },
			{ .old_name = __stringify(br_cfm_cc_peer_mep_remove), .new_func = klpp_br_cfm_cc_peer_mep_remove, },
			{ .old_name = __stringify(ccm_rx_timer_start), .new_func = klpp_ccm_rx_timer_start, },
			{ .old_name = __stringify(mep_delete_implementation), .new_func = klpp_mep_delete_implementation, },
			{ }
		}
	},
	{
		.name = "can_gw",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(cgw_csum_crc8_rel), .new_func = klpp_cgw_csum_crc8_rel, },
			{ }
		}
	},
	{
		.name = "cifs",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(crypt_message), .new_func = klpp_crypt_message, },
			{ .old_name = __stringify(cifs_spnego_key_destroy), .new_func = klpp_cifs_spnego_key_destroy, },
			{ }
		}
	},
	{
		.name = "cls_u32",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(u32_classify), .new_func = klpp_u32_classify, },
			{ }
		}
	},
	{
		.name = "esp4",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(esp_input), .new_func = klpp_esp_input, },
			{ }
		}
	},
	{
		.name = "esp6",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(esp6_input), .new_func = klpp_esp6_input, },
			{ }
		}
	},
	{
		.name = "fuse",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(fuse_emit), .new_func = klpp_fuse_emit, },
			{ }
		}
	},
	{
		.name = "i40e",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(i40e_vc_process_vf_msg), .new_func = klpp_i40e_vc_process_vf_msg, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_IAVF)
	{
		.name = "iavf",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(iavf_get_ethtool_stats), .new_func = klpp_iavf_get_ethtool_stats, },
			{ .old_name = __stringify(iavf_get_sset_count), .new_func = klpp_iavf_get_sset_count, },
			{ .old_name = __stringify(iavf_get_strings), .new_func = klpp_iavf_get_strings, },
			{ }
		}
	},
#endif
#if IS_ENABLED(CONFIG_INFINIBAND_USER_MAD)
	{
		.name = "ib_umad",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ib_umad_write), .new_func = klpp_ib_umad_write, },
			{ }
		}
	},
#endif
#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 = "ip6_gre",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ip6erspan_changelink), .new_func = klpp_ip6erspan_changelink, },
			{ }
		}
	},
	{
		.name = "ip6t_eui64",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(eui64_mt6), .new_func = klpp_eui64_mt6, },
			{ }
		}
	},
	{
		.name = "ip6_tunnel",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ip4ip6_err), .new_func = klpp_ip4ip6_err, },
			{ }
		}
	},
	{
		.name = "ip6_vti",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(vti6_init_net), .new_func = klpp_vti6_init_net, },
			{ }
		}
	},
#if (!IS_ENABLED(CONFIG_S390)) || (IS_ENABLED(CONFIG_S390))
	{
		.name = "ip_vs",
		.funcs = (struct klp_func[]) {
#if !IS_ENABLED(CONFIG_S390)
			{ .old_name = __stringify(__ip_vs_get_out_rt), .new_func = klpp___ip_vs_get_out_rt, },
#endif
#if IS_ENABLED(CONFIG_S390)
			{ .old_name = __stringify(ip_vs_bypass_xmit), .new_func = klpp_ip_vs_bypass_xmit, },
			{ .old_name = __stringify(ip_vs_dr_xmit), .new_func = klpp_ip_vs_dr_xmit, },
			{ .old_name = __stringify(ip_vs_icmp_xmit), .new_func = klpp_ip_vs_icmp_xmit, },
			{ .old_name = __stringify(ip_vs_nat_xmit), .new_func = klpp_ip_vs_nat_xmit, },
			{ .old_name = __stringify(ip_vs_tunnel_xmit), .new_func = klpp_ip_vs_tunnel_xmit, },
#endif
			{ }
		}
	},
#endif
	{
		.name = "ip_vs_ftp",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(__ip_vs_ftp_exit), .new_func = klpp___ip_vs_ftp_exit, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_INFINIBAND_IRDMA)
	{
		.name = "irdma",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(irdma_rereg_user_mr), .new_func = klpp_irdma_rereg_user_mr, },
			{ }
		}
	},
#endif
	{
		.name = "iscsi_target_mod",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(lio_target_nacl_info_show), .new_func = klpp_lio_target_nacl_info_show, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_X86)
	{
		.name = "kvm",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(__link_shadow_page), .new_func = klpp___link_shadow_page, },
			{ .old_name = __stringify(kvm_mmu_get_child_sp), .new_func = klpp_kvm_mmu_get_child_sp, },
			{ }
		}
	},
#endif
	{
		.name = "libceph",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ceph_x_handle_reply), .new_func = klpp_ceph_x_handle_reply, },
			{ .old_name = __stringify(__ceph_open_session), .new_func = klpp___ceph_open_session, },
			{ .old_name = __stringify(monmap_show), .new_func = klpp_monmap_show, },
			{ .old_name = __stringify(osdmap_show), .new_func = klpp_osdmap_show, },
			{ }
		}
	},
	{
		.name = "macvlan",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(macvlan_common_newlink), .new_func = klpp_macvlan_common_newlink, },
			{ }
		}
	},
	{
		.name = "nf_conntrack",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nf_conntrack_helper_unregister), .new_func = klpp_nf_conntrack_helper_unregister, },
			{ }
		}
	},
	{
		.name = "nf_conntrack_netlink",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ctnetlink_create_expect), .new_func = klpp_ctnetlink_create_expect, },
			{ .old_name = __stringify(ctnetlink_glue_attach_expect), .new_func = klpp_ctnetlink_glue_attach_expect, },
			{ }
		}
	},
	{
		.name = "nfsd",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nfsd4_encode_operation), .new_func = klpp_nfsd4_encode_operation, },
			{ }
		}
	},
	{
		.name = "nf_tables",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nft_map_catchall_activate), .new_func = klpp_nft_map_catchall_activate, },
			{ .old_name = __stringify(nft_map_catchall_deactivate), .new_func = klpp_nft_map_catchall_deactivate, },
			{ }
		}
	},
	{
		.name = "rds",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(rds_message_copy_from_user), .new_func = klpp_rds_message_copy_from_user, },
			{ }
		}
	},
	{
		.name = "sch_ets",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ets_qdisc_change), .new_func = klpp_ets_qdisc_change, },
			{ }
		}
	},
	{
		.name = "sch_qfq",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(qfq_change_class), .new_func = klpp_qfq_change_class, },
			{ }
		}
	},
	{
		.name = "sch_teql",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(teql_qdisc_init), .new_func = klpp_teql_qdisc_init, },
			{ }
		}
	},
	{
		.name = "sctp",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(sctp_unpack_cookie), .new_func = klpp_sctp_unpack_cookie, },
			{ .old_name = __stringify(sctp_sf_authenticate), .new_func = klpp_sctp_sf_authenticate, },
			{ .old_name = __stringify(sctp_sendmsg), .new_func = klpp_sctp_sendmsg, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_SND_PCM)
	{
		.name = "snd_pcm",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(snd_pcm_drain), .new_func = klpp_snd_pcm_drain, },
			{ }
		}
	},
#endif
	{
		.name = "tls",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(tls_rx_rec_wait), .new_func = klpp_tls_rx_rec_wait, },
			{ .old_name = __stringify(tls_sw_recvmsg), .new_func = klpp_tls_sw_recvmsg, },
			{ .old_name = __stringify(tls_encrypt_done), .new_func = klpp_tls_encrypt_done, },
			{ .old_name = __stringify(tls_set_sw_offload), .new_func = klpp_tls_set_sw_offload, },
			{ .old_name = __stringify(tls_sw_cancel_work_tx), .new_func = klpp_tls_sw_cancel_work_tx, },
			{ .old_name = __stringify(tx_work_handler), .new_func = klpp_tx_work_handler, },
			{ .old_name = __stringify(tls_push_record), .new_func = klpp_tls_push_record, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_USB_TMC)
	{
		.name = "usbtmc",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(usbtmc_release), .new_func = klpp_usbtmc_release, },
			{ }
		}
	},
#endif
#if IS_ENABLED(CONFIG_DRM_VMWGFX)
	{
		.name = "vmwgfx",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(vmw_translate_mob_ptr), .new_func = klpp_vmw_translate_mob_ptr, },
			{ .old_name = __stringify(vmw_translate_guest_ptr), .new_func = klpp_vmw_translate_guest_ptr, },
			{ }
		}
	},
#endif
	{
		.name = "vxlan",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(vxlan_xmit), .new_func = klpp_vxlan_xmit, },
			{ }
		}
	},
	{
		.name = "xt_IDLETIMER",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(idletimer_tg_checkentry), .new_func = klpp_idletimer_tg_checkentry, },
			{ }
		}
	},
	{
		.name = "xt_tcpmss",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(tcpmss_mt), .new_func = klpp_tcpmss_mt, },
			{ }
		}
	},
	{ }
};

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_bsc1247240_init();
	if (retval)
		goto err_bsc1247240;

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

	retval = livepatch_bsc1249537_init();
	if (retval)
		goto err_bsc1249537;

	retval = livepatch_bsc1250192_init();
	if (retval)
		goto err_bsc1250192;

	retval = livepatch_bsc1251787_init();
	if (retval)
		goto err_bsc1251787;

	retval = livepatch_bsc1252036_init();
	if (retval)
		goto err_bsc1252036;

	retval = livepatch_bsc1252048_init();
	if (retval)
		goto err_bsc1252048;

	retval = livepatch_bsc1252689_init();
	if (retval)
		goto err_bsc1252689;

	retval = livepatch_bsc1253404_init();
	if (retval)
		goto err_bsc1253404;

	retval = livepatch_bsc1253437_init();
	if (retval)
		goto err_bsc1253437;

	retval = livepatch_bsc1253439_init();
	if (retval)
		goto err_bsc1253439;

	retval = livepatch_bsc1253473_init();
	if (retval)
		goto err_bsc1253473;

	retval = livepatch_bsc1255053_init();
	if (retval)
		goto err_bsc1255053;

	retval = livepatch_bsc1255066_init();
	if (retval)
		goto err_bsc1255066;

	retval = livepatch_bsc1255378_init();
	if (retval)
		goto err_bsc1255378;

	retval = livepatch_bsc1255402_init();
	if (retval)
		goto err_bsc1255402;

	retval = livepatch_bsc1255895_init();
	if (retval)
		goto err_bsc1255895;

	retval = livepatch_bsc1256615_init();
	if (retval)
		goto err_bsc1256615;

	retval = livepatch_bsc1256624_init();
	if (retval)
		goto err_bsc1256624;

	retval = livepatch_bsc1256644_init();
	if (retval)
		goto err_bsc1256644;

	retval = livepatch_bsc1256780_init();
	if (retval)
		goto err_bsc1256780;

	retval = livepatch_bsc1257238_init();
	if (retval)
		goto err_bsc1257238;

	retval = livepatch_bsc1257669_init();
	if (retval)
		goto err_bsc1257669;

	retval = livepatch_bsc1258005_init();
	if (retval)
		goto err_bsc1258005;

	retval = livepatch_bsc1258051_init();
	if (retval)
		goto err_bsc1258051;

	retval = livepatch_bsc1258183_init();
	if (retval)
		goto err_bsc1258183;

	retval = livepatch_bsc1258655_init();
	if (retval)
		goto err_bsc1258655;

	retval = livepatch_bsc1258784_init();
	if (retval)
		goto err_bsc1258784;

	retval = livepatch_bsc1259126_init();
	if (retval)
		goto err_bsc1259126;

	retval = livepatch_bsc1259798_init();
	if (retval)
		goto err_bsc1259798;

	retval = livepatch_bsc1259859_init();
	if (retval)
		goto err_bsc1259859;

	retval = livepatch_bsc1260524_init();
	if (retval)
		goto err_bsc1260524;

	retval = livepatch_bsc1260563_init();
	if (retval)
		goto err_bsc1260563;

	retval = livepatch_bsc1260908_init();
	if (retval)
		goto err_bsc1260908;

	retval = livepatch_bsc1261640_init();
	if (retval)
		goto err_bsc1261640;

	retval = livepatch_bsc1262404_init();
	if (retval)
		goto err_bsc1262404;

	retval = livepatch_bsc1262759_init();
	if (retval)
		goto err_bsc1262759;

	retval = livepatch_bsc1263088_init();
	if (retval)
		goto err_bsc1263088;

	retval = livepatch_bsc1263094_init();
	if (retval)
		goto err_bsc1263094;

	retval = livepatch_bsc1263118_init();
	if (retval)
		goto err_bsc1263118;

	retval = livepatch_bsc1263177_init();
	if (retval)
		goto err_bsc1263177;

	retval = livepatch_bsc1263670_init();
	if (retval)
		goto err_bsc1263670;

	retval = livepatch_bsc1263689_init();
	if (retval)
		goto err_bsc1263689;

	retval = livepatch_bsc1263902_init();
	if (retval)
		goto err_bsc1263902;

	retval = livepatch_bsc1264060_init();
	if (retval)
		goto err_bsc1264060;

	retval = livepatch_bsc1264094_init();
	if (retval)
		goto err_bsc1264094;

	retval = livepatch_bsc1264096_init();
	if (retval)
		goto err_bsc1264096;

	retval = livepatch_bsc1264252_init();
	if (retval)
		goto err_bsc1264252;

	retval = livepatch_bsc1264253_init();
	if (retval)
		goto err_bsc1264253;

	retval = livepatch_bsc1264459_init();
	if (retval)
		goto err_bsc1264459;

	retval = livepatch_bsc1264567_init();
	if (retval)
		goto err_bsc1264567;

	retval = livepatch_bsc1264849_init();
	if (retval)
		goto err_bsc1264849;

	retval = livepatch_bsc1265117_init();
	if (retval)
		goto err_bsc1265117;

	retval = livepatch_bsc1265127_init();
	if (retval)
		goto err_bsc1265127;

	retval = livepatch_bsc1265197_init();
	if (retval)
		goto err_bsc1265197;

	retval = livepatch_bsc1265224_init();
	if (retval)
		goto err_bsc1265224;

	retval = livepatch_bsc1265384_init();
	if (retval)
		goto err_bsc1265384;

	retval = livepatch_bsc1265945_init();
	if (retval)
		goto err_bsc1265945;

	retval = livepatch_bsc1266015_init();
	if (retval)
		goto err_bsc1266015;

	retval = livepatch_bsc1266265_init();
	if (retval)
		goto err_bsc1266265;

	retval = livepatch_bsc1266970_init();
	if (retval)
		goto err_bsc1266970;

	retval = livepatch_bsc1267206_init();
	if (retval)
		goto err_bsc1267206;

	retval = livepatch_bsc1267625_init();
	if (retval)
		goto err_bsc1267625;

	retval = livepatch_bsc1267698_init();
	if (retval)
		goto err_bsc1267698;

	retval = livepatch_bsc1267723_init();
	if (retval)
		goto err_bsc1267723;

	retval = livepatch_bsc1267893_init();
	if (retval)
		goto err_bsc1267893;

	retval = livepatch_bsc1268662_init();
	if (retval)
		goto err_bsc1268662;

	retval = livepatch_bsc1269023_init();
	if (retval)
		goto err_bsc1269023;

	retval = livepatch_bsc1271648_init();
	if (retval)
		goto err_bsc1271648;

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

	/* Auto expanded KLP_PATCHES_INIT_ERR_HANDLERS: */
	livepatch_bsc1271648_cleanup();
err_bsc1271648:
	livepatch_bsc1269023_cleanup();
err_bsc1269023:
	livepatch_bsc1268662_cleanup();
err_bsc1268662:
	livepatch_bsc1267893_cleanup();
err_bsc1267893:
	livepatch_bsc1267723_cleanup();
err_bsc1267723:
	livepatch_bsc1267698_cleanup();
err_bsc1267698:
	livepatch_bsc1267625_cleanup();
err_bsc1267625:
	livepatch_bsc1267206_cleanup();
err_bsc1267206:
	livepatch_bsc1266970_cleanup();
err_bsc1266970:
	livepatch_bsc1266265_cleanup();
err_bsc1266265:
	livepatch_bsc1266015_cleanup();
err_bsc1266015:
	livepatch_bsc1265945_cleanup();
err_bsc1265945:
	livepatch_bsc1265384_cleanup();
err_bsc1265384:
	livepatch_bsc1265224_cleanup();
err_bsc1265224:
	livepatch_bsc1265197_cleanup();
err_bsc1265197:
	livepatch_bsc1265127_cleanup();
err_bsc1265127:
	livepatch_bsc1265117_cleanup();
err_bsc1265117:
	livepatch_bsc1264849_cleanup();
err_bsc1264849:
	livepatch_bsc1264567_cleanup();
err_bsc1264567:
	livepatch_bsc1264459_cleanup();
err_bsc1264459:
	livepatch_bsc1264253_cleanup();
err_bsc1264253:
	livepatch_bsc1264252_cleanup();
err_bsc1264252:
	livepatch_bsc1264096_cleanup();
err_bsc1264096:
	livepatch_bsc1264094_cleanup();
err_bsc1264094:
	livepatch_bsc1264060_cleanup();
err_bsc1264060:
	livepatch_bsc1263902_cleanup();
err_bsc1263902:
	livepatch_bsc1263689_cleanup();
err_bsc1263689:
	livepatch_bsc1263670_cleanup();
err_bsc1263670:
	livepatch_bsc1263177_cleanup();
err_bsc1263177:
	livepatch_bsc1263118_cleanup();
err_bsc1263118:
	livepatch_bsc1263094_cleanup();
err_bsc1263094:
	livepatch_bsc1263088_cleanup();
err_bsc1263088:
	livepatch_bsc1262759_cleanup();
err_bsc1262759:
	livepatch_bsc1262404_cleanup();
err_bsc1262404:
	livepatch_bsc1261640_cleanup();
err_bsc1261640:
	livepatch_bsc1260908_cleanup();
err_bsc1260908:
	livepatch_bsc1260563_cleanup();
err_bsc1260563:
	livepatch_bsc1260524_cleanup();
err_bsc1260524:
	livepatch_bsc1259859_cleanup();
err_bsc1259859:
	livepatch_bsc1259798_cleanup();
err_bsc1259798:
	livepatch_bsc1259126_cleanup();
err_bsc1259126:
	livepatch_bsc1258784_cleanup();
err_bsc1258784:
	livepatch_bsc1258655_cleanup();
err_bsc1258655:
	livepatch_bsc1258183_cleanup();
err_bsc1258183:
	livepatch_bsc1258051_cleanup();
err_bsc1258051:
	livepatch_bsc1258005_cleanup();
err_bsc1258005:
	livepatch_bsc1257669_cleanup();
err_bsc1257669:
	livepatch_bsc1257238_cleanup();
err_bsc1257238:
	livepatch_bsc1256780_cleanup();
err_bsc1256780:
	livepatch_bsc1256644_cleanup();
err_bsc1256644:
	livepatch_bsc1256624_cleanup();
err_bsc1256624:
	livepatch_bsc1256615_cleanup();
err_bsc1256615:
	livepatch_bsc1255895_cleanup();
err_bsc1255895:
	livepatch_bsc1255402_cleanup();
err_bsc1255402:
	livepatch_bsc1255378_cleanup();
err_bsc1255378:
	livepatch_bsc1255066_cleanup();
err_bsc1255066:
	livepatch_bsc1255053_cleanup();
err_bsc1255053:
	livepatch_bsc1253473_cleanup();
err_bsc1253473:
	livepatch_bsc1253439_cleanup();
err_bsc1253439:
	livepatch_bsc1253437_cleanup();
err_bsc1253437:
	livepatch_bsc1253404_cleanup();
err_bsc1253404:
	livepatch_bsc1252689_cleanup();
err_bsc1252689:
	livepatch_bsc1252048_cleanup();
err_bsc1252048:
	livepatch_bsc1252036_cleanup();
err_bsc1252036:
	livepatch_bsc1251787_cleanup();
err_bsc1251787:
	livepatch_bsc1250192_cleanup();
err_bsc1250192:
	livepatch_bsc1249537_cleanup();
err_bsc1249537:
	livepatch_bsc1248631_cleanup();
err_bsc1248631:
	livepatch_bsc1247240_cleanup();
err_bsc1247240:

	return retval;
}

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

	/* Auto expanded KLP_PATCHES_CLEANUP_CALLS: */
	livepatch_bsc1247240_cleanup();
	livepatch_bsc1248631_cleanup();
	livepatch_bsc1249537_cleanup();
	livepatch_bsc1250192_cleanup();
	livepatch_bsc1251787_cleanup();
	livepatch_bsc1252036_cleanup();
	livepatch_bsc1252048_cleanup();
	livepatch_bsc1252689_cleanup();
	livepatch_bsc1253404_cleanup();
	livepatch_bsc1253437_cleanup();
	livepatch_bsc1253439_cleanup();
	livepatch_bsc1253473_cleanup();
	livepatch_bsc1255053_cleanup();
	livepatch_bsc1255066_cleanup();
	livepatch_bsc1255378_cleanup();
	livepatch_bsc1255402_cleanup();
	livepatch_bsc1255895_cleanup();
	livepatch_bsc1256615_cleanup();
	livepatch_bsc1256624_cleanup();
	livepatch_bsc1256644_cleanup();
	livepatch_bsc1256780_cleanup();
	livepatch_bsc1257238_cleanup();
	livepatch_bsc1257669_cleanup();
	livepatch_bsc1258005_cleanup();
	livepatch_bsc1258051_cleanup();
	livepatch_bsc1258183_cleanup();
	livepatch_bsc1258655_cleanup();
	livepatch_bsc1258784_cleanup();
	livepatch_bsc1259126_cleanup();
	livepatch_bsc1259798_cleanup();
	livepatch_bsc1259859_cleanup();
	livepatch_bsc1260524_cleanup();
	livepatch_bsc1260563_cleanup();
	livepatch_bsc1260908_cleanup();
	livepatch_bsc1261640_cleanup();
	livepatch_bsc1262404_cleanup();
	livepatch_bsc1262759_cleanup();
	livepatch_bsc1263088_cleanup();
	livepatch_bsc1263094_cleanup();
	livepatch_bsc1263118_cleanup();
	livepatch_bsc1263177_cleanup();
	livepatch_bsc1263670_cleanup();
	livepatch_bsc1263689_cleanup();
	livepatch_bsc1263902_cleanup();
	livepatch_bsc1264060_cleanup();
	livepatch_bsc1264094_cleanup();
	livepatch_bsc1264096_cleanup();
	livepatch_bsc1264252_cleanup();
	livepatch_bsc1264253_cleanup();
	livepatch_bsc1264459_cleanup();
	livepatch_bsc1264567_cleanup();
	livepatch_bsc1264849_cleanup();
	livepatch_bsc1265117_cleanup();
	livepatch_bsc1265127_cleanup();
	livepatch_bsc1265197_cleanup();
	livepatch_bsc1265224_cleanup();
	livepatch_bsc1265384_cleanup();
	livepatch_bsc1265945_cleanup();
	livepatch_bsc1266015_cleanup();
	livepatch_bsc1266265_cleanup();
	livepatch_bsc1266970_cleanup();
	livepatch_bsc1267206_cleanup();
	livepatch_bsc1267625_cleanup();
	livepatch_bsc1267698_cleanup();
	livepatch_bsc1267723_cleanup();
	livepatch_bsc1267893_cleanup();
	livepatch_bsc1268662_cleanup();
	livepatch_bsc1269023_cleanup();
	livepatch_bsc1271648_cleanup();

}

module_init(klp_patch_init);
module_exit(klp_patch_cleanup);

MODULE_LICENSE("GPL");
MODULE_INFO(livepatch, "Y");
MODULE_INFO(klpgitrev, "677564f59efcc7d32626fce8c0ef9120bb759191");
