From: Jiri Olsa <olsajiri@gmail.com>
To: Ludovic L'Hours <ludovic.lhours@gmail.com>
Cc: andrii@kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH] libbpf: Fix map creation flags sanitization
Date: Mon, 9 Jan 2023 09:53:35 +0100 [thread overview]
Message-ID: <Y7vWD5osnN0e5LdY@krava> (raw)
In-Reply-To: <20230108182018.24433-1-ludovic.lhours@gmail.com>
On Sun, Jan 08, 2023 at 07:20:18PM +0100, Ludovic L'Hours wrote:
> As BPF_F_MMAPABLE flag is now conditionnaly set (by map_is_mmapable),
> it should not be toggled but disabled if not supported by kernel.
>
> Fixes: 4fcac46c7e10 ("libbpf: only add BPF_F_MMAPABLE flag for data maps with global vars")
> Signed-off-by: Ludovic L'Hours <ludovic.lhours@gmail.com>
LGTM
Acked-by: Jiri Olsa <jolsa@kernel.org>
jirka
> ---
> tools/lib/bpf/libbpf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index a5c67a3c93c5..f8dfee32c2bc 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -7355,7 +7355,7 @@ static int bpf_object__sanitize_maps(struct bpf_object *obj)
> if (!bpf_map__is_internal(m))
> continue;
> if (!kernel_supports(obj, FEAT_ARRAY_MMAP))
> - m->def.map_flags ^= BPF_F_MMAPABLE;
> + m->def.map_flags &= ~BPF_F_MMAPABLE;
> }
>
> return 0;
> --
> 2.25.1
>
next prev parent reply other threads:[~2023-01-09 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-08 18:20 [PATCH] libbpf: Fix map creation flags sanitization Ludovic L'Hours
2023-01-09 8:53 ` Jiri Olsa [this message]
2023-01-11 2:10 ` patchwork-bot+netdevbpf
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=Y7vWD5osnN0e5LdY@krava \
--to=olsajiri@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=ludovic.lhours@gmail.com \
/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