All of lore.kernel.org
 help / color / mirror / Atom feed
From: ronnie sahlberg <ronniesahlberg@gmail.com>
To: Pavel Shilovsky <piastryyy@gmail.com>
Cc: Ronnie Sahlberg <lsahlber@redhat.com>,
	linux-cifs <linux-cifs@vger.kernel.org>,
	Steve French <smfrench@gmail.com>,
	Stable <stable@vger.kernel.org>
Subject: Re: [PATCH] cifs: Add support for FSCTL passthrough that write data to the server
Date: Fri, 12 Apr 2019 06:00:45 +1000	[thread overview]
Message-ID: <CAN05THSfvHozfdZuDDZqKH-eS2EmvY2yz1Z6DmRhu6+t=X_GuA@mail.gmail.com> (raw)
In-Reply-To: <CAKywueQOJd__BpyF_eki0_KbLvZFYRhtKRkaDo_oWwU6080OYg@mail.gmail.com>

On Fri, Apr 12, 2019 at 3:49 AM Pavel Shilovsky <piastryyy@gmail.com> wrote:
>
> ср, 10 апр. 2019 г. в 19:21, Ronnie Sahlberg <lsahlber@redhat.com>:
> >
> > Add support to pass a blob to the server in FSCTL passthrough.
> >
> > Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
> > ---
> >  fs/cifs/smb2ops.c  | 17 +++++++++++++++--
> >  fs/cifs/smbfsctl.h | 27 +++++++++++++++++++++++++++
> >  2 files changed, 42 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> > index 83a100dd2497..bb7522b882ea 100644
> > --- a/fs/cifs/smb2ops.c
> > +++ b/fs/cifs/smb2ops.c
> > @@ -1382,6 +1382,18 @@ smb2_ioctl_query_info(const unsigned int xid,
> >         oparms.fid = &fid;
> >         oparms.reconnect = false;
> >
> > +       /*
> > +        * FSCTL codes encode the special access they need in the fsctl code.
> > +        */
> > +       if (qi.flags & PASSTHRU_FSCTL) {
> > +               switch (qi.info_type & FSCTL_DEVICE_ACCESS_MASK) {
> > +               case FSCTL_DEVICE_ACCESS_FILE_READ_WRITE_ACCESS:
> > +                       oparms.desired_access = FILE_READ_DATA | FILE_WRITE_DATA | FILE_READ_ATTRIBUTES | SYNCHRONIZE;
> > +                       ;
>
> This extra ":" looks unnecessary. Don't we need to add cases for
> +#define FSCTL_DEVICE_ACCESS_FILE_ANY_ACCESS        (0x00 << 14)
> +#define FSCTL_DEVICE_ACCESS_FILE_READ_ACCESS       (0x01 << 14)
> +#define FSCTL_DEVICE_ACCESS_FILE_WRITE_ACCESS      (0x02 << 14)
> ?

Thanks, yeah that ';' should go.
We should add cases for the other three DEVICE_ACCESS cases but
i don't know yet how these are mapped on windows.
READ_WRITE was based on what win16 used as desired_access for this.

We can add the others later when we start adding other fsctl types
when we compare to what windows uses.

>
> --
> Best regards,
> Pavel Shilovsky

      parent reply	other threads:[~2019-04-11 20:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11  2:20 [PATCH 0/1] FSCTL write support Ronnie Sahlberg
2019-04-11  2:20 ` [PATCH] cifs: Add support for FSCTL passthrough that write data to the server Ronnie Sahlberg
2019-04-11  2:48   ` Steve French
2019-04-11 17:49   ` Pavel Shilovsky
2019-04-11 18:56     ` Steve French
2019-04-11 20:02       ` ronnie sahlberg
2019-04-11 20:00     ` ronnie sahlberg [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='CAN05THSfvHozfdZuDDZqKH-eS2EmvY2yz1Z6DmRhu6+t=X_GuA@mail.gmail.com' \
    --to=ronniesahlberg@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=piastryyy@gmail.com \
    --cc=smfrench@gmail.com \
    --cc=stable@vger.kernel.org \
    /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.