Git Product home page Git Product logo

Comments (5)

PandaMengXu avatar PandaMengXu commented on August 29, 2024

asm/idle.h is likely a header in Linux source code.
You may like to check if the kernel you are using has been installed successfully and the kernel headers includes this file.

from memguard.

moshah avatar moshah commented on August 29, 2024

Hi,
I have installed the kernel successfully but it is not present in arch/arm/include/asm/ directory it is present in arch/x86/include/asm/ directory, I think it is architecture based file.

from memguard.

moshah avatar moshah commented on August 29, 2024

Hi,
The error I am getting is like this:
make -C /lib/modules/4.4.35-rt43/build M=/home/root/memguard-release modules
make[1]: Entering directory '/usr/src/kernel'
make[1]: Warning: File 'scripts/Makefile.extrawarn' has modification time 6455574 s in the future
make[2]: Warning: File 'scripts/Makefile.lib' has modification time 6455573 s in the future
CC [M] /home/root/memguard-release/memguard.o
/home/root/memguard-release/memguard.c:210:22: error: expected '=', ',', ';', 'asm' or 'attribute' before 'memguard_cpu_callback'
static int __cpuinit memguard_cpu_callback(struct notifier_block *nfb,
^
/home/root/memguard-release/memguard.c:228:44: error: expected '=', ',', ';', 'asm' or 'attribute' before 'memguard_cpu_notifier'
static struct notifier_block __cpuinitdata memguard_cpu_notifier =
^
/home/root/memguard-release/memguard.c: In function 'memguard_control_show':
/home/root/memguard-release/memguard.c:961:7: warning: unused variable 'buf' [-Wunused-variable]
char buf[64];
^
In file included from ./arch/arm/include/asm/cpu.h:14:0,
from ./arch/arm/include/asm/smp_plat.h:11,
from ./arch/arm/include/asm/irq_work.h:4,
from include/linux/irq_work.h:46,
from /home/root/memguard-release/memguard.c:28:
/home/root/memguard-release/memguard.c: In function 'init_module':
/home/root/memguard-release/memguard.c:1468:28: error: 'memguard_cpu_notifier' undeclared (first use in this function)
register_hotcpu_notifier(&memguard_cpu_notifier);
^
include/linux/cpu.h:258:48: note: in definition of macro 'register_hotcpu_notifier'
#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; })
^
/home/root/memguard-release/memguard.c:1468:28: note: each undeclared identifier is reported only once for each function it appears in
register_hotcpu_notifier(&memguard_cpu_notifier);
^
include/linux/cpu.h:258:48: note: in definition of macro 'register_hotcpu_notifier'
#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; })
^
/home/root/memguard-release/memguard.c: In function 'cleanup_module':
/home/root/memguard-release/memguard.c:1529:30: error: 'memguard_cpu_notifier' undeclared (first use in this function)
unregister_hotcpu_notifier(&memguard_cpu_notifier);
^
include/linux/cpu.h:260:50: note: in definition of macro 'unregister_hotcpu_notifier'
#define unregister_hotcpu_notifier(nb) ({ (void)(nb); })
^
/home/root/memguard-release/memguard.c: At top level:
/home/root/memguard-release/memguard.c:1381:30: warning: 'memguard_idle_nb' defined but not used [-Wunused-variable]
static struct notifier_block memguard_idle_nb = {
^
scripts/Makefile.build:264: recipe for target '/home/root/memguard-release/memguard.o' failed
make[2]: *** [/home/root/memguard-release/memguard.o] Error 1
Makefile:1405: recipe for target 'module/home/root/memguard-release' failed
make[1]: *** [module/home/root/memguard-release] Error 2
make[1]: Leaving directory '/usr/src/kernel'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2

Please help me out regarding this.
Thank in advance.

from memguard.

heechul avatar heechul commented on August 29, 2024

I pushed a small change (removing __cpuinit and __cpuinitdata), which should fix the compilation problem.

from memguard.

moshah avatar moshah commented on August 29, 2024

Respected Mr. Heechul Yun,

The compilation of the module was successful, but it shows warning as follows:

make -C /lib/modules/4.4.35-rt43/build M=/home/root/memguard-release modules
make[1]: Entering directory '/usr/src/kernel'
make[1]: Warning: File 'scripts/Makefile.extrawarn' has modification time 6455816 s in the future
make[2]: Warning: File 'scripts/Makefile.lib' has modification time 6455816 s in the future
CC [M] /home/root/memguard-release/memguard.o
make[2]: warning: Clock skew detected. Your build may be incomplete.
Building modules, stage 2.
make[2]: Warning: File 'scripts/Makefile.lib' has modification time 6455813 s in the future
MODPOST 1 modules

WARNING: "idle_notifier_unregister" [/home/root/memguard-release/memguard.ko] undefined!
WARNING: "idle_notifier_register" [/home/root/memguard-release/memguard.ko] undefined!

CC /home/root/memguard-release/memguard.mod.o
LD [M] /home/root/memguard-release/memguard.ko
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory '/usr/src/kernel'

When I tried to load the module it shows
root@raspberrypi3:~/memguard-release# insmod memguard.ko
insmod: ERROR: could not insert module memguard.ko: Unknown symbol in module

dmeg shows:
[ 703.782738] memguard: Unknown symbol idle_notifier_register (err 0)
[ 703.783098] memguard: Unknown symbol idle_notifier_unregister (err 0)

Kindly help me out regarding this issue, Thanks a lot in advance.

from memguard.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.