Thread (55 messages) flat view 55 messages, 3 authors, 2021-03-23

Re: [RFC PATCH v2 5/8] arm64: Detect an FTRACE frame and mark a stack trace unreliable

From: Madhavan T. Venkataraman <hidden>
Date: 2021-03-23 16:54:15
Also in: live-patching, lkml


On 3/23/21 11:48 AM, Mark Rutland wrote:
On Tue, Mar 23, 2021 at 10:26:50AM -0500, Madhavan T. Venkataraman wrote:
quoted
On 3/23/21 9:57 AM, Mark Rutland wrote:
Thanks for explaining the nesting. It is now clear to me.
No problem!
quoted
So, my next question is - can we define a practical limit for the
nesting so that any nesting beyond that is fatal? The reason I ask is
- if there is a max, then we can allocate an array of stack frames out
of band for the special frames so they are not part of the stack and
will not likely get corrupted.
I suspect we can't define such a fatal limit without introducing a local
DoS vector on some otherwise legitimate workload, and I fear this will
further complicate the entry/exit logic, so I'd prefer to avoid
introducing a new limit.
I suspected as much. But I thought I will ask anyway.
What exactly do you mean by a "special frame", and why do those need
additional protection over regular frame records?
Special frame just means pt_regs->stackframe that is used for exceptions.
No additional protection is needed. I just meant that since they are
out of band, we can reliably tell that there are exceptions without
examining the stack. That is all.
quoted
Also, we don't have to do any special detection. If the number of out
of band frames used is one or more then we have exceptions and the
stack trace is unreliable.
What is expected to protect against?
It is not a protection thing. I just wanted a reliable way to tell that there
is an exception without having to unwind the stack up to the exception frame.
That is all.

Thanks.

Madhavan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help