Linux PARISC architecture development
 help / color / mirror / Atom feed
[parent not found: <200604212013.k3LKDAbx003500@hiauly1.hia.nrc.ca>]
* Re: [parisc-linux] Does it lakes some cloberred r1 in __put_kernel_asm() 64bit?
@ 2006-04-20 17:09 Carlos O'Donell
  2006-04-20 17:28 ` [parisc-linux] Does it lakes some cloberred r1 in John David Anglin
  0 siblings, 1 reply; 28+ messages in thread
From: Carlos O'Donell @ 2006-04-20 17:09 UTC (permalink / raw)
  To: Joel Soete, Parisc List

On 4/20/06, Joel Soete <soete.joel@tiscali.be> wrote:
> Please help me I hate this game:
>   - tel me why?
>   - no tel me why not?
>   - ...

This is all part of learning. We want to teach you to do some of the
research yourself before emailing to the list. When you send email you
should have some research done which contributes to the solution of
the problem. For example the research you have done below is exactly
what I would have expected from a serious hacker. This is an excellent
amount of research! Good work Joel.

> > a) What does a clobber mean from the viewpoint of an __asm?
>
> Sorry, I was the first to put this question:
> "btw I had another question: what's the meaning of 'clobber' in the sens =
of
> asm extension of gcc?

*I* know the answer. The question is intended for you to learn how to resea=
rch.
Google is a horrible research tool. I recommend going to the source. GCC ha=
s
great manuals.

a) Go to "http://gcc.gnu.org/"
b) Click on "Manual"
c) Click on "GCC 4.1.0 Manual"
d) Read sections 5.34 and 5.35 describing the behaviour of asm's.

Please read the manuals if you don't know the answer. It keeps others from
being frustrated. The manuals were written for a reason.

> > b) Which insn clobber r1?
> >
> Hey, may be am I be confused by the complexity if this stuff: fixup().

The following is not an answer to the question. Though it is a good
analysis of the problem.

[snip]

> My understanding of all those matter is: when an error occures while the =
store
> (here) insn, an interruption occures which in turn launch the
> fixup_put_user_skip_1()

A couple more questions for research :)

Q: Does the process of interruption clobber registers?
Q: Does fixup_put_user_skip_1() execute in the interruption, or after when
     returning the interrupted user process?

> imho, it would make sense that the fixup_*()'s author
> <http://cvs.parisc-linux.org/linux-2.6/include/asm-parisc/uaccess.h?r1=3D=
1.15&r2=3D1.16>
> put r1 in clobbered list "to tell the compiler the" gr1's value is modifi=
ed.

Don't trust other authors, Randolph might have made a mistake!

> > c) Should any of the __put_kernel_asm's have r1 listed as a clobber?
> imho, Yes (if there wasn't anoying fusy _probably_).

Haha! :)

> That said, according to the same logic, Mike make me also noticed that in=
 our
> unaligned.c we have e.g.:
> static int emulate_ldh(struct pt_regs *regs, int toreg)
> also shouldn't we also 'probably' put r1 in the clobbered register list.

Yes, if you can answer the questions above then you have a valid basis
for adding "r1" to the clober list.

Joel, I'm only trying to help, so stick with it, we're almost done the
problem analysis. After which there will be some *real* work to do to
fix our kernel :)

Cheers,
Carlos.
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2006-04-26 16:42 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20060422154641.GC10514@quicksilver.road.mcmartin.ca>
2006-04-22 16:48 ` [parisc-linux] Does it lakes some cloberred r1 in John David Anglin
2006-04-23 16:18   ` Michael S. Zick
2006-04-23 17:06     ` Michael S. Zick
2006-04-24 15:35       ` John David Anglin
2006-04-24 16:25         ` Grant Grundler
2006-04-24 16:50           ` John David Anglin
2006-04-24 18:55             ` John David Anglin
2006-04-25  0:38             ` Grant Grundler
2006-04-26 16:42             ` Michael S. Zick
2006-04-24 16:35         ` Michael S. Zick
2006-04-24 18:00           ` Michael S. Zick
2006-04-24 19:15             ` John David Anglin
2006-04-24 21:57             ` Michael S. Zick
2006-04-24 22:40               ` John David Anglin
2006-04-24 18:46           ` John David Anglin
2006-04-24 19:12             ` Michael S. Zick
2006-04-24 21:07               ` John David Anglin
2006-04-25 15:17         ` Michael S. Zick
2006-04-25 18:52           ` Michael S. Zick
2006-04-25 21:42             ` John David Anglin
     [not found] <200604212013.k3LKDAbx003500@hiauly1.hia.nrc.ca>
2006-04-21 20:30 ` John David Anglin
2006-04-20 17:09 [parisc-linux] Does it lakes some cloberred r1 in __put_kernel_asm() 64bit? Carlos O'Donell
2006-04-20 17:28 ` [parisc-linux] Does it lakes some cloberred r1 in John David Anglin
2006-04-20 17:36   ` Michael S. Zick
2006-04-20 19:32     ` John David Anglin
2006-04-20 20:21       ` Michael S. Zick
2006-04-20 20:04   ` Carlos O'Donell
2006-04-20 21:29     ` John David Anglin
2006-04-21 18:52     ` Michael S. Zick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox