From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Lorenzo Colitti <lorenzo@google.com>
Cc: netfilter-devel@vger.kernel.org, jscherpelz@google.com,
subashab@codeaurora.org, dcbw@redhat.com
Subject: Re: [PATCH iptables] iptables: support insisting that the lock is held
Date: Wed, 3 May 2017 13:01:20 +0200 [thread overview]
Message-ID: <20170503110120.GA11014@salvia> (raw)
In-Reply-To: <20170420092333.78247-1-lorenzo@google.com>
On Thu, Apr 20, 2017 at 06:23:33PM +0900, Lorenzo Colitti wrote:
> Currently, iptables programs will exit with an error if the
> iptables lock cannot be acquired, but will silently continue if
> the lock cannot be opened at all.
This sounds to me like a wrong design decision was made when
introducing this userspace lock.
> This can cause unexpected failures (with unhelpful error messages)
> in the presence of concurrent updates.
>
> This patch adds a compile-time option that causes iptables to
> refuse to do anything if the lock cannot be acquired. It is a
> compile-time option instead of a command-line flag because:
>
> 1. In order to reliably avoid concurrent modification, all
> invocations of iptables commands must follow this behaviour.
> 2. Whether or not the lock can be opened is typically not
> a run-time condition but is likely to be a configuration
> error.
>
> Tested by deleting xtables.lock and observing that all commands
> failed if iptables was compiled with --enable-strict-locking, but
> succeeded otherwise.
>
> By default, --enable-strict-locking is disabled for backwards
> compatibility reasons. It can be enabled by default in a future
> change if desired.
I would like to skip this compile time switch, if the existing
behaviour is broken, we should just fix it. What is the scenario that
can indeed have an impact in terms of backward compatibility breakage?
Does it really make sense to keep a buggy behaviour around?
next prev parent reply other threads:[~2017-05-03 11:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 9:23 [PATCH iptables] iptables: support insisting that the lock is held Lorenzo Colitti
2017-05-03 11:01 ` Pablo Neira Ayuso [this message]
2017-05-03 14:27 ` Aaron Conole
2017-05-03 14:51 ` Aaron Conole
2017-05-03 16:07 ` Lorenzo Colitti
2017-05-03 15:59 ` Lorenzo Colitti
2017-05-03 15:57 ` Lorenzo Colitti
2017-05-19 7:10 ` Lorenzo Colitti
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=20170503110120.GA11014@salvia \
--to=pablo@netfilter.org \
--cc=dcbw@redhat.com \
--cc=jscherpelz@google.com \
--cc=lorenzo@google.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=subashab@codeaurora.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).