public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
@ 2012-03-14 14:53 Jan Stancek
  2012-03-15  1:09 ` Wanlong Gao
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Stancek @ 2012-03-14 14:53 UTC (permalink / raw)
  To: ltp-list; +Cc: Jeffrey Burke

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]


Testcase 1.3 - EINVAL: uninitialized iocb
is about submitting uninitialized iocb structure.

Test is expecting to get -EINVAL, but other values are also
possible as uninitialized struct can contain any values.

For example following data fails with -EBADF:
--- snip ---
unsigned char bad_iocb[64] = {
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x84, 0xa5,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x30,
     0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x40,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
memcpy(&iocb, bad_iocb, sizeof(iocb));
iocbs[0] = &iocb;
TEST(io_submit(ctx, 1, iocbs));
check_result(-EINVAL, TEST_RETURN);
--- snip ---

This patch accepts also few other errno codes as valid return value.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
  testcases/kernel/syscalls/io_submit/io_submit01.c |   16 +++++++++++++++-
  1 files changed, 15 insertions(+), 1 deletions(-)



[-- Attachment #2: 0001-io_submit-uninitialized-iocb-may-not-return-EINVAL.patch --]
[-- Type: text/x-patch, Size: 991 bytes --]

diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
index da15aa0..3983fa4 100644
--- a/testcases/kernel/syscalls/io_submit/io_submit01.c
+++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
@@ -126,7 +126,21 @@ int main(int argc, char *argv[])
 		/* 1.3 - EINVAL: uninitialized iocb */
 		iocbs[0] = &iocb;
 		TEST(io_submit(ctx, 1, iocbs));
-		check_result(-EINVAL, TEST_RETURN);
+		switch(TEST_RETURN) {
+			case -EINVAL:
+			case -EBADF:
+			case -EFAULT:
+			case -EPERM:
+				tst_resm(TPASS, "expected failure - "
+						"returned value = %ld : %s",
+						TEST_RETURN, strerror(-1 * TEST_RETURN));
+				break;
+			default:
+				tst_resm(TFAIL, "unexpected failure - "
+						"returned value = %ld : %s, "
+						"expected one of -EINVAL, -EBADF, -EFAULT, -EPERM",
+						TEST_RETURN, strerror(-1 * TEST_RETURN));
+		}
 
 		/* 2 - EFAULT: iocb points to invalid data */
 		TEST(io_submit(ctx, 1, (struct iocb **)-1));


[-- Attachment #3: Type: text/plain, Size: 317 bytes --]

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
  2012-03-14 14:53 [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL Jan Stancek
@ 2012-03-15  1:09 ` Wanlong Gao
  2012-03-15  2:09   ` Wanlong Gao
  2012-03-15  7:48   ` Jan Stancek
  0 siblings, 2 replies; 10+ messages in thread
From: Wanlong Gao @ 2012-03-15  1:09 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke

Hi Jan,

> 
> Testcase 1.3 - EINVAL: uninitialized iocb
> is about submitting uninitialized iocb structure.
> 
> Test is expecting to get -EINVAL, but other values are also
> possible as uninitialized struct can contain any values.
> 
> For example following data fails with -EBADF:
> --- snip ---
> unsigned char bad_iocb[64] = {
>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>     0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x84, 0xa5,
>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>     0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x30,
>     0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x40,
>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
> memcpy(&iocb, bad_iocb, sizeof(iocb));
> iocbs[0] = &iocb;
> TEST(io_submit(ctx, 1, iocbs));
> check_result(-EINVAL, TEST_RETURN);
> --- snip ---
> 
> This patch accepts also few other errno codes as valid return value.
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  testcases/kernel/syscalls/io_submit/io_submit01.c |   16 +++++++++++++++-
>  1 files changed, 15 insertions(+), 1 deletions(-)
> 
> 
> 
> 0001-io_submit-uninitialized-iocb-may-not-return-EINVAL.patch
> 
> 
> diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
> index da15aa0..3983fa4 100644
> --- a/testcases/kernel/syscalls/io_submit/io_submit01.c
> +++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
> @@ -126,7 +126,21 @@ int main(int argc, char *argv[])
>  		/* 1.3 - EINVAL: uninitialized iocb */
>  		iocbs[0] = &iocb;
>  		TEST(io_submit(ctx, 1, iocbs));
> -		check_result(-EINVAL, TEST_RETURN);
> +		switch(TEST_RETURN) {
> +			case -EINVAL:
> +			case -EBADF:
> +			case -EFAULT:
> +			case -EPERM:


I don't think io_submit(2) can return -EPERM.

Do you think so?

Thanks,
Wanlong Gao

> +				tst_resm(TPASS, "expected failure - "
> +						"returned value = %ld : %s",
> +						TEST_RETURN, strerror(-1 * TEST_RETURN));
> +				break;
> +			default:
> +				tst_resm(TFAIL, "unexpected failure - "
> +						"returned value = %ld : %s, "
> +						"expected one of -EINVAL, -EBADF, -EFAULT, -EPERM",
> +						TEST_RETURN, strerror(-1 * TEST_RETURN));
> +		}
>  
>  		/* 2 - EFAULT: iocb points to invalid data */
>  		TEST(io_submit(ctx, 1, (struct iocb **)-1));
> 
> 



------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
  2012-03-15  1:09 ` Wanlong Gao
@ 2012-03-15  2:09   ` Wanlong Gao
  2012-03-15  7:48   ` Jan Stancek
  1 sibling, 0 replies; 10+ messages in thread
From: Wanlong Gao @ 2012-03-15  2:09 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke

Hi Jan,

> Hi Jan,
> 
>>
>> Testcase 1.3 - EINVAL: uninitialized iocb
>> is about submitting uninitialized iocb structure.
>>
>> Test is expecting to get -EINVAL, but other values are also
>> possible as uninitialized struct can contain any values.
>>
>> For example following data fails with -EBADF:
>> --- snip ---
>> unsigned char bad_iocb[64] = {
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x84, 0xa5,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>     0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x30,
>>     0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x40,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
>> memcpy(&iocb, bad_iocb, sizeof(iocb));
>> iocbs[0] = &iocb;
>> TEST(io_submit(ctx, 1, iocbs));
>> check_result(-EINVAL, TEST_RETURN);
>> --- snip ---
>>
>> This patch accepts also few other errno codes as valid return value.
>>
>> Signed-off-by: Jan Stancek <jstancek@redhat.com>
>> ---
>>  testcases/kernel/syscalls/io_submit/io_submit01.c |   16 +++++++++++++++-
>>  1 files changed, 15 insertions(+), 1 deletions(-)
>>
>>
>>
>> 0001-io_submit-uninitialized-iocb-may-not-return-EINVAL.patch
>>
>>
>> diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
>> index da15aa0..3983fa4 100644
>> --- a/testcases/kernel/syscalls/io_submit/io_submit01.c
>> +++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
>> @@ -126,7 +126,21 @@ int main(int argc, char *argv[])
>>  		/* 1.3 - EINVAL: uninitialized iocb */
>>  		iocbs[0] = &iocb;
>>  		TEST(io_submit(ctx, 1, iocbs));
>> -		check_result(-EINVAL, TEST_RETURN);
>> +		switch(TEST_RETURN) {
>> +			case -EINVAL:
>> +			case -EBADF:


Here the coding style should like:

	switch() {
	case xx:
	case xx:

but not:
	switch() {
		case xx:
		case xx:

Thanks,
Wanlong Gao

>> +			case -EFAULT:
>> +			case -EPERM:
> 
> 
> I don't think io_submit(2) can return -EPERM.
> 
> Do you think so?
> 
> Thanks,
> Wanlong Gao
> 
>> +				tst_resm(TPASS, "expected failure - "
>> +						"returned value = %ld : %s",
>> +						TEST_RETURN, strerror(-1 * TEST_RETURN));
>> +				break;
>> +			default:
>> +				tst_resm(TFAIL, "unexpected failure - "
>> +						"returned value = %ld : %s, "
>> +						"expected one of -EINVAL, -EBADF, -EFAULT, -EPERM",
>> +						TEST_RETURN, strerror(-1 * TEST_RETURN));
>> +		}
>>  
>>  		/* 2 - EFAULT: iocb points to invalid data */
>>  		TEST(io_submit(ctx, 1, (struct iocb **)-1));
>>
>>
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 



------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
  2012-03-15  1:09 ` Wanlong Gao
  2012-03-15  2:09   ` Wanlong Gao
@ 2012-03-15  7:48   ` Jan Stancek
  2012-03-15  7:56     ` Wanlong Gao
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Stancek @ 2012-03-15  7:48 UTC (permalink / raw)
  To: gaowanlong; +Cc: ltp-list, Jeffrey Burke



----- Original Message -----
> From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp-list@lists.sourceforge.net, "Jeffrey Burke" <jburke@redhat.com>
> Sent: Thursday, March 15, 2012 2:09:48 AM
> Subject: Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
> 
> Hi Jan,
> 
> > 
> > Testcase 1.3 - EINVAL: uninitialized iocb
> > is about submitting uninitialized iocb structure.
> > 
> > Test is expecting to get -EINVAL, but other values are also
> > possible as uninitialized struct can contain any values.
> > 
> > For example following data fails with -EBADF:
> > --- snip ---
> > unsigned char bad_iocb[64] = {
> >     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> >     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> >     0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x84, 0xa5,
> >     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> >     0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x30,
> >     0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x40,
> >     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> >     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
> > memcpy(&iocb, bad_iocb, sizeof(iocb));
> > iocbs[0] = &iocb;
> > TEST(io_submit(ctx, 1, iocbs));
> > check_result(-EINVAL, TEST_RETURN);
> > --- snip ---
> > 
> > This patch accepts also few other errno codes as valid return
> > value.
> > 
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > ---
> >  testcases/kernel/syscalls/io_submit/io_submit01.c |   16
> >  +++++++++++++++-
> >  1 files changed, 15 insertions(+), 1 deletions(-)
> > 
> > 
> > 
> > 0001-io_submit-uninitialized-iocb-may-not-return-EINVAL.patch
> > 
> > 
> > diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c
> > b/testcases/kernel/syscalls/io_submit/io_submit01.c
> > index da15aa0..3983fa4 100644
> > --- a/testcases/kernel/syscalls/io_submit/io_submit01.c
> > +++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
> > @@ -126,7 +126,21 @@ int main(int argc, char *argv[])
> >  		/* 1.3 - EINVAL: uninitialized iocb */
> >  		iocbs[0] = &iocb;
> >  		TEST(io_submit(ctx, 1, iocbs));
> > -		check_result(-EINVAL, TEST_RETURN);
> > +		switch(TEST_RETURN) {
> > +			case -EINVAL:
> > +			case -EBADF:
> > +			case -EFAULT:
> > +			case -EPERM:
> 
> 
> I don't think io_submit(2) can return -EPERM.
> 
> Do you think so?

I was trying all sorts of random data and I remember seeing once "-1".
I'm failing to reproduce it today, so I could be wrong. If I fail to find
data that gives -EPERM, I'll remove it in v2.

Regards,
Jan

> 
> Thanks,
> Wanlong Gao
> 


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
  2012-03-15  7:48   ` Jan Stancek
@ 2012-03-15  7:56     ` Wanlong Gao
  0 siblings, 0 replies; 10+ messages in thread
From: Wanlong Gao @ 2012-03-15  7:56 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke

Hi Jan,

>>> --- a/testcases/kernel/syscalls/io_submit/io_submit01.c
>>> +++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
>>> @@ -126,7 +126,21 @@ int main(int argc, char *argv[])
>>>  		/* 1.3 - EINVAL: uninitialized iocb */
>>>  		iocbs[0] = &iocb;
>>>  		TEST(io_submit(ctx, 1, iocbs));
>>> -		check_result(-EINVAL, TEST_RETURN);
>>> +		switch(TEST_RETURN) {
>>> +			case -EINVAL:
>>> +			case -EBADF:
>>> +			case -EFAULT:
>>> +			case -EPERM:
>>
>>
>> I don't think io_submit(2) can return -EPERM.
>>
>> Do you think so?
> 
> I was trying all sorts of random data and I remember seeing once "-1".
> I'm failing to reproduce it today, so I could be wrong. If I fail to find
> data that gives -EPERM, I'll remove it in v2.


I looked into the io_submit(2) code in kernel and didn't see any path can
return -EPERM, so I think you should confirm on it again.

Thanks,
Wanlong Gao

> 
> Regards,
> Jan
> 
>>
>> Thanks,
>> Wanlong Gao
>>
> 
> 



------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
@ 2012-07-05 13:03 Nitin Yadav
  0 siblings, 0 replies; 10+ messages in thread
From: Nitin Yadav @ 2012-07-05 13:03 UTC (permalink / raw)
  To: gaowanlong; +Cc: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 13600 bytes --]

Hi ,

 

I getting below error because of io_submit return -1 EINVAL(after
appling the patch), while running the aio_tio in Linux 3.2 kernel.
 

 ltp/testcases/kernel/io/aio/aio02# ./aio_tio

aio02/aio_tio    0  TINFO  :  Running test 1

 

aio02/aio_tio    0  TINFO  :  Running test 2

 

aio02/aio_tio    0  TINFO  :  Running test 3

 

aio02/aio_tio    0  TINFO  :  Running test 4

 

aio02/aio_tio    0  TINFO  :  Running test 5

 

aio02/aio_tio    0  TINFO  :  Running test 6

 

aio02/aio_tio    0  TINFO  :  Running test 7

 

aio02/aio_tio    0  TINFO  :  myctx = 2843729920l

io_fsync write: Invalid argument

 

while doing strace I came to know that io_submit returns -1 EINVAL,
please see the below trace for error(highlighted in RED) .

 

ltp-full-20120614/testcases/kernel/io/aio/aio02# strace ./aio_tio

execve("./aio_tio", ["./aio_tio"], [/* 15 vars */]) = 0

brk(0)                                  = 0x1b0c000

access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)

mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fc145623000

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)

open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=30650, ...}) = 0

mmap(NULL, 30650, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc14561b000

close(3)                                = 0

access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)

open("/lib/libaio.so.1", O_RDONLY)      = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\5\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0

mmap(NULL, 2099936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fc145207000

mprotect(0x7fc145208000, 2093056, PROT_NONE) = 0

mmap(0x7fc145407000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7fc145407000

close(3)                                = 0

access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)

open("/lib/libc.so.6", O_RDONLY)        = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\355\1\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=1437064, ...}) = 0

mmap(NULL, 3545160, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fc144ea5000

mprotect(0x7fc144ffe000, 2093056, PROT_NONE) = 0

mmap(0x7fc1451fd000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158000) = 0x7fc1451fd000

mmap(0x7fc145202000, 18504, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc145202000

close(3)                                = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fc14561a000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fc145619000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fc145618000

arch_prctl(ARCH_SET_FS, 0x7fc145619700) = 0

mprotect(0x7fc1451fd000, 16384, PROT_READ) = 0

mprotect(0x7fc145625000, 4096, PROT_READ) = 0

munmap(0x7fc14561b000, 30650)           = 0

getpid()                                = 29055

mkdir("/tmp/aio12Pn7B", 0700)           = 0

brk(0)                                  = 0x1b0c000

brk(0x1b2d000)                          = 0x1b2d000

getgid()                                = 0

chown("/tmp/aio12Pn7B", 4294967295, 0)  = 0

chmod("/tmp/aio12Pn7B", 0777)           = 0

chdir("/tmp/aio12Pn7B")                 = 0

fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fc145622000

write(1, "aio02/aio_tio    0  TINFO  :  Ru"..., 45aio02/aio_tio    0
TINFO  :  Running test 1

) = 45

write(1, "\n", 1

)                       = 1

open("file1", O_WRONLY|O_CREAT|O_TRUNC|O_DIRECT, 0644) = 3

io_setup(32, {140468069470208})         = 0

brk(0x1b5d000)                          = 0x1b5d000

brk(0x1b8d000)                          = 0x1b8d000

brk(0x1bae000)                          = 0x1bae000

brk(0x1bde000)                          = 0x1bde000

brk(0x1c0e000)                          = 0x1c0e000

brk(0x1c2f000)                          = 0x1c2f000

brk(0x1c5f000)                          = 0x1c5f000

brk(0x1c8f000)                          = 0x1c8f000

brk(0x1cb0000)                          = 0x1cb0000

brk(0x1ce0000)                          = 0x1ce0000

brk(0x1d10000)                          = 0x1d10000

brk(0x1d31000)                          = 0x1d31000

io_submit(140468069470208, 32, {...})   = 32

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 32

close(3)                                = 0

brk(0x1b2d000)                          = 0x1b2d000

io_destroy(140468069470208)             = 0

write(1, "aio02/aio_tio    0  TINFO  :  Ru"..., 46aio02/aio_tio    0
TINFO  :  Running test 2

 

) = 46

open("file1", O_RDONLY|O_DIRECT)        = 3

io_setup(32, {140468069470208})         = 0

brk(0x1b5d000)                          = 0x1b5d000

brk(0x1b8d000)                          = 0x1b8d000

brk(0x1bae000)                          = 0x1bae000

brk(0x1bde000)                          = 0x1bde000

brk(0x1c0e000)                          = 0x1c0e000

brk(0x1c2f000)                          = 0x1c2f000

brk(0x1c5f000)                          = 0x1c5f000

brk(0x1c8f000)                          = 0x1c8f000

brk(0x1cb0000)                          = 0x1cb0000

brk(0x1ce0000)                          = 0x1ce0000

brk(0x1d10000)                          = 0x1d10000

brk(0x1d31000)                          = 0x1d31000

io_submit(140468069470208, 32, {...})   = 32

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 4

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 3

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 2

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 4

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 1

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 2

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 3

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 2

close(3)                                = 0

brk(0x1b2d000)                          = 0x1b2d000

io_destroy(140468069470208)             = 0

write(1, "aio02/aio_tio    0  TINFO  :  Ru"..., 46aio02/aio_tio    0
TINFO  :  Running test 3

 

) = 46

open("file1", O_RDWR|O_TRUNC)           = 3

io_setup(32, {140468069470208})         = 0

brk(0x1b5d000)                          = 0x1b5d000

brk(0x1b8d000)                          = 0x1b8d000

brk(0x1bae000)                          = 0x1bae000

brk(0x1bde000)                          = 0x1bde000

brk(0x1c0e000)                          = 0x1c0e000

brk(0x1c2f000)                          = 0x1c2f000

brk(0x1c5f000)                          = 0x1c5f000

brk(0x1c8f000)                          = 0x1c8f000

brk(0x1cb0000)                          = 0x1cb0000

brk(0x1ce0000)                          = 0x1ce0000

brk(0x1d10000)                          = 0x1d10000

brk(0x1d31000)                          = 0x1d31000

io_submit(140468069470208, 32, {...})   = 32

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 32

close(3)                                = 0

brk(0x1b2d000)                          = 0x1b2d000

io_destroy(140468069470208)             = 0

write(1, "aio02/aio_tio    0  TINFO  :  Ru"..., 46aio02/aio_tio    0
TINFO  :  Running test 4

 

) = 46

open("file1", O_RDWR)                   = 3

io_setup(32, {140468069470208})         = 0

brk(0x1b5d000)                          = 0x1b5d000

brk(0x1b8d000)                          = 0x1b8d000

brk(0x1bae000)                          = 0x1bae000

brk(0x1bde000)                          = 0x1bde000

brk(0x1c0e000)                          = 0x1c0e000

brk(0x1c2f000)                          = 0x1c2f000

brk(0x1c5f000)                          = 0x1c5f000

brk(0x1c8f000)                          = 0x1c8f000

brk(0x1cb0000)                          = 0x1cb0000

brk(0x1ce0000)                          = 0x1ce0000

brk(0x1d10000)                          = 0x1d10000

brk(0x1d31000)                          = 0x1d31000

io_submit(140468069470208, 32, {...})   = 32

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 32

close(3)                                = 0

brk(0x1b2d000)                          = 0x1b2d000

io_destroy(140468069470208)             = 0

write(1, "aio02/aio_tio    0  TINFO  :  Ru"..., 46aio02/aio_tio    0
TINFO  :  Running test 5

 

) = 46

open("file1", O_WRONLY|O_TRUNC)         = 3

io_setup(32, {140468069470208})         = 0

brk(0x1b5d000)                          = 0x1b5d000

brk(0x1b8d000)                          = 0x1b8d000

brk(0x1bae000)                          = 0x1bae000

brk(0x1bde000)                          = 0x1bde000

brk(0x1c0e000)                          = 0x1c0e000

brk(0x1c2f000)                          = 0x1c2f000

brk(0x1c5f000)                          = 0x1c5f000

brk(0x1c8f000)                          = 0x1c8f000

brk(0x1cb0000)                          = 0x1cb0000

brk(0x1ce0000)                          = 0x1ce0000

brk(0x1d10000)                          = 0x1d10000

brk(0x1d31000)                          = 0x1d31000

io_submit(140468069470208, 32, {...})   = 32

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 32

close(3)                                = 0

brk(0x1b2d000)                          = 0x1b2d000

io_destroy(140468069470208)             = 0

write(1, "aio02/aio_tio    0  TINFO  :  Ru"..., 47aio02/aio_tio    0
TINFO  :  Running test 6

 

) = 47

open("file1", O_RDONLY)                 = 3

io_setup(32, {140468069470208})         = 0

brk(0x1b5d000)                          = 0x1b5d000

brk(0x1b8d000)                          = 0x1b8d000

brk(0x1bae000)                          = 0x1bae000

brk(0x1bde000)                          = 0x1bde000

brk(0x1c0e000)                          = 0x1c0e000

brk(0x1c2f000)                          = 0x1c2f000

brk(0x1c5f000)                          = 0x1c5f000

brk(0x1c8f000)                          = 0x1c8f000

brk(0x1cb0000)                          = 0x1cb0000

brk(0x1ce0000)                          = 0x1ce0000

brk(0x1d10000)                          = 0x1d10000

brk(0x1d31000)                          = 0x1d31000

io_submit(140468069470208, 32, {...})   = 32

io_getevents(140468069470208, 1, 32, {...}{30, 0}) = 32

close(3)                                = 0

brk(0x1b2d000)                          = 0x1b2d000

io_destroy(140468069470208)             = 0

write(1, "aio02/aio_tio    0  TINFO  :  Ru"..., 47aio02/aio_tio    0
TINFO  :  Running test 7

 

) = 47

open("file2", O_WRONLY|O_CREAT|O_TRUNC|O_DIRECT, 0644) = 3

io_setup(32, {140468069470208})         = 0

brk(0x1b5d000)                          = 0x1b5d000

brk(0x1b8d000)                          = 0x1b8d000

brk(0x1bae000)                          = 0x1bae000

brk(0x1bde000)                          = 0x1bde000

brk(0x1c0e000)                          = 0x1c0e000

brk(0x1c2f000)                          = 0x1c2f000

brk(0x1c5f000)                          = 0x1c5f000

brk(0x1c8f000)                          = 0x1c8f000

brk(0x1cb0000)                          = 0x1cb0000

brk(0x1ce0000)                          = 0x1ce0000

brk(0x1d10000)                          = 0x1d10000

brk(0x1d31000)                          = 0x1d31000

io_submit(140468069470208, 32, {...})   = 32

write(1, "aio02/aio_tio    0  TINFO  :  my"..., 50aio02/aio_tio    0
TINFO  :  myctx = 1164054528l

) = 50

io_submit(140468069470208, 1, {...})    = -1 EINVAL (Invalid argument)

write(2, "io_fsync write: Invalid argument"..., 33io_fsync write:
Invalid argument

) = 33

 

Could you please suggest me some pointer .

 

Thanks!

Nitin 


Information transmitted by this e-mail is proprietary to MphasiS, its associated companies and/ or its customers and is intended 
for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded 
to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly 
prohibited. In such cases, please notify us immediately at mailmaster@mphasis.com and delete this mail from your records.

[-- Attachment #1.2: Type: text/html, Size: 43609 bytes --]

[-- Attachment #2: Type: text/plain, Size: 395 bytes --]

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

[-- 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
  2012-06-29  7:45 ` Wanlong Gao
@ 2012-10-09  6:08   ` Nitin Yadav
  2012-10-16  2:31     ` Wanlong Gao
  0 siblings, 1 reply; 10+ messages in thread
From: Nitin Yadav @ 2012-10-09  6:08 UTC (permalink / raw)
  To: gaowanlong, Caspar Zhang; +Cc: ltp-list

Hi Wanlong,
   
  Below are the output where I am getting - EPERM (returned value = 1) as a return value from io_submit. 

io_submit01    1  TPASS  :  expected failure - returned value = -22 : Invalid argument
io_submit01    2  TPASS  :  expected failure - returned value = -22 : Invalid argument
io_submit01    3  TFAIL    :  unexpected failure - returned value = 1 : Unknown error 18446744073709551615, expected one of -EINVAL, -EBADF, -EFAULT
io_submit01    4  TPASS  :  expected failure - returned value = -14 : Bad address
io_submit01    5  TPASS  :  expected failure - returned value = -22 : Invalid argument
io_submit01    6  TPASS  :  expected failure - returned value = -9   : Bad file descriptor
io_submit01    7  TPASS  :  expected success - returned value = 0
io_submit01    8  TPASS  :  expected success - returned value = 1

Could you please let me know can we consider - EPERM case as a return value for io_submit.

Thanks,
Nitin Yadav



Hi Jan,

>>> --- a/testcases/kernel/syscalls/io_submit/io_submit01.c
>>> +++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
>>> @@ -126,7 +126,21 @@ int main(int argc, char *argv[])
>>>             /* 1.3 - EINVAL: uninitialized iocb */
>>>             iocbs[0] = &iocb;
>>>             TEST(io_submit(ctx, 1, iocbs));
>>> -           check_result(-EINVAL, TEST_RETURN);
>>> +           switch(TEST_RETURN) {
>>> +                   case -EINVAL:
>>> +                   case -EBADF:
>>> +                   case -EFAULT:
>>> +                   case -EPERM:
>>
>>
>> I don't think io_submit(2) can return -EPERM.
>>
>> Do you think so?
> 
> I was trying all sorts of random data and I remember seeing once "-1".
> I'm failing to reproduce it today, so I could be wrong. If I fail to find
> data that gives -EPERM, I'll remove it in v2.


I looked into the io_submit(2) code in kernel and didn't see any path can
return -EPERM, so I think you should confirm on it again.

Thanks,
Wanlong Gao

> 
> Regards,
> Jan
> 
>>
>> Thanks,
>> Wanlong Gao
>>
> 
>


Information transmitted by this e-mail is proprietary to MphasiS, its associated companies and/ or its customers and is intended 
for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded 
to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly 
prohibited. In such cases, please notify us immediately at mailmaster@mphasis.com and delete this mail from your records.
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
  2012-10-09  6:08   ` [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL Nitin Yadav
@ 2012-10-16  2:31     ` Wanlong Gao
  2012-10-16  6:53       ` Jan Stancek
  0 siblings, 1 reply; 10+ messages in thread
From: Wanlong Gao @ 2012-10-16  2:31 UTC (permalink / raw)
  To: Nitin Yadav; +Cc: ltp-list

On 10/09/2012 02:08 PM, Nitin Yadav wrote:
> Hi Wanlong,
>    
>   Below are the output where I am getting - EPERM (returned value = 1) as a return value from io_submit. 
> 
> io_submit01    1  TPASS  :  expected failure - returned value = -22 : Invalid argument
> io_submit01    2  TPASS  :  expected failure - returned value = -22 : Invalid argument
> io_submit01    3  TFAIL    :  unexpected failure - returned value = 1 : Unknown error 18446744073709551615, expected one of -EINVAL, -EBADF, -EFAULT
> io_submit01    4  TPASS  :  expected failure - returned value = -14 : Bad address
> io_submit01    5  TPASS  :  expected failure - returned value = -22 : Invalid argument
> io_submit01    6  TPASS  :  expected failure - returned value = -9   : Bad file descriptor
> io_submit01    7  TPASS  :  expected success - returned value = 0
> io_submit01    8  TPASS  :  expected success - returned value = 1
> 
> Could you please let me know can we consider - EPERM case as a return value for io_submit.

OK, maybe I missed something, so, can you show us how did you produce this in detail?

Thanks,
Wanlong Gao

> 
> Thanks,
> Nitin Yadav
> 
> 
> 
> Hi Jan,
> 
>>>> --- a/testcases/kernel/syscalls/io_submit/io_submit01.c
>>>> +++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
>>>> @@ -126,7 +126,21 @@ int main(int argc, char *argv[])
>>>>             /* 1.3 - EINVAL: uninitialized iocb */
>>>>             iocbs[0] = &iocb;
>>>>             TEST(io_submit(ctx, 1, iocbs));
>>>> -           check_result(-EINVAL, TEST_RETURN);
>>>> +           switch(TEST_RETURN) {
>>>> +                   case -EINVAL:
>>>> +                   case -EBADF:
>>>> +                   case -EFAULT:
>>>> +                   case -EPERM:
>>>
>>>
>>> I don't think io_submit(2) can return -EPERM.
>>>
>>> Do you think so?
>>
>> I was trying all sorts of random data and I remember seeing once "-1".
>> I'm failing to reproduce it today, so I could be wrong. If I fail to find
>> data that gives -EPERM, I'll remove it in v2.
> 
> 
> I looked into the io_submit(2) code in kernel and didn't see any path can
> return -EPERM, so I think you should confirm on it again.
> 
> Thanks,
> Wanlong Gao
> 
>>
>> Regards,
>> Jan
>>
>>>
>>> Thanks,
>>> Wanlong Gao
>>>
>>
>>
> 
> 
> Information transmitted by this e-mail is proprietary to MphasiS, its associated companies and/ or its customers and is intended 
> for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or 
> exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded 
> to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly 
> prohibited. In such cases, please notify us immediately at mailmaster@mphasis.com and delete this mail from your records.
> 


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
  2012-10-16  2:31     ` Wanlong Gao
@ 2012-10-16  6:53       ` Jan Stancek
  2012-10-16 10:11         ` chrubis
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Stancek @ 2012-10-16  6:53 UTC (permalink / raw)
  To: gaowanlong, Nitin Yadav; +Cc: ltp-list



----- Original Message -----
> From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com>
> To: "Nitin Yadav" <Nitin.Yadav@mphasis.com>
> Cc: ltp-list@lists.sourceforge.net
> Sent: Tuesday, 16 October, 2012 4:31:17 AM
> Subject: Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return	-EINVAL
> 
> On 10/09/2012 02:08 PM, Nitin Yadav wrote:
> > Hi Wanlong,
> >    
> >   Below are the output where I am getting - EPERM (returned value =
> >   1) as a return value from io_submit.
> > 
> > io_submit01    1  TPASS  :  expected failure - returned value = -22
> > : Invalid argument
> > io_submit01    2  TPASS  :  expected failure - returned value = -22
> > : Invalid argument
> > io_submit01    3  TFAIL    :  unexpected failure - returned value =
> > 1 : Unknown error 18446744073709551615, expected one of -EINVAL,
> > -EBADF, -EFAULT
> > io_submit01    4  TPASS  :  expected failure - returned value = -14
> > : Bad address
> > io_submit01    5  TPASS  :  expected failure - returned value = -22
> > : Invalid argument
> > io_submit01    6  TPASS  :  expected failure - returned value = -9
> >   : Bad file descriptor
> > io_submit01    7  TPASS  :  expected success - returned value = 0
> > io_submit01    8  TPASS  :  expected success - returned value = 1

Notice that return value is positive (1). So it could be that some random data
succeeded and one iocb was actually submitted.

Regards,
Jan

> > 
> > Could you please let me know can we consider - EPERM case as a
> > return value for io_submit.
> 
> OK, maybe I missed something, so, can you show us how did you produce
> this in detail?
> 
> Thanks,
> Wanlong Gao
> 
> > 
> > Thanks,
> > Nitin Yadav
> > 
> > 
> > 
> > Hi Jan,
> > 
> >>>> --- a/testcases/kernel/syscalls/io_submit/io_submit01.c
> >>>> +++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
> >>>> @@ -126,7 +126,21 @@ int main(int argc, char *argv[])
> >>>>             /* 1.3 - EINVAL: uninitialized iocb */
> >>>>             iocbs[0] = &iocb;
> >>>>             TEST(io_submit(ctx, 1, iocbs));
> >>>> -           check_result(-EINVAL, TEST_RETURN);
> >>>> +           switch(TEST_RETURN) {
> >>>> +                   case -EINVAL:
> >>>> +                   case -EBADF:
> >>>> +                   case -EFAULT:
> >>>> +                   case -EPERM:
> >>>
> >>>
> >>> I don't think io_submit(2) can return -EPERM.
> >>>
> >>> Do you think so?
> >>
> >> I was trying all sorts of random data and I remember seeing once
> >> "-1".
> >> I'm failing to reproduce it today, so I could be wrong. If I fail
> >> to find
> >> data that gives -EPERM, I'll remove it in v2.
> > 
> > 
> > I looked into the io_submit(2) code in kernel and didn't see any
> > path can
> > return -EPERM, so I think you should confirm on it again.
> > 
> > Thanks,
> > Wanlong Gao
> > 
> >>
> >> Regards,
> >> Jan
> >>
> >>>
> >>> Thanks,
> >>> Wanlong Gao
> >>>
> >>
> >>
> > 
> > 
> > Information transmitted by this e-mail is proprietary to MphasiS,
> > its associated companies and/ or its customers and is intended
> > for use only by the individual or entity to which it is addressed,
> > and may contain information that is privileged, confidential or
> > exempt from disclosure under applicable law. If you are not the
> > intended recipient or it appears that this mail has been forwarded
> > to you without proper authority, you are notified that any use or
> > dissemination of this information in any manner is strictly
> > prohibited. In such cases, please notify us immediately at
> > mailmaster@mphasis.com and delete this mail from your records.
> > 
> 
> 
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic
> APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL
  2012-10-16  6:53       ` Jan Stancek
@ 2012-10-16 10:11         ` chrubis
  0 siblings, 0 replies; 10+ messages in thread
From: chrubis @ 2012-10-16 10:11 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Nitin Yadav

Hi!
> Notice that return value is positive (1). So it could be that some random data
> succeeded and one iocb was actually submitted.

Well I think that if you pass random data to the kernel the only
assumption that may hold is that this action should not bring the system
down (unless of course you happen to initiate shutdown).

From this point of view calling libcalls/syscalls with random values and
asserting certain results makes a little sense.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-10-16 10:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14 14:53 [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL Jan Stancek
2012-03-15  1:09 ` Wanlong Gao
2012-03-15  2:09   ` Wanlong Gao
2012-03-15  7:48   ` Jan Stancek
2012-03-15  7:56     ` Wanlong Gao
  -- strict thread matches above, loose matches on Subject: below --
2012-06-27  9:52 [LTP] crashme:fork12 test may kill other process that is not forked child 羅秉鈞
2012-06-29  7:45 ` Wanlong Gao
2012-10-09  6:08   ` [LTP] [PATCH] io_submit: uninitialized iocb may not return -EINVAL Nitin Yadav
2012-10-16  2:31     ` Wanlong Gao
2012-10-16  6:53       ` Jan Stancek
2012-10-16 10:11         ` chrubis
2012-07-05 13:03 Nitin Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox