Re: [PATCH] ppc/fadump: collect dump if the collected size is lesser than reserved

Shivang Upadhyay <[email protected]>
Newsgroups gmane.linux.ports.ppc.embedded
Message-ID <4e7bd9342efa0cbdd162445a994f73c9ad473645.camel__6182.1950528369$1785308480$gmane$org@linux.ibm.com>
On Wed, 2026-07-29 at 11:58 +0530, Sourabh Jain wrote:
> > > 
> > Yes, I made it this way by reading the dump_bytes and source_len
> > relation. PAPR only says that dumped_bytes should not exceed the
> > source_len. My change reflects the same restriction in sw. Also
> > along
> > with this lengths check, we have firmware reported error flag also,
> > which should take care of overflow (Qemu handles it like this [1]).
> 
> But the firmware not copying the entire Real Mode memory is also a 
> problem for
> the kernel, isn't it?
> 

I think it should be fine. Firmware will report it status flags, right?
There are these valid flag values. 

Dump Error Flags (set by platform)
 Bit mask
 0x8000 = Invalid section data type
 0x4000 = Invalid source address
 0x2000 = Requested section length exceeds source
 0x1000 = Invalid partition destination address
 0x0800 = Partition memory destination too small

I think these should cover all our error cases.

~Shivang.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.