From: liubo <liubo2009@cn.fujitsu.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] syscalls: fix some failure on arch X86_64
Date: Tue, 22 Dec 2009 21:12:30 +0800 [thread overview]
Message-ID: <4B30C5BE.203@cn.fujitsu.com> (raw)
In-Reply-To: <364299f40912211851w3aaf2ab4t9ea3342dcf6b12f7@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3029 bytes --]
On 12/22/2009 10:51 AM, Garrett Cooper wrote:
> On Fri, Dec 18, 2009 at 8:03 AM, Subrata Modak
> <subrata@linux.vnet.ibm.com> wrote:
>
>> Garret,
>>
>> Not sure if you applied this :-(
>>
>> Regards--
>> Subrata
>>
>> On Wed, 2009-12-09 at 15:34 +0800, liubo wrote:
>>
>>> Here is the patch, which contains lots of adjustments
>>> on style, so it might be a bit huge.
>>>
>>> Testcase 1. rt_sigaction01
>>> On arch x86_64, if we directly get to call syscall
>>> rt_sigaction, there will be "segment fault".
>>> 1) One reason is that we must supply the flag of
>>> "SA_RESTORER" and the correct pointer to the fuction
>>> "restorer", according to the kernel code.
>>> 2) The other reason is that default syscall rt_sigaction
>>> use kernel "sigaction" structure, which is different
>>> with normal "sigaction" structure.
>>>
>>> So,
>>> 1) We manage to find the address of the function
>>> "restorer" by using glibc function "sigaction",
>>> which might be something tricky. Then we add these
>>> arguments to make test run correctly.
>>> 2) We also use kernel "sigaction" structure to fit
>>> realtime syscall __NR_rt_sigaction.
>>>
>>> Testcase 2. rt_sigprocmask01
>>> First, there exsits the same problem as rt_sigaction01.
>>> Second, this testcase uses a unchanged signal number 33,
>>> which may diff among different archs and lead to error
>>> "unknown signal".
>>>
>>> So, we use a macro TEST_SIG which refers to SIGRTMIN
>>> to replace 33.
>>>
>>> Testcase 3. rt_sigsuspend01
>>> There exists the same problem as rt_sigaction01.
>>>
>>> This patch fixed these failure.
>>>
>
> No, I didn't commit this because it's long, and I'm not sure if
> it's doing the right thing as per my research over the past couple of
> weeks. These tests are tricky because it requires a particular formula
> of preset variables and structures in order to properly use
> rt_sigaction, and that's where we're running into issues with them on
> x86_64 -- because the syscall implementers decided to remain sort of
> backwards compatible with x86, and that's why it's such a mess to deal
> with.
> I will look at the diff and pick out which parts are of value, but
> a lot of this diff's contents are basically reverting the changes that
> I made this month.
> Thanks,
> -Garrett
>
>
>
Hi, Garrett,
In my patch, I adopted a kind of method which is different from
your previous changes about this.
I try to find the address of "restore_rt" which is needed by
syscall rt_sigaction, and I managed to get this address by
tracing glibc function "sigaction".
After doing these, I also found rt_sigaction's "sigaction" struct is
different from normal "sigaction" struct, so when copy from normal
"sigaction" struct to rt_sigaction's kernel "sigaction" struct, some
kind of segmental fault will ocurr to us.
So, I did some changes to revert your previous changes and directly
adopted the function "restore_rt" and kernel "sigaction" struct to fix
these bugs.
Hope these are helpful to you.
Thanks,
-Liu Bo
[-- Attachment #1.2: Type: text/html, Size: 3605 bytes --]
[-- Attachment #2: Type: text/plain, Size: 390 bytes --]
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-12-22 13:11 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 7:34 [LTP] [PATCH] syscalls: fix some failure on arch X86_64 liubo
2009-12-09 12:14 ` Subrata Modak
2009-12-18 16:03 ` Subrata Modak
2009-12-22 2:51 ` Garrett Cooper
2009-12-22 13:12 ` liubo [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-02-22 9:20 liubo
2010-02-22 14:45 ` Rishikesh K Rajak
2010-02-22 5:21 liubo
2010-02-22 7:56 ` Garrett Cooper
2010-02-22 9:08 ` liubo
2010-02-22 18:05 ` Garrett Cooper
2010-02-23 0:59 ` liubo
2010-02-25 7:26 ` liubo
2010-02-25 10:00 ` Garrett Cooper
2010-02-26 0:35 ` liubo
2010-02-27 4:12 ` Garrett Cooper
2009-11-10 9:38 liubo
2009-11-11 1:28 ` liubo
2009-11-11 4:14 ` Garrett Cooper
2009-11-11 4:30 ` Wei Yongjun
2009-11-11 5:22 ` liubo
2009-11-11 4:33 ` Mike Frysinger
2009-11-11 5:03 ` Wei Yongjun
2009-11-16 8:13 ` Subrata Modak
2009-11-16 8:53 ` liubo
2009-11-26 11:11 ` Garrett Cooper
2009-11-27 5:33 ` liubo
2009-11-27 6:49 ` Garrett Cooper
2009-11-27 8:50 ` Garrett Cooper
2009-11-27 10:07 ` liubo
2009-11-27 22:18 ` Garrett Cooper
2009-11-29 1:22 ` Wei Yongjun
2009-12-01 0:00 ` Garrett Cooper
2009-12-09 7:29 ` liubo
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=4B30C5BE.203@cn.fujitsu.com \
--to=liubo2009@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=yanegomi@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.