<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/arch/parisc/kernel/syscall.S, branch v3.2.97</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>parisc: Ensure consistent state when switching to kernel stack at syscall entry</title>
<updated>2017-02-23T03:50:58+00:00</updated>
<author>
<name>John David Anglin</name>
<email>dave.anglin@bell.net</email>
</author>
<published>2016-10-29T03:00:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d22575559b82840a800554c6303012f74ca89041'/>
<id>d22575559b82840a800554c6303012f74ca89041</id>
<content type='text'>
commit 6ed518328d0189e0fdf1bb7c73290d546143ea66 upstream.

We have one critical section in the syscall entry path in which we switch from
the userspace stack to kernel stack. In the event of an external interrupt, the
interrupt code distinguishes between those two states by analyzing the value of
sr7. If sr7 is zero, it uses the kernel stack. Therefore it's important, that
the value of sr7 is in sync with the currently enabled stack.

This patch now disables interrupts while executing the critical section.  This
prevents the interrupt handler to possibly see an inconsistent state which in
the worst case can lead to crashes.

Interestingly, in the syscall exit path interrupts were already disabled in the
critical section which switches back to the userspace stack.

Signed-off-by: John David Anglin &lt;dave.anglin@bell.net&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6ed518328d0189e0fdf1bb7c73290d546143ea66 upstream.

We have one critical section in the syscall entry path in which we switch from
the userspace stack to kernel stack. In the event of an external interrupt, the
interrupt code distinguishes between those two states by analyzing the value of
sr7. If sr7 is zero, it uses the kernel stack. Therefore it's important, that
the value of sr7 is in sync with the currently enabled stack.

This patch now disables interrupts while executing the critical section.  This
prevents the interrupt handler to possibly see an inconsistent state which in
the worst case can lead to crashes.

Interestingly, in the syscall exit path interrupts were already disabled in the
critical section which switches back to the userspace stack.

Signed-off-by: John David Anglin &lt;dave.anglin@bell.net&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls</title>
<updated>2016-06-15T20:28:14+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2016-04-27T01:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2a1b4220685a9d4afa788f3d468d1cffe0e4c6dd'/>
<id>2a1b4220685a9d4afa788f3d468d1cffe0e4c6dd</id>
<content type='text'>
commit f0b22d1bb2a37a665a969e95785c75a4f49d1499 upstream.

Do not load one entry beyond the end of the syscall table when the
syscall number of a traced process equals to __NR_Linux_syscalls.
Similar bug with regular processes was fixed by commit 3bb457af4fa8
("[PARISC] Fix bug when syscall nr is __NR_Linux_syscalls").

This bug was found by strace test suite.

Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
Acked-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f0b22d1bb2a37a665a969e95785c75a4f49d1499 upstream.

Do not load one entry beyond the end of the syscall table when the
syscall number of a traced process equals to __NR_Linux_syscalls.
Similar bug with regular processes was fixed by commit 3bb457af4fa8
("[PARISC] Fix bug when syscall nr is __NR_Linux_syscalls").

This bug was found by strace test suite.

Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
Acked-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: LWS fixes for syscall.S</title>
<updated>2010-05-30T09:46:37+00:00</updated>
<author>
<name>John David Anglin</name>
<email>dave@hiauly1.hia.nrc.ca</email>
</author>
<published>2010-04-11T17:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f4c0346c6f350d51aac7ed87e266a4257bdbe506'/>
<id>f4c0346c6f350d51aac7ed87e266a4257bdbe506</id>
<content type='text'>
1) Gate immediately and save a branch.
2) Fix off by one error in checking entry number.
3) Use sr7 instead of sr3 in error return path as sr3 might not
   contain correct value.
4) Enable locking on UP systems to prevent incorrect operation of
   the cas_action critical region on page faults.

Tested on several systems, including UP c3750 with 2.6.33.2 kernel.

Signed-off-by: John David Anglin &lt;dave.anglin@nrc-cnrc.gc.ca&gt;
Signed-off-by: Kyle McMartin &lt;kyle@parisc-linux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1) Gate immediately and save a branch.
2) Fix off by one error in checking entry number.
3) Use sr7 instead of sr3 in error return path as sr3 might not
   contain correct value.
4) Enable locking on UP systems to prevent incorrect operation of
   the cas_action critical region on page faults.

Tested on several systems, including UP c3750 with 2.6.33.2 kernel.

Signed-off-by: John David Anglin &lt;dave.anglin@nrc-cnrc.gc.ca&gt;
Signed-off-by: Kyle McMartin &lt;kyle@parisc-linux.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: split syscall_trace into two halves</title>
<updated>2009-09-28T03:07:22+00:00</updated>
<author>
<name>Kyle McMartin</name>
<email>kyle@mcmartin.ca</email>
</author>
<published>2009-07-05T18:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2798af1abb5d560b926fd07ec58c5dcc6d3484d8'/>
<id>2798af1abb5d560b926fd07ec58c5dcc6d3484d8</id>
<content type='text'>
Instead of fiddling with gr[20], restructure code to return whether
or not to -ENOSYS. (Also do a bit of fiddling to let them take
pt_regs directly instead of re-computing it.)

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of fiddling with gr[20], restructure code to return whether
or not to -ENOSYS. (Also do a bit of fiddling to let them take
pt_regs directly instead of re-computing it.)

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: add missing TI_TASK macro in syscall.S</title>
<updated>2009-09-28T03:07:22+00:00</updated>
<author>
<name>Kyle McMartin</name>
<email>kyle@mcmartin.ca</email>
</author>
<published>2009-07-05T18:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5837d42f8ae9874fd93928c6784b2224f0edd4c9'/>
<id>5837d42f8ae9874fd93928c6784b2224f0edd4c9</id>
<content type='text'>
LDREG 0(%r1),%r1 really wants to be accessing thread_info.task,
instead of hardcoding the 0.

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LDREG 0(%r1),%r1 really wants to be accessing thread_info.task,
instead of hardcoding the 0.

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: tracehook_report_syscall</title>
<updated>2009-09-28T03:07:21+00:00</updated>
<author>
<name>Kyle McMartin</name>
<email>kyle@mcmartin.ca</email>
</author>
<published>2009-04-27T03:53:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d6b58772dc39262629708e5f3c30ef06de290894'/>
<id>d6b58772dc39262629708e5f3c30ef06de290894</id>
<content type='text'>
This makes parisc use the standard tracehook_report_syscall_entry
and tracehook_report_syscall_exit hooks in &lt;linux/tracehook.h&gt;.

To do this, we need to access current-&gt;thread.regs, and to know
whether we're entering or exiting the syscall, so add this to
syscall_trace.

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes parisc use the standard tracehook_report_syscall_entry
and tracehook_report_syscall_exit hooks in &lt;linux/tracehook.h&gt;.

To do this, we need to access current-&gt;thread.regs, and to know
whether we're entering or exiting the syscall, so add this to
syscall_trace.

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: document light weight syscall ABI</title>
<updated>2009-03-31T02:51:35+00:00</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2008-12-30T02:47:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c84c3a698f17ae5d55a6ecc76298fb894e106336'/>
<id>c84c3a698f17ae5d55a6ecc76298fb894e106336</id>
<content type='text'>
Document the LWS ABI including implementation notes for
userspace, and comment cleanup.

Remove extraneous .align 16 after lws_lock_start.

Signed-off-by: Carlos O'Donell &lt;carlos@systemhalted.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Document the LWS ABI including implementation notes for
userspace, and comment cleanup.

Remove extraneous .align 16 after lws_lock_start.

Signed-off-by: Carlos O'Donell &lt;carlos@systemhalted.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "parisc: fix trivial section name warnings"</title>
<updated>2008-06-13T14:49:45+00:00</updated>
<author>
<name>Kyle McMartin</name>
<email>kyle@minerva.i.cabal.ca</email>
</author>
<published>2008-05-22T18:36:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dfcf753bd3fb09f336659d07b1c48db7e62772e0'/>
<id>dfcf753bd3fb09f336659d07b1c48db7e62772e0</id>
<content type='text'>
This reverts commit bd3bb8c15b9a80dbddfb7905b237a4a11a4725b4.

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit bd3bb8c15b9a80dbddfb7905b237a4a11a4725b4.

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: fix trivial section name warnings</title>
<updated>2008-05-15T14:38:54+00:00</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2008-05-02T20:02:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bd3bb8c15b9a80dbddfb7905b237a4a11a4725b4'/>
<id>bd3bb8c15b9a80dbddfb7905b237a4a11a4725b4</id>
<content type='text'>
This trivial patch fixes the following section warnings on PARISC:
&gt; WARNING: vmlinux.o (.text.1): unexpected section name.
&gt;The (.[number]+) following section name are ld generated and not expected.
&gt; Did you forget to use "ax"/"aw" in a .S file?
&gt; Note that for example &lt;linux/init.h&gt; contains
&gt; section definitions for use in .S files.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This trivial patch fixes the following section warnings on PARISC:
&gt; WARNING: vmlinux.o (.text.1): unexpected section name.
&gt;The (.[number]+) following section name are ld generated and not expected.
&gt; Did you forget to use "ax"/"aw" in a .S file?
&gt; Note that for example &lt;linux/init.h&gt; contains
&gt; section definitions for use in .S files.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</pre>
</div>
</content>
</entry>
</feed>
