<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/mips/kernel/signal.c, branch v3.4.67</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>MIPS: Use set_current_blocked() and block_sigmask()</title>
<updated>2012-04-26T23:12:47+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2012-02-14T11:40:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8598f3cd80c860173d9b35d91c3dcb93eee13b54'/>
<id>8598f3cd80c860173d9b35d91c3dcb93eee13b54</id>
<content type='text'>
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current-&gt;blocked is
incorrect as we need to check whether the signal we're about to block
is pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current-&gt;blocked")
which centralises the code for updating current-&gt;blocked after
successfully delivering a signal and reduces the amount of duplicate
code across architectures. In the past some architectures got this
code wrong, so using this helper function should stop that from
happening again.

Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: linux-kernel@vger.kernel.org
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: David Daney &lt;ddaney@caviumnetworks.com&gt;
Cc: linux-mips@linux-mips.org
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Patchwork: https://patchwork.linux-mips.org/patch/3363/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current-&gt;blocked is
incorrect as we need to check whether the signal we're about to block
is pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current-&gt;blocked")
which centralises the code for updating current-&gt;blocked after
successfully delivering a signal and reduces the amount of duplicate
code across architectures. In the past some architectures got this
code wrong, so using this helper function should stop that from
happening again.

Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: linux-kernel@vger.kernel.org
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: David Daney &lt;ddaney@caviumnetworks.com&gt;
Cc: linux-mips@linux-mips.org
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Patchwork: https://patchwork.linux-mips.org/patch/3363/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Disintegrate asm/system.h for MIPS</title>
<updated>2012-03-28T17:30:02+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-03-28T17:30:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b81947c646bfefdf98e2fde5d7d39cbbda8525d4'/>
<id>b81947c646bfefdf98e2fde5d7d39cbbda8525d4</id>
<content type='text'>
Disintegrate asm/system.h for MIPS.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
cc: linux-mips@linux-mips.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disintegrate asm/system.h for MIPS.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
cc: linux-mips@linux-mips.org
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Handle __put_user() sleeping.</title>
<updated>2011-09-21T15:52:38+00:00</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2011-07-27T10:44:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1f717929e987fc55bb6be02df994945f8edbd46c'/>
<id>1f717929e987fc55bb6be02df994945f8edbd46c</id>
<content type='text'>
do_signal() does __put_user() which can fault, resulting in a might_sleep()
warning in down_read(&amp;mm-&gt;mmap_sem) and a "scheduling while atomic" warning
when mmap_sem is contented. On Swarm this also results in:

WARNING: at kernel/smp.c:459 smp_call_function_many+0x148/0x398()
Modules linked in:
Call Trace:

[&lt;ffffffff804b48a4&gt;] dump_stack+0x1c/0x50
[&lt;ffffffff8013dc94&gt;] warn_slowpath_common+0x8c/0xc8
[&lt;ffffffff8013dcfc&gt;] warn_slowpath_null+0x2c/0x40
[&lt;ffffffff801864a0&gt;] smp_call_function_many+0x148/0x398
[&lt;ffffffff80186748&gt;] smp_call_function+0x58/0xa8
[&lt;ffffffff80119b5c&gt;] r4k_flush_data_cache_page+0x54/0xd8
[&lt;ffffffff801f39bc&gt;] handle_pte_fault+0xa9c/0xad0
[&lt;ffffffff801f40d0&gt;] handle_mm_fault+0x158/0x200
[&lt;ffffffff80115548&gt;] do_page_fault+0x218/0x3b0
[&lt;ffffffff80102744&gt;] ret_from_exception+0x0/0x10
[&lt;ffffffff8010eb18&gt;] copy_siginfo_to_user32+0x50/0x298
[&lt;ffffffff8010edf0&gt;] setup_rt_frame_32+0x90/0x250
[&lt;ffffffff80106414&gt;] do_notify_resume+0x154/0x358
[&lt;ffffffff80102930&gt;] work_notifysig+0xc/0x14

Fixed by enabling interrupts in do_notify_resume before delivering signals.

[ralf@linux-mips.org: Reported and original fix by tglx but I wanted to
minimize the amount of code being run with interrupts disabled so I moved
the local_irq_disable() call right into do_notify_resume.  Which is saner
than doing it in entry.S.]

Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
do_signal() does __put_user() which can fault, resulting in a might_sleep()
warning in down_read(&amp;mm-&gt;mmap_sem) and a "scheduling while atomic" warning
when mmap_sem is contented. On Swarm this also results in:

WARNING: at kernel/smp.c:459 smp_call_function_many+0x148/0x398()
Modules linked in:
Call Trace:

[&lt;ffffffff804b48a4&gt;] dump_stack+0x1c/0x50
[&lt;ffffffff8013dc94&gt;] warn_slowpath_common+0x8c/0xc8
[&lt;ffffffff8013dcfc&gt;] warn_slowpath_null+0x2c/0x40
[&lt;ffffffff801864a0&gt;] smp_call_function_many+0x148/0x398
[&lt;ffffffff80186748&gt;] smp_call_function+0x58/0xa8
[&lt;ffffffff80119b5c&gt;] r4k_flush_data_cache_page+0x54/0xd8
[&lt;ffffffff801f39bc&gt;] handle_pte_fault+0xa9c/0xad0
[&lt;ffffffff801f40d0&gt;] handle_mm_fault+0x158/0x200
[&lt;ffffffff80115548&gt;] do_page_fault+0x218/0x3b0
[&lt;ffffffff80102744&gt;] ret_from_exception+0x0/0x10
[&lt;ffffffff8010eb18&gt;] copy_siginfo_to_user32+0x50/0x298
[&lt;ffffffff8010edf0&gt;] setup_rt_frame_32+0x90/0x250
[&lt;ffffffff80106414&gt;] do_notify_resume+0x154/0x358
[&lt;ffffffff80102930&gt;] work_notifysig+0xc/0x14

Fixed by enabling interrupts in do_notify_resume before delivering signals.

[ralf@linux-mips.org: Reported and original fix by tglx but I wanted to
minimize the amount of code being run with interrupts disabled so I moved
the local_irq_disable() call right into do_notify_resume.  Which is saner
than doing it in entry.S.]

Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c</title>
<updated>2011-03-14T20:07:25+00:00</updated>
<author>
<name>David Daney</name>
<email>ddaney@caviumnetworks.com</email>
</author>
<published>2011-01-24T22:51:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c726b822131e7fdb62745a5585449e6a159395e8'/>
<id>c726b822131e7fdb62745a5585449e6a159395e8</id>
<content type='text'>
GCC-4.6 can find more unused code than previous versions could.

In the case of protected_restore_fp_context{,32}, the variable tmp is
really used.  Its use is tricky in that we really care about the side
effects of the __put_user() calls.  So we must mark tmp with
__maybe_unused to quiet the warning.

Signed-off-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2035/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC-4.6 can find more unused code than previous versions could.

In the case of protected_restore_fp_context{,32}, the variable tmp is
really used.  Its use is tricky in that we really care about the side
effects of the __put_user() calls.  So we must mark tmp with
__maybe_unused to quiet the warning.

Signed-off-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2035/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: do_sigaltstack() expects userland pointers</title>
<updated>2010-10-18T15:59:03+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2010-09-28T17:50:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4bfb8c5c87bd167640ef5789b22e058e339df804'/>
<id>4bfb8c5c87bd167640ef5789b22e058e339df804</id>
<content type='text'>
o32 compat does the right thing, native and n32 compat do not...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1700/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
o32 compat does the right thing, native and n32 compat do not...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1700/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Sanitize restart logics</title>
<updated>2010-10-18T15:59:02+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2010-09-28T17:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8f5a00eb422ed86e77bb8f67e08b9fe6d30f679a'/>
<id>8f5a00eb422ed86e77bb8f67e08b9fe6d30f679a</id>
<content type='text'>
Put the original syscall number into -&gt;regs[0] when we leave syscall
with error.  Use it in restart logics.  Everything else will have
it 0 since we pass through SAVE_SOME on all the ways in.  Note that
in places like bad_stack and inllegal_syscall we leave it 0 - it's not
restartable.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1698/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Put the original syscall number into -&gt;regs[0] when we leave syscall
with error.  Use it in restart logics.  Everything else will have
it 0 since we pass through SAVE_SOME on all the ways in.  Note that
in places like bad_stack and inllegal_syscall we leave it 0 - it's not
restartable.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1698/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Don't block signals if we'd failed to setup a sigframe</title>
<updated>2010-10-18T15:59:02+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2010-09-28T17:50:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=062ab57b2f8439ab506645cf6f29432e7c61497c'/>
<id>062ab57b2f8439ab506645cf6f29432e7c61497c</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1696/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1696/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Move signal trampolines off of the stack.</title>
<updated>2010-04-12T16:26:15+00:00</updated>
<author>
<name>David Daney</name>
<email>ddaney@caviumnetworks.com</email>
</author>
<published>2010-02-19T00:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d814c28ceca8f659c0012eaec8e21eee43710716'/>
<id>d814c28ceca8f659c0012eaec8e21eee43710716</id>
<content type='text'>
This is a follow on to the vdso patch.

Since all processes now have signal trampolines permanently mapped, we
can use those instead of putting the trampoline on the stack and
invalidating the corresponding icache across all CPUs.  We also get rid
of a bunch of ICACHE_REFILLS_WORKAROUND_WAR code.

[Ralf: GDB 7.1 which has the necessary modifications to allow backtracing
over signal frames will supposedly be released tomorrow.  The old signal
frame format obsoleted by this patch exists in two variations, for sane
processors and for those requiring ICACHE_REFILLS_WORKAROUND_WAR.  So
there was never a GDB which did support backtracing over signal frames
on all MIPS systems.  This convinved me this series should be applied and
pushed upstream as soon as possible.]

Signed-off-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/974/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a follow on to the vdso patch.

Since all processes now have signal trampolines permanently mapped, we
can use those instead of putting the trampoline on the stack and
invalidating the corresponding icache across all CPUs.  We also get rid
of a bunch of ICACHE_REFILLS_WORKAROUND_WAR code.

[Ralf: GDB 7.1 which has the necessary modifications to allow backtracing
over signal frames will supposedly be released tomorrow.  The old signal
frame format obsoleted by this patch exists in two variations, for sane
processors and for those requiring ICACHE_REFILLS_WORKAROUND_WAR.  So
there was never a GDB which did support backtracing over signal frames
on all MIPS systems.  This convinved me this series should be applied and
pushed upstream as soon as possible.]

Signed-off-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/974/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Cleanup signal code initialization</title>
<updated>2009-12-17T01:57:32+00:00</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2009-11-24T19:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=137f6f3e284e8215a940cf20dbf2aef449fe5a60'/>
<id>137f6f3e284e8215a940cf20dbf2aef449fe5a60</id>
<content type='text'>
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/709/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/709/
</pre>
</div>
</content>
</entry>
<entry>
<title>KEYS: Add missing linux/tracehook.h #inclusions</title>
<updated>2009-09-09T08:30:02+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-09-09T07:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=733e5e4b4eb1bc1e27acbe092200154051171426'/>
<id>733e5e4b4eb1bc1e27acbe092200154051171426</id>
<content type='text'>
Add #inclusions of linux/tracehook.h to those arch files that had the tracehook
call for TIF_NOTIFY_RESUME added when support for that flag was added to that
arch.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add #inclusions of linux/tracehook.h to those arch files that had the tracehook
call for TIF_NOTIFY_RESUME added when support for that flag was added to that
arch.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
