mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Bridges <icb@fastmail.org>
To: koray.fra@gmail.com
Cc: linkinjeon@kernel.org, senozhatsky@chromium.org, tom@talpey.com,
	chenxiaosong@chenxiaosong.com, hyc.lee@gmail.com,
	linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ian Bridges <icb@fastmail.org>
Subject: Re: [PATCH v3 1/2] ksmbd: decode and honor DOS attribute validity flags
Date: Sun, 15 Nov 2026 20:13:51 -0600	[thread overview]
Message-ID: <20261116021351.2485365-1-icb@fastmail.org> (raw)
In-Reply-To: <20261115155308.415734-1-koray.fra@gmail.com>

Hi,

On Sun, Nov 15, 2026 at 04:53:07PM +0100, koraynilay wrote:
> Currently, when setting file attributes via FSCTL_SET_SPARSE,
> FSCTL_SET_COMPRESSION, or FileBasicInformation, ksmbd hardcodes
> flags = 0x51 (XATTR_DOSINFO_ATTRIB | XATTR_DOSINFO_CREATE_TIME |
> XATTR_DOSINFO_ITIME). This injects unrequested creation time and itime
> into user.DOSATTRIB on disk, even though the client only requested an
> attribute modification.

I tested both patches with the server code of ksmbd-for-next
(3bc1fb9c3b20). Files whose xattr older ksmbd left without the creation
time flag now report their stored creation time and attributes, and a
rewrite sets the flag again. A file created over SMB keeps its flags and
itime when it is made sparse or compressed. A creation time set through
a second handle survives a later sparse request through the first.
smbtorture gives the same results as without the series, and KASAN
reports nothing.

Reviewed-by: Ian Bridges <icb@fastmail.org>
Tested-by: Ian Bridges <icb@fastmail.org>

      parent reply	other threads:[~2026-11-16  2:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 15:53 koraynilay
2026-11-15 15:53 ` [PATCH v3 2/2] ksmbd: decode version 3 fields in ndr_decode_dos_attr() koraynilay
2026-11-16  2:14   ` Ian Bridges
2026-11-16  2:13 ` Ian Bridges [this message]

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=20261116021351.2485365-1-icb@fastmail.org \
    --to=icb@fastmail.org \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=hyc.lee@gmail.com \
    --cc=koray.fra@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=tom@talpey.com \
    /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

all inboxes | Powered by JetHome®