lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230904.070506-tidy.dividend.mousy.flasks-BFYX3RqFch3q@cyphar.com>
Date:   Mon, 4 Sep 2023 17:09:09 +1000
From:   Aleksa Sarai <cyphar@...har.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Damian Tometzki <dtometzki@...oraproject.org>,
        Shuah Khan <shuah@...nel.org>, Jeff Xu <jeffxu@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        Daniel Verkamp <dverkamp@...omium.org>,
        Christian Brauner <brauner@...nel.org>,
        Dominique Martinet <asmadeus@...ewreck.org>,
        stable@...r.kernel.org, linux-api@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v2 3/5] memfd: improve userspace warnings for missing
 exec-related flags

On 2023-09-02, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Fri, 1 Sep 2023 07:13:45 +0200 Damian Tometzki <dtometzki@...oraproject.org> wrote:
> 
> > >  	if (!(flags & (MFD_EXEC | MFD_NOEXEC_SEAL))) {
> > > -		pr_warn_once(
> > > +		pr_info_ratelimited(
> > >  			"%s[%d]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set\n",
> > >  			current->comm, task_pid_nr(current));
> > >  	}
> > > 
> > > -- 
> > > 2.41.0
> > >
> > Hello Sarai,
> > 
> > i got a lot of messages in dmesg with this. DMESG is unuseable with
> > this. 
> > [ 1390.349462] __do_sys_memfd_create: 5 callbacks suppressed
> > [ 1390.349468] pipewire-pulse[2930]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
> > [ 1390.350106] pipewire[2712]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
> 
> OK, thanks, I'll revert this.  Spamming everyone even harder isn't a
> good way to get developers to fix their stuff.

Sorry, I'm on vacation. I will send a follow-up patch to remove this
logging entirely -- if we can't do rate-limited logging then logging a
single message effectively at boot time makes no sense. I had hoped that
this wouldn't be too much (given there is a fair amount of INFO-level
spam in the kernel log) but I guess the default ratelimit (5Hz) is too
liberal.

Perhaps we can re-consider adding some logging in the future, when more
programs have migrated. The only other "reasonable" way to reduce the
logging would be to add something to task_struct so we only log once per
task, but obviously that's massively overkill.

(FWIW, I don't think the logging was ever necessary. There's nothing
wrong with running an older program that doesn't pass the flags.)

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ