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]
Date:	Mon, 28 Jul 2014 12:22:44 +0200
From:	Michal Nazarewicz <mina86@...a86.com>
To:	Robert Baldyga <r.baldyga@...sung.com>, balbi@...com
Cc:	gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, m.szyprowski@...sung.com,
	andrzej.p@...sung.com
Subject: Re: [PATCH v2 1/3] usb: gadget: f_fs: virtual address mapping

On Mon, Jul 28 2014, Robert Baldyga <r.baldyga@...sung.com> wrote:
> On 07/25/2014 04:18 PM, Michal Nazarewicz wrote:
>> On Fri, Jul 25 2014, Robert Baldyga wrote:
>>> This patch adds virtual endpoint address mapping to functionfs.
>>>
>>> So far endpoint addresses given by user through endpoint descriptors
>>> were ignored, and replaced by physical endpoint addresses. Endpoint
>>> address in wIndex field of setup requesti, addressed to endpoint, was
>>> the physical endpoint address, and names of files in functionfs
>>> directory was numered in order, and were the same as indexes of
>>> ffs_epfile in epfile array. In result user has no way to indicate
>>> which file in functionfs is associated with which particular
>>> requested endpoint. He also didn't know which endpoint is recipient
>>> of setup request.
>> 
>> Couldn't that be solved by simply providing the mapping to user space?
>
> There would be only small differences in code (add mapping instead of
> changing file names) so why would we not want do it in more intuitive
> way?

So I'm confused again.  With your patch, the endpoint number read from
user space will have barring *only* on the file name and it *will not*
correspond to the real/physical endpoint number, right?  Why do we want
that?  What's the advantage over having endpoints numbered in the order
they were specified?

To know what physical number endpoint has, user space would have to read
the descriptor via the new proposed ioctl or get a mapping from ep file
names to physical endpoint numbers.

>>> There was also one more problem - if endpoint addresses in descriptors
>>> were non-consecutive, there were created redundant files, which could
>>> cause problems in kernel, when user tryed to read/write to them.
>>> It was result of fact that maximum endpoint address was taken as
>>> total number of endpoints in funciton.
>> 
>> This is kinda unrelated though.  I mean it's a separate bug.
>
> Yes, but it can be fixed by the way, as a side effect, so there is no
> sense (and probably no simple way) to move it into separate patch.

Right, but now, we're arguing about the whole patch as opposed to having
part of it already acked. :P

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@...gle.com>--<xmpp:mina86@...ber.org>--ooO--(_)--Ooo--
--
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