Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751441AbdFGGZV (ORCPT ); Wed, 7 Jun 2017 02:25:21 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:32873 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbdFGGZT (ORCPT ); Wed, 7 Jun 2017 02:25:19 -0400 Date: Tue, 6 Jun 2017 23:25:15 -0700 From: Dmitry Torokhov To: Andy Lutomirski Cc: "Luis R. Rodriguez" , "Theodore Ts'o" , Alan Cox , Linux FS Devel , Stephen Boyd , "Li, Yi" , Peter Zijlstra , Jonathan Corbet , "Eric W. Biederman" , "Michael Kerrisk (man-pages)" , Greg KH , "Fuzzey, Martin" , Linux API , Daniel Wagner , David Woodhouse , jewalt@lgsinnovations.com, rafal@milecki.pl, Arend Van Spriel , "Rafael J. Wysocki" , atull@opensource.altera.com, Moritz Fischer , Petr Mladek , Johannes Berg , Emmanuel Grumbach , Luca Coelho , Kalle Valo , Linus Torvalds , Kees Cook , AKASHI Takahiro , David Howells , Peter Jones , Hans de G oede , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback Message-ID: <20170607062515.GA23434@dtor-ws> References: <20170526194640.GS8951@wotan.suse.de> <20170526215518.GB40877@dtor-ws> <20170605202410.GQ8951@wotan.suse.de> <1496760796.5682.48.camel@linux.intel.com> <20170606164734.GB27288@wotan.suse.de> <20170606221151.ygoxqkwhhjsqw632@thunk.org> <20170607002237.GJ27288@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1315 Lines: 28 On Tue, Jun 06, 2017 at 09:56:47PM -0700, Andy Lutomirski wrote: > On Tue, Jun 6, 2017 at 5:22 PM, Luis R. Rodriguez wrote: > > On Tue, Jun 06, 2017 at 06:11:51PM -0400, Theodore Ts'o wrote: > >> On Tue, Jun 06, 2017 at 06:47:34PM +0200, Luis R. Rodriguez wrote: > >> > On Tue, Jun 06, 2017 at 03:53:16PM +0100, Alan Cox wrote: > > > > We rely on swait, and swait right now only uses -ERESTARTSYS. Are > > you saying we could mask out -ERESTARTSYS and map it to -ERESTARTNOINTR > > or -ERESTARTNOHAND if we see fit for some future functionality / need ? > > I think that has essentially nothing to do with swait. User code does > some syscall. That syscall triggers a firmware load. The caller gets > a signal. If you're going to let firmware load get interrupted, you > need to consider what the syscall is. I think it is way too complicated and I do not think driver writers will stand a chance of implementing this correctly, given that often firmware load might be triggered indirectly and by multitude of syscalls. What's wrong with saying that the only way to interrupt firmware loading is to kill the process? So ctrl-c will no longer interrupt it, but I do not think that ease of aborting firmware update is primary goal here. I consider simple is good here. Thanks. -- Dmitry