/*
 * 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 "bsc1244631/livepatch_bsc1244631.h"
#include "bsc1245218/livepatch_bsc1245218.h"
#include "bsc1245350/livepatch_bsc1245350.h"
#include "bsc1245772/livepatch_bsc1245772.h"
#include "bsc1245776/livepatch_bsc1245776.h"
#include "bsc1245778/livepatch_bsc1245778.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 "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 "bsc1247240/livepatch_bsc1247240.h"
#include "bsc1247315/livepatch_bsc1247315.h"
#include "bsc1247351/livepatch_bsc1247351.h"
#include "bsc1247499/livepatch_bsc1247499.h"
#include "bsc1248298/livepatch_bsc1248298.h"
#include "bsc1248400/livepatch_bsc1248400.h"
#include "bsc1248615/livepatch_bsc1248615.h"
#include "bsc1248631/livepatch_bsc1248631.h"
#include "bsc1248670/livepatch_bsc1248670.h"
#include "bsc1248673/livepatch_bsc1248673.h"
#include "bsc1248749/livepatch_bsc1248749.h"
#include "bsc1249205/livepatch_bsc1249205.h"
#include "bsc1249207/livepatch_bsc1249207.h"
#include "bsc1249208/livepatch_bsc1249208.h"
#include "bsc1249242/livepatch_bsc1249242.h"
#include "bsc1249455/livepatch_bsc1249455.h"
#include "bsc1249480/livepatch_bsc1249480.h"
#include "bsc1249534/livepatch_bsc1249534.h"
#include "bsc1249847/livepatch_bsc1249847.h"
#include "bsc1250314/livepatch_bsc1250314.h"
#include "bsc1250665/livepatch_bsc1250665.h"
#include "bsc1251165/livepatch_bsc1251165.h"
#include "bsc1251203/livepatch_bsc1251203.h"
#include "bsc1251787/livepatch_bsc1251787.h"
#include "bsc1251983/livepatch_bsc1251983.h"
#include "bsc1251984/livepatch_bsc1251984.h"
#include "bsc1253437/livepatch_bsc1253437.h"
#include "bsc1254451/livepatch_bsc1254451.h"
#include "bsc1254755/livepatch_bsc1254755.h"
#include "bsc1255053/livepatch_bsc1255053.h"
#include "bsc1255378/livepatch_bsc1255378.h"
#include "bsc1255402/livepatch_bsc1255402.h"
#include "bsc1255577/livepatch_bsc1255577.h"
#include "bsc1255595/livepatch_bsc1255595.h"
#include "bsc1256097/livepatch_bsc1256097.h"
#include "bsc1256624/livepatch_bsc1256624.h"
#include "bsc1256644/livepatch_bsc1256644.h"
#include "bsc1257118/livepatch_bsc1257118.h"
#include "bsc1257629/livepatch_bsc1257629.h"
#include "bsc1258139/livepatch_bsc1258139.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(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(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 IS_ENABLED(CONFIG_HID)
			{ .old_name = __stringify(hid_alloc_report_buf), .new_func = klpp_hid_alloc_report_buf, },
			{ .old_name = __stringify(__hid_request), .new_func = klpp___hid_request, },
#endif
			{ .old_name = __stringify(path_mount), .new_func = klpp_path_mount, },
			{ .old_name = __stringify(ipv6_gso_segment), .new_func = klpp_ipv6_gso_segment, },
			{ .old_name = __stringify(clone_private_mount), .new_func = klpp_clone_private_mount, },
			{ .old_name = __stringify(run_posix_cpu_timers), .new_func = klpp_run_posix_cpu_timers, },
			{ .old_name = __stringify(sk_stream_wait_memory), .new_func = klpp_sk_stream_wait_memory, },
			{ .old_name = __stringify(__htab_map_lookup_and_delete_batch), .new_func = klpp___htab_map_lookup_and_delete_batch, },
			{ .old_name = __stringify(rpl_input), .new_func = klpp_rpl_input, },
			{ .old_name = __stringify(rpl_output), .new_func = klpp_rpl_output, },
#if IS_ENABLED(CONFIG_ACPI_PROCESSOR)
			{ .old_name = __stringify(acpi_processor_get_lpi_info), .new_func = klpp_acpi_processor_get_lpi_info, },
#endif
			{ .old_name = __stringify(mptcp_schedule_work), .new_func = klpp_mptcp_schedule_work, },
			{ .old_name = __stringify(calipso_skbuff_setattr), .new_func = klpp_calipso_skbuff_setattr, .old_sympos = 1, },
			{ .old_name = __stringify(page_pool_put_page_bulk), .new_func = klpp_page_pool_put_page_bulk, },
			{ .old_name = __stringify(page_pool_release), .new_func = klpp_page_pool_release, },
			{ }
		}
	},
	{
		.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_ATH10K)
	{
		.name = "ath10k_core",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ath10k_htc_notify_tx_completion), .new_func = klpp_ath10k_htc_notify_tx_completion, },
			{ }
		}
	},
#endif
	{
		.name = "bluetooth",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(append_eir_data_to_buf), .new_func = klpp_append_eir_data_to_buf, },
#if IS_ENABLED(CONFIG_BT)
			{ .old_name = __stringify(hci_cmd_status_evt), .new_func = klpp_hci_cmd_status_evt, },
#endif
			{ }
		}
	},
	{
		.name = "cifs",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(crypt_message), .new_func = klpp_crypt_message, },
			{ }
		}
	},
	{
		.name = "exfat",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(exfat_free_upcase_table), .new_func = klpp_exfat_free_upcase_table, },
			{ }
		}
	},
	{
		.name = "gtp",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(__gtp_encap_destroy), .new_func = klpp___gtp_encap_destroy, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_INFINIBAND_HFI1)
	{
		.name = "hfi1",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(hfi1_get_proc_affinity), .new_func = klpp_hfi1_get_proc_affinity, },
			{ }
		}
	},
#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
#if IS_ENABLED(CONFIG_IGB)
	{
		.name = "igb",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(igb_init_interrupt_scheme), .new_func = klpp_igb_init_interrupt_scheme, },
			{ }
		}
	},
#endif
	{
		.name = "ip_set_bitmap_ip",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(bitmap_ip_uadt), .new_func = klpp_bitmap_ip_uadt, },
			{ }
		}
	},
#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 = "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_ATA)
	{
		.name = "libata",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(ata_pio_sector), .new_func = klpp_ata_pio_sector, },
			{ }
		}
	},
#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, },
			{ }
		}
	},
#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_read), .new_func = klpp___mdiobus_read, },
			{ .old_name = __stringify(__mdiobus_write), .new_func = klpp___mdiobus_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
#if IS_ENABLED(CONFIG_MAC80211_HWSIM)
	{
		.name = "mac80211_hwsim",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(hwsim_cloned_frame_received_nl), .new_func = klpp_hwsim_cloned_frame_received_nl, },
			{ }
		}
	},
#endif
	{
		.name = "mrp",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(mrp_uninit_applicant), .new_func = klpp_mrp_uninit_applicant, },
			{ }
		}
	},
	{
		.name = "nf_tables",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(nf_tables_netdev_event), .new_func = klpp_nf_tables_netdev_event, },
			{ .old_name = __stringify(nf_tables_newflowtable), .new_func = klpp_nf_tables_newflowtable, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_RTW88_CORE)
	{
		.name = "rtw88_core",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(rtw_core_deinit), .new_func = klpp_rtw_core_deinit, },
			{ .old_name = __stringify(rtw_coex_tdma_timer_base), .new_func = klpp_rtw_coex_tdma_timer_base, },
			{ }
		}
	},
#endif
	{
		.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_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_multiq",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(multiq_tune), .new_func = klpp_multiq_tune, },
			{ }
		}
	},
	{
		.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, },
			{ .old_name = __stringify(qfq_destroy_class), .new_func = klpp_qfq_destroy_class, },
			{ }
		}
	},
	{
		.name = "sch_sfq",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(sfq_init), .new_func = klpp_sfq_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, },
			{ }
		}
	},
#if IS_ENABLED(CONFIG_SMC)
	{
		.name = "smc",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(smc_create), .new_func = klpp_smc_create, },
			{ }
		}
	},
#endif
	{
		.name = "tls",
		.funcs = (struct klp_func[]) {
			{ .old_name = __stringify(tls_sw_recvmsg), .new_func = klpp_tls_sw_recvmsg, },
			{ .old_name = __stringify(bpf_exec_tx_verdict), .new_func = klpp_bpf_exec_tx_verdict, },
			{ }
		}
	},
	{
		.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, },
			{ }
		}
	},
	{ }
};

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");

	retval = klp_patch_uname_init();
	if (retval)
		return retval;

	/* Auto expanded KLP_PATCHES_INIT_CALLS: */
	retval = livepatch_bsc1244631_init();
	if (retval)
		goto err_bsc1244631;

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

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

	retval = livepatch_bsc1245772_init();
	if (retval)
		goto err_bsc1245772;

	retval = livepatch_bsc1245776_init();
	if (retval)
		goto err_bsc1245776;

	retval = livepatch_bsc1245778_init();
	if (retval)
		goto err_bsc1245778;

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

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

	retval = livepatch_bsc1247351_init();
	if (retval)
		goto err_bsc1247351;

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

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

	retval = livepatch_bsc1248400_init();
	if (retval)
		goto err_bsc1248400;

	retval = livepatch_bsc1248615_init();
	if (retval)
		goto err_bsc1248615;

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

	retval = livepatch_bsc1248670_init();
	if (retval)
		goto err_bsc1248670;

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

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

	retval = livepatch_bsc1249205_init();
	if (retval)
		goto err_bsc1249205;

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

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

	retval = livepatch_bsc1249242_init();
	if (retval)
		goto err_bsc1249242;

	retval = livepatch_bsc1249455_init();
	if (retval)
		goto err_bsc1249455;

	retval = livepatch_bsc1249480_init();
	if (retval)
		goto err_bsc1249480;

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

	retval = livepatch_bsc1249847_init();
	if (retval)
		goto err_bsc1249847;

	retval = livepatch_bsc1250314_init();
	if (retval)
		goto err_bsc1250314;

	retval = livepatch_bsc1250665_init();
	if (retval)
		goto err_bsc1250665;

	retval = livepatch_bsc1251165_init();
	if (retval)
		goto err_bsc1251165;

	retval = livepatch_bsc1251203_init();
	if (retval)
		goto err_bsc1251203;

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

	retval = livepatch_bsc1251983_init();
	if (retval)
		goto err_bsc1251983;

	retval = livepatch_bsc1251984_init();
	if (retval)
		goto err_bsc1251984;

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

	retval = livepatch_bsc1254451_init();
	if (retval)
		goto err_bsc1254451;

	retval = livepatch_bsc1254755_init();
	if (retval)
		goto err_bsc1254755;

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

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

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

	retval = livepatch_bsc1255577_init();
	if (retval)
		goto err_bsc1255577;

	retval = livepatch_bsc1255595_init();
	if (retval)
		goto err_bsc1255595;

	retval = livepatch_bsc1256097_init();
	if (retval)
		goto err_bsc1256097;

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

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

	retval = livepatch_bsc1257118_init();
	if (retval)
		goto err_bsc1257118;

	retval = livepatch_bsc1257629_init();
	if (retval)
		goto err_bsc1257629;

	retval = livepatch_bsc1258139_init();
	if (retval)
		goto err_bsc1258139;

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

	/* Auto expanded KLP_PATCHES_INIT_ERR_HANDLERS: */
	livepatch_bsc1258139_cleanup();
err_bsc1258139:
	livepatch_bsc1257629_cleanup();
err_bsc1257629:
	livepatch_bsc1257118_cleanup();
err_bsc1257118:
	livepatch_bsc1256644_cleanup();
err_bsc1256644:
	livepatch_bsc1256624_cleanup();
err_bsc1256624:
	livepatch_bsc1256097_cleanup();
err_bsc1256097:
	livepatch_bsc1255595_cleanup();
err_bsc1255595:
	livepatch_bsc1255577_cleanup();
err_bsc1255577:
	livepatch_bsc1255402_cleanup();
err_bsc1255402:
	livepatch_bsc1255378_cleanup();
err_bsc1255378:
	livepatch_bsc1255053_cleanup();
err_bsc1255053:
	livepatch_bsc1254755_cleanup();
err_bsc1254755:
	livepatch_bsc1254451_cleanup();
err_bsc1254451:
	livepatch_bsc1253437_cleanup();
err_bsc1253437:
	livepatch_bsc1251984_cleanup();
err_bsc1251984:
	livepatch_bsc1251983_cleanup();
err_bsc1251983:
	livepatch_bsc1251787_cleanup();
err_bsc1251787:
	livepatch_bsc1251203_cleanup();
err_bsc1251203:
	livepatch_bsc1251165_cleanup();
err_bsc1251165:
	livepatch_bsc1250665_cleanup();
err_bsc1250665:
	livepatch_bsc1250314_cleanup();
err_bsc1250314:
	livepatch_bsc1249847_cleanup();
err_bsc1249847:
	livepatch_bsc1249534_cleanup();
err_bsc1249534:
	livepatch_bsc1249480_cleanup();
err_bsc1249480:
	livepatch_bsc1249455_cleanup();
err_bsc1249455:
	livepatch_bsc1249242_cleanup();
err_bsc1249242:
	livepatch_bsc1249208_cleanup();
err_bsc1249208:
	livepatch_bsc1249207_cleanup();
err_bsc1249207:
	livepatch_bsc1249205_cleanup();
err_bsc1249205:
	livepatch_bsc1248749_cleanup();
err_bsc1248749:
	livepatch_bsc1248673_cleanup();
err_bsc1248673:
	livepatch_bsc1248670_cleanup();
err_bsc1248670:
	livepatch_bsc1248631_cleanup();
err_bsc1248631:
	livepatch_bsc1248615_cleanup();
err_bsc1248615:
	livepatch_bsc1248400_cleanup();
err_bsc1248400:
	livepatch_bsc1248298_cleanup();
err_bsc1248298:
	livepatch_bsc1247499_cleanup();
err_bsc1247499:
	livepatch_bsc1247351_cleanup();
err_bsc1247351:
	livepatch_bsc1247315_cleanup();
err_bsc1247315:
	livepatch_bsc1247240_cleanup();
err_bsc1247240:
	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_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_bsc1245778_cleanup();
err_bsc1245778:
	livepatch_bsc1245776_cleanup();
err_bsc1245776:
	livepatch_bsc1245772_cleanup();
err_bsc1245772:
	livepatch_bsc1245350_cleanup();
err_bsc1245350:
	livepatch_bsc1245218_cleanup();
err_bsc1245218:
	livepatch_bsc1244631_cleanup();
err_bsc1244631:

	return retval;
}

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

	/* Auto expanded KLP_PATCHES_CLEANUP_CALLS: */
	livepatch_bsc1244631_cleanup();
	livepatch_bsc1245218_cleanup();
	livepatch_bsc1245350_cleanup();
	livepatch_bsc1245772_cleanup();
	livepatch_bsc1245776_cleanup();
	livepatch_bsc1245778_cleanup();
	livepatch_bsc1245791_cleanup();
	livepatch_bsc1245793_cleanup();
	livepatch_bsc1245794_cleanup();
	livepatch_bsc1245795_cleanup();
	livepatch_bsc1245797_cleanup();
	livepatch_bsc1245804_cleanup();
	livepatch_bsc1246001_cleanup();
	livepatch_bsc1246019_cleanup();
	livepatch_bsc1246030_cleanup();
	livepatch_bsc1246075_cleanup();
	livepatch_bsc1246356_cleanup();
	livepatch_bsc1247240_cleanup();
	livepatch_bsc1247315_cleanup();
	livepatch_bsc1247351_cleanup();
	livepatch_bsc1247499_cleanup();
	livepatch_bsc1248298_cleanup();
	livepatch_bsc1248400_cleanup();
	livepatch_bsc1248615_cleanup();
	livepatch_bsc1248631_cleanup();
	livepatch_bsc1248670_cleanup();
	livepatch_bsc1248673_cleanup();
	livepatch_bsc1248749_cleanup();
	livepatch_bsc1249205_cleanup();
	livepatch_bsc1249207_cleanup();
	livepatch_bsc1249208_cleanup();
	livepatch_bsc1249242_cleanup();
	livepatch_bsc1249455_cleanup();
	livepatch_bsc1249480_cleanup();
	livepatch_bsc1249534_cleanup();
	livepatch_bsc1249847_cleanup();
	livepatch_bsc1250314_cleanup();
	livepatch_bsc1250665_cleanup();
	livepatch_bsc1251165_cleanup();
	livepatch_bsc1251203_cleanup();
	livepatch_bsc1251787_cleanup();
	livepatch_bsc1251983_cleanup();
	livepatch_bsc1251984_cleanup();
	livepatch_bsc1253437_cleanup();
	livepatch_bsc1254451_cleanup();
	livepatch_bsc1254755_cleanup();
	livepatch_bsc1255053_cleanup();
	livepatch_bsc1255378_cleanup();
	livepatch_bsc1255402_cleanup();
	livepatch_bsc1255577_cleanup();
	livepatch_bsc1255595_cleanup();
	livepatch_bsc1256097_cleanup();
	livepatch_bsc1256624_cleanup();
	livepatch_bsc1256644_cleanup();
	livepatch_bsc1257118_cleanup();
	livepatch_bsc1257629_cleanup();
	livepatch_bsc1258139_cleanup();

}

module_init(klp_patch_init);
module_exit(klp_patch_cleanup);

MODULE_LICENSE("GPL");
MODULE_INFO(livepatch, "Y");
MODULE_INFO(klpgitrev, "07be976731985bf9e678b648d6a13deb2db8651c");
