-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Linux build: silence objtool warnings #17410
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
Conversation
Looks like RHEL 8 is missing the |
I've been running into this warning, though as a build error, while trying to get a zfs build for 6.15. After bisecting the kernel, it appears to be failing the build because of this commit:
|
Thanks for noticing. I'd assume that this PR would fix the build for you. Did you try? (The failing check is due to an ancient kernel.) |
I can try shortly. I'm disabling the option in the kernel first, then will come back and try this patch (while re-enabling the config). |
@AttilaFueloep for RHEL 8 adding a check to As you'd expect, I did verify the quick fix of adding only the missing assembler macro does work but that's going to be fragile long term. |
@behlendorf Well it's complicated. Newer kernels have an assembler macro for marking the stack non standard. for certain functions whereas the RHEL 8 kernel has not. To check for the macro inside |
@AttilaFueloep - this patch + CONFIG_OBJTOOL_WERROR=y works, as does CONFIG_OBJTOOL_WERROR=n |
Exactly, that's why my current plan is to check for the macro inside |
@john-cabaj Nice, thanks for confirming. |
Verifying we can build the kmod would absolutely be best, so don't let me deter you from getting that working. But adding a primitive check for the oddball case where the |
Yeah, nice. Looking at all the |
If this passes the CI I'll squash and rebase. |
After openzfs#17401 the Linux build produces some stack related warnings. Silence them with the `STACK_FRAME_NON_STANDARD` macro. Signed-off-by: Attila Fülöp <attila@fueloep.org> Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
82f54d0
to
fa695c2
Compare
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Squashed, rebased and added a refinement to the grep regexp I forgot to commit. |
Searching the build logs reveals that there still are some The Ubuntu22 builder has this strange warning which isn't seen on the other builders:
Not sure what to make out of it. |
@john-cabaj It seems you are not seeing the remaining |
The The proper fix would be to add |
@AttilaFueloep why don't we go ahead and merge this while figuring out the best way to handle the remaining
I don't yet see a good way to handle this while preserving the existing |
Yes, please. |
After openzfs#17401 the Linux build produces some stack related warnings. Silence them with the `STACK_FRAME_NON_STANDARD` macro. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Attila Fülöp <attila@fueloep.org> Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#17410
@behlendorf I don't think that it's an issue with the |
@behlendorf Spelling out a problem always helps to understand it better. Here's a rough outline for a solution:
Let me try it out. |
Nope, even worse. |
Found a way to silence the remaining objtool warnings, preparing a PR. |
I've run out of ideas how to fix the remaining warnings. Let's see if distros will adopt CONFIG_OBJTOOL_WERROR=y. I did a quick search, Arch and openSUSE do not. Ubuntu seems to work with it enabled, no idea why the noreturn warnings aren't a problem there (#17410 (comment), #17410 (comment)). EL sources I can't look at without paying them, so no dice. That's pretty much it, I'll call it a day for now. To reiterate, the proper fix would be to add our external noreturn functions to objtools |
@AttilaFueloep - I'm packaging ZFS for Ubuntu at present. CONFIG_OBJTOOL_WERROR=y was a problem for the 6.15 kernel, and the first zfs release for 6.15 disabled it. But as I said above, the latest patch fixed the issue and we've re-enabled CONFIG_OBJTOOL_WERROR. |
@john-cabaj Yes, I got that, just wondering why it works. If I build with this patch on Arch with a 6.14 kernel I still see some objtool warnings (".. misses __noreturn .."). Being valid warnings, I'd expect them to occur with the Ubuntu 6.15 kernel as well, failing the build if CONFIG_OBJTOOL_WERROR is set. Obviously it does not, maybe 6.15 related. Arch just released 6.15 so I'll give it a whirl once I've a minute. |
@AttilaFueloep thanks for continuing to work on this. I'm still mulling it over myself. I'm going to work on wrapping up the 2.2.8 release with this change. We'll have to see in practice how much of a problem |
@behlendorf Just tried a build on Arch + Linux 6.15 +
Agreed, let's just wait and hope the best, at least we're prepared. |
@behlendorf Thinking more about it, we can always do something like this. I don't like it but it's the best we can do I guess. What do you think? |
I can wrap this up in an auto check for |
That's clever. My main concern is that it has the potential to be fragile. We'd want to add auto tools checks for 1) |
Yeah, mostly reflects my thoughts, modulo the check for
Good point, I'd say that's something for a follow-up. So I'll do the auto tools dance and open a PR. |
By the way, what would be the best way to check for |
Yeah, this probably isn't needed. My thinking was that if it's not supported we don't need to do any of this, but that's already covered by
|
All right, I'll skip the
Thanks, saved me some time! |
That was a silly question, I tend to forget that we're testing things by trying to compile things. |
After openzfs#17401 the Linux build produces some stack related warnings. Silence them with the `STACK_FRAME_NON_STANDARD` macro. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Attila Fülöp <attila@fueloep.org> Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#17410
After #17401 the Linux build produces some stack related warnings. Silence them with the `STACK_FRAME_NON_STANDARD` macro. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Attila Fülöp <attila@fueloep.org> Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #17410
After openzfs#17401 the Linux build produces some stack related warnings. Silence them with the `STACK_FRAME_NON_STANDARD` macro. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Attila Fülöp <attila@fueloep.org> Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#17410
Motivation and Context
Follow up for #17401 (3084336).
Description
After #17401 the Linux build produces some stack related warnings. Silence them with the
STACK_FRAME_NON_STANDARD
macro.How Has This Been Tested?
Built and loaded the module, verified that
__warn_thunk
isn't called.Types of changes
Checklist:
Signed-off-by
.