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]
Date:	Tue, 10 Apr 2007 16:36:36 +0200
From:	"Jesper Juhl" <jesper.juhl@...il.com>
To:	"Zachary Amsden" <zach@...are.com>
Cc:	"Andrew Morton" <akpm@...l.org>, "Andi Kleen" <ak@....de>,
	"Jeremy Fitzhardinge" <jeremy@...p.org>,
	"Rusty Russell" <rusty@...tcorp.com.au>,
	"Chris Wright" <chrisw@...s-sol.org>,
	"Virtualization Mailing List" <virtualization@...ts.osdl.org>,
	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/10] I386 mcheck p4 grotesque and needless warning fix.patch

On 10/04/07, Zachary Amsden <zach@...are.com> wrote:
> No, just no.  You do not use goto to skip a code block.  You do not
> return an obvious variable from a singly-inlined function and give
> the function a return value.  You don't put unexplained comments
> about kmalloc in code which doesn't do dynamic allocation.  And
> you don't leave stray warnings around for no good reason.
>
> Also, when possible, it is better to use block scoped variables
> because gcc can sometime generate better code.
>
> Signed-off-by: Zachary Amsden <zach@...are.com>
>
> diff -r ed741f57dae8 arch/i386/kernel/cpu/mcheck/p4.c
> --- a/arch/i386/kernel/cpu/mcheck/p4.c  Fri Apr 06 14:29:52 2007 -0700
> +++ b/arch/i386/kernel/cpu/mcheck/p4.c  Fri Apr 06 14:43:24 2007 -0700
[...]
>  static fastcall void intel_machine_check(struct pt_regs * regs, long error_code)
> @@ -155,7 +146,6 @@ static fastcall void intel_machine_check
>         u32 alow, ahigh, high, low;
>         u32 mcgstl, mcgsth;
>         int i;
> -       struct intel_mce_extended_msrs dbg;
>
>         rdmsr (MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
>         if (mcgstl & (1<<0))    /* Recoverable ? */
> @@ -164,7 +154,9 @@ static fastcall void intel_machine_check
>         printk (KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n",
>                 smp_processor_id(), mcgsth, mcgstl);
>
> -       if (intel_get_extended_msrs(&dbg)) {
> +       if (mce_num_extended_msrs > 0) {
> +               struct intel_mce_extended_msrs dbg;

shouldn't there be a blank line here?

> +               intel_get_extended_msrs(&dbg);
>                 printk (KERN_DEBUG "CPU %d: EIP: %08x EFLAGS: %08x\n",
>                         smp_processor_id(), dbg.eip, dbg.eflags);
>                 printk (KERN_DEBUG "\teax: %08x ebx: %08x ecx: %08x edx: %08x\n",


-- 
Jesper Juhl <jesper.juhl@...il.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html
-
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