Skip to content

RFC Overhaul the audit filename handling

Paul Moore linux-audit linux-fsdevel lkml 1 version In review

Get series with b4
b4 am 20150108164514.11316.85331.stgit@localhost

Versions newest first

  1. v1 RFC Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5fs: rework getname_kernel to handle up to PATH_MAX sized filenamesfs/namei.c+20 -141 reply
2/5fs: create proper filename objects using getname_kernel()fs/exec.c fs/namei.c fs/open.c+44 -121 reply
3/5audit: enable filename recording via getname_kernel()fs/namei.c kernel/auditsc.c+4 -371 reply
4/5audit: fix filename matching in __audit_inode() and __audit_inode_child()kernel/auditsc.c+25 -91 reply
5/5audit: replace getname()/putname() hacks with reference countersfs/namei.c include/linux/audit.h include/linux/fs.h +2 more+26 -1332 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchRichard Guy Briggs
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/5] Overhaul the audit filename handling

There have been some patches added to v3.19-rcX to fix various problems in the way audit handles filenames but they have been hacks on top of hacks, not really something we want long term. This patchset reworks the way audit handles filenames, removing a lot of nasty hacks added recently, and fixing a few bugs that still remain.

Most significant to folks outside of audit, patch 5/5 does away with the nasty getname()/putname() kludge in favor of a less ugly reference count approach.

Comments and feedback are welcome. If nothing ugly pops up on review I'll see if Linus is interested in taking this for the next v3.19-rcX release, otherwise I'll toss it into linux-next for v3.20.

-Paul

---

Paul Moore (5):
fs: rework getname_kernel to handle up to PATH_MAX sized filenames
fs: create proper filename objects using getname_kernel()
audit: enable filename recording via getname_kernel()
audit: fix filename matching in __audit_inode() and __audit_inode_child()
audit: replace getname()/putname() hacks with reference counters

 fs/exec.c             |   11 +++
 fs/namei.c            |   98 ++++++++++++++++++-----------
 fs/open.c             |   11 +++
 include/linux/audit.h |    3 -
 include/linux/fs.h    |    9 +--
 kernel/audit.h        |   17 +----
 kernel/auditsc.c      |  167 +++++++++----------------------------------------
 7 files changed, 115 insertions(+), 201 deletions(-)