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:   Mon, 29 Aug 2016 11:46:52 -0400
From:   Chris Metcalf <cmetcalf@...lanox.com>
To:     Petr Mladek <pmladek@...e.com>
CC:     Peter Zijlstra <peterz@...radead.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Russell King <linux@....linux.org.uk>,
        Thomas Gleixner <tglx@...utronix.de>,
        Aaron Tomlin <atomlin@...hat.com>,
        Ingo Molnar <mingo@...hat.com>, Andrew Morton <akpm@...l.org>,
        Daniel Thompson <daniel.thompson@...aro.org>, <x86@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-arch@...r.kernel.org>
Subject: Re: [PATCH v8 4/4] nmi_backtrace: generate one-line reports for idle
 cpus

On 8/18/2016 11:12 AM, Petr Mladek wrote:
> On Tue 2016-08-16 15:50:24, Chris Metcalf wrote:
>> [...]
>> -static inline void native_safe_halt(void)
>> +static __always_inline void native_safe_halt(void)
>>   {
>>   	asm volatile("sti; hlt": : :"memory");
>>   }
> Ah, the __always_inline stuff did not helped here. It was
> not inlined:
>
> $> nm -n vmlinux | grep native_safe_halt
> ffffffff81050bc0 t native_safe_halt
>
> The reason seems to be that it is called via
> PVOP_VCALL0(pv_irq_ops.safe_halt);, see below
> in the disassembly.
>
> I guess that it is because I have
> CONFIG_PARAVIRT=y

I fixed this by reverting to using __cpuidle instead of __always_inline.
As you discovered, we can't use <linux/cpu.h> here, but I chose to
just duplicate the #define of __cpuidle in <asm/irqflags.h> instead
since I think that's cleaner.

-- 
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ