From: Felipe Balbi <balbi@kernel.org>
To: Greg KH <greg@kroah.com>
Cc: Jim Lin <jilin@nvidia.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: configfs: Fix KASAN use-after-free
Date: Tue, 17 Jan 2017 11:29:36 +0200 [thread overview]
Message-ID: <87bmv6kpa7.fsf@linux.intel.com> (raw)
In-Reply-To: <20170117092151.GB2879@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 2520 bytes --]
Hi,
Greg KH <greg@kroah.com> writes:
> On Tue, Jan 17, 2017 at 10:07:40AM +0200, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Jim Lin <jilin@nvidia.com> writes:
>> > When gadget is disconnected, running sequence is like this.
>> > . android_work: sent uevent USB_STATE=DISCONNECTED
>>
>> I'm gonna have to ask you to try with actual mainline where there are no
>> Android changes.
>
> What is android changing these days in the gadget stack that is not
> already upstream?
quite a bit, actually. They have their own android_setup() and an
android_worker thread for notifications. These notifications actually
duplicate (poorly) what we already have for usb_gadget_set_state(). They
also completely ditch composite_setup() to reimplement it with their own
additions. There's also an android class added to
configfs. Android-specific uevents. Android-specific ->disconnect()
implementation, overwriting what we have on composite.c. I just took a
diff from v4.4.10 to current Android head which we're using for some
other project
drivers/usb/gadget/Kconfig | 50 +++++
drivers/usb/gadget/composite.c | 6 +
drivers/usb/gadget/configfs.c | 264 +++++++++++++++++++++++-
drivers/usb/gadget/function/Makefile | 8 +
drivers/usb/gadget/function/f_accessory.c | 1335 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
drivers/usb/gadget/function/f_audio_source.c | 1060 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
drivers/usb/gadget/function/f_fs.c | 11 +-
drivers/usb/gadget/function/f_midi.c | 66 ++++++
drivers/usb/gadget/function/f_mtp.c | 1533 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
drivers/usb/gadget/function/f_mtp.h | 18 ++
drivers/usb/gadget/function/f_ptp.c | 38 ++++
drivers/usb/gadget/function/f_rndis.c | 30 +++
drivers/usb/gadget/function/rndis.c | 112 ++++++++--
drivers/usb/gadget/function/rndis.h | 2 +
drivers/usb/gadget/function/u_ether.c | 305 ++++++++++++++++++++++------
drivers/usb/gadget/function/u_ether.h | 3 +
drivers/usb/gadget/functions.c | 2 +-
17 files changed, 4757 insertions(+), 86 deletions(-)
rather extensive.
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-01-17 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 8:01 [PATCH] usb: gadget: configfs: Fix KASAN use-after-free Jim Lin
2017-01-17 8:07 ` Felipe Balbi
2017-01-17 9:21 ` Greg KH
2017-01-17 9:29 ` Felipe Balbi [this message]
2017-01-17 9:25 ` Jim Lin
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=87bmv6kpa7.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=greg@kroah.com \
--cc=jilin@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox