All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrille Mucchietto <cmucchietto@wallix.com>
To: Steve French <smfrench@gmail.com>,
	Pavel Shilovsky <pavel.shilovsky@gmail.com>
Cc: Sebastien Tisserant <stisserant@wallix.com>,
	Steve French <sfrench@samba.org>,
	"linux-cifs@vger.kernel.org" <linux-cifs@vger.kernel.org>,
	"samba-technical@lists.samba.org"
	<samba-technical@lists.samba.org>,
	Cristian Popi <cpopi@wallix.com>
Subject: Re: PROBLEM: Kernel oops when mounting a encryptData CIFS share with CONFIG_DEBUG_VIRTUAL
Date: Fri, 2 Aug 2019 06:58:38 +0000	[thread overview]
Message-ID: <35ee3dd4-19dd-4a27-6160-4080bdeaea48@wallix.com> (raw)
In-Reply-To: <CAH2r5ms1qgpPrB+oOHWF7TVoZ36g3iska1PQ3dBGMrscq2K51g@mail.gmail.com>

On 8/1/19 7:13 PM, Steve French wrote:
> Sebastien,
> I cleaned up the patch and merged into cifs-2.6.git - can you
> doublecheck it is correct?

Sebastien is not avalaible, but we confirm that this patch is correct

Regards,

Cyrille Mucchietto


> On Thu, Jul 25, 2019 at 3:35 PM Pavel Shilovsky
> <pavel.shilovsky@gmail.com> wrote:
>> чт, 25 июл. 2019 г. в 09:57, Sebastien Tisserant via samba-technical
>> <samba-technical@lists.samba.org>:
>> ...
>>> mount works without CONFIG_DEBUG_VIRTUAL
>>>
>>> If we don't set CONFIG_VMAP_STACK mount works with CONFIG_DEBUG_VIRTUAL
>>>
>>>
>>> We have the following (very quick and dirty) patch :
>>>
>>> Index: linux-4.19.60/fs/cifs/smb2ops.c
>>> ===================================================================
>>> --- linux-4.19.60.orig/fs/cifs/smb2ops.c
>>> +++ linux-4.19.60/fs/cifs/smb2ops.c
>>> @@ -2545,7 +2545,15 @@ fill_transform_hdr(struct smb2_transform
>>>  static inline void smb2_sg_set_buf(struct scatterlist *sg, const void *buf,
>>>                     unsigned int buflen)
>>>  {
>>> -    sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf));
>>> +      void *addr;
>>> +      /*
>>> +       * VMAP_STACK (at least) puts stack into the vmalloc address space
>>> +      */
>>> +      if (is_vmalloc_addr(buf))
>>> +              addr = vmalloc_to_page(buf);
>>> +      else
>>> +              addr = virt_to_page(buf);
>>> +      sg_set_page(sg, addr, buflen, offset_in_page(buf));
>>>  }
>>>
>>>  /* Assumes the first rqst has a transform header as the first iov.
>>>
>>>
>> Thanks for reporting this. The patch looks good to me. Did you test
>> your scenario all together with it (not only mounting)?
>>
>>
>> Best regards,
>> Pavel Shilovskiy
>>
>>

      reply	other threads:[~2019-08-02  6:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <380e1b86-1911-b8a5-6b02-276b6d4be4fe@wallix.com>
2019-07-25 20:35 ` PROBLEM: Kernel oops when mounting a encryptData CIFS share with CONFIG_DEBUG_VIRTUAL Pavel Shilovsky
2019-07-26  6:28   ` Cyrille Mucchietto
2019-07-29 21:02     ` Steve French
2019-08-01 17:13   ` Steve French
2019-08-02  6:58     ` Cyrille Mucchietto [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=35ee3dd4-19dd-4a27-6160-4080bdeaea48@wallix.com \
    --to=cmucchietto@wallix.com \
    --cc=cpopi@wallix.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=pavel.shilovsky@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=smfrench@gmail.com \
    --cc=stisserant@wallix.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 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.