Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1233999

Re: [PATCH] kexec: fix out of the ELF headers buffer issue in syscall kexec_file_load()

From Baoquan He <bhe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] kexec: fix out of the ELF headers buffer issue in syscall kexec_file_load()
Date 2015-09-28 12:00 +0200
Message-ID <qdDnY-28T-13@gated-at.bofh.it> (permalink)
References <qdAq6-6nd-5@gated-at.bofh.it> <qdBFv-8kb-13@gated-at.bofh.it> <qdDej-1XB-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/28/15 at 05:39pm, joeyli wrote:
> On Mon, Sep 28, 2015 at 04:07:57PM +0800, Baoquan He wrote:
> > On 09/28/15 at 02:41pm, Lee, Chun-Yi wrote:
> > > This issue was hided on small machine that doesn't have too many CPU because
> > > the free space of ELF headers buffer can cover the number of small memory
> > > regions. But, when the machine has more CPUs or the number of memory regions
> > > very nearly to consume whole page aligned buffer, e.g. 4096, 8192... Then
> > > issue will happen randomly.
> > 
> > CC akpm too.
> > 
> > Read code again and I think it makes sense to use walk_system_ram_res.
> > And in prepare_elf64_headers it also uses walk_system_ram_res. That's
> > why you can find this bug. Otherwise we never find this and those small
> > regions which only spread in one page will be lost in vmcore.
> > 
> > Besides could you please rearrange your patch log? It's not easy to get
> > what this patch have done.
> >
> 
> To avoid confusing, I will simplify the patch description.
> Removing things about CPU number but keep the difference between
> walk_system_ram_res and walk_system_ram_range.

Yeah, that is good. You can simply mention why it's not found before but
happened now because of many CPUs. The root cause that small regions
residing inside one page are ignored by walk_system_ram_range() need be
focused.

Thanks for your effort!

Baoquan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] kexec: fix out of the ELF headers buffer issue in syscall kexec_file_load() "Lee, Chun-Yi" <joeyli.kernel@gmail.com> - 2015-09-28 08:50 +0200
  Re: [PATCH] kexec: fix out of the ELF headers buffer issue in  syscall kexec_file_load() Baoquan He <bhe@redhat.com> - 2015-09-28 09:20 +0200
    Re: [PATCH] kexec: fix out of the ELF headers buffer issue in  syscall kexec_file_load() joeyli <jlee@suse.com> - 2015-09-28 11:40 +0200
  Re: [PATCH] kexec: fix out of the ELF headers buffer issue in  syscall kexec_file_load() Baoquan He <bhe@redhat.com> - 2015-09-28 10:10 +0200
    Re: [PATCH] kexec: fix out of the ELF headers buffer issue in  syscall kexec_file_load() joeyli <jlee@suse.com> - 2015-09-28 11:50 +0200
      Re: [PATCH] kexec: fix out of the ELF headers buffer issue in  syscall kexec_file_load() Baoquan He <bhe@redhat.com> - 2015-09-28 12:00 +0200
  Re: [PATCH] kexec: fix out of the ELF headers buffer issue in  syscall kexec_file_load() Minfei Huang <mhuang@redhat.com> - 2015-09-29 06:00 +0200
    Re: [PATCH] kexec: fix out of the ELF headers buffer issue in  syscall kexec_file_load() joeyli <jlee@suse.com> - 2015-09-29 11:00 +0200

csiph-web