mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	Add a few livepatch modules and simple target modules that the included regression suite can run tests against: - basic livepatching (multiple patches, atomic replace) - pre/post (un)patch callbacks - shadow variable API Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Tested-by: Miroslav Benes <mbenes@suse.cz> Tested-by: Alice Ferrazzi <alice.ferrazzi@gmail.com> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			581 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			581 B
		
	
	
	
		
			C
		
	
	
	
	
	
// SPDX-License-Identifier: GPL-2.0
 | 
						|
// Copyright (C) 2018 Joe Lawrence <joe.lawrence@redhat.com>
 | 
						|
 | 
						|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 | 
						|
 | 
						|
#include <linux/module.h>
 | 
						|
#include <linux/kernel.h>
 | 
						|
 | 
						|
static int test_klp_callbacks_mod_init(void)
 | 
						|
{
 | 
						|
	pr_info("%s\n", __func__);
 | 
						|
	return 0;
 | 
						|
}
 | 
						|
 | 
						|
static void test_klp_callbacks_mod_exit(void)
 | 
						|
{
 | 
						|
	pr_info("%s\n", __func__);
 | 
						|
}
 | 
						|
 | 
						|
module_init(test_klp_callbacks_mod_init);
 | 
						|
module_exit(test_klp_callbacks_mod_exit);
 | 
						|
MODULE_LICENSE("GPL");
 | 
						|
MODULE_AUTHOR("Joe Lawrence <joe.lawrence@redhat.com>");
 | 
						|
MODULE_DESCRIPTION("Livepatch test: target module");
 |