Re: [PATCH v2 08/12] crypto: x86/sm4 - fix crash with CFI enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 18, 2022 at 12:53 PM Sami Tolvanen <samitolvanen@xxxxxxxxxx> wrote:
>
> On Fri, Nov 18, 2022 at 12:27 PM Sami Tolvanen <samitolvanen@xxxxxxxxxx> wrote:
> >
> > On Fri, Nov 18, 2022 at 12:10 PM Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
> > > Sami, is it expected that a CFI check isn't being generated for the indirect
> > > call to 'func' in sm4_avx_cbc_decrypt()?  I'm using LLVM commit 4a7be42d922af0.
> >
> > If the compiler emits an indirect call, it should also emit a CFI
> > check. What's the assembly code it generates here?
>
> With CONFIG_RETPOLINE, the check is emitted as expected, but I can
> reproduce this issue without retpolines. It looks like the cfi-type
> attribute is dropped from the machine instruction in one of the X86
> specific passes. I'll take a look.

This should now be fixed in ToT LLVM after commit 7c96f61aaa4c. Thanks
for spotting the issue!

Sami



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux