• Ricardo Neri's avatar
    ptrace,x86: Make user_64bit_mode() available to 32-bit builds · e27c310a
    Ricardo Neri authored
    In its current form, user_64bit_mode() can only be used when CONFIG_X86_64
    is selected. This implies that code built with CONFIG_X86_64=n cannot use
    it. If a piece of code needs to be built for both CONFIG_X86_64=y and
    CONFIG_X86_64=n and wants to use this function, it needs to wrap it in
    an #ifdef/#endif; potentially, in multiple places.
    
    This can be easily avoided with a single #ifdef/#endif pair within
    user_64bit_mode() itself.
    Suggested-by: default avatarBorislav Petkov <bp@suse.de>
    Signed-off-by: default avatarRicardo Neri <ricardo.neri-calderon@linux.intel.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
    Cc: "Michael S. Tsirkin" <mst@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: ricardo.neri@intel.com
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
    Cc: Huang Rui <ray.huang@amd.com>
    Cc: Qiaowei Ren <qiaowei.ren@intel.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Jiri Slaby <jslaby@suse.cz>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: "Ravi V. Shankar" <ravi.v.shankar@intel.com>
    Cc: Chris Metcalf <cmetcalf@mellanox.com>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Colin Ian King <colin.king@canonical.com>
    Cc: Chen Yucong <slaoub@gmail.com>
    Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Lorenzo Stoakes <lstoakes@gmail.com>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Thomas Garnier <thgarnie@google.com>
    Link: https://lkml.kernel.org/r/1509135945-13762-4-git-send-email-ricardo.neri-calderon@linux.intel.com
    e27c310a
ptrace.h 7.69 KB