On Thu, May 02, 2019 at 02:52:02PM +0200, Michal Koutný wrote: > Despite comment of validate_prctl_map claims there are no capability > checks, it is not completely true since commit 4d28df6152aa ("prctl: > Allow local CAP_SYS_ADMIN changing exe_file"). Extract the check out of > the function and make the function perform purely arithmetic checks. > > This patch should not change any behavior, it is mere refactoring for > following patch. > > v1, v2: --- > v3: Remove unused mm variable from validate_prctl_map_addr > > CC: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> > CC: Cyrill Gorcunov <gorcunov@xxxxxxxxx> > Signed-off-by: Michal Koutný <mkoutny@xxxxxxxx> > Reviewed-by: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> Reviewed-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>