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:	Tue, 27 Jan 2015 09:25:30 -0600
From:	Felipe Balbi <balbi@...com>
To:	Robert Baldyga <r.baldyga@...sung.com>
CC:	Michał Nazarewicz <mina86@...a86.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Krzysztof Opasiak <k.opasiak@...sung.com>, <balbi@...com>,
	<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: Re: [PATCH] usb: gadget: ffs: add eventfd notification about ffs
 events

On Fri, Jan 23, 2015 at 01:34:45PM +0100, Robert Baldyga wrote:
> On 01/23/2015 01:21 PM, Michał Nazarewicz wrote:
> > 23 sty 2015 10:28 "Robert Baldyga" <r.baldyga@...sung.com
> > <mailto:r.baldyga@...sung.com>> napisał(a):
> >> Add eventfd which notifies userspace about ep0 events and AIO completion
> >> events. It simplifies using of FunctionFS with event loop, because now
> >> we need to poll on single file (instead of polling on ep0 and eventfd's
> >> supplied to AIO layer).
> >>
> >> FunctionFS eventfd is not triggered if another eventfd is supplied to
> >> AIO layer (in AIO request). It can be useful, for example, when we want
> >> to handle AIO transations for chosen endpoint in separate thread.
> >>
> >> Signed-off-by: Robert Baldyga
> > 
> > I don't know much about eventfd interface bit from ffs point of view:
> > 
> > Acked-by: Michal Nazarewicz <mina86@...a86.com <mailto:mina86@...a86.com>>
> > 
> >> @@ -2180,6 +2191,20 @@ static int __ffs_data_got_descs(struct ffs_data
> > *ffs,
> >>                 goto error;
> >>         }
> >>
> >> +       if (flags & FUNCTIONFS_EVENTFD) {
> >> +               if (len < 4)
> >> +                       goto error;
> >> +               ffs->ffs_eventfd =
> >> +                       eventfd_ctx_fdget((int)get_unaligned_le32(data));
> >> +               if (IS_ERR(ffs->ffs_eventfd)) {
> >> +                       ffs->ffs_eventfd = NULL;
> >> +                       ret = PTR_ERR(ffs->ffs_eventfd);
> > 
> > Need to swap those lines.
> > 
> >> +                       goto error;
> >> +               }
> >> +               data += 4;
> >> +               len  -= 4;
> >> +       }
> >> +
> >>         /* Read fs_count, hs_count and ss_count (if present) */
> >>         for (i = 0; i < 3; ++i) {
> >>                 if (!(flags & (1 << i))) {
> > 
> 
> Good catch, thanks!

Are you sending a new version, or should I fix this myself?

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ