mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.org>
To: Fredric Cover <fredric.cover.lkernel@gmail.com>,
	Namjae Jeon <linkinjeon@kernel.org>
Cc: ChenXiaoSong <chenxiaosong@chenxiaosong.com>,
	Tom Talpey <tom@talpey.com>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Bharath SM <bharathsm@microsoft.com>,
	linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Fredric Cover <fredric.cover.lkernel@gmail.com>
Subject: Re: [PATCH] smb: client: convert path_consumed to mount charset units
Date: Tue, 17 Nov 2026 12:11:11 -0300	[thread overview]
Message-ID: <287aa602b5b30784566310e917cdb9da@manguebit.org> (raw)
In-Reply-To: <20261112042137.1642509-1-fredric.cover.lkernel@gmail.com>

Fredric Cover <fredric.cover.lkernel@gmail.com> writes:

> path_consumed in a DFS referral counts bytes of the canonical path,
> which is in the DFS cache charset (utf8). dfs_parse_target_referral()
> applies it as an offset into full_path, which is in the mount charset.
> When the mount charset is not utf8, each non-ASCII character in the
> consumed part that encodes longer in utf8 than in the mount charset
> makes the offset too large, so leading characters of the prefix path
> are dropped. For example, with iocharset=iso8859-1, mounting
> //srv/dfs/café é/sub yields the prefix "ub" instead of "sub" and the
> mount fails with -ENOENT. (A single accented character only worked
> because the offset happened to land after the delimiter.)
>
> Translate the count in parse_dfs_target(), where both strings are
> available, by matching path components: count the delimiters in the
> consumed part of the canonical path and find the same position in the
> mount charset path. Delimiters are ASCII in both and are not affected
> by remapping. If the consumed bytes are identical in both strings,
> which is the case for utf8 mounts and ASCII-only prefixes using the
> default backslash delimiter, the value is used unchanged.
> ...

Applied.

      reply	other threads:[~2026-11-17 15:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  4:21 Fredric Cover
2026-11-17 15:11 ` Paulo Alcantara [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=287aa602b5b30784566310e917cdb9da@manguebit.org \
    --to=pc@manguebit.org \
    --cc=bharathsm@microsoft.com \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=fredric.cover.lkernel@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=sprasad@microsoft.com \
    --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®