All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] Reclaim TIF_IA32 and TIF_X32
@ 2020-10-04  3:25 Gabriel Krisman Bertazi
  2020-10-04  3:25 ` [PATCH v3 01/10] x86: events: Avoid TIF_IA32 when checking 64bit mode Gabriel Krisman Bertazi
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Gabriel Krisman Bertazi @ 2020-10-04  3:25 UTC (permalink / raw)
  To: luto, tglx
  Cc: hch, hpa, bp, rric, peterz, mingo, x86, linux-kernel,
	dave.hansen, sean.j.christopherson, Gabriel Krisman Bertazi,
	kernel

This is the third version of the patch to reclaim those TI flags.  The
main difference from v2 is that it exports the elf32 headers in the
macros in a proper way, instead of doing some magic to use them.

Andy, I didn't follow (my understanding of) your suggestion to expose
the elf32 headers because by doing that in compat_start_thread would
mean also doing it in start_thread, but the later is not ELF specific.
The mechanism I used, which solves the issue and I hope is not
over-complex is the same that SET_PERSONALITY does, so there is
precedent.  It also has the benefit that we don't need to touch other
architecture functions.  Do you think in this patch series is fine?

This also drops the vmx patch, since that is being reworked by Sean and
Andy, and my patch doesn't change its behavior.

* original cover letter:

We are running out of TI flags for x86.  This patchset removes several
usages of TIF_IA32 and TIF_x32 in preparation to reclaim these flags.
After these cleanups, there is still one more user for both of them,
which I need to take a better look before removing.

Many of the ideas for this patchset came from Andy Lutomirski (Thank
you!)

These were tested by exercising these paths with x32 and ia32 binaries.

Gabriel Krisman Bertazi (10):
  x86: events: Avoid TIF_IA32 when checking 64bit mode
  x86: Simplify compat syscall userspace allocation
  x86: oprofile: Avoid TIF_IA32 when checking 64bit mode
  x86: elf: Use e_machine to choose DLINFO in compat
  elf: Expose ELF header in compat_start_thread
  x86: elf: Use e_machine to select start_thread for x32
  elf: Expose ELF header on arch_setup_additional_pages
  x86: elf: Use e_machine to select additional_pages between x32
  x86: Convert mmu context ia32_compat into a proper flags field
  x86: Reclaim TIF_IA32 and TIF_X32

 arch/x86/entry/vdso/vma.c             |  4 ++--
 arch/x86/entry/vsyscall/vsyscall_64.c |  2 +-
 arch/x86/events/core.c                |  2 +-
 arch/x86/events/intel/ds.c            |  2 +-
 arch/x86/events/intel/lbr.c           |  2 +-
 arch/x86/include/asm/compat.h         | 15 +++++++-------
 arch/x86/include/asm/elf.h            | 13 ++++++++-----
 arch/x86/include/asm/mmu.h            |  6 ++++--
 arch/x86/include/asm/mmu_context.h    |  2 +-
 arch/x86/include/asm/thread_info.h    |  4 ----
 arch/x86/kernel/perf_regs.c           |  2 +-
 arch/x86/kernel/process_64.c          | 28 +++++++++++++--------------
 arch/x86/oprofile/backtrace.c         |  2 +-
 fs/binfmt_elf.c                       |  4 ++--
 fs/compat_binfmt_elf.c                | 20 ++++++++++++++-----
 include/linux/elf.h                   | 10 ++++++++++
 16 files changed, 68 insertions(+), 50 deletions(-)

-- 
2.28.0


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

end of thread, other threads:[~2020-11-05 20:02 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-04  3:25 [PATCH v3 00/10] Reclaim TIF_IA32 and TIF_X32 Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 01/10] x86: events: Avoid TIF_IA32 when checking 64bit mode Gabriel Krisman Bertazi
2020-10-26 12:52   ` [tip: x86/cleanups] perf/x86: " tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 02/10] x86: Simplify compat syscall userspace allocation Gabriel Krisman Bertazi
2020-10-26 12:52   ` [tip: x86/cleanups] x86/compat: " tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 03/10] x86: oprofile: Avoid TIF_IA32 when checking 64bit mode Gabriel Krisman Bertazi
2020-10-26 12:52   ` [tip: x86/cleanups] x86/oprofile: " tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 04/10] x86: elf: Use e_machine to choose DLINFO in compat Gabriel Krisman Bertazi
2020-10-26 12:52   ` [tip: x86/cleanups] x86/elf: " tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 05/10] elf: Expose ELF header in compat_start_thread Gabriel Krisman Bertazi
2020-10-26 12:52   ` [tip: x86/cleanups] elf: Expose ELF header in compat_start_thread() tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 06/10] x86: elf: Use e_machine to select start_thread for x32 Gabriel Krisman Bertazi
2020-10-08  0:05   ` Andy Lutomirski
2020-10-26 12:52   ` [tip: x86/cleanups] x86/elf: " tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 07/10] elf: Expose ELF header on arch_setup_additional_pages Gabriel Krisman Bertazi
2020-10-26 12:52   ` [tip: x86/cleanups] elf: Expose ELF header on arch_setup_additional_pages() tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 08/10] x86: elf: Use e_machine to select additional_pages between x32 Gabriel Krisman Bertazi
2020-10-26 12:52   ` [tip: x86/cleanups] x86/elf: Use e_machine to check for x32/ia32 in setup_additional_pages() tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 09/10] x86: Convert mmu context ia32_compat into a proper flags field Gabriel Krisman Bertazi
2020-10-08  0:07   ` Andy Lutomirski
2020-10-26 12:52   ` [tip: x86/cleanups] x86/mm: " tip-bot2 for Gabriel Krisman Bertazi
2020-10-04  3:25 ` [PATCH v3 10/10] x86: Reclaim TIF_IA32 and TIF_X32 Gabriel Krisman Bertazi
2020-10-26 12:52   ` [tip: x86/cleanups] " tip-bot2 for Gabriel Krisman Bertazi
2020-11-05 20:01   ` [PATCH v3 10/10] " Dmitry Safonov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.