[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zfs8NNlAwF3+LYZ/@shell.armlinux.org.uk>
Date: Wed, 20 Mar 2024 19:42:44 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Jiangfeng Xiao <xiaojiangfeng@...wei.com>
Cc: linus.walleij@...aro.org, arnd@...db.de, keescook@...omium.org,
haibo.li@...iatek.com, angelogioacchino.delregno@...labora.com,
amergnat@...libre.com, akpm@...ux-foundation.org,
dave.hansen@...ux.intel.com, douzhaolei@...wei.com,
gustavoars@...nel.org, jpoimboe@...nel.org,
kepler.chenxin@...wei.com, kirill.shutemov@...ux.intel.com,
linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-arm-kernel@...ts.infradead.org,
nixiaoming@...wei.com, peterz@...radead.org, wangbing6@...wei.com,
wangfangpeng1@...wei.com, jannh@...gle.com, willy@...radead.org,
David.Laight@...lab.com
Subject: Re: [PATCH v3] ARM: unwind: improve unwinders for noreturn case
On Wed, Mar 20, 2024 at 11:41:34PM +0800, Jiangfeng Xiao wrote:
> This is an off-by-one bug which is common in unwinders,
> due to the fact that the address on the stack points
> to the return address rather than the call address.
>
> So, for example, when the last instruction of a function
> is a function call (e.g., to a noreturn function), it can
> cause the unwinder to incorrectly try to unwind from
> the function after the callee.
>
> foo:
> ...
> bl bar
> ... end of function and thus next function ...
>
> which results in LR pointing into the next function.
>
> Fixed this by subtracting 1 from frmae->pc in the call frame
> like ORC on x86 does.
>
> Refer to the unwind_next_frame function in the unwind_orc.c
This came in while I was still replying to your previous reply, so
I'm going to ignore this. Please allow at least 24 hours between
postings, and please allow discussion to finish before posting a
new version - give your reviewers adequate time to compose a reply
bearing in mind that timezones might get in the way, but also making
supper (as is the case in this instance) may cause several hour delay
in reply.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists