feat: начинается полное изнасилование системы
This commit is contained in:
30
06-subroutines-interruptions/fuck-system.c
Normal file
30
06-subroutines-interruptions/fuck-system.c
Normal file
@ -0,0 +1,30 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
typedef struct {
|
||||
uint16_t size;
|
||||
uint64_t adress;
|
||||
} Fuck_IDT_register;
|
||||
|
||||
extern void store_idt(Fuck_IDT_register *storage);
|
||||
|
||||
static int __init fuck_system(void)
|
||||
{
|
||||
pr_info("start to fuck system");
|
||||
struct desc_ptr newidtr;
|
||||
gate_desc *oldint, *newint;
|
||||
Fuck_IDT_register idt_register;
|
||||
store_idt(&idt_register);
|
||||
pr_info("idt register stored");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit unfuck_system(void)
|
||||
{
|
||||
pr_info("start to unfuck system");
|
||||
}
|
||||
|
||||
module_init(fuck_system);
|
||||
module_exit(unfuck_system);
|
||||
MODULE_LICENSE("GPL");
|
||||
7
06-subroutines-interruptions/low-level-asm.asm
Normal file
7
06-subroutines-interruptions/low-level-asm.asm
Normal file
@ -0,0 +1,7 @@
|
||||
global store_idt
|
||||
|
||||
section .text
|
||||
|
||||
store_idt: ; rdi - указатель
|
||||
sidt [rdi]
|
||||
ret
|
||||
Reference in New Issue
Block a user