From: Arseny Maslennikov <ar@cs.msu.ru>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Arseny Maslennikov <ar@cs.msu.ru>, Rob Landley <rob@landley.net>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Pavel Machek <pavel@ucw.cz>,
linux-api@vger.kernel.org,
"Vladimir D. Seleznev" <vseleznv@altlinux.org>
Subject: [PATCH v3 1/7] signal.h: Define SIGINFO on all architectures
Date: Thu, 30 Apr 2020 09:42:55 +0300 [thread overview]
Message-ID: <20200430064301.1099452-2-ar@cs.msu.ru> (raw)
In-Reply-To: <20200430064301.1099452-1-ar@cs.msu.ru>
This complementary patch defines SIGINFO as a synonym for SIGPWR
on every architecture supported by the kernel.
SIGPWR looks like a nice candidate for this role, because it is
defined on every supported arch; it is currently only used to inform
PID 1 of power failures, and daemons that care about low-level
events do not tend to have a controlling terminal.
However, on sparcs SIGPWR is a synonym for SIGLOST, a signal unique
to that architecture, with a narrow set of intended uses that do not
combine well with interactively requesting status.
SIGLOST is not used by any kernel code at the moment.
SIGINFO is not defined as a real-time signal for the following reasons:
* SIGRTMIN and SIGRTMAX can not be changed without breaking userspace
* the lack of queuing is irrelevant for the main use-case, since the
consumption rate of information by a terminal user and the
practical tty keypress processing rates are much slower than SIGINFO
processing by the line discipline.
Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru>
---
arch/arm/include/uapi/asm/signal.h | 1 +
arch/h8300/include/uapi/asm/signal.h | 1 +
arch/ia64/include/uapi/asm/signal.h | 1 +
arch/m68k/include/uapi/asm/signal.h | 1 +
arch/mips/include/uapi/asm/signal.h | 1 +
arch/parisc/include/uapi/asm/signal.h | 1 +
arch/powerpc/include/uapi/asm/signal.h | 1 +
arch/s390/include/uapi/asm/signal.h | 1 +
arch/sparc/include/uapi/asm/signal.h | 2 ++
arch/x86/include/uapi/asm/signal.h | 1 +
arch/xtensa/include/uapi/asm/signal.h | 1 +
include/uapi/asm-generic/signal.h | 1 +
12 files changed, 13 insertions(+)
diff --git a/arch/arm/include/uapi/asm/signal.h b/arch/arm/include/uapi/asm/signal.h
index 9b4185ba4..b80b53a17 100644
--- a/arch/arm/include/uapi/asm/signal.h
+++ b/arch/arm/include/uapi/asm/signal.h
@@ -50,6 +50,7 @@ typedef unsigned long sigset_t;
#define SIGLOST 29
*/
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
#define SIGUNUSED 31
diff --git a/arch/h8300/include/uapi/asm/signal.h b/arch/h8300/include/uapi/asm/signal.h
index e15521037..7a2b783af 100644
--- a/arch/h8300/include/uapi/asm/signal.h
+++ b/arch/h8300/include/uapi/asm/signal.h
@@ -50,6 +50,7 @@ typedef unsigned long sigset_t;
#define SIGLOST 29
*/
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
#define SIGUNUSED 31
diff --git a/arch/ia64/include/uapi/asm/signal.h b/arch/ia64/include/uapi/asm/signal.h
index aa98ff1b9..b4c98cb17 100644
--- a/arch/ia64/include/uapi/asm/signal.h
+++ b/arch/ia64/include/uapi/asm/signal.h
@@ -45,6 +45,7 @@
#define SIGLOST 29
*/
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
/* signal 31 is no longer "unused", but the SIGUNUSED macro remains for backwards compatibility */
#define SIGUNUSED 31
diff --git a/arch/m68k/include/uapi/asm/signal.h b/arch/m68k/include/uapi/asm/signal.h
index 915cc755a..a0b4e4108 100644
--- a/arch/m68k/include/uapi/asm/signal.h
+++ b/arch/m68k/include/uapi/asm/signal.h
@@ -50,6 +50,7 @@ typedef unsigned long sigset_t;
#define SIGLOST 29
*/
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
#define SIGUNUSED 31
diff --git a/arch/mips/include/uapi/asm/signal.h b/arch/mips/include/uapi/asm/signal.h
index 53104b10a..975a6f0d3 100644
--- a/arch/mips/include/uapi/asm/signal.h
+++ b/arch/mips/include/uapi/asm/signal.h
@@ -43,6 +43,7 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
#define SIGCHLD 18 /* Child status has changed (POSIX). */
#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
#define SIGPWR 19 /* Power failure restart (System V). */
+#define SIGINFO SIGPWR /* Keyboard status request (4.2 BSD). */
#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
#define SIGURG 21 /* Urgent condition on socket (4.2 BSD). */
#define SIGIO 22 /* I/O now possible (4.2 BSD). */
diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h
index d38563a39..fe2e00d59 100644
--- a/arch/parisc/include/uapi/asm/signal.h
+++ b/arch/parisc/include/uapi/asm/signal.h
@@ -22,6 +22,7 @@
#define SIGUSR2 17
#define SIGCHLD 18
#define SIGPWR 19
+#define SIGINFO SIGPWR
#define SIGVTALRM 20
#define SIGPROF 21
#define SIGIO 22
diff --git a/arch/powerpc/include/uapi/asm/signal.h b/arch/powerpc/include/uapi/asm/signal.h
index 85b0a7aa4..e7f388590 100644
--- a/arch/powerpc/include/uapi/asm/signal.h
+++ b/arch/powerpc/include/uapi/asm/signal.h
@@ -53,6 +53,7 @@ typedef struct {
#define SIGLOST 29
*/
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
#define SIGUNUSED 31
diff --git a/arch/s390/include/uapi/asm/signal.h b/arch/s390/include/uapi/asm/signal.h
index 9a14a611e..12ee62987 100644
--- a/arch/s390/include/uapi/asm/signal.h
+++ b/arch/s390/include/uapi/asm/signal.h
@@ -58,6 +58,7 @@ typedef unsigned long sigset_t;
#define SIGLOST 29
*/
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
#define SIGUNUSED 31
diff --git a/arch/sparc/include/uapi/asm/signal.h b/arch/sparc/include/uapi/asm/signal.h
index ff9505923..b65516319 100644
--- a/arch/sparc/include/uapi/asm/signal.h
+++ b/arch/sparc/include/uapi/asm/signal.h
@@ -71,6 +71,8 @@
#define SIGWINCH 28
#define SIGLOST 29
#define SIGPWR SIGLOST
+/* XXX: is it OK for SIGINFO to collide with LOST? */
+#define SIGINFO SIGPWR
#define SIGUSR1 30
#define SIGUSR2 31
diff --git a/arch/x86/include/uapi/asm/signal.h b/arch/x86/include/uapi/asm/signal.h
index e5745d593..1539bb288 100644
--- a/arch/x86/include/uapi/asm/signal.h
+++ b/arch/x86/include/uapi/asm/signal.h
@@ -55,6 +55,7 @@ typedef unsigned long sigset_t;
#define SIGLOST 29
*/
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
#define SIGUNUSED 31
diff --git a/arch/xtensa/include/uapi/asm/signal.h b/arch/xtensa/include/uapi/asm/signal.h
index 005dec5bf..d64423430 100644
--- a/arch/xtensa/include/uapi/asm/signal.h
+++ b/arch/xtensa/include/uapi/asm/signal.h
@@ -65,6 +65,7 @@ typedef struct {
#define SIGPOLL SIGIO
/* #define SIGLOST 29 */
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
#define SIGUNUSED 31
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 5c716a952..9f9a1db0d 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -43,6 +43,7 @@
#define SIGLOST 29
*/
#define SIGPWR 30
+#define SIGINFO SIGPWR
#define SIGSYS 31
#define SIGUNUSED 31
--
2.26.2
next prev parent reply other threads:[~2020-04-30 7:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 6:42 [PATCH v3 0/7] TTY Keyboard Status Request Arseny Maslennikov
2020-04-30 6:42 ` Arseny Maslennikov [this message]
2020-04-30 6:42 ` [PATCH v3 2/7] tty: termios: Reserve space for VSTATUS in .c_cc Arseny Maslennikov
2020-04-30 6:42 ` [PATCH v3 3/7] n_tty: Send SIGINFO to fg pgrp on status request character Arseny Maslennikov
2020-04-30 6:42 ` [PATCH v3 4/7] linux/signal.h: Ignore SIGINFO by default in new tasks Arseny Maslennikov
2020-04-30 6:53 ` Jiri Slaby
2020-04-30 7:14 ` Christian Brauner
2020-04-30 7:19 ` Greg Kroah-Hartman
2020-04-30 7:37 ` Aleksa Sarai
2020-04-30 8:00 ` Christian Brauner
2020-04-30 6:42 ` [PATCH v3 5/7] tty: Add NOKERNINFO lflag to termios Arseny Maslennikov
2020-04-30 6:55 ` Jiri Slaby
2020-04-30 7:20 ` Arseny Maslennikov
2020-04-30 6:43 ` [PATCH v3 6/7] n_tty: ->ops->write: Cut core logic out to a separate function Arseny Maslennikov
2020-04-30 6:43 ` [PATCH v3 7/7] n_tty: Provide an informational line on VSTATUS receipt Arseny Maslennikov
2020-04-30 7:29 ` Jiri Slaby
2020-04-30 9:08 ` Arseny Maslennikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200430064301.1099452-2-ar@cs.msu.ru \
--to=ar@cs.msu.ru \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rob@landley.net \
--cc=vseleznv@altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.