lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <5458B8A3.4050100@samsung.com>
Date:	Tue, 04 Nov 2014 12:29:39 +0100
From:	Andrzej Pietrasiewicz <andrzej.p@...sung.com>
To:	Neil Zhang <zhangwm@...vell.com>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:	"balbi@...com" <balbi@...com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] usb: gadget: don't create new string_container if already
 exist

W dniu 04.11.2014 o 12:05, Neil Zhang pisze:
>
>> -----Original Message-----
>> From: Andrzej Pietrasiewicz [mailto:andrzej.p@...sung.com]
>> Sent: 2014年10月28日 21:10
>> To: Neil Zhang; linux-usb@...r.kernel.org; linux-kernel@...r.kernel.org
>> Cc: balbi@...com; gregkh@...uxfoundation.org
>> Subject: Re: [PATCH] usb: gadget: don't create new string_container if already
>> exist
>>

<snip>

>>
>> The problem you are describing does not exist in mainline kernel, where
>> functions are always unbound as part of the whole gadget's unbind - regardless
>> of whether it is a legacy gadget or configfs-composed gadget. When the whole
>> gadget is unbound, composite_dev_cleanup() is called which zeroes cdev-
>>> next_string_id and frees all gadget strings containers.
>>
>
> Yes, you are right that the current mainline won't suffer this issue.
> But it will be needed if we want to implement similar features like android do.

What features do you think of?
Mainlining the android gadget has been attempted a number of times
and is unlikely to succeed.

A configurable gadget can be composed with configfs interface,
so no need to add anything new.

That said, I think that the proper way of eliminating the problem
described is freeing the resources on function unbind rather than
preventing composite from allocating more (duplicate) resources
on bind, which your patch does.

AP
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ