Re: [PATCH 1/2] pstore: fix buffer overflow while write offset equal to buffer size

2014-03-12 Thread Shuo Liu
2014-03-13 0:50 GMT+08:00 Kees Cook : > On Wed, Mar 12, 2014 at 6:24 AM, Liu Shuo wrote: >> From: Liu ShuoX >> >> In case new offset is equal to prz->buffer_size, it won't wrap at this >> time and will return old(overflow) value next time. >> >> Signed-off-by: Liu ShuoX > > This seems correct;

Re: [PATCH 1/2] pstore: fix buffer overflow while write offset equal to buffer size

2014-03-12 Thread Kees Cook
On Wed, Mar 12, 2014 at 6:24 AM, Liu Shuo wrote: > From: Liu ShuoX > > In case new offset is equal to prz->buffer_size, it won't wrap at this > time and will return old(overflow) value next time. > > Signed-off-by: Liu ShuoX This seems correct; good catch. Have you seen this problem happen, or

[PATCH 1/2] pstore: fix buffer overflow while write offset equal to buffer size

2014-03-12 Thread Liu Shuo
From: Liu ShuoX In case new offset is equal to prz->buffer_size, it won't wrap at this time and will return old(overflow) value next time. Signed-off-by: Liu ShuoX --- fs/pstore/ram_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/pstore/ram_core.c

Re: [PATCH 1/2] pstore: fix buffer overflow while write offset equal to buffer size

2014-03-12 Thread Kees Cook
On Wed, Mar 12, 2014 at 6:24 AM, Liu Shuo shuox@gmail.com wrote: From: Liu ShuoX shuox@intel.com In case new offset is equal to prz-buffer_size, it won't wrap at this time and will return old(overflow) value next time. Signed-off-by: Liu ShuoX shuox@intel.com This seems correct;

Re: [PATCH 1/2] pstore: fix buffer overflow while write offset equal to buffer size

2014-03-12 Thread Shuo Liu
2014-03-13 0:50 GMT+08:00 Kees Cook keesc...@chromium.org: On Wed, Mar 12, 2014 at 6:24 AM, Liu Shuo shuox@gmail.com wrote: From: Liu ShuoX shuox@intel.com In case new offset is equal to prz-buffer_size, it won't wrap at this time and will return old(overflow) value next time.

[PATCH 1/2] pstore: fix buffer overflow while write offset equal to buffer size

2014-03-12 Thread Liu Shuo
From: Liu ShuoX shuox@intel.com In case new offset is equal to prz-buffer_size, it won't wrap at this time and will return old(overflow) value next time. Signed-off-by: Liu ShuoX shuox@intel.com --- fs/pstore/ram_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff