Skip to content

dma: Automatically enable page touching on Caspian #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
9b0f998
mm, memcg: throttle the memory reclaim given dirty/writeback pages to…
shaoyingxu Sep 15, 2021
d620734
Sysfs memory probe interface
Apr 3, 2019
06b0ca6
arm64/mm: Enable sysfs based memory hot remove probe
rwali-aws Jul 14, 2021
552804a
memory: fix offline_and_remove_memory use
fllinden Dec 31, 2021
f77963b
drivers/base/memory: use MHP_MEMMAP_ON_MEMORY from the probe interface
fllinden Dec 9, 2021
641c0c2
mm: add offline page reporting interface
fllinden Jan 6, 2022
4229729
virtio: add hack to allow pre-mapped scatterlists
fllinden Jan 6, 2022
80423d2
virtio-balloon: optionally report offlined memory ranges
fllinden Dec 10, 2021
73725e7
Introduce page touching DMA ops binding
jgowans Sep 16, 2021
23845a7
Correct read overflow in page touching DMA ops binding
May 25, 2022
4020729
x86: Disable KASLR when Xen is detected
ozbenh May 12, 2021
e8091e3
arm64: Export acpi_psci_use_hvc() symbol
Feb 22, 2021
4210a41
hwrng: Add Gravition RNG driver
Feb 23, 2021
8bf0561
drivers: introduce AMAZON_DRIVER_UPDATES
vallishgv Feb 12, 2018
58d03a1
drivers/amazon: import 5.15 drivers
shaoyingxu Jan 10, 2023
ad9c829
ENA: Update to v2.8.1
shaoyingxu Jan 10, 2023
3eaf1dd
EFA: Update to v2.1.1
shaoyingxu Jan 10, 2023
f8ba65a
Enable Algorithims for Amazon Linux 6.1.y
alakesh Oct 27, 2017
f26fb12
xen/manage: keep track of the on-going suspend mode
kamatam9 Jul 12, 2017
6b6211e
xen/manage: introduce helper function to know the on-going suspend mode
kamatam9 Jul 13, 2017
6e5aa46
xenbus: add freeze/thaw/restore callbacks support
kamatam9 Jul 13, 2017
6c4cf92
x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume
anchalag Feb 22, 2018
ba85197
x86/xen: add system core suspend and resume callbacks
kamatam9 Feb 11, 2017
2cff65f
xen-blkfront: add callbacks for PM suspend and hibernation
kamatam9 Jun 8, 2017
c77408a
xen-netfront: add callbacks for PM suspend and hibernation support
kamatam9 Jan 9, 2017
f39ccbb
xen/time: introduce xen_{save,restore}_steal_clock
kamatam9 Jul 13, 2017
46f424f
x86/xen: save and restore steal clock
kamatam9 Jul 21, 2017
8376115
xen/events: add xen_shutdown_pirqs helper function
kamatam9 Aug 24, 2017
48a0b16
x86/xen: close event channels for PIRQs in system core suspend callback
kamatam9 Aug 24, 2017
1f9e747
PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA
Oct 27, 2017
c86378a
Revert "xen: dont fiddle with event channel masking in suspend/resume"
anchalag Mar 27, 2018
af27756
xen-blkfront: Fixed blkfront_restore to remove a call to negotiate_mq
anchalag Jun 5, 2018
389b52c
x86: tsc: avoid system instability in hibernation
Apr 9, 2018
66bcb92
block: xen-blkfront: consider new dom0 features on restore
Oct 18, 2018
f0035c1
xen: restore pirqs on resume from hibernation.
fllinden Oct 26, 2018
83663c6
xen: Only restore the ACPI SCI interrupt in xen_restore_pirqs.
fllinden Nov 10, 2018
7829314
xen-netfront: call netif_device_attach on resume
fllinden Jan 31, 2019
f23f294
xen: Restore xen-pirqs on resume from hibernation
anchalag Aug 15, 2019
1fa9103
block/xen-blkfront: bump the maximum number of indirect segments up t…
fllinden Nov 27, 2019
2688ada
Revert "PCI/MSI: Let core code free MSI descriptors"
sam-aws Jan 20, 2023
40d7f32
Revert "xen/x2apic: enable x2apic mode when supported for HVM"
sam-aws Jan 24, 2023
31a1d12
msr: disable MSR writes by default
luizcap Mar 20, 2023
c08c396
udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.
q2ven Mar 3, 2023
9cf5a02
ENA: Update to v2.8.3
sam-aws Mar 30, 2023
a28c176
Revert "selinux: runtime disable is deprecated, add some ssleep() dis…
luizcap Apr 14, 2023
e05c4ae
AL2023 6.1 Update ena driver to 2.8.6g
akiyano May 17, 2023
695212b
objtool: Add generic symbol for relocation type
Mar 14, 2023
1a21b2c
objtool: Specify host-arch for making LIBSUBCMD
Mar 14, 2023
c76288a
tools: arm64: Make aarch64 instruction decoder available to tools
Jun 23, 2022
b58c1cb
objtool: arm64: Add base definition for arm64 backend
Jun 23, 2022
767594e
objtool: arm64: Decode add/sub instructions
Jun 23, 2022
7af2514
objtool: arm64: Decode jump and call related instructions
Jun 23, 2022
8dae17c
objtool: arm64: Decode other system instructions
Jun 23, 2022
9c50315
objtool: arm64: Decode load/store instructions
Jun 23, 2022
c5dfd1c
objtool: arm64: Decode LDR instructions
Jun 23, 2022
bab4f74
objtool: arm64: Accept non-instruction data in code sections
Jun 23, 2022
1589544
objtool: check: Support data in text section
Jun 23, 2022
eb36ce3
objtool: arm64: Handle supported relocations in alternatives
Jun 23, 2022
298efb4
objtool: arm64: Ignore replacement section for alternative callback
Jun 23, 2022
48ef2cb
objtool: arm64: Enable stack validation for arm64
Jun 23, 2022
1519c68
Revert "arm64: alternatives: add shared NOP callback"
Mar 28, 2023
7adc19c
objtool: arm64: Add annotate_reachable() for objtools
Jun 23, 2022
bacfabd
arm64: bug: Add reachable annotation to warning macros
Jun 23, 2022
822c863
arm64: kgdb: Add reachable annotation after kgdb brk
Jun 23, 2022
3e00c5f
objtool: arm64: Add unwind_hint support
Jun 23, 2022
a26fa03
arm64: Change symbol type annotations
Jun 23, 2022
6bcd8bf
arm64: Annotate unwind_hint for symbols with empty stack
Jun 23, 2022
afe5ce2
arm64: entry: Annotate unwind_hint for entry
Jun 23, 2022
141c857
arm64: kvm: Annotate unwind_hint for hyp entry
Jun 23, 2022
e412541
arm64: efi-header: Mark efi header as data
Jun 23, 2022
db665c0
arm64: head: Mark constants as data
Jun 23, 2022
425083b
arm64: crypto: Mark constant as data
Jun 23, 2022
8e67ddb
arm64: crypto: Remove unnecessary stackframe
Jun 23, 2022
3be9018
arm64: Set intra-function call annotations
Jun 23, 2022
3a81d6a
arm64: sleep: Properly set frame pointer before call
Jun 23, 2022
040dfcb
arm64: entry: Align stack size for alternative
Jun 23, 2022
21debd4
arm64: kernel: Skip validation of proton-pack.c
Jun 23, 2022
b0ddc68
arm64: kvm: vgic-v3-sr: Bug when trying to read invalid APRs
Oct 15, 2021
f9df961
arm64: Introduce stack trace reliability checks in the unwinder
madvenka786 May 26, 2021
8cc5804
erm64: Create a list of SYM_CODE functions, check return PC against list
madvenka786 May 26, 2021
65798ad
arm64: Implement arch_stack_walk_reliable()
madvenka786 Mar 15, 2021
68e9c20
arm64: Define HAVE_DYNAMIC_FTRACE_WITH_ARGS
madvenka786 Feb 2, 2023
edcc638
arm64: implement live patching
May 4, 2021
283e6bf
arm64: module: Use aarch64_insn_write when updating relocations later on
Nov 3, 2021
964654b
crypto: testmgr - disallow certain DRBG hash functions in FIPS mode
nefigtut Jan 17, 2023
4a4f468
crypto: testmgr - disallow plain cbcmac(aes) in FIPS mode
nicstange Dec 29, 2022
acc71d8
crypto: testmgr - disallow plain ghash in FIPS mode
nicstange Dec 29, 2022
4e0b83a
crypto: jitter - replace LFSR with SHA3-256
smuellerDD Apr 21, 2023
8ffc63e
crypto: testmgr - Remove xts4096(paes) and xts512(paes)
hailmo-amzn Jun 6, 2023
1e00762
crypto: ecdh - zeroize crpytographic keys after use
hailmo-amzn Jun 6, 2023
5b91402
Revert "drm: fb_helper: improve CONFIG_FB dependency"
sam-aws Apr 13, 2023
b6a11a9
random: Add hook to override device reads and getrandom(2)
Aug 10, 2021
4bc7040
crypto: rng - Override drivers/char/random in FIPS mode
Aug 10, 2021
05c6dd4
crypto: rsa - allow only odd e and restrict value in FIPS mode
mngyadam Jun 6, 2023
c5a2d38
crypto: Only allow GCM in FIPS when instantiated via seqiv
sam-aws Jun 9, 2023
5ef5752
crypto: tcrypt.c - Add selftest for ffdhe algorithims
hailmo-amzn Jun 17, 2023
3ab1990
net/ipv6: Improve performance of inet6_ehashfn()
stewartsmith Feb 15, 2023
cd9da36
random: allow reseeding DRBG with getrandom
ueno Aug 3, 2022
9755413
crypto: rng - Use a different crypto_rng for reseeding
Mar 3, 2023
fc001ed
crypto: dh - Add SP800-56A rev 3 Pair-wise Consistency check
mngyadam Jun 23, 2023
1b7ecd5
crypto: ecc - Add SP800-56A rev 3 Pair-wise Consistency check
mngyadam Jun 23, 2023
4262bc2
KEYS: use kfree_sensitive with key
mngyadam Jun 9, 2023
47238af
mm: add bdi_set_strict_limit() function
Nov 19, 2022
415d434
mm: add knob /sys/class/bdi/<bdi>/strict_limit
Nov 19, 2022
b504fb9
mm: document /sys/class/bdi/<bdi>/strict_limit knob
Nov 19, 2022
c8d557f
ip: Bump default ttl to 127.
q2ven Jul 27, 2023
2bf046f
Enable ptIOMMU for all supported platforms
Feb 9, 2023
bbd8c9b
KEYS: Make use of platform keyring for module signature verify
Apr 23, 2019
b625a02
scripts/sign_file: Add option to keep signing certificate
sam-aws Jul 12, 2023
d2cc6d5
AL2023 6.1 Update ena driver to 2.8.9g
davidarinzon Aug 8, 2023
493ef67
KVM: arm64: Discard any SVE state when entering KVM guests
broonie Nov 15, 2022
903c25d
arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE
broonie Nov 15, 2022
604a849
arm64/fpsimd: Have KVM explicitly say which FP registers to save
broonie Nov 15, 2022
898db9e
arm64/fpsimd: Stop using TIF_SVE to manage register saving in KVM
broonie Nov 15, 2022
317b87e
arm64/fpsimd: Load FP state based on recorded data type
broonie Nov 15, 2022
0cb2d6e
arm64/fpsimd: SME no longer requires SVE register state
broonie Nov 15, 2022
2418767
arm64/sve: Leave SVE enabled on syscall if we don't context switch
broonie Nov 15, 2022
ca35de2
KVM: arm64: Prevent the donation of no-map pages
Nov 10, 2022
aa54ec9
KVM: arm64: Prevent unconditional donation of unmapped regions from t…
willdeacon May 18, 2023
8b8f005
cgroup: add cgroup_favordynmods= command-line option
luizcap Sep 27, 2023
02472c6
selftests/bpf: add generic BPF program tester-loader
anakryiko Dec 7, 2022
a60edfd
selftests/bpf: convert dynptr_fail and map_kptr_fail subtests to gene…
anakryiko Dec 7, 2022
fdeee9e
selftests/bpf: convenience macro for use with 'asm volatile' blocks
eddyz87 Jan 21, 2023
324b2f4
selftests/bpf: Add dynptr pruning tests
kkdwivedi Jan 21, 2023
bd5606f
selftests/bpf: Add dynptr var_off tests
kkdwivedi Jan 21, 2023
40722d8
selftests/bpf: Add dynptr partial slot overwrite tests
kkdwivedi Jan 21, 2023
fcc1627
bpf: Refactor ARG_PTR_TO_DYNPTR checks into process_dynptr_func
kkdwivedi Dec 7, 2022
42819c7
bpf: Propagate errors from process_* checks in check_func_arg
kkdwivedi Dec 7, 2022
5800d65
bpf: Rework process_dynptr_func
kkdwivedi Dec 7, 2022
c591e00
bpf: Rework check_func_arg_reg_off
kkdwivedi Dec 7, 2022
5a6355b
bpf: Move PTR_TO_STACK alignment check to process_dynptr_func
kkdwivedi Dec 7, 2022
1c3c778
bpf: Use memmove for bpf_dynptr_{read,write}
kkdwivedi Dec 7, 2022
43927e0
bpf: Fix state pruning for STACK_DYNPTR stack slots
kkdwivedi Jan 21, 2023
3b06f57
bpf: Fix missing var_off check for ARG_PTR_TO_DYNPTR
kkdwivedi Jan 21, 2023
fa5e8de
bpf: Fix partial dynptr stack slot reads/writes
kkdwivedi Jan 21, 2023
b122496
Revert "perf/x86/amd/core: Fix overflow reset on hotplug"
shaoyingxu Oct 22, 2023
0c8e3a8
AL2023-6.1-Update-ena-driver-to-2.10.0g
davidarinzon Oct 31, 2023
fb4f98a
arm64: Add ID_DFR0_EL1.PerfMon values for PMUv3p7 and IMP_DEF
Nov 13, 2022
31bd10c
KVM: arm64: PMU: Move the ID_AA64DFR0_EL1.PMUver limit to VM creation
Nov 13, 2022
cfac5ef
KVM: arm64: PMU: Allow ID_AA64DFR0_EL1.PMUver to be set from userspace
Nov 13, 2022
40f034b
KVM: arm64: PMU: Allow ID_DFR0_EL1.PerfMon to be set from userspace
Nov 13, 2022
51633e1
KVM: arm64: Save ID registers' sanitized value per guest
jingzhangos Jun 2, 2023
3912c14
KVM: arm64: Use per guest ID register for ID_AA64PFR0_EL1.[CSV2|CSV3]
jingzhangos Jun 2, 2023
c0a30ac
KVM: arm64: Use per guest ID register for ID_AA64DFR0_EL1.PMUVer
jingzhangos Jun 2, 2023
cb058f1
KVM: arm64: Reuse fields of sys_reg_desc for idreg
jingzhangos Jun 2, 2023
eef70ad
KVM: arm64: Refactor writings for PMUVer/CSV2/CSV3
jingzhangos Jun 2, 2023
5895917
KVM: arm64: Update id_reg limit value based on per vcpu flags
Jun 2, 2023
4666819
KVM: arm64: Move non per vcpu flag checks out of kvm_arm_update_id_reg()
Jun 2, 2023
60e047b
KVM: arm64: Enable writable for ID_AA64DFR0_EL1
jingzhangos Jun 7, 2023
4811d5e
KVM: arm64: Enable writable for ID_DFR0_EL1
jingzhangos Jun 7, 2023
594c474
KVM: arm64: Enable writable for ID_AA64PFR0_EL1
jingzhangos Jun 7, 2023
b698528
KVM: arm64: Enable writable for ID_AA64MMFR{0, 1, 2}_EL1
jingzhangos Jun 7, 2023
2871374
KVM: arm64: Enable writable for ID_AA64ISAR0_EL0
Jun 22, 2023
8d9cb25
KVM: arm64: Enable writable for ID_AA64ISAR1_EL0
Jun 23, 2023
5bb6ca0
KVM: arm64: Enable writable for ID_AA64ISAR2_EL0
Jun 23, 2023
2c20ec4
Revert "objtool: Propagate early errors"
paniakin-aws Dec 13, 2023
7dec40e
AL2023 6.1 Compile ENA driver with PHC flag
davidarinzon Nov 28, 2023
7760460
AL2023 6.1 Update ENA driver to 2.11.0g
davidarinzon Nov 28, 2023
16f9218
arm64: pauth: don't sign leaf functions
Jan 31, 2023
ab50f51
AL2023-6.1-Update-ena-driver-to-2.11.1g
davidarinzon Feb 7, 2024
35fa0bf
AL2023 6.1 Update EFA driver to 2.8.0
mrgolin Feb 20, 2024
a089375
Config glue for 2.15 Lustre client
kuba-wolf Mar 9, 2024
7cb4273
Initial 2.15 Lustre client commit
kuba-wolf Mar 9, 2024
e35ba4e
AL2023-6.1-Update-ena-driver-to-2.12.0g
evgeny17387new Mar 19, 2024
23e21d0
x86/sev: Harden #VC instruction emulation somewhat
bp3tk0v Jan 5, 2024
da58fb7
firmware/psci: Add definitions for PSCI v1.3 specification (ALPHA)
dwmw2 Mar 18, 2024
3c9cd84
arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate
dwmw2 Mar 11, 2024
6a2c75e
ACPICA: Detect FACS even for hardware reduced platforms
dwmw2 Mar 11, 2024
d9a738c
arm64: acpi: Honour firmware_signature field of FACS, if it exists
dwmw2 Mar 11, 2024
948eabc
dma-contiguous: support per-numa CMA for all architectures
May 12, 2023
0e2a5ef
dma-contiguous: support numa CMA for specified node
Jul 12, 2023
c8e214c
arm64: mm: Don't remap pgtables per-cont(pte|pmd) block
Jun 5, 2024
967437e
arm64: mm: Batch dsb and isb when populating pgtables
Jun 5, 2024
a8a1624
cifs: use origin fullpath for automounts
pcacjr Dec 18, 2022
9d42a1f
dma: Automatically enable page touching on Caspian
dwmw2 Jul 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions Documentation/ABI/testing/sysfs-class-bdi
Original file line number Diff line number Diff line change
@@ -55,6 +55,17 @@ Description:
mount that is prone to get stuck, or a FUSE mount which cannot
be trusted to play fair.

(read-write)
What: /sys/class/bdi/<bdi>/strict_limit
Date: October 2022
Contact: Stefan Roesch <shr@devkernel.io>
Description:
Forces per-BDI checks for the share of given device in the write-back
cache even before the global background dirty limit is reached. This
is useful in situations where the global limit is much higher than
affordable for given relatively slow (or untrusted) device. Turning
strictlimit on has no visible effect if max_ratio is equal to 100%.

(read-write)
What: /sys/class/bdi/<bdi>/stable_pages_required
Date: January 2008
17 changes: 16 additions & 1 deletion Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
@@ -554,6 +554,10 @@
named mounts. Specifying both "all" and "named" disables
all v1 hierarchies.

cgroup_favordynmods= [KNL] Enable or Disable favordynmods.
Format: { "true" | "false" }
Defaults to the value of CONFIG_CGROUP_FAVOR_DYNMODS.

cgroup.memory= [KNL] Pass options to the cgroup memory controller.
Format: <string>
nosocket -- Disable socket memory accounting.
@@ -669,7 +673,7 @@
kernel/dma/contiguous.c

cma_pernuma=nn[MG]
[ARM64,KNL,CMA]
[KNL,CMA]
Sets the size of kernel per-numa memory area for
contiguous memory allocations. A value of 0 disables
per-numa CMA altogether. And If this option is not
@@ -679,6 +683,17 @@
which is located in node nid, if the allocation fails,
they will fallback to the global default memory area.

numa_cma=<node>:nn[MG][,<node>:nn[MG]]
[KNL,CMA]
Sets the size of kernel numa memory area for
contiguous memory allocations. It will reserve CMA
area for the specified node.

With numa CMA enabled, DMA users on node nid will
first try to allocate buffer from the numa area
which is located in node nid, if the allocation fails,
they will fallback to the global default memory area.

cmo_free_hint= [PPC] Format: { yes | no }
Specify whether pages are marked as being inactive
when they are freed. This is used in CMO environments
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
@@ -15577,6 +15577,13 @@ F: Documentation/mm/page_table_check.rst
F: include/linux/page_table_check.h
F: mm/page_table_check.c

PAGE TOUCHING DMA
M: James Gowans <jgowans@amazon.com>
L: ec2-memo@amazon.com
S: Supported
F: include/linux/dma-page-touching.h
F: kernel/dma/page_touching.c

PANASONIC LAPTOP ACPI EXTRAS DRIVER
M: Kenneth Chan <kenneth.t.chan@gmail.com>
L: platform-driver-x86@vger.kernel.org
24 changes: 24 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
@@ -180,8 +180,10 @@ config ARM64
select HAVE_DEBUG_KMEMLEAK
select HAVE_DMA_CONTIGUOUS
select HAVE_DYNAMIC_FTRACE
select HAVE_DYNAMIC_FTRACE_WITH_ARGS
select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \
if DYNAMIC_FTRACE_WITH_REGS
select HAVE_RELIABLE_STACKTRACE
select HAVE_EFFICIENT_UNALIGNED_ACCESS
select HAVE_FAST_GUP
select HAVE_FTRACE_MCOUNT_RECORD
@@ -193,6 +195,7 @@ config ARM64
select HAVE_IOREMAP_PROT
select HAVE_IRQ_TIME_ACCOUNTING
select HAVE_KVM
select HAVE_LIVEPATCH
select HAVE_NMI
select HAVE_PERF_EVENTS
select HAVE_PERF_REGS
@@ -204,6 +207,8 @@ config ARM64
select MMU_GATHER_RCU_TABLE_FREE
select HAVE_RSEQ
select HAVE_STACKPROTECTOR
select HAVE_OBJTOOL
select HAVE_STACK_VALIDATION
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_KPROBES
select HAVE_KRETPROBES
@@ -328,6 +333,24 @@ config GENERIC_CALIBRATE_DELAY
config ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
def_bool y

config ARCH_MEMORY_PROBE
bool "Enable /sys/devices/system/memory/probe interface"
depends on MEMORY_HOTPLUG
help
This option enables a sysfs /sys/devices/system/memory/probe
interface for testing. See Documentation/memory-hotplug.txt
for more information. If you are unsure how to answer this
question, answer N.

config ARCH_MEMORY_REMOVE
bool "Enable /sys/devices/system/memory/remove interface"
depends on MEMORY_HOTREMOVE
help
This option enables a sysfs /sys/devices/system/memory/remove
interface for testing. See Documentation/memory-hotplug.txt
for more information. If you are unsure how to answer this
question, answer N.

config SMP
def_bool y

@@ -2304,3 +2327,4 @@ source "drivers/acpi/Kconfig"

source "arch/arm64/kvm/Kconfig"

source "kernel/livepatch/Kconfig"
21 changes: 21 additions & 0 deletions arch/arm64/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -20,4 +20,25 @@ config ARM64_RELOC_TEST
depends on m
tristate "Relocation testing module"

choice
prompt "Choose kernel unwinder"
default UNWINDER_FRAME_POINTER
help
This determines which method will be used for unwinding kernel stack
traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
livepatch, lockdep, and more.

config UNWINDER_FRAME_POINTER
bool "Frame pointer unwinder"
select FRAME_POINTER
help
This option enables the frame pointer unwinder for unwinding kernel
stack traces.

The unwinder itself is fast and it uses less RAM than the ORC
unwinder, but the kernel text size will grow by ~3% and the kernel's
overall performance will degrade by roughly 5-10%.

endchoice

source "drivers/hwtracing/coresight/Kconfig"
27 changes: 14 additions & 13 deletions arch/arm64/Makefile
Original file line number Diff line number Diff line change
@@ -63,20 +63,19 @@ ifeq ($(CONFIG_AS_HAS_ARMV8_2), y)
asm-arch := armv8.2-a
endif

# Ensure that if the compiler supports branch protection we default it
# off, this will be overridden if we are using branch protection.
branch-prot-flags-y += $(call cc-option,-mbranch-protection=none)

ifeq ($(CONFIG_ARM64_PTR_AUTH_KERNEL),y)
branch-prot-flags-$(CONFIG_CC_HAS_SIGN_RETURN_ADDRESS) := -msign-return-address=all
# We enable additional protection for leaf functions as there is some
# narrow potential for ROP protection benefits and no substantial
# performance impact has been observed.
ifeq ($(CONFIG_ARM64_BTI_KERNEL),y)
branch-prot-flags-$(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI) := -mbranch-protection=pac-ret+leaf+bti
KBUILD_CFLAGS += -mbranch-protection=pac-ret+bti
else ifeq ($(CONFIG_ARM64_PTR_AUTH_KERNEL),y)
ifeq ($(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET),y)
KBUILD_CFLAGS += -mbranch-protection=pac-ret
else
KBUILD_CFLAGS += -msign-return-address=non-leaf
endif
else
branch-prot-flags-$(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET) := -mbranch-protection=pac-ret+leaf
KBUILD_CFLAGS += $(call cc-option,-mbranch-protection=none)
endif

ifeq ($(CONFIG_ARM64_PTR_AUTH_KERNEL),y)
# -march=armv8.3-a enables the non-nops instructions for PAC, to avoid the
# compiler to generate them and consequently to break the single image contract
# we pass it only to the assembler. This option is utilized only in case of non
@@ -86,8 +85,6 @@ asm-arch := armv8.3-a
endif
endif

KBUILD_CFLAGS += $(branch-prot-flags-y)

ifeq ($(CONFIG_AS_HAS_ARMV8_4), y)
# make sure to pass the newest target architecture to -march.
asm-arch := armv8.4-a
@@ -133,6 +130,10 @@ ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y)
CC_FLAGS_FTRACE := -fpatchable-function-entry=2
endif

ifeq ($(CONFIG_STACK_VALIDATION),y)
KBUILD_CFLAGS += -fno-jump-tables
endif

ifeq ($(CONFIG_KASAN_SW_TAGS), y)
KASAN_SHADOW_SCALE_SHIFT := 4
else ifeq ($(CONFIG_KASAN_GENERIC), y)
14 changes: 7 additions & 7 deletions arch/arm64/crypto/aes-neonbs-core.S
Original file line number Diff line number Diff line change
@@ -368,15 +368,15 @@


.align 6
M0: .octa 0x0004080c0105090d02060a0e03070b0f
SYM_DATA_LOCAL(M0, .octa 0x0004080c0105090d02060a0e03070b0f)

M0SR: .octa 0x0004080c05090d010a0e02060f03070b
SR: .octa 0x0f0e0d0c0a09080b0504070600030201
SRM0: .octa 0x01060b0c0207080d0304090e00050a0f
SYM_DATA_LOCAL(M0SR, .octa 0x0004080c05090d010a0e02060f03070b)
SYM_DATA_LOCAL(SR, .octa 0x0f0e0d0c0a09080b0504070600030201)
SYM_DATA_LOCAL(SRM0, .octa 0x01060b0c0207080d0304090e00050a0f)

M0ISR: .octa 0x0004080c0d0105090a0e0206070b0f03
ISR: .octa 0x0f0e0d0c080b0a090504070602010003
ISRM0: .octa 0x0306090c00070a0d01040b0e0205080f
SYM_DATA_LOCAL(M0ISR, .octa 0x0004080c0d0105090a0e0206070b0f03)
SYM_DATA_LOCAL(ISR, .octa 0x0f0e0d0c080b0a090504070602010003)
SYM_DATA_LOCAL(ISRM0, .octa 0x0306090c00070a0d01040b0e0205080f)

/*
* void aesbs_convert_key(u8 out[], u32 const rk[], int rounds)
5 changes: 5 additions & 0 deletions arch/arm64/crypto/crct10dif-ce-core.S
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@
//

#include <linux/linkage.h>
#include <linux/objtool.h>
#include <asm/assembler.h>

.text
@@ -132,6 +133,8 @@
.endm

SYM_FUNC_START_LOCAL(__pmull_p8_core)
stp x29, x30, [sp, #-16]!
mov x29, sp
.L__pmull_p8_core:
ext t4.8b, ad.8b, ad.8b, #1 // A1
ext t5.8b, ad.8b, ad.8b, #2 // A2
@@ -193,6 +196,7 @@ SYM_FUNC_START_LOCAL(__pmull_p8_core)

eor t4.16b, t4.16b, t5.16b
eor t6.16b, t6.16b, t3.16b
ldp x29, x30, [sp], #16
ret
SYM_FUNC_END(__pmull_p8_core)

@@ -207,6 +211,7 @@ SYM_FUNC_END(__pmull_p8_core)
pmull2 \rq\().8h, \ad\().16b, \bd\().16b // D = A*B
.endif

ANNOTATE_INTRA_FUNCTION_CALL
bl .L__pmull_p8_core\i

eor \rq\().16b, \rq\().16b, t4.16b
4 changes: 4 additions & 0 deletions arch/arm64/crypto/poly1305-armv8.pl
Original file line number Diff line number Diff line change
@@ -47,6 +47,8 @@
my ($h0,$h1,$h2,$r0,$r1,$s1,$t0,$t1,$d0,$d1,$d2) = map("x$_",(4..14));

$code.=<<___;
#include <linux/linkage.h>

#ifndef __KERNEL__
# include "arm_arch.h"
.extern OPENSSL_armcap_P
@@ -888,8 +890,10 @@
.align 5
.Lzeros:
.long 0,0,0,0,0,0,0,0
SYM_DATA_START_LOCAL(POLY1305_str)
.asciz "Poly1305 for ARMv8, CRYPTOGAMS by \@dot-asm"
.align 2
SYM_DATA_END(POLY1305_str)
#if !defined(__KERNEL__) && !defined(_WIN64)
.comm OPENSSL_armcap_P,4,4
.hidden OPENSSL_armcap_P
29 changes: 15 additions & 14 deletions arch/arm64/crypto/sha512-armv8.pl
Original file line number Diff line number Diff line change
@@ -193,6 +193,8 @@ sub BODY_00_xx {
}

$code.=<<___;
#include <linux/linkage.h>

#ifndef __KERNEL__
# include "arm_arch.h"
#endif
@@ -208,11 +210,11 @@ sub BODY_00_xx {
$code.=<<___ if ($SZ==4);
#ifndef __KERNEL__
# ifdef __ILP32__
ldrsw x16,.LOPENSSL_armcap_P
ldrsw x16,OPENSSL_armcap_P_rel
# else
ldr x16,.LOPENSSL_armcap_P
ldr x16,OPENSSL_armcap_P_rel
# endif
adr x17,.LOPENSSL_armcap_P
adr x17,OPENSSL_armcap_P_rel
add x16,x16,x17
ldr w16,[x16]
tst w16,#ARMV8_SHA256
@@ -237,7 +239,7 @@ sub BODY_00_xx {
ldp $E,$F,[$ctx,#4*$SZ]
add $num,$inp,$num,lsl#`log(16*$SZ)/log(2)` // end of input
ldp $G,$H,[$ctx,#6*$SZ]
adr $Ktbl,.LK$BITS
adr $Ktbl,K$BITS
stp $ctx,$num,[x29,#96]

.Loop:
@@ -287,8 +289,7 @@ sub BODY_00_xx {
.size $func,.-$func

.align 6
.type .LK$BITS,%object
.LK$BITS:
SYM_DATA_START_LOCAL(K$BITS)
___
$code.=<<___ if ($SZ==8);
.quad 0x428a2f98d728ae22,0x7137449123ef65cd
@@ -353,18 +354,21 @@ sub BODY_00_xx {
.long 0 //terminator
___
$code.=<<___;
.size .LK$BITS,.-.LK$BITS
SYM_DATA_END(K$BITS)
#ifndef __KERNEL__
.align 3
.LOPENSSL_armcap_P:
SYM_DATA_START_LOCAL(OPENSSL_armcap_P_rel)
# ifdef __ILP32__
.long OPENSSL_armcap_P-.
# else
.quad OPENSSL_armcap_P-.
# endif
SYM_DATA_END(OPENSSL_armcap_P_rel)
#endif
SYM_DATA_START_LOCAL(OPENSSL_str)
.asciz "SHA$BITS block transform for ARMv8, CRYPTOGAMS by <appro\@openssl.org>"
.align 2
SYM_DATA_END(OPENSSL_str)
___

if ($SZ==4) {
@@ -385,7 +389,7 @@ sub BODY_00_xx {
add x29,sp,#0

ld1.32 {$ABCD,$EFGH},[$ctx]
adr $Ktbl,.LK256
adr $Ktbl,K256

.Loop_hw:
ld1 {@MSG[0]-@MSG[3]},[$inp],#64
@@ -644,11 +648,9 @@ ()
.align 4
sha256_block_neon:
.Lneon_entry:
stp x29, x30, [sp, #-16]!
mov x29, sp
sub sp,sp,#16*4

adr $Ktbl,.LK256
adr $Ktbl,K256
add $num,$inp,$num,lsl#6 // len to point at the end of inp

ld1.8 {@X[0]},[$inp], #16
@@ -732,8 +734,7 @@ ()
mov $Xfer,sp
b.ne .L_00_48

ldr x29,[x29]
add sp,sp,#16*4+16
add sp,sp,#16*4
ret
.size sha256_block_neon,.-sha256_block_neon
___
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/alternative-macros.h
Original file line number Diff line number Diff line change
@@ -230,7 +230,7 @@ alternative_has_feature_likely(unsigned long feature)
"feature must be < ARM64_NCAPS");

asm goto(
ALTERNATIVE_CB("b %l[l_no]", %[feature], alt_cb_patch_nops)
ALTERNATIVE("b %l[l_no]", "nop", %[feature])
:
: [feature] "i" (feature)
:
Loading