From: Helge Deller <deller@gmx.de>
To: John David Anglin <dave.anglin@bell.net>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-parisc <linux-parisc@vger.kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH] parisc: Fix syscall restarts
Date: Sun, 20 Dec 2015 21:06:50 +0100 [thread overview]
Message-ID: <56770A5A.1080700@gmx.de> (raw)
In-Reply-To: <DB44FC0C-734A-477F-BA28-2271D151F15C@bell.net>
On 20.12.2015 20:46, John David Anglin wrote:
> On 2015-12-20, at 2:32 PM, Helge Deller wrote:
>
>>> in a LDO "copy" instruction.
>>
>> Actually it's the "OR,cond r1,r2,t" instruction.
>> https://parisc.wiki.kernel.org/images-parisc/6/68/Pa11_acd.pdf
>> page 5-105
>>
>> if ((opcode & 0xff00ffff) == 0x08000254)
>>
>> The mask should be 0xffe0ffff, so that some bits of r2 (which needs to be 0) are not missed.
This is actually not the full truth.
I missed the point, that "r2" is a register and not an immediate value.
My code just checks that "r2" means %r0, while it could be any other register as well,
which either has a null-value, or even worse, if someone decides to "calculate" the syscall number.
> There are multiple instructions that could be used. The PA 2.0 arch says LDO on page 7-83.
True.
But luckily it seems gas converts "copy" to the "or" syntax mentioned above.
In any case, keeping my kernel patch will report any cases (which might by mistake get added)
in the future so that we can fix userspace then (or enhance the kernel workaround).
Helge
next prev parent reply other threads:[~2015-12-20 20:06 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 23:30 [PATCH] parisc: Fix syscall restarts Helge Deller
2015-12-20 13:59 ` Mathieu Desnoyers
2015-12-20 14:09 ` Mathieu Desnoyers
2015-12-20 15:49 ` Helge Deller
2015-12-20 16:50 ` James Bottomley
2015-12-20 20:35 ` Helge Deller
2015-12-21 8:03 ` James Bottomley
2015-12-21 14:39 ` Mathieu Desnoyers
2015-12-20 18:31 ` John David Anglin
2015-12-20 19:32 ` Helge Deller
2015-12-20 19:46 ` John David Anglin
2015-12-20 20:06 ` Helge Deller [this message]
2015-12-20 23:57 ` John David Anglin
2015-12-21 14:42 ` Mathieu Desnoyers
2015-12-21 15:12 ` John David Anglin
2015-12-20 19:39 ` John David Anglin
2015-12-20 19:48 ` Helge Deller
2015-12-20 20:01 ` John David Anglin
2015-12-20 20:18 ` Helge Deller
2015-12-20 20:45 ` John David Anglin
2015-12-20 20:14 ` John David Anglin
2015-12-20 20:19 ` Helge Deller
2015-12-20 20:21 ` Helge Deller
2015-12-20 20:53 ` John David Anglin
2015-12-21 9:19 ` [PATCH] parisc: Fix syscall restarts (v2) Helge Deller
2015-12-21 13:11 ` John David Anglin
2015-12-21 20:27 ` Mathieu Desnoyers
2015-12-21 20:54 ` Helge Deller
2015-12-24 16:07 ` Mathieu Desnoyers
2015-12-24 16:51 ` John David Anglin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56770A5A.1080700@gmx.de \
--to=deller@gmx.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dave.anglin@bell.net \
--cc=linux-parisc@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox