lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ+HfNhtZvvqj0pvEu0bysrwAvxngtC3z-2RUpP1HY3iU7gg5w@mail.gmail.com>
Date:   Fri, 12 Feb 2021 07:59:12 +0100
From:   Björn Töpel <bjorn.topel@...il.com>
To:     Stanislav Fomichev <sdf@...gle.com>
Cc:     Netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH bpf-next] libbpf: use AF_LOCAL instead of AF_INET in xsk.c

On Tue, 9 Feb 2021 at 23:50, Stanislav Fomichev <sdf@...gle.com> wrote:
>
> We have the environments where usage of AF_INET is prohibited
> (cgroup/sock_create returns EPERM for AF_INET). Let's use
> AF_LOCAL instead of AF_INET, it should perfectly work with SIOCETHTOOL.
>
> Signed-off-by: Stanislav Fomichev <sdf@...gle.com>

Stanislav, apologies for the delay!

Tested-by: Björn Töpel <bjorn.topel@...el.com>
Acked-by: Björn Töpel <bjorn.topel@...el.com>


Björn

> ---
>  tools/lib/bpf/xsk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c
> index 20500fb1f17e..ffbb588724d8 100644
> --- a/tools/lib/bpf/xsk.c
> +++ b/tools/lib/bpf/xsk.c
> @@ -517,7 +517,7 @@ static int xsk_get_max_queues(struct xsk_socket *xsk)
>         struct ifreq ifr = {};
>         int fd, err, ret;
>
> -       fd = socket(AF_INET, SOCK_DGRAM, 0);
> +       fd = socket(AF_LOCAL, SOCK_DGRAM, 0);
>         if (fd < 0)
>                 return -errno;
>
> --
> 2.30.0.478.g8a0d178c01-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ