Thread (20 messages) 20 messages, 3 authors, 2022-09-21

Re: [PATCH v2 8/8] kallsyms: Add self-test facility

From: Leizhen (ThunderTown) <hidden>
Date: 2022-09-17 12:41:12
Also in: live-patching, lkml


On 2022/9/17 16:07, Kees Cook wrote:

On September 9, 2022 2:00:16 PM GMT+01:00, Zhen Lei [off-list ref] wrote:
quoted
Add some test cases to test the function and performance of some kallsyms
interfaces, such as kallsyms_lookup_name. It also calculates the
compression rate of the kallsyms compression algorithm for the current
symbol set.

Start self-test automatically after system startup.
if CONFIG_KALLSYMS_SELFTEST=y
I wonder if this would be better implemented as a kunit test? Shouldn't be too hard to convert. Take a look at things like lib/overflow_kunit.c, etc.
Yes, I can try to define one for each type of symbol, such as: bss, data, weak, static.
In addition, we can use kallsyms_offsets[] to do a full test.
-Kees
-- 
Regards,
  Zhen Lei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help