Re: [PATCH 1/2] /proc/kpageflags: prevent an integer overflow in stable_page_flags()

2019-07-24 Thread Alexey Dobriyan
On Thu, Jul 25, 2019 at 02:31:16AM +, Toshiki Fukasawa wrote: > stable_page_flags() returns kpageflags info in u64, but it uses > "1 << KPF_*" internally which is considered as int. This type mismatch > causes no visible problem now, but it will if you set bit 32 or more as > done in a subseque

[PATCH 1/2] /proc/kpageflags: prevent an integer overflow in stable_page_flags()

2019-07-24 Thread Toshiki Fukasawa
stable_page_flags() returns kpageflags info in u64, but it uses "1 << KPF_*" internally which is considered as int. This type mismatch causes no visible problem now, but it will if you set bit 32 or more as done in a subsequent patch. So use BIT_ULL in order to avoid future overflow issues. Signed