avoid prepare_creds in faccessat when possible
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | CAPABILITIES: add cap_isequal helperinclude/ | +10 | 2 replies | |
| 2/2 | fs: avoid unnecessary prepare_creds in faccessatfs/ | +35 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] avoid prepare_creds in faccessat when possible
Sometimes faccessat needs to modify current thread's credentials, but calls prepare_creds unconditionally.
However, typically resulting credentials are identical to original ones and in that case newcredentials are unnecessary. We can detect this before allocating anything.
This patch series adds a helper which allows comparing capability sets and modifies faccessat to use it.
Mateusz Guzik (2):
CAPABILITIES: add cap_isequal helper
fs: avoid unnecessary prepare_creds in faccessat
fs/open.c | 53 ++++++++++++++++++++++++++++++---------------- include/linux/capability.h | 10 +++++++++ 2 files changed, 45 insertions(+), 18 deletions(-)
Signature · 1 line
1.8.3.1