All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: CIFS <linux-cifs@vger.kernel.org>,
	Steve French <sfrench@samba.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC][PATCHSET] hopefully saner handling of pathnames in cifs
Date: Sun, 21 Mar 2021 22:38:15 -0500	[thread overview]
Message-ID: <CAH2r5mvazL5gpWfNXX1t+bf_h6AuvGEboN9uLbq=n08PTiLZLw@mail.gmail.com> (raw)
In-Reply-To: <CAH2r5mv7NFYiPYvCoDJZ50nnoSgytEB4CKYNfg0RTNSPjox2fw@mail.gmail.com>

Some additional context - currently because of the way cifs.ko handles
conversion of '/' we can't handle a filename with '\' in the filename
(although the protocol would support that via remapping into the UCS-2
remap range if we made a change to move slash conversion later).

On Sun, Mar 21, 2021 at 10:36 PM Steve French <smfrench@gmail.com> wrote:
>
> FYI - on a loosely related point  about / to \ conversion, I had been
> experimenting with moving the conversion of '/' to '\' later depending
> on connection type (see attached WIP patch for example).
>
>
> On Sun, Mar 21, 2021 at 9:40 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > On Sun, Mar 21, 2021 at 09:19:53PM -0500, Steve French wrote:
> > > automated tests failed so will need to dig in a little more and see
> > > what is going on
> > >
> > > http://smb3-test-rhel-75.southcentralus.cloudapp.azure.com/#/builders/2/builds/533
> >
> > <looks>
> >
> > Oh, bugger...  I think I see a braino that might be responsible for that;
> > whether it's all that's going on or not, that's an obvious bug.  Incremental
> > for that one would be
> >
> > diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
> > index 3febf667d119..ed16f75ac0fa 100644
> > --- a/fs/cifs/dir.c
> > +++ b/fs/cifs/dir.c
> > @@ -132,7 +132,7 @@ build_path_from_dentry_optional_prefix(struct dentry *direntry, void *page,
> >         }
> >         if (dfsplen) {
> >                 s -= dfsplen;
> > -               memcpy(page, tcon->treeName, dfsplen);
> > +               memcpy(s, tcon->treeName, dfsplen);
> >                 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) {
> >                         int i;
> >                         for (i = 0; i < dfsplen; i++) {
> >
> >
> > Folded and force-pushed (same branch).  My apologies...
>
>
>
> --
> Thanks,
>
> Steve



-- 
Thanks,

Steve

  reply	other threads:[~2021-03-22  3:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-20  4:31 [RFC][PATCHSET] hopefully saner handling of pathnames in cifs Al Viro
2021-03-20  4:32 ` [PATCH 1/7] cifs: don't cargo-cult strndup() Al Viro
2021-03-20  4:32   ` [PATCH 2/7] cifs: constify get_normalized_path() properly Al Viro
2021-03-20  4:33   ` [PATCH 3/7] cifs: constify path argument of ->make_node() Al Viro
2021-03-20  4:33   ` [PATCH 4/7] cifs: constify pathname arguments in a bunch of helpers Al Viro
2021-03-20  4:33   ` [PATCH 5/7] cifs: make build_path_from_dentry() return const char * Al Viro
2021-03-20  4:33   ` [PATCH 6/7] cifs: allocate buffer in the caller of build_path_from_dentry() Al Viro
2021-03-20  4:33   ` [PATCH 7/7] cifs: switch build_path_from_dentry() to using dentry_path_raw() Al Viro
2021-03-21 19:58 ` [RFC][PATCHSET] hopefully saner handling of pathnames in cifs Steve French
2021-03-22  2:19   ` Steve French
2021-03-22  2:38     ` Al Viro
2021-03-22  3:36       ` Steve French
2021-03-22  3:38         ` Steve French [this message]
2021-03-22 13:15           ` Aurélien Aptel
2021-03-23  5:04       ` Steve French
2021-03-24 15:28         ` Al Viro
2021-03-22 12:25 ` Jeff Layton

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='CAH2r5mvazL5gpWfNXX1t+bf_h6AuvGEboN9uLbq=n08PTiLZLw@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sfrench@samba.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.