All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Liping Zhang <zlpnobody@gmail.com>
Cc: "Laura García Liébana" <laura.garcia@zevenet.com>,
	"Liping Zhang" <zlpnobody@163.com>,
	"Pablo Neira Ayuso" <pablo@netfilter.org>,
	"Netfilter Developer Mailing List"
	<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nf] netfilter: nft_hash: do not dump the auto generated seed
Date: Wed, 12 Apr 2017 22:43:25 +0200	[thread overview]
Message-ID: <20170412204325.GG27933@breakpoint.cc> (raw)
In-Reply-To: <CAML_gOewoMeAm_jsgZbvDCAKuAY6Q3xDBLVS8s=E0JZQWiRR5Q@mail.gmail.com>

Liping Zhang <zlpnobody@gmail.com> wrote:
> >> +++ b/net/netfilter/nft_hash.c
> >> @@ -21,6 +21,7 @@ struct nft_hash {
> >>         enum nft_registers      sreg:8;
> >>         enum nft_registers      dreg:8;
> >>         u8                      len;
> >> +       bool                    autogen_seed:1;
> >
> > Hi Liping, I don't think that hiding the seed value would be useful, and
> > even adding this attribute doesn't worth it just to hide the seed.
> >
> 
> If we don't do this thing, if the user inputting the following nft rules:
>   # nft add rule x y ct mark set jhash ip saddr mod 2
> 
> Then nft list ruleset will display something like this, where 0xd6ab633c
> is very unpredictable, and the user doesn't care the seed at all:
>   ct mark set jhash ip saddr mod 2 seed 0xd6ab633c
> 
> This will cause annoying complain when running "nft-test.py ip/hash.t".
> 
> But another problem is this, I remember that Pablo is implementing a new
> delete rule syntax, something like this:
> "nft del rule x y ct mark set jhash ip saddr mod 2"
> 
> The unpredictable seed will cause the above rule failed, since the seed
> is not the same, so we cannot find a matched nft rule.

FWIW I agree with Liping, we should eat the extra bool and
supress seed dump.

I also think most users should not ever have to even know of seed arg
existence.

In fact is there a use case where it is needed?
We might want to ditch it completely and always just
generate it privately in kernel (symhash f.e. uses
a private seed) already.

  reply	other threads:[~2017-04-12 20:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03  8:34 [PATCH nf] netfilter: nft_hash: do not dump the auto generated seed Liping Zhang
2017-04-07 21:19 ` Laura García Liébana
2017-04-08  0:23   ` Liping Zhang
2017-04-12 20:43     ` Florian Westphal [this message]
2017-04-12 23:55       ` Laura García Liébana
2017-04-13 20:53 ` Pablo Neira Ayuso

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=20170412204325.GG27933@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=laura.garcia@zevenet.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=zlpnobody@163.com \
    --cc=zlpnobody@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.