public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* System call number masking
@ 2016-04-14 17:22 Ben Hutchings
  2016-04-14 17:48 ` Andy Lutomirski
  0 siblings, 1 reply; 14+ messages in thread
From: Ben Hutchings @ 2016-04-14 17:22 UTC (permalink / raw)
  To: Andy Lutomirski; +Cc: x86, LKML

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

I'm updating my x32-as-boot-time-option patch for 4.6, and I noticed a
subtle change in system call number masking on x86_64 as a result of
moving the slow path into C.

Previously we would mask out the upper 32 bits before doing anything
with the system call number, both on the slow and fast paths, if and
only if x32 was enabled.

Now we always mask out the upper 32 bits on the slow path, so it's not
quite consistent with the fast path if x32 is disabled.  A system call
that would be rejected by the fast path can succeed on the slow path.
I don't know whether this causes any problems, but it seems
undesirable.

But it's also undesirable that the behaviour of system call numbers not
assigned to x32 also varies depending on whether x32 is enabled.
Should we always mask out the upper 32 bits on the fast path?

Ben.

-- 
Ben Hutchings
In a hierarchy, every employee tends to rise to his level of incompetence.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-04-18  6:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-14 17:22 System call number masking Ben Hutchings
2016-04-14 17:48 ` Andy Lutomirski
2016-04-18  0:45   ` Ben Hutchings
2016-04-18  0:47     ` [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path Ben Hutchings
2016-04-18  4:50       ` H. Peter Anvin
2016-04-18  5:18         ` Andy Lutomirski
2016-04-18  5:21           ` H. Peter Anvin
2016-04-18  5:39             ` Andy Lutomirski
2016-04-18  5:45               ` H. Peter Anvin
2016-04-18  5:48                 ` Andy Lutomirski
2016-04-18  6:01                   ` H. Peter Anvin
2016-04-18  6:14                     ` Andy Lutomirski
2016-04-18  6:19                       ` H. Peter Anvin
2016-04-18  5:24           ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox