ext4: add explicit casts when masking cluster sizes
authorTheodore Ts'o <tytso@mit.edu>
Fri, 20 Dec 2013 14:29:35 +0000 (09:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:25:10 +0000 (12:25 -0800)
commitefa1cbb5679344d260812c8e2f19ee5b19f23bb8
tree2ef8239c28e7349fb22d6c6ec3acc82c180e09b1
parentc4589c1f2b1f529ca0383bba9f7cc2eb73cdfa04
ext4: add explicit casts when masking cluster sizes

commit f5a44db5d2d677dfbf12deee461f85e9ec633961 upstream.

The missing casts can cause the high 64-bits of the physical blocks to
be lost.  Set up new macros which allows us to make sure the right
thing happen, even if at some point we end up supporting larger
logical block numbers.

Thanks to the Emese Revfy and the PaX security team for reporting this
issue.

Reported-by: PaX Team <pageexec@freemail.hu>
Reported-by: Emese Revfy <re.emese@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/mballoc.c