|
Message-ID: <CABCJKudAYATQSVLHbM4873Yr2EYufrBWQ7Pmv+L97uHhBQUe4w@mail.gmail.com> Date: Wed, 19 Feb 2020 12:12:21 -0800 From: Sami Tolvanen <samitolvanen@...gle.com> To: James Morse <james.morse@....com> Cc: Marc Zyngier <maz@...nel.org>, Will Deacon <will@...nel.org>, Catalin Marinas <catalin.marinas@....com>, Steven Rostedt <rostedt@...dmis.org>, Masami Hiramatsu <mhiramat@...nel.org>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, Mark Rutland <mark.rutland@....com>, Dave Martin <Dave.Martin@....com>, Kees Cook <keescook@...omium.org>, Laura Abbott <labbott@...hat.com>, Nick Desaulniers <ndesaulniers@...gle.com>, Jann Horn <jannh@...gle.com>, Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, Masahiro Yamada <yamada.masahiro@...ionext.com>, clang-built-linux <clang-built-linux@...glegroups.com>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v8 00/12] add support for Clang's Shadow Call Stack On Wed, Feb 19, 2020 at 10:38 AM James Morse <james.morse@....com> wrote: > This looks like reserving x18 is causing Clang to not-inline the __kern_hyp_va() calls, > losing the vitally important section information. (I can see why the compiler thinks this > is fair) Thanks for catching this. This doesn't appear to be caused by reserving x18, it looks like SCS itself is causing clang to avoid inlining these. If I add __noscs to __kern_hyp_va(), clang inlines the function again. __always_inline also works, as you pointed out. > Is this a known, er, thing, with clang-9? I can reproduce this with ToT clang as well. > I suspect repainting all KVM's 'inline' with __always_inline will fix it. (yuck!) I'll try > tomorrow. I think switching to __always_inline is the correct solution here. Sami
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.