Re: [PATCH] kexec: unmap reserved pages for each error-return way
From: Xunlei Pang
Date: Thu Jan 28 2016 - 06:57:15 EST
On 2016/01/28 at 18:32, Michael Holzheu wrote:
> On Wed, 27 Jan 2016 11:15:46 -0800
> Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>> On Wed, 27 Jan 2016 14:48:31 +0300 Dmitry Safonov <dsafonov@xxxxxxxxxxxxx> wrote:
>>> For allocation of kimage failure or kexec_prepare or load segments
>>> errors there is no need to keep crashkernel memory mapped.
>>> It will affect only s390 as map/unmap hook defined only for it.
>>> As on unmap s390 also changes os_info structure let's check return code
>>> and add info only on success.
>> This conflicts (both mechanically and somewhat conceptually) with
>> Xunlei Pang's "kexec: Introduce a protection mechanism for the
>> crashkernel reserved memory" and "kexec: provide
> Hmm, It looks to me that arch_kexec_(un)protect_crashkres() has exactly
> the same semantics as crash_(un)map_reserved_pages().
> On s390 we don't have the crashkernel memory mapped and therefore need
> crash_map_reserved_pages() before loading something into crashkernel
I don't know s390, just curious, if s390 doesn't have crash kernel memory mapped,
what's the purpose of the commit(558df7209e) for s390 as the reserved crash memory
with no kernel mapping already means the protection is on?
> Perhaps I missed something?
> kexec mailing list