Re: [PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-08 Thread Andrey Ryabinin
2015-09-08 12:52 GMT+03:00 Xishi Qiu : > On 2015/9/8 17:49, Xishi Qiu wrote: > >> On 2015/9/8 17:36, Andrey Ryabinin wrote: >> >>> 2015-09-08 4:42 GMT+03:00 Xishi Qiu : The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow only take 2 bytes, we can return in "if

Re: [PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-08 Thread Xishi Qiu
On 2015/9/8 17:49, Xishi Qiu wrote: > On 2015/9/8 17:36, Andrey Ryabinin wrote: > >> 2015-09-08 4:42 GMT+03:00 Xishi Qiu : >>> The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow >>> only take 2 bytes, we can return in "if (likely(!last_byte)) ...", but >>> it calculates wrong,

Re: [PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-08 Thread Xishi Qiu
On 2015/9/8 17:36, Andrey Ryabinin wrote: > 2015-09-08 4:42 GMT+03:00 Xishi Qiu : >> The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow >> only take 2 bytes, we can return in "if (likely(!last_byte)) ...", but >> it calculates wrong, so fix it. >> > > Please, be more specific.

Re: [PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-08 Thread Andrey Ryabinin
2015-09-08 4:42 GMT+03:00 Xishi Qiu : > The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow > only take 2 bytes, we can return in "if (likely(!last_byte)) ...", but > it calculates wrong, so fix it. > Please, be more specific. Describe what is wrong with the current code and

Re: [PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-08 Thread Andrey Ryabinin
2015-09-08 4:42 GMT+03:00 Xishi Qiu : > The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow > only take 2 bytes, we can return in "if (likely(!last_byte)) ...", but > it calculates wrong, so fix it. > Please, be more specific. Describe what is wrong with the

Re: [PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-08 Thread Xishi Qiu
On 2015/9/8 17:49, Xishi Qiu wrote: > On 2015/9/8 17:36, Andrey Ryabinin wrote: > >> 2015-09-08 4:42 GMT+03:00 Xishi Qiu : >>> The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow >>> only take 2 bytes, we can return in "if (likely(!last_byte)) ...", but >>>

Re: [PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-08 Thread Xishi Qiu
On 2015/9/8 17:36, Andrey Ryabinin wrote: > 2015-09-08 4:42 GMT+03:00 Xishi Qiu : >> The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow >> only take 2 bytes, we can return in "if (likely(!last_byte)) ...", but >> it calculates wrong, so fix it. >> > >

Re: [PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-08 Thread Andrey Ryabinin
2015-09-08 12:52 GMT+03:00 Xishi Qiu : > On 2015/9/8 17:49, Xishi Qiu wrote: > >> On 2015/9/8 17:36, Andrey Ryabinin wrote: >> >>> 2015-09-08 4:42 GMT+03:00 Xishi Qiu : The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow only

[PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-07 Thread Xishi Qiu
The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow only take 2 bytes, we can return in "if (likely(!last_byte)) ...", but it calculates wrong, so fix it. Signed-off-by: Xishi Qiu --- mm/kasan/kasan.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git

[PATCH] kasan: fix last shadow judgement in memory_is_poisoned_16()

2015-09-07 Thread Xishi Qiu
The shadow which correspond 16 bytes may span 2 or 3 bytes. If shadow only take 2 bytes, we can return in "if (likely(!last_byte)) ...", but it calculates wrong, so fix it. Signed-off-by: Xishi Qiu --- mm/kasan/kasan.c |3 +-- 1 files changed, 1 insertions(+), 2