lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 21 Aug 2022 12:20:50 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Chen Zhongjin <chenzhongjin@...wei.com>,
        linux-kernel@...r.kernel.org, jpoimboe@...nel.org,
        peterz@...radead.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
        hpa@...or.com
Subject: Re: [PATCH v2] x86/unwind/orc: unwind ftrace trampolines with
 correct orc


* Steven Rostedt <rostedt@...dmis.org> wrote:

> On Fri, 19 Aug 2022 16:43:34 +0800
> Chen Zhongjin <chenzhongjin@...wei.com> wrote:
> 
> > When meeting ftrace trampolines in orc unwinding, unwinder uses address
> > of ftrace_{regs_}call address to find the orc, which gets next frame at
> > sp+176.
> > 
> > If there is an irq hitting at sub $0xa8,%rsp, the next frame should be
> > sp+8 instead of 176. It makes unwinder skip correct frame and throw
> > warnings such as "wrong direction" or "can't access registers", etc,
> > depending on the content of the wrong frame address.
> > 
> > By adding the base address ftrace_{regs_}caller with the offset
> > *ip - ops->trampoline*,
> > we can get the correct address to find orc.
> > 
> > Also change "caller" to "tramp_addr" to make variable name conform to
> > its content.
> > 
> > Fixes: 6be7fa3c74d1 ("ftrace, orc, x86: Handle ftrace dynamically allocated trampolines")
> > Cc: <stable@...r.kernel.org>
> > Signed-off-by: Chen Zhongjin <chenzhongjin@...wei.com>
> 
> Reviewed-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> 
> Would someone from the tip tree care to pull this in?

Picked it up into tip:x86/urgent with minor edits to the changelog - will 
push it out after some testing.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ