All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damian Tometzki <damian@riscv-rocks.de>
To: Eric Biggers <ebiggers@kernel.org>, dhowells@redhat.com
Cc: Steve French <smfrench@gmail.com>,
	Damian Tometzki <damian@riscv-rocks.de>,
	John Sanpe <sanpeqf@gmail.com>, CIFS <linux-cifs@vger.kernel.org>,
	Namjae Jeon <linkinjeon@kernel.org>,
	Paulo Alcantara <pc@manguebit.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: smb cifs: Linux 6.7 pre rc-1 kernel dump in smb2_get_aead_req
Date: Mon, 6 Nov 2023 08:36:48 +0100	[thread overview]
Message-ID: <ZUiXkPPP1TuOgmmf@fedora.fritz.box> (raw)
In-Reply-To: <20231105201516.GC91123@sol.localdomain>

On Sun, 05. Nov 12:15, Eric Biggers wrote:
> On Sun, Nov 05, 2023 at 08:40:03PM +0100, Damian Tometzki wrote:
> > On Sun, 05. Nov 11:36, Eric Biggers wrote:
> > > On Sun, Nov 05, 2023 at 11:05:30AM -0700, Steve French wrote:
> > > > maybe related to this recent crypto patch?
> > > > 
> > > > https://git.samba.org/?p=sfrench/cifs-2.6.git;a=commit;h=783fa2c94f4150fe1b7f7d88b3baf6d98f82b41b
> > > > 
> > > > On Sun, Nov 5, 2023, 10:32 Damian Tometzki <damian@riscv-rocks.de> wrote:
> > > > > [   83.530503] CPU: 7 PID: 4584 Comm: mount.cifs Tainted: G        W
> > > > >     6.6.0 #61
> > > > > [   83.530508] Hardware name: LENOVO 20XWCTO1WW/20XWCTO1WW, BIOS N32ET86W
> > > > > (1.62 ) 07/12/2023
> > > 
> > > The above suggests that this warning occurred on 6.6, not on 6.7 pre rc1.
> > > 
> > > - Eric
> > Hello,
> > 
> > is little bit missleading but it is 6.6 from linus mainline git with all
> > the pull request. 
> > 
> > Damian
> > 
> 
> Okay, next time please mention the actual commit ID.  Anyway, the warning is
> 'WARN_ON_ONCE(user_backed_iter(&rqst[i].rq_iter))', so maybe take a look at
> changes from 
> 
>     commit f1b4cb650b9a0eeba206d8f069fcdc532bfbcd74
>     Author: David Howells <dhowells@redhat.com>
>     Date:   Mon Sep 25 13:03:03 2023 +0100
> 
>         iov_iter: Derive user-backedness from the iterator type
>
Hello Eric,

the revert of f1b4cb650b9a0eeba206d8f069fcdc532bfbcd74 solved the issue of the kernel dump.

diff --git a/include/linux/uio.h b/include/linux/uio.h
index b6214cbf2a43..02a8e5e6c458 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -43,6 +43,7 @@ struct iov_iter {
        bool copy_mc;
        bool nofault;
        bool data_source;
+       bool user_backed;
        size_t iov_offset;
        /*
         * Hack alert: overlay ubuf_iovec with iovec + count, so
@@ -139,7 +140,7 @@ static inline unsigned char iov_iter_rw(const struct iov_iter *i)
 
 static inline bool user_backed_iter(const struct iov_iter *i)
 {
-       return iter_is_ubuf(i) || iter_is_iovec(i);
+       return i->user_backed;
 }
 
 /*
@@ -358,6 +359,7 @@ static inline void iov_iter_ubuf(struct iov_iter *i, unsigned int direction,
        *i = (struct iov_iter) {
                .iter_type = ITER_UBUF,
                .copy_mc = false,
+               .user_backed = true,
                .data_source = direction,
                .ubuf = buf,
                .count = count,
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index de7d11cf4c63..a077c15727b2 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -168,6 +168,7 @@ void iov_iter_init(struct iov_iter *i, unsigned int direction,
                .iter_type = ITER_IOVEC,
                .copy_mc = false,
                .nofault = false,
+               .user_backed = true,
                .data_source = direction,
                .__iov = iov,
                .nr_segs = nr_segs,
 
> and the pull request that contained it:
> 
>     commit df9c65b5fc7ef1caabdb7a01a2415cbb8a00908d
>     Merge: 3b3f874cc1d07 b5f0e20f444cd
>     Author: Linus Torvalds <torvalds@linux-foundation.org>
>     Date:   Mon Oct 30 09:24:21 2023 -1000
> 
>         Merge tag 'vfs-6.7.iov_iter' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs
> 
>         Pull iov_iter updates from Christian Brauner:
>          "This contain's David's iov_iter cleanup work to convert the iov_iter
>           iteration macros to inline functions:

  reply	other threads:[~2023-11-06  7:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-22 18:39 [PATCH] fs/smb: using crypto lib instead cifs_arc4 John Sanpe
2023-10-22 19:38 ` Steve French
2023-10-22 19:40   ` Steve French
2023-10-22 19:42     ` ronnie sahlberg
2023-11-05 19:33       ` Eric Biggers
2023-11-05 17:28 ` smb cifs: Linux 6.7 pre rc-1 kernel dump in smb2_get_aead_req Damian Tometzki
     [not found]   ` <CAH2r5msde65PMtn-96VZDAQkT_rq+e-2G4O+zbPUR8zSWGxMsg@mail.gmail.com>
2023-11-05 19:36     ` Eric Biggers
2023-11-05 19:40       ` Damian Tometzki
2023-11-05 20:15         ` Eric Biggers
2023-11-06  7:36           ` Damian Tometzki [this message]
2023-11-06 10:01             ` David Howells
2023-11-06 14:40             ` [PATCH] cifs: Fix encryption of cleared, but unset rq_iter data buffers David Howells
2023-11-06 15:41               ` Paulo Alcantara
2023-11-07  5:18               ` Damian Tometzki
2023-11-07 18:51                 ` Steve French

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=ZUiXkPPP1TuOgmmf@fedora.fritz.box \
    --to=damian@riscv-rocks.de \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pc@manguebit.com \
    --cc=sanpeqf@gmail.com \
    --cc=smfrench@gmail.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.