Re: [PATCH] kasan: use IS_ALIGNED in memory_is_poisoned_8()

2015-09-14 Thread Andrey Ryabinin
2015-09-12 1:47 GMT+03:00 Andrew Morton : > On Fri, 11 Sep 2015 10:02:29 +0800 Xishi Qiu wrote: >> - if (likely(((addr + 7) & KASAN_SHADOW_MASK) >= 7)) >> + if (likely(IS_ALIGNED(addr, 8))) >> return false; > > Wouldn't IS_ALIGNED(addr,

Re: [PATCH] kasan: use IS_ALIGNED in memory_is_poisoned_8()

2015-09-14 Thread Andrey Ryabinin
2015-09-12 1:47 GMT+03:00 Andrew Morton : > On Fri, 11 Sep 2015 10:02:29 +0800 Xishi Qiu wrote: >> - if (likely(((addr + 7) & KASAN_SHADOW_MASK) >= 7)) >> + if (likely(IS_ALIGNED(addr, 8))) >> return

Re: [PATCH] kasan: use IS_ALIGNED in memory_is_poisoned_8()

2015-09-13 Thread Xishi Qiu
On 2015/9/12 6:47, Andrew Morton wrote: > On Fri, 11 Sep 2015 10:02:29 +0800 Xishi Qiu wrote: > >> Use IS_ALIGNED() to determine whether the shadow span two bytes. >> It generates less code and more readable. >> > > Please cc Andrey Ryabinin on kasan patches. Sorry, my mistake. > >> ---

Re: [PATCH] kasan: use IS_ALIGNED in memory_is_poisoned_8()

2015-09-13 Thread Xishi Qiu
On 2015/9/12 6:47, Andrew Morton wrote: > On Fri, 11 Sep 2015 10:02:29 +0800 Xishi Qiu wrote: > >> Use IS_ALIGNED() to determine whether the shadow span two bytes. >> It generates less code and more readable. >> > > Please cc Andrey Ryabinin on kasan patches. Sorry, my

Re: [PATCH] kasan: use IS_ALIGNED in memory_is_poisoned_8()

2015-09-11 Thread Andrew Morton
On Fri, 11 Sep 2015 10:02:29 +0800 Xishi Qiu wrote: > Use IS_ALIGNED() to determine whether the shadow span two bytes. > It generates less code and more readable. > Please cc Andrey Ryabinin on kasan patches. > --- a/mm/kasan/kasan.c > +++ b/mm/kasan/kasan.c > @@ -120,7 +120,7 @@ static

Re: [PATCH] kasan: use IS_ALIGNED in memory_is_poisoned_8()

2015-09-11 Thread Andrew Morton
On Fri, 11 Sep 2015 10:02:29 +0800 Xishi Qiu wrote: > Use IS_ALIGNED() to determine whether the shadow span two bytes. > It generates less code and more readable. > Please cc Andrey Ryabinin on kasan patches. > --- a/mm/kasan/kasan.c > +++ b/mm/kasan/kasan.c > @@ -120,7

[PATCH] kasan: use IS_ALIGNED in memory_is_poisoned_8()

2015-09-10 Thread Xishi Qiu
Use IS_ALIGNED() to determine whether the shadow span two bytes. It generates less code and more readable. Signed-off-by: Xishi Qiu --- mm/kasan/kasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 7b28e9c..c6ddff1 100644 ---

[PATCH] kasan: use IS_ALIGNED in memory_is_poisoned_8()

2015-09-10 Thread Xishi Qiu
Use IS_ALIGNED() to determine whether the shadow span two bytes. It generates less code and more readable. Signed-off-by: Xishi Qiu --- mm/kasan/kasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index