linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <christian.brauner@ubuntu.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: bpfilter logging write errors in dmesg
Date: Mon, 27 Jul 2020 16:21:14 +0200	[thread overview]
Message-ID: <20200727142114.uzxr4kl7xdj2ildi@wittgenstein> (raw)
In-Reply-To: <20200727141337.liwdfjxq4cwvt5if@wittgenstein>

On Mon, Jul 27, 2020 at 04:13:38PM +0200, Christian Brauner wrote:
> On Mon, Jul 27, 2020 at 03:28:55PM +0200, Christoph Hellwig wrote:
> > On Mon, Jul 27, 2020 at 12:46:36PM +0200, Christian Brauner wrote:
> > > Hey Christoph,
> > > 
> > > Seems that commit
> > > 6955a76fbcd5 ("bpfilter: switch to kernel_write")
> > > causes bpfilter to spew these useless messages in dmesg?
> > > 
> > > [   26.356824] Started bpfilter
> > > [   26.357059] bpfilter: write fail -22
> > > [   26.396244] Started bpfilter
> > > [   26.396325] bpfilter: Loaded bpfilter_umh pid 637
> > > [   26.396542] bpfilter: write fail -22
> > > [   26.409588] bpfilter: Loaded bpfilter_umh pid 638
> > > [   26.410790] Started bpfilter
> > > [   26.410960] bpfilter: write fail -22
> > > [   26.445718] Started bpfilter
> > > [   26.445799] bpfilter: Loaded bpfilter_umh pid 640
> > > [   26.445983] bpfilter: write fail -22
> > > [   26.451122] bpfilter: read fail 0
> > > [   26.496497] bpfilter: Loaded bpfilter_umh pid 648
> > > [   26.497889] Started bpfilter
> > > [   26.750028] bpfilter: write fail -22
> > > [   26.768400] Started bpfilter
> > > [   26.768496] bpfilter: Loaded bpfilter_umh pid 661
> > > [   26.768699] bpfilter: write fail -22
> > > [   26.806550] Started bpfilter
> > > [   26.806616] bpfilter: Loaded bpfilter_umh pid 663
> > > [   26.864708] bpfilter: write fail -22
> > > [   26.872345] bpfilter: Loaded bpfilter_umh pid 666
> > > [   26.873072] Started bpfilter
> > > [   26.873194] bpfilter: write fail -22
> > > [   27.295514] kauditd_printk_skb: 22 callbacks suppressed
> > > 
> > > This is on a pure v5.8-rc7 via make bindep-pkg. I'm not using bpfilter
> > > in any shape or form afaict and haven't seen those messages before and
> > > this seems to be the last change I see.
> > 
> > I don't see any of those on 5.8-rc, just:
> > 
> > root@testvm:~# dmesg | grep bpf
> > [    6.692550] bpfilter: Loaded bpfilter_umh pid 1849
> 
> Hm, odd
> 
> > 
> > That debug patch below should help to pintpoint what is going on for
> > you:
> 
> Thanks for the debug patch! Applied and ran a kernel and I'm getting:
> 
> [   21.919851] bpfilter: Loaded bpfilter_umh pid 619
> [   22.000229] rw_verify_area
> [   22.000235] bpfilter: write fail -22
> [   22.014686] Started bpfilter
> 
> I'm also seeing some other failures later:
> 
> [  236.898220] bpfilter: write fail -22
> [  236.899255] bpfilter: write fail -32
> [  236.922557] bpfilter: Loaded bpfilter_umh pid 1101
> [  236.923310] Started bpfilter
> [  236.923521] rw_verify_area
> [  236.923524] bpfilter: write fail -22
> [  236.925273] bpfilter: read fail 0
> [  236.945117] bpfilter: Loaded bpfilter_umh pid 1103
> [  236.945925] Started bpfilter
> [  236.946123] rw_verify_area
> [  236.946126] bpfilter: write fail -22
> [  236.947641] bpfilter: read fail 0
> [  236.968143] bpfilter: Loaded bpfilter_umh pid 1105
> [  236.968734] Started bpfilter
> [  236.987777] rw_verify_area
> [  236.987781] bpfilter: write fail -22
> [  236.990072] bpfilter: read fail 0
> 
> Seems I can trigger this via iptables:
> 
> [  437.922719] bpfilter: write fail -22
> [  437.924488] bpfilter: read fail 0
> root@g1-vm:~# iptables -S
> iptables v1.8.4 (legacy): can't initialize iptables table `filter': Bad address
> Perhaps iptables or your kernel needs to be upgraded.
> 
> I have
> CONFIG_IP_NF_IPTABLES=m
> CONFIG_IP6_NF_IPTABLES=m
> maybe I'm just missing another kernel option or something and I have no
> idea how this bpfilter thing and iptables relate to each other. So maybe
> it's not worth the effort and it's just my setup being broken somehow.

Fwiw, it seems that on kernels that replace iptables with nftables
programs calling into iptables will cause this bpfilter dmesg logging.

Christian

  reply	other threads:[~2020-07-27 14:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 10:46 bpfilter logging write errors in dmesg Christian Brauner
2020-07-27 13:28 ` Christoph Hellwig
2020-07-27 14:13   ` Christian Brauner
2020-07-27 14:21     ` Christian Brauner [this message]
2020-07-27 14:50     ` Christoph Hellwig
2020-07-30  0:59       ` Rodrigo Madera
2020-07-30  6:06         ` Christoph Hellwig
2020-07-30 15:55           ` Rodrigo Madera
2020-07-30  7:09       ` Christian Brauner

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=20200727142114.uzxr4kl7xdj2ildi@wittgenstein \
    --to=christian.brauner@ubuntu.com \
    --cc=hch@lst.de \
    --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).