I'm trying to write to CR0 in Linux, but I keep getting a segmentation fault. This for assembly of i386 or x86_64. Is there anyway of getting around this?
Bellow is part of the code that sets the segfault.
mov eax,0xffffffff ;system call number (sys_write)
mov cr0,eax
CR0 is a protected register. It cannot be modified in a userspace linux application.
User contributions licensed under CC BY-SA 3.0