linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Florian Weimer <fweimer@redhat.com>,
	Christian Brauner <christian.brauner@ubuntu.com>
Cc: linux-api@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, dev@opencontainers.org,
	corbet@lwn.net, Carlos O'Donell <carlos@redhat.com>
Subject: Re: [PATCH] syscalls: Document OCI seccomp filter interactions & workaround
Date: Tue, 24 Nov 2020 15:08:05 +0100	[thread overview]
Message-ID: <dcffcbacbc75086582ea3f073c9e6a981a6dd27f.camel@klomp.org> (raw)
In-Reply-To: <878saq3ofx.fsf@oldenburg2.str.redhat.com>

Hi,

Just a reply to note that this isn't just an issue for glibc, but for
any program that might use linux syscalls directly (with fallbacks).

On Tue, 2020-11-24 at 13:54 +0100, Florian Weimer wrote:
> 
> I agree that the standard should mandate ENOSYS, and I've just proposed
> a specification change here:
> 
>   <https://groups.google.com/a/opencontainers.org/g/dev/c/8Phfq3VBxtw>
> 
> However, such a change may take some time to implement.

Thanks, that is really appreciated. We face the same issue in valgrind.

> Meanwhile, we have the problem today with glibc that it wants to use the
> faccessat2 system call but it can't.  I've been told that it would make
> glibc incompatible with the public cloud and Docker.  The best solution
> I could come up with it is this awkward probing sequence.  (Just
> checking for the zero flags argument is not sufficient because systemd
> calls fchmodat with AT_SYMLINK_NOFOLLOW.)
> 
> I do not wish to put the probing sequence into glibc (upstream or
> downstream) unless it is blessed to some degree by kernel developers.  I
> consider it quite ugly and would prefer if more of us share the blame.
> 
> We will face the same issue again with fchmodat2 (or fchmodat4 if that's
> what it's name is going to be).

For valgrind the issue is statx which we try to use before falling back
to stat64, fstatat or stat (depending on architecture, not all define
all of these). The problem with these fallbacks is that under some
containers (libseccomp versions) they might return EPERM instead of
ENOSYS. This causes really obscure errors that are really hard to
diagnose.

Don't you have the same issue with glibc for those architectures that
don't have fstatat or 32bit arches that need 64-bit time_t? And if so,
how are you working around containers possibly returning EPERM instead
of ENOSYS?

Thanks,

Mark

  reply	other threads:[~2020-11-24 14:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 12:08 [PATCH] syscalls: Document OCI seccomp filter interactions & workaround Florian Weimer
2020-11-24 12:26 ` Christian Brauner
2020-11-24 12:54   ` Florian Weimer
2020-11-24 14:08     ` Mark Wielaard [this message]
2020-11-24 16:45       ` Christoph Hellwig
2020-11-24 17:06         ` Jann Horn
2020-11-24 17:15           ` Greg KH
2020-11-24 17:21             ` Christian Brauner
2020-11-24 17:30             ` Jann Horn
2020-11-24 17:44               ` Greg KH
2020-11-24 17:47                 ` Jann Horn
2020-11-24 18:17               ` Florian Weimer
2020-11-24 18:02           ` Florian Weimer
2020-11-24 18:09       ` Florian Weimer
2020-11-24 12:58 ` Aleksa Sarai
2020-11-24 13:05   ` Florian Weimer
2020-11-24 13:37 ` Christoph Hellwig
2020-11-24 14:08   ` Florian Weimer
2020-11-24 16:46     ` Christoph Hellwig
2020-11-24 16:52       ` Florian Weimer

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=dcffcbacbc75086582ea3f073c9e6a981a6dd27f.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=carlos@redhat.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=corbet@lwn.net \
    --cc=dev@opencontainers.org \
    --cc=fweimer@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).