linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] arm64: enable context tracking
Date: Thu, 8 May 2014 11:25:14 +0100	[thread overview]
Message-ID: <20140508102514.GA6942@arm.com> (raw)
In-Reply-To: <7hr445w3nz.fsf@paris.lan>

On Thu, May 08, 2014 at 12:49:04AM +0100, Kevin Hilman wrote:
> Hi Will,

Hello Kevin,

> Will Deacon <will.deacon@arm.com> writes:
> > On Wed, May 07, 2014 at 12:32:29AM +0100, Larry Bassel wrote:
> >> Make calls to ct_user_enter when the kernel is exited
> >> and ct_user_exit when the kernel is entered (in el0_da,
> >> el0_ia, el0_svc, el0_irq).
> >
> > Why only these entry points? I can reschedule after any exception from EL0,
> > so I'd expect all exceptions from userspace to need annotating, no?
> 
> In my initial approach to this, you might recall (though it was over a
> year ago now) was to just instrument kernel_enter rather than sprinkle
> the instrumentaion in cl0_*.  However, your concern at the time was that
> since it was before debugging was enabled it would complicate debugging
> these paths.
> 
> Any chance you have any other suggestion on how we might do this in
> kernel_entry rather than sprinkling them all over cl0_*?  or is the
> sprinkling the only good way to handle this.

Unfortunately, different exceptions do subtly different things before
invoking the main handler. For example:

 - Stashing the far
 - Enabling IRQs
 - Enabling debug
 - All the stuff on the syscall path

so putting the logic in kernel_entry isn't really do-able, unfortunately.

Will

      reply	other threads:[~2014-05-08 10:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 23:32 [PATCH v2 0/2] context tracker support for arm64 Larry Bassel
2014-05-06 23:32 ` [PATCH v2 1/2] arm64: adjust el0_sync so that a function can be called Larry Bassel
2014-05-06 23:32 ` [PATCH v2 2/2] arm64: enable context tracking Larry Bassel
2014-05-07 10:17   ` Will Deacon
2014-05-07 21:35     ` Larry Bassel
2014-05-07 23:49     ` Kevin Hilman
2014-05-08 10:25       ` Will Deacon [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=20140508102514.GA6942@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).