Centos-kernel-stream-9/arch/m68k
Augusto Caringi f5bba5d5f4 Merge: Enable shadow stack
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5798

# Merge Request Required Information

## Summary of Changes

Backport a few missing shadow stack patches and enable shadow stack.

Checked using the kernel selftests:
```
[root@intel-alderlake-m-01 ~]# lscpu | grep shstk
[root@intel-alderlake-m-01 ~]# reboot now
...
[root@intel-alderlake-m-01 ~]# uname -a
Linux intel-alderlake-m-01.khw.eng.bos2.dc.redhat.com 5.14.0-527.SHSTK_UPDATE_WITH_GUARD_GAP.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Nov 24 14:21:55 EST 2024 x86_64 x86_64 x86_64 GNU/Linux
[root@intel-alderlake-m-01 ~]# lscpu | grep shstk
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities
[root@intel-alderlake-m-01 ~]# ./tools/testing/selftests/x86/test_shadow_stack
[INFO]  new_ssp = 7fec4a3ffff8, *new_ssp = 7fec4a400001
[INFO]  changing ssp from 7fec4adffff0 to 7fec4a3ffff8
[INFO]  ssp is now 7fec4a400000
[OK]    Shadow stack pivot
[OK]    Shadow stack faults
[INFO]  Corrupting shadow stack
[INFO]  Generated shadow stack violation successfully
[OK]    Shadow stack violation test
[INFO]  Gup read -> shstk access success
[INFO]  Gup write -> shstk access success
[INFO]  Violation from normal write
[INFO]  Gup read -> write access success
[INFO]  Violation from normal write
[INFO]  Gup write -> write access success
[INFO]  Cow gup write -> write access success
[OK]    Shadow gup test
[INFO]  Violation from shstk access
[OK]    mprotect() test
[OK]    Userfaultfd test
[OK]    Guard gap test, other mapping's gaps
[OK]    Guard gap test, placement mapping's gaps
[OK]    Ptrace test
[OK]    32 bit test
[OK]    Uretprobe test
```

Leaving out da42b5229b since the relevant part is a follow-up of f7875966dc, which is not included.

Omitted-fix: da42b5229b27bb5c0eff3408c92f025e6041dad3
Omitted-fix: 249608ee47132cab3b1adacd9e463548f57bd316

## Approved Development Ticket(s)

JIRA: https://issues.redhat.com/browse/RHEL-15599

Signed-off-by: Štěpán Horáček <shoracek@redhat.com>

Approved-by: David Arcari <darcari@redhat.com>
Approved-by: Rafael Aquini <raquini@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Augusto Caringi <acaringi@redhat.com>
2025-04-29 18:49:26 -03:00
..
68000 m68knommu: fix missing LCD splash screen data initializer 2021-06-21 12:09:26 +10:00
amiga vt: remove superfluous CONFIG_HW_CONSOLE 2024-11-20 11:19:51 +01:00
apollo
atari block: remove genhd.h 2022-06-22 08:53:32 +08:00
bvme6000 block: remove genhd.h 2022-06-22 08:53:32 +08:00
coldfire m68k/coldfire: change pll var. to clk_pll 2021-07-26 08:41:38 +10:00
configs mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED 2024-09-05 20:35:59 -04:00
emu block: add a bvec_phys helper 2024-09-27 11:19:14 +08:00
fpsp040
hp300
ifpsp060
include asm-generic: provide generic page_to_phys and phys_to_page implementations 2025-03-14 16:48:31 +08:00
kernel arch: Reserve map_shadow_stack() syscall number for all architectures 2025-03-18 17:09:46 +01:00
lib net: unexport csum_and_copy_{from,to}_user 2024-03-20 09:42:34 -04:00
mac
math-emu
mm mm: always expand the stack with the mmap write lock held 2024-09-05 20:37:19 -04:00
mvme16x block: remove genhd.h 2022-06-22 08:53:32 +08:00
mvme147 block: remove genhd.h 2022-06-22 08:53:32 +08:00
q40 m68k/q40: Replace q40ide driver with pata_falcon and falconide 2021-06-10 16:30:12 -06:00
sun3
sun3x
tools/amiga
Kbuild
Kconfig Kconfig: introduce HAS_IOPORT option and select it as necessary 2024-02-05 20:42:26 -03:00
Kconfig.bus
Kconfig.cpu mm, treewide: redefine MAX_ORDER sanely 2023-10-30 09:12:37 +01:00
Kconfig.debug
Kconfig.devices
Kconfig.machine m68k: MAC should select HAVE_PATA_PLATFORM 2021-07-19 12:18:42 +02:00
Makefile Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
install.sh