From: Hari Bathini <hbathini@linux.vnet.ibm.com>
To: Petr Tesarik <ptesarik@suse.cz>, Hari Bathini <hbathini@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev <linuxppc-dev@ozlabs.org>,
Dave Young <dyoung@redhat.com>,
Mahesh J Salgaonkar <mahesh@linux.ibm.com>
Subject: Re: [PATCH] powerpc/fadump: re-register firmware-assisted dump if already registered
Date: Fri, 14 Sep 2018 21:08:46 +0530 [thread overview]
Message-ID: <299e24c7-28a1-9e82-4c9f-e830766b0573@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180914162822.6b489d57@ezekiel.suse.cz>
On Friday 14 September 2018 07:58 PM, Petr Tesarik wrote:
> On Fri, 14 Sep 2018 19:36:02 +0530
> Hari Bathini <hbathini@linux.ibm.com> wrote:
>
>> Firmware-Assisted Dump (FADump) needs to be registered again after any
>> memory hot add/remove operation to update the crash memory ranges. But
>> currently, the kernel returns '-EEXIST' if we try to register without
>> uregistering it first. This could expose the system to racing issues
>> while unregistering and registering FADump from userspace during udev
>> events. Spare the userspace of this and let it be taken care of in the
>> kernel space for a simpler interface.
>>
>> Since this change, running 'echo 1 > /sys/kernel/fadump_registered'
>> would result in re-regisering (unregistering and registering) FADump,
>> if it was already registered.
> Great improvement to the API!
>
> Any suggestions what should be done in a client which tries to be
> compatible with kernels before this change and after this change?
If `echo 1 > /sys/kernel/fadump_registered` fails, check for the output
of `cat /sys/kernel/fadump_registered` and if it is still `1`, that
indicates
old kernel and we are already registered. Treat it as success if being
registered is what we care about or unregister/register (if re-register
is the intention)..
Hope that helps..
Thanks
Hari
next prev parent reply other threads:[~2018-09-14 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 14:06 [PATCH] powerpc/fadump: re-register firmware-assisted dump if already registered Hari Bathini
2018-09-14 14:28 ` Petr Tesarik
2018-09-14 15:38 ` Hari Bathini [this message]
2018-09-18 16:46 ` Mahesh Jagannath Salgaonkar
2018-09-20 4:21 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=299e24c7-28a1-9e82-4c9f-e830766b0573@linux.vnet.ibm.com \
--to=hbathini@linux.vnet.ibm.com \
--cc=dyoung@redhat.com \
--cc=hbathini@linux.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=ptesarik@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).