Re: Backport 44623b2818f4a442726639572f44fd9b6d0ef68c to kernel 5.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jian,

On Thu, Oct 29, 2020 at 06:13:07PM -0700, 'Jian Cai' via Clang Built Linux wrote:
> Thanks @Nick Desaulniers <ndesaulniers@xxxxxxxxxx>  and @Sasha Levin
> <sashal@xxxxxxxxxx> for the tips. For this particular change, it seems we
> do not need to backport all the dependencies (if they have not been merged
> into 5.4 stable). @Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, please find the
> custom backport as below. It has passed all the tests on ChromeOS (
> http://crrev.com/c/2504570).
> 
> Thanks,
> Jian

The below patch won't apply because it appears to be copy pasted into
this message:

Applying: Backport 44623b2818f4a442726639572f44fd9b6d0ef68c to kernel 5.4
error: git diff header lacks filename information when removing 1 leading pathname component (line 6)
Patch failed at 0001 Backport 44623b2818f4a442726639572f44fd9b6d0ef68c to kernel 5.4
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

I would recommend resending the patch with git send-email or attaching
the patch file created by 'git format-patch -1' to a future email for
proper application.

> From 60891062750a39d8bba9710d500e381a26c11f75 Mon Sep 17 00:00:00 2001
> From: Jian Cai <jiancai@xxxxxxxxxx>
> Date: Thu, 29 Oct 2020 17:49:39 -0700

Authorship and date should be fixed to retain the information of the
original commit.

It is trivial to just redo the cherry-pick to fix that information in
this instance but this is the command I usually run for more non-trivial
backports that I have already done:

$ git commit -s --amend -C <sha> --date "$(git show -s --format=%ai <sha>)"

This should allow you to retain the commit message of the original
message along with the author's date.

> Subject: [PATCH] crypto: x86/crc32c - fix building with clang ias
> 
> commit 44623b2818f4a442726639572f44fd9b6d0ef68c upstream
> 
> The clang integrated assembler complains about movzxw:
> 
> arch/x86/crypto/crc32c-pcl-intel-asm_64.S:173:2: error: invalid instruction
> mnemonic 'movzxw'
> 
> It seems that movzwq is the mnemonic that it expects instead,
> and this is what objdump prints when disassembling the file.
> 
> NOTE: this is a custom backport as the surrounding code has been
> changed upstream.

A note of this nature is traditionally placed after the signoffs of the
original patch like my example below:

> Fixes: 6a8ce1ef3940 ("crypto: crc32c - Optimize CRC32C calculation with
> PCLMULQDQ instruction")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> Reviewed-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
[jc: Backport to 5.4]
> Signed-off-by: Jian Cai <caij2003@xxxxxxxxx>

I usually like to notate why the patch did not apply cleanly so that it
is easier for others to audit, such as:

[jc: Fixed conflicts due to lack of 34fdce6981b969]

That is merely a suggestion, not required by any means.

Otherwise, the backport seems obvious fine to me.

Cheers,
Nathan

> ---
>  arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
> b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
> index d9b734d0c8cc..3c6e01520a97 100644
> --- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
> +++ b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
> @@ -170,7 +170,7 @@ continue_block:
> 
>   ## branch into array
>   lea jump_table(%rip), bufp
> - movzxw  (bufp, %rax, 2), len
> + movzwq  (bufp, %rax, 2), len
>   lea crc_array(%rip), bufp
>   lea     (bufp, len, 1), bufp
>   JMP_NOSPEC bufp
> -- 
> 2.29.1.341.ge80a0c044ae-goog



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux