[PATCH] D91816: [Inline] prevent inlining on stack protector mismatch
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 25 10:56:40 PST 2020
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
In D91816#2415141 <https://reviews.llvm.org/D91816#2415141>, @nickdesaulniers wrote:
> In D91816#2415127 <https://reviews.llvm.org/D91816#2415127>, @rnk wrote:
>
>> I'm not super familiar with the SSP stuff, so let me try to restate how this is supposed to work to see if I understand it.
>>
>> - SSP attributes can be ordered by strength. Weakest to strongest, they are: `ssp`, `sspstrong`, `sspreq`.
>> - After this change, a callee that lacks any SSP attribute can no longer be inlined into a caller that has any SSP attribute.
>> - The `alwaysinline` attribute overrides this rule, though.
>> - Callees with differing SSP attributes may be inlined into each other, and the strongest attribute will be applied to the caller. (No change)
>>
>> Is that more or less right?
>
> Yes, that's precise. I can include that in the commit message if you wouldn't mind and if it helps makes think closer?
Sure, go for it. After reading it again, I think you also disallow inlining when the callee has SSP attrs, and the caller does not. IIUC, that is the problematic case for the Linux kernel. Here's how I'd try to work that into the wording:
- SSP attributes can be ordered by strength. Weakest to strongest, they are: `ssp`, `sspstrong`, `sspreq`.
- After this change, a callee with no SSP attributes will no longer be inlined into a caller with SSP attributes.
- The reverse is also true: a callee with an SSP attribute will not be inlined into a caller with no SSP attributes.
- The `alwaysinline` attribute overrides these rules.
- Callees with differing SSP attributes may be inlined into each other, and the strongest attribute will be applied to the caller. (No change)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91816/new/
https://reviews.llvm.org/D91816
More information about the llvm-commits
mailing list