Commits
Kirill Gorkunov authored and Konstantin Khorenko committed 7ac4df2b35d
prctl: Fix false positive in validate_prctl_map While validating new map we require the @start_data to be strictly less than @end_data, which is fine for regular applications (this is why this nit didn't trigger for that long). These members are set from executable loaders such as elf halders, still it is pretty valid to have a loadable data section with zero size in file, in such case the start_data is equal to end_data once kernel loader finishes. In result when we'are trying to restore such program the procedure fails and kernel returns -EINVAL. From the image dump of a program: | "mm_start_code": "0x400000", | "mm_end_code": "0x8f5fb4", | "mm_start_data": "0xf1bfb0", | "mm_end_data": "0xf1bfb0", Thus we need to change validate_prctl_map from strictly less to less or equal operator use. https://jira.sw.ru/browse/PSBM-93526 Fixes: f606b77f1a9e362451aca8f81d8f36a3a112139e Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> The patch is taken into linux-next: http://git.cmpxchg.org/cgit.cgi/linux-mmotm.git/commit/?id=93898d5bbe0677fc34de280c94af163055f16082