From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754021AbbDGTsg (ORCPT ); Tue, 7 Apr 2015 15:48:36 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:36009 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753439AbbDGTsb convert rfc822-to-8bit (ORCPT ); Tue, 7 Apr 2015 15:48:31 -0400 From: Michal Nazarewicz To: David Laight , "'Robert Baldyga'" , "balbi\@ti.com" Cc: "gregkh\@linuxfoundation.org" , "linux-usb\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH] usb: gadget: ffs: don't allow to open with O_NONBLOCK flag In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CB15BBA@AcuExch.aculab.com> Organization: http://mina86.com/ References: <1427881176-30522-1-git-send-email-r.baldyga@samsung.com> <551E2FBF.5070503@samsung.com> <063D6719AE5E284EB5DD2968C1650D6D1CB15BBA@AcuExch.aculab.com> User-Agent: Notmuch/0.19+53~g2e63a09 (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-unknown-linux-gnu) X-Face: PbkBB1w#)bOqd`iCe"Ds{e+!C7`pkC9a|f)Qo^BMQvy\q5x3?vDQJeN(DS?|-^$uMti[3D*#^_Ts"pU$jBQLq~Ud6iNwAw_r_o_4]|JO?]}P_}Nc&"p#D(ZgUb4uCNPe7~a[DbPG0T~!&c.y$Ur,=N4RT>]dNpd;KFrfMCylc}gc??'U2j,!8%xdD Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACQElEQVQ4jW3TMWvbQBQHcBk1xE6WyALX1069oZBMlq+ouUwpEQQ6uRjttkWP4CmBgGM0BQLBdPFZYPsyFUo6uEtKDQ7oy/U96XR2Ux8ehH/89Z6enqxBcS7Lg81jmSuujrfCZcLI/TYYvbGj+jbgFpHJ/bqQAUISj8iLyu4LuFHJTosxsucO4jSDNE0Hq3hwK/ceQ5sx97b8LcUDsILfk+ovHkOIsMbBfg43VuQ5Ln9YAGCkUdKJoXR9EclFBhixy3EGVz1K6eEkhxCAkeMMnqoAhAKwhoUJkDrCqvbecaYINlFKSRS1i12VKH1XpUd4qxL876EkMcDvHj3s5RBajHHMlA5iK32e0C7VgG0RlzFPvoYHZLRmAC0BmNcBruhkE0KsMsbEc62ZwUJDxWUdMsMhVqovoT96i/DnX/ASvz/6hbCabELLk/6FF/8PNpPCGqcZTGFcBhhAaZZDbQPaAB3+KrWWy2XgbYDNIinkdWAFcCpraDE/knwe5DBqGmgzESl1p2E4MWAz0VUPgYYzmfWb9yS4vCvgsxJriNTHoIBz5YteBvg+VGISQWUqhMiByPIPpygeDBE6elD973xWwKkEiHZAHKjhuPsFnBuArrzxtakRcISv+XMIPl4aGBUJm8Emk7qBYU8IlgNEIpiJhk/No24jHwkKTFHDWfPniR4iw5vJaw2nzSjfq2zffcE/GDjRC2dn0J0XwPAbDL84TvaFCJEU4Oml9pRyEUhR3Cl2t01AoEjRbs0sYugp14/4X5n4pU4EHHnMAAAAAElFTkSuQmCC X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:150407:linux-usb@vger.kernel.org::oaG+i37VObD64/Td:000000000000000000000000000000000000023g X-Hashcash: 1:20:150407:balbi@ti.com::MWDUlyPhIADngbG6:000000jB5 X-Hashcash: 1:20:150407:david.laight@aculab.com::tfSTzAQC14rlhyDD:0000000000000000000000000000000000000050l5 X-Hashcash: 1:20:150407:gregkh@linuxfoundation.org::kAcIBGskeDDZgk3F:000000000000000000000000000000000006w9C X-Hashcash: 1:20:150407:r.baldyga@samsung.com::zXNfbS6YJsa8PHwP:00000000000000000000000000000000000000009qoK X-Hashcash: 1:20:150407:linux-kernel@vger.kernel.org::QHfnQEzQWvozW483:000000000000000000000000000000000Bj+M Date: Tue, 07 Apr 2015 21:48:27 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Robert Baldyga >> I want rather to inform users that non-blocking i/o wouldn't work for >> epfiles. Indeed we can handle O_NONBLOCK for ep0 (for the same reason we >> can have poll), but for other epfiles there is no way to check if >> read/write operation can end up in short time. Everything is up to host. On Tue, Apr 07 2015, David Laight wrote: > Is that really necessary? > I'm sure there are a lot of device drivers that ignore O_NONBLOCK. FFS partially supports O_NONBLOCK which may fool people into thinking it has full support. epfiles don’t implement poll though so I’m not sure how users would imagine O_NONBLOCK being used with them. ep0, on the other hand, implements poll and (as far as I can see and despite what Robert wrote) suffers from the same problem so it may be considered a bigger issue. Overall though, I do agree that we need to consider whether the current situation is really a serious problem. -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michał “mina86” Nazarewicz (o o) ooo +------ooO--(_)--Ooo--