Make the scheduler stack end check selectable at boot
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 0 repliesNew
- v13 patches 6 repliesSuperseded
Changes in v2 from the cover letter
- Check scs_is_enabled() inside task_scs_end_corrupted() rather than in schedule_debug() (Peter)
- Return 1 when sched_stack_end_check= can't be parsed (Randy)
- Say in the changelog why the other task_stack_end_corrupted() callers are left alone (Peter)
- Rebase onto tip/sched/core
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | scs: Skip the shadow stack end check when SCS is disabledinclude/ | +11 | 0 replies | |
| 2/3 | sched/core: Add sched_stack_end_check= boot parameterDocumentation/ kernel/ | +35 | 0 replies | |
| 3/3 | lkdtm/bugs: Add CORRUPT_STACK_END to test the scheduler stack end checkdrivers/ tools/ | +22 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/3] Make the scheduler stack end check selectable at boot
At Meta, some of our host types enable CONFIG_SCHED_STACK_END_CHECK, but we don't want it generally on because of the extra work on every context switch.
Right now this is only configurable by setting the Kconfig option at build time. Let's make it so we can also select it at boot with sched_stack_end_check=, so that those hosts can share one kernel image.
(Patch 1 is a cleanup I happened upon while working on this, it can also be taken independently.)
v2:
- Check scs_is_enabled() inside task_scs_end_corrupted() rather than in schedule_debug() (Peter)
- Return 1 when sched_stack_end_check= can't be parsed (Randy)
- Say in the changelog why the other task_stack_end_corrupted() callers are left alone (Peter)
- Rebase onto tip/sched/core
v1: https://lore.kernel.org/r/[email protected]
Chris Down (3):
scs: Skip the shadow stack end check when SCS is disabled sched/core: Add sched_stack_end_check= boot parameter lkdtm/bugs: Add CORRUPT_STACK_END to test the scheduler stack end
check
.../admin-guide/kernel-parameters.txt | 8 +++++ drivers/misc/lkdtm/bugs.c | 21 ++++++++++++ include/linux/scs.h | 19 ++++++----- kernel/sched/core.c | 33 +++++++++++++++---- tools/testing/selftests/lkdtm/tests.txt | 1 + 5 files changed, 68 insertions(+), 14 deletions(-)
base-commit: d7e670601af6c564ccf6d3b2ddf70ee4f41a6d1c
Signature · 1 line
2.56.1