From: "tip-bot2 for Nikolay Borisov" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Nikolay Borisov <nik.borisov@suse.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/entry] x86/elf: Make loading of 32bit processes depend on ia32_enabled()
Date: Thu, 14 Sep 2023 11:27:03 -0000 [thread overview]
Message-ID: <169469082322.27769.6028739507798340170.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230623111409.3047467-5-nik.borisov@suse.com>
The following commit has been merged into the x86/entry branch of tip:
Commit-ID: 5ae2702d7c482edbf002499e23a2e22ac4047af1
Gitweb: https://git.kernel.org/tip/5ae2702d7c482edbf002499e23a2e22ac4047af1
Author: Nikolay Borisov <nik.borisov@suse.com>
AuthorDate: Fri, 23 Jun 2023 14:14:07 +03:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 14 Sep 2023 13:19:53 +02:00
x86/elf: Make loading of 32bit processes depend on ia32_enabled()
Major aspect of ia32 emulation is the ability to load 32bit processes.
That's currently decided (among others) by compat_elf_check_arch().
Make the macro use ia32_enabled() to decide if IA32 compat is
enabled before loading a 32bit process.
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230623111409.3047467-5-nik.borisov@suse.com
---
arch/x86/include/asm/elf.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 18fd06f..a0234df 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -7,6 +7,7 @@
*/
#include <linux/thread_info.h>
+#include <asm/ia32.h>
#include <asm/ptrace.h>
#include <asm/user.h>
#include <asm/auxvec.h>
@@ -149,7 +150,7 @@ do { \
((x)->e_machine == EM_X86_64)
#define compat_elf_check_arch(x) \
- (elf_check_arch_ia32(x) || \
+ ((elf_check_arch_ia32(x) && ia32_enabled()) || \
(IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
static inline void elf_common_init(struct thread_struct *t,
next prev parent reply other threads:[~2023-09-14 11:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 11:14 [PATCH v4 0/6] Make IA32_EMULATION boot time overridable Nikolay Borisov
2023-06-23 11:14 ` [PATCH v4 1/6] x86: Introduce ia32_enabled() Nikolay Borisov
2023-06-30 11:18 ` Thomas Gleixner
2023-06-30 11:44 ` Thomas Gleixner
2023-09-14 11:27 ` [tip: x86/entry] " tip-bot2 for Nikolay Borisov
2023-06-23 11:14 ` [PATCH v4 2/6] x86/entry: Rename ignore_sysret() Nikolay Borisov
2023-09-14 11:27 ` [tip: x86/entry] " tip-bot2 for Nikolay Borisov
2023-06-23 11:14 ` [PATCH v4 3/6] x86/entry: Compile entry_SYSCALL32_ignore() unconditionally Nikolay Borisov
2023-09-14 11:27 ` [tip: x86/entry] " tip-bot2 for Nikolay Borisov
2023-06-23 11:14 ` [PATCH v4 4/6] x86/elf: Make loading of 32bit processes depend on ia32_enabled() Nikolay Borisov
2023-09-14 11:27 ` tip-bot2 for Nikolay Borisov [this message]
2023-06-23 11:14 ` [PATCH v4 5/6] x86/entry: Make IA32 syscalls' availability " Nikolay Borisov
2023-09-14 11:27 ` [tip: x86/entry] " tip-bot2 for Nikolay Borisov
2023-06-23 11:14 ` [PATCH v4 6/6] x86: Make IA32_EMULATION boot time configurable Nikolay Borisov
2023-09-14 11:27 ` [tip: x86/entry] " tip-bot2 for Nikolay Borisov
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=169469082322.27769.6028739507798340170.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=nik.borisov@suse.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®