selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Carter <jwcart2@gmail.com>
To: Inseob Kim <inseob@google.com>
Cc: selinux@vger.kernel.org, tweek@google.com, jeffv@google.com
Subject: Re: [PATCH v3 1/4] libsepol: Allow booleanif to have info nodes
Date: Fri, 25 Apr 2025 13:25:41 -0400	[thread overview]
Message-ID: <CAP+JOzRrk_YRBodoUwPL_CuuMgSMfMKefjmoZzvt8+Ge4a7khQ@mail.gmail.com> (raw)
In-Reply-To: <CAP+JOzQ2aPJjodpMTHdtoY0N-fUCyAV8Rt5NA8tu1mNLadJUCQ@mail.gmail.com>

On Fri, Apr 11, 2025 at 1:15 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Thu, Apr 10, 2025 at 9:06 PM Inseob Kim <inseob@google.com> wrote:
> >
> > Allowing more info nodes helps debuggability, especially neverallow
> > failure reports.
> >
> > Signed-off-by: Inseob Kim <inseob@google.com>
>
> For these four patches:
> Acked-by: James Carter <jwcart2@gmail.com>
>

These four patches have been merged.
Thanks,
Jim

> > ---
> >  libsepol/cil/src/cil_binary.c      | 1 +
> >  libsepol/cil/src/cil_build_ast.c   | 1 +
> >  libsepol/cil/src/cil_resolve_ast.c | 1 +
> >  libsepol/cil/src/cil_verify.c      | 3 +++
> >  4 files changed, 6 insertions(+)
> >
> > diff --git a/libsepol/cil/src/cil_binary.c b/libsepol/cil/src/cil_binary.c
> > index e84188a0..b0befda3 100644
> > --- a/libsepol/cil/src/cil_binary.c
> > +++ b/libsepol/cil/src/cil_binary.c
> > @@ -2153,6 +2153,7 @@ static int __cil_cond_to_policydb_helper(struct cil_tree_node *node, __attribute
> >
> >         case CIL_CALL:
> >         case CIL_TUNABLEIF:
> > +       case CIL_SRC_INFO:
> >                 break;
> >         default:
> >                 cil_tree_log(node, CIL_ERR, "Invalid statement within booleanif");
> > diff --git a/libsepol/cil/src/cil_build_ast.c b/libsepol/cil/src/cil_build_ast.c
> > index 072d2622..fc11758d 100644
> > --- a/libsepol/cil/src/cil_build_ast.c
> > +++ b/libsepol/cil/src/cil_build_ast.c
> > @@ -6164,6 +6164,7 @@ static int check_for_illegal_statement(struct cil_tree_node *parse_current, stru
> >                         parse_current->data != CIL_KEY_AUDITALLOW &&
> >                         parse_current->data != CIL_KEY_TYPETRANSITION &&
> >                         parse_current->data != CIL_KEY_TYPECHANGE &&
> > +                       parse_current->data != CIL_KEY_SRC_INFO &&
> >                         parse_current->data != CIL_KEY_TYPEMEMBER &&
> >                         ((args->db->policy_version < POLICYDB_VERSION_COND_XPERMS) ||
> >                           (parse_current->data != CIL_KEY_ALLOWX &&
> > diff --git a/libsepol/cil/src/cil_resolve_ast.c b/libsepol/cil/src/cil_resolve_ast.c
> > index a8fa89df..392f03c7 100644
> > --- a/libsepol/cil/src/cil_resolve_ast.c
> > +++ b/libsepol/cil/src/cil_resolve_ast.c
> > @@ -3849,6 +3849,7 @@ static int __cil_resolve_ast_node_helper(struct cil_tree_node *node, uint32_t *f
> >                         node->flavor != CIL_AVRULE &&
> >                         node->flavor != CIL_TYPE_RULE &&
> >                         node->flavor != CIL_NAMETYPETRANSITION &&
> > +                       node->flavor != CIL_SRC_INFO &&
> >                         ((args->db->policy_version < POLICYDB_VERSION_COND_XPERMS) ||
> >                          (node->flavor != CIL_AVRULEX))) {
> >                         rc = SEPOL_ERR;
> > diff --git a/libsepol/cil/src/cil_verify.c b/libsepol/cil/src/cil_verify.c
> > index 550b4542..cde9dd41 100644
> > --- a/libsepol/cil/src/cil_verify.c
> > +++ b/libsepol/cil/src/cil_verify.c
> > @@ -1176,6 +1176,9 @@ static int __cil_verify_booleanif_helper(struct cil_tree_node *node, __attribute
> >                    booleanif statements if they don't have "*" as the file. We
> >                    can't check that here. Or at least we won't right now. */
> >                 break;
> > +       case CIL_SRC_INFO:
> > +               //Fall through
> > +               break;
> >         default: {
> >                 const char * flavor = cil_node_to_string(node);
> >                 if (bif->preserved_tunable) {
> > --
> > 2.49.0.604.gff1f9ca942-goog
> >
> >

      reply	other threads:[~2025-04-25 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11  1:05 [PATCH v3 1/4] libsepol: Allow booleanif to have info nodes Inseob Kim
2025-04-11  1:05 ` [PATCH v3 2/4] libsepol: Make line markers of rules configurable Inseob Kim
2025-04-11  1:05 ` [PATCH v3 3/4] checkpolicy: Support line markers for allow rules Inseob Kim
2025-04-11  1:05 ` [PATCH v3 4/4] checkmodule: " Inseob Kim
2025-04-11 17:15 ` [PATCH v3 1/4] libsepol: Allow booleanif to have info nodes James Carter
2025-04-25 17:25   ` James Carter [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=CAP+JOzRrk_YRBodoUwPL_CuuMgSMfMKefjmoZzvt8+Ge4a7khQ@mail.gmail.com \
    --to=jwcart2@gmail.com \
    --cc=inseob@google.com \
    --cc=jeffv@google.com \
    --cc=selinux@vger.kernel.org \
    --cc=tweek@google.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 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).