linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: dhowells@redhat.com,
	syzbot <syzbot+9b82859567f2e50c123e@syzkaller.appspotmail.com>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, syzkaller-bugs@googlegroups.com,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org
Subject: Re: [syzbot] [mm?] WARNING in try_grab_page
Date: Tue, 25 Jul 2023 10:28:31 +0100	[thread overview]
Message-ID: <35256.1690277311@warthog.procyon.org.uk> (raw)
In-Reply-To: <yt9d8rb44cbe.fsf@linux.ibm.com>

Sven Schnelle <svens@linux.ibm.com> wrote:

> 
> I looked into this issue. What syzkaller is doing is opening an AF_ALG
> socket, and sending a large message which will eventually end in -EFAULT.
> Looking at the code in crypto/algif_hash.c i see that hash_sendmsg is
> calling extract_iter_to_sg() -> extract_user_to_sg(). In the -EFAULT
> case, this function is calling put_page(), which looks like a leftover
> from the old pinning interface. I think this should be a
> unpin_user_page() call now.
> 
> However, hash_sendmsg() also unpins via af_alg_free_sg() in the error
> path. From an API perspective, i would prefer if extract_user_to_sg()
> does the unpinning on error. Any thoughts?

Good catch, thanks.  I'll whip up a patch or two for it.

David



  parent reply	other threads:[~2023-07-25  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03 16:34 syzbot
2023-07-25  8:36 ` Sven Schnelle
2023-07-25  9:28 ` David Howells [this message]
2023-07-26  8:25 ` David Howells
2023-09-05 17:36 ` syzbot
     [not found] <125377.1690360290@warthog.procyon.org.uk>
2023-07-26  8:31 ` syzbot

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=35256.1690277311@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=svens@linux.ibm.com \
    --cc=syzbot+9b82859567f2e50c123e@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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