mbox series

[00/13] checkpolicy improvements

Message ID 20210914124828.19488-1-cgzones@googlemail.com (mailing list archive)
Headers show
Series checkpolicy improvements | expand

Message

Christian Göttsche Sept. 14, 2021, 12:48 p.m. UTC
Miscellaneous improvements to the checkpolicy subproject, affecting the
traditional language compilers checkmodule(8) and checkpolicy(8).

Avoid implicit conversions, free leaked memory, resolve several compiler
warnings, use strict integer parsing.

The last patch is an adoption of a patch proposed by liwugang [1], with
the requested changes integrated.


[1]: https://patchwork.kernel.org/project/selinux/patch/20210601151704.2688389-1-liwugang@163.com/

Christian Göttsche (13):
  libsepol: avoid implicit conversions
  libsepol: free memory after policy validation
  checkpolicy: enclose macro argument in parentheses
  checkpolicy: misc checkmodule tweaks
  checkpolicy: misc checkpolicy tweaks
  checkpolicy: mark read-only parameters in module compiler const
  checkpolicy: mark file local functions in policy_define static
  checkpolicy: add missing function declarations
  checkpolicy: resolve dismod memory leaks
  checkpolicy: avoid implicit conversion
  checkpolicy: error out on parsing too big integers
  checkpolicy: print warning on source line overflow
  checkpolicy: free extended permission memory

 checkpolicy/checkmodule.c        | 18 +++----
 checkpolicy/checkpolicy.c        | 26 +++++-----
 checkpolicy/module_compiler.c    | 26 +++++-----
 checkpolicy/module_compiler.h    |  4 +-
 checkpolicy/policy_define.c      | 87 ++++++++++++++++----------------
 checkpolicy/policy_parse.y       | 16 +++++-
 checkpolicy/policy_scan.l        | 25 ++++++---
 checkpolicy/test/dismod.c        |  7 ++-
 libsepol/src/policydb_validate.c | 14 ++++-
 libsepol/src/util.c              |  2 +-
 10 files changed, 131 insertions(+), 94 deletions(-)

Comments

James Carter Sept. 15, 2021, 2:59 p.m. UTC | #1
On Tue, Sep 14, 2021 at 8:51 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Miscellaneous improvements to the checkpolicy subproject, affecting the
> traditional language compilers checkmodule(8) and checkpolicy(8).
>
> Avoid implicit conversions, free leaked memory, resolve several compiler
> warnings, use strict integer parsing.
>
> The last patch is an adoption of a patch proposed by liwugang [1], with
> the requested changes integrated.
>
>
> [1]: https://patchwork.kernel.org/project/selinux/patch/20210601151704.2688389-1-liwugang@163.com/
>
> Christian Göttsche (13):
>   libsepol: avoid implicit conversions
>   libsepol: free memory after policy validation
>   checkpolicy: enclose macro argument in parentheses
>   checkpolicy: misc checkmodule tweaks
>   checkpolicy: misc checkpolicy tweaks
>   checkpolicy: mark read-only parameters in module compiler const
>   checkpolicy: mark file local functions in policy_define static
>   checkpolicy: add missing function declarations
>   checkpolicy: resolve dismod memory leaks
>   checkpolicy: avoid implicit conversion
>   checkpolicy: error out on parsing too big integers
>   checkpolicy: print warning on source line overflow
>   checkpolicy: free extended permission memory
>
>  checkpolicy/checkmodule.c        | 18 +++----
>  checkpolicy/checkpolicy.c        | 26 +++++-----
>  checkpolicy/module_compiler.c    | 26 +++++-----
>  checkpolicy/module_compiler.h    |  4 +-
>  checkpolicy/policy_define.c      | 87 ++++++++++++++++----------------
>  checkpolicy/policy_parse.y       | 16 +++++-
>  checkpolicy/policy_scan.l        | 25 ++++++---
>  checkpolicy/test/dismod.c        |  7 ++-
>  libsepol/src/policydb_validate.c | 14 ++++-
>  libsepol/src/util.c              |  2 +-
>  10 files changed, 131 insertions(+), 94 deletions(-)
>
> --
> 2.33.0
>

For the whole series with the v2 and v3 patches:

Acked-by: James Carter <jwcart2@gmail.com>
James Carter Sept. 16, 2021, 8:34 p.m. UTC | #2
On Wed, Sep 15, 2021 at 10:59 AM James Carter <jwcart2@gmail.com> wrote:
>
> On Tue, Sep 14, 2021 at 8:51 AM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> > Miscellaneous improvements to the checkpolicy subproject, affecting the
> > traditional language compilers checkmodule(8) and checkpolicy(8).
> >
> > Avoid implicit conversions, free leaked memory, resolve several compiler
> > warnings, use strict integer parsing.
> >
> > The last patch is an adoption of a patch proposed by liwugang [1], with
> > the requested changes integrated.
> >
> >
> > [1]: https://patchwork.kernel.org/project/selinux/patch/20210601151704.2688389-1-liwugang@163.com/
> >
> > Christian Göttsche (13):
> >   libsepol: avoid implicit conversions
> >   libsepol: free memory after policy validation
> >   checkpolicy: enclose macro argument in parentheses
> >   checkpolicy: misc checkmodule tweaks
> >   checkpolicy: misc checkpolicy tweaks
> >   checkpolicy: mark read-only parameters in module compiler const
> >   checkpolicy: mark file local functions in policy_define static
> >   checkpolicy: add missing function declarations
> >   checkpolicy: resolve dismod memory leaks
> >   checkpolicy: avoid implicit conversion
> >   checkpolicy: error out on parsing too big integers
> >   checkpolicy: print warning on source line overflow
> >   checkpolicy: free extended permission memory
> >
> >  checkpolicy/checkmodule.c        | 18 +++----
> >  checkpolicy/checkpolicy.c        | 26 +++++-----
> >  checkpolicy/module_compiler.c    | 26 +++++-----
> >  checkpolicy/module_compiler.h    |  4 +-
> >  checkpolicy/policy_define.c      | 87 ++++++++++++++++----------------
> >  checkpolicy/policy_parse.y       | 16 +++++-
> >  checkpolicy/policy_scan.l        | 25 ++++++---
> >  checkpolicy/test/dismod.c        |  7 ++-
> >  libsepol/src/policydb_validate.c | 14 ++++-
> >  libsepol/src/util.c              |  2 +-
> >  10 files changed, 131 insertions(+), 94 deletions(-)
> >
> > --
> > 2.33.0
> >
>
> For the whole series with the v2 and v3 patches:
>
> Acked-by: James Carter <jwcart2@gmail.com>

This series has been merged.
Thanks,
Jim