[ovs-dev] [PATCH V3] rhel: Fix support for root user using DPDK

Ben Pfaff blp at ovn.org
Thu Feb 1 21:27:13 UTC 2018


On Thu, Feb 01, 2018 at 03:42:03PM -0200, Marcos Felipe Schwarz wrote:
>  Since 2.8.0 OVS runs as non-root user on rhel distros, but the current
> implementation breaks the ability to run as root with DPDK and as a
> consequence there is no way possible to use UIO drivers on kernel 4.0 and
> newer [1, 2].
> [1] http://dpdk.org/browse/dpdk/commit/?id=cdc242f260e766
> bd95a658b5e0686a62ec04f5b0
> [2] https://www.kernel.org/doc/Documentation/vm/pagemap.txt
> 
> Fixes: e3e738a3d058 ("redhat: allow dpdk to also run as non-root user")
> Signed-off-by: Marcos Schwarz <marcos.f.sch at gmail.com>
> Acked-by: Aaron Conole <aconole at redhat.com>

Thanks for the patch.

I understand from the commit message the ultimate goal of this patch.  I
don't yet understand what change it is actually making.  In particular,
what is the purpose of the following change; what does it do?

> --- a/lib/daemon-unix.c
> +++ b/lib/daemon-unix.c
> @@ -1047,5 +1047,6 @@ daemon_set_new_user(const char *user_spec)
>          }
>      }
> 
> -    switch_user = true;
> +    if (!uid_verify(uid) || !gid_verify(gid))
> +        switch_user = true;
>  }

Thanks,

Ben.


More information about the dev mailing list