[PATCH] arm: make it one-personality arch
Dmitry V. Levin
ldv at altlinux.org
Wed Feb 20 23:16:21 UTC 2013
On Wed, Feb 20, 2013 at 07:08:13PM +0100, Denys Vlasenko wrote:
> ARM in fact _is_ one personality.
>
> We have two personalities for it because it has a handful of
> syscalls with huge scnos (0x000f00xx).
>
> Extending syscall table to have [0x000f0005] index is of course
> not a good idea.
>
> Someone decided to handle that by having a separate personality
> just for these syscalls.
>
> But multi-personality arch does a bit more work in other parts:
> grep for "SUPPORTED_PERSONALITIES > 1".
>
> This patch is another alternative: "move" 0x000f00nn syscalls
> down to the entries just above last ordinary syscall,
> by manipulating scno if it falls into the 0x000f00xx range.
>
> Yet another alternative is to simply treat all 0x000f00nn syscalls
> as "undefined" - print them as "syscall_nnn" as we do now
> for undefined syscalls.
> This alternative can be realized by removing from this patch
> the code block below "//TODO: why bother?" comment.
> This would be almost as good as what we have now:
> all these "special syscalls" are printargs anyway.
> The _ONLY_ thing we do for them now is we supply
> somewhat meaningful names for them.
>
> Please review and let me know what you think.
I'm not quite comfortable with remapping "odd" syscall numbers from
(ARM_NUM_ORDINARY_SYSCALLS1; ARM_NUM_ORDINARY_SYSCALLS + ARM_LAST_SPECIAL_SYSCALL]
interval to
(0x000f0000; 0x000f0000 + ARM_LAST_SPECIAL_SYSCALL] interval
because they would be displayed as "syscall_nnn" with "nnn" different
from their real values.
Besides that, the change looks OK.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20130221/48d12308/attachment.bin>
More information about the Strace-devel
mailing list