From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 9 May 2019 10:58:23 -0700 From: Eric Biggers Subject: Re: [PATCH v3 0/7] crypto: x86: Fix indirect function call casts Message-ID: <20190509175822.GB12602@gmail.com> References: <20190507161321.34611-1-keescook@chromium.org> <20190507170039.GB1399@sol.localdomain> <20190507215045.GA7528@sol.localdomain> <20190508133606.nsrzthbad5kynavp@gondor.apana.org.au> <20190509020439.GB693@sol.localdomain> <20190509153828.GA261205@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190509153828.GA261205@google.com> To: Sami Tolvanen Cc: Kees Cook , Herbert Xu , Joao Moreira , Ingo Molnar , Thomas Gleixner , Borislav Petkov , X86 ML , linux-crypto , LKML , Kernel Hardening List-ID: On Thu, May 09, 2019 at 08:38:28AM -0700, Sami Tolvanen wrote: > On Wed, May 08, 2019 at 07:04:40PM -0700, Eric Biggers wrote: > > And I also asked whether indirect calls to asm code are even allowed > > with CFI. IIRC, the AOSP kernels have been patched to remove them from > > arm64 > > At least with clang, indirect calls to stand-alone assembly functions > trip CFI checks, which is why Android kernels use static inline stubs > to convert these to direct calls instead. > > Sami Thanks Sami. Is there any way to annotate assembly functions such that they work directly with CFI? Otherwise, we need the wrapper functions. Kees and Joao, it would be helpful if you'd explain this in the patchset. - Eric