Re: [PATCH v5] kprobes: unpoison stack in jprobe_return() for KASAN
From: Ingo Molnar
Date: Sun Oct 16 2016 - 03:02:04 EST
* Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:
> On Sat, Oct 15, 2016 at 8:30 AM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> >
> > * Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:
> >
> >> KASAN stack instrumentation poisons stack redzones on function entry
> >> and unpoisons them on function exit. If a function exits abnormally
> >> (e.g. with a longjmp like jprobe_return()), stack redzones are left
> >> poisoned. Later this leads to random KASAN false reports.
> >>
> >> Unpoison stack redzones in the frames we are going to jump over
> >> before doing actual longjmp in jprobe_return().
> >
> > Does this affect any other architecture besides arm64? If not then it might make
> > the most sense to merge this via the arm64 tree.
>
>
> This is mostly for x86_64. This patch fixes KASAN false positives
> related to jprobe on x86_64.
Indeed: I should have read the patch beyond the diffstat.
> Arm64 related part is only a function rename. As I introduce a
> function similar to an existing one, Mark asked to me rename the
> existing function to clarify the difference between the two.
Fair enough!
Thanks,
Ingo