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: <1d1bc90c-7fbe-6123-eeea-5f9a5aad77e4@gmail.com>
Date:   Thu, 19 Mar 2020 22:08:09 +0800
From:   Tianyu Lan <ltykernel@...il.com>
To:     Michael Kelley <mikelley@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <liuwe@...rosoft.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
        "x86@...nel.org" <x86@...nel.org>
Cc:     Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        vkuznets <vkuznets@...hat.com>
Subject: Re: [PATCH 0/4] x86/Hyper-V: Panic code path fixes

Hi Michael:
      Thanks for your review.

On 3/19/2020 8:57 AM, Michael Kelley wrote:
> From: ltykernel@...il.com <ltykernel@...il.com> Sent: Tuesday, March 17, 2020 6:25 AM
>>
>> This patchset fixes some issues in the Hyper-V panic code path.
>> Patch 1 resolves issue that panic system still responses network
>> packets.
>> Patch 2-3 resolves crash enlightenment issues.
>> Patch 4 is to set crash_kexec_post_notifiers to true for Hyper-V
>> VM in order to report crash data or kmsg to host before running
>> kdump kernel.
> 
> I still see an issue that isn't addressed by these patches.  The VMbus
> driver registers a "die notifier" and a "panic notifier".   But die() will
> eventually call panic() if panic_on_oops is set (which I think it typically
> is).  If the CRASH_NOTIFY_MSG option is *not* enabled, then
> hyperv_report_panic() could get called by the die notifier, and then
> again by the panic notifier.
> 
> Do we even need the "die notifier"?  If it was removed, there would
> not be any notification to Hyper-V via the die() path unless panic_on_oops
> is set, which I think is actually the correct behavior.  I'm not
> completely clear on what is supposed to happen in general to the
> Linux kernel if panic_on_oops is not set. Does it try to continue to run?
> If so, then we should not be notifying Hyper-V if panic_on_oops is not
> set, and removing the die notifier is the right thing to do.
> 

hyperv_report_panic() has re-enter check inside and so kernel only 
reports crash register data once during die(). From comment in the
hyperv_report_panic(), register value reported in die chain is more
exact than value in panic chain. The register value in die chain is
passed by die() caller. Register value reported in panic chain
is collected in the hyperv_panic_event().


If panic_on_oops is not set, the task should be killed and kernel
still runs. In this case, we may not trigger crash enlightenment.



> Michael
> 
>>
>> Tianyu Lan (4):
>>    x86/Hyper-V: Unload vmbus channel in hv panic callback
>>    x86/Hyper-V: Free hv_panic_page when fail to register kmsg dump
>>    x86/Hyper-V: Trigger crash enlightenment only once during  system
>>      crash.
>>    x86/Hyper-V: Report crash register data or ksmg before running crash
>>      kernel
>>
>>   arch/x86/kernel/cpu/mshyperv.c | 10 ++++++++++
>>   drivers/hv/channel_mgmt.c      |  5 +++++
>>   drivers/hv/vmbus_drv.c         | 35 +++++++++++++++++++++++++----------
>>   3 files changed, 40 insertions(+), 10 deletions(-)
>>
>> --
>> 2.14.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ