Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 Nov 2019 09:15:51 +0000
From: Mark Rutland <>
To: Sami Tolvanen <>
Cc: Will Deacon <>,
	Catalin Marinas <>,
	Steven Rostedt <>,
	Masami Hiramatsu <>,
	Ard Biesheuvel <>,
	Dave Martin <>,
	Kees Cook <>,
	Laura Abbott <>, Marc Zyngier <>,
	Nick Desaulniers <>,
	Jann Horn <>,
	Miguel Ojeda <>,
	Masahiro Yamada <>,
	clang-built-linux <>,
	Kernel Hardening <>,
	linux-arm-kernel <>,
	LKML <>
Subject: Re: [PATCH v4 11/17] arm64: disable function graph tracing with SCS

On Mon, Nov 04, 2019 at 03:44:39PM -0800, Sami Tolvanen wrote:
> On Mon, Nov 4, 2019 at 9:11 AM Mark Rutland <> wrote:
> > Can you please elaborate on _how_ this is incompatible in the commit
> > message?
> >
> > For example, it's not clear to me if you mean that's functionally
> > incompatible, or if you're trying to remove return-altering gadgets.
> >
> > If there's a functional incompatibility, please spell that out a bit
> > more clearly. Likewise if this is about minimizing the set of places
> > that can mess with control-flow outside of usual function conventions.
> Sure, I'll add a better description in v5. In this case, the return
> address is modified in the kernel stack, which means the changes are
> ignored with SCS.

Ok, that makes sense to me. I'd suggest something like:

| The graph tracer hooks returns by modifying frame records on the
| (regular) stack, but with SCS the return address is taken from the
| shadow stack, and the value in the frame record has no effect. As we
| don't currently have a mechanism to determine the corresponding slot
| on the shadow stack (and to pass this through the ftrace
| infrastructure), for now let's disable the graph tracer when SCS is
| enabled.

... as I suspect with some rework of the trampoline and common ftrace
code we'd be able to correctly manipulate the shadow stack for this.
Similarly, if clang gained -fpatchable-funciton-etnry, we'd get that for


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.