|
Message-Id: <20191021182849.d51a67b0c0fe74d8d524147f@kernel.org> Date: Mon, 21 Oct 2019 18:28:49 +0900 From: Masami Hiramatsu <mhiramat@...nel.org> To: Sami Tolvanen <samitolvanen@...gle.com> Cc: Will Deacon <will@...nel.org>, Catalin Marinas <catalin.marinas@....com>, Steven Rostedt <rostedt@...dmis.org>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, Dave Martin <Dave.Martin@....com>, Kees Cook <keescook@...omium.org>, Laura Abbott <labbott@...hat.com>, Mark Rutland <mark.rutland@....com>, Nick Desaulniers <ndesaulniers@...gle.com>, clang-built-linux@...glegroups.com, kernel-hardening@...ts.openwall.com, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH 00/18] add support for Clang's Shadow Call Stack Hi, On Fri, 18 Oct 2019 09:10:15 -0700 Sami Tolvanen <samitolvanen@...gle.com> wrote: > This patch series adds support for Clang's Shadow Call Stack (SCS) > mitigation, which uses a separately allocated shadow stack to protect > against return address overwrites. More information can be found here: > > https://clang.llvm.org/docs/ShadowCallStack.html Looks interesting, and like what function-graph tracing does... > > SCS is currently supported only on arm64, where the compiler requires > the x18 register to be reserved for holding the current task's shadow > stack pointer. Because of this, the series includes four patches from > Ard to remove x18 usage from assembly code and to reserve the register > from general allocation. > > With -fsanitize=shadow-call-stack, the compiler injects instructions > to all non-leaf C functions to store the return address to the shadow > stack and unconditionally load it again before returning. As a result, > SCS is incompatible with features that rely on modifying function > return addresses to alter control flow, such as function graph tracing > and kretprobes. A copy of the return address is still kept in the > kernel stack for compatibility with stack unwinding, for example. Is it possible that kretprobes and function graph tracing modify the SCS directly instead of changing real stack in that case? Thank you, -- Masami Hiramatsu <mhiramat@...nel.org>
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.