amlogic: drm/meson: Fix to use address type for 64bit 58/251658/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 18 Jan 2021 07:16:24 +0000 (16:16 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 18 Jan 2021 07:19:16 +0000 (16:19 +0900)
commit37a9041f85094da32a0069a13392d8bb4c4dfdbb
treee80d2129ed3276ac3cab9eda7d1ede9c410022cb
parent019788d0573129ecfc7ecaa0de6a09e348b3e24d
amlogic: drm/meson: Fix to use address type for 64bit

In arm64, physical address type is accessed as 64bit, but
there is 32bit variable for it, so there is out-of-bounds
access. Fix to use address type for 64bit.

This fixes following kasan wanring:
   BUG: KASAN: stack-out-of-bounds in ion_phys+0xb4/0x180
   Write of size 8 at addr ffffffc0a152f700 by task enlightenment/4189
   ...
   [<ffffff900a3ddaec>] ion_phys+0xb4/0x180
   [<ffffff900a76cc4c>] am_meson_gem_object_get_phyaddr+0x114/0x148
   [<ffffff900a774808>] meson_plane_atomic_check+0x570/0xea8
   ...

Change-Id: I185601b2dd8f0bb9c700f87c2baaa9f6ebb183d8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/amlogic/drm/meson_gem.c
drivers/amlogic/drm/meson_gem.h