public inbox for [email protected]
 help / color / mirror / Atom feed
From: Kalesh Singh <[email protected]>
To: Axel Rasmussen <[email protected]>
Cc: [email protected], kernel test robot <[email protected]>,
	[email protected], LKML <[email protected]>,
	Peter Xu <[email protected]>,
	Linux Memory Management List <[email protected]>,
	Lokesh Gidra <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>,
	Andrew Morton <[email protected]>,
	Suren Baghdasaryan <[email protected]>,
	Todd Kjos <[email protected]>
Subject: Re: [ammarfaizi2-block:google/android/kernel/common/android12-5.4 6517/9999] fs/userfaultfd.c:1519:9: warning: variable 'ioctls_out' set but not used
Date: Wed, 19 Jan 2022 14:10:04 -0800	[thread overview]
Message-ID: <CAC_TJvc5PwnB5L==4yoXDYeG9g-MKx6Oqb7ghG9gDGqaYEmdYw@mail.gmail.com> (raw)
In-Reply-To: <CAJHvVciZpSBcQDbqbvwbToo5s2_Q5H2sfr=QAb9UBBWpnD5X-w@mail.gmail.com>

On Wed, Jan 19, 2022 at 2:03 PM Axel Rasmussen <[email protected]> wrote:
>
> On Wed, Jan 19, 2022 at 1:19 PM Suren Baghdasaryan <[email protected]> wrote:
> >
> > On Wed, Jan 19, 2022 at 12:39 PM Axel Rasmussen
> > <[email protected]> wrote:
> > >
> > > Lokesh, I only spent a few moments looking, but my suspicion is that
> > > this is the result of an incomplete backport of these patches to the
> > > Android kernel?
> > >
> > > The UFFDIO_CONTINUE patches introduced ioctls_out since the
> > > computation of it got more complicated, and those same patches also
> > > modified the put_user() on line 1533 here to use ioctls_out. I think
> > > Android backported the first part, but left out the second?
> >
> > The backport https://android-review.googlesource.com/c/kernel/common/+/1652718
> > looks like a mixture of
> > 14819305e09fe4 ("userfaultfd: wp: declare _UFFDIO_WRITEPROTECT
> > conditionally") and f619147104c8 ("userfaultfd: add UFFDIO_CONTINUE
> > ioctl").
> > Not sure why it was done this way, maybe to minimize code changes
> > while backporting.
> > Simplest fix is probably to add __maybe_unused to ioctls_out declaration.
>
> Unfortunately, that doesn't quite do it. That would fix the warning,
> but the code in the original e-mail is still wrong: we incorrectly
> don't report the _UFFDIO_CONTINUE bit, unless we use the value we
> computed in ioctls_out.

I think what happened is that Axel's patch [1] depends on the patch
from Peter [2]. [1] was backported without the dependency and the
conflict resolutions aren't quite correct.

[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/

- Kalesh
-- 
GWML mailing list
[email protected]
https://gwml.gnuweeb.org/listinfo/gwml

  reply	other threads:[~2022-01-19 22:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16 18:10 [ammarfaizi2-block:google/android/kernel/common/android12-5.4 6517/9999] fs/userfaultfd.c:1519:9: warning: variable 'ioctls_out' set but not used kernel test robot
2022-01-19 20:38 ` Axel Rasmussen
2022-01-19 21:19   ` Suren Baghdasaryan
2022-01-19 22:02     ` Axel Rasmussen
2022-01-19 22:10       ` Kalesh Singh [this message]
2022-01-19 22:11       ` Lokesh Gidra
2022-01-20 18:14         ` Axel Rasmussen
2022-01-20 18:16           ` Lokesh Gidra
2022-01-20 18:30             ` Axel Rasmussen

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='CAC_TJvc5PwnB5L==4yoXDYeG9g-MKx6Oqb7ghG9gDGqaYEmdYw@mail.gmail.com' \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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