Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6493093ybi; Wed, 5 Jun 2019 01:42:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvhrL2mE6MFGOZgsuHudYST9AaLRx4V2qBLZDiooj8UnCiys+b3Y1A8PnSlS003ahOddRa X-Received: by 2002:a62:51c2:: with SMTP id f185mr43452496pfb.16.1559724121895; Wed, 05 Jun 2019 01:42:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559724121; cv=none; d=google.com; s=arc-20160816; b=CoxKMznyad2isjXPYP7nj1IEhSkLeZWokYsSfe1PIruxWGunjIkNf7tRkMTV+gSkkD M/doibH94TdJOifFSjSDC/ARGLIxS8oENrUYmhnGPFou9Nwp3Vla8M1WOE8T8odav5KF nOtO+QVMZWYAyM+axVHcM6Wih7kjB+8MUTfC5M72ICEEOEdc8M6YSwZvUdjTrRFzFJe4 Da14QfQMki+JhtZ5pJPqK9600Anm4ml8bSpYvGD6qMjkHIbieeJ/OeWM73FckkPAAVxZ NF02EY4dA1vIjn7vjvlmagV5jnSkwg0PKDSsVmBYxlRzNTa6DSoD7W8ZUXjxm6OMVZqU 01UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from :dkim-signature; bh=WbHNl0iqFS+h/Y/NRQf+DQGfBRp0QLmLg6AqzLkUiMk=; b=LUQa8ADr0B9+Z96ARTTt8JCN1ggbvKKKI4dDQ9Y6M7Oa7SejQv4ULQy+cNznItBJ2D VWdfb9cdt6Tap68q/poezFVRvhpJG849Qo630WKa7ow7ed1+Z/gTHcnygfyoBYpfTK7E OYUclGt1YRbfdlL7LBcyF1nBzLsPDTjCFJXto9b5aWGyOZoR930mihzrgrV+pS5UlzMK jSGRIKO5Y100fAU3UAqX0yykyCP7LTE0dO1MybqFhZcjJqc5TTLACobesBENlj4iP/j4 Hi0j2Z9EwzzvNwt2Owh/3trf93lRFEis1jcx2XOU5d1bVJOv4pZYgpYjyFh0d/kT3dVy uAWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=CyUWE9M+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cs.msu.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cg6si29138379plb.350.2019.06.05.01.41.46; Wed, 05 Jun 2019 01:42:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=CyUWE9M+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cs.msu.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726843AbfFEIjJ (ORCPT + 99 others); Wed, 5 Jun 2019 04:39:09 -0400 Received: from mx.cs.msu.ru ([188.44.42.42]:50355 "EHLO mail.cs.msu.ru" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726784AbfFEIjI (ORCPT ); Wed, 5 Jun 2019 04:39:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.msu.ru; s=dkim; h=Subject:Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WbHNl0iqFS+h/Y/NRQf+DQGfBRp0QLmLg6AqzLkUiMk=; b=CyUWE9M+1do1YtGsN8aHK9+ZLW AbEmO1u+9iEKW2kzwDSNNxWO8HryXIebKAjfDHV/qchPewyRNTgCUt44qvdrMjO2VSWJJ+8j2JRyK orbZ/ebhUJzQgKGYS2dlgUStSxZLb0+L7gOyyWVZx3fNCBxxiMHFxugjL/E+rOQshiUSx9VahdhHj zTVphjB0sIwutmFBdf7XwxoBCaCXWiRiZ57Om7iS8qE3cNX2v9ABp6pSLCYxl+tK9ViZOkHdX9UGz 0C9sBKDE/vi2VHzPr+EOi8Giz0JFbEaIear9e2xPRw82gGvrCHBOxkOBX/whiVIdMOEnihqUvXxce 0TNhlniQ==; Received: from [37.204.119.143] (port=55354 helo=localhost.localdomain) by mail.cs.msu.ru with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hYR9Q-0008s7-HJ; Wed, 05 Jun 2019 11:20:06 +0300 From: Arseny Maslennikov To: Greg Kroah-Hartman , Jiri Slaby , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org Cc: "Vladimir D . Seleznev" , Arseny Maslennikov Date: Wed, 5 Jun 2019 11:19:03 +0300 Message-Id: <20190605081906.28938-5-ar@cs.msu.ru> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190605081906.28938-1-ar@cs.msu.ru> References: <20190605081906.28938-1-ar@cs.msu.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 37.204.119.143 X-SA-Exim-Mail-From: ar@cs.msu.ru Subject: [PATCH 4/7] linux/signal.h: Ignore SIGINFO by default in new tasks X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: No (on mail.cs.msu.ru); Unknown failure Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This matches the behaviour of other Unix-like systems that have SIGINFO and causes less harm to processes that do not install handlers for this signal, making the keyboard status character non-fatal for them. This is implemented with the assumption that SIGINFO is defined to be equivalent to SIGPWR; still, there is no reason for PWR to result in termination of the signal recipient anyway — it does not indicate there is a fatal problem with the recipient's execution context (like e.g. FPE/ILL do), and we have TERM/KILL for explicit termination requests. Signed-off-by: Arseny Maslennikov --- include/linux/signal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/signal.h b/include/linux/signal.h index 9702016734b1..c365754ea647 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h @@ -360,7 +360,7 @@ extern bool unhandled_signal(struct task_struct *tsk, int sig); * | SIGSYS/SIGUNUSED | coredump | * | SIGSTKFLT | terminate | * | SIGWINCH | ignore | - * | SIGPWR | terminate | + * | SIGPWR | ignore | * | SIGRTMIN-SIGRTMAX | terminate | * +--------------------+------------------+ * | non-POSIX signal | default action | @@ -411,7 +411,8 @@ extern bool unhandled_signal(struct task_struct *tsk, int sig); #define SIG_KERNEL_IGNORE_MASK (\ rt_sigmask(SIGCONT) | rt_sigmask(SIGCHLD) | \ - rt_sigmask(SIGWINCH) | rt_sigmask(SIGURG) ) + rt_sigmask(SIGWINCH) | rt_sigmask(SIGURG) | \ + rt_sigmask(SIGINFO) ) #define SIG_SPECIFIC_SICODES_MASK (\ rt_sigmask(SIGILL) | rt_sigmask(SIGFPE) | \ -- 2.20.1