use __builtin_memset instead of memset with frontend rewriter
When kernel CONFIG_KASAN is enabled, the function memset becomes
a global function __memset. The bcc application with probe
rewrite will incur an error like:
error: <unknown>:0:0: in function tracepoint__task__task_newtask i32
(%struct.tracepoint__task__task_newtask*): A call to global function
'__memset' is not supported. Only calls to predefined BPF helpers
are allowed.
Replace memset function with clang __builtin_memset so that
the compiler is able to eventually optimize it away.
Signed-off-by: Yonghong Song <yhs@localhost.localdomain>
Showing
Please register or sign in to comment