From: Stanislav Fomichev <sdf@google.com>
To: Martin Kelly <martin.kelly@crowdstrike.com>
Cc: bpf@vger.kernel.org, Andrii Nakryiko <andrii@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Marco Vedovati <marco.vedovati@crowdstrike.com>
Subject: Re: [PATCH] libbpf: set close-on-exec flag on gzopen
Date: Thu, 10 Aug 2023 15:08:42 -0700 [thread overview]
Message-ID: <ZNVf6kHamI9awatB@google.com> (raw)
In-Reply-To: <20230810210945.100430-1-martin.kelly@crowdstrike.com>
On 08/10, Martin Kelly wrote:
> From: Marco Vedovati <marco.vedovati@crowdstrike.com>
>
> Enable the close-on-exec flag when using gzopen
>
> This is especially important for multithreaded programs making use of
> libbpf, where a fork + exec could race with libbpf library calls,
> potentially resulting in a file descriptor leaked to the new process.
We do have fopen(, "re") all over the place; gzopen seem to pass mode
to fopen.
Acked-by: Stanislav Fomichev <sdf@google.com>
Fixes: 8601fd422148 ("libbpf: Allow to augment system Kconfig through extra optional config")
For fixes, not sure whether anybody actually builds libbpf from the kernel
tree...
prev parent reply other threads:[~2023-08-10 22:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 21:09 [PATCH] libbpf: set close-on-exec flag on gzopen Martin Kelly
2023-08-10 22:08 ` Stanislav Fomichev [this message]
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=ZNVf6kHamI9awatB@google.com \
--to=sdf@google.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=marco.vedovati@crowdstrike.com \
--cc=martin.kelly@crowdstrike.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.