stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: Jian Cai <jiancai@google.com>
Cc: Sasha Levin <sashal@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	"# 3.4.x" <stable@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Manoj Gupta <manojgupta@google.com>,
	Luis Lozano <llozano@google.com>, Arnd Bergmann <arnd@arndb.de>,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: Backport 44623b2818f4a442726639572f44fd9b6d0ef68c to kernel 5.4
Date: Thu, 29 Oct 2020 18:49:30 -0700	[thread overview]
Message-ID: <20201030014930.GB2519055@ubuntu-m3-large-x86> (raw)
In-Reply-To: <CA+SOCLJqVjy9QRssE9AZ1nQBwZB5mAcanpVTVOd4kO3=r5jrfA@mail.gmail.com>

Hi Jian,

On Thu, Oct 29, 2020 at 06:13:07PM -0700, 'Jian Cai' via Clang Built Linux wrote:
> Thanks @Nick Desaulniers <ndesaulniers@google.com>  and @Sasha Levin
> <sashal@kernel.org> 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@linuxfoundation.org>, 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@google.com>
> 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@arndb.de>
> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[jc: Backport to 5.4]
> Signed-off-by: Jian Cai <caij2003@gmail.com>

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

  parent reply	other threads:[~2020-10-30  1:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CA+SOCLLXnxcf=bTazCT1amY7B4_37HTEXL2OwHowVGCb8SLSQQ@mail.gmail.com>
2020-10-29 11:01 ` Backport 44623b2818f4a442726639572f44fd9b6d0ef68c to kernel 5.4 Greg KH
2020-10-29 18:05   ` Nick Desaulniers
2020-10-29 23:36     ` Sasha Levin
2020-10-29 23:45       ` Nick Desaulniers
2020-10-30  0:41         ` Sasha Levin
     [not found]           ` <CA+SOCLJqVjy9QRssE9AZ1nQBwZB5mAcanpVTVOd4kO3=r5jrfA@mail.gmail.com>
2020-10-30  1:49             ` Nathan Chancellor [this message]
     [not found]               ` <CA+SOCL+b_qvvEHFz5g416Kdfzy3nZQnizow9-C9k1pw=ZeoKJA@mail.gmail.com>
2020-10-30 19:30                 ` Nick Desaulniers
     [not found] ` <20201030190245.92967-1-jiancai@google.com>
2020-10-30 19:06   ` [PATCH] crypto: x86/crc32c - fix building with clang ias Nick Desaulniers
2020-10-31 10:30     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030014930.GB2519055@ubuntu-m3-large-x86 \
    --to=natechancellor@gmail.com \
    --cc=arnd@arndb.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jiancai@google.com \
    --cc=llozano@google.com \
    --cc=manojgupta@google.com \
    --cc=ndesaulniers@google.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).