Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1191421 > unrolled thread
| Started by | Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> |
|---|---|
| First post | 2015-07-24 03:30 +0200 |
| Last post | 2015-08-04 13:50 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[RFC V2 PATCH 0/1] kexec: crash_kexec_post_notifiers boot option related fixes Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> - 2015-07-24 03:30 +0200
Re: [RFC V2 PATCH 0/1] kexec: crash_kexec_post_notifiers boot option related fixes Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> - 2015-08-03 13:10 +0200
Re: [RFC V2 PATCH 0/1] kexec: crash_kexec_post_notifiers boot option related fixes ebiederm@xmission.com (Eric W. Biederman) - 2015-08-03 18:40 +0200
RE: [RFC V2 PATCH 0/1] kexec: crash_kexec_post_notifiers boot option related fixes 河合英宏 / KAWAI,HIDEHIRO <hidehiro.kawai.ez@hitachi.com> - 2015-08-04 13:50 +0200
| From | Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> |
|---|---|
| Date | 2015-07-24 03:30 +0200 |
| Subject | [RFC V2 PATCH 0/1] kexec: crash_kexec_post_notifiers boot option related fixes |
| Message-ID | <pPzYe-7xI-9@gated-at.bofh.it> |
This is a bugfix patch for crash_kexec_post_notifiers boot option
which allows users to call panic notifiers and kmsg dumpers before
kdump.
This fixes one of the problems reported by Daniel Walker
(https://lkml.org/lkml/2015/6/24/44).
Problem 1:
If crash_kexec_post_notifiers boot option is specified, some
shutting down process which assume other cpus are still alive
don't work properly.
Problem 2 (addressed by this patch):
If crash_kexec_post_notifiers boot option is specified, register
information of other cpus are not saved to crash dumps.
Following Vivek's opinion, this patch replaces smp_send_stop()
in panic() with suitable version for crash_kexec which saves
cpu states and other things like cleaning up VMX/SVM. Since this
needs architecture specific implementation and it's not so trivial,
this version only support for x86. So the problem 1, known to
happen on MIPS/OCTEON, is not addressed now.
To keep the modification impact low, this patch doesn't change
the logic basically if crash_kexec_post_notifiers is not specified.
Please note that crash_kexec() can be called directly without
entering panic(). Stopping other cpus functionality is still
needed in crash_kexec().
Changes in V2:
- Replace smp_send_stop() call with crash_kexec version which
saves cpu states and does cleanups instead of changing execution
flow
- Drop a fix for Problem 1
- Drop other patches because they aren't needed anymore
V1: https://lkml.org/lkml/2015/7/10/316
---
Hidehiro Kawai (1):
panic/x86: Replace smp_send_stop() with crash_kexec version
arch/x86/kernel/crash.c | 16 +++++++++++-----
kernel/panic.c | 29 +++++++++++++++++++++++------
2 files changed, 34 insertions(+), 11 deletions(-)
--
Hidehiro Kawai
Hitachi, Ltd. Research & Development Group
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> |
|---|---|
| Date | 2015-08-03 13:10 +0200 |
| Subject | Re: [RFC V2 PATCH 0/1] kexec: crash_kexec_post_notifiers boot option related fixes |
| Message-ID | <pTlMZ-1eF-7@gated-at.bofh.it> |
| In reply to | #1191421 |
Hello Eric and Vivek, Do you have any comments? (2015/07/24 10:16), Hidehiro Kawai wrote: > This is a bugfix patch for crash_kexec_post_notifiers boot option > which allows users to call panic notifiers and kmsg dumpers before > kdump. > > This fixes one of the problems reported by Daniel Walker > (https://lkml.org/lkml/2015/6/24/44). > > Problem 1: > If crash_kexec_post_notifiers boot option is specified, some > shutting down process which assume other cpus are still alive > don't work properly. > > Problem 2 (addressed by this patch): > If crash_kexec_post_notifiers boot option is specified, register > information of other cpus are not saved to crash dumps. > > Following Vivek's opinion, this patch replaces smp_send_stop() > in panic() with suitable version for crash_kexec which saves > cpu states and other things like cleaning up VMX/SVM. Since this > needs architecture specific implementation and it's not so trivial, > this version only support for x86. So the problem 1, known to > happen on MIPS/OCTEON, is not addressed now. > > To keep the modification impact low, this patch doesn't change > the logic basically if crash_kexec_post_notifiers is not specified. > > Please note that crash_kexec() can be called directly without > entering panic(). Stopping other cpus functionality is still > needed in crash_kexec(). > > Changes in V2: > - Replace smp_send_stop() call with crash_kexec version which > saves cpu states and does cleanups instead of changing execution > flow > - Drop a fix for Problem 1 > - Drop other patches because they aren't needed anymore > > V1: https://lkml.org/lkml/2015/7/10/316 > > --- > > Hidehiro Kawai (1): > panic/x86: Replace smp_send_stop() with crash_kexec version > > > arch/x86/kernel/crash.c | 16 +++++++++++----- > kernel/panic.c | 29 +++++++++++++++++++++++------ > 2 files changed, 34 insertions(+), 11 deletions(-) > > -- Hidehiro Kawai Hitachi, Ltd. Research & Development Group -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | ebiederm@xmission.com (Eric W. Biederman) |
|---|---|
| Date | 2015-08-03 18:40 +0200 |
| Subject | Re: [RFC V2 PATCH 0/1] kexec: crash_kexec_post_notifiers boot option related fixes |
| Message-ID | <pTqWm-7p-27@gated-at.bofh.it> |
| In reply to | #1198744 |
Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> writes: > Hello Eric and Vivek, > > Do you have any comments? crash_kexec_post_notifiers is a debugging hack to allow people to test if the kmsg_dump works better than kexec. crash_kexec_post_notifiers is not, nor has it ever been a solution for general operation (which is what I perceive this work trying to push). I will not support any work that expands crash_kexec_post_notifiers to be more than it currently is, because people want ``panic hooks'' to run before kexec. That appropach was extensively tested before kexec on panic was implemented in the kernel and every implementation failed. The practical symptom was that everything would work ok in testing but on failures in the real world there would be enough going on in the dying kernel that no crash dump would be taken. kexec on panic on the other hand works a reasonable fraction of the time. I deeply and fundamentally can not support a general purpose hook being called before kexec. In 15 years of practice I have never heard of a case where using a general purpose hook does anything but make kexec on panic undebuggable in practice. A specific hook for a very specific purpose when there is no other way we can consider. If you don't have something that generalises well into a general purpose operation that it makes sense for everyone to call you can always use the world's largest aka you can run code before the new kernel starts that is loaded with kexec_load. If you absolutely must run code in the dying code because you need lots of the kernel infrastructure to work, and it is too hard to code a small little bit of stand-alone assembly, I am sorry for you. Experience shows that will never work when the kernel fails in interesting ways. So no. I don't think there is any point to putting any more effort into the crash_kexec_post_notifiers path because experience has shown over the years that in practice it won't work for anyone, and if the code doesn't work in practice there is no point in developing or implementing it. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | 河合英宏 / KAWAI,HIDEHIRO <hidehiro.kawai.ez@hitachi.com> |
|---|---|
| Date | 2015-08-04 13:50 +0200 |
| Subject | RE: [RFC V2 PATCH 0/1] kexec: crash_kexec_post_notifiers boot option related fixes |
| Message-ID | <pTITf-10n-1@gated-at.bofh.it> |
| In reply to | #1199030 |
SGVsbG8sDQoNClRoYW5rcyBmb3IgdGhlIHJlcGx5Lg0KDQo+IEZyb206IEVyaWMgVy4gQmllZGVy bWFuIFttYWlsdG86ZWJpZWRlcm1AeG1pc3Npb24uY29tXQ0KWy4uLl0NCj4gQSBzcGVjaWZpYyBo b29rIGZvciBhIHZlcnkgc3BlY2lmaWMgcHVycG9zZSB3aGVuIHRoZXJlIGlzIG5vIG90aGVyIHdh eQ0KPiB3ZSBjYW4gY29uc2lkZXIuDQoNClNvLCBpcyBrbXNnX2R1bXAgbGlrZSBmZWF0dXJlIGFk bWlzc2libGU/DQoNCj4gSWYgeW91IGRvbid0IGhhdmUgc29tZXRoaW5nIHRoYXQgZ2VuZXJhbGlz ZXMgd2VsbCBpbnRvIGEgZ2VuZXJhbCBwdXJwb3NlDQo+IG9wZXJhdGlvbiB0aGF0IGl0IG1ha2Vz IHNlbnNlIGZvciBldmVyeW9uZSB0byBjYWxsIHlvdSBjYW4gYWx3YXlzIHVzZQ0KPiB0aGUgd29y bGQncyBsYXJnZXN0IGFrYSB5b3UgY2FuIHJ1biBjb2RlIGJlZm9yZSB0aGUgbmV3IGtlcm5lbCBz dGFydHMNCj4gdGhhdCBpcyBsb2FkZWQgd2l0aCBrZXhlY19sb2FkLg0KDQpPbmUgb2Ygb3VyIHB1 cnBvc2VzLCBub3RpZnlpbmcgIkknbSBkeWluZyIsIHdvdWxkIGJlIGFjaGlldmVkIGJ5IHB1cmdh dG9yeQ0KY29kZSBwcm92aWRlZCBieSBrZXhlYyBjb21tYW5kIGFzIEkgc3RhdGVkIGJlZm9yZS4g IFNpbmNlIHRoZSB3YXkgb2YgdGhlDQpub3RpZmljYXRpb24gd2lsbCBkaWZmZXIgZnJvbSBlYWNo IHZlbmRvciwgSSB0aGluayB3ZSBuZWVkIHRvIG1vZGlmeQ0KdGhlIHB1cmdhdG9yeSBjb2RlcyBw bHVnZ2FibGUuICBBbHNvLCBJIHRoaW5rIHdlIG5lZWQgc29tZSBwYXJhbWV0ZXINCnBhc3Npbmcg bWVjaGFuaXNtIHRvIHRoZSBwdXJnYXRvcnkgY29kZS4gIEZvciBleGFtcGxlLCBwYXNzaW5nIHRo ZSBwYW5pYw0KbWVzc2FnZSB2aWEgYm9vdCBwYXJhbWV0ZXIgdG8gc2F2ZSBpdCB0byBTRUwuICBB bHRob3VnaCBJJ20gbm90IHN1cmUNCndlIGNhbiBkbyB0aGF0IChJJ3ZlIG5vdCBpbnZlc3RpZ2F0 ZWQgd2VsbCB5ZXQpLiAgSXMgdGhhdCBhY2NlcHRhYmxlPw0KDQpSZWdhcmRzLA0KS2F3YWkNCg0K -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web