aliyun/plugsched

Compilation error when building scheduler module for arm64 kernel-4.19

Closed this issue · 0 comments

Background

There is a compilation error when building the scheduler module for arm64 kernel-4.19. See the error:

/root/scheduler/kernel/sched/mod//main.c: In function 'disable_stack_protector':
/root/scheduler/kernel/sched/mod//main.c:137:35: error: 'STACK_PROTECTOR' undeclared (first use in this function)
137 | void *addr = __orig___schedule + STACK_PROTECTOR;
| ^~~~~~~~~~~~~~~
/root/scheduler/kernel/sched/mod//main.c:137:35: note: each undeclared identifier is reported only once for each function it appears in
/root/scheduler/kernel/sched/mod//main.c:139:14: error: 'STACK_PROTECTOR_LEN' undeclared (first use in this function)
139 | for (i=0; i<STACK_PROTECTOR_LEN; i++, addr+=4)
| ^~~~~~~~~~~~~~~~~~

The reason of this error is that the springboard_search.sh tool uses the /usr/src/kernels/release-kernel/.config to determine whether the CONFIG_STACKPROTECTOR_PER_TASK is set, but CONFIG_STACKPROTECTOR_PER_TASK config is added to config file later when building the kernel. So the tool should use the scheduler/.config instead of /usr/src/kernels/release-kernel/.config.

Task

Fix the compilation error.