From: John David Anglin <dave.anglin@bell.net>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Helge Deller <deller@gmx.de>
Cc: linux-parisc <linux-parisc@vger.kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH] parisc: Fix syscall restarts (v2)
Date: Thu, 24 Dec 2015 11:51:54 -0500 [thread overview]
Message-ID: <567C22AA.1000700@bell.net> (raw)
In-Reply-To: <187718964.290846.1450973235666.JavaMail.zimbra@efficios.com>
On 2015-12-24 11:07 AM, Mathieu Desnoyers wrote:
>>> Is it valid to have unaligned instructions ? Does the architecture
>>> >>allow it, or it's a fumble and we should pr_warn ?
>> >
>> >How can it be unaligned? It's about u32...
> That would be an instruction that is volountarily offset
> from 1, 2, 3 bytes from 4-bytes multiples by the application.
> The only situation where I have seen this is in cases where
> applications are trying to play games with the debugger or
> disassembler and hide what they are doing: they can offset
> the start of a function like this, and therefore all the
> instructions within that function.
>
This is not possible on PA-RISC. Indeed, user instruction addresses are
always
offset by three. There is no way to branch to an instruction that is
offset.
The least significant two bits of an instruction address contain a
priority level.
User code on linux and hpux executes at level 3. The only way a user
can change
privilege level is with a "gate" instruction (a special branch). Whether
this is
permitted or not depends on page table permissions that the user can't
change.
In practice, a level change is only allowed on the gateway page.
Dave
--
John David Anglin dave.anglin@bell.net
prev parent reply other threads:[~2015-12-24 16:51 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
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 [this message]
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=567C22AA.1000700@bell.net \
--to=dave.anglin@bell.net \
--cc=James.Bottomley@HansenPartnership.com \
--cc=deller@gmx.de \
--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