linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Andy Lutomirski <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org,
	mingo@kernel.org, luto@kernel.org
Subject: [tip:x86/entry] x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long
Date: Mon, 22 Jul 2019 01:34:07 -0700	[thread overview]
Message-ID: <tip-45e29d119e9923ff14dfb840e3482bef1667bbfb@git.kernel.org> (raw)
In-Reply-To: <99b0d83ad891c67105470a1a6b63243fd63a5061.1562185330.git.luto@kernel.org>

Commit-ID:  45e29d119e9923ff14dfb840e3482bef1667bbfb
Gitweb:     https://git.kernel.org/tip/45e29d119e9923ff14dfb840e3482bef1667bbfb
Author:     Andy Lutomirski <luto@kernel.org>
AuthorDate: Wed, 3 Jul 2019 13:34:05 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 22 Jul 2019 10:31:22 +0200

x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long

Currently, it's an int.  This is bizarre.  Fortunately, the code using it
still works: ~__X32_SYSCALL_BIT is also int, so, if nr is unsigned long,
then C kindly sign-extends the ~__X32_SYSCALL_BIT part, and it actually
results in the desired value.

This is far more subtle than it deserves to be.  Syscall numbers are, for
all practical purposes, unsigned long, so make __X32_SYSCALL_BIT be
unsigned long.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/99b0d83ad891c67105470a1a6b63243fd63a5061.1562185330.git.luto@kernel.org

---
 arch/x86/include/uapi/asm/unistd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/uapi/asm/unistd.h b/arch/x86/include/uapi/asm/unistd.h
index 30d7d04d72d6..196fdd02b8b1 100644
--- a/arch/x86/include/uapi/asm/unistd.h
+++ b/arch/x86/include/uapi/asm/unistd.h
@@ -3,7 +3,7 @@
 #define _UAPI_ASM_X86_UNISTD_H
 
 /* x32 syscall flag bit */
-#define __X32_SYSCALL_BIT	0x40000000
+#define __X32_SYSCALL_BIT	0x40000000UL
 
 #ifndef __KERNEL__
 # ifdef __i386__

      reply	other threads:[~2019-07-22  8:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 20:34 [PATCH 0/4] x32 and compat syscall improvements Andy Lutomirski
2019-07-03 20:34 ` [PATCH 1/4] x86/syscalls: Use the compat versions of rt_sigsuspend() and rt_sigprocmask() Andy Lutomirski
2019-07-22  8:34   ` [tip:x86/entry] " tip-bot for Andy Lutomirski
2019-07-03 20:34 ` [PATCH 2/4] x86/syscalls: Disallow compat entries for all types of 64-bit syscalls Andy Lutomirski
2019-07-22  8:35   ` [tip:x86/entry] " tip-bot for Andy Lutomirski
2019-07-03 20:34 ` [PATCH 3/4] x86/syscalls: Split the x32 syscalls into their own table Andy Lutomirski
2019-07-22  8:36   ` [tip:x86/entry] " tip-bot for Andy Lutomirski
2019-07-03 20:34 ` [PATCH 4/4] x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long Andy Lutomirski
2019-07-22  8:34   ` tip-bot for Andy Lutomirski [this message]

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=tip-45e29d119e9923ff14dfb840e3482bef1667bbfb@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).