Re: Inconsistent capabilites associated with MPOL_MOVE_ALL

Christoph Lameter
2006-03-15T00:09:07Z

On Wed, 15 Mar 2006, Michael Kerrisk wrote:

> err = do_migrate_pages(mm, &old, &new,
> capable(CAP_SYS_ADMIN) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
>
> while in the implemantation of mbind() we have:
>
> if ((flags & MPOL_MF_MOVE_ALL( && !capable(CAP_SYS_RESOURCE))
> return -EPERM;
>
> Is it really intended to associate two *different* capabilities
> with the operation of MPOL_MF_MOVE_ALL in this fashion? At
> first glance, it seems rather inconsistent to do so.

You are likely right. Which one is the more correct capability to use?