mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
KALLSYMS_ALL, IKCONFIG
This commit is contained in:
@@ -1,12 +1,19 @@
|
|||||||
# If you change this file, you need to run:
|
# Changes to this file are automatically used in the new kernel
|
||||||
# rm -rf buildroot/output/build/linux-*.*.*/
|
# after ./run, no need to do anything different.
|
||||||
# before ./run
|
|
||||||
CONFIG_DEBUG_KERNEL=y
|
|
||||||
CONFIG_DEBUG_FS=y
|
CONFIG_DEBUG_FS=y
|
||||||
CONFIG_DEBUG_INFO=y
|
CONFIG_DEBUG_INFO=y
|
||||||
|
CONFIG_DEBUG_KERNEL=y
|
||||||
CONFIG_GDB_SCRIPTS=y
|
CONFIG_GDB_SCRIPTS=y
|
||||||
|
|
||||||
# KGDB.
|
# grep lkmc_dep /proc/kallsyms
|
||||||
|
CONFIG_KALLSYMS_ALL=y
|
||||||
|
|
||||||
|
# zcat /proc/config.gz
|
||||||
|
CONFIG_IKCONFIG=y
|
||||||
|
CONFIG_IKCONFIG_PROC=y
|
||||||
|
|
||||||
|
# KGDB
|
||||||
CONFIG_CONSOLE_POLL=y
|
CONFIG_CONSOLE_POLL=y
|
||||||
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
|
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
|
||||||
CONFIG_KDB_DEFAULT_ENABLE=0x1
|
CONFIG_KDB_DEFAULT_ENABLE=0x1
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ sys visibility:
|
|||||||
cat refcnt
|
cat refcnt
|
||||||
# => 1
|
# => 1
|
||||||
|
|
||||||
|
proc visibility:
|
||||||
|
|
||||||
|
grep lkmc_dep /proc/kallsyms
|
||||||
|
|
||||||
|
Requires "CONFIG_KALLSYMS_ALL=y".
|
||||||
|
|
||||||
depmod:
|
depmod:
|
||||||
|
|
||||||
grep dep "/lib/module/"*"/depmod"
|
grep dep "/lib/module/"*"/depmod"
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ Documentation/ioctl/ioctl-number.txt has some info:
|
|||||||
_IOW an ioctl with write parameters (copy_from_user)
|
_IOW an ioctl with write parameters (copy_from_user)
|
||||||
_IOR an ioctl with read parameters (copy_to_user)
|
_IOR an ioctl with read parameters (copy_to_user)
|
||||||
_IOWR an ioctl with both write and read parameters.
|
_IOWR an ioctl with both write and read parameters.
|
||||||
|
|
||||||
|
- https://stackoverflow.com/questions/2264384/how-do-i-use-ioctl-to-manipulate-my-kernel-module/44613896#44613896
|
||||||
|
- https://askubuntu.com/questions/54239/problem-with-ioctl-in-a-simple-kernel-module/926675#926675
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <asm/uaccess.h> /* copy_from_user, copy_to_user */
|
#include <asm/uaccess.h> /* copy_from_user, copy_to_user */
|
||||||
|
|||||||
Reference in New Issue
Block a user