From: Yao Qi <qiyaoltc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Set unknown_syscall differently on arm linux
Date: Wed, 29 Jun 2016 13:56:00 -0000 [thread overview]
Message-ID: <CAH=s-PNNpGsCcjzLZpOFa7i5ZA1_+xNPPA-Kva-Ddx_10WaY1w@mail.gmail.com> (raw)
In-Reply-To: <9e39007b-b89a-4f54-02f3-fc76a77f91cd@redhat.com>
On Wed, Jun 29, 2016 at 10:53 AM, Pedro Alves <palves@redhat.com> wrote:
> On 06/28/2016 10:26 AM, Yao Qi wrote:
>> Currently, we use 123456789 as unknown or illegal syscall number, and
>> expect program return ENOSYS. Although 123456789 is an illegal syscall
>> number on arm linux, kernel sends SIGILL rather than returns -ENOSYS.
>> However, arm linux kernel returns -ENOSYS if syscall number is within
>> 0xf0001..0xf07ff, so we can use 0xf07ff for unknown_syscall in test.
>>
>
> I think it'd be good if this was converted to a comment in the source.
>
OK, I move them into the comments as below,
+#if defined(__arm__)
+/* Although 123456789 is an illegal syscall umber on arm linux, kernel
+ sends SIGILL rather than returns -ENOSYS. However, arm linux kernel
+ returns -ENOSYS if syscall number is within 0xf0001..0xf07ff, so we
+ can use 0xf07ff for unknown_syscall in test. */
+int unknown_syscall = 0x0f07ff;
+#else
int unknown_syscall = 123456789;
+#endif
patch is pushed in.
--
Yao (齐尧)
next prev parent reply other threads:[~2016-06-29 13:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 9:26 Yao Qi
2016-06-29 9:53 ` Pedro Alves
2016-06-29 13:56 ` Yao Qi [this message]
2016-06-29 17:41 ` Mike Frysinger
2016-06-30 7:52 ` Yao Qi
2016-06-30 12:58 ` Mike Frysinger
2016-06-30 14:48 ` Yao Qi
2016-07-04 2:20 ` Mike Frysinger
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='CAH=s-PNNpGsCcjzLZpOFa7i5ZA1_+xNPPA-Kva-Ddx_10WaY1w@mail.gmail.com' \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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