]> git.baikalelectronics.ru Git - kernel.git/commit
bootconfig: Extend the magic check range to the preceding 3 bytes
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 12 Nov 2020 17:27:31 +0000 (02:27 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 13 Nov 2020 01:36:52 +0000 (20:36 -0500)
commitdf31fd59195d46c4d580b73744a565744720edcf
tree2e1a2a5174f4db385f491e143be0f6800a3c65c7
parent56cdf063d74f10259a9471f97ad715b644c48eea
bootconfig: Extend the magic check range to the preceding 3 bytes

Since Grub may align the size of initrd to 4 if user pass
initrd from cpio, we have to check the preceding 3 bytes as well.

Link: https://lkml.kernel.org/r/160520205132.303174.4876760192433315429.stgit@devnote2
Cc: stable@vger.kernel.org
Fixes: 9c8296336a00 ("bootconfig: Add bootconfig magic word for indicating bootconfig explicitly")
Reported-by: Chen Yu <yu.chen.surf@gmail.com>
Tested-by: Chen Yu <yu.chen.surf@gmail.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
init/main.c