<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/context_tracking.c, branch v4.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-03-09T14:43:00Z</updated>
<entry>
<title>context_tracking: Export context_tracking_user_enter/exit</title>
<updated>2015-03-09T14:43:00Z</updated>
<author>
<name>Rik van Riel</name>
<email>riel@redhat.com</email>
</author>
<published>2015-02-10T20:27:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=efc1e2c9bcbab73797d7bc214014cb916d6a8eb5'/>
<id>urn:sha1:efc1e2c9bcbab73797d7bc214014cb916d6a8eb5</id>
<content type='text'>
Export context_tracking_user_enter/exit so it can be used by KVM.

Reviewed-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Will deacon &lt;will.deacon@arm.com&gt;
Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>context_tracking: Run vtime_user_enter/exit only when state == CONTEXT_USER</title>
<updated>2015-03-09T14:42:57Z</updated>
<author>
<name>Rik van Riel</name>
<email>riel@redhat.com</email>
</author>
<published>2015-02-10T20:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19fdd98b6253404c6bdd6927bde9f962729376f7'/>
<id>urn:sha1:19fdd98b6253404c6bdd6927bde9f962729376f7</id>
<content type='text'>
Only run vtime_user_enter, vtime_user_exit, and the user enter &amp; exit
trace points when we are entering or exiting user state, respectively.

The KVM code in guest_enter and guest_exit already take care of calling
vtime_guest_enter and vtime_guest_exit, respectively.

The RCU code only distinguishes between "idle" and "not idle or kernel".
There should be no need to add an additional (unused) state there.

Reviewed-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Will deacon &lt;will.deacon@arm.com&gt;
Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>context_tracking: Generalize context tracking APIs to support user and guest</title>
<updated>2015-03-09T14:42:52Z</updated>
<author>
<name>Rik van Riel</name>
<email>riel@redhat.com</email>
</author>
<published>2015-02-10T20:27:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3aab4f50bff89bdea5066a05d4f3c5fa25bc37c7'/>
<id>urn:sha1:3aab4f50bff89bdea5066a05d4f3c5fa25bc37c7</id>
<content type='text'>
Generalize the context tracking APIs to support various nature of
contexts. This is performed by splitting out the mechanism from
context_tracking_user_enter and context_tracking_user_exit into
context_tracking_enter and context_tracking_exit.

The nature of the context we track is now detailed in a ctx_state
parameter pushed to these APIs, allowing the same functions to not just
track kernel &lt;&gt; user space switching, but also kernel &lt;&gt; guest transitions.

But leave the old functions in order to avoid breaking ARM, which calls
these functions from assembler code, and cannot easily use C enum
parameters.

Reviewed-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Will deacon &lt;will.deacon@arm.com&gt;
Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>context_tracking: Rename context symbols to prepare for transition state</title>
<updated>2015-03-09T14:42:50Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2015-03-04T17:06:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c467ea763fd5d8795b7d1b5a78eb94b6ad8f66ad'/>
<id>urn:sha1:c467ea763fd5d8795b7d1b5a78eb94b6ad8f66ad</id>
<content type='text'>
Current context tracking symbols are designed to express living state.
As such they are prefixed with "IN_": IN_USER, IN_KERNEL.

Now we are going to use these symbols to also express state transitions
such as context_tracking_enter(IN_USER) or context_tracking_exit(IN_USER).
But while the "IN_" prefix works well to express entering a context, it's
confusing to depict a context exit: context_tracking_exit(IN_USER)
could mean two things:
	1) We are exiting the current context to enter user context.
	2) We are exiting the user context
We want 2) but the reviewer may be confused and understand 1)

So lets disambiguate these symbols and rename them to CONTEXT_USER and
CONTEXT_KERNEL.

Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Will deacon &lt;will.deacon@arm.com&gt;
Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;</content>
</entry>
<entry>
<title>sched: stop the unbound recursion in preempt_schedule_context()</title>
<updated>2014-10-28T09:46:05Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2014-10-05T20:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=009f60e2763568cdcd75bd1cf360c7c7165e2e60'/>
<id>urn:sha1:009f60e2763568cdcd75bd1cf360c7c7165e2e60</id>
<content type='text'>
preempt_schedule_context() does preempt_enable_notrace() at the end
and this can call the same function again; exception_exit() is heavy
and it is quite possible that need-resched is true again.

1. Change this code to dec preempt_count() and check need_resched()
   by hand.

2. As Linus suggested, we can use the PREEMPT_ACTIVE bit and avoid
   the enable/disable dance around __schedule(). But in this case
   we need to move into sched/core.c.

3. Cosmetic, but x86 forgets to declare this function. This doesn't
   really matter because it is only called by asm helpers, still it
   make sense to add the declaration into asm/preempt.h to match
   preempt_schedule().

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Alexander Graf &lt;agraf@suse.de&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: Chuck Ebbert &lt;cebbert.lkml@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Link: http://lkml.kernel.org/r/20141005202322.GB27962@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/kprobes: Fix build errors and blacklist context_track_user</title>
<updated>2014-06-14T07:07:44Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>masami.hiramatsu.pt@hitachi.com</email>
</author>
<published>2014-06-14T06:47:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4cdf77a828b056258f48a9f6078bd2f77d9704bb'/>
<id>urn:sha1:4cdf77a828b056258f48a9f6078bd2f77d9704bb</id>
<content type='text'>
This essentially reverts commit:

  ecd50f714c42 ("kprobes, x86: Call exception_enter after kprobes handled")

since it causes build errors with CONFIG_CONTEXT_TRACKING and
that has been made from misunderstandings;
context_track_user_*() don't involve much in interrupt context,
it just returns if in_interrupt() is true.

Instead of changing the do_debug/int3(), this just adds
context_track_user_*() to kprobes blacklist, since those are
still can be called right before kprobes handles int3 and debug
exceptions, and probing those will cause an infinite loop.

Reported-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Link: http://lkml.kernel.org/r/20140614064711.7865.45957.stgit@kbuild-fedora.novalocal
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>asmlinkage: Add explicit __visible to drivers/*, lib/*, kernel/*</title>
<updated>2014-05-05T23:07:46Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2014-05-01T22:44:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=722a9f9299ca720a3f14660e7c0dce7b76a9cb42'/>
<id>urn:sha1:722a9f9299ca720a3f14660e7c0dce7b76a9cb42</id>
<content type='text'>
As requested by Linus add explicit __visible to the asmlinkage users.
This marks functions visible to assembler.

Tree sweep for rest of tree.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1398984278-29319-4-git-send-email-andi@firstfloor.org
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>context_tracking: Wrap static key check into more intuitive function name</title>
<updated>2013-12-02T19:43:14Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2013-11-06T13:45:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58135f574f1b791c926622387780ed3d090116d6'/>
<id>urn:sha1:58135f574f1b791c926622387780ed3d090116d6</id>
<content type='text'>
Use a function with a meaningful name to check the global context
tracking state. static_key_false() is a bit confusing for reviewers.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v3.12-rc4' into sched/core</title>
<updated>2013-10-09T10:36:13Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2013-10-09T10:36:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37bf06375c90a42fe07b9bebdb07bc316ae5a0ce'/>
<id>urn:sha1:37bf06375c90a42fe07b9bebdb07bc316ae5a0ce</id>
<content type='text'>
Merge Linux v3.12-rc4 to fix a conflict and also to refresh the tree
before applying more scheduler patches.

Conflicts:
	arch/avr32/include/asm/Kbuild

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm: Fix build error with context tracking calls</title>
<updated>2013-09-27T15:59:47Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2013-09-09T22:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c06a5d4b13cd66c833805a0d1db76b977944aac'/>
<id>urn:sha1:0c06a5d4b13cd66c833805a0d1db76b977944aac</id>
<content type='text'>
ad65782fba50 (context_tracking: Optimize main APIs off case
with static key) converted context tracking main APIs to inline
function and left ARM asm callers behind.

This can be easily fixed by making ARM calling the post static
keys context tracking function. We just need to replicate the
static key checks there. We'll remove these later when ARM will
support the context tracking static keys.

Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reported-by: Russell King &lt;linux@arm.linux.org.uk&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Tested-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Cc: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
Cc: Anil Kumar &lt;anilk4.v@gmail.com&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Benoit Cousson &lt;b-cousson@ti.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Kevin Hilman &lt;khilman@linaro.org&gt;
</content>
</entry>
</feed>
