Message ID | 20221103075047.1634923-2-guoren@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | riscv: Add GENERIC_ENTRY support and related features | expand |
Context | Check | Description |
---|---|---|
conchuod/cc_maintainers | warning | 4 maintainers not CCed: aou@eecs.berkeley.edu akpm@linux-foundation.org ast@kernel.org haoluo@google.com |
conchuod/patch_count | success | Link |
conchuod/cover_letter | success | Series has a cover letter |
conchuod/tree_selection | success | Guessed tree name to be for-next |
conchuod/fixes_present | success | Fixes tag not required for -next series |
conchuod/verify_signedoff | success | Signed-off-by tag matches author and committer |
conchuod/kdoc | success | Errors and warnings before: 0 this patch: 0 |
conchuod/module_param | success | Was 0 now: 0 |
conchuod/build_warn_rv64 | fail | Errors and warnings before: 0 this patch: 0 |
conchuod/dtb_warn_rv64 | success | Errors and warnings before: 0 this patch: 0 |
conchuod/header_inline | success | No static functions without inline keyword in header files |
conchuod/checkpatch | fail | ERROR: Macros with complex values should be enclosed in parentheses |
conchuod/source_inline | success | Was 0 now: 0 |
conchuod/verify_fixes | success | No Fixes tag |
guoren@kernel.org writes: > From: Lai Jiangshan <laijs@linux.alibaba.com> > > And it will be extended for C entry code. It would be nice with a more elaborative commit message.
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index eb0466236661..41e4faa4cd95 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -230,12 +230,19 @@ struct ftrace_likely_data { #define __no_sanitize_or_inline __always_inline #endif -/* Section for code which can't be instrumented at all */ -#define noinstr \ - noinline notrace __attribute((__section__(".noinstr.text"))) \ - __no_kcsan __no_sanitize_address __no_profile __no_sanitize_coverage \ +/* + * Using __noinstr_section() doesn't automatically disable all instrumentations + * on the section. Inhibition for some instrumentations requires extra code. + * I.E. KPROBES explicitly avoids instrumenting on .noinstr.text. + */ +#define __noinstr_section(section) \ + noinline notrace __section(section) __no_profile \ + __no_kcsan __no_sanitize_address __no_sanitize_coverage \ __no_sanitize_memory +/* Section for code which can't be instrumented at all */ +#define noinstr __noinstr_section(".noinstr.text") + #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */