All of lore.kernel.org
 help / color / mirror / Atom feed
From: bauen1 <j2468h@googlemail.com>
To: James Carter <jwcart2@gmail.com>, selinux@vger.kernel.org
Subject: Re: [PATCH] libsepol/cil: Give an error when constraint expressions exceed max depth
Date: Tue, 8 Sep 2020 21:26:26 +0200	[thread overview]
Message-ID: <4ea160f9-10ff-c293-bb90-cf1efa35d914@gmail.com> (raw)
In-Reply-To: <20200903181900.81179-1-jwcart2@gmail.com>

So the limit for nested conditionals CEXPR_MAXDEPTH is 5.
Is there any specific reason for this number, e.g. limitation of the binary policy format or performance ?

The RBACSEP constraints in my policy, specifically the ones for fifo_file are quite complex and as a result of rewriting them readability I hit the original bug. [1]
While I should try to simplify the constraint I also wouldn't be surprised if I hit this limit in some form again.

[1]:  https://gitlab.com/bauen1/bauen1-policy/-/blob/dev2/policy/system/constraints/constraints_rbacsep.cil#L189-233

-- 
bauen1
https://dn42.bauen1.xyz/

      parent reply	other threads:[~2020-09-08 19:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 18:19 [PATCH] libsepol/cil: Give an error when constraint expressions exceed max depth James Carter
2020-09-03 19:42 ` Stephen Smalley
2020-09-03 20:13   ` James Carter
2020-09-04 12:49 ` Stephen Smalley
2020-09-08 13:46   ` Stephen Smalley
2020-09-08 13:50     ` Stephen Smalley
2020-09-08 15:15       ` James Carter
2020-09-08 15:27       ` Stephen Smalley
2020-09-08 20:31         ` James Carter
2020-09-08 21:11           ` Stephen Smalley
2020-09-08 18:25       ` Dominick Grift
2020-09-08 19:26 ` bauen1 [this message]

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=4ea160f9-10ff-c293-bb90-cf1efa35d914@gmail.com \
    --to=j2468h@googlemail.com \
    --cc=jwcart2@gmail.com \
    --cc=selinux@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 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.