linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: paulmck@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, paulus@samba.org
Subject: Re: [RFC PATCH 2/5] powerpc: Exception hooks for context tracking subsystem
Date: Sun, 10 Feb 2013 15:10:13 +0100	[thread overview]
Message-ID: <CAFTL4hzfXfCGDjwjW=Frcs5+jS_i3U_JHytNOEhEF5X7_Fw6Sg@mail.gmail.com> (raw)
In-Reply-To: <1359714465-6297-3-git-send-email-zhong@linux.vnet.ibm.com>

2013/2/1 Li Zhong <zhong@linux.vnet.ibm.com>:
> This is the exception hooks for context tracking subsystem, including
> data access, program check, single step, instruction breakpoint, machine check,
> alignment, fp unavailable, altivec assist, unknown exception, whose handlers
> might use RCU.
>
> This patch corresponds to
> [PATCH] x86: Exception hooks for userspace RCU extended QS
>   commit 6ba3c97a38803883c2eee489505796cb0a727122
>
> Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>

Looks good!

I guess we should move exception_enter/exit definition to the generic
code. They should be the same for all archs after all. Also we are
relying on user_mode(regs) but this may be buggy with some corner
cases. For example if an exception happen after a call to user_exit()
(on syscall exit) but before we actually resume in userspace, the
exception will exit in kernel mode from the context tracking POV.

So instead on relying on the regs, which are not sync with the context
tracking state, we should use something like:

prev_state = exception_enter();
...
exception_exit(prev_state);

Also preempt_schedule_irq() is concerned as well by this problem. So I
should convert it to that scheme as well. I'm going to prepare some
patches.

Feel free to merge this patch in the powerpc tree, I'll do the
conversion along the way.

Thanks.

  reply	other threads:[~2013-02-10 14:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 10:27 [RFC PATCH 0/5] powerpc: Support context tracking for Power pSeries Li Zhong
2013-02-01 10:27 ` [RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem Li Zhong
2013-02-07  0:29   ` Frederic Weisbecker
2013-02-07  8:53     ` Li Zhong
2013-02-07 16:09       ` Frederic Weisbecker
2013-02-10 10:32   ` Frederic Weisbecker
2013-02-01 10:27 ` [RFC PATCH 2/5] powerpc: Exception " Li Zhong
2013-02-10 14:10   ` Frederic Weisbecker [this message]
2013-02-16  9:41     ` Li Zhong
2013-02-01 10:27 ` [RFC PATCH 3/5] powerpc: Exit user context on notify resume Li Zhong
2013-02-01 10:27 ` [RFC PATCH 4/5] powerpc: Use the new schedule_user API on userspace preemption Li Zhong
2013-02-01 10:27 ` [RFC PATCH 5/5] powerpc: select HAVE_CONTEXT_TRACKING for pSeries Li Zhong

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='CAFTL4hzfXfCGDjwjW=Frcs5+jS_i3U_JHytNOEhEF5X7_Fw6Sg@mail.gmail.com' \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=zhong@linux.vnet.ibm.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 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).