All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] x86/srso: Reduce overhead of the mitigation
@ 2023-08-21 11:27 Andrew Cooper
  2023-08-21 11:27 ` [PATCH 1/4] x86/srso: Rename srso_alias_*() to srso_fam19_*() Andrew Cooper
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Andrew Cooper @ 2023-08-21 11:27 UTC (permalink / raw)
  To: LKML
  Cc: Andrew Cooper, x86, Borislav Petkov, Peter Zijlstra,
	Josh Poimboeuf, Babu Moger, David.Kaplan, Nikolay Borisov, gregkh,
	Thomas Gleixner

The main point of this series is patch 4 to remove one taken branch from every
function return.  Everything else is cleanup.

Patch 3 has an issue that sadly may invalidate this as a technique.  Patch 4
needs some objtool whispering to fix.

Based on x86/urgent but I suspect this may want rebasing around other fixes in
flight.

Andrew Cooper (4):
  x86/srso: Rename srso_alias_*() to srso_fam19_*()
  x86/srso: Rename fam17 SRSO infrastructure to srso_fam17_*()
  x86/ret-thunk: Support CALL-ing to the ret-thunk
  x86/srso: Use CALL-based return thunks to reduce overhead

 arch/x86/include/asm/nospec-branch.h |  9 ++--
 arch/x86/kernel/alternative.c        |  4 +-
 arch/x86/kernel/cpu/bugs.c           |  9 ++--
 arch/x86/kernel/ftrace.c             |  8 +--
 arch/x86/kernel/static_call.c        | 10 ++--
 arch/x86/kernel/vmlinux.lds.S        | 10 ++--
 arch/x86/lib/retpoline.S             | 75 ++++++++++++----------------
 arch/x86/net/bpf_jit_comp.c          |  5 +-
 8 files changed, 67 insertions(+), 63 deletions(-)


base-commit: 6405b72e8d17bd1875a56ae52d23ec3cd51b9d66
-- 
2.30.2


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [PATCH RFC 4/4] x86/srso: Use CALL-based return thunks to reduce overhead
@ 2023-08-21 18:06 kernel test robot
  0 siblings, 0 replies; 20+ messages in thread
From: kernel test robot @ 2023-08-21 18:06 UTC (permalink / raw)
  Cc: oe-kbuild-all, llvm

In-Reply-To: <20230821112723.3995187-5-andrew.cooper3@citrix.com>
References: <20230821112723.3995187-5-andrew.cooper3@citrix.com>
TO: Andrew Cooper <andrew.cooper3@citrix.com>

Hi Andrew,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on 6405b72e8d17bd1875a56ae52d23ec3cd51b9d66]

url:    https://github.com/intel-lab-lkp/linux/commits/Andrew-Cooper/x86-srso-Rename-srso_alias_-to-srso_fam19_/20230821-192855
base:   6405b72e8d17bd1875a56ae52d23ec3cd51b9d66
patch link:    https://lore.kernel.org/r/20230821112723.3995187-5-andrew.cooper3%40citrix.com
patch subject: [PATCH RFC 4/4] x86/srso: Use CALL-based return thunks to reduce overhead
config: x86_64-randconfig-071-20230821 (https://download.01.org/0day-ci/archive/20230822/202308220129.AcqINgTs-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230822/202308220129.AcqINgTs-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308220129.AcqINgTs-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> vmlinux.o: warning: objtool: srso_fam17_return_thunk(): can't find starting instruction

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2023-09-13 14:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-21 11:27 [PATCH 0/4] x86/srso: Reduce overhead of the mitigation Andrew Cooper
2023-08-21 11:27 ` [PATCH 1/4] x86/srso: Rename srso_alias_*() to srso_fam19_*() Andrew Cooper
2023-09-13 13:46   ` Borislav Petkov
2023-09-13 14:27     ` Andrew Cooper
2023-09-13 14:46       ` Borislav Petkov
2023-08-21 11:27 ` [PATCH 2/4] x86/srso: Rename fam17 SRSO infrastructure to srso_fam17_*() Andrew Cooper
2023-09-13 13:15   ` Peter Zijlstra
2023-08-21 11:27 ` [PATCH RFC 3/4] x86/ret-thunk: Support CALL-ing to the ret-thunk Andrew Cooper
2023-08-21 11:27 ` [PATCH RFC 4/4] x86/srso: Use CALL-based return thunks to reduce overhead Andrew Cooper
2023-08-21 15:16   ` Josh Poimboeuf
2023-08-21 23:01     ` Andrew Cooper
2023-08-22  2:22       ` Josh Poimboeuf
2023-08-22  6:45         ` Nikolay Borisov
2023-08-22 22:18           ` Josh Poimboeuf
2023-08-23  6:08             ` Nikolay Borisov
2023-09-13 12:50             ` Peter Zijlstra
2023-08-21 21:19   ` kernel test robot
2023-08-22  7:23   ` kernel test robot
2023-09-13 13:17   ` Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
2023-08-21 18:06 kernel test robot

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.