Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1631833
| From | Dave Young <dyoung@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 3/3] kdump: Protect vmcoreinfo data under the crash memory |
| Date | 2017-04-27 05:00 +0200 |
| Message-ID | <tAHOV-2IP-1@gated-at.bofh.it> (permalink) |
| References | <tyiKZ-8qv-1@gated-at.bofh.it> <tyiL0-8qv-17@gated-at.bofh.it> <tApoZ-7rG-11@gated-at.bofh.it> <tArKa-tv-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v4 3/3] kdump: Protect vmcoreinfo data under the crash memory Dave Young <dyoung@redhat.com> - 2017-04-26 09:20 +0200
Re: [PATCH v4 3/3] kdump: Protect vmcoreinfo data under the crash memory Xunlei Pang <xpang@redhat.com> - 2017-04-26 11:50 +0200
Re: [PATCH v4 3/3] kdump: Protect vmcoreinfo data under the crash memory Dave Young <dyoung@redhat.com> - 2017-04-27 05:00 +0200
csiph-web