Unverified Commit 73c55d5a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3897 Some simple extensions of the kfence feature

Merge Pull Request from: @ci-robot 
 
PR sync from: Ze Zuo <zuoze1@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/WMUY7ZB2JWAGSPZWTUW4K3756JNX3LD7/ 
This patchset supports the following two features:

1. The number of kfence objects is a key factor to balance kfence bug
detection capabilities and performance loss, and often needs to be
optimized according to actual business scenarios. The number of
kfence objects can be dynamically configured kfence.num_objects
cmdline, so as to reduce the release of kernel versions in actual use,
thereby reducing costs.

2. The kfence feature under arm64 supports dynamic opening after system
startup, which will turn all the kernel memblock memory into page-mapped
mapping and increase the memory overhead, in order to save the page
table memory usage, only the kfence pool supports page-mapped mapping,
which can be enabled at kernel startup by setting
kfence.sample _interval=-1 at kernel startup to enable the dynamic on
capability, at this time it will allocate memory for kfence by default.
The kfence will be allocated memory by default. Subsequent dynamic
enablement and disabling will no longer consume additional memory.

This feature has been tested under ARM64, x86_64 and ARM architectures,
and the Kfence Kunit test results are consistent with the native ones.

ChangeLog:
- Add config kfence_must_early_init to perform code isolation for
  non-functional purposes.
- Some minor changes about document, no functional changes.

Ze Zuo (2):
  kfence: Add a module parameter to adjust kfence objects
  arm64: kfence: scale sample_interval to support early init for kfence.


-- 
2.25.1
 
https://gitee.com/openeuler/kernel/issues/I8Q3P9 
 
Link:https://gitee.com/openeuler/kernel/pulls/3897

 

Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 2f8f5a20 2ef3a018
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment