All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Breno Leitao <leitao@debian.org>, linuxppc-dev@lists.ozlabs.org
Cc: Breno Leitao <leitao@debian.org>,
	mikey@neuling.org, stable@vger.kernel.org,
	gromero@linux.vnet.ibm.com
Subject: Re: selftests/powerpc: Fix ptrace tm failure
Date: Wed, 31 Oct 2018 16:42:59 +1100 (AEDT)	[thread overview]
Message-ID: <42lHLC6tWXz9sMM@ozlabs.org> (raw)
In-Reply-To: <1540242986-7510-1-git-send-email-leitao@debian.org>

On Mon, 2018-10-22 at 21:16:26 UTC, Breno Leitao wrote:
> Test ptrace-tm-spd-gpr fails on current kernel (4.19) due to a segmentation
> fault that happens on the child process prior to setting cptr[2] = 1. This
> causes the parent process to wait forever at 'while (!pptr[2])' and the test to
> be killed by the test harness framework by timeout, thus, failing.
> 
> The segmentation fault happens because of a inline assembly being
> generated as:
> 
> 	0x10000355c <tm_spd_gpr+492>    lfs    f0, 0(0)
> 
> This is reading memory position 0x0 and causing the segmentation fault.
> 
> This code is being generated by ASM_LOAD_FPR_SINGLE_PRECISION(flt_4), where
> flt_4 is passed to the inline assembly block as:
> 
> 	[flt_4] "r" (&d)
> 
> Since the inline assembly 'r' constraint means any GPR, gpr0 is being
> chosen, thus causing this issue when issuing a Load Floating-Point Single
> instruction.
> 
> This patch simply changes the constraint to 'b', which specify that this
> register will be used as base, and r0 is not allowed to be used, avoiding
> this issue.
> 
> Other than that, removing flt_2 register from the input operands, since it
> is not used by the inline assembly code at all.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Breno Leitao <leitao@debian.org>
> Acked-by: Segher Boessenkool <segher@kernel.crashing.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/48dc0ef19044bfb69193302fbe3a83

cheers

      parent reply	other threads:[~2018-10-31  5:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 21:16 [PATCH] selftests/powerpc: Fix ptrace tm failure Breno Leitao
2018-10-22 21:16 ` Breno Leitao
2018-10-23 17:00 ` Segher Boessenkool
2018-10-23 17:00   ` Segher Boessenkool
2018-10-31  5:42 ` Michael Ellerman [this message]

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=42lHLC6tWXz9sMM@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=gromero@linux.vnet.ibm.com \
    --cc=leitao@debian.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.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 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.