kasan: simplify address description logic
authorAndrey Konovalov <[email protected]>
Wed, 3 May 2017 21:56:34 +0000 (14:56 -0700)
committerLinus Torvalds <[email protected]>
Wed, 3 May 2017 22:52:12 +0000 (15:52 -0700)
commitdb429f16e0b472292000fd53b63ebd7221a9856e
tree620b88b09d6fda9530222fc93fa1dd5e163ac229
parentb6b72f4919c121bee5890732e0b8de2ab99c8dbc
kasan: simplify address description logic

Simplify logic for describing a memory address.  Add addr_to_page()
helper function.

Makes the code easier to follow.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Andrey Konovalov <[email protected]>
Acked-by: Dmitry Vyukov <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/kasan/report.c