[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080508194431.750CB26FA85@magilla.localdomain>
Date: Thu, 8 May 2008 12:44:31 -0700 (PDT)
From: Roland McGrath <roland@...hat.com>
To: Anoop <acv@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, andi@...stfloor.org,
mtk.manpages@...glemail.com
Subject: Re: ptrace PTRACE_PEEKUSER behavior
>
> Quoting Roland McGrath <roland@...hat.com>:
>
> > 'struct user' is really a virtual structure layout, and never exists
> > anywhere as an actual struct. It's really just defining the argument
> > values that can be used in PEEKUSR/POKEUSR calls.
>
> But the powerpc ptrace code returns the FPRs & FPSCR though they are
> not part of user struct.
I guess I was too strong in describing 'struct user' as useful even in that
sense. Each arch defines the offset values for its PEEKUSR/POKEUSR, and on
powerpc the asm/ptrace.h PT_* macros are the only true definition of that ABI.
'struct user' is used in a.out core dumps, if those can even still be
generated on powerpc. Other than that, the struct is actually meaningless
cruft on powerpc. On other machines it's almost that, except that e.g. on
x86 there is no other definition than offsetof(struct user, u_debugreg[0])
to supply that offset for PTRACE_POKEUSR.
> Does this mandate inclusion of floating point set in powerpc user struct?
I think what it mandates is dropping any idea that 'struct user' is
necessarily meaningful in any generic sense. The only use it has is
arch-specific cases where offsetof(struct user, something) is part of the
ptrace ABI.
Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists