From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OqOHA-0001h6-KD for ltp-list@lists.sourceforge.net; Tue, 31 Aug 2010 10:41:12 +0000 Received: from mail.windriver.com ([147.11.1.11]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1OqOH7-0001ob-7S for ltp-list@lists.sourceforge.net; Tue, 31 Aug 2010 10:41:12 +0000 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id o7VAf2IA011227 for ; Tue, 31 Aug 2010 03:41:03 -0700 (PDT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01CB48F9.004B7039" Date: Tue, 31 Aug 2010 12:36:10 +0200 Message-ID: <52CF90264091A14888078A031D780F430D093D@ism-mail03.corp.ad.wrs.com> References: <4C7CDA7E.2020505@windriver.com> From: "Yang, Wei" Subject: [LTP] [PATCH] Probe an bigger linear available address to attachment. List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-list-bounces@lists.sourceforge.net To: ltp-list@lists.sourceforge.net This is a multi-part message in MIME format. ------_=_NextPart_001_01CB48F9.004B7039 Content-Type: multipart/alternative; boundary="----_=_NextPart_002_01CB48F9.004B7039" ------_=_NextPart_002_01CB48F9.004B7039 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: quoted-printable Hi When running shmat01 on some platforms, it fails on "addr =3D shmat(*(tc.shmid), base_addr + tc.offset,tc.flags);" with a INVAL error. Look at codes in "setup()", it probes an available address and align the address to SHMLBA. After alignment, the new address is no guarantee to be available any more. Here a bigger size is used to probe so that it's still valid address after alignment.Pertaining to the function=20 setup_tc(lc, &tc) ,when it outside of "for (i =3D 0; i < TST_TOTAL;=20 i++)",and printf the tc.offset value is always 0,add correct a mistake of original codes to move "setup_tc()" to right place. Signed-off-by: Yang Wei wei yang BR ------_=_NextPart_002_01CB48F9.004B7039 Content-Type: text/html; charset="GB2312" Content-Transfer-Encoding: quoted-printable [LTP][PATCH] Probe an bigger linear available address to = attachment.

Hi

When running shmat01 on some platforms, it fails on
"addr =3D shmat(*(tc.shmid), base_addr + = tc.offset,tc.flags);"
with a INVAL error. Look at codes in "setup()", it probes
an available address and align the address to SHMLBA. After
alignment, the new address is no guarantee to be available
any more. Here a bigger size is used to probe so that it's
still valid address after alignment.Pertaining to the function
setup_tc(lc, &tc) ,when it outside of "for (i =3D 0; i < = TST_TOTAL;
i++)",and printf the tc.offset value is always 0,add correct a = mistake
of original codes to move "setup_tc()" to right place.

Signed-off-by: Yang Wei <wei.yang@windriver.com>

wei yang
BR




------_=_NextPart_002_01CB48F9.004B7039-- ------_=_NextPart_001_01CB48F9.004B7039 Content-Type: text/x-diff; name="0001-Probe-an-bigger-linear-available-address-to-attachme.patch" Content-Transfer-Encoding: base64 Content-Description: 0001-Probe-an-bigger-linear-available-address-to-attachme.patch Content-Disposition: attachment; filename="0001-Probe-an-bigger-linear-available-address-to-attachme.patch" RnJvbSAyMmIyNGEzZDE2YTc1MWY2NTEyYTc2OTFhYmM0NmY5ZDc0NGMwOTFhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBZYW5nIFdlaSA8d3lhbmdAd2luZHJpdmVyLmNvbT4KRGF0ZTog VHVlLCAzMSBBdWcgMjAxMCAxODowMjoxNiArMDgwMApTdWJqZWN0OiBbUEFUQ0hdIFByb2JlIGFu IGJpZ2dlciBsaW5lYXIgYXZhaWxhYmxlIGFkZHJlc3MgdG8gYXR0YWNobWVudC4KCldoZW4gcnVu bmluZyBzaG1hdDAxIG9uIHNvbWUgcGxhdGZvcm1zLCBpdCBmYWlscyBvbgo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Q19F WENMKSkgPT0gLTEpIHsKKwkJdHN0X2Jya20oVEJST0ssIGNsZWFudXAsICJGYWlsZWQgdG8gY3Jl YXRlIHNoYXJlZCBtZW1vcnkgIgorCQkJICJyZXNvdXJjZSAxIGluIHNldHVwKCkiKTsKKwl9CisJ aWYgKChiYXNlX2FkZHIgPSBzaG1hdChzaG1faWRfMiwgTlVMTCwgMCkpID09ICh2b2lkICopLTEp IHsKIAkJdHN0X2Jya20oVEJST0ssIGNsZWFudXAsICJDb3VsZG4ndCBhdHRhY2ggc2hhcmVkIG1l bW9yeSIpOwogCX0KIAlpZiAoc2htZHQoKGNvbnN0IHZvaWQgKiliYXNlX2FkZHIpID09IC0xKSB7 CiAJCXRzdF9icmttKFRCUk9LLCBjbGVhbnVwLCAiQ291bGRuJ3QgZGV0YWNoIHNoYXJlZCBtZW1v cnkiKTsKIAl9CisJcm1fc2htKHNobV9pZF8yKTsKIAogCS8qIHNvbWUgYXJjaGl0ZWN0dXJlcyAo ZS5nLiBwYXJpc2MpIGFyZSBzdHJhbmdlLCBzbyBiZXR0ZXIgYWx3YXlzIGFsaWduIHRvCiAJICog bmV4dCBTSE1MQkEgYWRkcmVzcy4gKi8KLS0gCjEuNi4wLjQKCg== ------_=_NextPart_001_01CB48F9.004B7039 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ------_=_NextPart_001_01CB48F9.004B7039 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ------_=_NextPart_001_01CB48F9.004B7039-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Oqgqh-0002mC-BG for ltp-list@lists.sourceforge.net; Wed, 01 Sep 2010 06:31:07 +0000 Received: from mail-bw0-f47.google.com ([209.85.214.47]) by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Oqgqd-0005FT-8m for ltp-list@lists.sourceforge.net; Wed, 01 Sep 2010 06:31:07 +0000 Received: by bwz12 with SMTP id 12so6517351bwz.34 for ; Tue, 31 Aug 2010 23:30:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <52CF90264091A14888078A031D780F430D093D@ism-mail03.corp.ad.wrs.com> References: <4C7CDA7E.2020505@windriver.com> <52CF90264091A14888078A031D780F430D093D@ism-mail03.corp.ad.wrs.com> Date: Tue, 31 Aug 2010 23:30:57 -0700 Message-ID: From: Garrett Cooper Subject: Re: [LTP] [PATCH] Probe an bigger linear available address to attachment. List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: "Yang, Wei" Cc: ltp-list@lists.sourceforge.net 2010/8/31 Yang, Wei : > Hi > > When running shmat01 on some platforms, it fails on > "addr = shmat(*(tc.shmid), base_addr + tc.offset,tc.flags);" > with a INVAL error. Look at codes in "setup()", it probes > an available address and align the address to SHMLBA. After > alignment, the new address is no guarantee to be available > any more. Here a bigger size is used to probe so that it's > still valid address after alignment.Pertaining to the function > setup_tc(lc, &tc) ,when it outside of "for (i = 0; i < TST_TOTAL; > i++)",and printf the tc.offset value is always 0,add correct a mistake > of original codes to move "setup_tc()" to right place. Which of the sub-testcases fail and on which architecture(s)? Thanks, -Garrett ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OqO5M-0002h0-IH for ltp-list@lists.sourceforge.net; Tue, 31 Aug 2010 10:29:00 +0000 Received: from mail.windriver.com ([147.11.1.11]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1OqO5L-00078u-1s for ltp-list@lists.sourceforge.net; Tue, 31 Aug 2010 10:29:00 +0000 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id o7VASrQN008777 for ; Tue, 31 Aug 2010 03:28:53 -0700 (PDT) Message-ID: <4C7CDA7E.2020505@windriver.com> Date: Tue, 31 Aug 2010 18:33:34 +0800 From: yangzi MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030505070506090200050602" Subject: [LTP] [PATCH] Probe an bigger linear available address to attachment. List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-list-bounces@lists.sourceforge.net To: ltp-list@lists.sourceforge.net This is a multi-part message in MIME format. --------------030505070506090200050602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi When running shmat01 on some platforms, it fails on "addr = shmat(*(tc.shmid), base_addr + tc.offset,tc.flags);" with a INVAL error. Look at codes in "setup()", it probes an available address and align the address to SHMLBA. After alignment, the new address is no guarantee to be available any more. Here a bigger size is used to probe so that it's still valid address after alignment.Pertaining to the function setup_tc(lc, &tc) ,when it outside of "for (i = 0; i < TST_TOTAL; i++)",and printf the tc.offset value is always 0,add correct a mistake of original codes to move "setup_tc()" to right place. Signed-off-by: Yang Wei wei yang BR --------------030505070506090200050602 Content-Type: text/x-patch; name="0001-Probe-an-bigger-linear-available-address-to-attachme.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0001-Probe-an-bigger-linear-available-address-to-attachme.pa"; filename*1="tch" >From 22b24a3d16a751f6512a7691abc46f9d744c091a Mon Sep 17 00:00:00 2001 From: Yang Wei Date: Tue, 31 Aug 2010 18:02:16 +0800 Subject: [PATCH] Probe an bigger linear available address to attachment. When running shmat01 on some platforms, it fails on "addr = shmat(*(tc.shmid), base_addr + tc.offset,tc.flags);" with a EINVAL error. Look at codes in "setup()", it probes an available address and align the address to SHMLBA. After alignment, the new address is no guarantee to be available any more. Here a bigger size is used to probe so that it's still valid address after alignment.And correct a mistake of original codes to move "setup_tc()" to right place. Signed-off-by: Yang Wei --- testcases/kernel/syscalls/ipc/shmat/shmat01.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat01.c b/testcases/kernel/syscalls/ipc/shmat/shmat01.c index 4cb5eaf..ec6ae89 100644 --- a/testcases/kernel/syscalls/ipc/shmat/shmat01.c +++ b/testcases/kernel/syscalls/ipc/shmat/shmat01.c @@ -120,11 +120,12 @@ int main(int ac, char **av) /* reset Tst_count in case we are looping */ Tst_count = 0; - /* setup test case paremeters */ - setup_tc(lc, &tc); /* loop through the test cases */ for (i = 0; i < TST_TOTAL; i++) { + + /* setup test case paremeters */ + setup_tc(i, &tc); /* * Use TEST macro to make the call @@ -246,6 +247,8 @@ void check_functionality(int i) */ void setup(void) { + int shm_id_2; + /* capture signals */ tst_sig(NOFORK, DEF_HANDLER, cleanup); @@ -270,12 +273,18 @@ void setup(void) } /* Probe an available linear address for attachment */ - if ((base_addr = shmat(shm_id_1, NULL, 0)) == (void *)-1) { + if ((shm_id_2 = shmget(shmkey++, SHMLBA + INT_SIZE, SHM_RW | IPC_CREAT | + IPC_EXCL)) == -1) { + tst_brkm(TBROK, cleanup, "Failed to create shared memory " + "resource 1 in setup()"); + } + if ((base_addr = shmat(shm_id_2, NULL, 0)) == (void *)-1) { tst_brkm(TBROK, cleanup, "Couldn't attach shared memory"); } if (shmdt((const void *)base_addr) == -1) { tst_brkm(TBROK, cleanup, "Couldn't detach shared memory"); } + rm_shm(shm_id_2); /* some architectures (e.g. parisc) are strange, so better always align to * next SHMLBA address. */ -- 1.6.0.4 --------------030505070506090200050602 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd --------------030505070506090200050602 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list --------------030505070506090200050602-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OqhH9-0003en-7R for ltp-list@lists.sourceforge.net; Wed, 01 Sep 2010 06:58:27 +0000 Received: from mail.windriver.com ([147.11.1.11]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1OqhH4-0002NK-Rn for ltp-list@lists.sourceforge.net; Wed, 01 Sep 2010 06:58:27 +0000 Message-ID: <4C7DFAAB.9060704@windriver.com> Date: Wed, 01 Sep 2010 15:03:07 +0800 From: yangzi MIME-Version: 1.0 References: <4C7CDA7E.2020505@windriver.com> <52CF90264091A14888078A031D780F430D093D@ism-mail03.corp.ad.wrs.com> In-Reply-To: Subject: Re: [LTP] [PATCH] Probe an bigger linear available address to attachment. List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: Garrett Cooper Cc: ltp-list@lists.sourceforge.net Hi It failed on the first sub-testcase and on the mips architecture. Thanks wei.yang Garrett Cooper wrote: > 2010/8/31 Yang, Wei : >> Hi >> >> When running shmat01 on some platforms, it fails on >> "addr = shmat(*(tc.shmid), base_addr + tc.offset,tc.flags);" >> with a INVAL error. Look at codes in "setup()", it probes >> an available address and align the address to SHMLBA. After >> alignment, the new address is no guarantee to be available >> any more. Here a bigger size is used to probe so that it's >> still valid address after alignment.Pertaining to the function >> setup_tc(lc, &tc) ,when it outside of "for (i = 0; i < TST_TOTAL; >> i++)",and printf the tc.offset value is always 0,add correct a mistake >> of original codes to move "setup_tc()" to right place. > > Which of the sub-testcases fail and on which architecture(s)? > Thanks, > -Garrett ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OseNl-0001T3-97 for ltp-list@lists.sourceforge.net; Mon, 06 Sep 2010 16:17:21 +0000 Received: from e3.ny.us.ibm.com ([32.97.182.143]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1OseNk-00051L-Ag for ltp-list@lists.sourceforge.net; Mon, 06 Sep 2010 16:17:21 +0000 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o86G1YBD023241 for ; Mon, 6 Sep 2010 12:01:34 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o86GHE4U091346 for ; Mon, 6 Sep 2010 12:17:14 -0400 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o86GHD8t003729 for ; Mon, 6 Sep 2010 10:17:13 -0600 From: Subrata Modak In-Reply-To: <52CF90264091A14888078A031D780F430D093D@ism-mail03.corp.ad.wrs.com> References: <4C7CDA7E.2020505@windriver.com> <52CF90264091A14888078A031D780F430D093D@ism-mail03.corp.ad.wrs.com> Date: Mon, 06 Sep 2010 21:46:49 +0530 Message-Id: <1283789810.4947.21.camel@subratamodak.linux.ibm.com> Mime-Version: 1.0 Subject: Re: [LTP] [PATCH] Probe an bigger linear available address to attachment. Reply-To: subrata@linux.vnet.ibm.com List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: Garrett Cooper Cc: ltp-list@lists.sourceforge.net, "Yang, Wei" Garret, this patch ? Regards-- Subrata On Tue, 2010-08-31 at 12:36 +0200, Yang, Wei wrote: > Hi > > When running shmat01 on some platforms, it fails on > "addr = shmat(*(tc.shmid), base_addr + tc.offset,tc.flags);" > with a INVAL error. Look at codes in "setup()", it probes > an available address and align the address to SHMLBA. After > alignment, the new address is no guarantee to be available > any more. Here a bigger size is used to probe so that it's > still valid address after alignment.Pertaining to the function > setup_tc(lc, &tc) ,when it outside of "for (i = 0; i < TST_TOTAL; > i++)",and printf the tc.offset value is always 0,add correct a mistake > of original codes to move "setup_tc()" to right place. > > Signed-off-by: Yang Wei > > wei yang > BR > > > > > > > ------------------------------------------------------------------------------ > This SF.net Dev2Dev email is sponsored by: > > Show off your parallel programming skills. > Enter the Intel(R) Threading Challenge 2010. > http://p.sf.net/sfu/intel-thread-sfd > _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list