Linux PARISC architecture development
 help / color / mirror / Atom feed
From: "Carlos O'Donell Jr." <carlos@baldric.uwo.ca>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: tausq@debian.org, parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] kdb getting healthier? (PCI guru needed, that's you willy!)
Date: Thu, 6 Jun 2002 14:57:33 -0400	[thread overview]
Message-ID: <20020606145733.C8107@systemhalted> (raw)
In-Reply-To: <200206061619.g56GJdiE004367@hiauly1.hia.nrc.ca>; from dave@hiauly1.hia.nrc.ca on Thu, Jun 06, 2002 at 12:19:39PM -0400

> > -       table->end = base_addr + end[-1].region_end;

> > +       table->end = base_addr + end[0].region_end - sizeof(struct unwind_table_entry);
> >         table->table = (struct unwind_table_entry *)table_start;
> >         table->length = end - start;
> >         table->next = NULL;
> 
> It's definitely dangerous to use array indexes outside the bounds
> of the array, particularly on the PA.  There can be problems with
> space register selection, although I wouldn't expect this to be a in
> the linux kernel.  You can avoid index insns with "-mdisable-indexing".
> Let me know if you see anything strange in the assembler output.
> 
> Dave

That's what I imagined, but only now do I realize that the fix
is completely wrong (my bad).

It should really be something like:

table->end = base_addr + (&end[0] - sizeof(struct unwind_table_entry))->region_end;

I'm pretty sure that the end[-1] is causing a processor fault. 
Which then causes kdb to kick-in, but the unwind table isn't
built yet so it can't find a matching entry.

If this doesn't work, then how is one supposed to correctly get
the last table entry? :)

 (end == __stop___unwind)

  __start___unwind = .;         /* unwind info */
  .PARISC.unwind : { *(.PARISC.unwind) }
  __stop___unwind = .;

c.

  reply	other threads:[~2002-06-06 18:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-06 13:21 [parisc-linux] kdb getting healthier? (PCI guru needed, that's you willy!) Carlos O'Donell Jr.
2002-06-06 14:09 ` Matthew Wilcox
2002-06-06 14:43   ` Carlos O'Donell Jr.
2002-06-06 16:19 ` John David Anglin
2002-06-06 18:57   ` Carlos O'Donell Jr. [this message]
2002-06-06 19:35     ` John David Anglin
2002-06-07 15:08     ` Carlos O'Donell Jr.
2002-06-07 16:42       ` John David Anglin
2002-06-07 16:48         ` Matthew Wilcox
2002-06-07 17:01           ` John David Anglin
2002-06-07 17:06             ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020606145733.C8107@systemhalted \
    --to=carlos@baldric.uwo.ca \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=tausq@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox