lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101006152554.GC13400@capricorn-x61>
Date:	Thu, 7 Oct 2010 00:25:54 +0900
From:	Adam Jiang <jiang.adam@...il.com>
To:	Ralf Baechle <ralf@...ux-mips.org>
Cc:	Sergei Shtylyov <sshtylyov@...sta.com>, linux-mips@...ux-mips.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] mips: irq: add stackoverflow detection

On Wed, Oct 06, 2010 at 12:21:15PM +0100, Ralf Baechle wrote:
> On Wed, Oct 06, 2010 at 02:53:43PM +0400, Sergei Shtylyov wrote:
> 
> > >Add stackoverflow detection to mips arch
> > 
> >    There's no such word: stackoverflow. Space is needed.
> > 
> > >This is the 3rd version of the smiple patch. 2K is too big for many
> > >system, so I Modified the warning line by following Ralf's suggestion.
> > 
> > >Signed-off-by: Adam Jiang<jiang.adam@...il.com>
> > [...]
> > 
> > >diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
> > >index c6345f5..b43edb7 100644
> > >--- a/arch/mips/kernel/irq.c
> > >+++ b/arch/mips/kernel/irq.c
> > >@@ -151,6 +151,28 @@ void __init init_IRQ(void)
> > >  #endif
> > >  }
> > >
> > >+#ifdef CONFIG_DEBUG_STACKOVERFLOW
> > >+static inline void check_stack_overflow(void)
> > >+{
> > >+	unsigned long sp;
> > >+
> > >+	asm volatile("move %0, $sp" : "=r" (sp));
> > >+	sp = sp & THREAD_MASK;
> > 
> >    Why not:
> > 
> > 	sp &= THREAD_MASK;
> > 
> >    It's C, after all! :-)
> 
> I already had accepted his previous version with minor changes so I've
> combined the two.

Thanks Ralf. I am very glad I can do this small piece of code for Linux
kernel, though with many faults. :) No doubt I will try to do much more
then.

Best regards,
/Adam
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ