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

Check generated code for IBT compatibilty #38

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

giulianobelinassi
Copy link
Collaborator

Some kernel versions do not support IBT. Check if we have such cases and emit a runtime error if found.

Some kernel versions do not support IBT.  Check if we have such cases and emit
a runtime error if found.

Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
@@ -460,6 +460,16 @@ class FunctionExternalizerPass : public Pass
ClangCompat_None, ctx->OFS);
PrettyPrint::Set_Source_Manager(&ctx->AST->getSourceManager());

if (ctx->Ibt && ctx->AST) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also check here is Kernel was set? Maybe we should only set Ibt is Kernel was set in the first place...

@marcosps
Copy link
Collaborator

marcosps commented Jun 7, 2024

Either way it worked as expected! 🚢 it!

It is possible that we need to emit the #include <linux/livepatch.h>
even before the main file, for example if the header is passed through
-include header.h.

Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
@giulianobelinassi giulianobelinassi merged commit b630310 into SUSE:main Jun 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants