linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: Heiko Thiery <heiko.thiery@gmail.com>
Cc: netdev@vger.kernel.org, dsahern@gmail.com,
	linux-kernel@vger.kernel.org, stephen@networkplumber.org,
	Dmitry Yakunin <zeil@yandex-team.ru>,
	Peter Korsgaard <peter@korsgaard.com>
Subject: Re: [PATCH iproute2-next v3] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented
Date: Sat, 15 May 2021 18:58:28 +0200	[thread overview]
Message-ID: <YJ/9tBaZmw4UkI2t@pevik> (raw)
In-Reply-To: <20210508064925.8045-1-heiko.thiery@gmail.com>

Hi,

[ Cc Petr (Buildroot maintainer) ]
> With commit d5e6ee0dac64 the usage of functions name_to_handle_at() and
> open_by_handle_at() are introduced. But these function are not available
> e.g. in uclibc-ng < 1.0.35. To have a backward compatibility check for the
> availability in the configure script and in case of absence do a direct
> syscall.

> Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions")
> Cc: Dmitry Yakunin <zeil@yandex-team.ru>
> Cc: Petr Vorel <petr.vorel@gmail.com>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> ---
> v3:
>  - use correct syscall number (thanks to Petr Vorel)
>  - add #include <sys/syscall.h> (thanks to Petr Vorel)
>  - remove bogus parameters (thanks to Petr Vorel)
>  - fix #ifdef (thanks to Petr Vorel)
>  - added Fixes tag (thanks to David Ahern)
>  - build test with buildroot 2020.08.3 using uclibc 1.0.34
I tested it to some extent. I was not able to test it on buildroot uclibc:
$ ss -a --cgroup # I put debugging printf
ss.c:3336 inet_show_sock(): tb[INET_DIAG_CGROUP_ID]: (nil), INET_DIAG_CGROUP_ID: 21

I tried mount both cgroup (with cgroupfs-mount) and cgroup2 (using mount).

But it's hard to trigger this code also on regular linux distro with glibc:

$ ss --cgroup -a >/dev/null
Failed to open cgroup2 by ID
Failed to open cgroup2 by ID
Failed to open cgroup2 by ID
Failed to open cgroup2 by ID
Failed to open cgroup2 by ID
Failed to open cgroup2 by ID

Debugging when replacing glibc wrapper with these functions calling raw syscall
it works the same (i.e. "Failed to open cgroup2 by ID")

Thus:
Tested-by: Petr Vorel <petr.vorel@gmail.com>
(to my previous Reviewed-by: tag).

Hope David Ahern send his patch for config.mk dependency to configure,
as his fragment [1] LGTM.

Kind regards,
Petr

[1] https://lore.kernel.org/netdev/82c9159f-0644-40af-fb4c-cc8507456719@gmail.com/

  parent reply	other threads:[~2021-05-15 16:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  6:49 [PATCH iproute2-next v3] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented Heiko Thiery
2021-05-08  8:59 ` Petr Vorel
2021-05-09 22:20 ` David Ahern
2021-05-14 10:22   ` Heiko Thiery
2021-05-14 12:20     ` Petr Vorel
2021-05-14 14:10       ` David Ahern
2021-05-15 16:59         ` Petr Vorel
2021-05-15 18:26           ` David Ahern
2021-05-15 16:58 ` Petr Vorel [this message]
2021-05-17 14:45 ` David Ahern
2021-05-17 17:36   ` Petr Vorel
2021-05-18  1:51     ` David Ahern
2021-05-18  7:24       ` Heiko Thiery

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YJ/9tBaZmw4UkI2t@pevik \
    --to=petr.vorel@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=heiko.thiery@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peter@korsgaard.com \
    --cc=stephen@networkplumber.org \
    --cc=zeil@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).