Appending firmware/hardware dump to vmcore during kernel panic

From: Rahul Lakkireddy
Date: Tue Feb 20 2018 - 05:56:56 EST


Hi all,

We have a requirement to collect firmware/hardware state of the
underlying NIC during kernel panic. We are doing this in cxgb4
driver, using panic notifier list [1]. cxgb4 registers a callback
function to the panic notifier list, which gets invoked during kernel
panic. In the callback function, firmware/hardware dump is collected
into pre-allocated buffer and then extracted later from the vmcore,
for post-analysis.

Is this approach of using panic notifier correct? Any suggestions are
much appreciated.

Thanks,
Rahul

[1] https://patchwork.ozlabs.org/patch/873830/