lkml.org 
[lkml]   [2017]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 3/3] kdump: Protect vmcoreinfo data under the crash memory
[snip]
> >> index 43cdb00..a29e9ad 100644
> >> --- a/kernel/crash_core.c
> >> +++ b/kernel/crash_core.c
> >> @@ -15,9 +15,12 @@
> >>
> >> /* vmcoreinfo stuff */
> >> static unsigned char *vmcoreinfo_data;
> >> -size_t vmcoreinfo_size;
> >> +static size_t vmcoreinfo_size;
> >> u32 *vmcoreinfo_note;
> >>
> >> +/* trusted vmcoreinfo, e.g. we can make a copy in the crash memory */
> > May make it clearer like:
> > /* Trusted vmcoreinfo copy in the kdump reserved memory */
>
> My thought is that it is in crash_core.c now which should be independent of kexec/kdump,
> so I used "e.g. ..." just like one use case.

Ok, then it is fine.

[snip]
> >> static int kimage_add_entry(struct kimage *image, kimage_entry_t entry)
> >> {
> >> if (*image->entry != 0)
> >> @@ -598,6 +632,11 @@ void kimage_free(struct kimage *image)
> >> if (image->file_mode)
> >> kimage_file_post_load_cleanup(image);
> >>
> >> + if (image->vmcoreinfo_data_copy) {
> >> + crash_update_vmcoreinfo_safecopy(NULL);
> >> + vunmap(image->vmcoreinfo_data_copy);
> >> + }
> >> +
> > Should move above chunk before the freeing of the actual page?
>
> It should be fine, because it is allocated from the reserved memory, it doesn't
> need to be freed. Anyway I can move it above to avoid confusion. Thanks!
>

Yes, it looks better, thanks for explanation.

Thanks
Dave

\
 
 \ /
  Last update: 2017-04-27 04:57    [W:0.045 / U:2.312 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site