Thread (10 messages) flat view 10 messages, 4 authors, 2018-10-16

Re: [PATCH 1/3] powerpc: Split user/kernel definitions of struct pt_regs

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-10-16 10:53:03

Madhavan Srinivasan [off-list ref] writes:
On Monday 15 October 2018 04:38 PM, Michael Ellerman wrote:
quoted
Madhavan Srinivasan [off-list ref] writes:
quoted
On Saturday 13 October 2018 04:26 PM, Michael Ellerman wrote:
...
quoted
quoted
quoted
At the moment they're still identical, and we check that at build
time. That's because we have code (in ptrace etc.) that assumes that
they are the same. We will fix that code in future patches, and then
we can break the strict symmetry between the two structs.
Nice and awesome. But just trying to understand. What will
*regs will point to in the "struct sigcontext".
It should always point to a user_pt_regs.
...
quoted
I think it's not actually broken at the moment, because it's just a
pointer, and we don't do anything based on the sizeof() the type.
yes. This clarifies. But still perf/perf_regs.c needs changes.
Because perf support dumping user_space regs and interrupt regs.
Once again, we dont use any sizeof(), but need to handle the
user_pt_regs changes.

I will have a look at that in the morning.
I did look at that and convinced myself that it was OK, but maybe I'm
wrong :D

My reasoning was that the regs we're using there are always the
in-kernel regs for the process at the point it took the PMU interrupt.
And the regs values aren't exported directly as a struct but rather via
regs_get_register().

But we may still want to change it to make things clearer.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help