Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 21 Oct 2019 18:28:49 +0900
From: Masami Hiramatsu <>
To: Sami Tolvanen <>
Cc: Will Deacon <>, Catalin Marinas
 <>, Steven Rostedt <>, Ard
 Biesheuvel <>, Dave Martin <>,
 Kees Cook <>, Laura Abbott <>, Mark
 Rutland <>, Nick Desaulniers <>,,,,
Subject: Re: [PATCH 00/18] add support for Clang's Shadow Call Stack


On Fri, 18 Oct 2019 09:10:15 -0700
Sami Tolvanen <> 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:

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 <>

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.