From: Ondrej Mosnacek <omosnace@redhat.com>
To: selinux@vger.kernel.org, Paul Moore <paul@paul-moore.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
Ondrej Mosnacek <omosnace@redhat.com>
Subject: [RFC PATCH v4 0/2] Fix ENOMEM errors during policy reload
Date: Fri, 30 Nov 2018 16:24:06 +0100 [thread overview]
Message-ID: <20181130152408.24513-1-omosnace@redhat.com> (raw)
Previous versions of this patchset:
https://lore.kernel.org/selinux/20181129125402.5900-1-omosnace@redhat.com/T/
https://lore.kernel.org/selinux/20181127103605.32765-1-omosnace@redhat.com/T/
https://lore.kernel.org/selinux/20181113135255.26045-1-omosnace@redhat.com/T/
Changes in v4:
- folded in all incremental patches
- changed the reverse lookup cache size back to the original 3 as I realized
that I don't really have a compelling reason to change it (I just like
sizes to be powers of two...)
Changes in v3:
(new changes are only in the "[fixup]" patches)
- fixed handling of SECSID_NULL (it is now remapped to unlabeled as before)
* verified using selinux-testsuite
- cosmetic tweak: add sidtab_lookup_initial() helper to make
sidtab_search_core() a bit more readable
- fixed converting of unmapped contexts
* verified using the reproducer from Stephen Smalley
- cosmetic tweak: drop the 'out' goto label in convert_context()
- fixed SIDTAB_LEAF_ENTRIES to use SIDTAB_NODE_ALLOC_SIZE instead of using
PAGE_SIZE directly
Changes in v2:
- dropped the first patch since it is already merged in -next
- fixed initial SID table to not reserve an entry for SECSID_NULL
- added back an equivalent of the reverse lookup cache
- fixed checkpatch.pl errors and some warnings
Testing:
An x86_64 Fedora 29 kernel with this patchset applied passes selinux-testsuite
and the reproducer from GH issue #38 [1]. I also made sure that the two bugs
discovered in previous version are now fixed.
[1] https://github.com/SELinuxProject/selinux-kernel/issues/38
Ondrej Mosnacek (2):
selinux: use separate table for initial SID lookup
selinux: overhaul sidtab to fix bug and improve performance
security/selinux/ss/mls.c | 23 +-
security/selinux/ss/mls.h | 3 +-
security/selinux/ss/policydb.c | 10 +-
security/selinux/ss/services.c | 200 +++++------
security/selinux/ss/services.h | 2 +-
security/selinux/ss/sidtab.c | 616 +++++++++++++++++++++------------
security/selinux/ss/sidtab.h | 95 +++--
7 files changed, 574 insertions(+), 375 deletions(-)
--
2.19.2
next reply other threads:[~2018-11-30 15:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 15:24 Ondrej Mosnacek [this message]
2018-11-30 15:24 ` [RFC PATCH v4 1/2] selinux: use separate table for initial SID lookup Ondrej Mosnacek
2018-12-03 17:17 ` Stephen Smalley
2018-12-05 20:59 ` Paul Moore
2018-12-06 9:33 ` Ondrej Mosnacek
2018-12-06 23:26 ` Paul Moore
2018-11-30 15:24 ` [RFC PATCH v4 2/2] selinux: overhaul sidtab to fix bug and improve performance Ondrej Mosnacek
2018-12-03 17:17 ` Stephen Smalley
2018-12-05 22:52 ` Paul Moore
2018-12-06 9:36 ` Ondrej Mosnacek
2018-12-06 23:29 ` Paul Moore
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=20181130152408.24513-1-omosnace@redhat.com \
--to=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=sds@tycho.nsa.gov \
--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 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).