Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kexec_file: allow skipping checksum calculation for some segments
Add skip_checksum member to struct kexec_buf to specify whether the corresponding segment should be part of the checksum calculation. The next patch will add a way to update segments after a kimage is loaded. Segments that will be updated in this way should not be checksummed, otherwise they will cause the purgatory checksum verification to fail when the machine is rebooted. As a bonus, we don't need to special-case the purgatory segment anymore to avoid checksumming it. Places using struct kexec_buf get false as the default value for skip_checksum since they all use designated initializers. Therefore, there is no behavior change with this patch and all segments except the purgatory are checksummed. Link: http://lkml.kernel.org/r/1472149111-30598-4-git-send-email-bauerman@linux.vnet.ibm.com Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Dave Young <dyoung@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Baoquan He <bhe@redhat.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Stewart Smith <stewart@linux.vnet.ibm.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Eric Richter <erichte@linux.vnet.ibm.com> Cc: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
- Loading branch information