[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <527ad07e-eec2-a211-03e7-afafe5196100@linux.intel.com>
Date: Wed, 2 Jun 2021 16:35:11 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: Josh Poimboeuf <jpoimboe@...hat.com>,
syzbot <syzbot+84fe685c02cd112a2ac3@...kaller.appspotmail.com>
Cc: bp@...en8.de, hpa@...or.com, inglorion@...gle.com,
linux-kernel@...r.kernel.org, mingo@...hat.com,
syzkaller-bugs@...glegroups.com, tglx@...utronix.de,
x86@...nel.org, Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [syzbot] KASAN: stack-out-of-bounds Read in profile_pc
> profile_pc() assumes the return address is either directly at regs->sp,
> or one word adjacent to it due to saved flags, both of which are just
> completely wrong. This code has probably never worked with ORC, and
> nobody noticed apparently.
I presume it used to work because the lock functions were really simple,
but that's not true anymore.
>
> We could just use ORC to unwind to the next frame. Though, isn't
> /proc/profile redundant, compared to all the more sophisticated options
> nowadays? Is there still a distinct use case for it or can we just
> remove it?
It's still needed for some special cases. For example there is no other
viable way to profile early boot without a VM
I would just drop the hack to unwind, at least for the early boot
profile use case locking profiling is usually not needed.
-Andi
Powered by blists - more mailing lists