lkml.org 
[lkml]   [2011]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v3 2/8] kdump: Make kimage_load_crash_segment() weak
On Fri, Aug 12, 2011 at 03:48:51PM +0200, Michael Holzheu wrote:
> From: Michael Holzheu <holzheu@linux.vnet.ibm.com>
>
> On s390 we do not create page tables at all for the crashkernel memory.
> This requires a s390 specific version for kimage_load_crash_segment().
> Therefore this patch declares this function as "__weak". The s390 version is
> very simple. It just copies the kexec segment to real memory without using
> page tables:
>
> int kimage_load_crash_segment(struct kimage *image,
> struct kexec_segment *segment)
> {
> return copy_from_user_real((void *) segment->mem, segment->buf,
> segment->bufsz);
> }
>
> There are two main advantages of not creating page tables for the
> crashkernel memory:
>
> a) It saves memory. We have scenarios in mind, where crashkernel
> memory can be very large and saving page table space is important.
> b) We protect the crashkernel memory from being overwritten.

Michael,

Thinking more about it. Can't we provide a arch specific version of
kmap() and kunmap() so that we create temporary mappings to copy
the pages and then these are torn off. That way you don't waste space
as well you don't have the risk of overwritting the loaded kernel.

Exporting the knowledge of generic kexec segments to arch code sounds
like little odd choice.

Thanks
Vivek


\
 
 \ /
  Last update: 2011-08-18 19:19    [W:0.313 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site