Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFI: -fsanitize-coverage=trace-{pc,cmp} cannot be enabled with -fsanitize=kcfi #1743

Closed
samitolvanen opened this issue Oct 19, 2022 · 2 comments
Labels
[BUG] llvm (main) A bug in an unreleased version of LLVM (this label is appropriate for regressions) [FEATURE] CFI Related to building the kernel with Clang Control Flow Integrity

Comments

@samitolvanen
Copy link
Member

From Mark Rutland:

when i enable kCFI, clang seems to ignore -fsanitize=trace-{pc,cmp}
... so I can't fuzz with Syzkaller with kCFI enabled
those seem to work on their own, and I see that Kbuild is passing the options through, but there are no _cov_trace* calls in the binary

@nathanchance points out that this sounds similar to llvm/llvm-project#45176.

cc @kees @nickdesaulniers @lvwr

@samitolvanen samitolvanen added [FEATURE] CFI Related to building the kernel with Clang Control Flow Integrity [BUG] llvm (main) A bug in an unreleased version of LLVM (this label is appropriate for regressions) labels Oct 19, 2022
@samitolvanen
Copy link
Member Author

@MaskRay MaskRay changed the title CFI: -fsanitize=trace-{pc,cmp} cannot be enabled with -fsanitize=kcfi CFI: -fsanitize-coverage=trace-{pc,cmp} cannot be enabled with -fsanitize=kcfi Nov 21, 2022
samitolvanen added a commit to llvm/llvm-project that referenced this issue Nov 22, 2022
Allow `-fsanitize=kcfi` to be enabled with `-fsanitize-coverage=` modes
such as `trace-{pc,cmp}`.

Link: ClangBuiltLinux/linux#1743

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D138458
@samitolvanen
Copy link
Member Author

maurer pushed a commit to maurer/llvm-project that referenced this issue Dec 6, 2022
Allow `-fsanitize=kcfi` to be enabled with `-fsanitize-coverage=` modes
such as `trace-{pc,cmp}`.

Link: ClangBuiltLinux/linux#1743

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D138458
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[BUG] llvm (main) A bug in an unreleased version of LLVM (this label is appropriate for regressions) [FEATURE] CFI Related to building the kernel with Clang Control Flow Integrity
Projects
None yet
Development

No branches or pull requests

1 participant