mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: kyle@parisc-linux.org, matthew@wil.cx, grundler@parisc-linux.org
Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: parisc setup_sigcontext32() array overflows
Date: Sat, 17 May 2008 22:16:37 +0300	[thread overview]
Message-ID: <20080517191636.GA8140@cs181133002.pp.htv.fi> (raw)

include/asm-parisc/ptrace.h:

<--  snip  -->

...
struct pt_regs {
        unsigned long gr[32];   /* PSW is in gr[0] */
...
}

<--  snip  -->


arch/parisc/kernel/signal32.c:

<--  snip  -->

...
setup_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __user * rf, 
                struct pt_regs *regs, int in_syscall)            
{
...
                /* Store upper half */
                compat_reg = (compat_uint_t)(regs->gr[32] >> 32);
...                                                   ^^
                /* Store upper half */
                compat_reg = (compat_uint_t)((regs->gr[32]+4) >> 32);
...                                                    ^^

<--  snip  -->


Spotted by the GNU C compiler.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


             reply	other threads:[~2008-05-17 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-17 19:16 Adrian Bunk [this message]
2008-05-17 19:22 ` Kyle McMartin

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=20080517191636.GA8140@cs181133002.pp.htv.fi \
    --to=bunk@kernel.org \
    --cc=grundler@parisc-linux.org \
    --cc=kyle@parisc-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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

all inboxes | Powered by JetHome®