All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tony Luck <tony.luck@intel.com>
Cc: Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	patches@lists.linux.dev, Youquan Song <youquan.song@intel.com>
Subject: Re: [PATCH] x86/mce: Reduce number of machine checks taken during recovery
Date: Sat, 18 Dec 2021 01:53:22 +0100	[thread overview]
Message-ID: <20211218005322.GM16608@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20211215222016.1390235-1-tony.luck@intel.com>

On Wed, Dec 15, 2021 at 02:20:16PM -0800, Tony Luck wrote:
> ---
>  arch/x86/lib/copy_user_64.S | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S
> index 2797e630b9b1..8c53be99faa0 100644
> --- a/arch/x86/lib/copy_user_64.S
> +++ b/arch/x86/lib/copy_user_64.S
> @@ -233,12 +233,19 @@ EXPORT_SYMBOL(copy_user_enhanced_fast_string)
>   * eax uncopied bytes or 0 if successful.
>   */
>  SYM_CODE_START_LOCAL(.Lcopy_user_handle_tail)
> +	cmp $X86_TRAP_MC,%eax
> +	je 3f
>  	movl %edx,%ecx
>  1:	rep movsb
>  2:	mov %ecx,%eax
>  	ASM_CLAC
>  	ret
>  
> +3:
> +	movl %edx,%eax
> +	ASM_CLAC
> +	ret
> +
>  	_ASM_EXTABLE_CPY(1b, 2b)
>  SYM_CODE_END(.Lcopy_user_handle_tail)

This patch no longer applies; however, you forgot to change the comment
on top about the calling convention, because now the function expects
rax to contain the trap number.

It's also not obvious from the massive rambling on top that all
callsites were audited to make sure this is in fact true (it appears
so).


  reply	other threads:[~2021-12-18  0:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 22:20 [PATCH] x86/mce: Reduce number of machine checks taken during recovery Tony Luck
2021-12-18  0:53 ` Peter Zijlstra [this message]
2021-12-23 20:07   ` [PATCH v2] " Luck, Tony
2021-12-24 11:50     ` Peter Zijlstra
2021-12-27 10:52       ` Borislav Petkov
2021-12-31 17:34     ` [tip: ras/core] " tip-bot2 for Youquan Song

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=20211218005322.GM16608@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=youquan.song@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.