<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/alpha/kernel/entry.S, branch v3.2.41</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/alpha/kernel/entry.S?h=v3.2.41</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/alpha/kernel/entry.S?h=v3.2.41'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-09-27T19:19:53Z</updated>
<entry>
<title>alpha: switch osf_sigprocmask() to use of sigprocmask()</title>
<updated>2010-09-27T19:19:53Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2010-09-26T18:28:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c52c2ddc1dfa6fe85ffd5e4c57cf91f6982639fe'/>
<id>urn:sha1:c52c2ddc1dfa6fe85ffd5e4c57cf91f6982639fe</id>
<content type='text'>
get rid of a useless wrapper, while we are at it

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>alpha: fix hae_cache race in RESTORE_ALL</title>
<updated>2010-09-25T21:38:13Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-09-25T20:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=77edffb652b33a565e099ff0a1687762f03eb46a'/>
<id>urn:sha1:77edffb652b33a565e099ff0a1687762f03eb46a</id>
<content type='text'>
We want interrupts disabled on all paths leading to RESTORE_ALL;
otherwise, we are risking an IRQ coming between the updates of
alpha_mv-&gt;hae_cache and *alpha_mv-&gt;hae_register and set_hae()
within the IRQ getting badly confused.

RESTORE_ALL used to play with disabling IRQ itself, but that got
removed back in 2002, without making sure we had them disabled
on all paths.  It's cheaper to make sure we have them disabled than
to revert to original variant...

Remove the detritus left from that commit back in 2002; we used to
need a reload of $0 and $1 since swpipl would change those, but
doing that had become pointless when we stopped doing swpipl in
there...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>alpha: deal with multiple simultaneously pending signals</title>
<updated>2010-09-19T03:08:29Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-09-18T12:42:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=494486a1d2697f2153199b6501ab5b4d6e15a2bb'/>
<id>urn:sha1:494486a1d2697f2153199b6501ab5b4d6e15a2bb</id>
<content type='text'>
Unlike the other targets, alpha sets _one_ sigframe and
buggers off until the next syscall/interrupt, even if
more signals are pending.  It leads to quite a few unpleasant
inconsistencies, starting with SIGSEGV potentially arriving
not where it should and including e.g. mess with sigsuspend();
consider two pending signals blocked until sigsuspend()
unblocks them.  We pick the first one; then, if we are hit
by interrupt while in the handler, we process the second one
as well.  If we are not, and if no syscalls had been made,
we get out of the first handler and leave the second signal
pending; normally sigreturn() would've picked it anyway, but
here it starts with restoring the original mask and voila -
the second signal is blocked again.  On everything else we
get both delivered consistently.

It's actually easy to fix; the only thing to watch out for
is prevention of double syscall restart.  Fortunately, the
idea I've nicked from arm fix by rmk works just fine...

Testcase demonstrating the behaviour in question; on alpha
we get one or both flags set (usually one), on everything
else both are always set.
	#include &lt;signal.h&gt;
	#include &lt;stdio.h&gt;
	int had1, had2;
	void f1(int sig) { had1 = 1; }
	void f2(int sig) { had2 = 1; }
	main()
	{
		sigset_t set1, set2;
		sigemptyset(&amp;set1);
		sigemptyset(&amp;set2);
		sigaddset(&amp;set2, 1);
		sigaddset(&amp;set2, 2);
		signal(1, f1);
		signal(2, f2);
		sigprocmask(SIG_SETMASK, &amp;set2, NULL);
		raise(1);
		raise(2);
		sigsuspend(&amp;set1);
		printf("had1:%d had2:%d\n", had1, had2);
	}

Tested-by: Michael Cree &lt;mcree@orcon.net.nz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Matt Turner &lt;mattst88@gmail.com&gt;
</content>
</entry>
<entry>
<title>alpha: fix a 14 years old bug in sigreturn tracing</title>
<updated>2010-09-19T03:08:28Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-09-18T12:41:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=53293638618f1a8b0b182dfedaab08b28930f992'/>
<id>urn:sha1:53293638618f1a8b0b182dfedaab08b28930f992</id>
<content type='text'>
The way sigreturn() is implemented on alpha breaks PTRACE_SYSCALL,
all way back to 1.3.95 when alpha has grown PTRACE_SYSCALL support.

What happens is direct return to ret_from_syscall, in order to bypass
mangling of a3 (error indicator) and prevent other mutilations of
registers (e.g. by syscall restart).  That's fine, but... the entire
TIF_SYSCALL_TRACE codepath is kept separate on alpha and post-syscall
stopping/notifying the tracer is after the syscall.  And the normal
path we are forcibly switching to doesn't have it.

So we end up with *one* stop in traced sigreturn() vs. two in other
syscalls.  And yes, strace is visibly broken by that; try to strace
the following
	#include &lt;signal.h&gt;
	#include &lt;stdio.h&gt;
	void f(int sig) {}
	main()
	{
		signal(SIGHUP, f);
		raise(SIGHUP);
		write(1, "eeeek\n", 6);
	}
and watch the show.  The
	close(1)                                = 405
in the end of strace output is coming from return value of write() (6 ==
__NR_close on alpha) and syscall number of exit_group() (__NR_exit_group ==
405 there).

The fix is fairly simple - the only thing we end up missing is the call
of syscall_trace() and we can tell whether we'd been called from the
SYSCALL_TRACE path by checking ra value.  Since we are setting the
switch_stack up (that's what sys_sigreturn() does), we have the right
environment for calling syscall_trace() - just before we call
undo_switch_stack() and return.  Since undo_switch_stack() will overwrite
s0 anyway, we can use it to store the result of "has it been called from
SYSCALL_TRACE path?" check.  The same thing applies in rt_sigreturn().

Tested-by: Michael Cree &lt;mcree@orcon.net.nz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Matt Turner &lt;mattst88@gmail.com&gt;
</content>
</entry>
<entry>
<title>alpha: unb0rk sigsuspend() and rt_sigsuspend()</title>
<updated>2010-09-19T03:08:28Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-09-18T12:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=392fb6e35400edbee183baba24b34a0fa2053813'/>
<id>urn:sha1:392fb6e35400edbee183baba24b34a0fa2053813</id>
<content type='text'>
Old code used to set regs-&gt;r0 and regs-&gt;r19 to force the right
return value.  Leaving that after switch to ERESTARTNOHAND
was a Bad Idea(tm), since now that screws the restart - if we
hit the case when get_signal_to_deliver() returns 0, we will
step back to syscall insn, with v0 set to EINTR and a3 to 1.
The latter won't matter, since EINTR is 4, aka __NR_write.

Testcase:

	#include &lt;signal.h&gt;
	#define _GNU_SOURCE
	#include &lt;unistd.h&gt;
	#include &lt;sys/syscall.h&gt;

	main()
	{
		sigset_t mask;
		sigemptyset(&amp;mask);
		sigaddset(&amp;mask, SIGCONT);
		sigprocmask(SIG_SETMASK, &amp;mask, NULL);
		kill(0, SIGCONT);
		syscall(__NR_sigsuspend, 1, "b0rken\n", 7);
	}

results on alpha in immediate message to stdout...

Fix is obvious; moreover, since we don't need regs anymore, we can
switch to normal prototypes for these guys and lose the wrappers.
Even better, rt_sigsuspend() is identical to generic version in
kernel/signal.c now.

Tested-by: Michael Cree &lt;mcree@orcon.net.nz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Matt Turner &lt;mattst88@gmail.com&gt;
</content>
</entry>
<entry>
<title>do_pipe cleanup: drop its last user in arch/alpha/</title>
<updated>2009-03-27T18:43:58Z</updated>
<author>
<name>Cheng Renquan</name>
<email>crquan@gmail.com</email>
</author>
<published>2009-01-14T09:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=10f303ae1e5e77a9f7cb053e6329906afb132c67'/>
<id>urn:sha1:10f303ae1e5e77a9f7cb053e6329906afb132c67</id>
<content type='text'>
The last user of do_pipe is in arch/alpha/, after replacing it with
do_pipe_flags, the do_pipe can be totally dropped.

Signed-off-by: Cheng Renquan &lt;crquan@gmail.com&gt;
Acked-by: Richard Henderson &lt;rth@twiddle.net&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>alpha: use syscall wrappers</title>
<updated>2009-01-30T02:04:44Z</updated>
<author>
<name>Ivan Kokshaysky</name>
<email>ink@jurassic.park.msu.ru</email>
</author>
<published>2009-01-29T22:25:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e5d9a90c36e05dd080704ea58328c00f64facdc1'/>
<id>urn:sha1:e5d9a90c36e05dd080704ea58328c00f64facdc1</id>
<content type='text'>
Convert OSF syscalls and add alpha specific SYSCALL_ALIAS() macro.

Signed-off-by: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2</title>
<updated>2009-01-14T13:15:15Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2009-01-14T13:13:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1134723e96f6e2abcf8bfd7a2d1c96fcc323ef35'/>
<id>urn:sha1:1134723e96f6e2abcf8bfd7a2d1c96fcc323ef35</id>
<content type='text'>
Remove __attribute__((weak)) from common code sys_pipe implemantation.
IA64, ALPHA, SUPERH (32bit) and SPARC (32bit) have own implemantations
with the same name. Just rename them.
For sys_pipe2 there is no architecture specific implementation.

Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>CRED: Separate task security context from task_struct</title>
<updated>2008-11-13T23:39:16Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2008-11-13T23:39:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b6dff3ec5e116e3af6f537d4caedcad6b9e5082a'/>
<id>urn:sha1:b6dff3ec5e116e3af6f537d4caedcad6b9e5082a</id>
<content type='text'>
Separate the task security context from task_struct.  At this point, the
security data is temporarily embedded in the task_struct with two pointers
pointing to it.

Note that the Alpha arch is altered as it refers to (E)UID and (E)GID in
entry.S via asm-offsets.

With comment fixes Signed-off-by: Marc Dionne &lt;marc.c.dionne@gmail.com&gt;

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>alpha: convert to generic sys_ptrace</title>
<updated>2007-10-16T16:43:03Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2007-10-16T08:26:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a5f833f3c1961488733bf645b011b6350ee5c7be'/>
<id>urn:sha1:a5f833f3c1961488733bf645b011b6350ee5c7be</id>
<content type='text'>
This patch converts alpha to the generic sys_ptrace.  We use
force_successful_syscall_return to avoid having to pass the pt_regs pointer
down to the function.  I think the removal of the assemly stub is correct,
but I could only compile-test this patch, so please give it a spin before
commiting :)

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
