From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357Ab3BPAyD (ORCPT ); Fri, 15 Feb 2013 19:54:03 -0500 Received: from mail-ve0-f173.google.com ([209.85.128.173]:43020 "EHLO mail-ve0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733Ab3BPAyC (ORCPT ); Fri, 15 Feb 2013 19:54:02 -0500 X-Greylist: delayed 398 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 Feb 2013 19:54:01 EST MIME-Version: 1.0 In-Reply-To: References: <20130214053656.GS4503@ZenIV.linux.org.uk> <20130215215946.GX4503@ZenIV.linux.org.uk> <20130216000435.GY4503@ZenIV.linux.org.uk> From: Shentino Date: Fri, 15 Feb 2013 16:46:43 -0800 Message-ID: Subject: Re: [RFC] SIGKILL vs. SIGSEGV on late execve() failures To: Al Viro Cc: Linus Torvalds , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 15, 2013 at 4:38 PM, Shentino wrote: > On Fri, Feb 15, 2013 at 4:04 PM, Al Viro wrote: >> How would you manage to have it masked at that point? setup_new_exec() >> is inevitable after success of flush_old_exec() and it will do >> flush_signal_handlers() for us. > > I wouldn't know for sure but I read somewhere that even if execve > resets handled signals, it didn't also say that ignored signals were > also reset. (Source: execve man page.) Also, apologies for the terminology mix-up. By masked, I mean that the signal was ignored as directed by userspace a-la signal(SIGSEGV, SIG_IGN). Plus I *think* that signal ignore masks are preserved across an exec. Again, I might just be a clueless newbie here.