03.05.2016 20:31, Andy Lutomirski пишет:
Using bit 4 divides the space of available bits strangely. Use bit
31 instead so that we have a better chance of keeping flag and mode
bits separate in the long run.
Cc: Stas Sergeev <s...@list.ru>
Cc: Al Viro <v...@zeniv.linux.org.uk>
Cc: Aleksa Sarai <cyp...@cyphar.com>
Cc: Amanieu d'Antras <aman...@gmail.com>
Cc: Andrea Arcangeli <aarca...@redhat.com>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Andy Lutomirski <l...@amacapital.net>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Brian Gerst <brge...@gmail.com>
Cc: Denys Vlasenko <dvlas...@redhat.com>
Cc: Eric W. Biederman <ebied...@xmission.com>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: H. Peter Anvin <h...@zytor.com>
Cc: Heinrich Schuchardt <xypron.g...@gmx.de>
Cc: Jason Low <jason.l...@hp.com>
Cc: Josh Triplett <j...@joshtriplett.org>
Cc: Konstantin Khlebnikov <khlebni...@yandex-team.ru>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Oleg Nesterov <o...@redhat.com>
Cc: Palmer Dabbelt <pal...@dabbelt.com>
Cc: Paul Moore <pmo...@redhat.com>
Cc: Pavel Emelyanov <xe...@parallels.com>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Richard Weinberger <rich...@nod.at>
Cc: Sasha Levin <sasha.le...@oracle.com>
Cc: Shuah Khan <shua...@osg.samsung.com>
Cc: Tejun Heo <t...@kernel.org>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Vladimir Davydov <vdavy...@parallels.com>
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andy Lutomirski <l...@kernel.org>
---
include/uapi/linux/signal.h | 2 +-
tools/testing/selftests/sigaltstack/sas.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/signal.h b/include/uapi/linux/signal.h
index 738826048af2..cd0804b6bfa2 100644
--- a/include/uapi/linux/signal.h
+++ b/include/uapi/linux/signal.h
@@ -8,7 +8,7 @@
#define SS_DISABLE 2
/* bit-flags */
-#define SS_AUTODISARM (1 << 4) /* disable sas during sighandling */
+#define SS_AUTODISARM (1U << 31) /* disable sas during sighandling */
And what if we are out of 32 bits for storing both mode and flags? :)
Well, yes, very unlikely, but I did it that way exactly so that
we can eventually promote to 64bit variable.
Doesn't matter at all, of course. Let it be any way you like.