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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Apr 2010 22:31:29 -0500
From:	"Steven J. Magnani" <steve@...idescorp.com>
To:	monstr@...str.eu
Cc:	microblaze-uclinux@...e.uq.edu.au, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] microblaze: add stack unwinder

On Wed, 2010-04-14 at 18:45 +0200, Michal Simek wrote:
> > diff -uprN a/arch/microblaze/kernel/traps.c
> b/arch/microblaze/kernel/traps.c
> > --- a/arch/microblaze/kernel/traps.c  2010-04-09 21:52:36.000000000
> > +++ b/arch/microblaze/kernel/traps.c  2010-04-12 22:16:01.000000000 
[snip]
> >  
> > -     if (!stack)
> > -             stack = (unsigned long *)&stack;
> > +     if (fp == 0) {
> > +             if (task)
> > +                     fp = ((struct thread_info *)
> > +                             (task->stack))->cpu_context.r1;
> > +             else {
> > +                     /* Pick up caller of dump_stack() */
> > +                     fp = (__u32)&sp - 8;
> > +             }
> > +     }
> 
> just coding style.
> 
>         if (fp == 0)
>                 if (task)
>                         fp = ((struct thread_info *)
>                                 (task->stack))->cpu_context.r1;
>                 else
>                         /* Pick up caller of dump_stack() */
>                         fp = (__u32)&sp - 8;

Do you feel strongly about this? I try to always use braces on if/else
clauses that have more than one line. I've found that the extra
characters are well worth the savings in debugging time when someone
tries to extend the clause and forgets to add the braces.

Steve


--
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