From: Walt Drummond <walt@drummond.us>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, Walt Drummond <walt@drummond.us>,
linux-arch@vger.kernel.org
Subject: [RFC PATCH 6/8] signals: Round up _NSIG_WORDS
Date: Mon, 3 Jan 2022 10:19:54 -0800 [thread overview]
Message-ID: <20220103181956.983342-7-walt@drummond.us> (raw)
In-Reply-To: <20220103181956.983342-1-walt@drummond.us>
When needed, round _NSIG_WORDS up for generic and x86 architectures.
Signed-off-by: Walt Drummond <walt@drummond.us>
---
arch/x86/include/asm/signal.h | 2 +-
include/uapi/asm-generic/signal.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index 9bac7c6e524c..d8e2efe6cd46 100644
--- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h
@@ -16,7 +16,7 @@
# define _NSIG_BPW 64
#endif
-#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
+#define _NSIG_WORDS ((_NSIG + _NSIG_BPW - 1) / _NSIG_BPW)
typedef unsigned long old_sigset_t; /* at least 32 bits */
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index f634822906e4..3c4cc9b8378e 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -6,7 +6,7 @@
#define _NSIG 64
#define _NSIG_BPW __BITS_PER_LONG
-#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
+#define _NSIG_WORDS ((_NSIG + _NSIG_BPW - 1) / _NSIG_BPW)
#define SIGHUP 1
#define SIGINT 2
--
2.30.2
next prev parent reply other threads:[~2022-01-03 18:35 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 18:19 [RFC PATCH 0/8] signals: Support more than 64 signals Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 1/8] signals: Make the real-time signal system calls accept different sized sigset_t from user space Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 2/8] signals: Put the full signal mask on the signal stack for x86_64, X32 and ia32 compatibility mode Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 3/8] signals: Use a helper function to test if a signal is a real-time signal Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 4/8] signals: Remove sigmask() macro Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 5/8] signals: Better support cases where _NSIG_WORDS is greater than 2 Walt Drummond
2022-01-03 18:19 ` Walt Drummond [this message]
2022-01-03 18:19 ` [RFC PATCH 7/8] signals: Add signal debugging Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 8/8] signals: Support BSD VSTATUS, KERNINFO and SIGINFO Walt Drummond
2022-01-04 7:27 ` Greg Kroah-Hartman
2022-01-07 21:48 ` Arseny Maslennikov
2022-01-07 21:52 ` Walt Drummond
2022-01-07 22:39 ` Arseny Maslennikov
2022-01-08 14:38 ` Arseny Maslennikov
2022-01-03 18:48 ` [RFC PATCH 0/8] signals: Support more than 64 signals Al Viro
2022-01-04 1:00 ` Walt Drummond
2022-01-04 1:16 ` Al Viro
2022-01-04 1:49 ` Al Viro
2022-01-04 18:00 ` Eric W. Biederman
2022-01-04 20:52 ` Theodore Ts'o
2022-01-04 21:33 ` Walt Drummond
2022-01-04 22:05 ` Eric W. Biederman
2022-01-04 22:23 ` Theodore Ts'o
2022-01-04 22:31 ` Walt Drummond
2022-01-07 19:29 ` Arseny Maslennikov
2022-05-19 12:27 ` Pavel Machek
2022-01-07 19:19 ` 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=20220103181956.983342-7-walt@drummond.us \
--to=walt@drummond.us \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®