The patch titled Subject: checkpatch: only encode UTF-8 quoted printable mail headers has been added to the -mm tree. Its filename is checkpatch-warn-if-missing-author-signed-off-by-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-warn-if-missing-author-signed-off-by-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-warn-if-missing-author-signed-off-by-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Subject: checkpatch: only encode UTF-8 quoted printable mail headers As PERL uses its own internal character encoding, always calling encode("utf8", ...) on the author name may cause corruption, leading to an author signoff mismatch. This happens in the following cases: - If a patch is in ISO-8859, and contains a non-ASCII author name in the From: line, it is converted to UTF-8, while the Signed-off-by line will still be in ISO-8859. - If a patch is in UTF-8, and contains a non-ASCII author name in the body (not header) From: line, it is assumed to be encoded in PERL's internal character encoding, and converted to UTF-8 incorrectly, while the Signed-off-by line will be in real UTF-8. Fix this by only doing the encode step if the From: line used UTF-8 quoted printable encoding. Link: http://lkml.kernel.org/r/20180718145254.4770-1-geert+renesas@xxxxxxxxx Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Reported-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN scripts/checkpatch.pl~checkpatch-warn-if-missing-author-signed-off-by-fix scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-warn-if-missing-author-signed-off-by-fix +++ a/scripts/checkpatch.pl @@ -2523,7 +2523,8 @@ sub process { # Check the patch for a From: if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) { - $author = encode("utf8", $1); + $author = $1; + $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i); $author =~ s/"//g; } _ Patches currently in -mm which might be from geert+renesas@xxxxxxxxx are checkpatch-update-section-keywords.patch checkpatch-warn-if-missing-author-signed-off-by.patch checkpatch-warn-if-missing-author-signed-off-by-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html