support pmsg record size larger than kmalloc limitation

From: Yuxiao Zhang
Date: Mon Jun 26 2023 - 21:20:51 EST


Hi pstore maintainers,

Recently we are trying to use pmsg ramoops to store relatively large
file. We found that even with enough space configured with pmsg-size,
it still failed because of kmalloc limitation.

We are thinking of using kvmalloc instead of kmalloc for ramoops pmsg
record buffer. It seems ok to us that the memory is not physically
contiguous. We want to consult with you whether it is safe to do so.

Below is the patch file, note that the change only touches the pmsg
ram path, we don't touch other paths like pstore zone. It is not yet a
solution for all the use case in pstore, just an idea of how we want
to address the issue. We test this on 5.15 and large file works fine.

-----------------------------------