[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190603112346.GA28296@fuggles.cambridge.arm.com>
Date: Mon, 3 Jun 2019 12:23:54 +0100
From: Will Deacon <will.deacon@....com>
To: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Young Xiao <92siuyang@...il.com>, linux@...linux.org.uk,
mark.rutland@....com, mingo@...hat.com, bp@...en8.de,
hpa@...or.com, x86@...nel.org, kan.liang@...ux.intel.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
ravi.bangoria@...ux.vnet.ibm.com, mpe@...erman.id.au,
acme@...hat.com, eranian@...gle.com, fweisbec@...il.com,
jolsa@...hat.com
Subject: Re: [PATCH] perf: Fix oops when kthread execs user process
On Fri, May 31, 2019 at 04:37:15PM +0100, Will Deacon wrote:
> Oh, nice! I think this happens because Power doesn't actually initialise
> the regs after a kthread execs() until late in start_thread(). But the plot
> thickens somewhat, since current_pt_regs() is different to
> task_pt_regs(current) on Power (the former cannot return NULL).
>
> So a really hideous hack on top of Peter's patch might be:
>
> diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c
> index 0bbac612146e..5bde866024b6 100644
> --- a/arch/arm64/kernel/perf_regs.c
> +++ b/arch/arm64/kernel/perf_regs.c
> @@ -57,6 +57,6 @@ void perf_get_regs_user(struct perf_regs *regs_user,
> struct pt_regs *regs,
> struct pt_regs *regs_user_copy)
> {
> - regs_user->regs = task_pt_regs(current);
> + regs_user->regs = current_pt_regs();
> regs_user->abi = perf_reg_abi(current);
^^^ Bah, this was clearly supposed to be a change in the powerpc code, but
you get the idea.
Will
Powered by blists - more mailing lists