summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorDave Hansen <dave.hansen@linux.intel.com>2017-10-18 10:21:07 -0700
committerIngo Molnar <mingo@kernel.org>2017-10-20 10:37:33 +0200
commitda20ab35180780e4a6eadc804544f1fa967f3567 (patch)
tree0c70b8daa761d4013d5bc8b3bb7f9091d7bca2cd /mm
parentfc72ae40e30327aa24eb88a24b9c7058f938bd36 (diff)
downloadop-kernel-dev-da20ab35180780e4a6eadc804544f1fa967f3567.zip
op-kernel-dev-da20ab35180780e4a6eadc804544f1fa967f3567.tar.gz
x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()
We do not have tracepoints for sys_modify_ldt() because we define it directly instead of using the normal SYSCALL_DEFINEx() macros. However, there is a reason sys_modify_ldt() does not use the macros: it has an 'int' return type instead of 'unsigned long'. This is a bug, but it's a bug cemented in the ABI. What does this mean? If we return -EINVAL from a function that returns 'int', we have 0x00000000ffffffea in %rax. But, if we return -EINVAL from a function returning 'unsigned long', we end up with 0xffffffffffffffea in %rax, which is wrong. To work around this and maintain the 'int' behavior while using the SYSCALL_DEFINEx() macros, so we add a cast to 'unsigned int' in both implementations of sys_modify_ldt(). Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Brian Gerst <brgerst@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20171018172107.1A79C532@viggo.jf.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud