From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Michal Privoznik <mprivozn@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2] seccomp: Get actual errno value from failed seccomp functions
Date: Wed, 26 Oct 2022 13:33:44 +0100 [thread overview]
Message-ID: <Y1kpKGP+a2toN/4w@redhat.com> (raw)
In-Reply-To: <80c86614e3b21dda074b81fe9c3866fdbbb7420e.1666769319.git.mprivozn@redhat.com>
On Wed, Oct 26, 2022 at 09:30:24AM +0200, Michal Privoznik wrote:
> Upon failure, a libseccomp API returns actual errno value very
> rarely. Fortunately, after its commit 34bf78ab (contained in
> 2.5.0 release), the SCMP_FLTATR_API_SYSRAWRC attribute can be set
> which makes subsequent APIs return true errno on failure.
>
> This is especially critical when seccomp_load() fails, because
> generic -ECANCELED says nothing.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>
> v2 of:
>
> https://lists.gnu.org/archive/html/qemu-devel/2022-10/msg04509.html
>
> diff to v1:
> - added comment when setting SYSRAWRC attribute per Philippe's
> suggestion
>
> meson.build | 9 +++++++++
> softmmu/qemu-seccomp.c | 13 +++++++++++++
> 2 files changed, 22 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2022-10-26 12:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 7:30 [PATCH v2] seccomp: Get actual errno value from failed seccomp functions Michal Privoznik
2022-10-26 12:33 ` Daniel P. Berrangé [this message]
2022-10-27 12:55 ` Michal Prívozník
2022-10-27 13:14 ` Daniel P. Berrangé
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=Y1kpKGP+a2toN/4w@redhat.com \
--to=berrange@redhat.com \
--cc=mprivozn@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).