linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] Reclaim TIF_IA32 and TIF_X32
@ 2020-10-01 20:58 Gabriel Krisman Bertazi
  2020-10-01 20:58 ` [PATCH v2 1/9] x86: events: Avoid TIF_IA32 when checking 64bit mode Gabriel Krisman Bertazi
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Gabriel Krisman Bertazi @ 2020-10-01 20:58 UTC (permalink / raw)
  To: luto, tglx
  Cc: hch, hpa, bp, rric, peterz, mingo, x86, linux-kernel,
	dave.hansen, Gabriel Krisman Bertazi, kernel

TI_IA32 and TIF_X32 are not strictly necessary and they are only set at
task creation time, which doesn't fit with processes that transition
between 64/32 bits.  In addition, other reasons to drop these flags are
that we are running out of TI flags for x86 and it is generally a good
idea to reduce architecture specific TI flags, before move the generic
ones to common code.

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

The only difference of v2 from v1 is the addition of the final 3 patches
that solve the last 3 cases of TIF_IA32 and TIF_X32 usage, and actually
remove the TI flags.

Finally, the testing for this patchset was done exercising the code
paths of each case where the flags were used with x32, ia32 and x64
applications. Finally, x86 selftests showed no regressions.


Gabriel Krisman Bertazi (9):
  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
  x86: elf: Use e_machine to select start_thread for x32
  x86: elf: Use e_machine to select setup_additional_pages for x32
  x86: Use current USER_CS to setup correct context on vmx entry
  x86: Convert mmu context ia32_compat into a proper flags field
  x86: Reclaim TIF_IA32 and TIF_X32

 arch/x86/entry/vdso/vma.c             | 21 ++++++++++-------
 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            | 24 ++++++++++++++-----
 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          | 34 ++++++++++++++-------------
 arch/x86/kvm/vmx/vmx.c                |  2 +-
 arch/x86/oprofile/backtrace.c         |  2 +-
 14 files changed, 67 insertions(+), 53 deletions(-)

-- 
2.28.0


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

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

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 20:58 [PATCH v2 0/9] Reclaim TIF_IA32 and TIF_X32 Gabriel Krisman Bertazi
2020-10-01 20:58 ` [PATCH v2 1/9] x86: events: Avoid TIF_IA32 when checking 64bit mode Gabriel Krisman Bertazi
2020-10-01 20:58 ` [PATCH v2 2/9] x86: Simplify compat syscall userspace allocation Gabriel Krisman Bertazi
2020-10-01 20:58 ` [PATCH v2 3/9] x86: oprofile: Avoid TIF_IA32 when checking 64bit mode Gabriel Krisman Bertazi
2020-10-01 20:58 ` [PATCH v2 4/9] x86: elf: Use e_machine to choose DLINFO in compat Gabriel Krisman Bertazi
2020-10-01 21:46   ` Andy Lutomirski
2020-10-01 20:58 ` [PATCH v2 5/9] x86: elf: Use e_machine to select start_thread for x32 Gabriel Krisman Bertazi
2020-10-01 21:49   ` Andy Lutomirski
2020-10-01 20:58 ` [PATCH v2 6/9] x86: elf: Use e_machine to select setup_additional_pages " Gabriel Krisman Bertazi
2020-10-01 21:50   ` Andy Lutomirski
2020-10-01 20:58 ` [PATCH v2 7/9] x86: Use current USER_CS to setup correct context on vmx entry Gabriel Krisman Bertazi
2020-10-01 21:52   ` Andy Lutomirski
2020-10-02 22:40     ` Sean Christopherson
2020-10-02 23:11       ` Gabriel Krisman Bertazi
2020-10-03  0:15       ` Andy Lutomirski
2020-10-03 23:04         ` Andy Lutomirski
2020-10-05 18:56           ` Andy Lutomirski
2020-10-05 19:54           ` Sean Christopherson
2020-10-01 20:58 ` [PATCH v2 8/9] x86: Convert mmu context ia32_compat into a proper flags field Gabriel Krisman Bertazi
2020-10-01 22:09   ` Andy Lutomirski
2020-10-01 20:58 ` [PATCH v2 9/9] x86: Reclaim TIF_IA32 and TIF_X32 Gabriel Krisman Bertazi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).