binfmt_elf_fdpic: fix crash on MMU system with dynamic binaries
authorNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 16 Aug 2017 22:56:14 +0000 (18:56 -0400)
committerNicolas Pitre <nicolas.pitre@linaro.org>
Sun, 10 Sep 2017 23:31:47 +0000 (19:31 -0400)
commitcdf38888ed30523b1a6ee199449a86dbd1d864ce
treeeea19beef8369b6730a3927e4ea70787b93bf2ed
parent4755200b6b116dbf6d5545427e8a2cf58194ba6b
binfmt_elf_fdpic: fix crash on MMU system with dynamic binaries

In elf_fdpic_map_file() there is a test to ensure the dynamic section in
user space is properly terminated. However it does so by dereferencing
a user address directly. Add proper user space accessor.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mickael GUENE <mickael.guene@st.com>
Tested-by: Vincent Abriou <vincent.abriou@st.com>
Tested-by: Andras Szemzo <szemzo.andras@gmail.com>
fs/binfmt_elf_fdpic.c