Re: [PATCH v3 42/51] x86/unwind: create stack frames for saved syscall registers

From: Josh Poimboeuf
Date: Mon Aug 15 2016 - 12:52:44 EST


On Sun, Aug 14, 2016 at 01:23:11AM -0700, Andy Lutomirski wrote:
> On Fri, Aug 12, 2016 at 7:29 AM, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> > The entry code doesn't encode pt_regs for syscalls. But they're always
> > at the same location, so we can add a manual check for them.
>
> At first I thought these would be useless (they're the *user* state
> and aren't directly relevant to the kernel), but then I realized that
> they could be extremely valuable: they contain the syscall args.

Yeah, that's what I was thinking. I'll add that justification to the
patch header.

> Do they display in OOPS dumps?

Yes.

> It might be nice to add orig_ax to the regs display too so we get the
> syscall nr as well.

Hm, good idea. I'm surprised orig_ax isn't already being shown since it
could be useful for exceptions and irqs too.

--
Josh