diff options
author | Dave Hansen <[email protected]> | 2017-10-18 10:21:07 -0700 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-10-20 10:37:33 +0200 |
commit | da20ab35180780e4a6eadc804544f1fa967f3567 (patch) | |
tree | 0c70b8daa761d4013d5bc8b3bb7f9091d7bca2cd /tools/perf/scripts/python/export-to-postgresql.py | |
parent | fc72ae40e30327aa24eb88a24b9c7058f938bd36 (diff) |
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 <[email protected]>
Reviewed-by: Andy Lutomirski <[email protected]>
Reviewed-by: Brian Gerst <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions