All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] [PATCH] arm/ipipe: Fix logical inversion in ret_from_exception
Date: Thu, 19 Feb 2015 15:40:07 +0100	[thread overview]
Message-ID: <20150219144007.GV30317@hermes.click-hack.org> (raw)
In-Reply-To: <54E5F3EE.6050406@siemens.com>

On Thu, Feb 19, 2015 at 03:32:14PM +0100, Jan Kiszka wrote:
> On return from exception, we want to check if the current context is
> root or head to take the fast exit in the latter case. TIP_HEAD is set
> then, thus we have to check for 'ne' (Z==0) after tst.
> 
> This affects only non-legacy users.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> This is for 3.14, but it should equally well apply to 3.16. Fixes both
> sigdebug test as well as the weird sshd deaths on the virtual vexpress
> target.
> 
>  arch/arm/kernel/entry-armv.S | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
> index a608340..f6ef839 100644
> --- a/arch/arm/kernel/entry-armv.S
> +++ b/arch/arm/kernel/entry-armv.S
> @@ -736,8 +736,8 @@ ENTRY(ret_from_exception)
>  	get_thread_info tsk
>  	ldr	r0, [tsk, #TI_IPIPE]
>  	tst	r0, #_TIP_HEAD
> - THUMB(	it eq)
> -	beq	__ipipe_ret_to_user_irqs_disabled  @ Fast exit path over non-root domains
> + THUMB(	it ne)
> +	bne	__ipipe_ret_to_user_irqs_disabled  @ Fast exit path
> over non-root domains

Mmm. Looks suspicious. The semantics of the PSR flags with tst is
contrary to to what one would believe. No, from compiling a small
example, it would seem you are right.

-- 
					    Gilles.


  reply	other threads:[~2015-02-19 14:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 17:52 [Xenomai] arm: Late delivery of pending Linux signals? Jan Kiszka
2015-02-18 17:55 ` Gilles Chanteperdrix
2015-02-18 18:12   ` Jan Kiszka
2015-02-18 18:13     ` Gilles Chanteperdrix
2015-02-18 18:21       ` Jan Kiszka
2015-02-18 18:23         ` Gilles Chanteperdrix
2015-02-18 18:26         ` Gilles Chanteperdrix
2015-02-18 18:46           ` Jan Kiszka
2015-02-18 18:49             ` Gilles Chanteperdrix
2015-02-18 19:00               ` Jan Kiszka
2015-02-18 19:05                 ` Gilles Chanteperdrix
2015-02-18 19:17                   ` Jan Kiszka
2015-02-18 19:27                     ` Gilles Chanteperdrix
2015-02-18 19:39                       ` Gilles Chanteperdrix
2015-02-18 20:49                       ` Jan Kiszka
2015-02-18 20:56                         ` Gilles Chanteperdrix
2015-02-18 21:00                         ` Gilles Chanteperdrix
2015-02-18 21:28                           ` Jan Kiszka
2015-02-19 14:32                             ` [Xenomai] [PATCH] arm/ipipe: Fix logical inversion in ret_from_exception Jan Kiszka
2015-02-19 14:40                               ` Gilles Chanteperdrix [this message]
2015-02-19 14:43                                 ` Jan Kiszka
2015-02-19 14:46                                   ` Gilles Chanteperdrix
2015-02-19 15:13                         ` [Xenomai] arm: Late delivery of pending Linux signals? Lennart Sorensen
2015-02-19 15:16                           ` Lennart Sorensen
2015-02-19 17:13                           ` Philippe Gerum
2015-02-19 17:25                             ` Lennart Sorensen

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=20150219144007.GV30317@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@xenomai.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.