All of lore.kernel.org
 help / color / mirror / Atom feed
From: Youquan Song <youquan.song@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Youquan Song <youquan.song@linux.intel.com>,
	Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Zhiquan Li <zhiquan1.li@intel.com>,
	Youquan Song <youquan.song@intel.com>
Subject: Re: [PATCH] x86/uaccess: restore get_user exception type to EX_TYPE_UACCESS
Date: Fri, 1 Apr 2022 20:45:19 +0800	[thread overview]
Message-ID: <20220401124519.GA6935@linux-youquan.bj.intel.com> (raw)
In-Reply-To: <20220331175113.GV8939@worktop.programming.kicks-ass.net>

On Thu, Mar 31, 2022 at 07:51:13PM +0200, Peter Zijlstra wrote:
> On Thu, Mar 31, 2022 at 07:31:25PM +0800, Youquan Song wrote:
> > > Did you do your testing on RHEL or something daft like that?
> > Tested on RHEL8.x
> 
> Right; the home of obsolete software.. :-)
> 
> > > Something like the below can also work, I suppose. But please, add
> > > coherent comments to the extable code with useful references to the MCE
> > > code that does this abuse.
> > Here is the full fix patch depending on your suggestion. Thanks a lot!
> 
> Did you verify this was indeed the only UACCESS I lost?

The full fix patch has included a change in error_context to identify
this case to be MCE_IN_KERNEL_COPYIN. I verfied it fix the issue.
In addition, LTP was run and no issues were reported.

@@ -286,6 +286,7 @@ static noinstr int error_context(struct mce *m, struct pt_regs *regs)
 	switch (fixup_type) {
 	case EX_TYPE_UACCESS:
 	case EX_TYPE_COPY:
+	case EX_TYPE_UA_IMM_REG:
 		if (!copy_user)
 			return IN_KERNEL;
 		m->kflags |= MCE_IN_KERNEL_COPYIN;

-Youquan

  reply	other threads:[~2022-04-01 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 20:17 [PATCH] x86/uaccess: restore get_user exception type to EX_TYPE_UACCESS Tony Luck
2022-03-30 12:32 ` Peter Zijlstra
2022-03-31 11:31   ` Youquan Song
2022-03-31 17:51     ` Peter Zijlstra
2022-04-01 12:45       ` Youquan Song [this message]
2022-04-01 17:01         ` Peter Zijlstra

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=20220401124519.GA6935@linux-youquan.bj.intel.com \
    --to=youquan.song@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=youquan.song@intel.com \
    --cc=zhiquan1.li@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.