mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
ring0: move docs to readme
This commit is contained in:
@@ -16,6 +16,3 @@ Our kernel modules!
|
||||
.. link:strlen_overflow.c[]
|
||||
. Tracing
|
||||
.. link:kprobe_example.c[]
|
||||
. Arch
|
||||
.. x86
|
||||
... link:ring0.c[]
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
/*
|
||||
This illustrates operations which are only possible in ring 0.
|
||||
https://stackoverflow.com/questions/7415515/how-to-access-the-control-registers-cr0-cr2-cr3-from-a-program-getting-segmenta/7419306#7419306
|
||||
|
||||
It only works for x86_64.
|
||||
|
||||
Then try to run this on userland and see the process be killed:
|
||||
|
||||
/ring0.out
|
||||
*/
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#ring0 */
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
See ../ring0.c
|
||||
|
||||
This executable is expected to segfault.
|
||||
*/
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#ring0 */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
Reference in New Issue
Block a user