mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* parisc setup_sigcontext32() array overflows
@ 2008-05-17 19:16 Adrian Bunk
  2008-05-17 19:22 ` Kyle McMartin
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2008-05-17 19:16 UTC (permalink / raw)
  To: kyle, matthew, grundler; +Cc: linux-parisc, linux-kernel

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


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

end of thread, other threads:[~2008-05-17 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-17 19:16 parisc setup_sigcontext32() array overflows Adrian Bunk
2008-05-17 19:22 ` Kyle McMartin

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®