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]
Message-ID: <49DC2F5D.1010401@jp.fujitsu.com>
Date:	Wed, 08 Apr 2009 14:00:13 +0900
From:	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	hpa@...or.com, linux-kernel@...r.kernel.org, mingo@...e.hu,
	tglx@...utronix.de
Subject: Re: [PATCH] [6/28] x86: MCE: Add machine check exception count in
 /proc/interrupts

Andi Kleen wrote:
> @@ -96,6 +97,12 @@
>  	seq_printf(p, "  Threshold APIC interrupts\n");
>  # endif
>  #endif
> +#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64)
> +	seq_printf(p, "%*s: ", prec, "MCE");
> +	for_each_online_cpu(j)
> +		seq_printf(p, "%10u ", per_cpu(mce_exception_count, j));
> +	seq_printf(p, "  Machine check exceptions\n");
> +#endif
>  	seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
>  #if defined(CONFIG_X86_IO_APIC)
>  	seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));

How about unifying ifdefs?
The patched code will be:

#ifdef CONFIG_X86_MCE
        seq_printf(p, "%*s: ", prec, "TRM");
        for_each_online_cpu(j)
                seq_printf(p, "%10u ", irq_stats(j)->irq_thermal_count);
        seq_printf(p, "  Thermal event interrupts\n");
# ifdef CONFIG_X86_64
        seq_printf(p, "%*s: ", prec, "THR");
        for_each_online_cpu(j)
                seq_printf(p, "%10u ", irq_stats(j)->irq_threshold_count);
        seq_printf(p, "  Threshold APIC interrupts\n");
# endif
#endif
#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64)
        seq_printf(p, "%*s: ", prec, "MCE");
        for_each_online_cpu(j)
                seq_printf(p, "%10u ", per_cpu(mce_exception_count, j));
        seq_printf(p, "  Machine check exceptions\n");
#endif

> @@ -163,6 +170,9 @@
>  {
>  	u64 sum = irq_stats(cpu)->__nmi_count;
>  
> +#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64)
> +	sum += per_cpu(mce_exception_count, cpu);
> +#endif
>  #ifdef CONFIG_X86_LOCAL_APIC
>  	sum += irq_stats(cpu)->apic_timer_irqs;
>  	sum += irq_stats(cpu)->irq_spurious_count;

Ditto.


Thanks,
H.Seto
--
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