Re: [PATCH] mm: fix mmap overflow checking

2012-09-07 Thread Wanlong Gao
On 09/08/2012 09:58 AM, KOSAKI Motohiro wrote: >>> I've seen the exactly same patch from another fujitsu guys several >>> month ago. and as I pointed >>> out at that time, this line don't work when 32bit kernel + mmap2 syscall >>> case. >>> >>> Please don't think do_mmap_pgoff() is for mmap(2)

Re: [PATCH] mm: fix mmap overflow checking

2012-09-07 Thread KOSAKI Motohiro
>> I've seen the exactly same patch from another fujitsu guys several >> month ago. and as I pointed >> out at that time, this line don't work when 32bit kernel + mmap2 syscall >> case. >> >> Please don't think do_mmap_pgoff() is for mmap(2) specific and read a >> past thread before resend >> a

Re: [PATCH] mm: fix mmap overflow checking

2012-09-07 Thread KOSAKI Motohiro
On Tue, Sep 4, 2012 at 5:23 AM, Wanlong Gao wrote: > POSIX said that if the file is a regular file and the value of "off" > plus "len" exceeds the offset maximum established in the open file > description associated with fildes, mmap should return EOVERFLOW. > > The following test from LTP can

Re: [PATCH] mm: fix mmap overflow checking

2012-09-07 Thread KOSAKI Motohiro
On Tue, Sep 4, 2012 at 5:23 AM, Wanlong Gao gaowanl...@cn.fujitsu.com wrote: POSIX said that if the file is a regular file and the value of off plus len exceeds the offset maximum established in the open file description associated with fildes, mmap should return EOVERFLOW. The following test

Re: [PATCH] mm: fix mmap overflow checking

2012-09-07 Thread KOSAKI Motohiro
I've seen the exactly same patch from another fujitsu guys several month ago. and as I pointed out at that time, this line don't work when 32bit kernel + mmap2 syscall case. Please don't think do_mmap_pgoff() is for mmap(2) specific and read a past thread before resend a patch. So,

Re: [PATCH] mm: fix mmap overflow checking

2012-09-07 Thread Wanlong Gao
On 09/08/2012 09:58 AM, KOSAKI Motohiro wrote: I've seen the exactly same patch from another fujitsu guys several month ago. and as I pointed out at that time, this line don't work when 32bit kernel + mmap2 syscall case. Please don't think do_mmap_pgoff() is for mmap(2) specific and read a

Re: [PATCH] mm: fix mmap overflow checking

2012-09-04 Thread Andrew Morton
On Tue, 4 Sep 2012 17:23:00 +0800 Wanlong Gao wrote: > POSIX said that if the file is a regular file and the value of "off" > plus "len" exceeds the offset maximum established in the open file > description associated with fildes, mmap should return EOVERFLOW. That's what POSIX says, but what

[PATCH] mm: fix mmap overflow checking

2012-09-04 Thread Wanlong Gao
POSIX said that if the file is a regular file and the value of "off" plus "len" exceeds the offset maximum established in the open file description associated with fildes, mmap should return EOVERFLOW. The following test from LTP can reproduce this bug. char tmpfname[256]; void

[PATCH] mm: fix mmap overflow checking

2012-09-04 Thread Wanlong Gao
POSIX said that if the file is a regular file and the value of off plus len exceeds the offset maximum established in the open file description associated with fildes, mmap should return EOVERFLOW. The following test from LTP can reproduce this bug. char tmpfname[256]; void *pa =

Re: [PATCH] mm: fix mmap overflow checking

2012-09-04 Thread Andrew Morton
On Tue, 4 Sep 2012 17:23:00 +0800 Wanlong Gao gaowanl...@cn.fujitsu.com wrote: POSIX said that if the file is a regular file and the value of off plus len exceeds the offset maximum established in the open file description associated with fildes, mmap should return EOVERFLOW. That's what