selinux: fix race when removing selinuxfs entries
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 5 repliesIn review
- v11 patch 3 repliesSuperseded
Changes in v2 from the cover letter
- switch to hopefully proper and actually working solution instead of the horrible mess I produced last time...
v1: https://lore.kernel.org/selinux/[email protected]/T/
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | d_walk: optionally lock also parent inodefs/ | +33 | 2 replies | |
| 2/4 | d_walk: add leave callbackfs/ | +16 | 0 replies | |
| 3/4 | dcache: introduce d_genocide_safe()fs/ include/ | +33 | 0 replies | |
| 4/4 | selinux: use d_genocide_safe() in selinuxfssecurity/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/4] selinux: fix race when removing selinuxfs entries
After hours and hours of getting familiar with dcache and debugging, I think I finally found a solution that works and hopefully stands a chance of being committed.
The series still doesn't address the lack of atomicity of the policy reload transition, but this is part of a wider problem and can be resolved later. Let's fix at least the userspace-triggered lockup first.
Changes since v1:
- switch to hopefully proper and actually working solution instead of the horrible mess I produced last time...
v1: https://lore.kernel.org/selinux/[email protected]/T/
Ondrej Mosnacek (4):
d_walk: optionally lock also parent inode
d_walk: add leave callback
dcache: introduce d_genocide_safe()
selinux: use d_genocide_safe() in selinuxfs
fs/dcache.c | 87 +++++++++++++++++++++++++++++++----- include/linux/dcache.h | 1 + security/selinux/selinuxfs.c | 2 +- 3 files changed, 77 insertions(+), 13 deletions(-)
Signature · 1 line
2.21.0