From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753753Ab1IBR0e (ORCPT ); Fri, 2 Sep 2011 13:26:34 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:36869 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753584Ab1IBR0d (ORCPT ); Fri, 2 Sep 2011 13:26:33 -0400 Date: Fri, 2 Sep 2011 18:22:59 +0100 From: Russell King - ARM Linux To: Ulrich Weigand Cc: Arnd Bergmann , Mark Brown , linaro-toolchain@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Nicolas Pitre , "Rafael J. Wysocki" , Tejun Heo , Martin Schwidefsky Subject: Re: try_to_freeze() called with IRQs disabled on ARM Message-ID: <20110902172259.GA6619@n2100.arm.linux.org.uk> References: <20110823220056.GK3895@n2100.arm.linux.org.uk> <20110825130907.GO3286@htj.dyndns.org> <20110825145558.GF8883@n2100.arm.linux.org.uk> <201108261644.26329.arnd@arndb.de> <20110901140000.GF29729@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 02, 2011 at 04:47:35PM +0200, Ulrich Weigand wrote: > Assume the scenario you initally describe, where a first signal is > ignored and leads to system call restart. With your latest patch, > you call into syscall_restart which sets everything up to restart > the call (with interrupts disabled). I don't think SIG_IGN signals even set the TIF work flag, so they never even cause a call into do_signal(). Therefore, as far as syscalls go, attempting to send a process (eg) a SIGINT which its handler is set to SIG_IGN results in the process not even being notified about the attempt - we won't even wake up while the syscall is sleeping. > To really fix this case would probably require some way for the > debugger to save and restore the restore_block saved state. This > is not quite trivial, since it would expose that state to user space, > effectively creating a new ABI (and probably requiring sanity checks > to ensure a valid state is restored). This probably cannot be fixed > by one architecture for itself, but would need support from common > kernel code. Such state would have to be crytographically signed or kept entirely within the kernel, as it would otherwise mean that you could redirect the kernel PC to anywhere...