Commit 959c5093 authored by Zheng Yejian's avatar Zheng Yejian Committed by Zheng Zengkai
Browse files

livepatch: Fix compile error when CONFIG_LIVEPATCH_WO_FTRACE disabled

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I67QMO


CVE: NA

--------------------------------

When disable CONFIG_LIVEPATCH_WO_FTRACE, compiler report following error:
  kernel/livepatch/core.c: In function ‘check_address_conflict’:
  kernel/livepatch/core.c:1214:18: error: ‘KLP_MAX_REPLACE_SIZE’
  undeclared (first use in this function)
   1214 |    end = start + KLP_MAX_REPLACE_SIZE - 1;
        |                  ^~~~~~~~~~~~~~~~~~~~
  kernel/livepatch/core.c:1214:18: note: each undeclared identifier is
  reported only once for each function it appears in
  At top level:
  kernel/livepatch/core.c:1195:12: warning: ‘check_address_conflict’
  defined but not used [-Wunused-function]
   1195 | static int check_address_conflict(struct klp_patch *patch)
        |            ^~~~~~~~~~~~~~~~~~~~~~

Fixes: 2c3c0b3a ("livepatch/x86: Avoid conflict with static {call,key}")
Fixes: ed8c4c72 ("livepatch/core: Restrict minimum size of function that can be patched")
Signed-off-by: default avatarZheng Yejian <zhengyejian1@huawei.com>
Reviewed-by: default avatarKuohai Xu <xukuohai@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 85c7f16e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment