<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/arch/m68k/kernel/signal.c, branch v3.2.2</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.2.2</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2011-03-25T04:05:13+00:00</updated>
<entry>
<title>m68k: merge m68k and m68knommu arch directories</title>
<updated>2011-03-25T04:05:13+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2011-03-22T03:39:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=66d857b08b8c3ed5c72c361f863cce77d2a978d7'/>
<id>urn:sha1:66d857b08b8c3ed5c72c361f863cce77d2a978d7</id>
<content type='text'>
There is a lot of common code that could be shared between the m68k
and m68knommu arch branches. It makes sense to merge the two branches
into a single directory structure so that we can more easily share
that common code.

This is a brute force merge, based on a script from Stephen King
&lt;sfking@fdwdc.com&gt;, which was originally written by Arnd Bergmann
&lt;arnd@arndb.de&gt;.

&gt; The script was inspired by the script Sam Ravnborg used to merge the
&gt; includes from m68knommu. For those files common to both arches but
&gt; differing in content, the m68k version of the file is renamed to
&gt; &lt;file&gt;_mm.&lt;ext&gt; and the m68knommu version of the file is moved into the
&gt; corresponding m68k directory and renamed &lt;file&gt;_no.&lt;ext&gt; and a small
&gt; wrapper file &lt;file&gt;.&lt;ext&gt; is used to select between the two version. Files
&gt; that are common to both but don't differ are removed from the m68knommu
&gt; tree and files and directories that are unique to the m68knommu tree are
&gt; moved to the m68k tree. Finally, the arch/m68knommu tree is removed.
&gt;
&gt; To select between the the versions of the files, the wrapper uses
&gt;
&gt; #ifdef CONFIG_MMU
&gt; #include &lt;file&gt;_mm.&lt;ext&gt;
&gt; #else
&gt; #include &lt;file&gt;_no.&lt;ext&gt;
&gt; #endif

On top of this file merge I have done a simplistic merge of m68k and
m68knommu Kconfig, which primarily attempts to keep existing options and
menus in place. Other than a handful of options being moved it produces
identical .config outputs on m68k and m68knommu targets I tested it on.

With this in place there is now quite a bit of scope for merge cleanups
in future patches.

Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
</content>
</entry>
<entry>
<title>m68k: Add helper function handle_kernel_fault()</title>
<updated>2011-03-16T18:10:40+00:00</updated>
<author>
<name>Roman Zippel</name>
<email>zippel@linux-m68k.org</email>
</author>
<published>2008-11-18T20:25:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dcdf3a293522e6ef09d8b3650ac1ceec56438e5d'/>
<id>urn:sha1:dcdf3a293522e6ef09d8b3650ac1ceec56438e5d</id>
<content type='text'>
Add helper function handle_kernel_fault() in signal.c, so frame_extra_sizes
can become static, and to avoid future code duplication.

Signed-off-by: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Check __get_user()/__put_user() return value</title>
<updated>2011-01-07T13:01:35+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-10-14T17:35:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8c18194f6c0a638565f2074d1dcabfbe590f396d'/>
<id>urn:sha1:8c18194f6c0a638565f2074d1dcabfbe590f396d</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Fix stack mangling logics in sigreturn</title>
<updated>2011-01-07T13:01:35+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-10-06T18:09:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ea52b58ccbda49aeb23eb424ce05bba3cb0bc976'/>
<id>urn:sha1:ea52b58ccbda49aeb23eb424ce05bba3cb0bc976</id>
<content type='text'>
a) we should hold modifying regs-&gt;format until we know we *will* be
doing stack expansion; otherwise attacker can modify sigframe to
have wrong -&gt;sc_formatvec and install SIGSEGV handler.

b) we should *not* mix copying saved extra stuff from userland with
expanding the stack; once we'd done that manual memmove, we'd better
not return to C, so cleanup is very hard to do.  The easiest way
is to copy it on stack first, making sure we won't overwrite on stack
expansion.  Fortunately that's easy to do...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: If we fail to set sigframe up, just leave regs alone...</title>
<updated>2011-01-07T13:01:34+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-10-03T05:36:58+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=90731d7537317ad5d9672187f7a1dff90b29bb12'/>
<id>urn:sha1:90731d7537317ad5d9672187f7a1dff90b29bb12</id>
<content type='text'>
Same principle as with the previous patch - do not destroy the
state if sigframe setup fails.  Incidentally, it's actually
_less_ work - we don't need to go through adjust_stack dance
on failure if we don't touch regs-&gt;stkadj until we know we'd
written sigframe out.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Don't lose state if sigframe setup fails</title>
<updated>2011-01-07T13:01:34+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-10-03T05:15:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f85741eb5fb2653fd9138b4bef68396615c720f7'/>
<id>urn:sha1:f85741eb5fb2653fd9138b4bef68396615c720f7</id>
<content type='text'>
If we'd failed in setup_frame(), we've no place to store
the original sigmask.  It's not an unrecoverable situation -
we raise SIGSEGV, but that SIGSEGV might be successfully
handled (e.g. on altstack).  In that case we really don't
want sa_mask of original signal permanently slapped on
the set of blocked signals.

Standard solution: have setup_frame()/setup_rt_frame()
report failure and don't mess with the signal-related
state if that has happened...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Simplify the singlestepping handling in signals</title>
<updated>2011-01-07T13:01:34+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-10-03T02:57:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9e4930dbf17c1eba72631cd52a0c621da3d1a816'/>
<id>urn:sha1:9e4930dbf17c1eba72631cd52a0c621da3d1a816</id>
<content type='text'>
Instead of checking the return value of do_signal() we can just do
the work (raise SIGTRAP and clear SR.T1) directly in handle_signal(),
when setting the sigframe up.  Simplifies the assembler glue and is
closer to the way we do it on other targets.

Note that do_delayed_trace does *not* disappear; it's still needed
to deal with single-stepping through syscall, since 68040 doesn't
raise the trace exception at all if the trap exception is pending.
We hit it after returning from sys_...() if TIF_DELAYED_TRACE is
set; all that has changed is that we don't reuse it for "single-step
into the handler" codepath.

As the result, do_signal() doesn't need to return anything anymore.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Switch to saner sigsuspend()</title>
<updated>2011-01-07T13:01:33+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-09-30T03:28:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e68847fee706c6fe74c9afc3288c3adfc131b1fa'/>
<id>urn:sha1:e68847fee706c6fe74c9afc3288c3adfc131b1fa</id>
<content type='text'>
and saner do_signal() arguments, while we are at it

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Resetting sa_handler in local copy of k_sigaction is pointless</title>
<updated>2011-01-07T12:59:59+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-09-30T03:10:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=35fc157baf56db846afaeb5c730fa47e351cf0d2'/>
<id>urn:sha1:35fc157baf56db846afaeb5c730fa47e351cf0d2</id>
<content type='text'>
... and had been such since the introduction of get_signal_to_deliver()

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Define sigcontext ABI of ColdFire</title>
<updated>2010-02-27T17:44:10+00:00</updated>
<author>
<name>Maxim Kuvyrkov</name>
<email>maxim@codesourcery.com</email>
</author>
<published>2009-09-22T21:22:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=00ebfe58b002f0ff387f60c7cd23bc2b274fce1a'/>
<id>urn:sha1:00ebfe58b002f0ff387f60c7cd23bc2b274fce1a</id>
<content type='text'>
The following patch defines sigcontext ABI of ColdFire.  Due to ISA
restrictions ColdFire needs different rt_sigreturn trampoline.

And due to ColdFire FP registers being 8-bytes instead of 12-bytes on
m68k, sigcontext and fpregset structures should be updated.

Regarding the sc_fpstate[16+6*8] field, it would've been enough 16
bytes to store ColdFire's FP state.  To accomodate GLIBC's libSegFault
it would'be been enough 6*8 bytes (room for the 6 non-call-clobbered
FP registers).  I set it to 16+6*8 to provide some extra space for any
future changes in the ColdFire FPU.

Signed-off-by: Maxim Kuvyrkov &lt;maxim@codesourcery.com&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
</feed>
