|
|
Message-ID: <20261126010246.GV5716@brightrain.aerifal.cx>
Date: Wed, 25 Nov 2026 20:02:46 -0500
From: Rich Felker <dalias@...c.org>
To: HAKJAE LEE <ririnto@...ao.com>
Cc: musl@...ts.openwall.com
Subject: Re: [RFC PATCH] pwrite/pwritev: extend fallback to EPERM
On Thu, Nov 26, 2026 at 09:49:11AM +0900, HAKJAE LEE wrote:
> Hi,
>
> Commit [1]5370070 ("fix pwrite/pwritev handling of O_APPEND files")
> changed pwrite() and pwritev() to try pwritev2(..., RWF_NOAPPEND) first.
> The fallback handles ENOSYS and EOPNOTSUPP, but EPERM is returned
> directly.
>
> This causes previously working writes to fail where pwritev2 is denied but
> the legacy syscall is allowed, including writes to files opened without
> O_APPEND.
>
> For example, an nginx report on [2]Linux 5.15.0-174-generic includes this
> [3]trace:
This is a repeat of the buggy seccomp filter issue. You cannot have
seccomp filters doing EPERM for unknown/unassigned syscalls. While in
principle it may be possible for us to fold EPERM as if it were ENOSYS
for SYS_pwritev2, this can't be done in general -- lots of the
syscalls people break with buggy seccomp filters have a legitimate
EPERM cause too and we can't just ignore that. And we'd be in trouble
if SYS_pwritev2 were ever extended in a way that EPERM is possible.
What program is setting up this bad seccomp filter? Can you report the
bug to them and get it fixed?
Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.