On 03/03/23 at 02:27am, lizhijian@xxxxxxxxxxx wrote: > > > On 01/03/2023 16:17, Baoquan He wrote: > > On 03/01/23 at 06:27am, lizhijian@xxxxxxxxxxx wrote: > > ...... > >> Hi Baoquan > >> > >> Greatly appreciate your feedback. > >> > >> > >>> 1) In kernel side, export info of pmem meta data; > >>> 2) in makedumpfile size, add an option to specify if we want to dump > >>> pmem meta data; An option or in dump level? > >> > >> Yes, I'm working on these 2 step. > >> > >>> 3) In glue script, detect and warn if pmem data is in pmem and wanted, > >>> and dump target is the same pmem. > >>> > >> > >> The 'glue script' means the scirpt like '/usr/bin/kdump.sh' in 2nd kernel? That would be an option, > >> Shall we abort this dump if "pmem data is in pmem and wanted, and dump target is the same pmem" ? > > > > Guess you are saying scripts in RHEL/centos/fedora, and yes if I guess > > righ. Other distros could have different scripts. For kdump, we need > > load kdump kernel/initramfs in advance, then wait to capture any crash. > > When we load, we can detect and check whether the environment and > > setup is expected. If not, we can warn or error out message to users. > > > IIUC, take fedora for example, > T1: in 1st kernel, kdump.service(/usr/bin/kdumpctl) will do a sanity check before loading kernel and initramfs. > In this moment, as you said "we can detect and check whether the environment and setup is expected. If not, > we can warn or error out message to users." > I think we should abort the kdump service if "pmem data is in pmem and wanted, and dump target is the same pmem". > For OS administrators, they could either change the dump target or disable the pmem metadadata dump to make > kdump.service work again. > > But kdump.service is distros independent, some OS administrators will use `kexec` command directly instead of service/script helpers. Yeah, we can add document in kernel or somewhere else that dumping to pmem is dangerous, especially when we want to dump pmem meta. People who dare use kexec command directly, should handle it by her/his own. > > > We don't need to do the checking until crash is triggered, then decide > > to abort the dump or not. > > T2: in 2nd kernel, since 1st kernel's glue scripts vary by distribution, we have to do the sanity check again to decide > to abort the dump or not. Hmm, we may not need to worry about that. kernel just need to do its own business, not touching pmem data during kdump jumping and booting, and provide way to allow makedumpfile to read out pmem meta. Anything else should be taken care of by user or distros. _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec