Re: [PATCH 2/2] [PATCH 2/2] proc-vmcore: wrong data type casting fix

2016-03-10 Thread Dave Young
Hi, Minfei On 03/11/16 at 03:19pm, Minfei Huang wrote: > On 03/11/16 at 02:21pm, dyo...@redhat.com wrote: > > @@ -231,7 +231,8 @@ static ssize_t __read_vmcore(char *buffe > > > > list_for_each_entry(m, _list, list) { > > if (*fpos < m->offset + m->size) { > > -

Re: [PATCH 2/2] [PATCH 2/2] proc-vmcore: wrong data type casting fix

2016-03-10 Thread Dave Young
Hi, Minfei On 03/11/16 at 03:19pm, Minfei Huang wrote: > On 03/11/16 at 02:21pm, dyo...@redhat.com wrote: > > @@ -231,7 +231,8 @@ static ssize_t __read_vmcore(char *buffe > > > > list_for_each_entry(m, _list, list) { > > if (*fpos < m->offset + m->size) { > > -

Re: [PATCH 2/2] [PATCH 2/2] proc-vmcore: wrong data type casting fix

2016-03-10 Thread Minfei Huang
On 03/11/16 at 02:21pm, dyo...@redhat.com wrote: > @@ -231,7 +231,8 @@ static ssize_t __read_vmcore(char *buffe > > list_for_each_entry(m, _list, list) { > if (*fpos < m->offset + m->size) { > - tsz = min_t(size_t, m->offset + m->size - *fpos, > buflen);

Re: [PATCH 2/2] [PATCH 2/2] proc-vmcore: wrong data type casting fix

2016-03-10 Thread Minfei Huang
On 03/11/16 at 02:21pm, dyo...@redhat.com wrote: > @@ -231,7 +231,8 @@ static ssize_t __read_vmcore(char *buffe > > list_for_each_entry(m, _list, list) { > if (*fpos < m->offset + m->size) { > - tsz = min_t(size_t, m->offset + m->size - *fpos, > buflen);

[PATCH 2/2] [PATCH 2/2] proc-vmcore: wrong data type casting fix

2016-03-10 Thread dyoung
On i686 PAE enabled machine the contiguous physical area could be large and it can cause triming down variables in below calculation in read_vmcore() and mmap_vmcore(): tsz = min_t(size_t, m->offset + m->size - *fpos, buflen); Then the real size passed down is not correct any more.

[PATCH 2/2] [PATCH 2/2] proc-vmcore: wrong data type casting fix

2016-03-10 Thread dyoung
On i686 PAE enabled machine the contiguous physical area could be large and it can cause triming down variables in below calculation in read_vmcore() and mmap_vmcore(): tsz = min_t(size_t, m->offset + m->size - *fpos, buflen); Then the real size passed down is not correct any more.