Skip to content

ksmbd: various fixes

Christian Brauner linux-cifs linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11ksmbd: fix lookup on idmapped mountsfs/ksmbd/smb2pdu.c fs/ksmbd/vfs.c fs/ksmbd/vfs.h+37 -270 replies
2/11ksmbd: fix translation in smb2_populate_readdir_entry()fs/ksmbd/smb2pdu.c fs/ksmbd/smb_common.c fs/ksmbd/smb_common.h+3 -80 replies
3/11ksmbd: fix translation in create_posix_rsp_buf()fs/ksmbd/oplock.c+4 -20 replies
4/11smb2pdu: fix translation in ksmbd_acls_fattr()fs/ksmbd/smb2pdu.c fs/ksmbd/smbacl.c+11 -90 replies
5/11ksmbd: fix translation in acl entriesfs/ksmbd/smbacl.c fs/ksmbd/smbacl.h fs/ksmbd/vfs.c+33 -100 replies
6/11ksmbd: fix subauth 0 handling in sid_to_id()fs/ksmbd/smbacl.c+2 -22 replies
7/11ksmbd: fix translation in sid_to_id()fs/ksmbd/smbacl.c+18 -40 replies
8/11ndr: fix translation in ndr_encode_posix_acl()fs/ksmbd/ndr.c+2 -20 replies
9/11ksmbd: ensure error is surfaced in set_file_basic_info()fs/ksmbd/smb2pdu.c+1 -10 replies
10/11ksmbd: remove setattr preparations in set_file_basic_info()fs/ksmbd/smb2pdu.c+0 -56 replies
11/11ksmbd: defer notify_change() callfs/ksmbd/smbacl.c+14 -74 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] ksmbd: various fixes

From: Christian Brauner <[email protected]>

Hey everyone,

I took the time to look at ksmbd last week and today. I performed various tests, read a bunch of code and discovered a few bugs that I addressed in this series. Most of them simply deal with the translation of ownership between samba ids and unix ids.

The server client model makes it a bit harder to reason about things but in essence ksmbd behaves like a very simple shim sitting on top of the underlying filesystem and thus bares some _vague_ resemblance to overlayfs and other overlay-style filesystems. The crucial thing is that ksmbd calls into the lower filesystem to create and manage filesystem objects. This is inherently a tricky thing to get right as it essentially involves two-level thinking all of the time. The easiest conceptual model I came up with for me is that ksmbd is similar to a userspace process that calls into the filesystem. With this model in mind it becomes a lot clearer how ownership needs to be managed. I tried to reflect that thinking in the commit message explaining why what happens.

Thanks!
Christian

Christian Brauner (11):
ksmbd: fix lookup on idmapped mounts
ksmbd: fix translation in smb2_populate_readdir_entry()
ksmbd: fix translation in create_posix_rsp_buf()
smb2pdu: fix translation in ksmbd_acls_fattr()
ksmbd: fix translation in acl entries
ksmbd: fix subauth 0 handling in sid_to_id()
ksmbd: fix translation in sid_to_id()
ndr: fix translation in ndr_encode_posix_acl()
ksmbd: ensure error is surfaced in set_file_basic_info()
ksmbd: remove setattr preparations in set_file_basic_info()
ksmbd: defer notify_change() call

 fs/ksmbd/ndr.c        |  4 +--
 fs/ksmbd/oplock.c     |  6 ++--
 fs/ksmbd/smb2pdu.c    | 43 +++++++++++++--------------
 fs/ksmbd/smb_common.c |  4 +--
 fs/ksmbd/smb_common.h |  1 -
 fs/ksmbd/smbacl.c     | 69 +++++++++++++++++++++++++++----------------
 fs/ksmbd/smbacl.h     | 25 ++++++++++++++++
 fs/ksmbd/vfs.c        | 47 ++++++++++++++++-------------
 fs/ksmbd/vfs.h        |  3 +-
 9 files changed, 125 insertions(+), 77 deletions(-)

base-commit: 0bffa153a2f46dcbced4a48167e91522d8aabe58

Signature · 1 line
2.30.2