On Tue, Jan 07, 2020 at 10:25:16AM -0800, Kees Cook wrote:
From: Aleksandr Yashkin <a.yashkin@xxxxxxxxxxxxxxxxxx> [ Upstream commit 9e5f1c19800b808a37fb9815a26d382132c26c3d ] The ram_core.c routines treat przs as circular buffers. When writing a new crash dump, the old buffer needs to be cleared so that the new dump doesn't end up in the wrong place (i.e. at the end). The solution to this problem is to reset the circular buffer state before writing a new Oops dump. Signed-off-by: Aleksandr Yashkin <a.yashkin@xxxxxxxxxxxxxxxxxx> Signed-off-by: Nikolay Merinov <n.merinov@xxxxxxxxxxxxxxxxxx> Signed-off-by: Ariel Gilman <a.gilman@xxxxxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20191223133816.28155-1-n.merinov@xxxxxxxxxxxxxxxxxx Fixes: 896fc1f0c4c6 ("pstore/ram: Switch to persistent_ram routines") [kees: backport to v4.9] Link: https://lore.kernel.org/stable/157831399811194@xxxxxxxxx Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
Thanks Kees, I've queued both this and the 4.4 patch up. -- Thanks, Sasha