[PATCH] makedumpfile: clear mem_map if not in pt_loads

2020-04-12 Thread Pingfan Liu
The crashed kernel passes usable RAM info through pt_loads[], but the current code ignore this, and parse all sections below info->max_mapnr. Refer to code in get_mm_sparsemem() num_section = divideup(info->max_mapnr, PAGES_PER_SECTION()); These ranges can include unwanted memory e.g.

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-12 Thread Baoquan He
On 04/12/20 at 02:52pm, Eric W. Biederman wrote: > > The only benefit of kexec_file_load is that it is simple enough from a > kernel perspective that signatures can be checked. We don't have this restriction any more with below commit: commit 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-12 Thread Bhupesh SHARMA
On Mon, Apr 13, 2020 at 1:26 AM Eric W. Biederman wrote: > > > The only benefit of kexec_file_load is that it is simple enough from a > kernel perspective that signatures can be checked. > > kexec_load in every other respect is the more capable and functional > interface. It makes no sense to

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-12 Thread Eric W. Biederman
The only benefit of kexec_file_load is that it is simple enough from a kernel perspective that signatures can be checked. kexec_load in every other respect is the more capable and functional interface. It makes no sense to get rid of it. It does make sense to reload with a loaded kernel on

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-12 Thread Russell King - ARM Linux admin
On Sun, Apr 12, 2020 at 01:35:07PM +0800, Baoquan He wrote: > On 04/11/20 at 10:30am, Russell King - ARM Linux admin wrote: > > On Sat, Apr 11, 2020 at 11:44:14AM +0800, Baoquan He wrote: > > > Because We tend to use kexec_file_load more and improve/enhance it in the > > > future, and gradually