aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorDavid Disseldorp <[email protected]>2022-05-10 01:29:19 +0000
committerakpm <[email protected]>2022-05-10 01:29:19 +0000
commitda028e4c4b0279eb49f80220d8f7cc62b4a57ccb (patch)
tree06cf79a0ecbd9692d475802a9db3fe245c48a28a /lib/string_helpers.c
parentproc: fix dentry/inode overinstantiating under /proc/${pid}/net (diff)
downloadkernel-da028e4c4b0279eb49f80220d8f7cc62b4a57ccb.tar.gz
kernel-da028e4c4b0279eb49f80220d8f7cc62b4a57ccb.zip
initramfs: refactor do_header() cpio magic checks
Patch series "initramfs: "crc" cpio format and INITRAMFS_PRESERVE_MTIME", v7. This patchset does some minor initramfs refactoring and allows cpio entry mtime preservation to be disabled via a new Kconfig INITRAMFS_PRESERVE_MTIME option. Patches 4/6 to 6/6 implement support for creation and extraction of "crc" cpio archives, which carry file data checksums. Basic tests for this functionality can be found at https://github.com/rapido-linux/rapido/pull/163 This patch (of 6): do_header() is called for each cpio entry and fails if the first six bytes don't match "newc" magic. The magic check includes a special case error message if POSIX.1 ASCII (cpio -H odc) magic is detected. This special case POSIX.1 check can be nested under the "newc" mismatch code path to avoid calling memcmp() twice in a non-error case. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: David Disseldorp <[email protected]> Reviewed-by: Martin Wilck <[email protected]> Acked-by: Christian Brauner <[email protected]> Cc: Al Viro <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions