All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@infradead.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Kees Cook <keescook@chromium.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-usb@vger.kernel.org
Subject: Re: [GIT PULL] USB/PHY driver patches for 4.17-rc1
Date: Fri, 6 Apr 2018 01:04:43 +0100	[thread overview]
Message-ID: <20180406000442.GQ30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20180405073111.GA15981@infradead.org>

On Thu, Apr 05, 2018 at 12:31:11AM -0700, Christoph Hellwig wrote:
> On Thu, Apr 05, 2018 at 09:19:28AM +0200, Lars-Peter Clausen wrote:
> > On 04/05/2018 08:31 AM, Kees Cook wrote:
> > > On Wed, Apr 4, 2018 at 3:31 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > >> Lars-Peter Clausen (2):
> > >>       usb: gadget: ffs: Execute copy_to_user() with USER_DS set
> > > 
> > > https://git.kernel.org/linus/4058ebf33cb0be88ca516f968eda24ab7b6b93e4
> > > 
> > > Isn't there a better way to do this without the set_fs() usage? We've
> > > been try to eliminate it in the kernel. I thought there was a safer
> > > way to use iters now?
> > 
> > The problem is use_mm(). It needs to be accompanied with set_fs(DS_USER) to
> > work reliably. This has simply been missing for this particular instance of
> > use_mm().
> 
> To me it seems like use_mm() should do set_fs(USER_DS) and unuse_mm()
> should do set_fs(KERNEL_DS) to get drivers outo of this mess.  I'll see
> if I can come up with patches for the next merge window.

Yes on the former, not quite on the latter (we need to go back to the state
before use_mm()).  Said that, drm users of use_mm() look rather fishy and
might be worth a good look...

      reply	other threads:[~2018-04-06  0:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 10:31 [GIT PULL] USB/PHY driver patches for 4.17-rc1 Greg KH
2018-04-05  6:31 ` Kees Cook
2018-04-05  7:19   ` Lars-Peter Clausen
2018-04-05  7:31     ` Christoph Hellwig
2018-04-06  0:04       ` Al Viro [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=20180406000442.GQ30522@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=keescook@chromium.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.