x86/retbleed: Call depth tracking mitigation
Subsystems (21)
Peter Zijlstra
maintainerv3 cover x86/retbleed: Call depth tracking mitigation
Hi!
Previous postings:
v2: https://lkml.kernel.org/r/[email protected]
v1: https://lkml.kernel.org/r/[email protected]
Changes since v2 are minimal; I reworked the alignment thing per Linus' request (patch #8) and collected a few tags.
Barring great objections I'm hoping to merge this soon so we can all get on with other things.
--- text from v2 ---
This version is significantly different from the last in that it no longer makes use of external call thunks allocated from the module space. Instead every function gets aligned to 16 bytes and gets 16 bytes of (pre-symbol) padding. (This padding will also come in handy for other things, like the kCFI/FineIBT work.)
Prior to these patches function alignment is basically non-existent, as such any instruction fetch for the first instructions of a function will have (on average) half the fetch window filled with whatever comes before. By pushing the alignment up to 16 bytes this improves matters for chips that happen to have a 16 byte i-fetch window size (Intel) while not making matters worse for chips that have a larger 32 byte i-fetch window (AMD Zen). In fact, it improves the worst case for Zen from 31 bytes of garbage to 16 bytes of garbage.
As such the first many patches of the series fix up lots of alignment quirks.
The second big difference is the introduction of struct pcpu_hot. Because the compiler managed to place two adjacent (in code) DEFINE_PER_CPU() variables in random cachelines (it is absolutely free to do so) the introduction of the per-cpu x86_call_depth variable sometimes introduced significant additional cache pressure, while other times it would sit nicely in the same line with preempt_count and not show up at all.
In order to alleviate this problem; introduce struct pcpu_hot and collect a number of hot per-cpu variables in a way the compiler can't mess up.
Since these changes are 'unconditional', Mel was gracious enough to help test this on his test setup across all the relevant uarchs (very much including both Intel and AMD machines) and found that while these changes cause some very small wins and losses across the board it is mostly noise.
Aside from these changes; the core of the depth tracking is still the same.
- objtool creates a list of functions and a list of function call sites.
- for every function the padding is overwritten with the call accounting thunk; for every call site the call target is adjusted to point to this thunk.
- the retbleed return thunk mechanism is used for a custom return thunk that includes return accounting and does RSB stuffing when required.
This ensures no new compiler is required and avoids almost all overhead for non affected machines. This new option can still be selected using:
"retbleed=stuff"
on the kernel command line.
As a refresher; the theory behind call depth tracking is:
The Return-Stack-Buffer (RSB) is a 16 deep stack that is filled on every call. On the return path speculation will "pop" an entry and takes that as the return target. Once the RSB is empty, the CPU falls back to other predictors, e.g. the Branch History Buffer, which can be mistrained by user space and misguides the (return) speculation path to a disclosure gadget of your choice -- as described in the retbleed paper.
Call depth tracking is designed to break this speculation path by stuffing speculation trap calls into the RSB whenver the RSB is running low. This way the speculation stalls and never falls back to other predictors.
The assumption is that stuffing at the 12th return is sufficient to break the speculation before it hits the underflow and the fallback to the other predictors. Testing confirms that it works. Johannes, one of the retbleed researchers, tried to attack this approach and confirmed that it brings the signal to noise ratio down to the crystal ball level.
Excerpts from IBRS vs stuff from Mel's testing:
perfsyscall
6.0.0-rc1 6.0.0-rc1
tglx-mit-spectre-ibrs tglx-mit-spectre-retpoline-retstuff
Duration User 136.16 69.10
Duration System 100.50 33.04
Duration Elapsed 237.20 102.65That's a massive improvement with a major reduction in system CPU usage.
Kernel compilation is variable. Skylake-X was modest with 2-18% gain depending on degree of parallelisation.
Git checkouts are roughly 14% faster on Skylake-X
Network test were localhost only so are limited but even so, the gain is large. Skylake-X again;
Netperf-TCP
6.0.0-rc1 6.0.0-rc1
tglx-mit-spectre-ibrs tglx-mit-spectre-retpoline-retstuff
Hmean send-64 241.39 ( 0.00%) 298.00 * 23.45%*
Hmean send-128 489.55 ( 0.00%) 610.46 * 24.70%*
Hmean send-256 990.85 ( 0.00%) 1201.73 * 21.28%*
Hmean send-1024 4051.84 ( 0.00%) 5006.19 * 23.55%*
Hmean send-2048 7924.75 ( 0.00%) 9777.14 * 23.37%*
Hmean send-3312 12319.98 ( 0.00%) 15210.07 * 23.46%*
Hmean send-4096 14770.62 ( 0.00%) 17941.32 * 21.47%*
Hmean send-8192 26302.00 ( 0.00%) 30170.04 * 14.71%*
Hmean send-16384 42449.51 ( 0.00%) 48036.45 * 13.16%*While this is UDP_STREAM, TCP_STREAM is similarly impressive.
FIO measurements done by Tim Chen:
read (kIOPs) Mean stdev mitigations=off retbleed=off CPU util
================================================================================
mitigations=off 357.33 3.79 0.00% 6.14% 98.93% retbleed=off 336.67 6.43 -5.78% 0.00% 99.01% retbleed=ibrs 242.00 0.00 -32.28% -28.12% 99.41% retbleed=stuff (pad) 314.33 1.53 -12.03% -6.63% 99.31%
read/write Baseline Baseline
70/30 (kIOPs) Mean stdev mitigations=off retbleed=off CPU util
================================================================================
mitigations=off 349.00 5.29 0.00% 9.06% 96.66% retbleed=off 320.00 5.05 -8.31% 0.00% 95.54% retbleed=ibrs 238.60 0.17 -31.63% -25.44% 98.18% retbleed=stuff (pad) 293.37 0.81 -15.94% -8.32% 97.71%
Baseline Baseline
write (kIOPs) Mean stdev mitigations=off retbleed=off CPU util
================================================================================
mitigations=off 296.33 8.08 0.00% 6.21% 93.96% retbleed=off 279.00 2.65 -5.85% 0.00% 93.63% retbleed=ibrs 230.33 0.58 -22.27% -17.44% 95.92% retbleed=stuff (pad) 266.67 1.53 -10.01% -4.42% 94.75%
---
The patches can also be found in git here:
git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git call-depth-tracking
Peter Zijlstra
maintainerPATCH v3 1/59 x86/paravirt: Ensure proper alignment
From: Thomas Gleixner <[email protected]>
The entries in the .parainstr sections are 8 byte aligned and the corresponding C struct makes the array offset 16 bytes.
Though the pushed entries are only using 12 bytes. .parainstr_end is therefore 4 bytes short.
That works by chance because it's only used in a loop:
for (p = start; p < end; p++)
But this falls flat when calculating the number of elements:
n = end - start
That's obviously off by one.
Ensure that the gap is filled and the last entry is occupying 16 bytes.
--- arch/x86/include/asm/paravirt.h | 1 + arch/x86/include/asm/paravirt_types.h | 1 + 2 files changed, 2 insertions(+)
arch/x86/include/asm/paravirt.h +1 -0
@@ -743,6 +743,7 @@ extern void default_banner(void); word 771b; \ .byte ptype; \ .byte 772b-771b; \ + _ASM_ALIGN; \ .popsection
arch/x86/include/asm/paravirt_types.h +1 -0
@@ -294,6 +294,7 @@ extern struct paravirt_patch_template pv" .byte " type"\n" \" .byte 772b-771b\n" \" .short " clobber"\n" \ + _ASM_ALIGN"\n" \".popsection\n" /* Generate patchable code, with the default asm parameters. */
[tip: x86/paravirt] x86/paravirt: Ensure proper alignment
The following commit has been merged into the x86/paravirt branch of tip:
The following commit has been merged into the x86/paravirt branch of tip:
Commit-ID: f92ff8f5dca2acfa475842c71212657b0703c3be Gitweb: https://git.kernel.org/tip/f92ff8f5dca2acfa475842c71212657b0703c3be Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:40 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Wed, 21 Sep 2022 12:30:16 +02:00
x86/paravirt: Ensure proper alignment
The entries in the .parainstructions sections are 8 byte aligned and the corresponding C struct paravirt_patch_site makes the array offset 16 bytes.
Though the pushed entries are only using 12 bytes, __parainstructions_end is therefore 4 bytes short.
That works by chance because it's only used in a loop:
for (p = start; p < end; p++)
But this falls flat when calculating the number of elements:
n = end - start
That's obviously off by one.
Ensure that the gap is filled and the last entry is occupying 16 bytes.
[ bp: Add the proper struct and section names. ]
--- arch/x86/include/asm/paravirt.h | 1 + arch/x86/include/asm/paravirt_types.h | 1 + 2 files changed, 2 insertions(+)
arch/x86/include/asm/paravirt.h +1 -0
@@ -743,6 +743,7 @@ extern void default_banner(void); word 771b; \ .byte ptype; \ .byte 772b-771b; \ + _ASM_ALIGN; \ .popsection
arch/x86/include/asm/paravirt_types.h +1 -0
@@ -294,6 +294,7 @@ extern struct paravirt_patch_template pv_ops;" .byte " type"\n" \" .byte 772b-771b\n" \" .short " clobber"\n" \ + _ASM_ALIGN"\n" \".popsection\n" /* Generate patchable code, with the default asm parameters. */
Peter Zijlstra
maintainerPATCH v3 2/59 x86/cpu: Remove segment load from switch_to_new_gdt()
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
On 32bit FS and on 64bit GS segments are already set up correctly, but load_percpu_segment() still sets [FG]S after switching from the early GDT to the direct GDT.
For 32bit the segment load has no side effects, but on 64bit it causes GSBASE to become 0, which means that any per CPU access before GSBASE is set to the new value is going to fault. That's the reason why the whole file containing this code has stackprotector removed.
But that's a pointless exercise for both 32 and 64 bit as the relevant segment selector is already correct. Loading the new GDT does not change that.
Remove the segment loads and add comments.
--- arch/x86/include/asm/processor.h | 1 arch/x86/kernel/cpu/common.c | 47 +++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 17 deletions(-)
arch/x86/include/asm/processor.h +0 -1
@@ -673,7 +673,6 @@ extern struct desc_ptr early_gdt_descr;extern void switch_to_new_gdt (int );extern void load_direct_gdt (int );extern void load_fixmap_gdt (int ); -extern void load_percpu_segment (int );extern void cpu_init (void );extern void cpu_init_secondary (void );extern void cpu_init_exception_handling (void );
arch/x86/kernel/cpu/common.c +31 -16
63 lines not on this page · raw message
[tip: x86/core] x86/cpu: Remove segment load from switch_to_new_gdt()
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: b5636d45aae42aa345b4c7918bdef245ed63da68 Gitweb: https://git.kernel.org/tip/b5636d45aae42aa345b4c7918bdef245ed63da68 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:41 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:56 +02:00
x86/cpu: Remove segment load from switch_to_new_gdt()
On 32bit FS and on 64bit GS segments are already set up correctly, but load_percpu_segment() still sets [FG]S after switching from the early GDT to the direct GDT.
For 32bit the segment load has no side effects, but on 64bit it causes GSBASE to become 0, which means that any per CPU access before GSBASE is set to the new value is going to fault. That's the reason why the whole file containing this code has stackprotector removed.
But that's a pointless exercise for both 32 and 64 bit as the relevant segment selector is already correct. Loading the new GDT does not change that.
Remove the segment loads and add comments.
--- arch/x86/include/asm/processor.h | 1 +- arch/x86/kernel/cpu/common.c | 47 ++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 17 deletions(-)
arch/x86/include/asm/processor.h +0 -1
@@ -670,7 +670,6 @@ extern struct desc_ptr early_gdt_descr;extern void switch_to_new_gdt (int );extern void load_direct_gdt (int );extern void load_fixmap_gdt (int ); -extern void load_percpu_segment (int );extern void cpu_init (void );extern void cpu_init_secondary (void );extern void cpu_init_exception_handling (void );
arch/x86/kernel/cpu/common.c +31 -16
63 lines not on this page · raw message
Peter Zijlstra
maintainerPATCH v3 3/59 x86/cpu: Get rid of redundant switch_to_new_gdt() invocations
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
The only place where switch_to_new_gdt() is required is early boot to switch from the early GDT to the direct GDT. Any other invocation is completely redundant because it does not change anything.
Secondary CPUs come out of the ASM code with GDT and GSBASE correctly set up. The same is true for XEN_PV.
Remove all the voodoo invocations which are left overs from the ancient past, rename the function to switch_gdt_and_percpu_base() and mark it init.
--- arch/x86/include/asm/processor.h | 2 +- arch/x86/kernel/cpu/common.c | 17 ++++++----------- arch/x86/kernel/setup_percpu.c | 2 +- arch/x86/kernel/smpboot.c | 6 +++++- arch/x86/xen/enlighten_pv.c | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-)
arch/x86/include/asm/processor.h +1 -1
@@ -670,7 +670,7 @@ extern int sysenter_setup(void);/* Defined in head.S */ extern struct desc_ptr early_gdt_descr; -extern void switch_to_new_gdt (int ); +extern void switch_gdt_and_percpu_base (int );extern void load_direct_gdt (int );extern void load_fixmap_gdt (int );extern void cpu_init (void );
arch/x86/kernel/cpu/common.c +6 -11
@@ -729,14 +729,15 @@ void load_fixmap_gdt(int cpu)EXPORT_SYMBOL_GPL (load_fixmap_gdt);/** -* switch_to_new_gdt - Switch form early GDT to the direct one +* switch_gdt_and_percpu_base - Switch to direct GDT and runtime per CPU base * @cpu: The CPU number for which this is invoked * -* Invoked during early boot to switch from early GDT and early per CPU -* (%fs on 32bit, GS_BASE on 64bit) to the direct GDT and the runtime per -* CPU area. +* Invoked during early boot to switch from early GDT and early per CPU to +* the direct GDT and the runtime per CPU area. On 32-bit the percpu base +* switch is implicit by loading the direct GDT. On 64bit this requires +* to update GSBASE. */ -void switch_to_new_gdt (int cpu) +void __init switch_gdt_and_percpu_base (int cpu) {load_direct_gdt (cpu);
@@ -2251,12 +2252,6 @@ void cpu_init(void) boot_cpu_has(X86_FEATURE_TSC) || boot_cpu_has(X86_FEATURE_DE))cr4_clear_bits (X86_CR4_VME |X86_CR4_PVI |X86_CR4_TSD |X86_CR4_DE ); -/* -* Initialize the per-CPU GDT with the boot GDT, -* and set up the GDT descriptor: -*/ -switch_to_new_gdt (cpu); -if (IS_ENABLED (CONFIG_X86_64 )) {loadsegment (fs,0 );memset (cur->thread.tls_array,0 ,GDT_ENTRY_TLS_ENTRIES *8 );
arch/x86/kernel/setup_percpu.c +1 -1
@@ -211,7 +211,7 @@ void __init setup_per_cpu_areas(void)* area. Reload any changed state for the boot CPU. */ if (!cpu) -switch_to_new_gdt (cpu); +switch_gdt_and_percpu_base (cpu); }/* indicate the early static arrays will soon be gone */
arch/x86/kernel/smpboot.c +5 -1
@@ -1453,7 +1453,11 @@ void arch_thaw_secondary_cpus_end(void)void __init native_smp_prepare_boot_cpu (void ) {int me =smp_processor_id (); -switch_to_new_gdt (me); + +/* SMP handles this from setup_per_cpu_areas() */ +if (!IS_ENABLED (CONFIG_SMP )) +switch_gdt_and_percpu_base (me); +/* already set me in cpu_online_mask in boot_cpu_init() */ cpumask_set_cpu (me, cpu_callout_mask);cpu_set_state_online (me);
arch/x86/xen/enlighten_pv.c +1 -1
@@ -1167,7 +1167,7 @@ static void __init xen_setup_gdt(int cpu pv_ops.cpu.write_gdt_entry = xen_write_gdt_entry_boot; pv_ops.cpu.load_gdt = xen_load_gdt_boot; -switch_to_new_gdt (cpu); +switch_gdt_and_percpu_base (cpu); pv_ops.cpu.write_gdt_entry = xen_write_gdt_entry; pv_ops.cpu.load_gdt = xen_load_gdt;
[tip: x86/core] x86/cpu: Get rid of redundant switch_to_new_gdt() invocations
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 1f19e2d50baf6515991844eaa8a84a0b0037da70 Gitweb: https://git.kernel.org/tip/1f19e2d50baf6515991844eaa8a84a0b0037da70 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:42 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:56 +02:00
x86/cpu: Get rid of redundant switch_to_new_gdt() invocations
The only place where switch_to_new_gdt() is required is early boot to switch from the early GDT to the direct GDT. Any other invocation is completely redundant because it does not change anything.
Secondary CPUs come out of the ASM code with GDT and GSBASE correctly set up. The same is true for XEN_PV.
Remove all the voodoo invocations which are left overs from the ancient past, rename the function to switch_gdt_and_percpu_base() and mark it init.
--- arch/x86/include/asm/processor.h | 2 +- arch/x86/kernel/cpu/common.c | 17 ++++++----------- arch/x86/kernel/setup_percpu.c | 2 +- arch/x86/kernel/smpboot.c | 6 +++++- arch/x86/xen/enlighten_pv.c | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-)
arch/x86/include/asm/processor.h +1 -1
@@ -667,7 +667,7 @@ extern int sysenter_setup(void);/* Defined in head.S */ extern struct desc_ptr early_gdt_descr; -extern void switch_to_new_gdt (int ); +extern void switch_gdt_and_percpu_base (int );extern void load_direct_gdt (int );extern void load_fixmap_gdt (int );extern void cpu_init (void );
arch/x86/kernel/cpu/common.c +6 -11
@@ -729,14 +729,15 @@ void load_fixmap_gdt(int cpu)EXPORT_SYMBOL_GPL (load_fixmap_gdt);/** -* switch_to_new_gdt - Switch form early GDT to the direct one +* switch_gdt_and_percpu_base - Switch to direct GDT and runtime per CPU base * @cpu: The CPU number for which this is invoked * -* Invoked during early boot to switch from early GDT and early per CPU -* (%fs on 32bit, GS_BASE on 64bit) to the direct GDT and the runtime per -* CPU area. +* Invoked during early boot to switch from early GDT and early per CPU to +* the direct GDT and the runtime per CPU area. On 32-bit the percpu base +* switch is implicit by loading the direct GDT. On 64bit this requires +* to update GSBASE. */ -void switch_to_new_gdt (int cpu) +void __init switch_gdt_and_percpu_base (int cpu) {load_direct_gdt (cpu);
@@ -2263,12 +2264,6 @@ void cpu_init(void) boot_cpu_has(X86_FEATURE_TSC) || boot_cpu_has(X86_FEATURE_DE))cr4_clear_bits (X86_CR4_VME |X86_CR4_PVI |X86_CR4_TSD |X86_CR4_DE ); -/* -* Initialize the per-CPU GDT with the boot GDT, -* and set up the GDT descriptor: -*/ -switch_to_new_gdt (cpu); -if (IS_ENABLED (CONFIG_X86_64 )) {loadsegment (fs,0 );memset (cur->thread.tls_array,0 ,GDT_ENTRY_TLS_ENTRIES *8 );
arch/x86/kernel/setup_percpu.c +1 -1
@@ -211,7 +211,7 @@ void __init setup_per_cpu_areas(void)* area. Reload any changed state for the boot CPU. */ if (!cpu) -switch_to_new_gdt (cpu); +switch_gdt_and_percpu_base (cpu); }/* indicate the early static arrays will soon be gone */
arch/x86/kernel/smpboot.c +5 -1
@@ -1453,7 +1453,11 @@ void arch_thaw_secondary_cpus_end(void)void __init native_smp_prepare_boot_cpu (void ) {int me =smp_processor_id (); -switch_to_new_gdt (me); + +/* SMP handles this from setup_per_cpu_areas() */ +if (!IS_ENABLED (CONFIG_SMP )) +switch_gdt_and_percpu_base (me); +/* already set me in cpu_online_mask in boot_cpu_init() */ cpumask_set_cpu (me, cpu_callout_mask);cpu_set_state_online (me);
arch/x86/xen/enlighten_pv.c +1 -1
@@ -1209,7 +1209,7 @@ static void __init xen_setup_gdt(int cpu) pv_ops.cpu.write_gdt_entry = xen_write_gdt_entry_boot; pv_ops.cpu.load_gdt = xen_load_gdt_boot; -switch_to_new_gdt (cpu); +switch_gdt_and_percpu_base (cpu); pv_ops.cpu.write_gdt_entry = xen_write_gdt_entry; pv_ops.cpu.load_gdt = xen_load_gdt;
Peter Zijlstra
maintainerPATCH v3 4/59 x86/cpu: Re-enable stackprotector
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Commit 5416c2663517 ("x86: make sure load_percpu_segment has no stackprotector") disabled the stackprotector for cpu/common.c because of load_percpu_segment(). Back then the boot stack canary was initialized very early in start_kernel(). Switching the per CPU area by loading the GDT caused the stackprotector to fail with paravirt enabled kernels as the GSBASE was not updated yet. In hindsight a wrong change because it would have been sufficient to ensure that the canary is the same in both per CPU areas.
Commit d55535232c3d ("random: move rand_initialize() earlier") moved the stack canary initialization to a later point in the init sequence. As a consequence the per CPU stack canary is 0 when switching the per CPU areas, so there is no requirement anymore to exclude this file.
Add a comment to load_percpu_segment().
--- arch/x86/kernel/cpu/Makefile | 3 --- arch/x86/kernel/cpu/common.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/Makefile +0 -3
@@ -16,9 +16,6 @@ KCOV_INSTRUMENT_perf_event.o := n # As above, instrumenting secondary CPU boot code causes boot hangs. KCSAN_SANITIZE_common.o := n -# Make sure load_percpu_segment has no stackprotector -CFLAGS_common.o := -fno-stack-protector - obj-y := cacheinfo.o scattered.o topology.o obj-y += common.o obj-y += rdrand.o
arch/x86/kernel/cpu/common.c +3 -0
@@ -752,6 +752,9 @@ void __init switch_gdt_and_percpu_base(i* early mapping is still valid. That means the GSBASE update will * lose any prior per CPU data which was not copied over in * setup_per_cpu_areas(). +* +* This works even with stackprotector enabled because the +* per CPU stack canary is 0 in both per CPU areas. */ wrmsrl (MSR_GS_BASE ,cpu_kernelmode_gs_base (cpu));#else
[tip: x86/core] x86/cpu: Re-enable stackprotector
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 2cb15faaedeb67f52f2ddc32b5ca152acfc422c2 Gitweb: https://git.kernel.org/tip/2cb15faaedeb67f52f2ddc32b5ca152acfc422c2 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:43 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:56 +02:00
x86/cpu: Re-enable stackprotector
Commit 5416c2663517 ("x86: make sure load_percpu_segment has no stackprotector") disabled the stackprotector for cpu/common.c because of load_percpu_segment(). Back then the boot stack canary was initialized very early in start_kernel(). Switching the per CPU area by loading the GDT caused the stackprotector to fail with paravirt enabled kernels as the GSBASE was not updated yet. In hindsight a wrong change because it would have been sufficient to ensure that the canary is the same in both per CPU areas.
Commit d55535232c3d ("random: move rand_initialize() earlier") moved the stack canary initialization to a later point in the init sequence. As a consequence the per CPU stack canary is 0 when switching the per CPU areas, so there is no requirement anymore to exclude this file.
Add a comment to load_percpu_segment().
--- arch/x86/kernel/cpu/Makefile | 3 --- arch/x86/kernel/cpu/common.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/Makefile +0 -3
@@ -17,9 +17,6 @@ KMSAN_SANITIZE_common.o := n # As above, instrumenting secondary CPU boot code causes boot hangs. KCSAN_SANITIZE_common.o := n -# Make sure load_percpu_segment has no stackprotector -CFLAGS_common.o := -fno-stack-protector - obj-y := cacheinfo.o scattered.o topology.o obj-y += common.o obj-y += rdrand.o
arch/x86/kernel/cpu/common.c +3 -0
@@ -752,6 +752,9 @@ void __init switch_gdt_and_percpu_base(int cpu)* early mapping is still valid. That means the GSBASE update will * lose any prior per CPU data which was not copied over in * setup_per_cpu_areas(). +* +* This works even with stackprotector enabled because the +* per CPU stack canary is 0 in both per CPU areas. */ wrmsrl (MSR_GS_BASE ,cpu_kernelmode_gs_base (cpu));#else
Peter Zijlstra
maintainerPATCH v3 5/59 x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc()
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Instead of resetting permissions all over the place when freeing module memory tell the vmalloc code to do so. Avoids the exercise for the next upcoming user.
--- arch/x86/kernel/ftrace.c | 2 -- arch/x86/kernel/kprobes/core.c | 1 - arch/x86/kernel/module.c | 9 +++++---- 3 files changed, 5 insertions(+), 7 deletions(-)
arch/x86/kernel/ftrace.c +0 -2
@@ -413,8 +413,6 @@ create_trampoline(struct ftrace_ops *ops/* ALLOC_TRAMP flags lets us know we created it */ ops->flags |=FTRACE_OPS_FL_ALLOC_TRAMP ; -set_vm_flush_reset_perms (trampoline); -if (likely (system_state !=SYSTEM_BOOTING ))set_memory_ro ((unsigned long )trampoline, npages);set_memory_x ((unsigned long )trampoline, npages);
arch/x86/kernel/kprobes/core.c +0 -1
@@ -416,7 +416,6 @@ void *alloc_insn_page(void)if (!page)return NULL ; -set_vm_flush_reset_perms (page);/* * First make the page read-only, and only then make it executable to * prevent it from being W+X in between.
arch/x86/kernel/module.c +5 -4
@@ -74,10 +74,11 @@ void *module_alloc(unsigned long size)return NULL ; p =__vmalloc_node_range (size,MODULE_ALIGN , -MODULES_VADDR +get_module_load_offset (), -MODULES_END , gfp_mask, -PAGE_KERNEL ,VM_DEFER_KMEMLEAK ,NUMA_NO_NODE , -__builtin_return_address (0 )); +MODULES_VADDR +get_module_load_offset (), +MODULES_END , gfp_mask,PAGE_KERNEL , +VM_FLUSH_RESET_PERMS |VM_DEFER_KMEMLEAK , +NUMA_NO_NODE ,__builtin_return_address (0 )); +if (p && (kasan_alloc_module_shadow (p, size, gfp_mask) <0 )) {vfree (p);return NULL ;
[tip: x86/core] x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc()
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 4c4eb3ecc91f4fee6d6bf7cfbc1e21f2e38d19ff Gitweb: https://git.kernel.org/tip/4c4eb3ecc91f4fee6d6bf7cfbc1e21f2e38d19ff Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:44 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:57 +02:00
x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc()
Instead of resetting permissions all over the place when freeing module memory tell the vmalloc code to do so. Avoids the exercise for the next upcoming user.
--- arch/x86/kernel/ftrace.c | 2 -- arch/x86/kernel/kprobes/core.c | 1 - arch/x86/kernel/module.c | 9 +++++---- 3 files changed, 5 insertions(+), 7 deletions(-)
arch/x86/kernel/ftrace.c +0 -2
@@ -413,8 +413,6 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)/* ALLOC_TRAMP flags lets us know we created it */ ops->flags |=FTRACE_OPS_FL_ALLOC_TRAMP ; -set_vm_flush_reset_perms (trampoline); -if (likely (system_state !=SYSTEM_BOOTING ))set_memory_ro ((unsigned long )trampoline, npages);set_memory_x ((unsigned long )trampoline, npages);
arch/x86/kernel/kprobes/core.c +0 -1
@@ -414,7 +414,6 @@ void *alloc_insn_page(void)if (!page)return NULL ; -set_vm_flush_reset_perms (page);/* * First make the page read-only, and only then make it executable to * prevent it from being W+X in between.
arch/x86/kernel/module.c +5 -4
@@ -74,10 +74,11 @@ void *module_alloc(unsigned long size)return NULL ; p =__vmalloc_node_range (size,MODULE_ALIGN , -MODULES_VADDR +get_module_load_offset (), -MODULES_END , gfp_mask, -PAGE_KERNEL ,VM_DEFER_KMEMLEAK ,NUMA_NO_NODE , -__builtin_return_address (0 )); +MODULES_VADDR +get_module_load_offset (), +MODULES_END , gfp_mask,PAGE_KERNEL , +VM_FLUSH_RESET_PERMS |VM_DEFER_KMEMLEAK , +NUMA_NO_NODE ,__builtin_return_address (0 )); +if (p && (kasan_alloc_module_shadow (p, size, gfp_mask) <0 )) {vfree (p);return NULL ;
Peter Zijlstra
maintainerPATCH v3 6/59 x86/vdso: Ensure all kernel code is seen by objtool
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
extable.c is kernel code and not part of the VDSO
--- arch/x86/entry/vdso/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
arch/x86/entry/vdso/Makefile +6 -5
@@ -30,11 +30,12 @@ vobjs32-y += vdso32/vclock_gettime.o vobjs-$(CONFIG_X86_SGX) += vsgx.o # files to link into kernel -obj-y += vma.o extable.o -KASAN_SANITIZE_vma.o := y -UBSAN_SANITIZE_vma.o := y -KCSAN_SANITIZE_vma.o := y -OBJECT_FILES_NON_STANDARD_vma.o := n +obj-y += vma.o extable.o +KASAN_SANITIZE_vma.o := y +UBSAN_SANITIZE_vma.o := y +KCSAN_SANITIZE_vma.o := y +OBJECT_FILES_NON_STANDARD_vma.o := n +OBJECT_FILES_NON_STANDARD_extable.o := n # vDSO images to build vdso_img-$(VDSO64-y) += 64
[tip: x86/core] x86/vdso: Ensure all kernel code is seen by objtool
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: b26d66f8dace32c46ce58147002964ce8cdfde5f Gitweb: https://git.kernel.org/tip/b26d66f8dace32c46ce58147002964ce8cdfde5f Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:45 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:57 +02:00
x86/vdso: Ensure all kernel code is seen by objtool
extable.c is kernel code and not part of the VDSO
--- arch/x86/entry/vdso/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
arch/x86/entry/vdso/Makefile +6 -5
@@ -33,11 +33,12 @@ vobjs32-y += vdso32/vclock_gettime.o vobjs-$(CONFIG_X86_SGX) += vsgx.o # files to link into kernel -obj-y += vma.o extable.o -KASAN_SANITIZE_vma.o := y -UBSAN_SANITIZE_vma.o := y -KCSAN_SANITIZE_vma.o := y -OBJECT_FILES_NON_STANDARD_vma.o := n +obj-y += vma.o extable.o +KASAN_SANITIZE_vma.o := y +UBSAN_SANITIZE_vma.o := y +KCSAN_SANITIZE_vma.o := y +OBJECT_FILES_NON_STANDARD_vma.o := n +OBJECT_FILES_NON_STANDARD_extable.o := n # vDSO images to build vdso_img-$(VDSO64-y) += 64
Peter Zijlstra
maintainerPATCH v3 7/59 x86: Sanitize linker script
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
The section ordering in the text section is more than suboptimal:
ALIGN_ENTRY_TEXT_BEGIN
ENTRY_TEXT
ALIGN_ENTRY_TEXT_END
SOFTIRQENTRY_TEXT
STATIC_CALL_TEXT
INDIRECT_THUNK_TEXT
ENTRY_TEXT is in a seperate PMD so it can be mapped into the cpu entry area when KPTI is enabled. That means the sections after it are also in a seperate PMD. That's wasteful especially as the indirect thunk text is a hotpath on retpoline enabled systems and the static call text is fairly hot on 32bit.
Move the entry text section last so that the other sections share a PMD with the text before it. This is obviously just best effort and not guaranteed when the previous text is just at a PMD boundary.
The text section placement needs an overhaul in general. There is e.g. no point to have debugfs, sysfs, cpuhotplug and other rarely used functions next to hot path text.
--- arch/x86/kernel/vmlinux.lds.S | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
arch/x86/kernel/vmlinux.lds.S +7 -6
@@ -132,18 +132,19 @@ SECTIONS CPUIDLE_TEXT LOCK_TEXT KPROBES_TEXT - ALIGN_ENTRY_TEXT_BEGIN - ENTRY_TEXT - ALIGN_ENTRY_TEXT_END SOFTIRQENTRY_TEXT - STATIC_CALL_TEXT - *(.gnu.warning) - #ifdef CONFIG_RETPOLINE __indirect_thunk_start = .; *(.text.__x86.*) __indirect_thunk_end = .; #endif + STATIC_CALL_TEXT + + ALIGN_ENTRY_TEXT_BEGIN + ENTRY_TEXT + ALIGN_ENTRY_TEXT_END + *(.gnu.warning) + } :text =0xcccc /* End of text section, which should occupy whole number of pages */
Borislav Petkov
maintainerRe: [PATCH v3 07/59] x86: Sanitize linker script
Quoted 4 lines · Peter Zijlstra
From: Thomas Gleixner <[email protected]>
The section ordering in the text section is more than suboptimal:
Quoted 8 lines
ALIGN_ENTRY_TEXT_BEGIN
ENTRY_TEXT
ALIGN_ENTRY_TEXT_END
SOFTIRQENTRY_TEXT
STATIC_CALL_TEXT
INDIRECT_THUNK_TEXT
ENTRY_TEXTis in a seperate PMD so it can be mapped into the cpu entry area
s/seperate/separate/g
That's tglx's favourite spelling of "separate" :-)
Quoted 2 lines
when KPTI is enabled. That means the sections after it are also in a seperate PMD. That's wasteful especially as the indirect thunk text is a
^^^^^^^^
ditto.
Quoted 8 lines
arch/x86/kernel/vmlinux.lds.S +0
-2@@ -132,18 +132,19 @@ SECTIONS CPUIDLE_TEXT LOCK_TEXT KPROBES_TEXT - ALIGN_ENTRY_TEXT_BEGIN - ENTRY_TEXT
arch/x86/kernel/vmlinux.lds.S SECTIONS · line 140
Quoted 10 lines
arch/x86/kernel/vmlinux.lds.S +0
-4- ALIGN_ENTRY_TEXT_END SOFTIRQENTRY_TEXT - STATIC_CALL_TEXT - *(.gnu.warning) - #ifdef CONFIG_RETPOLINE __indirect_thunk_start = .; *(.text.__x86.*) __indirect_thunk_end = .; #endif
<--- might wanna put a comment here so that people don't slap some new sections underneath it.
Quoted 12 lines
arch/x86/kernel/vmlinux.lds.S +7
-0+ STATIC_CALL_TEXT + + ALIGN_ENTRY_TEXT_BEGIN + ENTRY_TEXT + ALIGN_ENTRY_TEXT_END + *(.gnu.warning) + } :text =0xcccc /* End of text section, which should occupy whole number of pages */
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette[tip: x86/core] x86: Sanitize linker script
In reply to Peter ZijlstraThe following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 24a9c543d2114d416f84e386c2fa90089bd97e4c Gitweb: https://git.kernel.org/tip/24a9c543d2114d416f84e386c2fa90089bd97e4c Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:46 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:57 +02:00
x86: Sanitize linker script
The section ordering in the text section is more than suboptimal:
ALIGN_ENTRY_TEXT_BEGIN
ENTRY_TEXT
ALIGN_ENTRY_TEXT_END
SOFTIRQENTRY_TEXT
STATIC_CALL_TEXT
INDIRECT_THUNK_TEXT
ENTRY_TEXT is in a seperate PMD so it can be mapped into the cpu entry area when KPTI is enabled. That means the sections after it are also in a seperate PMD. That's wasteful especially as the indirect thunk text is a hotpath on retpoline enabled systems and the static call text is fairly hot on 32bit.
Move the entry text section last so that the other sections share a PMD with the text before it. This is obviously just best effort and not guaranteed when the previous text is just at a PMD boundary.
The text section placement needs an overhaul in general. There is e.g. no point to have debugfs, sysfs, cpuhotplug and other rarely used functions next to hot path text.
--- arch/x86/kernel/vmlinux.lds.S | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
arch/x86/kernel/vmlinux.lds.S +7 -6
@@ -132,18 +132,19 @@ SECTIONS CPUIDLE_TEXT LOCK_TEXT KPROBES_TEXT - ALIGN_ENTRY_TEXT_BEGIN - ENTRY_TEXT - ALIGN_ENTRY_TEXT_END SOFTIRQENTRY_TEXT - STATIC_CALL_TEXT - *(.gnu.warning) - #ifdef CONFIG_RETPOLINE __indirect_thunk_start = .; *(.text.__x86.*) __indirect_thunk_end = .; #endif + STATIC_CALL_TEXT + + ALIGN_ENTRY_TEXT_BEGIN + ENTRY_TEXT + ALIGN_ENTRY_TEXT_END + *(.gnu.warning) + } :text =0xcccc /* End of text section, which should occupy whole number of pages */
Peter Zijlstra
maintainerPATCH v3 8/59 arch: Introduce CONFIG_FUNCTION_ALIGNMENT
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
Generic function-alignment infrastructure.
Architectures can select FUNCTION_ALIGNMENT_xxB symbols; the FUNCTION_ALIGNMENT symbol is then set to the largest such selected size, 0 otherwise.
Quoted 1 line
From this the -falign-functions compiler argument and
__ALIGNmacro
are set.
This incorporates the DEBUG_FORCE_FUNCTION_ALIGN_64B knob and future alignment requirements for x86_64 (later in this series) into a single place.
NOTE: also removes the 0x90 filler byte from the generic __ALIGN
primitive, that value makes no sense outside of x86.
NOTE: .balign 0 reverts to a no-op.
--- Makefile | 4 ++-- arch/Kconfig | 24 ++++++++++++++++++++++++ arch/ia64/Kconfig | 1 + arch/ia64/Makefile | 2 +- arch/x86/Kconfig | 2 ++ arch/x86/include/asm/linkage.h | 4 +--- include/asm-generic/vmlinux.lds.h | 4 ++-- include/linux/linkage.h | 4 ++-- lib/Kconfig.debug | 1 + 9 files changed, 36 insertions(+), 10 deletions(-)
Makefile +2 -2
@@ -937,8 +937,8 @@ KBUILD_CFLAGS += $(CC_FLAGS_CFI) export CC_FLAGS_CFI endif -ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B -KBUILD_CFLAGS += -falign-functions=64 +ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0) +KBUILD_CFLAGS += -falign-functions=$(CONFIG_FUNCTION_ALIGNMENT) endif # arch Makefile may override CC so keep this after arch Makefile is included
arch/Kconfig +24 -0
@@ -1419,4 +1419,28 @@ source "kernel/gcov/Kconfig" source "scripts/gcc-plugins/Kconfig" +config FUNCTION_ALIGNMENT_4B + bool + +config FUNCTION_ALIGNMENT_8B + bool + +config FUNCTION_ALIGNMENT_16B + bool + +config FUNCTION_ALIGNMENT_32B + bool + +config FUNCTION_ALIGNMENT_64B + bool + +config FUNCTION_ALIGNMENT + int + default 64 if FUNCTION_ALIGNMENT_64B + default 32 if FUNCTION_ALIGNMENT_32B + default 16 if FUNCTION_ALIGNMENT_16B + default 8 if FUNCTION_ALIGNMENT_8B + default 4 if FUNCTION_ALIGNMENT_4B + default 0 + endmenu
arch/ia64/Kconfig +1 -0
@@ -63,6 +63,7 @@ config IA64 select NUMA if !FLATMEM select PCI_MSI_ARCH_FALLBACKS if PCI_MSI select ZONE_DMA32 + select FUNCTION_ALIGNMENT_32B default y help The Itanium Processor Family is Intel's 64-bit successor to
arch/ia64/Makefile +1 -1
@@ -23,7 +23,7 @@ KBUILD_AFLAGS_KERNEL := -mconstant-gp EXTRA := cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \ - -falign-functions=32 -frename-registers -fno-optimize-sibling-calls + -frename-registers -fno-optimize-sibling-calls KBUILD_CFLAGS_KERNEL := -mconstant-gp GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
arch/x86/Kconfig +2 -0
@@ -283,6 +283,8 @@ config X86 select X86_FEATURE_NAMES if PROC_FS select PROC_PID_ARCH_STATUS if PROC_FS select HAVE_ARCH_NODE_DEV_GROUP if X86_SGX + select FUNCTION_ALIGNMENT_16B if X86_64 || X86_ALIGNMENT_16 + select FUNCTION_ALIGNMENT_4B imply IMA_SECURE_AND_OR_TRUSTED_BOOT if EFI config INSTRUCTION_DECODER
arch/x86/include/asm/linkage.h +1 -3
@@ -14,10 +14,8 @@#ifdef __ASSEMBLY__ -#if defined(CONFIG_X86_64 ) || defined(CONFIG_X86_ALIGNMENT_16 ) -#define __ALIGN .p2align 4, 0x90 +#define __ALIGN .balign CONFIG_FUNCTION_ALIGNMENT, 0x90;#define __ALIGN_STR __stringify(__ALIGN) -#endif #if defined(CONFIG_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define RET jmp __x86_return_thunk
include/asm-generic/vmlinux.lds.h +2 -2
@@ -81,8 +81,8 @@#define RO_EXCEPTION_TABLE #endif -/* Align . to a 8 byte boundary equals to maximum function alignment. */ -#define ALIGN_FUNCTION () . = ALIGN(8) +/* Align . function alignment. */ +#define ALIGN_FUNCTION () . = ALIGN(CONFIG_FUNCTION_ALIGNMENT)/* * LD_DEAD_CODE_DATA_ELIMINATION option enables -fdata-sections, which
include/linux/linkage.h +2 -2
@@ -69,8 +69,8 @@#endif #ifndef __ALIGN -#define __ALIGN .align 4,0x90 -#define __ALIGN_STR ".align 4,0x90" +#define __ALIGN .balign CONFIG_FUNCTION_ALIGNMENT +#define __ALIGN_STR __stringify(__ALIGN)#endif #ifdef __ASSEMBLY__
lib/Kconfig.debug +1 -0
@@ -459,6 +459,7 @@ config SECTION_MISMATCH_WARN_ONLY config DEBUG_FORCE_FUNCTION_ALIGN_64B bool "Force all function address 64B aligned" depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC) + select FUNCTION_ALIGNMENT_64B help There are cases that a commit from one domain changes the function address alignment of other domains, and cause magic performance
[tip: x86/core] arch: Introduce CONFIG_FUNCTION_ALIGNMENT
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: d49a0626216b95cd4bf696f6acf55f39a16ab0bb Gitweb: https://git.kernel.org/tip/d49a0626216b95cd4bf696f6acf55f39a16ab0bb Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:47 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:58 +02:00
arch: Introduce CONFIG_FUNCTION_ALIGNMENT
Generic function-alignment infrastructure.
Architectures can select FUNCTION_ALIGNMENT_xxB symbols; the FUNCTION_ALIGNMENT symbol is then set to the largest such selected size, 0 otherwise.
Quoted 1 line
From this the -falign-functions compiler argument and
__ALIGNmacro
are set.
This incorporates the DEBUG_FORCE_FUNCTION_ALIGN_64B knob and future alignment requirements for x86_64 (later in this series) into a single place.
NOTE: also removes the 0x90 filler byte from the generic __ALIGN
primitive, that value makes no sense outside of x86.
NOTE: .balign 0 reverts to a no-op.
--- Makefile | 4 ++-- arch/Kconfig | 24 ++++++++++++++++++++++++ arch/ia64/Kconfig | 1 + arch/ia64/Makefile | 2 +- arch/x86/Kconfig | 2 ++ arch/x86/boot/compressed/head_64.S | 8 ++++++++ arch/x86/include/asm/linkage.h | 4 +--- include/asm-generic/vmlinux.lds.h | 4 ++-- include/linux/linkage.h | 4 ++-- lib/Kconfig.debug | 1 + 10 files changed, 44 insertions(+), 10 deletions(-)
Makefile +2 -2
@@ -1004,8 +1004,8 @@ KBUILD_CFLAGS += $(CC_FLAGS_CFI) export CC_FLAGS_CFI endif -ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B -KBUILD_CFLAGS += -falign-functions=64 +ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0) +KBUILD_CFLAGS += -falign-functions=$(CONFIG_FUNCTION_ALIGNMENT) endif # arch Makefile may override CC so keep this after arch Makefile is included
arch/Kconfig +24 -0
@@ -1428,4 +1428,28 @@ source "kernel/gcov/Kconfig" source "scripts/gcc-plugins/Kconfig" +config FUNCTION_ALIGNMENT_4B + bool + +config FUNCTION_ALIGNMENT_8B + bool + +config FUNCTION_ALIGNMENT_16B + bool + +config FUNCTION_ALIGNMENT_32B + bool + +config FUNCTION_ALIGNMENT_64B + bool + +config FUNCTION_ALIGNMENT + int + default 64 if FUNCTION_ALIGNMENT_64B + default 32 if FUNCTION_ALIGNMENT_32B + default 16 if FUNCTION_ALIGNMENT_16B + default 8 if FUNCTION_ALIGNMENT_8B + default 4 if FUNCTION_ALIGNMENT_4B + default 0 + endmenu
arch/ia64/Kconfig +1 -0
@@ -63,6 +63,7 @@ config IA64 select NUMA if !FLATMEM select PCI_MSI_ARCH_FALLBACKS if PCI_MSI select ZONE_DMA32 + select FUNCTION_ALIGNMENT_32B default y help The Itanium Processor Family is Intel's 64-bit successor to
arch/ia64/Makefile +1 -1
@@ -23,7 +23,7 @@ KBUILD_AFLAGS_KERNEL := -mconstant-gp EXTRA := cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \ - -falign-functions=32 -frename-registers -fno-optimize-sibling-calls + -frename-registers -fno-optimize-sibling-calls KBUILD_CFLAGS_KERNEL := -mconstant-gp GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
arch/x86/Kconfig +2 -0
@@ -290,6 +290,8 @@ config X86 select X86_FEATURE_NAMES if PROC_FS select PROC_PID_ARCH_STATUS if PROC_FS select HAVE_ARCH_NODE_DEV_GROUP if X86_SGX + select FUNCTION_ALIGNMENT_16B if X86_64 || X86_ALIGNMENT_16 + select FUNCTION_ALIGNMENT_4B imply IMA_SECURE_AND_OR_TRUSTED_BOOT if EFI select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
arch/x86/boot/compressed/head_64.S +8 -0
@@ -38,6 +38,14 @@ #include "pgtable.h" /* + * Fix alignment at 16 bytes. Following CONFIG_FUNCTION_ALIGNMENT will result + * in assembly errors due to trying to move .org backward due to the excessive + * alignment. + */ +#undef __ALIGN +#define __ALIGN .balign 16, 0x90 + +/* * Locally defined symbols should be marked hidden: */ .hidden _bss
arch/x86/include/asm/linkage.h +1 -3
@@ -14,10 +14,8 @@#ifdef __ASSEMBLY__ -#if defined(CONFIG_X86_64 ) || defined(CONFIG_X86_ALIGNMENT_16 ) -#define __ALIGN .p2align 4, 0x90 +#define __ALIGN .balign CONFIG_FUNCTION_ALIGNMENT, 0x90;#define __ALIGN_STR __stringify(__ALIGN) -#endif #if defined(CONFIG_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define RET jmp __x86_return_thunk
include/asm-generic/vmlinux.lds.h +2 -2
@@ -81,8 +81,8 @@#define RO_EXCEPTION_TABLE #endif -/* Align . to a 8 byte boundary equals to maximum function alignment. */ -#define ALIGN_FUNCTION () . = ALIGN(8) +/* Align . function alignment. */ +#define ALIGN_FUNCTION () . = ALIGN(CONFIG_FUNCTION_ALIGNMENT)/* * LD_DEAD_CODE_DATA_ELIMINATION option enables -fdata-sections, which
include/linux/linkage.h +2 -2
@@ -69,8 +69,8 @@#endif #ifndef __ALIGN -#define __ALIGN .align 4,0x90 -#define __ALIGN_STR ".align 4,0x90" +#define __ALIGN .balign CONFIG_FUNCTION_ALIGNMENT +#define __ALIGN_STR __stringify(__ALIGN)#endif #ifdef __ASSEMBLY__
lib/Kconfig.debug +1 -0
@@ -467,6 +467,7 @@ config SECTION_MISMATCH_WARN_ONLY config DEBUG_FORCE_FUNCTION_ALIGN_64B bool "Force all function address 64B aligned" depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC) + select FUNCTION_ALIGNMENT_64B help There are cases that a commit from one domain changes the function address alignment of other domains, and cause magic performance
Peter Zijlstra
maintainerPATCH v3 9/59 x86/asm: Differentiate between code and function alignment
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Create SYM_F_ALIGN to differentiate alignment requirements between SYM_CODE and SYM_FUNC.
This distinction is useful later when adding padding in front of functions; IOW this allows following the compiler's patchable-function-entry option.
--- arch/x86/include/asm/linkage.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
arch/x86/include/asm/linkage.h +9 -5
@@ -12,11 +12,15 @@#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))#endif /* CONFIG_X86_32 */ -#ifdef __ASSEMBLY__ -#define __ALIGN .balign CONFIG_FUNCTION_ALIGNMENT, 0x90;#define __ALIGN_STR __stringify(__ALIGN) +#define ASM_FUNC_ALIGN __ALIGN_STR +#define __FUNC_ALIGN __ALIGN +#define SYM_F_ALIGN __FUNC_ALIGN + +#ifdef __ASSEMBLY__ +#if defined(CONFIG_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define RET jmp __x86_return_thunk#else /* CONFIG_RETPOLINE */
@@ -43,7 +47,7 @@/* SYM_FUNC_START -- use for global functions */ #define SYM_FUNC_START (name) \ - SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) \ + SYM_START(name, SYM_L_GLOBAL, SYM_F_ALIGN) \ ENDBR/* SYM_FUNC_START_NOALIGN -- use for global functions, w/o alignment */
@@ -53,7 +57,7 @@/* SYM_FUNC_START_LOCAL -- use for local functions */ #define SYM_FUNC_START_LOCAL (name) \ - SYM_START(name, SYM_L_LOCAL, SYM_A_ALIGN) \ + SYM_START(name, SYM_L_LOCAL, SYM_F_ALIGN) \ ENDBR/* SYM_FUNC_START_LOCAL_NOALIGN -- use for local functions, w/o alignment */
@@ -63,7 +67,7 @@/* SYM_FUNC_START_WEAK -- use for weak functions */ #define SYM_FUNC_START_WEAK (name) \ - SYM_START(name, SYM_L_WEAK, SYM_A_ALIGN) \ + SYM_START(name, SYM_L_WEAK, SYM_F_ALIGN) \ ENDBR/* SYM_FUNC_START_WEAK_NOALIGN -- use for weak functions, w/o alignment */
[tip: x86/core] x86/asm: Differentiate between code and function alignment
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 8eb5d34e77c63fde8af21c691bcf6e3cd87f7829 Gitweb: https://git.kernel.org/tip/8eb5d34e77c63fde8af21c691bcf6e3cd87f7829 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:48 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:58 +02:00
x86/asm: Differentiate between code and function alignment
Create SYM_F_ALIGN to differentiate alignment requirements between SYM_CODE and SYM_FUNC.
This distinction is useful later when adding padding in front of functions; IOW this allows following the compiler's patchable-function-entry option.
[peterz: Changelog]
--- arch/x86/include/asm/linkage.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
arch/x86/include/asm/linkage.h +9 -5
@@ -12,11 +12,15 @@#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))#endif /* CONFIG_X86_32 */ -#ifdef __ASSEMBLY__ -#define __ALIGN .balign CONFIG_FUNCTION_ALIGNMENT, 0x90;#define __ALIGN_STR __stringify(__ALIGN) +#define ASM_FUNC_ALIGN __ALIGN_STR +#define __FUNC_ALIGN __ALIGN +#define SYM_F_ALIGN __FUNC_ALIGN + +#ifdef __ASSEMBLY__ +#if defined(CONFIG_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define RET jmp __x86_return_thunk#else /* CONFIG_RETPOLINE */
@@ -55,7 +59,7 @@/* SYM_FUNC_START -- use for global functions */ #define SYM_FUNC_START (name) \ - SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) \ + SYM_START(name, SYM_L_GLOBAL, SYM_F_ALIGN) \ ENDBR/* SYM_FUNC_START_NOALIGN -- use for global functions, w/o alignment */
@@ -65,7 +69,7 @@/* SYM_FUNC_START_LOCAL -- use for local functions */ #define SYM_FUNC_START_LOCAL (name) \ - SYM_START(name, SYM_L_LOCAL, SYM_A_ALIGN) \ + SYM_START(name, SYM_L_LOCAL, SYM_F_ALIGN) \ ENDBR/* SYM_FUNC_START_LOCAL_NOALIGN -- use for local functions, w/o alignment */
@@ -75,7 +79,7 @@/* SYM_FUNC_START_WEAK -- use for weak functions */ #define SYM_FUNC_START_WEAK (name) \ - SYM_START(name, SYM_L_WEAK, SYM_A_ALIGN) \ + SYM_START(name, SYM_L_WEAK, SYM_F_ALIGN) \ ENDBR/* SYM_FUNC_START_WEAK_NOALIGN -- use for weak functions, w/o alignment */
Peter Zijlstra
maintainerPATCH v3 10/59 x86/error_inject: Align function properly
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
Ensure inline asm functions are consistently aligned with compiler generated and SYM_FUNC_START*() functions.
--- arch/x86/lib/error-inject.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/lib/error-inject.c +1 -0
@@ -11,6 +11,7 @@ asm(".text\n" ".type just_return_func, @function\n" ".globl just_return_func\n" +ASM_FUNC_ALIGN "just_return_func:\n" ANNOTATE_NOENDBR ASM_RET
[tip: x86/core] x86/error_inject: Align function properly
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 1934dc9a8a92fda36ab80cfd55edab1708dcdf9a Gitweb: https://git.kernel.org/tip/1934dc9a8a92fda36ab80cfd55edab1708dcdf9a Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:49 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:59 +02:00
x86/error_inject: Align function properly
Ensure inline asm functions are consistently aligned with compiler generated and SYM_FUNC_START*() functions.
--- arch/x86/lib/error-inject.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/lib/error-inject.c +1 -0
@@ -11,6 +11,7 @@ asm(".text\n" ".type just_return_func, @function\n" ".globl just_return_func\n" +ASM_FUNC_ALIGN "just_return_func:\n" ANNOTATE_NOENDBR ASM_RET
Peter Zijlstra
maintainerPATCH v3 11/59 x86/paravirt: Properly align PV functions
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Ensure inline asm functions are consistently aligned with compiler generated and SYM_FUNC_START*() functions.
--- arch/x86/include/asm/paravirt.h | 1 + arch/x86/include/asm/qspinlock_paravirt.h | 2 +- arch/x86/kernel/kvm.c | 1 + arch/x86/kernel/paravirt.c | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-)
arch/x86/include/asm/paravirt.h +1 -0
@@ -665,6 +665,7 @@ bool __raw_callee_save___native_vcpu_is_ asm(".pushsection " section", \"ax\";" \ ".globl " PV_THUNK_NAME(func) ";" \ ".type " PV_THUNK_NAME(func) ", @function;" \ +ASM_FUNC_ALIGN \ PV_THUNK_NAME(func) ":" \ASM_ENDBR \FRAME_BEGIN \
arch/x86/include/asm/qspinlock_paravirt.h +1 -1
@@ -39,7 +39,7 @@ PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_sp asm (".pushsection .text;" ".globl " PV_UNLOCK ";" ".type " PV_UNLOCK ", @function;" -".align 4,0x90;" +ASM_FUNC_ALIGN PV_UNLOCK ": " ASM_ENDBR FRAME_BEGIN
arch/x86/kernel/kvm.c +1 -0
@@ -802,6 +802,7 @@ asm(".pushsection .text;" ".global __raw_callee_save___kvm_vcpu_is_preempted;" ".type __raw_callee_save___kvm_vcpu_is_preempted, @function;" +ASM_FUNC_ALIGN "__raw_callee_save___kvm_vcpu_is_preempted:" ASM_ENDBR "movq __per_cpu_offset(,%rdi,8), %rax;"
arch/x86/kernel/paravirt.c +2 -0
@@ -40,6 +40,7 @@extern void _paravirt_nop (void ); asm (".pushsection .entry.text, \"ax\"\n" ".global _paravirt_nop\n" +ASM_FUNC_ALIGN "_paravirt_nop:\n\t" ASM_ENDBR ASM_RET
@@ -50,6 +51,7 @@ asm (".pushsection .entry.text, \"ax\"\n/* stub always returning 0. */ asm (".pushsection .entry.text, \"ax\"\n" ".global paravirt_ret0\n" +ASM_FUNC_ALIGN "paravirt_ret0:\n\t" ASM_ENDBR "xor %" _ASM_AX ", %" _ASM_AX ";\n\t"
Re: [PATCH v3 11/59] x86/paravirt: Properly align PV functions
Quoted 7 lines · Peter Zijlstra
From: Thomas Gleixner <[email protected]>
Ensure inline asm functions are consistently aligned with compiler generated and SYM_FUNC_START*() functions.
Signed-off-by Thomas Gleixner <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>
Juergen
[tip: x86/core] x86/paravirt: Properly align PV functions
In reply to Peter ZijlstraThe following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 1d293758e548aa6ff65e4dd3f5a9bc2a34b38ce3 Gitweb: https://git.kernel.org/tip/1d293758e548aa6ff65e4dd3f5a9bc2a34b38ce3 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:50 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:40:59 +02:00
x86/paravirt: Properly align PV functions
Ensure inline asm functions are consistently aligned with compiler generated and SYM_FUNC_START*() functions.
--- arch/x86/include/asm/paravirt.h | 1 + arch/x86/include/asm/qspinlock_paravirt.h | 2 +- arch/x86/kernel/kvm.c | 1 + arch/x86/kernel/paravirt.c | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-)
arch/x86/include/asm/paravirt.h +1 -0
@@ -665,6 +665,7 @@ bool __raw_callee_save___native_vcpu_is_preempted(long cpu); asm(".pushsection " section", \"ax\";" \ ".globl " PV_THUNK_NAME(func) ";" \ ".type " PV_THUNK_NAME(func) ", @function;" \ +ASM_FUNC_ALIGN \ PV_THUNK_NAME(func) ":" \ASM_ENDBR \FRAME_BEGIN \
arch/x86/include/asm/qspinlock_paravirt.h +1 -1
@@ -40,7 +40,7 @@ __PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlock_slowpath, ".spinlock.text"); asm (".pushsection .spinlock.text;" ".globl " PV_UNLOCK ";" ".type " PV_UNLOCK ", @function;" -".align 4,0x90;" +ASM_FUNC_ALIGN PV_UNLOCK ": " ASM_ENDBR FRAME_BEGIN
arch/x86/kernel/kvm.c +1 -0
@@ -802,6 +802,7 @@ asm(".pushsection .text;" ".global __raw_callee_save___kvm_vcpu_is_preempted;" ".type __raw_callee_save___kvm_vcpu_is_preempted, @function;" +ASM_FUNC_ALIGN "__raw_callee_save___kvm_vcpu_is_preempted:" ASM_ENDBR "movq __per_cpu_offset(,%rdi,8), %rax;"
arch/x86/kernel/paravirt.c +2 -0
@@ -40,6 +40,7 @@extern void _paravirt_nop (void ); asm (".pushsection .entry.text, \"ax\"\n" ".global _paravirt_nop\n" +ASM_FUNC_ALIGN "_paravirt_nop:\n\t" ASM_ENDBR ASM_RET
@@ -50,6 +51,7 @@ asm (".pushsection .entry.text, \"ax\"\n"/* stub always returning 0. */ asm (".pushsection .entry.text, \"ax\"\n" ".global paravirt_ret0\n" +ASM_FUNC_ALIGN "paravirt_ret0:\n\t" ASM_ENDBR "xor %" _ASM_AX ", %" _ASM_AX ";\n\t"
Peter Zijlstra
maintainerPATCH v3 12/59 x86/entry: Align SYM_CODE_START() variants
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Explicitly align a bunch of commonly called SYM_CODE_START() symbols.
--- arch/x86/entry/entry_64.S | 12 ++++++++---- arch/x86/entry/thunk_64.S | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-)
arch/x86/entry/entry_64.S +8 -4
@@ -284,7 +284,8 @@ SYM_FUNC_END(__switch_to_asm) * r12: kernel thread arg */ .pushsection .text, "ax" -SYM_CODE_START(ret_from_fork) + __FUNC_ALIGN +SYM_CODE_START_NOALIGN(ret_from_fork) UNWIND_HINT_EMPTY ANNOTATE_NOENDBR // copy_thread movq %rax, %rdi
@@ -828,7 +829,8 @@ EXPORT_SYMBOL(asm_load_gs_index) * * C calling convention: exc_xen_hypervisor_callback(struct *pt_regs) */ -SYM_CODE_START_LOCAL(exc_xen_hypervisor_callback) + __FUNC_ALIGN +SYM_CODE_START_LOCAL_NOALIGN(exc_xen_hypervisor_callback) /* * Since we don't modify %rdi, evtchn_do_upall(struct *pt_regs) will
@@ -856,7 +858,8 @@ SYM_CODE_END(exc_xen_hypervisor_callback * We distinguish between categories by comparing each saved segment register * with its current contents: any discrepancy means we in category 1. */ -SYM_CODE_START(xen_failsafe_callback) + __FUNC_ALIGN +SYM_CODE_START_NOALIGN(xen_failsafe_callback) UNWIND_HINT_EMPTY ENDBR movl %ds, %ecx
@@ -1516,7 +1519,8 @@ SYM_CODE_END(ignore_sysret) #endif .pushsection .text, "ax" -SYM_CODE_START(rewind_stack_and_make_dead) + __FUNC_ALIGN +SYM_CODE_START_NOALIGN(rewind_stack_and_make_dead) UNWIND_HINT_FUNC /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp
arch/x86/entry/thunk_64.S +2 -2
@@ -11,7 +11,7 @@ /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ .macro THUNK name, func -SYM_FUNC_START_NOALIGN(\name) +SYM_FUNC_START(\name) pushq %rbp movq %rsp, %rbp
@@ -36,7 +36,7 @@ SYM_FUNC_END(\name) EXPORT_SYMBOL(preempt_schedule_thunk) EXPORT_SYMBOL(preempt_schedule_notrace_thunk) -SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore) +SYM_CODE_START_LOCAL(__thunk_restore) popq %r11 popq %r10 popq %r9
[tip: x86/core] x86/entry: Align SYM_CODE_START() variants
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 67e93ddd5d0b84ac17bddb13d98533e425282421 Gitweb: https://git.kernel.org/tip/67e93ddd5d0b84ac17bddb13d98533e425282421 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:51 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:00 +02:00
x86/entry: Align SYM_CODE_START() variants
Explicitly align a bunch of commonly called SYM_CODE_START() symbols.
--- arch/x86/entry/entry_64.S | 16 ++++++++++------ arch/x86/entry/thunk_64.S | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-)
arch/x86/entry/entry_64.S +10 -6
@@ -284,7 +284,8 @@ SYM_FUNC_END(__switch_to_asm) * r12: kernel thread arg */ .pushsection .text, "ax" -SYM_CODE_START(ret_from_fork) + __FUNC_ALIGN +SYM_CODE_START_NOALIGN(ret_from_fork) UNWIND_HINT_EMPTY ANNOTATE_NOENDBR // copy_thread movq %rax, %rdi
@@ -600,13 +601,13 @@ SYM_CODE_END(\asmsym) * shared between 32 and 64 bit and emit the __irqentry_text_* markers * so the stacktrace boundary checks work. */ - .align 16 + __ALIGN .globl __irqentry_text_start __irqentry_text_start: #include <asm/idtentry.h> - .align 16 + __ALIGN .globl __irqentry_text_end __irqentry_text_end: ANNOTATE_NOENDBR
@@ -828,7 +829,8 @@ EXPORT_SYMBOL(asm_load_gs_index) * * C calling convention: exc_xen_hypervisor_callback(struct *pt_regs) */ -SYM_CODE_START_LOCAL(exc_xen_hypervisor_callback) + __FUNC_ALIGN +SYM_CODE_START_LOCAL_NOALIGN(exc_xen_hypervisor_callback) /* * Since we don't modify %rdi, evtchn_do_upall(struct *pt_regs) will
@@ -856,7 +858,8 @@ SYM_CODE_END(exc_xen_hypervisor_callback) * We distinguish between categories by comparing each saved segment register * with its current contents: any discrepancy means we in category 1. */ -SYM_CODE_START(xen_failsafe_callback) + __FUNC_ALIGN +SYM_CODE_START_NOALIGN(xen_failsafe_callback) UNWIND_HINT_EMPTY ENDBR movl %ds, %ecx
@@ -1516,7 +1519,8 @@ SYM_CODE_END(ignore_sysret) #endif .pushsection .text, "ax" -SYM_CODE_START(rewind_stack_and_make_dead) + __FUNC_ALIGN +SYM_CODE_START_NOALIGN(rewind_stack_and_make_dead) UNWIND_HINT_FUNC /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp
arch/x86/entry/thunk_64.S +2 -2
@@ -11,7 +11,7 @@ /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ .macro THUNK name, func -SYM_FUNC_START_NOALIGN(\name) +SYM_FUNC_START(\name) pushq %rbp movq %rsp, %rbp
@@ -36,7 +36,7 @@ SYM_FUNC_END(\name) EXPORT_SYMBOL(preempt_schedule_thunk) EXPORT_SYMBOL(preempt_schedule_notrace_thunk) -SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore) +SYM_CODE_START_LOCAL(__thunk_restore) popq %r11 popq %r10 popq %r9
Peter Zijlstra
maintainerPATCH v3 13/59 crypto: x86/camellia: Remove redundant alignments
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/camellia-aesni-avx-asm_64.S | 2 -- arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 4 ---- 2 files changed, 6 deletions(-)
arch/x86/crypto/camellia-aesni-avx-asm_64.S +0 -2
@@ -712,7 +712,6 @@ SYM_FUNC_END(roundsm16_x4_x5_x6_x7_x0_x1 .text -.align 8 SYM_FUNC_START_LOCAL(__camellia_enc_blk16) /* input: * %rdi: ctx, CTX
@@ -799,7 +798,6 @@ SYM_FUNC_START_LOCAL(__camellia_enc_blk1 jmp .Lenc_done; SYM_FUNC_END(__camellia_enc_blk16) -.align 8 SYM_FUNC_START_LOCAL(__camellia_dec_blk16) /* input: * %rdi: ctx, CTX
arch/x86/crypto/camellia-aesni-avx2-asm_64.S +0 -4
@@ -221,7 +221,6 @@ * Size optimization... with inlined roundsm32 binary would be over 5 times * larger and would only marginally faster. */ -.align 8 SYM_FUNC_START_LOCAL(roundsm32_x0_x1_x2_x3_x4_x5_x6_x7_y0_y1_y2_y3_y4_y5_y6_y7_cd) roundsm32(%ymm0, %ymm1, %ymm2, %ymm3, %ymm4, %ymm5, %ymm6, %ymm7, %ymm8, %ymm9, %ymm10, %ymm11, %ymm12, %ymm13, %ymm14, %ymm15,
@@ -229,7 +228,6 @@ SYM_FUNC_START_LOCAL(roundsm32_x0_x1_x2_ RET; SYM_FUNC_END(roundsm32_x0_x1_x2_x3_x4_x5_x6_x7_y0_y1_y2_y3_y4_y5_y6_y7_cd) -.align 8 SYM_FUNC_START_LOCAL(roundsm32_x4_x5_x6_x7_x0_x1_x2_x3_y4_y5_y6_y7_y0_y1_y2_y3_ab) roundsm32(%ymm4, %ymm5, %ymm6, %ymm7, %ymm0, %ymm1, %ymm2, %ymm3, %ymm12, %ymm13, %ymm14, %ymm15, %ymm8, %ymm9, %ymm10, %ymm11,
@@ -748,7 +746,6 @@ SYM_FUNC_END(roundsm32_x4_x5_x6_x7_x0_x1 .text -.align 8 SYM_FUNC_START_LOCAL(__camellia_enc_blk32) /* input: * %rdi: ctx, CTX
@@ -835,7 +832,6 @@ SYM_FUNC_START_LOCAL(__camellia_enc_blk3 jmp .Lenc_done; SYM_FUNC_END(__camellia_enc_blk32) -.align 8 SYM_FUNC_START_LOCAL(__camellia_dec_blk32) /* input: * %rdi: ctx, CTX
[tip: x86/core] crypto: x86/camellia: Remove redundant alignments
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: f6dabc817e1f0da8f4088734ad0b9814adad0bce Gitweb: https://git.kernel.org/tip/f6dabc817e1f0da8f4088734ad0b9814adad0bce Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:52 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:00 +02:00
crypto: x86/camellia: Remove redundant alignments
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/camellia-aesni-avx-asm_64.S | 2 -- arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 4 ---- 2 files changed, 6 deletions(-)
arch/x86/crypto/camellia-aesni-avx-asm_64.S +0 -2
@@ -712,7 +712,6 @@ SYM_FUNC_END(roundsm16_x4_x5_x6_x7_x0_x1_x2_x3_y4_y5_y6_y7_y0_y1_y2_y3_ab) .text -.align 8 SYM_FUNC_START_LOCAL(__camellia_enc_blk16) /* input: * %rdi: ctx, CTX
@@ -799,7 +798,6 @@ SYM_FUNC_START_LOCAL(__camellia_enc_blk16) jmp .Lenc_done; SYM_FUNC_END(__camellia_enc_blk16) -.align 8 SYM_FUNC_START_LOCAL(__camellia_dec_blk16) /* input: * %rdi: ctx, CTX
arch/x86/crypto/camellia-aesni-avx2-asm_64.S +0 -4
@@ -221,7 +221,6 @@ * Size optimization... with inlined roundsm32 binary would be over 5 times * larger and would only marginally faster. */ -.align 8 SYM_FUNC_START_LOCAL(roundsm32_x0_x1_x2_x3_x4_x5_x6_x7_y0_y1_y2_y3_y4_y5_y6_y7_cd) roundsm32(%ymm0, %ymm1, %ymm2, %ymm3, %ymm4, %ymm5, %ymm6, %ymm7, %ymm8, %ymm9, %ymm10, %ymm11, %ymm12, %ymm13, %ymm14, %ymm15,
@@ -229,7 +228,6 @@ SYM_FUNC_START_LOCAL(roundsm32_x0_x1_x2_x3_x4_x5_x6_x7_y0_y1_y2_y3_y4_y5_y6_y7_c RET; SYM_FUNC_END(roundsm32_x0_x1_x2_x3_x4_x5_x6_x7_y0_y1_y2_y3_y4_y5_y6_y7_cd) -.align 8 SYM_FUNC_START_LOCAL(roundsm32_x4_x5_x6_x7_x0_x1_x2_x3_y4_y5_y6_y7_y0_y1_y2_y3_ab) roundsm32(%ymm4, %ymm5, %ymm6, %ymm7, %ymm0, %ymm1, %ymm2, %ymm3, %ymm12, %ymm13, %ymm14, %ymm15, %ymm8, %ymm9, %ymm10, %ymm11,
@@ -748,7 +746,6 @@ SYM_FUNC_END(roundsm32_x4_x5_x6_x7_x0_x1_x2_x3_y4_y5_y6_y7_y0_y1_y2_y3_ab) .text -.align 8 SYM_FUNC_START_LOCAL(__camellia_enc_blk32) /* input: * %rdi: ctx, CTX
@@ -835,7 +832,6 @@ SYM_FUNC_START_LOCAL(__camellia_enc_blk32) jmp .Lenc_done; SYM_FUNC_END(__camellia_enc_blk32) -.align 8 SYM_FUNC_START_LOCAL(__camellia_dec_blk32) /* input: * %rdi: ctx, CTX
Peter Zijlstra
maintainerPATCH v3 14/59 crypto: x86/cast5: Remove redundant alignments
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/cast5-avx-x86_64-asm_64.S | 2 -- 1 file changed, 2 deletions(-)
arch/x86/crypto/cast5-avx-x86_64-asm_64.S +0 -2
@@ -208,7 +208,6 @@ .text -.align 16 SYM_FUNC_START_LOCAL(__cast5_enc_blk16) /* input: * %rdi: ctx
@@ -282,7 +281,6 @@ SYM_FUNC_START_LOCAL(__cast5_enc_blk16) RET; SYM_FUNC_END(__cast5_enc_blk16) -.align 16 SYM_FUNC_START_LOCAL(__cast5_dec_blk16) /* input: * %rdi: ctx
[tip: x86/core] crypto: x86/cast5: Remove redundant alignments
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 88cdf02551f9aef9284d778ecd375c400555d900 Gitweb: https://git.kernel.org/tip/88cdf02551f9aef9284d778ecd375c400555d900 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:53 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:00 +02:00
crypto: x86/cast5: Remove redundant alignments
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/cast5-avx-x86_64-asm_64.S | 2 -- 1 file changed, 2 deletions(-)
arch/x86/crypto/cast5-avx-x86_64-asm_64.S +0 -2
@@ -208,7 +208,6 @@ .text -.align 16 SYM_FUNC_START_LOCAL(__cast5_enc_blk16) /* input: * %rdi: ctx
@@ -282,7 +281,6 @@ SYM_FUNC_START_LOCAL(__cast5_enc_blk16) RET; SYM_FUNC_END(__cast5_enc_blk16) -.align 16 SYM_FUNC_START_LOCAL(__cast5_dec_blk16) /* input: * %rdi: ctx
Peter Zijlstra
maintainerPATCH v3 15/59 crypto: x86/crct10dif-pcl: Remove redundant alignments
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/crct10dif-pcl-asm_64.S | 1 - 1 file changed, 1 deletion(-)
arch/x86/crypto/crct10dif-pcl-asm_64.S +0 -1
@@ -94,7 +94,6 @@ # # Assumes len >= 16. # -.align 16 SYM_FUNC_START(crc_t10dif_pcl) movdqa .Lbswap_mask(%rip), BSWAP_MASK
[tip: x86/core] crypto: x86/crct10dif-pcl: Remove redundant alignments
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: ba1b270c20dfb7f7b7a076b1a97ef4b7dcb539b5 Gitweb: https://git.kernel.org/tip/ba1b270c20dfb7f7b7a076b1a97ef4b7dcb539b5 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:54 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:01 +02:00
crypto: x86/crct10dif-pcl: Remove redundant alignments
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/crct10dif-pcl-asm_64.S | 1 - 1 file changed, 1 deletion(-)
arch/x86/crypto/crct10dif-pcl-asm_64.S +0 -1
@@ -94,7 +94,6 @@ # # Assumes len >= 16. # -.align 16 SYM_FUNC_START(crc_t10dif_pcl) movdqa .Lbswap_mask(%rip), BSWAP_MASK
Peter Zijlstra
maintainerPATCH v3 16/59 crypto: x86/serpent: Remove redundant alignments
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/serpent-avx-x86_64-asm_64.S | 2 -- arch/x86/crypto/serpent-avx2-asm_64.S | 2 -- 2 files changed, 4 deletions(-)
arch/x86/crypto/serpent-avx-x86_64-asm_64.S +0 -2
@@ -550,7 +550,6 @@ #define write_blocks(x0, x1, x2, x3, t0, t1, t2) \ transpose_4x4(x0, x1, x2, x3, t0, t1, t2) -.align 8 SYM_FUNC_START_LOCAL(__serpent_enc_blk8_avx) /* input: * %rdi: ctx, CTX
@@ -604,7 +603,6 @@ SYM_FUNC_START_LOCAL(__serpent_enc_blk8_ RET; SYM_FUNC_END(__serpent_enc_blk8_avx) -.align 8 SYM_FUNC_START_LOCAL(__serpent_dec_blk8_avx) /* input: * %rdi: ctx, CTX
arch/x86/crypto/serpent-avx2-asm_64.S +0 -2
@@ -550,7 +550,6 @@ #define write_blocks(x0, x1, x2, x3, t0, t1, t2) \ transpose_4x4(x0, x1, x2, x3, t0, t1, t2) -.align 8 SYM_FUNC_START_LOCAL(__serpent_enc_blk16) /* input: * %rdi: ctx, CTX
@@ -604,7 +603,6 @@ SYM_FUNC_START_LOCAL(__serpent_enc_blk16 RET; SYM_FUNC_END(__serpent_enc_blk16) -.align 8 SYM_FUNC_START_LOCAL(__serpent_dec_blk16) /* input: * %rdi: ctx, CTX
[tip: x86/core] crypto: x86/serpent: Remove redundant alignments
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 8b44221671ec45d725a4558ff7aa5ea90ecfc885 Gitweb: https://git.kernel.org/tip/8b44221671ec45d725a4558ff7aa5ea90ecfc885 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:55 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:01 +02:00
crypto: x86/serpent: Remove redundant alignments
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/serpent-avx-x86_64-asm_64.S | 2 -- arch/x86/crypto/serpent-avx2-asm_64.S | 2 -- 2 files changed, 4 deletions(-)
arch/x86/crypto/serpent-avx-x86_64-asm_64.S +0 -2
@@ -550,7 +550,6 @@ #define write_blocks(x0, x1, x2, x3, t0, t1, t2) \ transpose_4x4(x0, x1, x2, x3, t0, t1, t2) -.align 8 SYM_FUNC_START_LOCAL(__serpent_enc_blk8_avx) /* input: * %rdi: ctx, CTX
@@ -604,7 +603,6 @@ SYM_FUNC_START_LOCAL(__serpent_enc_blk8_avx) RET; SYM_FUNC_END(__serpent_enc_blk8_avx) -.align 8 SYM_FUNC_START_LOCAL(__serpent_dec_blk8_avx) /* input: * %rdi: ctx, CTX
arch/x86/crypto/serpent-avx2-asm_64.S +0 -2
@@ -550,7 +550,6 @@ #define write_blocks(x0, x1, x2, x3, t0, t1, t2) \ transpose_4x4(x0, x1, x2, x3, t0, t1, t2) -.align 8 SYM_FUNC_START_LOCAL(__serpent_enc_blk16) /* input: * %rdi: ctx, CTX
@@ -604,7 +603,6 @@ SYM_FUNC_START_LOCAL(__serpent_enc_blk16) RET; SYM_FUNC_END(__serpent_enc_blk16) -.align 8 SYM_FUNC_START_LOCAL(__serpent_dec_blk16) /* input: * %rdi: ctx, CTX
Peter Zijlstra
maintainerPATCH v3 17/59 crypto: x86/sha1: Remove custom alignments
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
--- arch/x86/crypto/sha1_ni_asm.S | 1 - 1 file changed, 1 deletion(-)
arch/x86/crypto/sha1_ni_asm.S +0 -1
@@ -92,7 +92,6 @@ * numBlocks: Number of blocks to process */ .text -.align 32 SYM_FUNC_START(sha1_ni_transform) push %rbp mov %rsp, %rbp
[tip: x86/core] crypto: x86/sha1: Remove custom alignments
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: c2a3ce6fdb122b12bc4cfffd28ecf8a9fb0d6736 Gitweb: https://git.kernel.org/tip/c2a3ce6fdb122b12bc4cfffd28ecf8a9fb0d6736 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:56 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:01 +02:00
crypto: x86/sha1: Remove custom alignments
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
--- arch/x86/crypto/sha1_ni_asm.S | 1 - 1 file changed, 1 deletion(-)
arch/x86/crypto/sha1_ni_asm.S +0 -1
@@ -92,7 +92,6 @@ * numBlocks: Number of blocks to process */ .text -.align 32 SYM_FUNC_START(sha1_ni_transform) push %rbp mov %rsp, %rbp
Peter Zijlstra
maintainerPATCH v3 18/59 crypto: x86/sha256: Remove custom alignments
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
--- arch/x86/crypto/sha256-avx-asm.S | 1 - arch/x86/crypto/sha256-avx2-asm.S | 1 - arch/x86/crypto/sha256-ssse3-asm.S | 1 - arch/x86/crypto/sha256_ni_asm.S | 1 - 4 files changed, 4 deletions(-)
arch/x86/crypto/sha256-avx-asm.S +0 -1
@@ -347,7 +347,6 @@ a = TMP_ ######################################################################## .text SYM_FUNC_START(sha256_transform_avx) -.align 32 pushq %rbx pushq %r12 pushq %r13
arch/x86/crypto/sha256-avx2-asm.S +0 -1
@@ -524,7 +524,6 @@ STACK_SIZE = _CTX + _CTX_SIZE ######################################################################## .text SYM_FUNC_START(sha256_transform_rorx) -.align 32 pushq %rbx pushq %r12 pushq %r13
arch/x86/crypto/sha256-ssse3-asm.S +0 -1
@@ -356,7 +356,6 @@ a = TMP_ ######################################################################## .text SYM_FUNC_START(sha256_transform_ssse3) -.align 32 pushq %rbx pushq %r12 pushq %r13
arch/x86/crypto/sha256_ni_asm.S +0 -1
@@ -96,7 +96,6 @@ */ .text -.align 32 SYM_FUNC_START(sha256_ni_transform) shl $6, NUM_BLKS /* convert to bytes */
[tip: x86/core] crypto: x86/sha256: Remove custom alignments
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 3ba56d0b87113785413dfc5b9910d45001cc4eeb Gitweb: https://git.kernel.org/tip/3ba56d0b87113785413dfc5b9910d45001cc4eeb Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:57 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:02 +02:00
crypto: x86/sha256: Remove custom alignments
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
--- arch/x86/crypto/sha256-avx-asm.S | 1 - arch/x86/crypto/sha256-avx2-asm.S | 1 - arch/x86/crypto/sha256-ssse3-asm.S | 1 - arch/x86/crypto/sha256_ni_asm.S | 1 - 4 files changed, 4 deletions(-)
arch/x86/crypto/sha256-avx-asm.S +0 -1
@@ -347,7 +347,6 @@ a = TMP_ ######################################################################## .text SYM_FUNC_START(sha256_transform_avx) -.align 32 pushq %rbx pushq %r12 pushq %r13
arch/x86/crypto/sha256-avx2-asm.S +0 -1
@@ -524,7 +524,6 @@ STACK_SIZE = _CTX + _CTX_SIZE ######################################################################## .text SYM_FUNC_START(sha256_transform_rorx) -.align 32 pushq %rbx pushq %r12 pushq %r13
arch/x86/crypto/sha256-ssse3-asm.S +0 -1
@@ -356,7 +356,6 @@ a = TMP_ ######################################################################## .text SYM_FUNC_START(sha256_transform_ssse3) -.align 32 pushq %rbx pushq %r12 pushq %r13
arch/x86/crypto/sha256_ni_asm.S +0 -1
@@ -96,7 +96,6 @@ */ .text -.align 32 SYM_FUNC_START(sha256_ni_transform) shl $6, NUM_BLKS /* convert to bytes */
Peter Zijlstra
maintainerPATCH v3 19/59 crypto: x86/sm[34]: Remove redundant alignments
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
( this code couldn't seem to make up it's mind about what alignment it
actually wanted, randomly mixing 8 and 16 bytes )
--- arch/x86/crypto/sm3-avx-asm_64.S | 1 - arch/x86/crypto/sm4-aesni-avx-asm_64.S | 7 ------- arch/x86/crypto/sm4-aesni-avx2-asm_64.S | 6 ------ 3 files changed, 14 deletions(-)
arch/x86/crypto/sm3-avx-asm_64.S +0 -1
@@ -327,7 +327,6 @@ * void sm3_transform_avx(struct sm3_state *state, * const u8 *data, int nblocks); */ -.align 16 SYM_FUNC_START(sm3_transform_avx) /* input: * %rdi: ctx, CTX
arch/x86/crypto/sm4-aesni-avx-asm_64.S +0 -7
@@ -139,13 +139,11 @@ .text -.align 16 /* * void sm4_aesni_avx_crypt4(const u32 *rk, u8 *dst, * const u8 *src, int nblocks) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_crypt4) /* input: * %rdi: round key array, CTX
@@ -249,7 +247,6 @@ SYM_FUNC_START(sm4_aesni_avx_crypt4) RET; SYM_FUNC_END(sm4_aesni_avx_crypt4) -.align 8 SYM_FUNC_START_LOCAL(__sm4_crypt_blk8) /* input: * %rdi: round key array, CTX
@@ -363,7 +360,6 @@ SYM_FUNC_END(__sm4_crypt_blk8) * void sm4_aesni_avx_crypt8(const u32 *rk, u8 *dst, * const u8 *src, int nblocks) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_crypt8) /* input: * %rdi: round key array, CTX
@@ -419,7 +415,6 @@ SYM_FUNC_END(sm4_aesni_avx_crypt8) * void sm4_aesni_avx_ctr_enc_blk8(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_ctr_enc_blk8) /* input: * %rdi: round key array, CTX
@@ -494,7 +489,6 @@ SYM_FUNC_END(sm4_aesni_avx_ctr_enc_blk8) * void sm4_aesni_avx_cbc_dec_blk8(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_cbc_dec_blk8) /* input: * %rdi: round key array, CTX
@@ -544,7 +538,6 @@ SYM_FUNC_END(sm4_aesni_avx_cbc_dec_blk8) * void sm4_aesni_avx_cfb_dec_blk8(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_cfb_dec_blk8) /* input: * %rdi: round key array, CTX
arch/x86/crypto/sm4-aesni-avx2-asm_64.S +0 -6
@@ -153,9 +153,6 @@ .long 0xdeadbeef, 0xdeadbeef, 0xdeadbeef .text -.align 16 - -.align 8 SYM_FUNC_START_LOCAL(__sm4_crypt_blk16) /* input: * %rdi: round key array, CTX
@@ -281,7 +278,6 @@ SYM_FUNC_END(__sm4_crypt_blk16) * void sm4_aesni_avx2_ctr_enc_blk16(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx2_ctr_enc_blk16) /* input: * %rdi: round key array, CTX
@@ -394,7 +390,6 @@ SYM_FUNC_END(sm4_aesni_avx2_ctr_enc_blk1 * void sm4_aesni_avx2_cbc_dec_blk16(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx2_cbc_dec_blk16) /* input: * %rdi: round key array, CTX
@@ -448,7 +443,6 @@ SYM_FUNC_END(sm4_aesni_avx2_cbc_dec_blk1 * void sm4_aesni_avx2_cfb_dec_blk16(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx2_cfb_dec_blk16) /* input: * %rdi: round key array, CTX
[tip: x86/core] crypto: x86/sm[34]: Remove redundant alignments
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 2f93238b87ddbbe1b050ec48ab5843fc61346adb Gitweb: https://git.kernel.org/tip/2f93238b87ddbbe1b050ec48ab5843fc61346adb Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:58 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:02 +02:00
crypto: x86/sm[34]: Remove redundant alignments
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
( this code couldn't seem to make up it's mind about what alignment it
actually wanted, randomly mixing 8 and 16 bytes )
--- arch/x86/crypto/sm3-avx-asm_64.S | 1 - arch/x86/crypto/sm4-aesni-avx-asm_64.S | 7 ------- arch/x86/crypto/sm4-aesni-avx2-asm_64.S | 6 ------ 3 files changed, 14 deletions(-)
arch/x86/crypto/sm3-avx-asm_64.S +0 -1
@@ -327,7 +327,6 @@ * void sm3_transform_avx(struct sm3_state *state, * const u8 *data, int nblocks); */ -.align 16 SYM_FUNC_START(sm3_transform_avx) /* input: * %rdi: ctx, CTX
arch/x86/crypto/sm4-aesni-avx-asm_64.S +0 -7
@@ -139,13 +139,11 @@ .text -.align 16 /* * void sm4_aesni_avx_crypt4(const u32 *rk, u8 *dst, * const u8 *src, int nblocks) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_crypt4) /* input: * %rdi: round key array, CTX
@@ -249,7 +247,6 @@ SYM_FUNC_START(sm4_aesni_avx_crypt4) RET; SYM_FUNC_END(sm4_aesni_avx_crypt4) -.align 8 SYM_FUNC_START_LOCAL(__sm4_crypt_blk8) /* input: * %rdi: round key array, CTX
@@ -363,7 +360,6 @@ SYM_FUNC_END(__sm4_crypt_blk8) * void sm4_aesni_avx_crypt8(const u32 *rk, u8 *dst, * const u8 *src, int nblocks) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_crypt8) /* input: * %rdi: round key array, CTX
@@ -419,7 +415,6 @@ SYM_FUNC_END(sm4_aesni_avx_crypt8) * void sm4_aesni_avx_ctr_enc_blk8(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_ctr_enc_blk8) /* input: * %rdi: round key array, CTX
@@ -494,7 +489,6 @@ SYM_FUNC_END(sm4_aesni_avx_ctr_enc_blk8) * void sm4_aesni_avx_cbc_dec_blk8(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_cbc_dec_blk8) /* input: * %rdi: round key array, CTX
@@ -544,7 +538,6 @@ SYM_FUNC_END(sm4_aesni_avx_cbc_dec_blk8) * void sm4_aesni_avx_cfb_dec_blk8(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx_cfb_dec_blk8) /* input: * %rdi: round key array, CTX
arch/x86/crypto/sm4-aesni-avx2-asm_64.S +0 -6
@@ -153,9 +153,6 @@ .long 0xdeadbeef, 0xdeadbeef, 0xdeadbeef .text -.align 16 - -.align 8 SYM_FUNC_START_LOCAL(__sm4_crypt_blk16) /* input: * %rdi: round key array, CTX
@@ -281,7 +278,6 @@ SYM_FUNC_END(__sm4_crypt_blk16) * void sm4_aesni_avx2_ctr_enc_blk16(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx2_ctr_enc_blk16) /* input: * %rdi: round key array, CTX
@@ -394,7 +390,6 @@ SYM_FUNC_END(sm4_aesni_avx2_ctr_enc_blk16) * void sm4_aesni_avx2_cbc_dec_blk16(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx2_cbc_dec_blk16) /* input: * %rdi: round key array, CTX
@@ -448,7 +443,6 @@ SYM_FUNC_END(sm4_aesni_avx2_cbc_dec_blk16) * void sm4_aesni_avx2_cfb_dec_blk16(const u32 *rk, u8 *dst, * const u8 *src, u8 *iv) */ -.align 8 SYM_FUNC_START(sm4_aesni_avx2_cfb_dec_blk16) /* input: * %rdi: round key array, CTX
Peter Zijlstra
maintainerPATCH v3 20/59 crypto: twofish: Remove redundant alignments
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/twofish-avx-x86_64-asm_64.S | 2 -- 1 file changed, 2 deletions(-)
arch/x86/crypto/twofish-avx-x86_64-asm_64.S +0 -2
@@ -228,7 +228,6 @@ vpxor x2, wkey, x2; \ vpxor x3, wkey, x3; -.align 8 SYM_FUNC_START_LOCAL(__twofish_enc_blk8) /* input: * %rdi: ctx, CTX
@@ -270,7 +269,6 @@ SYM_FUNC_START_LOCAL(__twofish_enc_blk8) RET; SYM_FUNC_END(__twofish_enc_blk8) -.align 8 SYM_FUNC_START_LOCAL(__twofish_dec_blk8) /* input: * %rdi: ctx, CTX
[tip: x86/core] crypto: twofish: Remove redundant alignments
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: e2c9475e88f70820270ca5cc81a1ae2fda262278 Gitweb: https://git.kernel.org/tip/e2c9475e88f70820270ca5cc81a1ae2fda262278 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:10:59 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:03 +02:00
crypto: twofish: Remove redundant alignments
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous.
--- arch/x86/crypto/twofish-avx-x86_64-asm_64.S | 2 -- 1 file changed, 2 deletions(-)
arch/x86/crypto/twofish-avx-x86_64-asm_64.S +0 -2
@@ -228,7 +228,6 @@ vpxor x2, wkey, x2; \ vpxor x3, wkey, x3; -.align 8 SYM_FUNC_START_LOCAL(__twofish_enc_blk8) /* input: * %rdi: ctx, CTX
@@ -270,7 +269,6 @@ SYM_FUNC_START_LOCAL(__twofish_enc_blk8) RET; SYM_FUNC_END(__twofish_enc_blk8) -.align 8 SYM_FUNC_START_LOCAL(__twofish_dec_blk8) /* input: * %rdi: ctx, CTX
Peter Zijlstra
maintainerPATCH v3 21/59 crypto: x86/poly1305: Remove custom function alignment
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
--- arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 1 - 1 file changed, 1 deletion(-)
arch/x86/crypto/poly1305-x86_64-cryptogams.pl +0 -1
@@ -108,7 +108,6 @@ if (!$kernel) { sub declare_function() { my ($name, $align, $nargs) = @_; if($kernel) { - $code .= ".align $align\n"; $code .= "SYM_FUNC_START($name)\n"; $code .= ".L$name:\n"; } else {
[tip: x86/core] crypto: x86/poly1305: Remove custom function alignment
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: fdc9ee7e97aa2c1dfa7ebb092fffec40ffa59108 Gitweb: https://git.kernel.org/tip/fdc9ee7e97aa2c1dfa7ebb092fffec40ffa59108 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:00 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:03 +02:00
crypto: x86/poly1305: Remove custom function alignment
SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes.
--- arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 1 - 1 file changed, 1 deletion(-)
arch/x86/crypto/poly1305-x86_64-cryptogams.pl +0 -1
@@ -108,7 +108,6 @@ if (!$kernel) { sub declare_function() { my ($name, $align, $nargs) = @_; if($kernel) { - $code .= ".align $align\n"; $code .= "SYM_FUNC_START($name)\n"; $code .= ".L$name:\n"; } else {
Peter Zijlstra
maintainerPATCH v3 22/59 x86: Put hot per CPU variables into a struct
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
The layout of per-cpu variables is at the mercy of the compiler. This can lead to random performance fluctuations from build to build.
Create a structure to hold some of the hottest per-cpu variables, starting with current_task.
--- arch/x86/include/asm/current.h | 19 ++++++++++++++++--- arch/x86/kernel/cpu/common.c | 14 +++++--------- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- 5 files changed, 24 insertions(+), 15 deletions(-)
arch/x86/include/asm/current.h +16 -3
@@ -3,16 +3,29 @@#define _ASM_X86_CURRENT_H#include <linux/compiler.h> -#include <asm/percpu.h> #ifndef __ASSEMBLY__ + +#include <linux/cache.h> +#include <asm/percpu.h> +struct task_struct ; -DECLARE_PER_CPU(struct task_struct *, current_task); +struct pcpu_hot { +union { +struct { +struct task_struct *current_task; + }; +u8 pad[64 ]; + }; +}; +static_assert (sizeof (struct pcpu_hot ) ==64 ); + +DECLARE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot); static __always_inline struct task_struct *get_current(void) { -return this_cpu_read_stable (current_task); +return this_cpu_read_stable (pcpu_hot.current_task); }#define current get_current()
arch/x86/kernel/cpu/common.c +5 -9
@@ -2000,18 +2000,16 @@ static __init int setup_clearcpuid(char }__setup ("clearcpuid=" , setup_clearcpuid); +DEFINE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot) = { + .current_task = &init_task, +}; +EXPORT_PER_CPU_SYMBOL (pcpu_hot); +#ifdef CONFIG_X86_64 DEFINE_PER_CPU_FIRST(struct fixed_percpu_data, fixed_percpu_data)__aligned(PAGE_SIZE) __visible;EXPORT_PER_CPU_SYMBOL_GPL (fixed_percpu_data); -/* -* The following percpu variables are hot. Align current_task to -* cacheline size such that they fall in the same cacheline. -*/ -DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned = - &init_task; -EXPORT_PER_CPU_SYMBOL (current_task); DEFINE_PER_CPU(void *, hardirq_stack_ptr);DEFINE_PER_CPU (bool, hardirq_stack_inuse);
@@ -2071,8 +2069,6 @@ void syscall_init(void)#else /* CONFIG_X86_64 */ -DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task; -EXPORT_PER_CPU_SYMBOL (current_task);DEFINE_PER_CPU (int, __preempt_count) =INIT_PREEMPT_COUNT ;EXPORT_PER_CPU_SYMBOL (__preempt_count);
arch/x86/kernel/process_32.c +1 -1
@@ -207,7 +207,7 @@ EXPORT_SYMBOL_GPL(start_thread);if (prev->gs | next->gs)loadsegment (gs, next->gs); -this_cpu_write (current_task, next_p); +raw_cpu_write (pcpu_hot.current_task, next_p);switch_fpu_finish ();
arch/x86/kernel/process_64.c +1 -1
@@ -616,7 +616,7 @@ void compat_start_thread(struct pt_regs/* * Switch the PDA and FPU contexts. */ -this_cpu_write (current_task, next_p); +raw_cpu_write (pcpu_hot.current_task, next_p);this_cpu_write (cpu_current_top_of_stack,task_top_of_stack (next_p));switch_fpu_finish ();
arch/x86/kernel/smpboot.c +1 -1
@@ -1046,7 +1046,7 @@ int common_cpu_up(unsigned int cpu, stru/* Just in case we booted with a single CPU. */ alternatives_enable_smp (); -per_cpu (current_task, cpu) = idle; +per_cpu (pcpu_hot.current_task, cpu) = idle;cpu_init_stack_canary (cpu, idle);/* Initialize the interrupt stack(s) */
[tip: x86/core] x86: Put hot per CPU variables into a struct
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: e57ef2ed97c1d078973298658a8096644a1e9e09 Gitweb: https://git.kernel.org/tip/e57ef2ed97c1d078973298658a8096644a1e9e09 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:01 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:03 +02:00
x86: Put hot per CPU variables into a struct
The layout of per-cpu variables is at the mercy of the compiler. This can lead to random performance fluctuations from build to build.
Create a structure to hold some of the hottest per-cpu variables, starting with current_task.
--- arch/x86/include/asm/current.h | 19 ++++++++++++++++--- arch/x86/kernel/cpu/common.c | 14 +++++--------- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- 5 files changed, 24 insertions(+), 15 deletions(-)
arch/x86/include/asm/current.h +16 -3
@@ -3,16 +3,29 @@#define _ASM_X86_CURRENT_H#include <linux/compiler.h> -#include <asm/percpu.h> #ifndef __ASSEMBLY__ + +#include <linux/cache.h> +#include <asm/percpu.h> +struct task_struct ; -DECLARE_PER_CPU(struct task_struct *, current_task); +struct pcpu_hot { +union { +struct { +struct task_struct *current_task; + }; +u8 pad[64 ]; + }; +}; +static_assert (sizeof (struct pcpu_hot ) ==64 ); + +DECLARE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot); static __always_inline struct task_struct *get_current(void) { -return this_cpu_read_stable (current_task); +return this_cpu_read_stable (pcpu_hot.current_task); }#define current get_current()
arch/x86/kernel/cpu/common.c +5 -9
@@ -2012,18 +2012,16 @@ static __init int setup_clearcpuid(char *arg) }__setup ("clearcpuid=" , setup_clearcpuid); +DEFINE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot) = { + .current_task = &init_task, +}; +EXPORT_PER_CPU_SYMBOL (pcpu_hot); +#ifdef CONFIG_X86_64 DEFINE_PER_CPU_FIRST(struct fixed_percpu_data, fixed_percpu_data)__aligned(PAGE_SIZE) __visible;EXPORT_PER_CPU_SYMBOL_GPL (fixed_percpu_data); -/* -* The following percpu variables are hot. Align current_task to -* cacheline size such that they fall in the same cacheline. -*/ -DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned = - &init_task; -EXPORT_PER_CPU_SYMBOL (current_task); DEFINE_PER_CPU(void *, hardirq_stack_ptr);DEFINE_PER_CPU (bool, hardirq_stack_inuse);
@@ -2083,8 +2081,6 @@ void syscall_init(void)#else /* CONFIG_X86_64 */ -DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task; -EXPORT_PER_CPU_SYMBOL (current_task);DEFINE_PER_CPU (int, __preempt_count) =INIT_PREEMPT_COUNT ;EXPORT_PER_CPU_SYMBOL (__preempt_count);
arch/x86/kernel/process_32.c +1 -1
@@ -207,7 +207,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)if (prev->gs | next->gs)loadsegment (gs, next->gs); -this_cpu_write (current_task, next_p); +raw_cpu_write (pcpu_hot.current_task, next_p);switch_fpu_finish ();
arch/x86/kernel/process_64.c +1 -1
@@ -617,7 +617,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)/* * Switch the PDA and FPU contexts. */ -this_cpu_write (current_task, next_p); +raw_cpu_write (pcpu_hot.current_task, next_p);this_cpu_write (cpu_current_top_of_stack,task_top_of_stack (next_p));switch_fpu_finish ();
arch/x86/kernel/smpboot.c +1 -1
@@ -1046,7 +1046,7 @@ int common_cpu_up(unsigned int cpu, struct task_struct *idle)/* Just in case we booted with a single CPU. */ alternatives_enable_smp (); -per_cpu (current_task, cpu) = idle; +per_cpu (pcpu_hot.current_task, cpu) = idle;cpu_init_stack_canary (cpu, idle);/* Initialize the interrupt stack(s) */
Peter Zijlstra
maintainerPATCH v3 23/59 x86/percpu: Move preempt_count next to current_task
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Add preempt_count to pcpu_hot, since it is once of the most used per-cpu variables.
--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/preempt.h | 27 ++++++++++++++------------- arch/x86/kernel/cpu/common.c | 8 +------- 3 files changed, 16 insertions(+), 20 deletions(-)
arch/x86/include/asm/current.h +1 -0
@@ -15,6 +15,7 @@ struct pcpu_hot {union {struct {struct task_struct *current_task; +int preempt_count; };u8 pad[64 ]; };
arch/x86/include/asm/preempt.h +14 -13
@@ -4,11 +4,11 @@#include <asm/rmwcc.h> #include <asm/percpu.h> +#include <asm/current.h> +#include <linux/thread_info.h> #include <linux/static_call_types.h> -DECLARE_PER_CPU (int, __preempt_count); -/* We use the MSB mostly because its available */ #define PREEMPT_NEED_RESCHED 0x80000000
@@ -24,7 +24,7 @@ DECLARE_PER_CPU(int, __preempt_count);*/ static __always_inline int preempt_count(void) { -return raw_cpu_read_4 (__preempt_count) & ~PREEMPT_NEED_RESCHED ; +return raw_cpu_read_4 (pcpu_hot.preempt_count) & ~PREEMPT_NEED_RESCHED ; } static __always_inline void preempt_count_set(int pc)
@@ -32,10 +32,10 @@ static __always_inline void preempt_counint old, new;do { - old =raw_cpu_read_4 (__preempt_count); + old =raw_cpu_read_4 (pcpu_hot.preempt_count); new = (old &PREEMPT_NEED_RESCHED ) | (pc & ~PREEMPT_NEED_RESCHED ); - }while (raw_cpu_cmpxchg_4 (__preempt_count, old, new) != old); + }while (raw_cpu_cmpxchg_4 (pcpu_hot.preempt_count, old, new) != old); }/*
@@ -44,7 +44,7 @@ static __always_inline void preempt_coun#define init_task_preempt_count (p) do { } while (0)#define init_idle_preempt_count (p, cpu) do { \ - per_cpu(__preempt_count, (cpu)) = PREEMPT_DISABLED; \ + per_cpu(pcpu_hot.preempt_count, (cpu)) = PREEMPT_DISABLED; \ } while (0)/*
@@ -58,17 +58,17 @@ static __always_inline void preempt_coun static __always_inline void set_preempt_need_resched(void) { -raw_cpu_and_4 (__preempt_count, ~PREEMPT_NEED_RESCHED ); +raw_cpu_and_4 (pcpu_hot.preempt_count, ~PREEMPT_NEED_RESCHED ); } static __always_inline void clear_preempt_need_resched(void) { -raw_cpu_or_4 (__preempt_count,PREEMPT_NEED_RESCHED ); +raw_cpu_or_4 (pcpu_hot.preempt_count,PREEMPT_NEED_RESCHED ); } static __always_inline bool test_preempt_need_resched(void) { -return !(raw_cpu_read_4 (__preempt_count) &PREEMPT_NEED_RESCHED ); +return !(raw_cpu_read_4 (pcpu_hot.preempt_count) &PREEMPT_NEED_RESCHED ); }/*
@@ -77,12 +77,12 @@ static __always_inline bool test_preempt static __always_inline void __preempt_count_add(int val) { -raw_cpu_add_4 (__preempt_count, val); +raw_cpu_add_4 (pcpu_hot.preempt_count, val); } static __always_inline void __preempt_count_sub(int val) { -raw_cpu_add_4 (__preempt_count, -val); +raw_cpu_add_4 (pcpu_hot.preempt_count, -val); }/*
@@ -92,7 +92,8 @@ static __always_inline void __preempt_co*/ static __always_inline bool __preempt_count_dec_and_test(void) { - return GEN_UNARY_RMWcc("decl", __preempt_count, e, __percpu_arg([var])); +return GEN_UNARY_RMWcc ("decl" , pcpu_hot.preempt_count, e, + __percpu_arg([var])); }/*
@@ -100,7 +101,7 @@ static __always_inline bool __preempt_co*/ static __always_inline bool should_resched(int preempt_offset) { -return unlikely (raw_cpu_read_4 (__preempt_count) == preempt_offset); +return unlikely (raw_cpu_read_4 (pcpu_hot.preempt_count) == preempt_offset); }#ifdef CONFIG_PREEMPTION
arch/x86/kernel/cpu/common.c +1 -7
@@ -2002,6 +2002,7 @@ static __init int setup_clearcpuid(char DEFINE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot) = { .current_task = &init_task, + .preempt_count =INIT_PREEMPT_COUNT , };EXPORT_PER_CPU_SYMBOL (pcpu_hot);
@@ -2010,13 +2011,9 @@ DEFINE_PER_CPU_FIRST(struct fixed_percpu fixed_percpu_data) __aligned(PAGE_SIZE) __visible;EXPORT_PER_CPU_SYMBOL_GPL (fixed_percpu_data); - DEFINE_PER_CPU(void *, hardirq_stack_ptr);DEFINE_PER_CPU (bool, hardirq_stack_inuse); -DEFINE_PER_CPU (int, __preempt_count) =INIT_PREEMPT_COUNT ; -EXPORT_PER_CPU_SYMBOL (__preempt_count); - DEFINE_PER_CPU(unsigned long, cpu_current_top_of_stack) = TOP_OF_INIT_STACK;static void wrmsrl_cstar (unsigned long val)
@@ -2069,9 +2066,6 @@ void syscall_init(void)#else /* CONFIG_X86_64 */ -DEFINE_PER_CPU (int, __preempt_count) =INIT_PREEMPT_COUNT ; -EXPORT_PER_CPU_SYMBOL (__preempt_count); -/* * On x86_32, vm86 modifies tss.sp0, so sp0 isn't a reliable way to find * the top of the kernel stack. Use an extra percpu variable to track the
[tip: x86/core] x86/percpu: Move preempt_count next to current_task
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 64701838bf0575ef8acb1ad2db5934e864f3e6c3 Gitweb: https://git.kernel.org/tip/64701838bf0575ef8acb1ad2db5934e864f3e6c3 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:02 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:04 +02:00
x86/percpu: Move preempt_count next to current_task
Add preempt_count to pcpu_hot, since it is once of the most used per-cpu variables.
--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/preempt.h | 27 ++++++++++++++------------- arch/x86/kernel/cpu/common.c | 8 +------- 3 files changed, 16 insertions(+), 20 deletions(-)
arch/x86/include/asm/current.h +1 -0
@@ -15,6 +15,7 @@ struct pcpu_hot {union {struct {struct task_struct *current_task; +int preempt_count; };u8 pad[64 ]; };
arch/x86/include/asm/preempt.h +14 -13
@@ -4,11 +4,11 @@#include <asm/rmwcc.h> #include <asm/percpu.h> +#include <asm/current.h> +#include <linux/thread_info.h> #include <linux/static_call_types.h> -DECLARE_PER_CPU (int, __preempt_count); -/* We use the MSB mostly because its available */ #define PREEMPT_NEED_RESCHED 0x80000000
@@ -24,7 +24,7 @@ DECLARE_PER_CPU(int, __preempt_count);*/ static __always_inline int preempt_count(void) { -return raw_cpu_read_4 (__preempt_count) & ~PREEMPT_NEED_RESCHED ; +return raw_cpu_read_4 (pcpu_hot.preempt_count) & ~PREEMPT_NEED_RESCHED ; } static __always_inline void preempt_count_set(int pc)
@@ -32,10 +32,10 @@ static __always_inline void preempt_count_set(int pc)int old, new;do { - old =raw_cpu_read_4 (__preempt_count); + old =raw_cpu_read_4 (pcpu_hot.preempt_count); new = (old &PREEMPT_NEED_RESCHED ) | (pc & ~PREEMPT_NEED_RESCHED ); - }while (raw_cpu_cmpxchg_4 (__preempt_count, old, new) != old); + }while (raw_cpu_cmpxchg_4 (pcpu_hot.preempt_count, old, new) != old); }/*
@@ -44,7 +44,7 @@ static __always_inline void preempt_count_set(int pc)#define init_task_preempt_count (p) do { } while (0)#define init_idle_preempt_count (p, cpu) do { \ - per_cpu(__preempt_count, (cpu)) = PREEMPT_DISABLED; \ + per_cpu(pcpu_hot.preempt_count, (cpu)) = PREEMPT_DISABLED; \ } while (0)/*
@@ -58,17 +58,17 @@ static __always_inline void preempt_count_set(int pc) static __always_inline void set_preempt_need_resched(void) { -raw_cpu_and_4 (__preempt_count, ~PREEMPT_NEED_RESCHED ); +raw_cpu_and_4 (pcpu_hot.preempt_count, ~PREEMPT_NEED_RESCHED ); } static __always_inline void clear_preempt_need_resched(void) { -raw_cpu_or_4 (__preempt_count,PREEMPT_NEED_RESCHED ); +raw_cpu_or_4 (pcpu_hot.preempt_count,PREEMPT_NEED_RESCHED ); } static __always_inline bool test_preempt_need_resched(void) { -return !(raw_cpu_read_4 (__preempt_count) &PREEMPT_NEED_RESCHED ); +return !(raw_cpu_read_4 (pcpu_hot.preempt_count) &PREEMPT_NEED_RESCHED ); }/*
@@ -77,12 +77,12 @@ static __always_inline bool test_preempt_need_resched(void) static __always_inline void __preempt_count_add(int val) { -raw_cpu_add_4 (__preempt_count, val); +raw_cpu_add_4 (pcpu_hot.preempt_count, val); } static __always_inline void __preempt_count_sub(int val) { -raw_cpu_add_4 (__preempt_count, -val); +raw_cpu_add_4 (pcpu_hot.preempt_count, -val); }/*
@@ -92,7 +92,8 @@ static __always_inline void __preempt_count_sub(int val)*/ static __always_inline bool __preempt_count_dec_and_test(void) { - return GEN_UNARY_RMWcc("decl", __preempt_count, e, __percpu_arg([var])); +return GEN_UNARY_RMWcc ("decl" , pcpu_hot.preempt_count, e, + __percpu_arg([var])); }/*
@@ -100,7 +101,7 @@ static __always_inline bool __preempt_count_dec_and_test(void)*/ static __always_inline bool should_resched(int preempt_offset) { -return unlikely (raw_cpu_read_4 (__preempt_count) == preempt_offset); +return unlikely (raw_cpu_read_4 (pcpu_hot.preempt_count) == preempt_offset); }#ifdef CONFIG_PREEMPTION
arch/x86/kernel/cpu/common.c +1 -7
@@ -2014,6 +2014,7 @@ __setup("clearcpuid=", setup_clearcpuid); DEFINE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot) = { .current_task = &init_task, + .preempt_count =INIT_PREEMPT_COUNT , };EXPORT_PER_CPU_SYMBOL (pcpu_hot);
@@ -2022,13 +2023,9 @@ DEFINE_PER_CPU_FIRST(struct fixed_percpu_data, fixed_percpu_data) __aligned(PAGE_SIZE) __visible;EXPORT_PER_CPU_SYMBOL_GPL (fixed_percpu_data); - DEFINE_PER_CPU(void *, hardirq_stack_ptr);DEFINE_PER_CPU (bool, hardirq_stack_inuse); -DEFINE_PER_CPU (int, __preempt_count) =INIT_PREEMPT_COUNT ; -EXPORT_PER_CPU_SYMBOL (__preempt_count); - DEFINE_PER_CPU(unsigned long, cpu_current_top_of_stack) = TOP_OF_INIT_STACK;static void wrmsrl_cstar (unsigned long val)
@@ -2081,9 +2078,6 @@ void syscall_init(void)#else /* CONFIG_X86_64 */ -DEFINE_PER_CPU (int, __preempt_count) =INIT_PREEMPT_COUNT ; -EXPORT_PER_CPU_SYMBOL (__preempt_count); -/* * On x86_32, vm86 modifies tss.sp0, so sp0 isn't a reliable way to find * the top of the kernel stack. Use an extra percpu variable to track the
Peter Zijlstra
maintainerPATCH v3 24/59 x86/percpu: Move cpu_number next to current_task
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Also add cpu_number to the pcpu_hot structure, it is often referenced and this cacheline is there.
--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/smp.h | 12 +++++------- arch/x86/kernel/setup_percpu.c | 5 +---- 3 files changed, 7 insertions(+), 11 deletions(-)
arch/x86/include/asm/current.h +1 -0
@@ -16,6 +16,7 @@ struct pcpu_hot {struct {struct task_struct *current_task;int preempt_count; +int cpu_number; };u8 pad[64 ]; };
arch/x86/include/asm/smp.h +5 -7
@@ -3,10 +3,10 @@#define _ASM_X86_SMP_H#ifndef __ASSEMBLY__#include <linux/cpumask.h> -#include <asm/percpu.h> -#include <asm/thread_info.h> #include <asm/cpumask.h> +#include <asm/current.h> +#include <asm/thread_info.h> extern int smp_num_siblings;extern unsigned int num_processors;
@@ -19,7 +19,6 @@ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_DECLARE_PER_CPU_READ_MOSTLY (cpumask_var_t, cpu_l2c_shared_map);DECLARE_PER_CPU_READ_MOSTLY (u16, cpu_llc_id);DECLARE_PER_CPU_READ_MOSTLY (u16, cpu_l2c_id); -DECLARE_PER_CPU_READ_MOSTLY (int, cpu_number);static inline struct cpumask *cpu_llc_shared_mask (int cpu) {
@@ -160,11 +159,10 @@ asmlinkage __visible void smp_reboot_int/* * This function is needed by all SMP systems. It must _always_ be valid -* from the initial startup. We map APIC_BASE very early in page_setup(), -* so this is correct in the x86 case. +* from the initial startup. */ -#define raw_smp_processor_id () this_cpu_read(cpu_number) -#define __smp_processor_id () __this_cpu_read(cpu_number) +#define raw_smp_processor_id () this_cpu_read(pcpu_hot.cpu_number) +#define __smp_processor_id () __this_cpu_read(pcpu_hot.cpu_number)#ifdef CONFIG_X86_32 extern int safe_smp_processor_id (void );
arch/x86/kernel/setup_percpu.c +1 -4
@@ -23,9 +23,6 @@#include <asm/cpu.h> #include <asm/stackprotector.h> -DEFINE_PER_CPU_READ_MOSTLY (int, cpu_number); -EXPORT_PER_CPU_SYMBOL (cpu_number); -#ifdef CONFIG_X86_64 #define BOOT_PERCPU_OFFSET ((unsigned long)__per_cpu_load)#else
@@ -172,7 +169,7 @@ void __init setup_per_cpu_areas(void)for_each_possible_cpu (cpu) {per_cpu_offset (cpu) = delta + pcpu_unit_offsets[cpu];per_cpu (this_cpu_off, cpu) =per_cpu_offset (cpu); -per_cpu (cpu_number, cpu) = cpu; +per_cpu (pcpu_hot.cpu_number, cpu) = cpu;setup_percpu_segment (cpu);/* * Copy data used in early init routines from the
[tip: x86/core] x86/percpu: Move cpu_number next to current_task
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 7443b296e699e6922f5be243c8d2e316de8cacbe Gitweb: https://git.kernel.org/tip/7443b296e699e6922f5be243c8d2e316de8cacbe Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:03 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:04 +02:00
x86/percpu: Move cpu_number next to current_task
Also add cpu_number to the pcpu_hot structure, it is often referenced and this cacheline is there.
--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/smp.h | 12 +++++------- arch/x86/kernel/setup_percpu.c | 5 +---- 3 files changed, 7 insertions(+), 11 deletions(-)
arch/x86/include/asm/current.h +1 -0
@@ -16,6 +16,7 @@ struct pcpu_hot {struct {struct task_struct *current_task;int preempt_count; +int cpu_number; };u8 pad[64 ]; };
arch/x86/include/asm/smp.h +5 -7
@@ -3,10 +3,10 @@#define _ASM_X86_SMP_H#ifndef __ASSEMBLY__#include <linux/cpumask.h> -#include <asm/percpu.h> -#include <asm/thread_info.h> #include <asm/cpumask.h> +#include <asm/current.h> +#include <asm/thread_info.h> extern int smp_num_siblings;extern unsigned int num_processors;
@@ -19,7 +19,6 @@ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);DECLARE_PER_CPU_READ_MOSTLY (cpumask_var_t, cpu_l2c_shared_map);DECLARE_PER_CPU_READ_MOSTLY (u16, cpu_llc_id);DECLARE_PER_CPU_READ_MOSTLY (u16, cpu_l2c_id); -DECLARE_PER_CPU_READ_MOSTLY (int, cpu_number);DECLARE_EARLY_PER_CPU_READ_MOSTLY (u16, x86_cpu_to_apicid);DECLARE_EARLY_PER_CPU_READ_MOSTLY (u32, x86_cpu_to_acpiid);
@@ -150,11 +149,10 @@ __visible void smp_call_function_single_interrupt(struct pt_regs *r);/* * This function is needed by all SMP systems. It must _always_ be valid -* from the initial startup. We map APIC_BASE very early in page_setup(), -* so this is correct in the x86 case. +* from the initial startup. */ -#define raw_smp_processor_id () this_cpu_read(cpu_number) -#define __smp_processor_id () __this_cpu_read(cpu_number) +#define raw_smp_processor_id () this_cpu_read(pcpu_hot.cpu_number) +#define __smp_processor_id () __this_cpu_read(pcpu_hot.cpu_number)#ifdef CONFIG_X86_32 extern int safe_smp_processor_id (void );
arch/x86/kernel/setup_percpu.c +1 -4
@@ -23,9 +23,6 @@#include <asm/cpu.h> #include <asm/stackprotector.h> -DEFINE_PER_CPU_READ_MOSTLY (int, cpu_number); -EXPORT_PER_CPU_SYMBOL (cpu_number); -#ifdef CONFIG_X86_64 #define BOOT_PERCPU_OFFSET ((unsigned long)__per_cpu_load)#else
@@ -172,7 +169,7 @@ void __init setup_per_cpu_areas(void)for_each_possible_cpu (cpu) {per_cpu_offset (cpu) = delta + pcpu_unit_offsets[cpu];per_cpu (this_cpu_off, cpu) =per_cpu_offset (cpu); -per_cpu (cpu_number, cpu) = cpu; +per_cpu (pcpu_hot.cpu_number, cpu) = cpu;setup_percpu_segment (cpu);/* * Copy data used in early init routines from the
Peter Zijlstra
maintainerPATCH v3 25/59 x86/percpu: Move current_top_of_stack next to current_task
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Extend the struct pcpu_hot cacheline with current_top_of_stack; another very frequently used value.
--- arch/x86/entry/entry_32.S | 4 ++-- arch/x86/entry/entry_64.S | 6 +++--- arch/x86/entry/entry_64_compat.S | 6 +++--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/processor.h | 4 +--- arch/x86/kernel/asm-offsets.c | 2 ++ arch/x86/kernel/cpu/common.c | 12 +----------- arch/x86/kernel/process_32.c | 4 ++-- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- 11 files changed, 19 insertions(+), 28 deletions(-)
arch/x86/entry/entry_32.S +2 -2
@@ -1181,7 +1181,7 @@ SYM_CODE_START(asm_exc_nmi) * is using the thread stack right now, so it's safe for us to use it. */ movl %esp, %ebx - movl PER_CPU_VAR(cpu_current_top_of_stack), %esp + movl PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %esp call exc_nmi movl %ebx, %esp
@@ -1243,7 +1243,7 @@ SYM_CODE_START(rewind_stack_and_make_dea /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp - movl PER_CPU_VAR(cpu_current_top_of_stack), %esi + movl PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %esi leal -TOP_OF_KERNEL_STACK_PADDING-PTREGS_SIZE(%esi), %esp call make_task_dead
arch/x86/entry/entry_64.S +3 -3
@@ -92,7 +92,7 @@ SYM_CODE_START(entry_SYSCALL_64) /* tss.sp2 is scratch space. */ movq %rsp, PER_CPU_VAR(cpu_tss_rw + TSS_sp2) SWITCH_TO_KERNEL_CR3 scratch_reg=%rsp - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp SYM_INNER_LABEL(entry_SYSCALL_64_safe_stack, SYM_L_GLOBAL) ANNOTATE_NOENDBR
@@ -1209,7 +1209,7 @@ SYM_CODE_START(asm_exc_nmi) FENCE_SWAPGS_USER_ENTRY SWITCH_TO_KERNEL_CR3 scratch_reg=%rdx movq %rsp, %rdx - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp UNWIND_HINT_IRET_REGS base=%rdx offset=8 pushq 5*8(%rdx) /* pt_regs->ss */ pushq 4*8(%rdx) /* pt_regs->rsp */
@@ -1525,7 +1525,7 @@ SYM_CODE_START_NOALIGN(rewind_stack_and_ /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp - movq PER_CPU_VAR(cpu_current_top_of_stack), %rax + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rax leaq -PTREGS_SIZE(%rax), %rsp UNWIND_HINT_REGS
arch/x86/entry/entry_64_compat.S +3 -3
@@ -58,7 +58,7 @@ SYM_CODE_START(entry_SYSENTER_compat) SWITCH_TO_KERNEL_CR3 scratch_reg=%rax popq %rax - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp /* Construct struct pt_regs on stack */ pushq $__USER32_DS /* pt_regs->ss */
@@ -191,7 +191,7 @@ SYM_CODE_START(entry_SYSCALL_compat) SWITCH_TO_KERNEL_CR3 scratch_reg=%rsp /* Switch to the kernel stack */ - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp SYM_INNER_LABEL(entry_SYSCALL_compat_safe_stack, SYM_L_GLOBAL) ANNOTATE_NOENDBR
@@ -332,7 +332,7 @@ SYM_CODE_START(entry_INT80_compat) ALTERNATIVE "", "jmp .Lint80_keep_stack", X86_FEATURE_XENPV movq %rsp, %rax - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp pushq 5*8(%rax) /* regs->ss */ pushq 4*8(%rax) /* regs->rsp */
arch/x86/include/asm/current.h +1 -0
@@ -17,6 +17,7 @@ struct pcpu_hot {struct task_struct *current_task;int preempt_count;int cpu_number; +unsigned long top_of_stack; };u8 pad[64 ]; };
arch/x86/include/asm/processor.h +1 -3
@@ -426,8 +426,6 @@ struct irq_stack {char stack[IRQ_STACK_SIZE ]; }__aligned(IRQ_STACK_SIZE) ; -DECLARE_PER_CPU(unsigned long, cpu_current_top_of_stack); -#ifdef CONFIG_X86_64 struct fixed_percpu_data {/*
@@ -566,7 +564,7 @@ static __always_inline unsigned long cur* and around vm86 mode and sp0 on x86_64 is special because of the * entry trampoline. */ -return this_cpu_read_stable (cpu_current_top_of_stack); +return this_cpu_read_stable (pcpu_hot.top_of_stack); } static __always_inline bool on_thread_stack(void)
arch/x86/kernel/asm-offsets.c +2 -0
@@ -109,6 +109,8 @@ static void __used common(void)OFFSET (TSS_sp1, tss_struct, x86_tss.sp1);OFFSET (TSS_sp2, tss_struct, x86_tss.sp2); +OFFSET (X86_top_of_stack, pcpu_hot, top_of_stack); +if (IS_ENABLED (CONFIG_KVM_INTEL )) {BLANK ();OFFSET (VMX_spec_ctrl, vcpu_vmx, spec_ctrl);
arch/x86/kernel/cpu/common.c +1 -11
@@ -2003,6 +2003,7 @@ static __init int setup_clearcpuid(char DEFINE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot) = { .current_task = &init_task, .preempt_count =INIT_PREEMPT_COUNT , + .top_of_stack =TOP_OF_INIT_STACK , };EXPORT_PER_CPU_SYMBOL (pcpu_hot);
@@ -2014,8 +2015,6 @@ EXPORT_PER_CPU_SYMBOL_GPL(fixed_percpu_d DEFINE_PER_CPU(void *, hardirq_stack_ptr);DEFINE_PER_CPU (bool, hardirq_stack_inuse); -DEFINE_PER_CPU(unsigned long, cpu_current_top_of_stack) = TOP_OF_INIT_STACK; -static void wrmsrl_cstar (unsigned long val) {/*
@@ -2066,15 +2065,6 @@ void syscall_init(void)#else /* CONFIG_X86_64 */ -/* -* On x86_32, vm86 modifies tss.sp0, so sp0 isn't a reliable way to find -* the top of the kernel stack. Use an extra percpu variable to track the -* top of the kernel stack directly. -*/ -DEFINE_PER_CPU(unsigned long, cpu_current_top_of_stack) = - (unsigned long )&init_thread_union +THREAD_SIZE ; -EXPORT_PER_CPU_SYMBOL (cpu_current_top_of_stack); -#ifdef CONFIG_STACKPROTECTOR DEFINE_PER_CPU(unsigned long, __stack_chk_guard);EXPORT_PER_CPU_SYMBOL (__stack_chk_guard);
arch/x86/kernel/process_32.c +2 -2
@@ -191,13 +191,13 @@ EXPORT_SYMBOL_GPL(start_thread);arch_end_context_switch (next_p);/* -* Reload esp0 and cpu_current_top_of_stack. This changes +* Reload esp0 and pcpu_hot.top_of_stack. This changes * current_thread_info(). Refresh the SYSENTER configuration in * case prev or next is vm86. */ update_task_stack (next_p);refresh_sysenter_cs (next); -this_cpu_write (cpu_current_top_of_stack, +this_cpu_write (pcpu_hot.top_of_stack, (unsigned long )task_stack_page (next_p) +THREAD_SIZE );
arch/x86/kernel/process_64.c +1 -1
@@ -617,7 +617,7 @@ void compat_start_thread(struct pt_regs* Switch the PDA and FPU contexts. */ raw_cpu_write (pcpu_hot.current_task, next_p); -this_cpu_write (cpu_current_top_of_stack,task_top_of_stack (next_p)); +raw_cpu_write (pcpu_hot.top_of_stack,task_top_of_stack (next_p));switch_fpu_finish ();
arch/x86/kernel/smpboot.c +1 -1
@@ -1056,7 +1056,7 @@ int common_cpu_up(unsigned int cpu, stru#ifdef CONFIG_X86_32 /* Stack for startup_32 can be just as for start_secondary onwards */ -per_cpu (cpu_current_top_of_stack, cpu) =task_top_of_stack (idle); +per_cpu (pcpu_hot.top_of_stack, cpu) =task_top_of_stack (idle);#else initial_gs =per_cpu_offset (cpu);#endif
arch/x86/kernel/traps.c +2 -2
@@ -849,7 +849,7 @@ DEFINE_IDTENTRY_RAW(exc_int3)*/ asmlinkage __visible noinstr struct pt_regs *sync_regs(struct pt_regs *eregs) { -struct pt_regs *regs = (struct pt_regs *)this_cpu_read (cpu_current_top_of_stack) -1 ; +struct pt_regs *regs = (struct pt_regs *)this_cpu_read (pcpu_hot.top_of_stack) -1 ;if (regs != eregs) *regs = *eregs;return regs;
@@ -867,7 +867,7 @@ asmlinkage __visible noinstr struct pt_r* trust it and switch to the current kernel stack */ if (ip_within_syscall_gap (regs)) { - sp =this_cpu_read (cpu_current_top_of_stack); + sp =this_cpu_read (pcpu_hot.top_of_stack); goto sync; }
[tip: x86/core] x86/percpu: Move current_top_of_stack next to current_task
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: c063a217bc0726c2560138229de5673dbb253a02 Gitweb: https://git.kernel.org/tip/c063a217bc0726c2560138229de5673dbb253a02 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:04 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:05 +02:00
x86/percpu: Move current_top_of_stack next to current_task
Extend the struct pcpu_hot cacheline with current_top_of_stack; another very frequently used value.
--- arch/x86/entry/entry_32.S | 4 ++-- arch/x86/entry/entry_64.S | 6 +++--- arch/x86/entry/entry_64_compat.S | 6 +++--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/processor.h | 4 +--- arch/x86/kernel/asm-offsets.c | 2 ++ arch/x86/kernel/cpu/common.c | 12 +----------- arch/x86/kernel/process_32.c | 4 ++-- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- 11 files changed, 19 insertions(+), 28 deletions(-)
arch/x86/entry/entry_32.S +2 -2
@@ -1181,7 +1181,7 @@ SYM_CODE_START(asm_exc_nmi) * is using the thread stack right now, so it's safe for us to use it. */ movl %esp, %ebx - movl PER_CPU_VAR(cpu_current_top_of_stack), %esp + movl PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %esp call exc_nmi movl %ebx, %esp
@@ -1243,7 +1243,7 @@ SYM_CODE_START(rewind_stack_and_make_dead) /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp - movl PER_CPU_VAR(cpu_current_top_of_stack), %esi + movl PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %esi leal -TOP_OF_KERNEL_STACK_PADDING-PTREGS_SIZE(%esi), %esp call make_task_dead
arch/x86/entry/entry_64.S +3 -3
@@ -92,7 +92,7 @@ SYM_CODE_START(entry_SYSCALL_64) /* tss.sp2 is scratch space. */ movq %rsp, PER_CPU_VAR(cpu_tss_rw + TSS_sp2) SWITCH_TO_KERNEL_CR3 scratch_reg=%rsp - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp SYM_INNER_LABEL(entry_SYSCALL_64_safe_stack, SYM_L_GLOBAL) ANNOTATE_NOENDBR
@@ -1209,7 +1209,7 @@ SYM_CODE_START(asm_exc_nmi) FENCE_SWAPGS_USER_ENTRY SWITCH_TO_KERNEL_CR3 scratch_reg=%rdx movq %rsp, %rdx - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp UNWIND_HINT_IRET_REGS base=%rdx offset=8 pushq 5*8(%rdx) /* pt_regs->ss */ pushq 4*8(%rdx) /* pt_regs->rsp */
@@ -1525,7 +1525,7 @@ SYM_CODE_START_NOALIGN(rewind_stack_and_make_dead) /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp - movq PER_CPU_VAR(cpu_current_top_of_stack), %rax + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rax leaq -PTREGS_SIZE(%rax), %rsp UNWIND_HINT_REGS
arch/x86/entry/entry_64_compat.S +3 -3
@@ -58,7 +58,7 @@ SYM_CODE_START(entry_SYSENTER_compat) SWITCH_TO_KERNEL_CR3 scratch_reg=%rax popq %rax - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp /* Construct struct pt_regs on stack */ pushq $__USER32_DS /* pt_regs->ss */
@@ -191,7 +191,7 @@ SYM_CODE_START(entry_SYSCALL_compat) SWITCH_TO_KERNEL_CR3 scratch_reg=%rsp /* Switch to the kernel stack */ - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp SYM_INNER_LABEL(entry_SYSCALL_compat_safe_stack, SYM_L_GLOBAL) ANNOTATE_NOENDBR
@@ -332,7 +332,7 @@ SYM_CODE_START(entry_INT80_compat) ALTERNATIVE "", "jmp .Lint80_keep_stack", X86_FEATURE_XENPV movq %rsp, %rax - movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp + movq PER_CPU_VAR(pcpu_hot + X86_top_of_stack), %rsp pushq 5*8(%rax) /* regs->ss */ pushq 4*8(%rax) /* regs->rsp */
arch/x86/include/asm/current.h +1 -0
@@ -17,6 +17,7 @@ struct pcpu_hot {struct task_struct *current_task;int preempt_count;int cpu_number; +unsigned long top_of_stack; };u8 pad[64 ]; };
arch/x86/include/asm/processor.h +1 -3
@@ -426,8 +426,6 @@ struct irq_stack {char stack[IRQ_STACK_SIZE ]; }__aligned(IRQ_STACK_SIZE) ; -DECLARE_PER_CPU(unsigned long, cpu_current_top_of_stack); -#ifdef CONFIG_X86_64 struct fixed_percpu_data {/*
@@ -566,7 +564,7 @@ static __always_inline unsigned long current_top_of_stack(void)* and around vm86 mode and sp0 on x86_64 is special because of the * entry trampoline. */ -return this_cpu_read_stable (cpu_current_top_of_stack); +return this_cpu_read_stable (pcpu_hot.top_of_stack); } static __always_inline bool on_thread_stack(void)
arch/x86/kernel/asm-offsets.c +2 -0
@@ -109,6 +109,8 @@ static void __used common(void)OFFSET (TSS_sp1, tss_struct, x86_tss.sp1);OFFSET (TSS_sp2, tss_struct, x86_tss.sp2); +OFFSET (X86_top_of_stack, pcpu_hot, top_of_stack); +if (IS_ENABLED (CONFIG_KVM_INTEL )) {BLANK ();OFFSET (VMX_spec_ctrl, vcpu_vmx, spec_ctrl);
arch/x86/kernel/cpu/common.c +1 -11
@@ -2015,6 +2015,7 @@ __setup("clearcpuid=", setup_clearcpuid); DEFINE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot) = { .current_task = &init_task, .preempt_count =INIT_PREEMPT_COUNT , + .top_of_stack =TOP_OF_INIT_STACK , };EXPORT_PER_CPU_SYMBOL (pcpu_hot);
@@ -2026,8 +2027,6 @@ EXPORT_PER_CPU_SYMBOL_GPL(fixed_percpu_data); DEFINE_PER_CPU(void *, hardirq_stack_ptr);DEFINE_PER_CPU (bool, hardirq_stack_inuse); -DEFINE_PER_CPU(unsigned long, cpu_current_top_of_stack) = TOP_OF_INIT_STACK; -static void wrmsrl_cstar (unsigned long val) {/*
@@ -2078,15 +2077,6 @@ void syscall_init(void)#else /* CONFIG_X86_64 */ -/* -* On x86_32, vm86 modifies tss.sp0, so sp0 isn't a reliable way to find -* the top of the kernel stack. Use an extra percpu variable to track the -* top of the kernel stack directly. -*/ -DEFINE_PER_CPU(unsigned long, cpu_current_top_of_stack) = - (unsigned long )&init_thread_union +THREAD_SIZE ; -EXPORT_PER_CPU_SYMBOL (cpu_current_top_of_stack); -#ifdef CONFIG_STACKPROTECTOR DEFINE_PER_CPU(unsigned long, __stack_chk_guard);EXPORT_PER_CPU_SYMBOL (__stack_chk_guard);
arch/x86/kernel/process_32.c +2 -2
@@ -191,13 +191,13 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)arch_end_context_switch (next_p);/* -* Reload esp0 and cpu_current_top_of_stack. This changes +* Reload esp0 and pcpu_hot.top_of_stack. This changes * current_thread_info(). Refresh the SYSENTER configuration in * case prev or next is vm86. */ update_task_stack (next_p);refresh_sysenter_cs (next); -this_cpu_write (cpu_current_top_of_stack, +this_cpu_write (pcpu_hot.top_of_stack, (unsigned long )task_stack_page (next_p) +THREAD_SIZE );
arch/x86/kernel/process_64.c +1 -1
@@ -618,7 +618,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)* Switch the PDA and FPU contexts. */ raw_cpu_write (pcpu_hot.current_task, next_p); -this_cpu_write (cpu_current_top_of_stack,task_top_of_stack (next_p)); +raw_cpu_write (pcpu_hot.top_of_stack,task_top_of_stack (next_p));switch_fpu_finish ();
arch/x86/kernel/smpboot.c +1 -1
@@ -1056,7 +1056,7 @@ int common_cpu_up(unsigned int cpu, struct task_struct *idle)#ifdef CONFIG_X86_32 /* Stack for startup_32 can be just as for start_secondary onwards */ -per_cpu (cpu_current_top_of_stack, cpu) =task_top_of_stack (idle); +per_cpu (pcpu_hot.top_of_stack, cpu) =task_top_of_stack (idle);#else initial_gs =per_cpu_offset (cpu);#endif
arch/x86/kernel/traps.c +2 -2
@@ -851,7 +851,7 @@ DEFINE_IDTENTRY_RAW(exc_int3)*/ asmlinkage __visible noinstr struct pt_regs *sync_regs(struct pt_regs *eregs) { -struct pt_regs *regs = (struct pt_regs *)this_cpu_read (cpu_current_top_of_stack) -1 ; +struct pt_regs *regs = (struct pt_regs *)this_cpu_read (pcpu_hot.top_of_stack) -1 ;if (regs != eregs) *regs = *eregs;return regs;
@@ -869,7 +869,7 @@ asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *r* trust it and switch to the current kernel stack */ if (ip_within_syscall_gap (regs)) { - sp =this_cpu_read (cpu_current_top_of_stack); + sp =this_cpu_read (pcpu_hot.top_of_stack); goto sync; }
Peter Zijlstra
maintainerPATCH v3 26/59 x86/percpu: Move irq_stack variables next to current_task
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Further extend struct pcpu_hot with the hard and soft irq stack pointers.
--- arch/x86/include/asm/current.h | 6 ++++++ arch/x86/include/asm/irq_stack.h | 12 ++++++------ arch/x86/include/asm/processor.h | 4 ---- arch/x86/kernel/cpu/common.c | 3 --- arch/x86/kernel/dumpstack_32.c | 4 ++-- arch/x86/kernel/dumpstack_64.c | 2 +- arch/x86/kernel/irq_32.c | 13 +++++-------- arch/x86/kernel/irq_64.c | 6 +++--- arch/x86/kernel/process_64.c | 2 +- 9 files changed, 24 insertions(+), 28 deletions(-)
arch/x86/include/asm/current.h +6 -0
@@ -18,6 +18,12 @@ struct pcpu_hot {int preempt_count;int cpu_number;unsigned long top_of_stack; +void *hardirq_stack_ptr; +#ifdef CONFIG_X86_64 +bool hardirq_stack_inuse; +#else +void *softirq_stack_ptr; +#endif };u8 pad[64 ]; };
arch/x86/include/asm/irq_stack.h +6 -6
@@ -116,7 +116,7 @@ ASM_CALL_ARG2 #define call_on_irqstack(func, asm_call, argconstr...) \ - call_on_stack(__this_cpu_read(hardirq_stack_ptr), \ + call_on_stack(__this_cpu_read(pcpu_hot.hardirq_stack_ptr), \ func, asm_call, argconstr) /* Macros to assert type correctness for run_*_on_irqstack macros */
@@ -135,7 +135,7 @@* User mode entry and interrupt on the irq stack do not \ * switch stacks. If from user mode the task stack is empty. \ */ \ -if (user_mode (regs) ||__this_cpu_read (hardirq_stack_inuse)) { \ +if (user_mode (regs) ||__this_cpu_read (pcpu_hot.hardirq_stack_inuse)) { \irq_enter_rcu (); \func (c_args); \irq_exit_rcu (); \
@@ -146,9 +146,9 @@* places. Invoke the stack switch macro with the call \ * sequence which matches the above direct invocation. \ */ \ -__this_cpu_write (hardirq_stack_inuse, true); \ +__this_cpu_write (pcpu_hot.hardirq_stack_inuse, true); \call_on_irqstack (func, asm_call, constr); \ -__this_cpu_write (hardirq_stack_inuse, false); \ +__this_cpu_write (pcpu_hot.hardirq_stack_inuse, false); \ } \ }
@@ -212,9 +212,9 @@*/ #define do_softirq_own_stack () \ { \ - __this_cpu_write(hardirq_stack_inuse, true); \ + __this_cpu_write(pcpu_hot.hardirq_stack_inuse, true); \ call_on_irqstack(__do_softirq, ASM_CALL_ARG0); \ - __this_cpu_write(hardirq_stack_inuse, false); \ + __this_cpu_write(pcpu_hot.hardirq_stack_inuse, false); \ }#endif
arch/x86/include/asm/processor.h +0 -4
@@ -448,8 +448,6 @@ static inline unsigned long cpu_kernelmoreturn (unsigned long )per_cpu (fixed_percpu_data.gs_base, cpu); } -DECLARE_PER_CPU(void *, hardirq_stack_ptr); -DECLARE_PER_CPU (bool, hardirq_stack_inuse); extern asmlinkage void ignore_sysret(void);/* Save actual FS/GS selectors and bases to current->thread */
@@ -458,8 +456,6 @@ void current_save_fsgs(void);#ifdef CONFIG_STACKPROTECTOR DECLARE_PER_CPU(unsigned long, __stack_chk_guard);#endif -DECLARE_PER_CPU(struct irq_stack *, hardirq_stack_ptr); -DECLARE_PER_CPU(struct irq_stack *, softirq_stack_ptr);#endif /* !X86_64 */ struct perf_event ;
arch/x86/kernel/cpu/common.c +0 -3
@@ -2012,9 +2012,6 @@ DEFINE_PER_CPU_FIRST(struct fixed_percpu fixed_percpu_data) __aligned(PAGE_SIZE) __visible;EXPORT_PER_CPU_SYMBOL_GPL (fixed_percpu_data); -DEFINE_PER_CPU(void *, hardirq_stack_ptr); -DEFINE_PER_CPU (bool, hardirq_stack_inuse); -static void wrmsrl_cstar (unsigned long val) {/*
arch/x86/kernel/dumpstack_32.c +2 -2
@@ -37,7 +37,7 @@ const char *stack_type_name(enum stack_tstatic bool in_hardirq_stack (unsigned long *stack,struct stack_info *info) { -unsigned long *begin = (unsigned long *)this_cpu_read (hardirq_stack_ptr); +unsigned long *begin = (unsigned long *)this_cpu_read (pcpu_hot.hardirq_stack_ptr);unsigned long *end = begin + (THREAD_SIZE /sizeof (long ));/*
@@ -62,7 +62,7 @@ static bool in_hardirq_stack(unsigned lostatic bool in_softirq_stack (unsigned long *stack,struct stack_info *info) { -unsigned long *begin = (unsigned long *)this_cpu_read (softirq_stack_ptr); +unsigned long *begin = (unsigned long *)this_cpu_read (pcpu_hot.softirq_stack_ptr);unsigned long *end = begin + (THREAD_SIZE /sizeof (long ));/*
arch/x86/kernel/dumpstack_64.c +1 -1
@@ -134,7 +134,7 @@ static __always_inline bool in_exception static __always_inline bool in_irq_stack(unsigned long *stack, struct stack_info *info) { -unsigned long *end = (unsigned long *)this_cpu_read (hardirq_stack_ptr); +unsigned long *end = (unsigned long *)this_cpu_read (pcpu_hot.hardirq_stack_ptr);unsigned long *begin;/*
arch/x86/kernel/irq_32.c +5 -8
@@ -52,9 +52,6 @@ static inline int check_stack_overflow(vstatic inline void print_stack_overflow (void ) { }#endif -DEFINE_PER_CPU(struct irq_stack *, hardirq_stack_ptr); -DEFINE_PER_CPU(struct irq_stack *, softirq_stack_ptr); -static void call_on_stack (void *func,void *stack) { asm volatile("xchgl %%ebx,%%esp \n"
@@ -77,7 +74,7 @@ static inline int execute_on_irq_stack(iu32 *isp, *prev_esp, arg1; curstk = (struct irq_stack *)current_stack (); - irqstk =__this_cpu_read (hardirq_stack_ptr); + irqstk =__this_cpu_read (pcpu_hot.hardirq_stack_ptr);/* * this is where we switch to the IRQ stack. However, if we are
@@ -115,7 +112,7 @@ int irq_init_percpu_irqstack(unsigned inint node =cpu_to_node (cpu);struct page *ph, *ps; -if (per_cpu (hardirq_stack_ptr, cpu)) +if (per_cpu (pcpu_hot.hardirq_stack_ptr, cpu))return 0 ; ph =alloc_pages_node (node,THREADINFO_GFP ,THREAD_SIZE_ORDER );
@@ -127,8 +124,8 @@ int irq_init_percpu_irqstack(unsigned inreturn -ENOMEM ; } -per_cpu (hardirq_stack_ptr, cpu) =page_address (ph); -per_cpu (softirq_stack_ptr, cpu) =page_address (ps); +per_cpu (pcpu_hot.hardirq_stack_ptr, cpu) =page_address (ph); +per_cpu (pcpu_hot.softirq_stack_ptr, cpu) =page_address (ps);return 0 ; }
@@ -138,7 +135,7 @@ void do_softirq_own_stack(void)struct irq_stack *irqstk;u32 *isp, *prev_esp; - irqstk =__this_cpu_read (softirq_stack_ptr); + irqstk =__this_cpu_read (pcpu_hot.softirq_stack_ptr);/* build the stack frame on the softirq stack */ isp = (u32 *) ((char *)irqstk +sizeof (*irqstk));
arch/x86/kernel/irq_64.c +3 -3
@@ -50,7 +50,7 @@ static int map_irq_stack(unsigned int cpreturn -ENOMEM ;/* Store actual TOS to avoid adjustment in the hotpath */ -per_cpu (hardirq_stack_ptr, cpu) = va +IRQ_STACK_SIZE -8 ; +per_cpu (pcpu_hot.hardirq_stack_ptr, cpu) = va +IRQ_STACK_SIZE -8 ; return 0; }#else
@@ -63,14 +63,14 @@ static int map_irq_stack(unsigned int cpvoid *va =per_cpu_ptr (&irq_stack_backing_store, cpu);/* Store actual TOS to avoid adjustment in the hotpath */ -per_cpu (hardirq_stack_ptr, cpu) = va +IRQ_STACK_SIZE -8 ; +per_cpu (pcpu_hot.hardirq_stack_ptr, cpu) = va +IRQ_STACK_SIZE -8 ; return 0; }#endif int irq_init_percpu_irqstack (unsigned int cpu) { -if (per_cpu (hardirq_stack_ptr, cpu)) +if (per_cpu (pcpu_hot.hardirq_stack_ptr, cpu))return 0 ;return map_irq_stack (cpu); }
arch/x86/kernel/process_64.c +1 -1
@@ -562,7 +562,7 @@ void compat_start_thread(struct pt_regsint cpu =smp_processor_id ();WARN_ON_ONCE (IS_ENABLED (CONFIG_DEBUG_ENTRY ) && -this_cpu_read (hardirq_stack_inuse)); +this_cpu_read (pcpu_hot.hardirq_stack_inuse));if (!test_thread_flag (TIF_NEED_FPU_LOAD ))switch_fpu_prepare (prev_fpu, cpu);
[tip: x86/core] x86/percpu: Move irq_stack variables next to current_task
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: d7b6d709a76a4f4ef3108ac41e1b39eb80f5c084 Gitweb: https://git.kernel.org/tip/d7b6d709a76a4f4ef3108ac41e1b39eb80f5c084 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:05 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:05 +02:00
x86/percpu: Move irq_stack variables next to current_task
Further extend struct pcpu_hot with the hard and soft irq stack pointers.
--- arch/x86/include/asm/current.h | 6 ++++++ arch/x86/include/asm/irq_stack.h | 12 ++++++------ arch/x86/include/asm/processor.h | 4 ---- arch/x86/kernel/cpu/common.c | 3 --- arch/x86/kernel/dumpstack_32.c | 4 ++-- arch/x86/kernel/dumpstack_64.c | 2 +- arch/x86/kernel/irq_32.c | 13 +++++-------- arch/x86/kernel/irq_64.c | 6 +++--- arch/x86/kernel/process_64.c | 2 +- 9 files changed, 24 insertions(+), 28 deletions(-)
arch/x86/include/asm/current.h +6 -0
@@ -18,6 +18,12 @@ struct pcpu_hot {int preempt_count;int cpu_number;unsigned long top_of_stack; +void *hardirq_stack_ptr; +#ifdef CONFIG_X86_64 +bool hardirq_stack_inuse; +#else +void *softirq_stack_ptr; +#endif };u8 pad[64 ]; };
arch/x86/include/asm/irq_stack.h +6 -6
@@ -116,7 +116,7 @@ ASM_CALL_ARG2 #define call_on_irqstack(func, asm_call, argconstr...) \ - call_on_stack(__this_cpu_read(hardirq_stack_ptr), \ + call_on_stack(__this_cpu_read(pcpu_hot.hardirq_stack_ptr), \ func, asm_call, argconstr) /* Macros to assert type correctness for run_*_on_irqstack macros */
@@ -135,7 +135,7 @@* User mode entry and interrupt on the irq stack do not \ * switch stacks. If from user mode the task stack is empty. \ */ \ -if (user_mode (regs) ||__this_cpu_read (hardirq_stack_inuse)) { \ +if (user_mode (regs) ||__this_cpu_read (pcpu_hot.hardirq_stack_inuse)) { \irq_enter_rcu (); \func (c_args); \irq_exit_rcu (); \
@@ -146,9 +146,9 @@* places. Invoke the stack switch macro with the call \ * sequence which matches the above direct invocation. \ */ \ -__this_cpu_write (hardirq_stack_inuse, true); \ +__this_cpu_write (pcpu_hot.hardirq_stack_inuse, true); \call_on_irqstack (func, asm_call, constr); \ -__this_cpu_write (hardirq_stack_inuse, false); \ +__this_cpu_write (pcpu_hot.hardirq_stack_inuse, false); \ } \ }
@@ -212,9 +212,9 @@*/ #define do_softirq_own_stack () \ { \ - __this_cpu_write(hardirq_stack_inuse, true); \ + __this_cpu_write(pcpu_hot.hardirq_stack_inuse, true); \ call_on_irqstack(__do_softirq, ASM_CALL_ARG0); \ - __this_cpu_write(hardirq_stack_inuse, false); \ + __this_cpu_write(pcpu_hot.hardirq_stack_inuse, false); \ }#endif
arch/x86/include/asm/processor.h +0 -4
@@ -448,8 +448,6 @@ static inline unsigned long cpu_kernelmode_gs_base(int cpu)return (unsigned long )per_cpu (fixed_percpu_data.gs_base, cpu); } -DECLARE_PER_CPU(void *, hardirq_stack_ptr); -DECLARE_PER_CPU (bool, hardirq_stack_inuse); extern asmlinkage void ignore_sysret(void);/* Save actual FS/GS selectors and bases to current->thread */
@@ -458,8 +456,6 @@ void current_save_fsgs(void);#ifdef CONFIG_STACKPROTECTOR DECLARE_PER_CPU(unsigned long, __stack_chk_guard);#endif -DECLARE_PER_CPU(struct irq_stack *, hardirq_stack_ptr); -DECLARE_PER_CPU(struct irq_stack *, softirq_stack_ptr);#endif /* !X86_64 */ struct perf_event ;
arch/x86/kernel/cpu/common.c +0 -3
@@ -2024,9 +2024,6 @@ DEFINE_PER_CPU_FIRST(struct fixed_percpu_data, fixed_percpu_data) __aligned(PAGE_SIZE) __visible;EXPORT_PER_CPU_SYMBOL_GPL (fixed_percpu_data); -DEFINE_PER_CPU(void *, hardirq_stack_ptr); -DEFINE_PER_CPU (bool, hardirq_stack_inuse); -static void wrmsrl_cstar (unsigned long val) {/*
arch/x86/kernel/dumpstack_32.c +2 -2
@@ -37,7 +37,7 @@ const char *stack_type_name(enum stack_type type)static bool in_hardirq_stack (unsigned long *stack,struct stack_info *info) { -unsigned long *begin = (unsigned long *)this_cpu_read (hardirq_stack_ptr); +unsigned long *begin = (unsigned long *)this_cpu_read (pcpu_hot.hardirq_stack_ptr);unsigned long *end = begin + (THREAD_SIZE /sizeof (long ));/*
@@ -62,7 +62,7 @@ static bool in_hardirq_stack(unsigned long *stack, struct stack_info *info)static bool in_softirq_stack (unsigned long *stack,struct stack_info *info) { -unsigned long *begin = (unsigned long *)this_cpu_read (softirq_stack_ptr); +unsigned long *begin = (unsigned long *)this_cpu_read (pcpu_hot.softirq_stack_ptr);unsigned long *end = begin + (THREAD_SIZE /sizeof (long ));/*
arch/x86/kernel/dumpstack_64.c +1 -1
@@ -134,7 +134,7 @@ static __always_inline bool in_exception_stack(unsigned long *stack, struct stac static __always_inline bool in_irq_stack(unsigned long *stack, struct stack_info *info) { -unsigned long *end = (unsigned long *)this_cpu_read (hardirq_stack_ptr); +unsigned long *end = (unsigned long *)this_cpu_read (pcpu_hot.hardirq_stack_ptr);unsigned long *begin;/*
arch/x86/kernel/irq_32.c +5 -8
@@ -52,9 +52,6 @@ static inline int check_stack_overflow(void) { return 0; }static inline void print_stack_overflow (void ) { }#endif -DEFINE_PER_CPU(struct irq_stack *, hardirq_stack_ptr); -DEFINE_PER_CPU(struct irq_stack *, softirq_stack_ptr); -static void call_on_stack (void *func,void *stack) { asm volatile("xchgl %%ebx,%%esp \n"
@@ -77,7 +74,7 @@ static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc)u32 *isp, *prev_esp, arg1; curstk = (struct irq_stack *)current_stack (); - irqstk =__this_cpu_read (hardirq_stack_ptr); + irqstk =__this_cpu_read (pcpu_hot.hardirq_stack_ptr);/* * this is where we switch to the IRQ stack. However, if we are
@@ -115,7 +112,7 @@ int irq_init_percpu_irqstack(unsigned int cpu)int node =cpu_to_node (cpu);struct page *ph, *ps; -if (per_cpu (hardirq_stack_ptr, cpu)) +if (per_cpu (pcpu_hot.hardirq_stack_ptr, cpu))return 0 ; ph =alloc_pages_node (node,THREADINFO_GFP ,THREAD_SIZE_ORDER );
@@ -127,8 +124,8 @@ int irq_init_percpu_irqstack(unsigned int cpu)return -ENOMEM ; } -per_cpu (hardirq_stack_ptr, cpu) =page_address (ph); -per_cpu (softirq_stack_ptr, cpu) =page_address (ps); +per_cpu (pcpu_hot.hardirq_stack_ptr, cpu) =page_address (ph); +per_cpu (pcpu_hot.softirq_stack_ptr, cpu) =page_address (ps);return 0 ; }
@@ -138,7 +135,7 @@ void do_softirq_own_stack(void)struct irq_stack *irqstk;u32 *isp, *prev_esp; - irqstk =__this_cpu_read (softirq_stack_ptr); + irqstk =__this_cpu_read (pcpu_hot.softirq_stack_ptr);/* build the stack frame on the softirq stack */ isp = (u32 *) ((char *)irqstk +sizeof (*irqstk));
arch/x86/kernel/irq_64.c +3 -3
@@ -50,7 +50,7 @@ static int map_irq_stack(unsigned int cpu)return -ENOMEM ;/* Store actual TOS to avoid adjustment in the hotpath */ -per_cpu (hardirq_stack_ptr, cpu) = va +IRQ_STACK_SIZE -8 ; +per_cpu (pcpu_hot.hardirq_stack_ptr, cpu) = va +IRQ_STACK_SIZE -8 ; return 0; }#else
@@ -63,14 +63,14 @@ static int map_irq_stack(unsigned int cpu)void *va =per_cpu_ptr (&irq_stack_backing_store, cpu);/* Store actual TOS to avoid adjustment in the hotpath */ -per_cpu (hardirq_stack_ptr, cpu) = va +IRQ_STACK_SIZE -8 ; +per_cpu (pcpu_hot.hardirq_stack_ptr, cpu) = va +IRQ_STACK_SIZE -8 ; return 0; }#endif int irq_init_percpu_irqstack (unsigned int cpu) { -if (per_cpu (hardirq_stack_ptr, cpu)) +if (per_cpu (pcpu_hot.hardirq_stack_ptr, cpu))return 0 ;return map_irq_stack (cpu); }
arch/x86/kernel/process_64.c +1 -1
@@ -563,7 +563,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)int cpu =smp_processor_id ();WARN_ON_ONCE (IS_ENABLED (CONFIG_DEBUG_ENTRY ) && -this_cpu_read (hardirq_stack_inuse)); +this_cpu_read (pcpu_hot.hardirq_stack_inuse));if (!test_thread_flag (TIF_NEED_FPU_LOAD ))switch_fpu_prepare (prev_fpu, cpu);
Peter Zijlstra
maintainerPATCH v3 27/59 x86/softirq: Move softirq pending next to current task
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Another hot variable which is strict per CPU and benefits from being in the same cache line.
--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/hardirq.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
arch/x86/include/asm/current.h +1 -0
@@ -19,6 +19,7 @@ struct pcpu_hot {int cpu_number;unsigned long top_of_stack;void *hardirq_stack_ptr; +u16 softirq_pending;#ifdef CONFIG_X86_64 bool hardirq_stack_inuse;#else
arch/x86/include/asm/hardirq.h +2 -1
@@ -3,9 +3,9 @@#define _ASM_X86_HARDIRQ_H#include <linux/threads.h> +#include <asm/current.h> typedef struct { - u16 __softirq_pending; #if IS_ENABLED(CONFIG_KVM_INTEL) u8 kvm_cpu_l1tf_flush_l1d; #endif
@@ -60,6 +60,7 @@ extern u64 arch_irq_stat_cpu(unsigned inextern u64 arch_irq_stat (void );#define arch_irq_stat arch_irq_stat +#define local_softirq_pending_ref pcpu_hot.softirq_pending#if IS_ENABLED (CONFIG_KVM_INTEL )static inline void kvm_set_cpu_l1tf_flush_l1d (void )
[tip: x86/core] x86/softirq: Move softirq pending next to current task
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 7fcecafebed90d03f35bec6e147fc0b5f6e1bc71 Gitweb: https://git.kernel.org/tip/7fcecafebed90d03f35bec6e147fc0b5f6e1bc71 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:06 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:05 +02:00
x86/softirq: Move softirq pending next to current task
Another hot variable which is strict per CPU and benefits from being in the same cache line.
--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/hardirq.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
arch/x86/include/asm/current.h +1 -0
@@ -19,6 +19,7 @@ struct pcpu_hot {int cpu_number;unsigned long top_of_stack;void *hardirq_stack_ptr; +u16 softirq_pending;#ifdef CONFIG_X86_64 bool hardirq_stack_inuse;#else
arch/x86/include/asm/hardirq.h +2 -1
@@ -3,9 +3,9 @@#define _ASM_X86_HARDIRQ_H#include <linux/threads.h> +#include <asm/current.h> typedef struct { - u16 __softirq_pending; #if IS_ENABLED(CONFIG_KVM_INTEL) u8 kvm_cpu_l1tf_flush_l1d; #endif
@@ -60,6 +60,7 @@ extern u64 arch_irq_stat_cpu(unsigned int cpu);extern u64 arch_irq_stat (void );#define arch_irq_stat arch_irq_stat +#define local_softirq_pending_ref pcpu_hot.softirq_pending#if IS_ENABLED (CONFIG_KVM_INTEL )static inline void kvm_set_cpu_l1tf_flush_l1d (void )
Peter Zijlstra
maintainerPATCH v3 28/59 objtool: Allow !PC relative relocations
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
Objtool doesn't currently much like per-cpu usage in alternatives:
arch/x86/entry/entry_64.o: warning: objtool: .altinstr_replacement+0xf: unsupported relocation in alternatives section
f: 65 c7 04 25 00 00 00 00 00 00 00 80 movl $0x80000000,%gs:0x0 13: R_X86_64_32S __x86_call_depth
Since the R_X86_64_32S relocation is location invariant (it's computation doesn't include P - the address of the location itself), it can be trivially allowed.
--- tools/objtool/arch/x86/decode.c | 42 +++++++++++++++++++++++++++++----- tools/objtool/check.c | 6 +--- tools/objtool/include/objtool/arch.h | 6 ++-- tools/objtool/include/objtool/check.h | 17 +++++++------ 4 files changed, 51 insertions(+), 20 deletions(-)
tools/objtool/arch/x86/decode.c +24 -0
@@ -73,6 +73,30 @@ unsigned long arch_jump_destination(strureturn insn->offset + insn->len + insn->immediate; } +bool arch_pc_relative_reloc (struct reloc *reloc) +{ +/* +* All relocation types where P (the address of the target) +* is included in the computation. +*/ +switch (reloc->type) { +case R_X86_64_PC8 : +case R_X86_64_PC16 : +case R_X86_64_PC32 : +case R_X86_64_PC64 : + +case R_X86_64_PLT32 : +case R_X86_64_GOTPC32 : +case R_X86_64_GOTPCREL : +return true; + +default : +break ; + } + +return false; +} +#define ADD_OP (op) \ if (!(op = calloc(1, sizeof(*op)))) \ return -1; \
tools/objtool/check.c +1 -1
@@ -1622,7 +1620,7 @@ static int handle_group_alt(struct objto* accordingly. */ alt_reloc =insn_reloc (file, insn); -if (alt_reloc && +if (alt_reloc &&arch_pc_relative_reloc (alt_reloc) && !arch_support_alt_relocation (special_alt, insn, alt_reloc)) { WARN_FUNC("unsupported relocation in alternatives section",
tools/objtool/include/objtool/arch.h +2 -0
@@ -93,4 +91,6 @@ bool arch_is_rethunk(struct symbol *sym)int arch_rewrite_retpolines (struct objtool_file *file); +bool arch_pc_relative_reloc (struct reloc *reloc); +#endif /* _ARCH_H */
[tip: x86/core] objtool: Allow !PC relative relocations
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 61c6065ef7ec0447a280179d04b2d81c80c2f479 Gitweb: https://git.kernel.org/tip/61c6065ef7ec0447a280179d04b2d81c80c2f479 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:07 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:06 +02:00
objtool: Allow !PC relative relocations
Objtool doesn't currently much like per-cpu usage in alternatives:
arch/x86/entry/entry_64.o: warning: objtool: .altinstr_replacement+0xf: unsupported relocation in alternatives section
f: 65 c7 04 25 00 00 00 00 00 00 00 80 movl $0x80000000,%gs:0x0 13: R_X86_64_32S __x86_call_depth
Since the R_X86_64_32S relocation is location invariant (it's computation doesn't include P - the address of the location itself), it can be trivially allowed.
--- tools/objtool/arch/x86/decode.c | 24 ++++++++++++++++++++++++ tools/objtool/check.c | 2 +- tools/objtool/include/objtool/arch.h | 2 ++ 3 files changed, 27 insertions(+), 1 deletion(-)
tools/objtool/arch/x86/decode.c +24 -0
@@ -73,6 +73,30 @@ unsigned long arch_jump_destination(struct instruction *insn)return insn->offset + insn->len + insn->immediate; } +bool arch_pc_relative_reloc (struct reloc *reloc) +{ +/* +* All relocation types where P (the address of the target) +* is included in the computation. +*/ +switch (reloc->type) { +case R_X86_64_PC8 : +case R_X86_64_PC16 : +case R_X86_64_PC32 : +case R_X86_64_PC64 : + +case R_X86_64_PLT32 : +case R_X86_64_GOTPC32 : +case R_X86_64_GOTPCREL : +return true; + +default : +break ; + } + +return false; +} +#define ADD_OP (op) \ if (!(op = calloc(1, sizeof(*op)))) \ return -1; \
tools/objtool/check.c +1 -1
@@ -1645,7 +1645,7 @@ static int handle_group_alt(struct objtool_file *file,* accordingly. */ alt_reloc =insn_reloc (file, insn); -if (alt_reloc && +if (alt_reloc &&arch_pc_relative_reloc (alt_reloc) && !arch_support_alt_relocation (special_alt, insn, alt_reloc)) { WARN_FUNC("unsupported relocation in alternatives section",
tools/objtool/include/objtool/arch.h +2 -0
@@ -93,4 +93,6 @@ bool arch_is_rethunk(struct symbol *sym);int arch_rewrite_retpolines (struct objtool_file *file); +bool arch_pc_relative_reloc (struct reloc *reloc); +#endif /* _ARCH_H */
Peter Zijlstra
maintainerPATCH v3 29/59 objtool: Track init section
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
For future usage of .init.text exclusion track the init section in the instruction decoder and use the result in retpoline validation.
--- tools/objtool/check.c | 17 ++++++++++------- tools/objtool/include/objtool/elf.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-)
tools/objtool/check.c +10 -7
@@ -380,6 +380,15 @@ static int decode_instructions(struct ob !strncmp(sec->name, ".text.__x86.", 12)) sec->noinstr = true; +/* +* .init.text code is ran before userspace and thus doesn't +* strictly need retpolines, except for modules which are +* loaded late, they very much do need retpoline in their +* .init.text +*/ +if (!strcmp (sec->name,".init.text" ) && !opts.module) + sec->init = true; +for (offset =0 ; offset < sec->sh.sh_size; offset += insn->len) { insn =malloc (sizeof (*insn));if (!insn) {
@@ -3720,13 +3729,7 @@ static int validate_retpoline(struct objif (insn->retpoline_safe)continue ; -/* -* .init.text code is ran before userspace and thus doesn't -* strictly need retpolines, except for modules which are -* loaded late, they very much do need retpoline in their -* .init.text -*/ -if (!strcmp (insn->sec->name,".init.text" ) && !opts.module) +if (insn->sec->init)continue ;if (insn->type ==INSN_RETURN ) {
tools/objtool/include/objtool/elf.h +1 -1
@@ -38,7 +38,7 @@ struct section {Elf_Data *data;char *name;int idx; -bool changed, text, rodata, noinstr; +bool changed, text, rodata, noinstr, init; };struct symbol {
[tip: x86/core] objtool: Track init section
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 6644ee846cb983437063da8fd24b7cae671fd019 Gitweb: https://git.kernel.org/tip/6644ee846cb983437063da8fd24b7cae671fd019 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:08 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:07 +02:00
objtool: Track init section
For future usage of .init.text exclusion track the init section in the instruction decoder and use the result in retpoline validation.
--- tools/objtool/check.c | 17 ++++++++++------- tools/objtool/include/objtool/elf.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-)
tools/objtool/check.c +10 -7
@@ -382,6 +382,15 @@ static int decode_instructions(struct objtool_file *file) !strncmp(sec->name, ".text.__x86.", 12)) sec->noinstr = true; +/* +* .init.text code is ran before userspace and thus doesn't +* strictly need retpolines, except for modules which are +* loaded late, they very much do need retpoline in their +* .init.text +*/ +if (!strcmp (sec->name,".init.text" ) && !opts.module) + sec->init = true; +for (offset =0 ; offset < sec->sh.sh_size; offset += insn->len) { insn =malloc (sizeof (*insn));if (!insn) {
@@ -3748,13 +3757,7 @@ static int validate_retpoline(struct objtool_file *file)if (insn->retpoline_safe)continue ; -/* -* .init.text code is ran before userspace and thus doesn't -* strictly need retpolines, except for modules which are -* loaded late, they very much do need retpoline in their -* .init.text -*/ -if (!strcmp (insn->sec->name,".init.text" ) && !opts.module) +if (insn->sec->init)continue ;if (insn->type ==INSN_RETURN ) {
tools/objtool/include/objtool/elf.h +1 -1
@@ -38,7 +38,7 @@ struct section {Elf_Data *data;char *name;int idx; -bool changed, text, rodata, noinstr; +bool changed, text, rodata, noinstr, init; };struct symbol {
Peter Zijlstra
maintainerPATCH v3 30/59 objtool: Add .call_sites section
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
In preparation for call depth tracking provide a section which collects all direct calls.
--- arch/x86/kernel/vmlinux.lds.S | 7 ++++ tools/objtool/check.c | 51 ++++++++++++++++++++++++++++++++ tools/objtool/include/objtool/objtool.h | 1 tools/objtool/objtool.c | 1 4 files changed, 60 insertions(+)
arch/x86/kernel/vmlinux.lds.S +7 -0
@@ -291,6 +291,13 @@ SECTIONS *(.return_sites) __return_sites_end = .; } + + . = ALIGN(8); + .call_sites : AT(ADDR(.call_sites) - LOAD_OFFSET) { + __call_sites = .; + *(.call_sites) + __call_sites_end = .; + } #endif #ifdef CONFIG_X86_KERNEL_IBT
tools/objtool/check.c +51 -0
69 lines not on this page · raw message
tools/objtool/include/objtool/objtool.h +1 -0
@@ -28,6 +28,7 @@ struct objtool_file {struct list_head static_call_list;struct list_head mcount_loc_list;struct list_head endbr_list; +struct list_head call_list;bool ignore_unreachables, hints, rodata;unsigned int nr_endbr;
tools/objtool/objtool.c +1 -0
@@ -106,6 +106,7 @@ struct objtool_file *objtool_open_read(cINIT_LIST_HEAD (&file.static_call_list);INIT_LIST_HEAD (&file.mcount_loc_list);INIT_LIST_HEAD (&file.endbr_list); +INIT_LIST_HEAD (&file.call_list); file.ignore_unreachables = opts.no_unreachable; file.hints = false;
[tip: x86/core] objtool: Add .call_sites section
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 00abd38408127a57861698a8bffba65849de6bbd Gitweb: https://git.kernel.org/tip/00abd38408127a57861698a8bffba65849de6bbd Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:09 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:07 +02:00
objtool: Add .call_sites section
In preparation for call depth tracking provide a section which collects all direct calls.
--- arch/x86/kernel/vmlinux.lds.S | 7 +++- tools/objtool/check.c | 51 ++++++++++++++++++++++++- tools/objtool/include/objtool/objtool.h | 1 +- tools/objtool/objtool.c | 1 +- 4 files changed, 60 insertions(+)
arch/x86/kernel/vmlinux.lds.S +7 -0
@@ -291,6 +291,13 @@ SECTIONS *(.return_sites) __return_sites_end = .; } + + . = ALIGN(8); + .call_sites : AT(ADDR(.call_sites) - LOAD_OFFSET) { + __call_sites = .; + *(.call_sites) + __call_sites_end = .; + } #endif #ifdef CONFIG_X86_KERNEL_IBT
tools/objtool/check.c +51 -0
69 lines not on this page · raw message
tools/objtool/include/objtool/objtool.h +1 -0
@@ -28,6 +28,7 @@ struct objtool_file {struct list_head static_call_list;struct list_head mcount_loc_list;struct list_head endbr_list; +struct list_head call_list;bool ignore_unreachables, hints, rodata;unsigned int nr_endbr;
tools/objtool/objtool.c +1 -0
@@ -106,6 +106,7 @@ struct objtool_file *objtool_open_read(const char *_objname)INIT_LIST_HEAD (&file.static_call_list);INIT_LIST_HEAD (&file.mcount_loc_list);INIT_LIST_HEAD (&file.endbr_list); +INIT_LIST_HEAD (&file.call_list); file.ignore_unreachables = opts.no_unreachable; file.hints = false;
Peter Zijlstra
maintainerPATCH v3 31/59 objtool: Add --hacks=skylake
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
Make the call/func sections selectable via the --hacks option.
--- scripts/Makefile.lib | 3 ++- tools/objtool/builtin-check.c | 7 ++++++- tools/objtool/check.c | 10 ++++++---- tools/objtool/include/objtool/builtin.h | 1 + 4 files changed, 15 insertions(+), 6 deletions(-)
scripts/Makefile.lib +2 -1
@@ -231,7 +231,8 @@ objtool := $(objtree)/tools/objtool/objt objtool_args = \ $(if $(CONFIG_HAVE_JUMP_LABEL_HACK), --hacks=jump_label) \ - $(if $(CONFIG_HAVE_NOINSTR_HACK), --hacks=noinstr) \ + $(if $(CONFIG_HAVE_NOINSTR_HACK), --hacks=noinstr) \ + $(if $(CONFIG_CALL_DEPTH_TRACKING), --hacks=skylake) \ $(if $(CONFIG_X86_KERNEL_IBT), --ibt) \ $(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount) \ $(if $(CONFIG_UNWINDER_ORC), --orc) \
tools/objtool/builtin-check.c +6 -1
@@ -57,12 +57,17 @@ static int parse_hacks(const struct opti found = true; } +if (!str ||strstr (str,"skylake" )) { + opts.hack_skylake = true; + found = true; + } +return found ?0 :-1 ; }const struct option check_options[] = {OPT_GROUP ("Actions:" ), -OPT_CALLBACK_OPTARG ('h' ,"hacks" ,NULL ,NULL ,"jump_label,noinstr" ,"patch toolchain bugs/limitations" , parse_hacks), +OPT_CALLBACK_OPTARG ('h' ,"hacks" ,NULL ,NULL ,"jump_label,noinstr,skylake" ,"patch toolchain bugs/limitations" , parse_hacks),OPT_BOOLEAN ('i' ,"ibt" , &opts.ibt,"validate and annotate IBT" ),OPT_BOOLEAN ('m' ,"mcount" , &opts.mcount,"annotate mcount/fentry calls for ftrace" ),OPT_BOOLEAN ('n' ,"noinstr" , &opts.noinstr,"validate noinstr rules" ),
tools/objtool/check.c +6 -4
@@ -4321,10 +4321,12 @@ int check(struct objtool_file *file) goto out; warnings += ret; - ret =create_direct_call_sections (file); -if (ret <0 ) - goto out; - warnings += ret; +if (opts.hack_skylake) { + ret =create_direct_call_sections (file); +if (ret <0 ) + goto out; + warnings += ret; + } }if (opts.mcount) {
tools/objtool/include/objtool/builtin.h +1 -0
@@ -14,6 +14,7 @@ struct opts {bool dump_orc;bool hack_jump_label;bool hack_noinstr; +bool hack_skylake;bool ibt;bool mcount;bool noinstr;
[tip: x86/core] objtool: Add --hacks=skylake
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 0c0a6d8934e2081df93ba0bfc0cf615cc9c06988 Gitweb: https://git.kernel.org/tip/0c0a6d8934e2081df93ba0bfc0cf615cc9c06988 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:10 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:07 +02:00
objtool: Add --hacks=skylake
Make the call/func sections selectable via the --hacks option.
--- scripts/Makefile.lib | 1 + tools/objtool/builtin-check.c | 7 ++++++- tools/objtool/check.c | 10 ++++++---- tools/objtool/include/objtool/builtin.h | 1 + 4 files changed, 14 insertions(+), 5 deletions(-)
scripts/Makefile.lib +1 -0
@@ -254,6 +254,7 @@ objtool := $(objtree)/tools/objtool/objtool objtool-args-$(CONFIG_HAVE_JUMP_LABEL_HACK) += --hacks=jump_label objtool-args-$(CONFIG_HAVE_NOINSTR_HACK) += --hacks=noinstr +objtool-args-$(CONFIG_CALL_DEPTH_TRACKING) += --hacks=skylake objtool-args-$(CONFIG_X86_KERNEL_IBT) += --ibt objtool-args-$(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL) += --mcount objtool-args-$(CONFIG_UNWINDER_ORC) += --orc
tools/objtool/builtin-check.c +6 -1
@@ -57,12 +57,17 @@ static int parse_hacks(const struct option *opt, const char *str, int unset) found = true; } +if (!str ||strstr (str,"skylake" )) { + opts.hack_skylake = true; + found = true; + } +return found ?0 :-1 ; }const struct option check_options[] = {OPT_GROUP ("Actions:" ), -OPT_CALLBACK_OPTARG ('h' ,"hacks" ,NULL ,NULL ,"jump_label,noinstr" ,"patch toolchain bugs/limitations" , parse_hacks), +OPT_CALLBACK_OPTARG ('h' ,"hacks" ,NULL ,NULL ,"jump_label,noinstr,skylake" ,"patch toolchain bugs/limitations" , parse_hacks),OPT_BOOLEAN ('i' ,"ibt" , &opts.ibt,"validate and annotate IBT" ),OPT_BOOLEAN ('m' ,"mcount" , &opts.mcount,"annotate mcount/fentry calls for ftrace" ),OPT_BOOLEAN ('n' ,"noinstr" , &opts.noinstr,"validate noinstr rules" ),
tools/objtool/check.c +6 -4
@@ -4352,10 +4352,12 @@ int check(struct objtool_file *file) goto out; warnings += ret; - ret =create_direct_call_sections (file); -if (ret <0 ) - goto out; - warnings += ret; +if (opts.hack_skylake) { + ret =create_direct_call_sections (file); +if (ret <0 ) + goto out; + warnings += ret; + } }if (opts.mcount) {
tools/objtool/include/objtool/builtin.h +1 -0
@@ -14,6 +14,7 @@ struct opts {bool dump_orc;bool hack_jump_label;bool hack_noinstr; +bool hack_skylake;bool ibt;bool mcount;bool noinstr;
Peter Zijlstra
maintainerPATCH v3 32/59 objtool: Allow STT_NOTYPE -> STT_FUNC+0 tail-calls
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
Allow STT_NOTYPE to tail-call into STT_FUNC, per definition STT_NOTYPE is not a sub-function of the STT_FUNC.
--- tools/objtool/check.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-)
tools/objtool/check.c +20 -9
@@ -1370,6 +1370,16 @@ static void add_return_call(struct objtostatic bool same_function (struct instruction *insn1,struct instruction *insn2) { +if (!insn1->func && !insn2->func) +return true; + +/* Allow STT_NOTYPE -> STT_FUNC+0 tail-calls */ +if (!insn1->func && insn1->func != insn2->func) +return false; + +if (!insn2->func) +return true; +return insn1->func->pfunc == insn2->func->pfunc; }
@@ -1487,18 +1497,19 @@ static int add_jump_destinations(struct strstr(jump_dest->func->name, ".cold")) { insn->func->cfunc = jump_dest->func; jump_dest->func->pfunc = insn->func; - - } else if (!same_function(insn, jump_dest) && -is_first_func_insn (file ,jump_dest )) { -/* -* Internal sibling call without reloc or with -* STT_SECTION reloc. -*/ -add_call_dest (file, insn, jump_dest->func, true); -continue ; } } +if (!same_function (insn, jump_dest) && +is_first_func_insn (file, jump_dest)) { +/* +* Internal sibling call without reloc or with +* STT_SECTION reloc. +*/ +add_call_dest (file, insn, jump_dest->func, true); +continue ; + } + insn->jump_dest = jump_dest; }
Pawan Gupta
reviewerRe: [PATCH v3 32/59] objtool: Allow STT_NOTYPE -> STT_FUNC+0 tail-calls
Quoted 15 lines · Peter Zijlstra
From: Peter Zijlstra <[email protected]>
Allow
STT_NOTYPEto tail-call intoSTT_FUNC, per definitionSTT_NOTYPEis not a sub-function of theSTT_FUNC.Signed-off-by Peter Zijlstra (Intel) <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>--- tools/objtool/check.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-)
tools/objtool/check.c static void add_return_call(struct objto · line 1378
Quoted 9 lines
tools/objtool/check.c +6
-0@@ -1370,6 +1370,16 @@ static void add_return_call(struct objtostatic bool same_function (struct instruction *insn1,struct instruction *insn2) { +if (!insn1->func && !insn2->func) +return true; + +/* Allow STT_NOTYPE -> STT_FUNC+0 tail-calls */ +if (!insn1->func && insn1->func != insn2->func) +return false;
Looks like this check is triggering below warning:
vmlinux.o: warning: objtool: ftrace_replace_code.cold+0x0: unreachable instruction
(.config is attached)
tools/objtool/check.c static void add_return_call(struct objto · line 1384
Quoted 6 lines
tools/objtool/check.c +4
-0+ +if (!insn2->func) +return true; +return insn1->func->pfunc == insn2->func->pfunc; }
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.0.0-rc6 Kernel Configuration
#CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)" CONFIG_CC_IS_GCC=yCONFIG_GCC_VERSION=120101CONFIG_CLANG_VERSION=0CONFIG_AS_IS_GNU=yCONFIG_AS_VERSION=23700CONFIG_LD_IS_BFD=yCONFIG_LD_VERSION=23700CONFIG_LLD_VERSION=0CONFIG_CC_CAN_LINK=yCONFIG_CC_CAN_LINK_STATIC=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y CONFIG_CC_HAS_ASM_INLINE=y CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y CONFIG_PAHOLE_VERSION=123CONFIG_IRQ_WORK=yCONFIG_BUILDTIME_TABLE_SORT=yCONFIG_THREAD_INFO_IN_TASK=y
#
# General setup
#CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not setCONFIG_WERROR=yCONFIG_LOCALVERSION=""CONFIG_LOCALVERSION_AUTO=yCONFIG_BUILD_SALT=""CONFIG_HAVE_KERNEL_GZIP=yCONFIG_HAVE_KERNEL_BZIP2=yCONFIG_HAVE_KERNEL_LZMA=yCONFIG_HAVE_KERNEL_XZ=yCONFIG_HAVE_KERNEL_LZO=yCONFIG_HAVE_KERNEL_LZ4=yCONFIG_HAVE_KERNEL_ZSTD=yCONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
# CONFIG_KERNEL_ZSTD is not setCONFIG_DEFAULT_INIT=""CONFIG_DEFAULT_HOSTNAME="(none)"CONFIG_SYSVIPC=yCONFIG_SYSVIPC_SYSCTL=yCONFIG_SYSVIPC_COMPAT=yCONFIG_POSIX_MQUEUE=yCONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_WATCH_QUEUE is not setCONFIG_CROSS_MEMORY_ATTACH=y
# CONFIG_USELIB is not setCONFIG_AUDIT=yCONFIG_HAVE_ARCH_AUDITSYSCALL=yCONFIG_AUDITSYSCALL=y
#
# IRQ subsystem
#CONFIG_GENERIC_IRQ_PROBE=yCONFIG_GENERIC_IRQ_SHOW=yCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=yCONFIG_GENERIC_PENDING_IRQ=yCONFIG_GENERIC_IRQ_MIGRATION=yCONFIG_HARDIRQS_SW_RESEND=yCONFIG_IRQ_DOMAIN=yCONFIG_IRQ_DOMAIN_HIERARCHY=yCONFIG_GENERIC_MSI_IRQ=yCONFIG_GENERIC_MSI_IRQ_DOMAIN=yCONFIG_IRQ_MSI_IOMMU=yCONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=yCONFIG_GENERIC_IRQ_RESERVATION_MODE=yCONFIG_IRQ_FORCED_THREADING=yCONFIG_SPARSE_IRQ=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
# end of IRQ subsystem
CONFIG_CLOCKSOURCE_WATCHDOG=yCONFIG_ARCH_CLOCKSOURCE_INIT=yCONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=yCONFIG_GENERIC_TIME_VSYSCALL=yCONFIG_GENERIC_CLOCKEVENTS=yCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=yCONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=yCONFIG_GENERIC_CMOS_UPDATE=yCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=yCONFIG_POSIX_CPU_TIMERS_TASK_WORK=yCONFIG_CONTEXT_TRACKING=yCONFIG_CONTEXT_TRACKING_IDLE=y
#
# Timers subsystem
#CONFIG_TICK_ONESHOT=yCONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not setCONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not setCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=yCONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
# end of Timers subsystem
CONFIG_BPF=yCONFIG_HAVE_EBPF_JIT=yCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
#
# BPF subsystem
#CONFIG_BPF_SYSCALL=yCONFIG_BPF_JIT=y
# CONFIG_BPF_JIT_ALWAYS_ON is not setCONFIG_BPF_JIT_DEFAULT_ON=yCONFIG_BPF_UNPRIV_DEFAULT_OFF=y
# CONFIG_BPF_PRELOAD is not set
# CONFIG_BPF_LSM is not set
# end of BPF subsystem
CONFIG_PREEMPT_BUILD=y
# CONFIG_PREEMPT_NONE is not setCONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not setCONFIG_PREEMPT_COUNT=yCONFIG_PREEMPTION=yCONFIG_PREEMPT_DYNAMIC=y
# CONFIG_SCHED_CORE is not set
#
# CPU/Task time and stats accounting
#CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
# CONFIG_IRQ_TIME_ACCOUNTING is not setCONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not setCONFIG_TASKSTATS=yCONFIG_TASK_DELAY_ACCT=yCONFIG_TASK_XACCT=yCONFIG_TASK_IO_ACCOUNTING=y
# CONFIG_PSI is not set
# end of CPU/Task time and stats accounting
CONFIG_CPU_ISOLATION=y
#
# RCU Subsystem
#CONFIG_TREE_RCU=yCONFIG_PREEMPT_RCU=y
# CONFIG_RCU_EXPERT is not setCONFIG_SRCU=yCONFIG_TREE_SRCU=yCONFIG_TASKS_RCU_GENERIC=yCONFIG_TASKS_RCU=yCONFIG_TASKS_RUDE_RCU=yCONFIG_TASKS_TRACE_RCU=yCONFIG_RCU_STALL_COMMON=yCONFIG_RCU_NEED_SEGCBLIST=y
# end of RCU Subsystem
# CONFIG_IKCONFIG is not set
# CONFIG_IKHEADERS is not setCONFIG_LOG_BUF_SHIFT=18CONFIG_LOG_CPU_MAX_BUF_SHIFT=12CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
# CONFIG_PRINTK_INDEX is not setCONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
#
# Scheduler features
#
# CONFIG_UCLAMP_TASK is not set
# end of Scheduler features
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y CONFIG_CC_HAS_INT128=y CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" CONFIG_GCC12_NO_ARRAY_BOUNDS=y CONFIG_CC_NO_ARRAY_BOUNDS=y CONFIG_ARCH_SUPPORTS_INT128=y
# CONFIG_NUMA_BALANCING is not set CONFIG_CGROUPS=yCONFIG_PAGE_COUNTER=y
# CONFIG_CGROUP_FAVOR_DYNMODS is not set
# CONFIG_MEMCG is not setCONFIG_BLK_CGROUP=yCONFIG_CGROUP_SCHED=yCONFIG_FAIR_GROUP_SCHED=y
# CONFIG_CFS_BANDWIDTH is not set
# CONFIG_RT_GROUP_SCHED is not set CONFIG_CGROUP_PIDS=yCONFIG_CGROUP_RDMA=yCONFIG_CGROUP_FREEZER=yCONFIG_CGROUP_HUGETLB=yCONFIG_CPUSETS=yCONFIG_PROC_PID_CPUSET=yCONFIG_CGROUP_DEVICE=yCONFIG_CGROUP_CPUACCT=yCONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_BPF is not set CONFIG_CGROUP_MISC=yCONFIG_CGROUP_DEBUG=yCONFIG_SOCK_CGROUP_DATA=yCONFIG_NAMESPACES=yCONFIG_UTS_NS=yCONFIG_TIME_NS=yCONFIG_IPC_NS=y
# CONFIG_USER_NS is not setCONFIG_PID_NS=yCONFIG_NET_NS=y
# CONFIG_CHECKPOINT_RESTORE is not set
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not set CONFIG_RELAY=yCONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE=""CONFIG_RD_GZIP=yCONFIG_RD_BZIP2=yCONFIG_RD_LZMA=yCONFIG_RD_XZ=yCONFIG_RD_LZO=yCONFIG_RD_LZ4=yCONFIG_RD_ZSTD=y
# CONFIG_BOOT_CONFIG is not set CONFIG_INITRAMFS_PRESERVE_MTIME=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_LD_ORPHAN_WARN=yCONFIG_SYSCTL=yCONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_HAVE_PCSPKR_PLATFORM=y
# CONFIG_EXPERT is not setCONFIG_UID16=yCONFIG_MULTIUSER=yCONFIG_SGETMASK_SYSCALL=yCONFIG_SYSFS_SYSCALL=yCONFIG_FHANDLE=yCONFIG_POSIX_TIMERS=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_PCSPKR_PLATFORM=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_FUTEX_PI=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_IO_URING=yCONFIG_ADVISE_SYSCALLS=yCONFIG_MEMBARRIER=yCONFIG_KALLSYMS=yCONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_KCMP=yCONFIG_RSEQ=y
# CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y CONFIG_GUEST_PERF_EVENTS=y
#
# Kernel Performance Events And Counters
#CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
# end of Kernel Performance Events And Counters
CONFIG_SYSTEM_DATA_VERIFICATION=yCONFIG_PROFILING=yCONFIG_TRACEPOINTS=y
# end of General setup
CONFIG_64BIT=yCONFIG_X86_64=yCONFIG_X86=yCONFIG_INSTRUCTION_DECODER=yCONFIG_OUTPUT_FORMAT="elf64-x86-64"CONFIG_LOCKDEP_SUPPORT=yCONFIG_STACKTRACE_SUPPORT=yCONFIG_MMU=yCONFIG_ARCH_MMAP_RND_BITS_MIN=28CONFIG_ARCH_MMAP_RND_BITS_MAX=32CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16CONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_BUG=yCONFIG_GENERIC_BUG_RELATIVE_POINTERS=yCONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_ARCH_HAS_CPU_RELAX=yCONFIG_ARCH_HIBERNATION_POSSIBLE=yCONFIG_ARCH_NR_GPIO=1024CONFIG_ARCH_SUSPEND_POSSIBLE=yCONFIG_AUDIT_ARCH=yCONFIG_HAVE_INTEL_TXT=yCONFIG_X86_64_SMP=yCONFIG_ARCH_SUPPORTS_UPROBES=yCONFIG_FIX_EARLYCON_MEM=yCONFIG_PGTABLE_LEVELS=5CONFIG_CC_HAS_SANE_STACKPROTECTOR=y
#
# Processor type and features
#CONFIG_SMP=yCONFIG_X86_FEATURE_NAMES=y
# CONFIG_X86_X2APIC is not setCONFIG_X86_MPPARSE=y
# CONFIG_GOLDFISH is not set
# CONFIG_X86_CPU_RESCTRL is not setCONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_VSMP is not set
# CONFIG_X86_GOLDFISH is not set
# CONFIG_X86_INTEL_MID is not set
# CONFIG_X86_INTEL_LPSS is not set
# CONFIG_X86_AMD_PLATFORM_DEVICE is not setCONFIG_IOSF_MBI=y
# CONFIG_IOSF_MBI_DEBUG is not setCONFIG_X86_SUPPORTS_MEMORY_FAILURE=yCONFIG_SCHED_OMIT_FRAME_POINTER=yCONFIG_HYPERVISOR_GUEST=yCONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_DEBUG is not set
# CONFIG_PARAVIRT_SPINLOCKS is not setCONFIG_X86_HV_CALLBACK_VECTOR=y
# CONFIG_XEN is not setCONFIG_KVM_GUEST=yCONFIG_ARCH_CPUIDLE_HALTPOLL=y
# CONFIG_PVH is not set
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not setCONFIG_PARAVIRT_CLOCK=y
# CONFIG_JAILHOUSE_GUEST is not set
# CONFIG_ACRN_GUEST is not set
# CONFIG_MK8 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not setCONFIG_GENERIC_CPU=yCONFIG_X86_INTERNODE_CACHE_SHIFT=6CONFIG_X86_L1_CACHE_SHIFT=6CONFIG_X86_TSC=yCONFIG_X86_CMPXCHG64=yCONFIG_X86_CMOV=yCONFIG_X86_MINIMUM_CPU_FAMILY=64CONFIG_X86_DEBUGCTLMSR=yCONFIG_IA32_FEAT_CTL=yCONFIG_X86_VMX_FEATURE_NAMES=yCONFIG_CPU_SUP_INTEL=yCONFIG_CPU_SUP_AMD=yCONFIG_CPU_SUP_HYGON=yCONFIG_CPU_SUP_CENTAUR=yCONFIG_CPU_SUP_ZHAOXIN=yCONFIG_HPET_TIMER=yCONFIG_HPET_EMULATE_RTC=yCONFIG_DMI=y
# CONFIG_GART_IOMMU is not set
# CONFIG_MAXSMP is not setCONFIG_NR_CPUS_RANGE_BEGIN=2CONFIG_NR_CPUS_RANGE_END=512CONFIG_NR_CPUS_DEFAULT=64CONFIG_NR_CPUS=64CONFIG_SCHED_CLUSTER=yCONFIG_SCHED_SMT=yCONFIG_SCHED_MC=yCONFIG_SCHED_MC_PRIO=yCONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=yCONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=yCONFIG_X86_MCE=y
# CONFIG_X86_MCELOG_LEGACY is not setCONFIG_X86_MCE_INTEL=yCONFIG_X86_MCE_AMD=yCONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
#
# Performance monitoring
#CONFIG_PERF_EVENTS_INTEL_UNCORE=yCONFIG_PERF_EVENTS_INTEL_RAPL=yCONFIG_PERF_EVENTS_INTEL_CSTATE=y
# CONFIG_PERF_EVENTS_AMD_POWER is not setCONFIG_PERF_EVENTS_AMD_UNCORE=y
# CONFIG_PERF_EVENTS_AMD_BRS is not set
# end of Performance monitoring
CONFIG_X86_16BIT=yCONFIG_X86_ESPFIX64=yCONFIG_X86_VSYSCALL_EMULATION=yCONFIG_X86_IOPL_IOPERM=yCONFIG_MICROCODE=yCONFIG_MICROCODE_INTEL=yCONFIG_MICROCODE_AMD=y
# CONFIG_MICROCODE_LATE_LOADING is not setCONFIG_X86_MSR=yCONFIG_X86_CPUID=yCONFIG_X86_5LEVEL=yCONFIG_X86_DIRECT_GBPAGES=y
# CONFIG_X86_CPA_STATISTICS is not set
# CONFIG_AMD_MEM_ENCRYPT is not setCONFIG_NUMA=yCONFIG_AMD_NUMA=yCONFIG_X86_64_ACPI_NUMA=y
# CONFIG_NUMA_EMU is not setCONFIG_NODES_SHIFT=6CONFIG_ARCH_SPARSEMEM_ENABLE=yCONFIG_ARCH_SPARSEMEM_DEFAULT=yCONFIG_ARCH_PROC_KCORE_TEXT=yCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
# CONFIG_X86_PMEM_LEGACY is not setCONFIG_X86_CHECK_BIOS_CORRUPTION=yCONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=yCONFIG_MTRR=y
# CONFIG_MTRR_SANITIZER is not setCONFIG_X86_PAT=yCONFIG_ARCH_USES_PG_UNCACHED=yCONFIG_X86_UMIP=yCONFIG_CC_HAS_IBT=yCONFIG_X86_KERNEL_IBT=yCONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=yCONFIG_X86_INTEL_TSX_MODE_OFF=y
# CONFIG_X86_INTEL_TSX_MODE_ON is not set
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
# CONFIG_X86_SGX is not setCONFIG_EFI=yCONFIG_EFI_STUB=yCONFIG_EFI_MIXED=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not setCONFIG_HZ_1000=yCONFIG_HZ=1000CONFIG_SCHED_HRTICK=yCONFIG_KEXEC=y
# CONFIG_KEXEC_FILE is not setCONFIG_CRASH_DUMP=y
# CONFIG_KEXEC_JUMP is not setCONFIG_PHYSICAL_START=0x1000000CONFIG_RELOCATABLE=y
# CONFIG_RANDOMIZE_BASE is not setCONFIG_PHYSICAL_ALIGN=0x200000CONFIG_DYNAMIC_MEMORY_LAYOUT=yCONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
# CONFIG_COMPAT_VDSO is not setCONFIG_LEGACY_VSYSCALL_XONLY=y
# CONFIG_LEGACY_VSYSCALL_NONE is not set
# CONFIG_CMDLINE_BOOL is not setCONFIG_MODIFY_LDT_SYSCALL=y
# CONFIG_STRICT_SIGALTSTACK_SIZE is not setCONFIG_HAVE_LIVEPATCH=y
# CONFIG_LIVEPATCH is not set
# end of Processor type and features
CONFIG_CC_HAS_SLS=yCONFIG_CC_HAS_RETURN_THUNK=yCONFIG_CC_HAS_ENTRY_PADDING=yCONFIG_FUNCTION_PADDING_CFI=11CONFIG_FUNCTION_PADDING_BYTES=16CONFIG_HAVE_CALL_THUNKS=yCONFIG_CALL_THUNKS=yCONFIG_SPECULATION_MITIGATIONS=yCONFIG_PAGE_TABLE_ISOLATION=yCONFIG_RETPOLINE=yCONFIG_RETHUNK=yCONFIG_CPU_UNRET_ENTRY=yCONFIG_CALL_DEPTH_TRACKING=y
# CONFIG_CALL_THUNKS_DEBUG is not setCONFIG_CPU_IBPB_ENTRY=yCONFIG_CPU_IBRS_ENTRY=y
# CONFIG_SLS is not setCONFIG_ARCH_HAS_ADD_PAGES=yCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
#
# Power management and ACPI options
#CONFIG_ARCH_HIBERNATION_HEADER=yCONFIG_SUSPEND=yCONFIG_SUSPEND_FREEZER=yCONFIG_HIBERNATE_CALLBACKS=yCONFIG_HIBERNATION=yCONFIG_HIBERNATION_SNAPSHOT_DEV=yCONFIG_PM_STD_PARTITION=""CONFIG_PM_SLEEP=yCONFIG_PM_SLEEP_SMP=y
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_PM_USERSPACE_AUTOSLEEP is not set
# CONFIG_PM_WAKELOCKS is not setCONFIG_PM=yCONFIG_PM_DEBUG=y
# CONFIG_PM_ADVANCED_DEBUG is not set
# CONFIG_PM_TEST_SUSPEND is not setCONFIG_PM_SLEEP_DEBUG=yCONFIG_PM_TRACE=yCONFIG_PM_TRACE_RTC=yCONFIG_PM_CLK=y
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
# CONFIG_ENERGY_MODEL is not setCONFIG_ARCH_SUPPORTS_ACPI=yCONFIG_ACPI=yCONFIG_ACPI_LEGACY_TABLES_LOOKUP=yCONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=yCONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
# CONFIG_ACPI_DEBUGGER is not setCONFIG_ACPI_SPCR_TABLE=y
# CONFIG_ACPI_FPDT is not setCONFIG_ACPI_LPIT=yCONFIG_ACPI_SLEEP=yCONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
# CONFIG_ACPI_EC_DEBUGFS is not setCONFIG_ACPI_AC=yCONFIG_ACPI_BATTERY=yCONFIG_ACPI_BUTTON=yCONFIG_ACPI_VIDEO=yCONFIG_ACPI_FAN=y
# CONFIG_ACPI_TAD is not setCONFIG_ACPI_DOCK=yCONFIG_ACPI_CPU_FREQ_PSS=yCONFIG_ACPI_PROCESSOR_CSTATE=yCONFIG_ACPI_PROCESSOR_IDLE=yCONFIG_ACPI_CPPC_LIB=yCONFIG_ACPI_PROCESSOR=yCONFIG_ACPI_HOTPLUG_CPU=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not setCONFIG_ACPI_THERMAL=yCONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=yCONFIG_ACPI_TABLE_UPGRADE=y
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not setCONFIG_ACPI_CONTAINER=yCONFIG_ACPI_HOTPLUG_IOAPIC=y
# CONFIG_ACPI_SBS is not set
# CONFIG_ACPI_HED is not set
# CONFIG_ACPI_CUSTOM_METHOD is not setCONFIG_ACPI_BGRT=y
# CONFIG_ACPI_NFIT is not setCONFIG_ACPI_NUMA=y
# CONFIG_ACPI_HMAT is not setCONFIG_HAVE_ACPI_APEI=yCONFIG_HAVE_ACPI_APEI_NMI=y
# CONFIG_ACPI_APEI is not set
# CONFIG_ACPI_DPTF is not set
# CONFIG_ACPI_CONFIGFS is not set
# CONFIG_ACPI_PFRUT is not setCONFIG_ACPI_PCC=y
# CONFIG_PMIC_OPREGION is not setCONFIG_ACPI_PRMT=yCONFIG_X86_PM_TIMER=y
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_GOV_ATTR_SET=y CONFIG_CPU_FREQ_GOV_COMMON=y
# CONFIG_CPU_FREQ_STAT is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
#
# CPU frequency scaling drivers
#CONFIG_X86_INTEL_PSTATE=y
# CONFIG_X86_PCC_CPUFREQ is not set
# CONFIG_X86_AMD_PSTATE is not setCONFIG_X86_ACPI_CPUFREQ=yCONFIG_X86_ACPI_CPUFREQ_CPB=y
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_P4_CLOCKMOD is not set
#
# shared options # # end of CPU Frequency scaling
#
# CPU Idle
#CONFIG_CPU_IDLE=y
# CONFIG_CPU_IDLE_GOV_LADDER is not setCONFIG_CPU_IDLE_GOV_MENU=y
# CONFIG_CPU_IDLE_GOV_TEO is not set
# CONFIG_CPU_IDLE_GOV_HALTPOLL is not setCONFIG_HALTPOLL_CPUIDLE=y
# end of CPU Idle
# CONFIG_INTEL_IDLE is not set
# end of Power management and ACPI options
#
# Bus options (PCI etc.)
#CONFIG_PCI_DIRECT=yCONFIG_PCI_MMCONFIG=yCONFIG_MMCONF_FAM10H=yCONFIG_ISA_DMA_API=yCONFIG_AMD_NB=y
# end of Bus options (PCI etc.)
#
# Binary Emulations
#CONFIG_IA32_EMULATION=y
# CONFIG_X86_X32_ABI is not setCONFIG_COMPAT_32=yCONFIG_COMPAT=yCONFIG_COMPAT_FOR_U64_ALIGNMENT=y
# end of Binary Emulations
CONFIG_HAVE_KVM=yCONFIG_HAVE_KVM_PFNCACHE=yCONFIG_HAVE_KVM_IRQCHIP=yCONFIG_HAVE_KVM_IRQFD=yCONFIG_HAVE_KVM_IRQ_ROUTING=yCONFIG_HAVE_KVM_DIRTY_RING=yCONFIG_HAVE_KVM_EVENTFD=yCONFIG_KVM_MMIO=yCONFIG_KVM_ASYNC_PF=yCONFIG_HAVE_KVM_MSI=yCONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=yCONFIG_KVM_VFIO=yCONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=yCONFIG_KVM_COMPAT=yCONFIG_HAVE_KVM_IRQ_BYPASS=yCONFIG_HAVE_KVM_NO_POLL=yCONFIG_KVM_XFER_TO_GUEST_WORK=yCONFIG_HAVE_KVM_PM_NOTIFIER=yCONFIG_VIRTUALIZATION=yCONFIG_KVM=yCONFIG_KVM_INTEL=yCONFIG_KVM_AMD=y
# CONFIG_KVM_XEN is not setCONFIG_AS_AVX512=yCONFIG_AS_SHA1_NI=yCONFIG_AS_SHA256_NI=yCONFIG_AS_TPAUSE=y
#
# General architecture-dependent options
#CONFIG_CRASH_CORE=yCONFIG_KEXEC_CORE=yCONFIG_HOTPLUG_SMT=yCONFIG_GENERIC_ENTRY=yCONFIG_KPROBES=yCONFIG_JUMP_LABEL=y
# CONFIG_STATIC_KEYS_SELFTEST is not set
# CONFIG_STATIC_CALL_SELFTEST is not set CONFIG_OPTPROBES=y CONFIG_KPROBES_ON_FTRACE=yCONFIG_UPROBES=y CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_KRETPROBES=y CONFIG_KRETPROBE_ON_RETHOOK=y CONFIG_USER_RETURN_NOTIFIER=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_KPROBES_ON_FTRACE=y CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y CONFIG_HAVE_NMI=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_ARCH_HAS_FORTIFY_SOURCE=y CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_ARCH_HAS_SET_DIRECT_MAP=y CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y CONFIG_ARCH_WANTS_NO_INSTR=y CONFIG_HAVE_ASM_MODVERSIONS=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_RSEQ=y CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y CONFIG_HAVE_USER_RETURN_NOTIFIER=y CONFIG_HAVE_PERF_EVENTS_NMI=y CONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y CONFIG_MMU_GATHER_TABLE_FREE=y CONFIG_MMU_GATHER_RCU_TABLE_FREE=y CONFIG_MMU_GATHER_MERGE_VMAS=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y CONFIG_HAVE_ARCH_SECCOMP=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_SECCOMP=yCONFIG_SECCOMP_FILTER=y
# CONFIG_SECCOMP_CACHE_DEBUG is not set CONFIG_HAVE_ARCH_STACKLEAK=y CONFIG_HAVE_STACKPROTECTOR=y CONFIG_STACKPROTECTOR=y CONFIG_STACKPROTECTOR_STRONG=y CONFIG_ARCH_SUPPORTS_LTO_CLANG=y CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y CONFIG_LTO_NONE=y CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y CONFIG_HAVE_CONTEXT_TRACKING_USER=y CONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y CONFIG_HAVE_MOVE_PUD=y CONFIG_HAVE_MOVE_PMD=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y CONFIG_HAVE_ARCH_HUGE_VMAP=y CONFIG_HAVE_ARCH_HUGE_VMALLOC=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_HAVE_ARCH_SOFT_DIRTY=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y CONFIG_SOFTIRQ_ON_OWN_STACK=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_HAVE_ARCH_MMAP_RND_BITS=y CONFIG_HAVE_EXIT_THREAD=y CONFIG_ARCH_MMAP_RND_BITS=28 CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8 CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_HAVE_OBJTOOL=y CONFIG_HAVE_JUMP_LABEL_HACK=y CONFIG_HAVE_NOINSTR_HACK=y CONFIG_HAVE_NOINSTR_VALIDATION=y CONFIG_HAVE_UACCESS_VALIDATION=y CONFIG_HAVE_STACK_VALIDATION=y CONFIG_HAVE_RELIABLE_STACKTRACE=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_COMPAT_OLD_SIGACTION=y CONFIG_COMPAT_32BIT_TIME=y CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_VMAP_STACK=y CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y CONFIG_RANDOMIZE_KSTACK_OFFSET=y
# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_STRICT_MODULE_RWX=y CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y CONFIG_ARCH_USE_MEMREMAP_PROT=y
# CONFIG_LOCK_EVENT_COUNTS is not set CONFIG_ARCH_HAS_MEM_ENCRYPT=y CONFIG_HAVE_STATIC_CALL=y CONFIG_HAVE_STATIC_CALL_INLINE=y CONFIG_HAVE_PREEMPT_DYNAMIC=y CONFIG_HAVE_PREEMPT_DYNAMIC_CALL=y CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y CONFIG_ARCH_HAS_ELFCORE_COMPAT=y CONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y CONFIG_DYNAMIC_SIGFRAME=y
#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not setCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling
CONFIG_HAVE_GCC_PLUGINS=yCONFIG_FUNCTION_ALIGNMENT_4B=yCONFIG_FUNCTION_ALIGNMENT_16B=yCONFIG_FUNCTION_ALIGNMENT=16
# end of General architecture-dependent options
CONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set # CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
# CONFIG_MODULE_SIG is not set CONFIG_MODULE_COMPRESS_NONE=y
# CONFIG_MODULE_COMPRESS_GZIP is not set
# CONFIG_MODULE_COMPRESS_XZ is not set
# CONFIG_MODULE_COMPRESS_ZSTD is not set
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set CONFIG_MODPROBE_PATH="/sbin/modprobe" CONFIG_MODULES_TREE_LOOKUP=yCONFIG_BLOCK=yCONFIG_BLOCK_LEGACY_AUTOLOAD=y CONFIG_BLK_RQ_ALLOC_TIME=y CONFIG_BLK_DEV_BSG_COMMON=y
# CONFIG_BLK_DEV_BSGLIB is not set
# CONFIG_BLK_DEV_INTEGRITY is not set
# CONFIG_BLK_DEV_ZONED is not set
# CONFIG_BLK_DEV_THROTTLING is not set
# CONFIG_BLK_WBT is not set CONFIG_BLK_CGROUP_IOLATENCY=y CONFIG_BLK_CGROUP_IOCOST=y CONFIG_BLK_CGROUP_IOPRIO=yCONFIG_BLK_DEBUG_FS=y
# CONFIG_BLK_SED_OPAL is not set
# CONFIG_BLK_INLINE_ENCRYPTION is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not setCONFIG_MSDOS_PARTITION=yCONFIG_EFI_PARTITION=y
# end of Partition Types
CONFIG_BLOCK_COMPAT=yCONFIG_BLK_MQ_PCI=yCONFIG_BLK_MQ_VIRTIO=yCONFIG_BLK_PM=yCONFIG_BLOCK_HOLDER_DEPRECATED=yCONFIG_BLK_MQ_STACKING=y
#
# IO Schedulers
#CONFIG_MQ_IOSCHED_DEADLINE=yCONFIG_MQ_IOSCHED_KYBER=y
# CONFIG_IOSCHED_BFQ is not set
# end of IO Schedulers
CONFIG_PREEMPT_NOTIFIERS=yCONFIG_ASN1=yCONFIG_UNINLINE_SPIN_UNLOCK=yCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=yCONFIG_MUTEX_SPIN_ON_OWNER=yCONFIG_RWSEM_SPIN_ON_OWNER=yCONFIG_LOCK_SPIN_ON_OWNER=yCONFIG_ARCH_USE_QUEUED_SPINLOCKS=yCONFIG_QUEUED_SPINLOCKS=yCONFIG_ARCH_USE_QUEUED_RWLOCKS=yCONFIG_QUEUED_RWLOCKS=yCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=yCONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=yCONFIG_ARCH_HAS_SYSCALL_WRAPPER=yCONFIG_FREEZER=y
#
# Executable file formats
#CONFIG_BINFMT_ELF=yCONFIG_COMPAT_BINFMT_ELF=yCONFIG_ELFCORE=yCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=yCONFIG_BINFMT_SCRIPT=yCONFIG_BINFMT_MISC=yCONFIG_COREDUMP=y
# end of Executable file formats
#
# Memory Management options
#CONFIG_SWAP=y
# CONFIG_ZSWAP is not setCONFIG_ZSMALLOC=y
# CONFIG_ZSMALLOC_STAT is not set
#
# SLAB allocator options
#
# CONFIG_SLAB is not setCONFIG_SLUB=yCONFIG_SLAB_MERGE_DEFAULT=y
# CONFIG_SLAB_FREELIST_RANDOM is not set
# CONFIG_SLAB_FREELIST_HARDENED is not set
# CONFIG_SLUB_STATS is not setCONFIG_SLUB_CPU_PARTIAL=y
# end of SLAB allocator options
# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set
# CONFIG_COMPAT_BRK is not setCONFIG_SPARSEMEM=yCONFIG_SPARSEMEM_EXTREME=yCONFIG_SPARSEMEM_VMEMMAP_ENABLE=yCONFIG_SPARSEMEM_VMEMMAP=yCONFIG_HAVE_FAST_GUP=yCONFIG_EXCLUSIVE_SYSTEM_RAM=yCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
# CONFIG_MEMORY_HOTPLUG is not setCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=yCONFIG_COMPACTION=y
# CONFIG_PAGE_REPORTING is not setCONFIG_MIGRATION=yCONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=yCONFIG_PHYS_ADDR_T_64BIT=yCONFIG_MMU_NOTIFIER=y
# CONFIG_KSM is not setCONFIG_DEFAULT_MMAP_MIN_ADDR=4096CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
# CONFIG_MEMORY_FAILURE is not setCONFIG_ARCH_WANT_GENERAL_HUGETLB=yCONFIG_ARCH_WANTS_THP_SWAP=y
# CONFIG_TRANSPARENT_HUGEPAGE is not setCONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=yCONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=yCONFIG_USE_PERCPU_NUMA_NODE_ID=yCONFIG_HAVE_SETUP_PER_CPU_AREA=y
# CONFIG_CMA is not setCONFIG_GENERIC_EARLY_IOREMAP=y
# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set
# CONFIG_IDLE_PAGE_TRACKING is not setCONFIG_ARCH_HAS_CACHE_LINE_SIZE=yCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=yCONFIG_ARCH_HAS_PTE_DEVMAP=yCONFIG_ZONE_DMA=yCONFIG_ZONE_DMA32=yCONFIG_VMAP_PFN=yCONFIG_ARCH_USES_HIGH_VMA_FLAGS=yCONFIG_ARCH_HAS_PKEYS=yCONFIG_VM_EVENT_COUNTERS=y
# CONFIG_PERCPU_STATS is not set
# CONFIG_GUP_TEST is not setCONFIG_ARCH_HAS_PTE_SPECIAL=yCONFIG_SECRETMEM=y
# CONFIG_ANON_VMA_NAME is not set
# CONFIG_USERFAULTFD is not set
#
# Data Access Monitoring
#
# CONFIG_DAMON is not set
# end of Data Access Monitoring # end of Memory Management options
CONFIG_NET=yCONFIG_NET_INGRESS=yCONFIG_NET_EGRESS=yCONFIG_SKB_EXTENSIONS=y
#
# Networking options
#CONFIG_PACKET=y
# CONFIG_PACKET_DIAG is not setCONFIG_UNIX=yCONFIG_UNIX_SCM=yCONFIG_AF_UNIX_OOB=y
# CONFIG_UNIX_DIAG is not set
# CONFIG_TLS is not setCONFIG_XFRM=yCONFIG_XFRM_ALGO=yCONFIG_XFRM_USER=y
# CONFIG_XFRM_USER_COMPAT is not set
# CONFIG_XFRM_INTERFACE is not set
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not setCONFIG_XFRM_AH=yCONFIG_XFRM_ESP=y
# CONFIG_NET_KEY is not set
# CONFIG_XDP_SOCKETS is not setCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_IP_ADVANCED_ROUTER=y
# CONFIG_IP_FIB_TRIE_STATS is not setCONFIG_IP_MULTIPLE_TABLES=yCONFIG_IP_ROUTE_MULTIPATH=yCONFIG_IP_ROUTE_VERBOSE=yCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=yCONFIG_IP_PNP_BOOTP=yCONFIG_IP_PNP_RARP=y
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE_DEMUX is not setCONFIG_NET_IP_TUNNEL=yCONFIG_IP_MROUTE_COMMON=yCONFIG_IP_MROUTE=y
# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not setCONFIG_IP_PIMSM_V1=yCONFIG_IP_PIMSM_V2=yCONFIG_SYN_COOKIES=y
# CONFIG_NET_IPVTI is not set
# CONFIG_NET_FOU is not set
# CONFIG_NET_FOU_IP_TUNNELS is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not setCONFIG_INET_TUNNEL=y
# CONFIG_INET_DIAG is not setCONFIG_TCP_CONG_ADVANCED=y
# CONFIG_TCP_CONG_BIC is not setCONFIG_TCP_CONG_CUBIC=y
# CONFIG_TCP_CONG_WESTWOOD is not set
# CONFIG_TCP_CONG_HTCP is not set
# CONFIG_TCP_CONG_HSTCP is not set
# CONFIG_TCP_CONG_HYBLA is not set
# CONFIG_TCP_CONG_VEGAS is not set
# CONFIG_TCP_CONG_NV is not set
# CONFIG_TCP_CONG_SCALABLE is not set
# CONFIG_TCP_CONG_LP is not set
# CONFIG_TCP_CONG_VENO is not set
# CONFIG_TCP_CONG_YEAH is not set
# CONFIG_TCP_CONG_ILLINOIS is not set
# CONFIG_TCP_CONG_DCTCP is not set
# CONFIG_TCP_CONG_CDG is not set
# CONFIG_TCP_CONG_BBR is not setCONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_RENO is not setCONFIG_DEFAULT_TCP_CONG="cubic"CONFIG_TCP_MD5SIG=yCONFIG_IPV6=y
# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not setCONFIG_INET6_AH=yCONFIG_INET6_ESP=y
# CONFIG_INET6_ESP_OFFLOAD is not set
# CONFIG_INET6_ESPINTCP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_IPV6_MIP6 is not set
# CONFIG_IPV6_ILA is not set
# CONFIG_IPV6_VTI is not setCONFIG_IPV6_SIT=y
# CONFIG_IPV6_SIT_6RD is not setCONFIG_IPV6_NDISC_NODETYPE=y
# CONFIG_IPV6_TUNNEL is not set
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_IPV6_MROUTE is not set
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
# CONFIG_IPV6_RPL_LWTUNNEL is not set
# CONFIG_IPV6_IOAM6_LWTUNNEL is not setCONFIG_NETLABEL=y
# CONFIG_MPTCP is not setCONFIG_NETWORK_SECMARK=yCONFIG_NET_PTP_CLASSIFY=y
# CONFIG_NETWORK_PHY_TIMESTAMPING is not setCONFIG_NETFILTER=y
# CONFIG_NETFILTER_ADVANCED is not set
#
# Core Netfilter Configuration
#CONFIG_NETFILTER_INGRESS=yCONFIG_NETFILTER_EGRESS=yCONFIG_NETFILTER_SKIP_EGRESS=yCONFIG_NETFILTER_NETLINK=yCONFIG_NETFILTER_NETLINK_LOG=yCONFIG_NF_CONNTRACK=yCONFIG_NF_LOG_SYSLOG=mCONFIG_NF_CONNTRACK_SECMARK=yCONFIG_NF_CONNTRACK_PROCFS=y
# CONFIG_NF_CONNTRACK_LABELS is not setCONFIG_NF_CONNTRACK_FTP=yCONFIG_NF_CONNTRACK_IRC=y
# CONFIG_NF_CONNTRACK_NETBIOS_NS is not setCONFIG_NF_CONNTRACK_SIP=yCONFIG_NF_CT_NETLINK=y
# CONFIG_NETFILTER_NETLINK_GLUE_CT is not setCONFIG_NF_NAT=yCONFIG_NF_NAT_FTP=yCONFIG_NF_NAT_IRC=yCONFIG_NF_NAT_SIP=yCONFIG_NF_NAT_MASQUERADE=y
# CONFIG_NF_TABLES is not setCONFIG_NETFILTER_XTABLES=yCONFIG_NETFILTER_XTABLES_COMPAT=y
#
# Xtables combined modules
#CONFIG_NETFILTER_XT_MARK=m
#
# Xtables targets
#CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=yCONFIG_NETFILTER_XT_TARGET_LOG=mCONFIG_NETFILTER_XT_NAT=m
# CONFIG_NETFILTER_XT_TARGET_NETMAP is not setCONFIG_NETFILTER_XT_TARGET_NFLOG=y
# CONFIG_NETFILTER_XT_TARGET_REDIRECT is not setCONFIG_NETFILTER_XT_TARGET_MASQUERADE=mCONFIG_NETFILTER_XT_TARGET_SECMARK=yCONFIG_NETFILTER_XT_TARGET_TCPMSS=y
#
# Xtables matches
#CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=mCONFIG_NETFILTER_XT_MATCH_CONNTRACK=yCONFIG_NETFILTER_XT_MATCH_POLICY=yCONFIG_NETFILTER_XT_MATCH_STATE=y
# end of Core Netfilter Configuration
# CONFIG_IP_SET is not set
# CONFIG_IP_VS is not set
#
# IP: Netfilter Configuration
#CONFIG_NF_DEFRAG_IPV4=y
# CONFIG_NF_SOCKET_IPV4 is not set
# CONFIG_NF_TPROXY_IPV4 is not set
# CONFIG_NF_DUP_IPV4 is not setCONFIG_NF_LOG_ARP=mCONFIG_NF_LOG_IPV4=mCONFIG_NF_REJECT_IPV4=yCONFIG_IP_NF_IPTABLES=yCONFIG_IP_NF_FILTER=yCONFIG_IP_NF_TARGET_REJECT=yCONFIG_IP_NF_NAT=mCONFIG_IP_NF_TARGET_MASQUERADE=mCONFIG_IP_NF_MANGLE=y
# CONFIG_IP_NF_RAW is not set
# end of IP: Netfilter Configuration
#
# IPv6: Netfilter Configuration
#
# CONFIG_NF_SOCKET_IPV6 is not set
# CONFIG_NF_TPROXY_IPV6 is not set
# CONFIG_NF_DUP_IPV6 is not setCONFIG_NF_REJECT_IPV6=yCONFIG_NF_LOG_IPV6=mCONFIG_IP6_NF_IPTABLES=yCONFIG_IP6_NF_MATCH_IPV6HEADER=yCONFIG_IP6_NF_FILTER=yCONFIG_IP6_NF_TARGET_REJECT=yCONFIG_IP6_NF_MANGLE=y
# CONFIG_IP6_NF_RAW is not set
# end of IPv6: Netfilter Configuration
CONFIG_NF_DEFRAG_IPV6=y
# CONFIG_NF_CONNTRACK_BRIDGE is not set
# CONFIG_BPFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_PHONET is not set
# CONFIG_6LOWPAN is not set
# CONFIG_IEEE802154 is not setCONFIG_NET_SCHED=y
#
# Queueing/Scheduling
#
# CONFIG_NET_SCH_CBQ is not set
# CONFIG_NET_SCH_HTB is not set
# CONFIG_NET_SCH_HFSC is not set
# CONFIG_NET_SCH_PRIO is not set
# CONFIG_NET_SCH_MULTIQ is not set
# CONFIG_NET_SCH_RED is not set
# CONFIG_NET_SCH_SFB is not set
# CONFIG_NET_SCH_SFQ is not set
# CONFIG_NET_SCH_TEQL is not set
# CONFIG_NET_SCH_TBF is not set
# CONFIG_NET_SCH_CBS is not set
# CONFIG_NET_SCH_ETF is not set
# CONFIG_NET_SCH_TAPRIO is not set
# CONFIG_NET_SCH_GRED is not set
# CONFIG_NET_SCH_DSMARK is not set
# CONFIG_NET_SCH_NETEM is not set
# CONFIG_NET_SCH_DRR is not set
# CONFIG_NET_SCH_MQPRIO is not set
# CONFIG_NET_SCH_SKBPRIO is not set
# CONFIG_NET_SCH_CHOKE is not set
# CONFIG_NET_SCH_QFQ is not set
# CONFIG_NET_SCH_CODEL is not set
# CONFIG_NET_SCH_FQ_CODEL is not set
# CONFIG_NET_SCH_CAKE is not set
# CONFIG_NET_SCH_FQ is not set
# CONFIG_NET_SCH_HHF is not set
# CONFIG_NET_SCH_PIE is not set
# CONFIG_NET_SCH_INGRESS is not set
# CONFIG_NET_SCH_PLUG is not set
# CONFIG_NET_SCH_ETS is not set
# CONFIG_NET_SCH_DEFAULT is not set
#
# Classification
#CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
# CONFIG_NET_CLS_TCINDEX is not set
# CONFIG_NET_CLS_ROUTE4 is not set
# CONFIG_NET_CLS_FW is not set
# CONFIG_NET_CLS_U32 is not set
# CONFIG_NET_CLS_RSVP is not set
# CONFIG_NET_CLS_RSVP6 is not set
# CONFIG_NET_CLS_FLOW is not setCONFIG_NET_CLS_CGROUP=y
# CONFIG_NET_CLS_BPF is not set
# CONFIG_NET_CLS_FLOWER is not set
# CONFIG_NET_CLS_MATCHALL is not setCONFIG_NET_EMATCH=yCONFIG_NET_EMATCH_STACK=32
# CONFIG_NET_EMATCH_CMP is not set
# CONFIG_NET_EMATCH_NBYTE is not set
# CONFIG_NET_EMATCH_U32 is not set
# CONFIG_NET_EMATCH_META is not set
# CONFIG_NET_EMATCH_TEXT is not set
# CONFIG_NET_EMATCH_IPT is not setCONFIG_NET_CLS_ACT=y
# CONFIG_NET_ACT_POLICE is not set
# CONFIG_NET_ACT_GACT is not set
# CONFIG_NET_ACT_MIRRED is not set
# CONFIG_NET_ACT_SAMPLE is not set
# CONFIG_NET_ACT_IPT is not set
# CONFIG_NET_ACT_NAT is not set
# CONFIG_NET_ACT_PEDIT is not set
# CONFIG_NET_ACT_SIMP is not set
# CONFIG_NET_ACT_SKBEDIT is not set
# CONFIG_NET_ACT_CSUM is not set
# CONFIG_NET_ACT_MPLS is not set
# CONFIG_NET_ACT_VLAN is not set
# CONFIG_NET_ACT_BPF is not set
# CONFIG_NET_ACT_SKBMOD is not set
# CONFIG_NET_ACT_IFE is not set
# CONFIG_NET_ACT_TUNNEL_KEY is not set
# CONFIG_NET_ACT_GATE is not set
# CONFIG_NET_TC_SKB_EXT is not setCONFIG_NET_SCH_FIFO=y
# CONFIG_DCB is not setCONFIG_DNS_RESOLVER=y
# CONFIG_BATMAN_ADV is not set
# CONFIG_OPENVSWITCH is not set
# CONFIG_VSOCKETS is not set
# CONFIG_NETLINK_DIAG is not set
# CONFIG_MPLS is not set
# CONFIG_NET_NSH is not set
# CONFIG_HSR is not set
# CONFIG_NET_SWITCHDEV is not set
# CONFIG_NET_L3_MASTER_DEV is not set
# CONFIG_QRTR is not set
# CONFIG_NET_NCSI is not setCONFIG_PCPU_DEV_REFCNT=yCONFIG_RPS=yCONFIG_RFS_ACCEL=yCONFIG_SOCK_RX_QUEUE_MAPPING=yCONFIG_XPS=yCONFIG_CGROUP_NET_PRIO=yCONFIG_CGROUP_NET_CLASSID=yCONFIG_NET_RX_BUSY_POLL=yCONFIG_BQL=yCONFIG_NET_FLOW_LIMIT=y
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_DROP_MONITOR is not set
# end of Network testing # end of Networking options
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_AF_KCM is not set
# CONFIG_MCTP is not setCONFIG_FIB_RULES=yCONFIG_WIRELESS=yCONFIG_CFG80211=y
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not setCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=yCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=yCONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not setCONFIG_CFG80211_CRDA_SUPPORT=y
# CONFIG_CFG80211_WEXT is not setCONFIG_MAC80211=yCONFIG_MAC80211_HAS_RC=yCONFIG_MAC80211_RC_MINSTREL=yCONFIG_MAC80211_RC_DEFAULT_MINSTREL=yCONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
# CONFIG_MAC80211_MESH is not setCONFIG_MAC80211_LEDS=y
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_MESSAGE_TRACING is not set
# CONFIG_MAC80211_DEBUG_MENU is not setCONFIG_MAC80211_STA_HASH_MAX_SIZE=0CONFIG_RFKILL=yCONFIG_RFKILL_LEDS=yCONFIG_RFKILL_INPUT=yCONFIG_NET_9P=yCONFIG_NET_9P_FD=yCONFIG_NET_9P_VIRTIO=y
# CONFIG_NET_9P_DEBUG is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
# CONFIG_NFC is not set
# CONFIG_PSAMPLE is not set
# CONFIG_NET_IFE is not set
# CONFIG_LWTUNNEL is not setCONFIG_DST_CACHE=yCONFIG_GRO_CELLS=yCONFIG_NET_SELFTESTS=yCONFIG_NET_SOCK_MSG=yCONFIG_PAGE_POOL=y
# CONFIG_PAGE_POOL_STATS is not setCONFIG_FAILOVER=yCONFIG_ETHTOOL_NETLINK=y
#
# Device Drivers
#CONFIG_HAVE_EISA=y
# CONFIG_EISA is not setCONFIG_HAVE_PCI=yCONFIG_PCI=yCONFIG_PCI_DOMAINS=yCONFIG_PCIEPORTBUS=y
# CONFIG_HOTPLUG_PCI_PCIE is not set
# CONFIG_PCIEAER is not setCONFIG_PCIEASPM=yCONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not setCONFIG_PCIE_PME=y
# CONFIG_PCIE_PTM is not setCONFIG_PCI_MSI=yCONFIG_PCI_MSI_IRQ_DOMAIN=yCONFIG_PCI_QUIRKS=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_PCI_STUB is not setCONFIG_PCI_ATS=yCONFIG_PCI_LOCKLESS_CONFIG=y
# CONFIG_PCI_IOV is not setCONFIG_PCI_PRI=yCONFIG_PCI_PASID=yCONFIG_PCI_LABEL=yCONFIG_VGA_ARB=yCONFIG_VGA_ARB_MAX_GPUS=16CONFIG_HOTPLUG_PCI=y
# CONFIG_HOTPLUG_PCI_ACPI is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
#
# PCI controller drivers
#
# CONFIG_VMD is not set
#
# DesignWare PCI Core Support
#
# CONFIG_PCIE_DW_PLAT_HOST is not set
# CONFIG_PCI_MESON is not set
# end of DesignWare PCI Core Support
#
# Mobiveil PCIe Core Support
#
# end of Mobiveil PCIe Core Support
#
# Cadence PCIe controllers support
#
# end of Cadence PCIe controllers support # end of PCI controller drivers
#
# PCI Endpoint
#
# CONFIG_PCI_ENDPOINT is not set
# end of PCI Endpoint
#
# PCI switch controller drivers
#
# CONFIG_PCI_SW_SWITCHTEC is not set
# end of PCI switch controller drivers
# CONFIG_CXL_BUS is not setCONFIG_PCCARD=yCONFIG_PCMCIA=yCONFIG_PCMCIA_LOAD_CIS=yCONFIG_CARDBUS=y
#
# PC-card bridges
#CONFIG_YENTA=yCONFIG_YENTA_O2=yCONFIG_YENTA_RICOH=yCONFIG_YENTA_TI=yCONFIG_YENTA_ENE_TUNE=yCONFIG_YENTA_TOSHIBA=y
# CONFIG_PD6729 is not set
# CONFIG_I82092 is not setCONFIG_PCCARD_NONSTATIC=y
# CONFIG_RAPIDIO is not set
#
# Generic Driver Options
#CONFIG_AUXILIARY_BUS=y
# CONFIG_UEVENT_HELPER is not setCONFIG_DEVTMPFS=yCONFIG_DEVTMPFS_MOUNT=y
# CONFIG_DEVTMPFS_SAFE is not setCONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=y
#
# Firmware loader
#CONFIG_FW_LOADER=yCONFIG_EXTRA_FIRMWARE=""
# CONFIG_FW_LOADER_USER_HELPER is not set
# CONFIG_FW_LOADER_COMPRESS is not setCONFIG_FW_CACHE=y
# CONFIG_FW_UPLOAD is not set
# end of Firmware loader
CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_DEBUG_DRIVER is not setCONFIG_DEBUG_DEVRES=y
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
# CONFIG_TEST_ASYNC_DRIVER_PROBE is not setCONFIG_GENERIC_CPU_AUTOPROBE=yCONFIG_GENERIC_CPU_VULNERABILITIES=yCONFIG_REGMAP=yCONFIG_DMA_SHARED_BUFFER=y
# CONFIG_DMA_FENCE_TRACE is not set
# end of Generic Driver Options
#
# Bus devices
#
# CONFIG_MHI_BUS is not set
# CONFIG_MHI_BUS_EP is not set
# end of Bus devices
CONFIG_CONNECTOR=yCONFIG_PROC_EVENTS=y
#
# Firmware Drivers
#
#
# ARM System Control and Management Interface Protocol #
# end of ARM System Control and Management Interface Protocol
# CONFIG_EDD is not setCONFIG_FIRMWARE_MEMMAP=yCONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not setCONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# CONFIG_ISCSI_IBFT is not set
# CONFIG_FW_CFG_SYSFS is not set
# CONFIG_SYSFB_SIMPLEFB is not set
# CONFIG_GOOGLE_FIRMWARE is not set
#
# EFI (Extensible Firmware Interface) Support
#CONFIG_EFI_ESRT=yCONFIG_EFI_RUNTIME_MAP=y
# CONFIG_EFI_FAKE_MEMMAP is not setCONFIG_EFI_DXE_MEM_ATTRIBUTES=yCONFIG_EFI_RUNTIME_WRAPPERS=yCONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
# CONFIG_EFI_CAPSULE_LOADER is not set
# CONFIG_EFI_TEST is not set
# CONFIG_APPLE_PROPERTIES is not set
# CONFIG_RESET_ATTACK_MITIGATION is not set
# CONFIG_EFI_RCI2_TABLE is not set
# CONFIG_EFI_DISABLE_PCI_DMA is not setCONFIG_EFI_EARLYCON=yCONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
# CONFIG_EFI_DISABLE_RUNTIME is not set
# CONFIG_EFI_COCO_SECRET is not set
# end of EFI (Extensible Firmware Interface) Support
#
# Tegra firmware driver
#
# end of Tegra firmware driver # end of Firmware Drivers
# CONFIG_GNSS is not set
# CONFIG_MTD is not set
# CONFIG_OF is not setCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
# CONFIG_PARPORT is not setCONFIG_PNP=yCONFIG_PNP_DEBUG_MESSAGES=y
#
# Protocols
#CONFIG_PNPACPI=yCONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_NULL_BLK is not set
# CONFIG_BLK_DEV_FD is not setCONFIG_CDROM=y
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not setCONFIG_ZRAM=yCONFIG_ZRAM_DEF_COMP_ZSTD=yCONFIG_ZRAM_DEF_COMP="zstd"
# CONFIG_ZRAM_WRITEBACK is not set
# CONFIG_ZRAM_MEMORY_TRACKING is not setCONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_LOOP_MIN_COUNT=8
# CONFIG_BLK_DEV_DRBD is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not setCONFIG_VIRTIO_BLK=y
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_BLK_DEV_UBLK is not set
#
# NVME Support
#
# CONFIG_BLK_DEV_NVME is not set
# CONFIG_NVME_FC is not set
# CONFIG_NVME_TCP is not set
# end of NVME Support
#
# Misc devices
#
# CONFIG_AD525X_DPOT is not set
# CONFIG_DUMMY_IRQ is not set
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
# CONFIG_APDS9802ALS is not set
# CONFIG_ISL29003 is not set
# CONFIG_ISL29020 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_SENSORS_BH1770 is not set
# CONFIG_SENSORS_APDS990X is not set
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_SRAM is not set
# CONFIG_DW_XDATA_PCIE is not set
# CONFIG_PCI_ENDPOINT_TEST is not set
# CONFIG_XILINX_SDFEC is not set
# CONFIG_C2PORT is not set
#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_MAX6875 is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_EEPROM_IDT_89HPESX is not set
# CONFIG_EEPROM_EE1004 is not set
# end of EEPROM support
# CONFIG_CB710_CORE is not set
#
# Texas Instruments shared transport line discipline #
# end of Texas Instruments shared transport line discipline
# CONFIG_SENSORS_LIS3_I2C is not set
# CONFIG_ALTERA_STAPL is not set
# CONFIG_INTEL_MEI is not set
# CONFIG_INTEL_MEI_ME is not set
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_HDCP is not set
# CONFIG_INTEL_MEI_PXP is not set
# CONFIG_VMWARE_VMCI is not set
# CONFIG_GENWQE is not set
# CONFIG_ECHO is not set
# CONFIG_BCM_VK is not set
# CONFIG_MISC_ALCOR_PCI is not set
# CONFIG_MISC_RTSX_PCI is not set
# CONFIG_MISC_RTSX_USB is not set
# CONFIG_HABANA_AI is not set
# CONFIG_UACCE is not set
# CONFIG_PVPANIC is not set
# end of Misc devices
#
# SCSI device support
#CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not setCONFIG_SCSI_COMMON=yCONFIG_SCSI=yCONFIG_SCSI_DMA=yCONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not setCONFIG_BLK_DEV_SR=yCONFIG_CHR_DEV_SG=yCONFIG_BLK_DEV_BSG=y
# CONFIG_CHR_DEV_SCH is not setCONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
#
# SCSI Transports
#CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# end of SCSI Transports
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_ISCSI_BOOT_SYSFS is not set
# CONFIG_SCSI_CXGB3_ISCSI is not set
# CONFIG_SCSI_CXGB4_ISCSI is not set
# CONFIG_SCSI_BNX2_ISCSI is not set
# CONFIG_BE2ISCSI is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_HPSA is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_MVUMI is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_ESAS2R is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT3SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_MPI3MR is not set
# CONFIG_SCSI_SMARTPQI is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_MYRB is not set
# CONFIG_SCSI_MYRS is not set
# CONFIG_VMWARE_PVSCSI is not set
# CONFIG_SCSI_SNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FDOMAIN_PCI is not set
# CONFIG_SCSI_ISCI is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_WD719X is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_PMCRAID is not set
# CONFIG_SCSI_PM8001 is not setCONFIG_SCSI_VIRTIO=y
# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
# CONFIG_SCSI_DH is not set
# end of SCSI device support
CONFIG_ATA=yCONFIG_SATA_HOST=yCONFIG_PATA_TIMINGS=yCONFIG_ATA_VERBOSE_ERROR=yCONFIG_ATA_FORCE=yCONFIG_ATA_ACPI=y
# CONFIG_SATA_ZPODD is not setCONFIG_SATA_PMP=y
#
# Controllers with non-SFF native interface
#CONFIG_SATA_AHCI=yCONFIG_SATA_MOBILE_LPM_POLICY=0
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not setCONFIG_ATA_SFF=y
#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_SX4 is not setCONFIG_ATA_BMDMA=y
#
# SATA SFF controllers with BMDMA
#CONFIG_ATA_PIIX=y
# CONFIG_SATA_DWC is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not setCONFIG_PATA_AMD=y
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not setCONFIG_PATA_OLDPIIX=y
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not setCONFIG_PATA_SCH=y
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_PCMCIA is not set
# CONFIG_PATA_RZ1000 is not set
#
# Generic fallback / legacy drivers
#
# CONFIG_PATA_ACPI is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_LEGACY is not setCONFIG_MD=yCONFIG_BLK_DEV_MD=yCONFIG_MD_AUTODETECT=y
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID10 is not set
# CONFIG_MD_RAID456 is not set
# CONFIG_MD_MULTIPATH is not set
# CONFIG_MD_FAULTY is not set
# CONFIG_BCACHE is not setCONFIG_BLK_DEV_DM_BUILTIN=yCONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set
# CONFIG_DM_UNSTRIPED is not set
# CONFIG_DM_CRYPT is not set
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_THIN_PROVISIONING is not set
# CONFIG_DM_CACHE is not set
# CONFIG_DM_WRITECACHE is not set
# CONFIG_DM_EBS is not set
# CONFIG_DM_ERA is not set
# CONFIG_DM_CLONE is not setCONFIG_DM_MIRROR=y
# CONFIG_DM_LOG_USERSPACE is not set
# CONFIG_DM_RAID is not setCONFIG_DM_ZERO=y
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
# CONFIG_DM_DUST is not set
# CONFIG_DM_INIT is not set
# CONFIG_DM_UEVENT is not set
# CONFIG_DM_FLAKEY is not set
# CONFIG_DM_VERITY is not set
# CONFIG_DM_SWITCH is not set
# CONFIG_DM_LOG_WRITES is not set
# CONFIG_DM_INTEGRITY is not set
# CONFIG_DM_AUDIT is not set
# CONFIG_TARGET_CORE is not set
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_FIREWIRE_NOSY is not set
# end of IEEE 1394 (FireWire) support
CONFIG_MACINTOSH_DRIVERS=yCONFIG_MAC_EMUMOUSEBTN=yCONFIG_NETDEVICES=yCONFIG_MII=yCONFIG_NET_CORE=y
# CONFIG_BONDING is not set
# CONFIG_DUMMY is not set
# CONFIG_WIREGUARD is not set
# CONFIG_EQUALIZER is not set
# CONFIG_NET_FC is not set
# CONFIG_NET_TEAM is not set
# CONFIG_MACVLAN is not set
# CONFIG_IPVLAN is not set
# CONFIG_VXLAN is not set
# CONFIG_GENEVE is not set
# CONFIG_BAREUDP is not set
# CONFIG_GTP is not set
# CONFIG_AMT is not set
# CONFIG_MACSEC is not setCONFIG_NETCONSOLE=yCONFIG_NETPOLL=yCONFIG_NET_POLL_CONTROLLER=y
# CONFIG_TUN is not set
# CONFIG_TUN_VNET_CROSS_LE is not set
# CONFIG_VETH is not setCONFIG_VIRTIO_NET=y
# CONFIG_NLMON is not set
# CONFIG_ARCNET is not setCONFIG_ETHERNET=yCONFIG_NET_VENDOR_3COM=y
# CONFIG_PCMCIA_3C574 is not set
# CONFIG_PCMCIA_3C589 is not set
# CONFIG_VORTEX is not set
# CONFIG_TYPHOON is not setCONFIG_NET_VENDOR_ADAPTEC=y
# CONFIG_ADAPTEC_STARFIRE is not setCONFIG_NET_VENDOR_AGERE=y
# CONFIG_ET131X is not setCONFIG_NET_VENDOR_ALACRITECH=y
# CONFIG_SLICOSS is not setCONFIG_NET_VENDOR_ALTEON=y
# CONFIG_ACENIC is not set
# CONFIG_ALTERA_TSE is not setCONFIG_NET_VENDOR_AMAZON=y
# CONFIG_ENA_ETHERNET is not setCONFIG_NET_VENDOR_AMD=y
# CONFIG_AMD8111_ETH is not set
# CONFIG_PCNET32 is not set
# CONFIG_PCMCIA_NMCLAN is not set
# CONFIG_AMD_XGBE is not setCONFIG_NET_VENDOR_AQUANTIA=y
# CONFIG_AQTION is not setCONFIG_NET_VENDOR_ARC=yCONFIG_NET_VENDOR_ASIX=yCONFIG_NET_VENDOR_ATHEROS=y
# CONFIG_ATL2 is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_ALX is not set
# CONFIG_CX_ECAT is not setCONFIG_NET_VENDOR_BROADCOM=y
# CONFIG_B44 is not set
# CONFIG_BCMGENET is not set
# CONFIG_BNX2 is not set
# CONFIG_CNIC is not setCONFIG_TIGON3=yCONFIG_TIGON3_HWMON=y
# CONFIG_BNX2X is not set
# CONFIG_SYSTEMPORT is not set
# CONFIG_BNXT is not setCONFIG_NET_VENDOR_CADENCE=y
# CONFIG_MACB is not setCONFIG_NET_VENDOR_CAVIUM=y
# CONFIG_THUNDER_NIC_PF is not set
# CONFIG_THUNDER_NIC_VF is not set
# CONFIG_THUNDER_NIC_BGX is not set
# CONFIG_THUNDER_NIC_RGX is not set
# CONFIG_CAVIUM_PTP is not set
# CONFIG_LIQUIDIO is not set
# CONFIG_LIQUIDIO_VF is not setCONFIG_NET_VENDOR_CHELSIO=y
# CONFIG_CHELSIO_T1 is not set
# CONFIG_CHELSIO_T3 is not set
# CONFIG_CHELSIO_T4 is not set
# CONFIG_CHELSIO_T4VF is not setCONFIG_NET_VENDOR_CISCO=y
# CONFIG_ENIC is not setCONFIG_NET_VENDOR_CORTINA=yCONFIG_NET_VENDOR_DAVICOM=y
# CONFIG_DNET is not setCONFIG_NET_VENDOR_DEC=yCONFIG_NET_TULIP=y
# CONFIG_DE2104X is not set
# CONFIG_TULIP is not set
# CONFIG_WINBOND_840 is not set
# CONFIG_DM9102 is not set
# CONFIG_ULI526X is not set
# CONFIG_PCMCIA_XIRCOM is not setCONFIG_NET_VENDOR_DLINK=y
# CONFIG_DL2K is not set
# CONFIG_SUNDANCE is not setCONFIG_NET_VENDOR_EMULEX=y
# CONFIG_BE2NET is not setCONFIG_NET_VENDOR_ENGLEDER=y
# CONFIG_TSNEP is not setCONFIG_NET_VENDOR_EZCHIP=yCONFIG_NET_VENDOR_FUJITSU=y
# CONFIG_PCMCIA_FMVJ18X is not setCONFIG_NET_VENDOR_FUNGIBLE=y
# CONFIG_FUN_ETH is not setCONFIG_NET_VENDOR_GOOGLE=y
# CONFIG_GVE is not setCONFIG_NET_VENDOR_HUAWEI=y
# CONFIG_HINIC is not setCONFIG_NET_VENDOR_I825XX=yCONFIG_NET_VENDOR_INTEL=yCONFIG_E100=yCONFIG_E1000=yCONFIG_E1000E=yCONFIG_E1000E_HWTS=y
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_IXGB is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGBEVF is not set
# CONFIG_I40E is not set
# CONFIG_I40EVF is not set
# CONFIG_ICE is not set
# CONFIG_FM10K is not set
# CONFIG_IGC is not setCONFIG_NET_VENDOR_WANGXUN=y
# CONFIG_TXGBE is not set
# CONFIG_JME is not setCONFIG_NET_VENDOR_LITEX=yCONFIG_NET_VENDOR_MARVELL=y
# CONFIG_MVMDIO is not set
# CONFIG_SKGE is not setCONFIG_SKY2=y
# CONFIG_SKY2_DEBUG is not set
# CONFIG_OCTEON_EP is not setCONFIG_NET_VENDOR_MELLANOX=y
# CONFIG_MLX4_EN is not set
# CONFIG_MLX5_CORE is not set
# CONFIG_MLXSW_CORE is not set
# CONFIG_MLXFW is not setCONFIG_NET_VENDOR_MICREL=y
# CONFIG_KS8842 is not set
# CONFIG_KS8851_MLL is not set
# CONFIG_KSZ884X_PCI is not setCONFIG_NET_VENDOR_MICROCHIP=y
# CONFIG_LAN743X is not setCONFIG_NET_VENDOR_MICROSEMI=yCONFIG_NET_VENDOR_MICROSOFT=yCONFIG_NET_VENDOR_MYRI=y
# CONFIG_MYRI10GE is not set
# CONFIG_FEALNX is not setCONFIG_NET_VENDOR_NI=y
# CONFIG_NI_XGE_MANAGEMENT_ENET is not setCONFIG_NET_VENDOR_NATSEMI=y
# CONFIG_NATSEMI is not set
# CONFIG_NS83820 is not setCONFIG_NET_VENDOR_NETERION=y
# CONFIG_S2IO is not setCONFIG_NET_VENDOR_NETRONOME=y
# CONFIG_NFP is not setCONFIG_NET_VENDOR_8390=y
# CONFIG_PCMCIA_AXNET is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_PCMCIA_PCNET is not setCONFIG_NET_VENDOR_NVIDIA=yCONFIG_FORCEDETH=yCONFIG_NET_VENDOR_OKI=y
# CONFIG_ETHOC is not setCONFIG_NET_VENDOR_PACKET_ENGINES=y
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not setCONFIG_NET_VENDOR_PENSANDO=y
# CONFIG_IONIC is not setCONFIG_NET_VENDOR_QLOGIC=y
# CONFIG_QLA3XXX is not set
# CONFIG_QLCNIC is not set
# CONFIG_NETXEN_NIC is not set
# CONFIG_QED is not setCONFIG_NET_VENDOR_BROCADE=y
# CONFIG_BNA is not setCONFIG_NET_VENDOR_QUALCOMM=y
# CONFIG_QCOM_EMAC is not set
# CONFIG_RMNET is not setCONFIG_NET_VENDOR_RDC=y
# CONFIG_R6040 is not setCONFIG_NET_VENDOR_REALTEK=y
# CONFIG_8139CP is not setCONFIG_8139TOO=yCONFIG_8139TOO_PIO=y
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not setCONFIG_R8169=yCONFIG_NET_VENDOR_RENESAS=yCONFIG_NET_VENDOR_ROCKER=yCONFIG_NET_VENDOR_SAMSUNG=y
# CONFIG_SXGBE_ETH is not setCONFIG_NET_VENDOR_SEEQ=yCONFIG_NET_VENDOR_SILAN=y
# CONFIG_SC92031 is not setCONFIG_NET_VENDOR_SIS=y
# CONFIG_SIS900 is not set
# CONFIG_SIS190 is not setCONFIG_NET_VENDOR_SOLARFLARE=y
# CONFIG_SFC is not set
# CONFIG_SFC_FALCON is not set
# CONFIG_SFC_SIENA is not setCONFIG_NET_VENDOR_SMSC=y
# CONFIG_PCMCIA_SMC91C92 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SMSC911X is not set
# CONFIG_SMSC9420 is not setCONFIG_NET_VENDOR_SOCIONEXT=yCONFIG_NET_VENDOR_STMICRO=y
# CONFIG_STMMAC_ETH is not setCONFIG_NET_VENDOR_SUN=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NIU is not setCONFIG_NET_VENDOR_SYNOPSYS=y
# CONFIG_DWC_XLGMAC is not setCONFIG_NET_VENDOR_TEHUTI=y
# CONFIG_TEHUTI is not setCONFIG_NET_VENDOR_TI=y
# CONFIG_TI_CPSW_PHY_SEL is not set
# CONFIG_TLAN is not setCONFIG_NET_VENDOR_VERTEXCOM=yCONFIG_NET_VENDOR_VIA=y
# CONFIG_VIA_RHINE is not set
# CONFIG_VIA_VELOCITY is not setCONFIG_NET_VENDOR_WIZNET=y
# CONFIG_WIZNET_W5100 is not set
# CONFIG_WIZNET_W5300 is not setCONFIG_NET_VENDOR_XILINX=y
# CONFIG_XILINX_EMACLITE is not set
# CONFIG_XILINX_AXI_EMAC is not set
# CONFIG_XILINX_LL_TEMAC is not setCONFIG_NET_VENDOR_XIRCOM=y
# CONFIG_PCMCIA_XIRC2PS is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_NET_SB1000 is not setCONFIG_PHYLIB=yCONFIG_SWPHY=y
# CONFIG_LED_TRIGGER_PHY is not setCONFIG_FIXED_PHY=y
#
# MII PHY device drivers
#
# CONFIG_AMD_PHY is not set
# CONFIG_ADIN_PHY is not set
# CONFIG_ADIN1100_PHY is not set
# CONFIG_AQUANTIA_PHY is not set
# CONFIG_AX88796B_PHY is not set
# CONFIG_BROADCOM_PHY is not set
# CONFIG_BCM54140_PHY is not set
# CONFIG_BCM7XXX_PHY is not set
# CONFIG_BCM84881_PHY is not set
# CONFIG_BCM87XX_PHY is not set
# CONFIG_CICADA_PHY is not set
# CONFIG_CORTINA_PHY is not set
# CONFIG_DAVICOM_PHY is not set
# CONFIG_ICPLUS_PHY is not set
# CONFIG_LXT_PHY is not set
# CONFIG_INTEL_XWAY_PHY is not set
# CONFIG_LSI_ET1011C_PHY is not set
# CONFIG_MARVELL_PHY is not set
# CONFIG_MARVELL_10G_PHY is not set
# CONFIG_MARVELL_88X2222_PHY is not set
# CONFIG_MAXLINEAR_GPHY is not set
# CONFIG_MEDIATEK_GE_PHY is not set
# CONFIG_MICREL_PHY is not set
# CONFIG_MICROCHIP_PHY is not set
# CONFIG_MICROCHIP_T1_PHY is not set
# CONFIG_MICROSEMI_PHY is not set
# CONFIG_MOTORCOMM_PHY is not set
# CONFIG_NATIONAL_PHY is not set
# CONFIG_NXP_C45_TJA11XX_PHY is not set
# CONFIG_NXP_TJA11XX_PHY is not set
# CONFIG_QSEMI_PHY is not setCONFIG_REALTEK_PHY=y
# CONFIG_RENESAS_PHY is not set
# CONFIG_ROCKCHIP_PHY is not set
# CONFIG_SMSC_PHY is not set
# CONFIG_STE10XP is not set
# CONFIG_TERANETICS_PHY is not set
# CONFIG_DP83822_PHY is not set
# CONFIG_DP83TC811_PHY is not set
# CONFIG_DP83848_PHY is not set
# CONFIG_DP83867_PHY is not set
# CONFIG_DP83869_PHY is not set
# CONFIG_DP83TD510_PHY is not set
# CONFIG_VITESSE_PHY is not set
# CONFIG_XILINX_GMII2RGMII is not setCONFIG_MDIO_DEVICE=yCONFIG_MDIO_BUS=yCONFIG_FWNODE_MDIO=yCONFIG_ACPI_MDIO=yCONFIG_MDIO_DEVRES=y
# CONFIG_MDIO_BITBANG is not set
# CONFIG_MDIO_BCM_UNIMAC is not set
# CONFIG_MDIO_MVUSB is not set
# CONFIG_MDIO_THUNDER is not set
#
# MDIO Multiplexers
#
#
# PCS device drivers
#
# end of PCS device drivers
# CONFIG_PPP is not set
# CONFIG_SLIP is not setCONFIG_USB_NET_DRIVERS=y
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_RTL8152 is not set
# CONFIG_USB_LAN78XX is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_HSO is not set
# CONFIG_USB_IPHETH is not setCONFIG_WLAN=yCONFIG_WLAN_VENDOR_ADMTEK=y
# CONFIG_ADM8211 is not setCONFIG_WLAN_VENDOR_ATH=y
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K is not set
# CONFIG_ATH5K_PCI is not set
# CONFIG_ATH9K is not set
# CONFIG_ATH9K_HTC is not set
# CONFIG_CARL9170 is not set
# CONFIG_ATH6KL is not set
# CONFIG_AR5523 is not set
# CONFIG_WIL6210 is not set
# CONFIG_ATH10K is not set
# CONFIG_WCN36XX is not setCONFIG_WLAN_VENDOR_ATMEL=y
# CONFIG_ATMEL is not set
# CONFIG_AT76C50X_USB is not setCONFIG_WLAN_VENDOR_BROADCOM=y
# CONFIG_B43 is not set
# CONFIG_B43LEGACY is not set
# CONFIG_BRCMSMAC is not set
# CONFIG_BRCMFMAC is not setCONFIG_WLAN_VENDOR_CISCO=y
# CONFIG_AIRO is not set
# CONFIG_AIRO_CS is not setCONFIG_WLAN_VENDOR_INTEL=y
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
# CONFIG_IWL4965 is not set
# CONFIG_IWL3945 is not set
# CONFIG_IWLWIFI is not setCONFIG_WLAN_VENDOR_INTERSIL=y
# CONFIG_HOSTAP is not set
# CONFIG_HERMES is not set
# CONFIG_P54_COMMON is not setCONFIG_WLAN_VENDOR_MARVELL=y
# CONFIG_LIBERTAS is not set
# CONFIG_LIBERTAS_THINFIRM is not set
# CONFIG_MWIFIEX is not set
# CONFIG_MWL8K is not setCONFIG_WLAN_VENDOR_MEDIATEK=y
# CONFIG_MT7601U is not set
# CONFIG_MT76x0U is not set
# CONFIG_MT76x0E is not set
# CONFIG_MT76x2E is not set
# CONFIG_MT76x2U is not set
# CONFIG_MT7603E is not set
# CONFIG_MT7615E is not set
# CONFIG_MT7663U is not set
# CONFIG_MT7915E is not set
# CONFIG_MT7921E is not set
# CONFIG_MT7921U is not setCONFIG_WLAN_VENDOR_MICROCHIP=yCONFIG_WLAN_VENDOR_PURELIFI=y
# CONFIG_PLFXLC is not setCONFIG_WLAN_VENDOR_RALINK=y
# CONFIG_RT2X00 is not setCONFIG_WLAN_VENDOR_REALTEK=y
# CONFIG_RTL8180 is not set
# CONFIG_RTL8187 is not setCONFIG_RTL_CARDS=y
# CONFIG_RTL8192CE is not set
# CONFIG_RTL8192SE is not set
# CONFIG_RTL8192DE is not set
# CONFIG_RTL8723AE is not set
# CONFIG_RTL8723BE is not set
# CONFIG_RTL8188EE is not set
# CONFIG_RTL8192EE is not set
# CONFIG_RTL8821AE is not set
# CONFIG_RTL8192CU is not set
# CONFIG_RTL8XXXU is not set
# CONFIG_RTW88 is not set
# CONFIG_RTW89 is not setCONFIG_WLAN_VENDOR_RSI=y
# CONFIG_RSI_91X is not setCONFIG_WLAN_VENDOR_SILABS=yCONFIG_WLAN_VENDOR_ST=y
# CONFIG_CW1200 is not setCONFIG_WLAN_VENDOR_TI=y
# CONFIG_WL1251 is not set
# CONFIG_WL12XX is not set
# CONFIG_WL18XX is not set
# CONFIG_WLCORE is not setCONFIG_WLAN_VENDOR_ZYDAS=y
# CONFIG_USB_ZD1201 is not set
# CONFIG_ZD1211RW is not setCONFIG_WLAN_VENDOR_QUANTENNA=y
# CONFIG_QTNFMAC_PCIE is not set
# CONFIG_PCMCIA_RAYCS is not set
# CONFIG_PCMCIA_WL3501 is not set
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_VIRT_WIFI is not set
# CONFIG_WAN is not set
#
# Wireless WAN
#
# CONFIG_WWAN is not set
# end of Wireless WAN
# CONFIG_VMXNET3 is not set
# CONFIG_FUJITSU_ES is not set
# CONFIG_NETDEVSIM is not setCONFIG_NET_FAILOVER=y
# CONFIG_ISDN is not set
#
# Input device support
#CONFIG_INPUT=yCONFIG_INPUT_LEDS=yCONFIG_INPUT_FF_MEMLESS=yCONFIG_INPUT_SPARSEKMAP=y
# CONFIG_INPUT_MATRIXKMAP is not setCONFIG_INPUT_VIVALDIFMAP=y
#
# Userland interfaces
#
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not setCONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
#
# Input Device Drivers
#CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ADP5589 is not setCONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT1050 is not set
# CONFIG_KEYBOARD_QT1070 is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_DLINK_DIR685 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_TCA8418 is not set
# CONFIG_KEYBOARD_LM8323 is not set
# CONFIG_KEYBOARD_LM8333 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_MCS is not set
# CONFIG_KEYBOARD_MPR121 is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_SAMSUNG is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_CYPRESS_SF is not setCONFIG_INPUT_MOUSE=yCONFIG_MOUSE_PS2=yCONFIG_MOUSE_PS2_ALPS=yCONFIG_MOUSE_PS2_BYD=yCONFIG_MOUSE_PS2_LOGIPS2PP=yCONFIG_MOUSE_PS2_SYNAPTICS=yCONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=yCONFIG_MOUSE_PS2_CYPRESS=yCONFIG_MOUSE_PS2_LIFEBOOK=yCONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_SENTELIC is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not setCONFIG_MOUSE_PS2_FOCALTECH=y
# CONFIG_MOUSE_PS2_VMMOUSE is not setCONFIG_MOUSE_PS2_SMBUS=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set
# CONFIG_MOUSE_CYAPA is not set
# CONFIG_MOUSE_ELAN_I2C is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
# CONFIG_MOUSE_SYNAPTICS_USB is not setCONFIG_INPUT_JOYSTICK=y
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_IFORCE is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDJOY is not set
# CONFIG_JOYSTICK_ZHENHUA is not set
# CONFIG_JOYSTICK_AS5011 is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
# CONFIG_JOYSTICK_XPAD is not set
# CONFIG_JOYSTICK_PXRC is not set
# CONFIG_JOYSTICK_QWIIC is not set
# CONFIG_JOYSTICK_FSIA6B is not set
# CONFIG_JOYSTICK_SENSEHAT is not setCONFIG_INPUT_TABLET=y
# CONFIG_TABLET_USB_ACECAD is not set
# CONFIG_TABLET_USB_AIPTEK is not set
# CONFIG_TABLET_USB_HANWANG is not set
# CONFIG_TABLET_USB_KBTAB is not set
# CONFIG_TABLET_USB_PEGASUS is not set
# CONFIG_TABLET_SERIAL_WACOM4 is not setCONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
# CONFIG_TOUCHSCREEN_BU21013 is not set
# CONFIG_TOUCHSCREEN_BU21029 is not set
# CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set
# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set
# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set
# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set
# CONFIG_TOUCHSCREEN_DYNAPRO is not set
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
# CONFIG_TOUCHSCREEN_EETI is not set
# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set
# CONFIG_TOUCHSCREEN_EXC3000 is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_HIDEEP is not set
# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set
# CONFIG_TOUCHSCREEN_ILI210X is not set
# CONFIG_TOUCHSCREEN_ILITEK is not set
# CONFIG_TOUCHSCREEN_S6SY761 is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_EKTF2127 is not set
# CONFIG_TOUCHSCREEN_ELAN is not set
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
# CONFIG_TOUCHSCREEN_WACOM_I2C is not set
# CONFIG_TOUCHSCREEN_MAX11801 is not set
# CONFIG_TOUCHSCREEN_MCS5000 is not set
# CONFIG_TOUCHSCREEN_MMS114 is not set
# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_IMAGIS is not set
# CONFIG_TOUCHSCREEN_INEXIO is not set
# CONFIG_TOUCHSCREEN_MK712 is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_PIXCIR is not set
# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC_SERIO is not set
# CONFIG_TOUCHSCREEN_TSC2004 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
# CONFIG_TOUCHSCREEN_SILEAD is not set
# CONFIG_TOUCHSCREEN_ST1232 is not set
# CONFIG_TOUCHSCREEN_STMFTS is not set
# CONFIG_TOUCHSCREEN_SX8654 is not set
# CONFIG_TOUCHSCREEN_TPS6507X is not set
# CONFIG_TOUCHSCREEN_ZET6223 is not set
# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set
# CONFIG_TOUCHSCREEN_IQS5XX is not set
# CONFIG_TOUCHSCREEN_ZINITIX is not setCONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not set
# CONFIG_INPUT_BMA150 is not set
# CONFIG_INPUT_E3X0_BUTTON is not set
# CONFIG_INPUT_PCSPKR is not set
# CONFIG_INPUT_MMA8450 is not set
# CONFIG_INPUT_APANEL is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_KXTJ9 is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set
# CONFIG_INPUT_UINPUT is not set
# CONFIG_INPUT_PCF8574 is not set
# CONFIG_INPUT_DA7280_HAPTICS is not set
# CONFIG_INPUT_ADXL34X is not set
# CONFIG_INPUT_IMS_PCU is not set
# CONFIG_INPUT_IQS269A is not set
# CONFIG_INPUT_IQS626A is not set
# CONFIG_INPUT_IQS7222 is not set
# CONFIG_INPUT_CMA3000 is not set
# CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set
# CONFIG_INPUT_DRV2665_HAPTICS is not set
# CONFIG_INPUT_DRV2667_HAPTICS is not set
# CONFIG_RMI4_CORE is not set
#
# Hardware I/O ports
#CONFIG_SERIO=yCONFIG_ARCH_MIGHT_HAVE_PC_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not setCONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
# CONFIG_USERIO is not set
# CONFIG_GAMEPORT is not set
# end of Hardware I/O ports # end of Input device support
#
# Character devices
#CONFIG_TTY=yCONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=yCONFIG_VT_CONSOLE=yCONFIG_VT_CONSOLE_SLEEP=yCONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not setCONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not setCONFIG_LDISC_AUTOLOAD=y
#
# Serial drivers
#CONFIG_SERIAL_EARLYCON=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=yCONFIG_SERIAL_8250_PNP=y
# CONFIG_SERIAL_8250_16550A_VARIANTS is not set
# CONFIG_SERIAL_8250_FINTEK is not setCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_DMA=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_EXAR=y
# CONFIG_SERIAL_8250_CS is not setCONFIG_SERIAL_8250_NR_UARTS=32CONFIG_SERIAL_8250_RUNTIME_UARTS=4CONFIG_SERIAL_8250_EXTENDED=yCONFIG_SERIAL_8250_MANY_PORTS=yCONFIG_SERIAL_8250_SHARE_IRQ=yCONFIG_SERIAL_8250_DETECT_IRQ=yCONFIG_SERIAL_8250_RSA=yCONFIG_SERIAL_8250_DWLIB=y
# CONFIG_SERIAL_8250_DW is not set
# CONFIG_SERIAL_8250_RT288X is not setCONFIG_SERIAL_8250_LPSS=yCONFIG_SERIAL_8250_MID=yCONFIG_SERIAL_8250_PERICOM=y
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_UARTLITE is not setCONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_LANTIQ is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_SC16IS7XX is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_ARC is not set
# CONFIG_SERIAL_RP2 is not set
# CONFIG_SERIAL_FSL_LPUART is not set
# CONFIG_SERIAL_FSL_LINFLEXUART is not set
# CONFIG_SERIAL_SPRD is not set
# end of Serial drivers
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_SYNCLINK_GT is not set
# CONFIG_N_HDLC is not set
# CONFIG_N_GSM is not set
# CONFIG_NOZOMI is not set
# CONFIG_NULL_TTY is not setCONFIG_HVC_DRIVER=y
# CONFIG_SERIAL_DEV_BUS is not setCONFIG_VIRTIO_CONSOLE=y
# CONFIG_IPMI_HANDLER is not setCONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_HW_RANDOM_INTEL is not set
# CONFIG_HW_RANDOM_AMD is not set
# CONFIG_HW_RANDOM_BA431 is not setCONFIG_HW_RANDOM_VIA=y
# CONFIG_HW_RANDOM_VIRTIO is not set
# CONFIG_HW_RANDOM_XIPHERA is not set
# CONFIG_APPLICOM is not set
#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
# CONFIG_CARDMAN_4000 is not set
# CONFIG_CARDMAN_4040 is not set
# CONFIG_SCR24X is not set
# CONFIG_IPWIRELESS is not set
# end of PCMCIA character devices
# CONFIG_MWAVE is not setCONFIG_DEVMEM=yCONFIG_NVRAM=yCONFIG_DEVPORT=yCONFIG_HPET=y
# CONFIG_HPET_MMAP is not set
# CONFIG_HANGCHECK_TIMER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
# CONFIG_XILLYBUS is not set
# CONFIG_XILLYUSB is not setCONFIG_RANDOM_TRUST_CPU=yCONFIG_RANDOM_TRUST_BOOTLOADER=y
# end of Character devices
#
# I2C support
#CONFIG_I2C=yCONFIG_ACPI_I2C_OPREGION=yCONFIG_I2C_BOARDINFO=yCONFIG_I2C_COMPAT=y
# CONFIG_I2C_CHARDEV is not set
# CONFIG_I2C_MUX is not setCONFIG_I2C_HELPER_AUTO=yCONFIG_I2C_SMBUS=yCONFIG_I2C_ALGOBIT=y
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_AMD_MP2 is not setCONFIG_I2C_I801=y
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_ISMT is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_NVIDIA_GPU is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
#
# ACPI drivers
#
# CONFIG_I2C_SCMI is not set
#
# I2C system bus drivers (mostly embedded / system-on-chip) #
# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EMEV2 is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_XILINX is not set
#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_DIOLAN_U2C is not set
# CONFIG_I2C_CP2615 is not set
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set
#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_MLXCPLD is not set
# CONFIG_I2C_VIRTIO is not set
# end of I2C Hardware Bus support
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_SLAVE is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# end of I2C support
# CONFIG_I3C is not set
# CONFIG_SPI is not set
# CONFIG_SPMI is not set
# CONFIG_HSI is not setCONFIG_PPS=y
# CONFIG_PPS_DEBUG is not set
#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
# CONFIG_PPS_CLIENT_GPIO is not set
#
# PPS generators support
#
#
# PTP clock support
#CONFIG_PTP_1588_CLOCK=yCONFIG_PTP_1588_CLOCK_OPTIONAL=y
#
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. #CONFIG_PTP_1588_CLOCK_KVM=y
# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set
# CONFIG_PTP_1588_CLOCK_IDTCM is not set
# CONFIG_PTP_1588_CLOCK_VMW is not set
# end of PTP clock support
# CONFIG_PINCTRL is not set
# CONFIG_GPIOLIB is not set
# CONFIG_W1 is not set
# CONFIG_POWER_RESET is not setCONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not setCONFIG_POWER_SUPPLY_HWMON=y
# CONFIG_PDA_POWER is not set
# CONFIG_IP5XXX_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_CHARGER_ADP5061 is not set
# CONFIG_BATTERY_CW2015 is not set
# CONFIG_BATTERY_DS2780 is not set
# CONFIG_BATTERY_DS2781 is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_SAMSUNG_SDI is not set
# CONFIG_BATTERY_SBS is not set
# CONFIG_CHARGER_SBS is not set
# CONFIG_BATTERY_BQ27XXX is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_CHARGER_MAX8903 is not set
# CONFIG_CHARGER_LP8727 is not set
# CONFIG_CHARGER_LTC4162L is not set
# CONFIG_CHARGER_MAX77976 is not set
# CONFIG_CHARGER_BQ2415X is not set
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
# CONFIG_BATTERY_GOLDFISH is not set
# CONFIG_BATTERY_RT5033 is not set
# CONFIG_CHARGER_BD99954 is not set
# CONFIG_BATTERY_UG3105 is not setCONFIG_HWMON=y
# CONFIG_HWMON_DEBUG_CHIP is not set
#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM1177 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7410 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_AHT10 is not set
# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set
# CONFIG_SENSORS_AS370 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_AXI_FAN_CONTROL is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_K10TEMP is not set
# CONFIG_SENSORS_FAM15H_POWER is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ASPEED is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_CORSAIR_CPRO is not set
# CONFIG_SENSORS_CORSAIR_PSU is not set
# CONFIG_SENSORS_DRIVETEMP is not set
# CONFIG_SENSORS_DS620 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_DELL_SMM is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_FTSTEUTATES is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_G762 is not set
# CONFIG_SENSORS_HIH6130 is not set
# CONFIG_SENSORS_I5500 is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_POWR1220 is not set
# CONFIG_SENSORS_LINEAGE is not set
# CONFIG_SENSORS_LTC2945 is not set
# CONFIG_SENSORS_LTC2947_I2C is not set
# CONFIG_SENSORS_LTC2990 is not set
# CONFIG_SENSORS_LTC4151 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4222 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4260 is not set
# CONFIG_SENSORS_LTC4261 is not set
# CONFIG_SENSORS_MAX127 is not set
# CONFIG_SENSORS_MAX16065 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX1668 is not set
# CONFIG_SENSORS_MAX197 is not set
# CONFIG_SENSORS_MAX31730 is not set
# CONFIG_SENSORS_MAX6620 is not set
# CONFIG_SENSORS_MAX6621 is not set
# CONFIG_SENSORS_MAX6639 is not set
# CONFIG_SENSORS_MAX6642 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_MAX6697 is not set
# CONFIG_SENSORS_MAX31790 is not set
# CONFIG_SENSORS_MCP3021 is not set
# CONFIG_SENSORS_TC654 is not set
# CONFIG_SENSORS_TPS23861 is not set
# CONFIG_SENSORS_MR75203 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LM95234 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_LM95245 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_NCT6683 is not set
# CONFIG_SENSORS_NCT6775 is not set
# CONFIG_SENSORS_NCT6775_I2C is not set
# CONFIG_SENSORS_NCT7802 is not set
# CONFIG_SENSORS_NCT7904 is not set
# CONFIG_SENSORS_NPCM7XX is not set
# CONFIG_SENSORS_NZXT_KRAKEN2 is not set
# CONFIG_SENSORS_NZXT_SMART2 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_SBTSI is not set
# CONFIG_SENSORS_SBRMI is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SHT3x is not set
# CONFIG_SENSORS_SHT4x is not set
# CONFIG_SENSORS_SHTC1 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_SY7636A is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_EMC6W201 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_SCH5627 is not set
# CONFIG_SENSORS_SCH5636 is not set
# CONFIG_SENSORS_STTS751 is not set
# CONFIG_SENSORS_SMM665 is not set
# CONFIG_SENSORS_ADC128D818 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_INA209 is not set
# CONFIG_SENSORS_INA2XX is not set
# CONFIG_SENSORS_INA238 is not set
# CONFIG_SENSORS_INA3221 is not set
# CONFIG_SENSORS_TC74 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP102 is not set
# CONFIG_SENSORS_TMP103 is not set
# CONFIG_SENSORS_TMP108 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_TMP464 is not set
# CONFIG_SENSORS_TMP513 is not set
# CONFIG_SENSORS_VIA_CPUTEMP is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83773G is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83795 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_XGENE is not set
#
# ACPI drivers
#
# CONFIG_SENSORS_ACPI_POWER is not set
# CONFIG_SENSORS_ATK0110 is not set
# CONFIG_SENSORS_ASUS_EC is not set CONFIG_THERMAL=y
# CONFIG_THERMAL_NETLINK is not set
# CONFIG_THERMAL_STATISTICS is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set # CONFIG_THERMAL_GOV_FAIR_SHARE is not set CONFIG_THERMAL_GOV_STEP_WISE=y
# CONFIG_THERMAL_GOV_BANG_BANG is not set CONFIG_THERMAL_GOV_USER_SPACE=y
# CONFIG_THERMAL_EMULATION is not set
#
# Intel thermal drivers
#
# CONFIG_INTEL_POWERCLAMP is not setCONFIG_X86_THERMAL_VECTOR=yCONFIG_X86_PKG_TEMP_THERMAL=m
# CONFIG_INTEL_SOC_DTS_THERMAL is not set
#
# ACPI INT340X thermal drivers
#
# CONFIG_INT340X_THERMAL is not set
# end of ACPI INT340X thermal drivers
# CONFIG_INTEL_PCH_THERMAL is not set
# CONFIG_INTEL_TCC_COOLING is not set
# CONFIG_INTEL_MENLOW is not set
# CONFIG_INTEL_HFI_THERMAL is not set
# end of Intel thermal drivers
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_CORE is not set
# CONFIG_WATCHDOG_NOWAYOUT is not setCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=yCONFIG_WATCHDOG_OPEN_TIMEOUT=0
# CONFIG_WATCHDOG_SYSFS is not set
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
#
# Watchdog Pretimeout Governors
#
#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
# CONFIG_WDAT_WDT is not set
# CONFIG_XILINX_WATCHDOG is not set
# CONFIG_ZIIRAVE_WATCHDOG is not set
# CONFIG_CADENCE_WATCHDOG is not set
# CONFIG_DW_WATCHDOG is not set
# CONFIG_MAX63XX_WATCHDOG is not set
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_ALIM1535_WDT is not set
# CONFIG_ALIM7101_WDT is not set
# CONFIG_EBC_C384_WDT is not set
# CONFIG_F71808E_WDT is not set
# CONFIG_SP5100_TCO is not set
# CONFIG_SBC_FITPC2_WATCHDOG is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_IBMASR is not set
# CONFIG_WAFER_WDT is not set
# CONFIG_I6300ESB_WDT is not set
# CONFIG_IE6XX_WDT is not set
# CONFIG_ITCO_WDT is not set
# CONFIG_IT8712F_WDT is not set
# CONFIG_IT87_WDT is not set
# CONFIG_HP_WATCHDOG is not set
# CONFIG_SC1200_WDT is not set
# CONFIG_PC87413_WDT is not set
# CONFIG_NV_TCO is not set
# CONFIG_60XX_WDT is not set
# CONFIG_CPU5_WDT is not set
# CONFIG_SMSC_SCH311X_WDT is not set
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_TQMX86_WDT is not set
# CONFIG_VIA_WDT is not set
# CONFIG_W83627HF_WDT is not set
# CONFIG_W83877F_WDT is not set
# CONFIG_W83977F_WDT is not set
# CONFIG_MACHZ_WDT is not set
# CONFIG_SBC_EPX_C3_WATCHDOG is not set
# CONFIG_NI903X_WDT is not set
# CONFIG_NIC7018_WDT is not set
#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set
#
# USB-based Watchdog Cards
#
# CONFIG_USBPCWATCHDOG is not setCONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not setCONFIG_BCMA_POSSIBLE=y
# CONFIG_BCMA is not set
#
# Multifunction device drivers
#
# CONFIG_MFD_AS3711 is not set
# CONFIG_PMIC_ADP5520 is not set
# CONFIG_MFD_BCM590XX is not set
# CONFIG_MFD_BD9571MWV is not set
# CONFIG_MFD_AXP20X_I2C is not set
# CONFIG_MFD_MADERA is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_DA9052_I2C is not set
# CONFIG_MFD_DA9055 is not set
# CONFIG_MFD_DA9062 is not set
# CONFIG_MFD_DA9063 is not set
# CONFIG_MFD_DA9150 is not set
# CONFIG_MFD_DLN2 is not set
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_MFD_MP2629 is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set
# CONFIG_LPC_ICH is not set
# CONFIG_LPC_SCH is not set
# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set
# CONFIG_MFD_INTEL_PMC_BXT is not set
# CONFIG_MFD_IQS62X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_88PM800 is not set
# CONFIG_MFD_88PM805 is not set
# CONFIG_MFD_88PM860X is not set
# CONFIG_MFD_MAX14577 is not set
# CONFIG_MFD_MAX77693 is not set
# CONFIG_MFD_MAX77843 is not set
# CONFIG_MFD_MAX8907 is not set
# CONFIG_MFD_MAX8925 is not set
# CONFIG_MFD_MAX8997 is not set
# CONFIG_MFD_MAX8998 is not set
# CONFIG_MFD_MT6360 is not set
# CONFIG_MFD_MT6397 is not set
# CONFIG_MFD_MENF21BMC is not set
# CONFIG_MFD_VIPERBOARD is not set
# CONFIG_MFD_RETU is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_RT4831 is not set
# CONFIG_MFD_RT5033 is not set
# CONFIG_MFD_RC5T583 is not set
# CONFIG_MFD_SI476X_CORE is not set
# CONFIG_MFD_SIMPLE_MFD_I2C is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_SKY81452 is not set
# CONFIG_MFD_SYSCON is not set
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
# CONFIG_MFD_PALMAS is not set
# CONFIG_TPS6105X is not set
# CONFIG_TPS6507X is not set
# CONFIG_MFD_TPS65086 is not set
# CONFIG_MFD_TPS65090 is not set
# CONFIG_MFD_TI_LP873X is not set
# CONFIG_MFD_TPS6586X is not set
# CONFIG_MFD_TPS65912_I2C is not set
# CONFIG_TWL4030_CORE is not set
# CONFIG_TWL6040_CORE is not set
# CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_TQMX86 is not set
# CONFIG_MFD_VX855 is not set
# CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set
# CONFIG_MFD_ATC260X_I2C is not set
# end of Multifunction device drivers
# CONFIG_REGULATOR is not set
# CONFIG_RC_CORE is not set
#
# CEC support
#
# CONFIG_MEDIA_CEC_SUPPORT is not set
# end of CEC support
# CONFIG_MEDIA_SUPPORT is not set
#
# Graphics support
#CONFIG_APERTURE_HELPERS=yCONFIG_AGP=yCONFIG_AGP_AMD64=yCONFIG_AGP_INTEL=y
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_VIA is not setCONFIG_INTEL_GTT=y
# CONFIG_VGA_SWITCHEROO is not setCONFIG_DRM=yCONFIG_DRM_MIPI_DSI=y
# CONFIG_DRM_DEBUG_MM is not set
# CONFIG_DRM_DEBUG_SELFTEST is not setCONFIG_DRM_KMS_HELPER=y
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not setCONFIG_DRM_DISPLAY_HELPER=yCONFIG_DRM_DISPLAY_DP_HELPER=yCONFIG_DRM_DISPLAY_HDCP_HELPER=yCONFIG_DRM_DISPLAY_HDMI_HELPER=y
# CONFIG_DRM_DP_AUX_CHARDEV is not set
# CONFIG_DRM_DP_CEC is not setCONFIG_DRM_TTM=yCONFIG_DRM_BUDDY=yCONFIG_DRM_GEM_SHMEM_HELPER=y
#
# I2C encoder or helper chips
#
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
# end of I2C encoder or helper chips
#
# ARM devices
#
# end of ARM devices
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_AMDGPU is not set
# CONFIG_DRM_NOUVEAU is not setCONFIG_DRM_I915=yCONFIG_DRM_I915_FORCE_PROBE=""CONFIG_DRM_I915_CAPTURE_ERROR=yCONFIG_DRM_I915_COMPRESS_ERROR=yCONFIG_DRM_I915_USERPTR=yCONFIG_DRM_I915_REQUEST_TIMEOUT=20000CONFIG_DRM_I915_FENCE_TIMEOUT=10000CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500CONFIG_DRM_I915_PREEMPT_TIMEOUT=640CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000CONFIG_DRM_I915_STOP_TIMEOUT=100CONFIG_DRM_I915_TIMESLICE_DURATION=1
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VKMS is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_QXL is not setCONFIG_DRM_VIRTIO_GPU=yCONFIG_DRM_PANEL=y
#
# Display Panels
#
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set
# end of Display Panels
CONFIG_DRM_BRIDGE=yCONFIG_DRM_PANEL_BRIDGE=y
#
# Display Interface Bridges
#
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# end of Display Interface Bridges
# CONFIG_DRM_ETNAVIV is not set
# CONFIG_DRM_BOCHS is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_GM12U320 is not set
# CONFIG_DRM_SIMPLEDRM is not set
# CONFIG_DRM_VBOXVIDEO is not set
# CONFIG_DRM_GUD is not set
# CONFIG_DRM_SSD130X is not set
# CONFIG_DRM_LEGACY is not setCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=yCONFIG_DRM_NOMODESET=y
#
# Frame buffer Devices
#CONFIG_FB_CMDLINE=y
# CONFIG_FB is not set
# end of Frame buffer Devices
#
# Backlight & LCD device support
#
# CONFIG_LCD_CLASS_DEVICE is not setCONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_APPLE is not set
# CONFIG_BACKLIGHT_QCOM_WLED is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3639 is not set
# CONFIG_BACKLIGHT_LV5207LP is not set
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set
# end of Backlight & LCD device support
CONFIG_HDMI=y
#
# Console display driver support
#CONFIG_VGA_CONSOLE=yCONFIG_DUMMY_CONSOLE=yCONFIG_DUMMY_CONSOLE_COLUMNS=80CONFIG_DUMMY_CONSOLE_ROWS=25
# end of Console display driver support # end of Graphics support
CONFIG_SOUND=yCONFIG_SND=yCONFIG_SND_TIMER=yCONFIG_SND_PCM=yCONFIG_SND_HWDEP=yCONFIG_SND_SEQ_DEVICE=yCONFIG_SND_JACK=yCONFIG_SND_JACK_INPUT_DEV=y
# CONFIG_SND_OSSEMUL is not setCONFIG_SND_PCM_TIMER=yCONFIG_SND_HRTIMER=y
# CONFIG_SND_DYNAMIC_MINORS is not setCONFIG_SND_SUPPORT_OLD_API=yCONFIG_SND_PROC_FS=yCONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not setCONFIG_SND_CTL_FAST_LOOKUP=y
# CONFIG_SND_DEBUG is not set
# CONFIG_SND_CTL_INPUT_VALIDATION is not setCONFIG_SND_VMASTER=yCONFIG_SND_DMA_SGBUF=yCONFIG_SND_SEQUENCER=yCONFIG_SND_SEQ_DUMMY=yCONFIG_SND_SEQ_HRTIMER_DEFAULT=yCONFIG_SND_DRIVERS=y
# CONFIG_SND_PCSP is not set
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_ALOOP is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not setCONFIG_SND_PCI=y
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ASIHPI is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CTXFI is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_INDIGOIOX is not set
# CONFIG_SND_INDIGODJX is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_LOLA is not set
# CONFIG_SND_LX6464ES is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SE6X is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set
#
# HD-Audio
#CONFIG_SND_HDA=yCONFIG_SND_HDA_INTEL=y CONFIG_SND_HDA_HWDEP=y
# CONFIG_SND_HDA_RECONFIG is not set
# CONFIG_SND_HDA_INPUT_BEEP is not set
# CONFIG_SND_HDA_PATCH_LOADER is not set
# CONFIG_SND_HDA_CODEC_REALTEK is not set
# CONFIG_SND_HDA_CODEC_ANALOG is not set
# CONFIG_SND_HDA_CODEC_SIGMATEL is not set
# CONFIG_SND_HDA_CODEC_VIA is not set
# CONFIG_SND_HDA_CODEC_HDMI is not set
# CONFIG_SND_HDA_CODEC_CIRRUS is not set
# CONFIG_SND_HDA_CODEC_CS8409 is not set
# CONFIG_SND_HDA_CODEC_CONEXANT is not set
# CONFIG_SND_HDA_CODEC_CA0110 is not set
# CONFIG_SND_HDA_CODEC_CA0132 is not set
# CONFIG_SND_HDA_CODEC_CMEDIA is not set
# CONFIG_SND_HDA_CODEC_SI3054 is not set
# CONFIG_SND_HDA_GENERIC is not set CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
# CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM is not set
# end of HD-Audio
CONFIG_SND_HDA_CORE=yCONFIG_SND_HDA_COMPONENT=yCONFIG_SND_HDA_I915=yCONFIG_SND_HDA_PREALLOC_SIZE=0CONFIG_SND_INTEL_NHLT=yCONFIG_SND_INTEL_DSP_CONFIG=yCONFIG_SND_INTEL_SOUNDWIRE_ACPI=yCONFIG_SND_USB=y
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_UA101 is not set
# CONFIG_SND_USB_USX2Y is not set
# CONFIG_SND_USB_CAIAQ is not set
# CONFIG_SND_USB_US122L is not set
# CONFIG_SND_USB_6FIRE is not set
# CONFIG_SND_USB_HIFACE is not set
# CONFIG_SND_BCD2000 is not set
# CONFIG_SND_USB_POD is not set
# CONFIG_SND_USB_PODHD is not set
# CONFIG_SND_USB_TONEPORT is not set
# CONFIG_SND_USB_VARIAX is not setCONFIG_SND_PCMCIA=y
# CONFIG_SND_VXPOCKET is not set
# CONFIG_SND_PDAUDIOCF is not set
# CONFIG_SND_SOC is not setCONFIG_SND_X86=y
# CONFIG_HDMI_LPE_AUDIO is not set
# CONFIG_SND_VIRTIO is not set
#
# HID support
#CONFIG_HID=y
# CONFIG_HID_BATTERY_STRENGTH is not setCONFIG_HIDRAW=y
# CONFIG_UHID is not setCONFIG_HID_GENERIC=y
#
# Special HID drivers
#CONFIG_HID_A4TECH=y
# CONFIG_HID_ACCUTOUCH is not set
# CONFIG_HID_ACRUX is not setCONFIG_HID_APPLE=y
# CONFIG_HID_APPLEIR is not set
# CONFIG_HID_ASUS is not set
# CONFIG_HID_AUREAL is not setCONFIG_HID_BELKIN=y
# CONFIG_HID_BETOP_FF is not set
# CONFIG_HID_BIGBEN_FF is not setCONFIG_HID_CHERRY=yCONFIG_HID_CHICONY=y
# CONFIG_HID_CORSAIR is not set
# CONFIG_HID_COUGAR is not set
# CONFIG_HID_MACALLY is not set
# CONFIG_HID_PRODIKEYS is not set
# CONFIG_HID_CMEDIA is not set
# CONFIG_HID_CREATIVE_SB0540 is not setCONFIG_HID_CYPRESS=y
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EMS_FF is not set
# CONFIG_HID_ELAN is not set
# CONFIG_HID_ELECOM is not set
# CONFIG_HID_ELO is not setCONFIG_HID_EZKEY=y
# CONFIG_HID_FT260 is not set
# CONFIG_HID_GEMBIRD is not set
# CONFIG_HID_GFRM is not set
# CONFIG_HID_GLORIOUS is not set
# CONFIG_HID_HOLTEK is not set
# CONFIG_HID_VIVALDI is not set
# CONFIG_HID_GT683R is not set
# CONFIG_HID_KEYTOUCH is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_VIEWSONIC is not set
# CONFIG_HID_XIAOMI is not setCONFIG_HID_GYRATION=y
# CONFIG_HID_ICADE is not setCONFIG_HID_ITE=y
# CONFIG_HID_JABRA is not set
# CONFIG_HID_TWINHAN is not setCONFIG_HID_KENSINGTON=y
# CONFIG_HID_LCPOWER is not set
# CONFIG_HID_LED is not set
# CONFIG_HID_LENOVO is not set
# CONFIG_HID_LETSKETCH is not setCONFIG_HID_LOGITECH=y
# CONFIG_HID_LOGITECH_DJ is not set
# CONFIG_HID_LOGITECH_HIDPP is not setCONFIG_LOGITECH_FF=y
# CONFIG_LOGIRUMBLEPAD2_FF is not set
# CONFIG_LOGIG940_FF is not setCONFIG_LOGIWHEELS_FF=y
# CONFIG_HID_MAGICMOUSE is not set
# CONFIG_HID_MALTRON is not set
# CONFIG_HID_MAYFLASH is not set
# CONFIG_HID_MEGAWORLD_FF is not setCONFIG_HID_REDRAGON=yCONFIG_HID_MICROSOFT=yCONFIG_HID_MONTEREY=y
# CONFIG_HID_MULTITOUCH is not set
# CONFIG_HID_NINTENDO is not set
# CONFIG_HID_NTI is not setCONFIG_HID_NTRIG=y
# CONFIG_HID_ORTEK is not setCONFIG_HID_PANTHERLORD=yCONFIG_PANTHERLORD_FF=y
# CONFIG_HID_PENMOUNT is not setCONFIG_HID_PETALYNX=y
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_PLANTRONICS is not set
# CONFIG_HID_RAZER is not set
# CONFIG_HID_PRIMAX is not set
# CONFIG_HID_RETRODE is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_SAITEK is not setCONFIG_HID_SAMSUNG=y
# CONFIG_HID_SEMITEK is not set
# CONFIG_HID_SIGMAMICRO is not setCONFIG_HID_SONY=y
# CONFIG_SONY_FF is not set
# CONFIG_HID_SPEEDLINK is not set
# CONFIG_HID_STEAM is not set
# CONFIG_HID_STEELSERIES is not setCONFIG_HID_SUNPLUS=y
# CONFIG_HID_RMI is not set
# CONFIG_HID_GREENASIA is not set
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TIVO is not setCONFIG_HID_TOPSEED=y
# CONFIG_HID_THINGM is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_UDRAW_PS3 is not set
# CONFIG_HID_U2FZERO is not set
# CONFIG_HID_WACOM is not set
# CONFIG_HID_WIIMOTE is not set
# CONFIG_HID_XINMO is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not set
# CONFIG_HID_SENSOR_HUB is not set
# CONFIG_HID_ALPS is not set
# end of Special HID drivers
#
# USB HID support
#CONFIG_USB_HID=yCONFIG_HID_PID=yCONFIG_USB_HIDDEV=y
# end of USB HID support
#
# I2C HID support
#
# CONFIG_I2C_HID_ACPI is not set
# end of I2C HID support
#
# Intel ISH HID support
#
# CONFIG_INTEL_ISH_HID is not set
# end of Intel ISH HID support
#
# AMD SFH HID Support
#
# CONFIG_AMD_SFH_HID is not set
# end of AMD SFH HID Support # end of HID support
CONFIG_USB_OHCI_LITTLE_ENDIAN=yCONFIG_USB_SUPPORT=yCONFIG_USB_COMMON=y
# CONFIG_USB_LED_TRIG is not set
# CONFIG_USB_ULPI_BUS is not setCONFIG_USB_ARCH_HAS_HCD=yCONFIG_USB=yCONFIG_USB_PCI=yCONFIG_USB_ANNOUNCE_NEW_DEVICES=y
#
# Miscellaneous USB options
#CONFIG_USB_DEFAULT_PERSIST=y
# CONFIG_USB_FEW_INIT_RETRIES is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_OTG is not set
# CONFIG_USB_OTG_PRODUCTLIST is not set
# CONFIG_USB_LEDS_TRIGGER_USBPORT is not setCONFIG_USB_AUTOSUSPEND_DELAY=2CONFIG_USB_MON=y
#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not setCONFIG_USB_XHCI_HCD=y
# CONFIG_USB_XHCI_DBGCAP is not setCONFIG_USB_XHCI_PCI=y
# CONFIG_USB_XHCI_PCI_RENESAS is not set
# CONFIG_USB_XHCI_PLATFORM is not setCONFIG_USB_EHCI_HCD=y
# CONFIG_USB_EHCI_ROOT_HUB_TT is not setCONFIG_USB_EHCI_TT_NEWSCHED=yCONFIG_USB_EHCI_PCI=y
# CONFIG_USB_EHCI_FSL is not set
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_FOTG210_HCD is not setCONFIG_USB_OHCI_HCD=yCONFIG_USB_OHCI_HCD_PCI=y
# CONFIG_USB_OHCI_HCD_PLATFORM is not setCONFIG_USB_UHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_HCD_TEST_MODE is not set
#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not setCONFIG_USB_PRINTER=y
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may #
#
# also be needed; see USB_STORAGE Help for more info # CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_REALTEK is not set # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set # CONFIG_USB_STORAGE_USBAT is not set # CONFIG_USB_STORAGE_SDDR09 is not set # CONFIG_USB_STORAGE_SDDR55 is not set # CONFIG_USB_STORAGE_JUMPSHOT is not set # CONFIG_USB_STORAGE_ALAUDA is not set # CONFIG_USB_STORAGE_ONETOUCH is not set # CONFIG_USB_STORAGE_KARMA is not set # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set # CONFIG_USB_STORAGE_ENE_UB6250 is not set # CONFIG_USB_UAS is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USBIP_CORE is not set
# CONFIG_USB_CDNS_SUPPORT is not set
# CONFIG_USB_MUSB_HDRC is not set
# CONFIG_USB_DWC3 is not set
# CONFIG_USB_DWC2 is not set
# CONFIG_USB_CHIPIDEA is not set
# CONFIG_USB_ISP1760 is not set
#
# USB port drivers
#
# CONFIG_USB_SERIAL is not set
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_APPLE_MFI_FASTCHARGE is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_EHSET_TEST_FIXTURE is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
# CONFIG_USB_EZUSB_FX2 is not set
# CONFIG_USB_HUB_USB251XB is not set
# CONFIG_USB_HSIC_USB3503 is not set
# CONFIG_USB_HSIC_USB4604 is not set
# CONFIG_USB_LINK_LAYER_TEST is not set
# CONFIG_USB_CHAOSKEY is not set
#
# USB Physical Layer drivers
#
# CONFIG_NOP_USB_XCEIV is not set
# CONFIG_USB_ISP1301 is not set
# end of USB Physical Layer drivers
# CONFIG_USB_GADGET is not set
# CONFIG_TYPEC is not set
# CONFIG_USB_ROLE_SWITCH is not set
# CONFIG_MMC is not set
# CONFIG_SCSI_UFSHCD is not set
# CONFIG_MEMSTICK is not setCONFIG_NEW_LEDS=yCONFIG_LEDS_CLASS=y
# CONFIG_LEDS_CLASS_FLASH is not set
# CONFIG_LEDS_CLASS_MULTICOLOR is not set
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
#
# LED drivers
#
# CONFIG_LEDS_APU is not set
# CONFIG_LEDS_LM3530 is not set
# CONFIG_LEDS_LM3532 is not set
# CONFIG_LEDS_LM3642 is not set
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_LP3944 is not set
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_PCA963X is not set
# CONFIG_LEDS_BD2802 is not set
# CONFIG_LEDS_INTEL_SS4200 is not set
# CONFIG_LEDS_TCA6507 is not set
# CONFIG_LEDS_TLC591XX is not set
# CONFIG_LEDS_LM355x is not set
# CONFIG_LEDS_IS31FL319X is not set
#
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) #
# CONFIG_LEDS_BLINKM is not set
# CONFIG_LEDS_MLXCPLD is not set
# CONFIG_LEDS_MLXREG is not set
# CONFIG_LEDS_USER is not set
# CONFIG_LEDS_NIC78BX is not set
# CONFIG_LEDS_TI_LMU_COMMON is not set
#
# Flash and Torch LED drivers
#
#
# RGB LED drivers
#
#
# LED Triggers
#CONFIG_LEDS_TRIGGERS=y
# CONFIG_LEDS_TRIGGER_TIMER is not set
# CONFIG_LEDS_TRIGGER_ONESHOT is not set
# CONFIG_LEDS_TRIGGER_DISK is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
# CONFIG_LEDS_TRIGGER_CPU is not set
# CONFIG_LEDS_TRIGGER_ACTIVITY is not set
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
#
# iptables trigger is under Netfilter config (LED target) # # CONFIG_LEDS_TRIGGER_TRANSIENT is not set # CONFIG_LEDS_TRIGGER_CAMERA is not set # CONFIG_LEDS_TRIGGER_PANIC is not set # CONFIG_LEDS_TRIGGER_NETDEV is not set # CONFIG_LEDS_TRIGGER_PATTERN is not set # CONFIG_LEDS_TRIGGER_AUDIO is not set # CONFIG_LEDS_TRIGGER_TTY is not set
#
# Simple LED drivers
#
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not setCONFIG_EDAC_ATOMIC_SCRUB=yCONFIG_EDAC_SUPPORT=yCONFIG_RTC_LIB=yCONFIG_RTC_MC146818_LIB=yCONFIG_RTC_CLASS=y
# CONFIG_RTC_HCTOSYS is not setCONFIG_RTC_SYSTOHC=yCONFIG_RTC_SYSTOHC_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not setCONFIG_RTC_NVMEM=y
#
# RTC interfaces
#CONFIG_RTC_INTF_SYSFS=yCONFIG_RTC_INTF_PROC=yCONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set
#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_ABB5ZES3 is not set
# CONFIG_RTC_DRV_ABEOZ9 is not set
# CONFIG_RTC_DRV_ABX80X is not set
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF85063 is not set
# CONFIG_RTC_DRV_PCF85363 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8010 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
# CONFIG_RTC_DRV_RV3028 is not set
# CONFIG_RTC_DRV_RV3032 is not set
# CONFIG_RTC_DRV_RV8803 is not set
# CONFIG_RTC_DRV_SD3078 is not set
#
# SPI RTC drivers
#CONFIG_RTC_I2C_AND_SPI=y
#
# SPI and I2C RTC drivers
#
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_PCF2127 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set
# CONFIG_RTC_DRV_RX6110 is not set
#
# Platform RTC drivers
#CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1685_FAMILY is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_DS2404 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_V3020 is not set
#
# on-CPU RTC drivers
#
# CONFIG_RTC_DRV_FTRTC010 is not set
#
# HID Sensor RTC drivers
#
# CONFIG_RTC_DRV_GOLDFISH is not setCONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set
#
# DMA Devices
#CONFIG_DMA_ENGINE=yCONFIG_DMA_VIRTUAL_CHANNELS=yCONFIG_DMA_ACPI=y
# CONFIG_ALTERA_MSGDMA is not set
# CONFIG_INTEL_IDMA64 is not set
# CONFIG_INTEL_IDXD is not set
# CONFIG_INTEL_IDXD_COMPAT is not set
# CONFIG_INTEL_IOATDMA is not set
# CONFIG_PLX_DMA is not set
# CONFIG_AMD_PTDMA is not set
# CONFIG_QCOM_HIDMA_MGMT is not set
# CONFIG_QCOM_HIDMA is not setCONFIG_DW_DMAC_CORE=y
# CONFIG_DW_DMAC is not set
# CONFIG_DW_DMAC_PCI is not set
# CONFIG_DW_EDMA is not set
# CONFIG_DW_EDMA_PCIE is not setCONFIG_HSU_DMA=y
# CONFIG_SF_PDMA is not set
# CONFIG_INTEL_LDMA is not set
#
# DMA Clients
#
# CONFIG_ASYNC_TX_DMA is not set
# CONFIG_DMATEST is not set
#
# DMABUF options
#CONFIG_SYNC_FILE=y
# CONFIG_SW_SYNC is not set
# CONFIG_UDMABUF is not set
# CONFIG_DMABUF_MOVE_NOTIFY is not set
# CONFIG_DMABUF_DEBUG is not set
# CONFIG_DMABUF_SELFTESTS is not set
# CONFIG_DMABUF_HEAPS is not set
# CONFIG_DMABUF_SYSFS_STATS is not set
# end of DMABUF options
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set
# CONFIG_VFIO is not setCONFIG_IRQ_BYPASS_MANAGER=y
# CONFIG_VIRT_DRIVERS is not setCONFIG_VIRTIO_ANCHOR=yCONFIG_VIRTIO=yCONFIG_VIRTIO_PCI_LIB=yCONFIG_VIRTIO_PCI_LIB_LEGACY=yCONFIG_VIRTIO_MENU=yCONFIG_VIRTIO_PCI=yCONFIG_VIRTIO_PCI_LEGACY=y
# CONFIG_VIRTIO_BALLOON is not setCONFIG_VIRTIO_INPUT=y
# CONFIG_VIRTIO_MMIO is not setCONFIG_VIRTIO_DMA_SHARED_BUFFER=y
# CONFIG_VDPA is not setCONFIG_VHOST_MENU=y
# CONFIG_VHOST_NET is not set
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
#
# Microsoft Hyper-V guest support
#
# CONFIG_HYPERV is not set
# end of Microsoft Hyper-V guest support
# CONFIG_GREYBUS is not set
# CONFIG_COMEDI is not set
# CONFIG_STAGING is not set
# CONFIG_CHROME_PLATFORMS is not set
# CONFIG_MELLANOX_PLATFORM is not setCONFIG_SURFACE_PLATFORMS=y
# CONFIG_SURFACE_3_POWER_OPREGION is not set
# CONFIG_SURFACE_GPE is not set
# CONFIG_SURFACE_PRO3_BUTTON is not setCONFIG_X86_PLATFORM_DEVICES=y
# CONFIG_ACPI_WMI is not set
# CONFIG_ACERHDF is not set
# CONFIG_ACER_WIRELESS is not set
# CONFIG_AMD_PMC is not set
# CONFIG_AMD_HSMP is not set
# CONFIG_ADV_SWBUTTON is not set
# CONFIG_APPLE_GMUX is not set
# CONFIG_ASUS_LAPTOP is not set
# CONFIG_ASUS_WIRELESS is not setCONFIG_EEEPC_LAPTOP=y
# CONFIG_X86_PLATFORM_DRIVERS_DELL is not set
# CONFIG_AMILO_RFKILL is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_FUJITSU_TABLET is not set
# CONFIG_GPD_POCKET_FAN is not set
# CONFIG_HP_ACCEL is not set
# CONFIG_WIRELESS_HOTKEY is not set
# CONFIG_IBM_RTL is not set
# CONFIG_IDEAPAD_LAPTOP is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_THINKPAD_ACPI is not set
# CONFIG_INTEL_ATOMISP2_PM is not set
# CONFIG_INTEL_SAR_INT1092 is not set
# CONFIG_INTEL_PMC_CORE is not set
#
# Intel Speed Select Technology interface support
#
# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set
# end of Intel Speed Select Technology interface support
#
# Intel Uncore Frequency Control
#
# CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set
# end of Intel Uncore Frequency Control
# CONFIG_INTEL_HID_EVENT is not set
# CONFIG_INTEL_VBTN is not set
# CONFIG_INTEL_OAKTRAIL is not set
# CONFIG_INTEL_PUNIT_IPC is not set
# CONFIG_INTEL_RST is not set
# CONFIG_INTEL_SMARTCONNECT is not set
# CONFIG_INTEL_TURBO_MAX_3 is not set
# CONFIG_INTEL_VSEC is not set
# CONFIG_MSI_LAPTOP is not set
# CONFIG_SAMSUNG_LAPTOP is not set
# CONFIG_SAMSUNG_Q10 is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_TOSHIBA_HAPS is not set
# CONFIG_ACPI_CMPC is not set
# CONFIG_COMPAL_LAPTOP is not set
# CONFIG_PANASONIC_LAPTOP is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_SYSTEM76_ACPI is not set
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_MLX_PLATFORM is not set
# CONFIG_INTEL_IPS is not set
# CONFIG_INTEL_SCU_PCI is not set
# CONFIG_INTEL_SCU_PLATFORM is not set
# CONFIG_SIEMENS_SIMATIC_IPC is not set
# CONFIG_WINMATE_FM07_KEYS is not setCONFIG_P2SB=yCONFIG_HAVE_CLK=yCONFIG_HAVE_CLK_PREPARE=yCONFIG_COMMON_CLK=y
# CONFIG_COMMON_CLK_MAX9485 is not set
# CONFIG_COMMON_CLK_SI5341 is not set
# CONFIG_COMMON_CLK_SI5351 is not set
# CONFIG_COMMON_CLK_SI544 is not set
# CONFIG_COMMON_CLK_CDCE706 is not set
# CONFIG_COMMON_CLK_CS2000_CP is not set
# CONFIG_XILINX_VCU is not set
# CONFIG_HWSPINLOCK is not set
#
# Clock Source drivers
#CONFIG_CLKEVT_I8253=yCONFIG_I8253_LOCK=yCONFIG_CLKBLD_I8253=y
# end of Clock Source drivers
CONFIG_MAILBOX=yCONFIG_PCC=y
# CONFIG_ALTERA_MBOX is not setCONFIG_IOMMU_IOVA=yCONFIG_IOASID=yCONFIG_IOMMU_API=yCONFIG_IOMMU_SUPPORT=y
#
# Generic IOMMU Pagetable Support
#CONFIG_IOMMU_IO_PGTABLE=y
# end of Generic IOMMU Pagetable Support
# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not setCONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not setCONFIG_IOMMU_DMA=yCONFIG_AMD_IOMMU=y
# CONFIG_AMD_IOMMU_V2 is not setCONFIG_DMAR_TABLE=yCONFIG_INTEL_IOMMU=y
# CONFIG_INTEL_IOMMU_SVM is not set
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not setCONFIG_INTEL_IOMMU_FLOPPY_WA=yCONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON=y
# CONFIG_IRQ_REMAP is not set
# CONFIG_VIRTIO_IOMMU is not set
#
# Remoteproc drivers
#
# CONFIG_REMOTEPROC is not set
# end of Remoteproc drivers
#
# Rpmsg drivers
#
# CONFIG_RPMSG_QCOM_GLINK_RPM is not set
# CONFIG_RPMSG_VIRTIO is not set
# end of Rpmsg drivers
# CONFIG_SOUNDWIRE is not set
#
# SOC (System On Chip) specific Drivers
#
#
# Amlogic SoC drivers
#
# end of Amlogic SoC drivers
#
# Broadcom SoC drivers
#
# end of Broadcom SoC drivers
#
# NXP/Freescale QorIQ SoC drivers
#
# end of NXP/Freescale QorIQ SoC drivers
#
# fujitsu SoC drivers # # end of fujitsu SoC drivers
#
# i.MX SoC drivers
#
# end of i.MX SoC drivers
#
# Enable LiteX SoC Builder specific drivers
#
# end of Enable LiteX SoC Builder specific drivers
#
# Qualcomm SoC drivers
#
# end of Qualcomm SoC drivers
# CONFIG_SOC_TI is not set
#
# Xilinx SoC drivers
#
# end of Xilinx SoC drivers # end of SOC (System On Chip) specific Drivers
# CONFIG_PM_DEVFREQ is not set
# CONFIG_EXTCON is not set
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
# CONFIG_NTB is not set
# CONFIG_PWM is not set
#
# IRQ chip support
#
# end of IRQ chip support
# CONFIG_IPACK_BUS is not set
# CONFIG_RESET_CONTROLLER is not set
#
# PHY Subsystem
#
# CONFIG_GENERIC_PHY is not set
# CONFIG_USB_LGM_PHY is not set
# CONFIG_PHY_CAN_TRANSCEIVER is not set
#
# PHY drivers for Broadcom platforms
#
# CONFIG_BCM_KONA_USB2_PHY is not set
# end of PHY drivers for Broadcom platforms
# CONFIG_PHY_PXA_28NM_HSIC is not set
# CONFIG_PHY_PXA_28NM_USB2 is not set
# CONFIG_PHY_INTEL_LGM_EMMC is not set
# end of PHY Subsystem
# CONFIG_POWERCAP is not set
# CONFIG_MCB is not set
#
# Performance monitor support
#
# end of Performance monitor support
# CONFIG_RAS is not set
# CONFIG_USB4 is not set
#
# Android
#
# CONFIG_ANDROID_BINDER_IPC is not set
# end of Android
# CONFIG_LIBNVDIMM is not set
# CONFIG_DAX is not setCONFIG_NVMEM=yCONFIG_NVMEM_SYSFS=y
# CONFIG_NVMEM_RMEM is not set
#
# HW tracing support
#
# CONFIG_STM is not set
# CONFIG_INTEL_TH is not set
# end of HW tracing support
# CONFIG_FPGA is not set
# CONFIG_TEE is not set
# CONFIG_SIOX is not set
# CONFIG_SLIMBUS is not set
# CONFIG_INTERCONNECT is not set
# CONFIG_COUNTER is not set
# CONFIG_PECI is not set
# CONFIG_HTE is not set
# end of Device Drivers
#
# File systems
#CONFIG_DCACHE_WORD_ACCESS=y
# CONFIG_VALIDATE_FS_PARSER is not setCONFIG_FS_IOMAP=y
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not setCONFIG_EXT4_FS=yCONFIG_EXT4_USE_FOR_EXT2=yCONFIG_EXT4_FS_POSIX_ACL=yCONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not setCONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not setCONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not setCONFIG_XFS_FS=yCONFIG_XFS_SUPPORT_V4=y
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_POSIX_ACL is not set
# CONFIG_XFS_RT is not set
# CONFIG_XFS_ONLINE_SCRUB is not set
# CONFIG_XFS_WARN is not set
# CONFIG_XFS_DEBUG is not set
# CONFIG_GFS2_FS is not setCONFIG_BTRFS_FS=y
# CONFIG_BTRFS_FS_POSIX_ACL is not set
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_BTRFS_ASSERT is not set
# CONFIG_BTRFS_FS_REF_VERIFY is not set
# CONFIG_NILFS2_FS is not set
# CONFIG_F2FS_FS is not setCONFIG_FS_POSIX_ACL=yCONFIG_EXPORTFS=y
# CONFIG_EXPORTFS_BLOCK_OPS is not setCONFIG_FILE_LOCKING=y
# CONFIG_FS_ENCRYPTION is not set
# CONFIG_FS_VERITY is not setCONFIG_FSNOTIFY=yCONFIG_DNOTIFY=yCONFIG_INOTIFY_USER=y
# CONFIG_FANOTIFY is not setCONFIG_QUOTA=yCONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
# CONFIG_QUOTA_DEBUG is not setCONFIG_QUOTA_TREE=y
# CONFIG_QFMT_V1 is not setCONFIG_QFMT_V2=yCONFIG_QUOTACTL=yCONFIG_AUTOFS4_FS=yCONFIG_AUTOFS_FS=y
# CONFIG_FUSE_FS is not set
# CONFIG_OVERLAY_FS is not set
#
# Caches
#CONFIG_NETFS_SUPPORT=y
# CONFIG_NETFS_STATS is not set
# CONFIG_FSCACHE is not set
# end of Caches
#
# CD-ROM/DVD Filesystems
#CONFIG_ISO9660_FS=yCONFIG_JOLIET=yCONFIG_ZISOFS=y
# CONFIG_UDF_FS is not set
# end of CD-ROM/DVD Filesystems
#
# DOS/FAT/EXFAT/NT Filesystems
#CONFIG_FAT_FS=yCONFIG_MSDOS_FS=yCONFIG_VFAT_FS=yCONFIG_FAT_DEFAULT_CODEPAGE=437CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_FAT_DEFAULT_UTF8 is not set
# CONFIG_EXFAT_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS3_FS is not set
# end of DOS/FAT/EXFAT/NT Filesystems
#
# Pseudo filesystems
#CONFIG_PROC_FS=yCONFIG_PROC_KCORE=yCONFIG_PROC_VMCORE=y
# CONFIG_PROC_VMCORE_DEVICE_DUMP is not set CONFIG_PROC_SYSCTL=yCONFIG_PROC_PAGE_MONITOR=y
# CONFIG_PROC_CHILDREN is not set CONFIG_PROC_PID_ARCH_STATUS=yCONFIG_KERNFS=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_TMPFS_POSIX_ACL=yCONFIG_TMPFS_XATTR=y
# CONFIG_TMPFS_INODE64 is not set CONFIG_HUGETLBFS=yCONFIG_HUGETLB_PAGE=y CONFIG_ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y
# CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON is not set CONFIG_MEMFD_CREATE=y CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
# CONFIG_CONFIGFS_FS is not setCONFIG_EFIVAR_FS=m
# end of Pseudo filesystems
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ORANGEFS_FS is not set
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_SQUASHFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_PSTORE is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_EROFS_FS is not setCONFIG_NETWORK_FILESYSTEMS=yCONFIG_NFS_FS=yCONFIG_NFS_V2=yCONFIG_NFS_V3=yCONFIG_NFS_V3_ACL=yCONFIG_NFS_V4=y
# CONFIG_NFS_SWAP is not set
# CONFIG_NFS_V4_1 is not setCONFIG_ROOT_NFS=y
# CONFIG_NFS_USE_LEGACY_DNS is not setCONFIG_NFS_USE_KERNEL_DNS=yCONFIG_NFS_DISABLE_UDP_SUPPORT=y
# CONFIG_NFSD is not setCONFIG_GRACE_PERIOD=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_NFS_ACL_SUPPORT=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_SUNRPC_GSS=y
# CONFIG_SUNRPC_DEBUG is not set
# CONFIG_CEPH_FS is not set
# CONFIG_CIFS is not set
# CONFIG_SMB_SERVER is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not setCONFIG_9P_FS=y
# CONFIG_9P_FS_POSIX_ACL is not set
# CONFIG_9P_FS_SECURITY is not setCONFIG_NLS=yCONFIG_NLS_DEFAULT="utf8"CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not setCONFIG_NLS_ASCII=yCONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_MAC_ROMAN is not set
# CONFIG_NLS_MAC_CELTIC is not set
# CONFIG_NLS_MAC_CENTEURO is not set
# CONFIG_NLS_MAC_CROATIAN is not set
# CONFIG_NLS_MAC_CYRILLIC is not set
# CONFIG_NLS_MAC_GAELIC is not set
# CONFIG_NLS_MAC_GREEK is not set
# CONFIG_NLS_MAC_ICELAND is not set
# CONFIG_NLS_MAC_INUIT is not set
# CONFIG_NLS_MAC_ROMANIAN is not set
# CONFIG_NLS_MAC_TURKISH is not setCONFIG_NLS_UTF8=y
# CONFIG_UNICODE is not setCONFIG_IO_WQ=y
# end of File systems
#
# Security options
#CONFIG_KEYS=y
# CONFIG_KEYS_REQUEST_CACHE is not set
# CONFIG_PERSISTENT_KEYRINGS is not set
# CONFIG_TRUSTED_KEYS is not set
# CONFIG_ENCRYPTED_KEYS is not set
# CONFIG_KEY_DH_OPERATIONS is not set
# CONFIG_SECURITY_DMESG_RESTRICT is not setCONFIG_SECURITY=yCONFIG_SECURITY_WRITABLE_HOOKS=y
# CONFIG_SECURITYFS is not setCONFIG_SECURITY_NETWORK=y
# CONFIG_SECURITY_NETWORK_XFRM is not set
# CONFIG_SECURITY_PATH is not set
# CONFIG_INTEL_TXT is not setCONFIG_LSM_MMAP_MIN_ADDR=65536CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y
# CONFIG_HARDENED_USERCOPY is not set
# CONFIG_FORTIFY_SOURCE is not set
# CONFIG_STATIC_USERMODEHELPER is not setCONFIG_SECURITY_SELINUX=yCONFIG_SECURITY_SELINUX_BOOTPARAM=yCONFIG_SECURITY_SELINUX_DISABLE=yCONFIG_SECURITY_SELINUX_DEVELOP=yCONFIG_SECURITY_SELINUX_AVC_STATS=yCONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=0 CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9 CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256
# CONFIG_SECURITY_SMACK is not set
# CONFIG_SECURITY_TOMOYO is not set
# CONFIG_SECURITY_APPARMOR is not set
# CONFIG_SECURITY_LOADPIN is not set
# CONFIG_SECURITY_YAMA is not set
# CONFIG_SECURITY_SAFESETID is not set
# CONFIG_SECURITY_LOCKDOWN_LSM is not set
# CONFIG_SECURITY_LANDLOCK is not setCONFIG_INTEGRITY=y
# CONFIG_INTEGRITY_SIGNATURE is not setCONFIG_INTEGRITY_AUDIT=y
# CONFIG_IMA is not set
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
# CONFIG_EVM is not setCONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_DAC is not set CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor,bpf"
#
# Kernel hardening options
#
#
# Memory initialization
#CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=yCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
# CONFIG_INIT_STACK_NONE is not set
# CONFIG_INIT_STACK_ALL_PATTERN is not setCONFIG_INIT_STACK_ALL_ZERO=y
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not setCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
# CONFIG_ZERO_CALL_USED_REGS is not set
# end of Memory initialization
CONFIG_RANDSTRUCT_NONE=y
# end of Kernel hardening options # end of Security options
CONFIG_XOR_BLOCKS=yCONFIG_CRYPTO=y
#
# Crypto core or helper
#CONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_AEAD=yCONFIG_CRYPTO_AEAD2=yCONFIG_CRYPTO_SKCIPHER=yCONFIG_CRYPTO_SKCIPHER2=yCONFIG_CRYPTO_HASH=yCONFIG_CRYPTO_HASH2=yCONFIG_CRYPTO_RNG=yCONFIG_CRYPTO_RNG2=yCONFIG_CRYPTO_RNG_DEFAULT=yCONFIG_CRYPTO_AKCIPHER2=yCONFIG_CRYPTO_AKCIPHER=yCONFIG_CRYPTO_KPP2=yCONFIG_CRYPTO_ACOMP2=yCONFIG_CRYPTO_MANAGER=yCONFIG_CRYPTO_MANAGER2=y
# CONFIG_CRYPTO_USER is not setCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=yCONFIG_CRYPTO_GF128MUL=yCONFIG_CRYPTO_NULL=yCONFIG_CRYPTO_NULL2=y
# CONFIG_CRYPTO_PCRYPT is not set
# CONFIG_CRYPTO_CRYPTD is not setCONFIG_CRYPTO_AUTHENC=y
# CONFIG_CRYPTO_TEST is not set
#
# Public-key cryptography
#CONFIG_CRYPTO_RSA=y
# CONFIG_CRYPTO_DH is not set
# CONFIG_CRYPTO_ECDH is not set
# CONFIG_CRYPTO_ECDSA is not set
# CONFIG_CRYPTO_ECRDSA is not set
# CONFIG_CRYPTO_SM2 is not set
# CONFIG_CRYPTO_CURVE25519 is not set
# CONFIG_CRYPTO_CURVE25519_X86 is not set
#
# Authenticated Encryption with Associated Data
#CONFIG_CRYPTO_CCM=yCONFIG_CRYPTO_GCM=y
# CONFIG_CRYPTO_CHACHA20POLY1305 is not set
# CONFIG_CRYPTO_AEGIS128 is not set
# CONFIG_CRYPTO_AEGIS128_AESNI_SSE2 is not setCONFIG_CRYPTO_SEQIV=yCONFIG_CRYPTO_ECHAINIV=y
#
# Block modes
#CONFIG_CRYPTO_CBC=y
# CONFIG_CRYPTO_CFB is not setCONFIG_CRYPTO_CTR=y
# CONFIG_CRYPTO_CTS is not set
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_OFB is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_KEYWRAP is not set
# CONFIG_CRYPTO_NHPOLY1305_SSE2 is not set
# CONFIG_CRYPTO_NHPOLY1305_AVX2 is not set
# CONFIG_CRYPTO_ADIANTUM is not set
# CONFIG_CRYPTO_HCTR2 is not set
# CONFIG_CRYPTO_ESSIV is not set
#
# Hash modes
#CONFIG_CRYPTO_CMAC=yCONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set
#
# Digest
#CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_CRC32 is not set
# CONFIG_CRYPTO_CRC32_PCLMUL is not setCONFIG_CRYPTO_XXHASH=yCONFIG_CRYPTO_BLAKE2B=y
# CONFIG_CRYPTO_BLAKE2S_X86 is not set
# CONFIG_CRYPTO_CRCT10DIF is not setCONFIG_CRYPTO_GHASH=y
# CONFIG_CRYPTO_POLYVAL_CLMUL_NI is not set
# CONFIG_CRYPTO_POLY1305 is not set
# CONFIG_CRYPTO_POLY1305_X86_64 is not set
# CONFIG_CRYPTO_MD4 is not setCONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA1_SSSE3 is not set
# CONFIG_CRYPTO_SHA256_SSSE3 is not set
# CONFIG_CRYPTO_SHA512_SSSE3 is not setCONFIG_CRYPTO_SHA256=yCONFIG_CRYPTO_SHA512=y
# CONFIG_CRYPTO_SHA3 is not set
# CONFIG_CRYPTO_SM3_GENERIC is not set
# CONFIG_CRYPTO_SM3_AVX_X86_64 is not set
# CONFIG_CRYPTO_STREEBOG is not set
# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set
#
# Ciphers
#CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_AES_TI is not set
# CONFIG_CRYPTO_AES_NI_INTEL is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_BLOWFISH_X86_64 is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAMELLIA_X86_64 is not set
# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 is not set # CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 is not set # CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST5_AVX_X86_64 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_CAST6_AVX_X86_64 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_DES3_EDE_X86_64 is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_CHACHA20 is not set
# CONFIG_CRYPTO_CHACHA20_X86_64 is not set
# CONFIG_CRYPTO_ARIA is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set # CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set # CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set # CONFIG_CRYPTO_SM4_GENERIC is not set
# CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64 is not set # CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64 is not set # CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
# CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set # CONFIG_CRYPTO_TWOFISH_AVX_X86_64 is not set
#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_LZO is not set
# CONFIG_CRYPTO_842 is not set
# CONFIG_CRYPTO_LZ4 is not set
# CONFIG_CRYPTO_LZ4HC is not setCONFIG_CRYPTO_ZSTD=y
#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not setCONFIG_CRYPTO_DRBG_MENU=yCONFIG_CRYPTO_DRBG_HMAC=y
# CONFIG_CRYPTO_DRBG_HASH is not set
# CONFIG_CRYPTO_DRBG_CTR is not setCONFIG_CRYPTO_DRBG=yCONFIG_CRYPTO_JITTERENTROPY=y
# CONFIG_CRYPTO_USER_API_HASH is not set
# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
# CONFIG_CRYPTO_USER_API_RNG is not set
# CONFIG_CRYPTO_USER_API_AEAD is not setCONFIG_CRYPTO_HASH_INFO=yCONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set
# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set
# CONFIG_CRYPTO_DEV_CCP is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
# CONFIG_CRYPTO_DEV_QAT_C62X is not set
# CONFIG_CRYPTO_DEV_QAT_4XXX is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set
# CONFIG_CRYPTO_DEV_VIRTIO is not set
# CONFIG_CRYPTO_DEV_SAFEXCEL is not set
# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not setCONFIG_ASYMMETRIC_KEY_TYPE=yCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=yCONFIG_X509_CERTIFICATE_PARSER=y
# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not setCONFIG_PKCS7_MESSAGE_PARSER=y
# CONFIG_PKCS7_TEST_KEY is not set
# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set
# CONFIG_FIPS_SIGNATURE_SELFTEST is not set
#
# Certificates for signature checking
#CONFIG_SYSTEM_TRUSTED_KEYRING=yCONFIG_SYSTEM_TRUSTED_KEYS=""
# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set
# CONFIG_SECONDARY_TRUSTED_KEYRING is not set
# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set
# end of Certificates for signature checking
CONFIG_BINARY_PRINTF=y
#
# Library routines
#CONFIG_RAID6_PQ=yCONFIG_RAID6_PQ_BENCHMARK=y
# CONFIG_PACKING is not setCONFIG_BITREVERSE=yCONFIG_GENERIC_STRNCPY_FROM_USER=yCONFIG_GENERIC_STRNLEN_USER=yCONFIG_GENERIC_NET_UTILS=y
# CONFIG_CORDIC is not set
# CONFIG_PRIME_NUMBERS is not setCONFIG_RATIONAL=yCONFIG_GENERIC_PCI_IOMAP=yCONFIG_GENERIC_IOMAP=yCONFIG_ARCH_USE_CMPXCHG_LOCKREF=yCONFIG_ARCH_HAS_FAST_MULTIPLIER=yCONFIG_ARCH_USE_SYM_ANNOTATIONS=y
#
# Crypto library routines
#CONFIG_CRYPTO_LIB_AES=yCONFIG_CRYPTO_LIB_ARC4=yCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
# CONFIG_CRYPTO_LIB_CHACHA is not set
# CONFIG_CRYPTO_LIB_CURVE25519 is not setCONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
# CONFIG_CRYPTO_LIB_POLY1305 is not set
# CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not setCONFIG_CRYPTO_LIB_SHA1=yCONFIG_CRYPTO_LIB_SHA256=y
# end of Crypto library routines
CONFIG_LIB_MEMNEQ=yCONFIG_CRC_CCITT=yCONFIG_CRC16=y
# CONFIG_CRC_T10DIF is not set
# CONFIG_CRC64_ROCKSOFT is not set
# CONFIG_CRC_ITU_T is not setCONFIG_CRC32=y
# CONFIG_CRC32_SELFTEST is not setCONFIG_CRC32_SLICEBY8=y
# CONFIG_CRC32_SLICEBY4 is not set
# CONFIG_CRC32_SARWATE is not set
# CONFIG_CRC32_BIT is not set
# CONFIG_CRC64 is not set
# CONFIG_CRC4 is not set
# CONFIG_CRC7 is not setCONFIG_LIBCRC32C=y
# CONFIG_CRC8 is not setCONFIG_XXHASH=y
# CONFIG_RANDOM32_SELFTEST is not setCONFIG_ZLIB_INFLATE=yCONFIG_ZLIB_DEFLATE=yCONFIG_LZO_COMPRESS=yCONFIG_LZO_DECOMPRESS=yCONFIG_LZ4_DECOMPRESS=yCONFIG_ZSTD_COMPRESS=yCONFIG_ZSTD_DECOMPRESS=yCONFIG_XZ_DEC=yCONFIG_XZ_DEC_X86=yCONFIG_XZ_DEC_POWERPC=yCONFIG_XZ_DEC_IA64=yCONFIG_XZ_DEC_ARM=yCONFIG_XZ_DEC_ARMTHUMB=yCONFIG_XZ_DEC_SPARC=y
# CONFIG_XZ_DEC_MICROLZMA is not setCONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not setCONFIG_DECOMPRESS_GZIP=yCONFIG_DECOMPRESS_BZIP2=yCONFIG_DECOMPRESS_LZMA=yCONFIG_DECOMPRESS_XZ=yCONFIG_DECOMPRESS_LZO=yCONFIG_DECOMPRESS_LZ4=yCONFIG_DECOMPRESS_ZSTD=yCONFIG_GENERIC_ALLOCATOR=yCONFIG_INTERVAL_TREE=yCONFIG_XARRAY_MULTI=yCONFIG_ASSOCIATIVE_ARRAY=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT_MAP=yCONFIG_HAS_DMA=yCONFIG_DMA_OPS=yCONFIG_NEED_SG_DMA_LENGTH=yCONFIG_NEED_DMA_MAP_STATE=yCONFIG_ARCH_DMA_ADDR_T_64BIT=yCONFIG_SWIOTLB=y
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_DMA_MAP_BENCHMARK is not setCONFIG_SGL_ALLOC=yCONFIG_CHECK_SIGNATURE=yCONFIG_CPU_RMAP=yCONFIG_DQL=yCONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not setCONFIG_NLATTR=yCONFIG_CLZ_TAB=y
# CONFIG_IRQ_POLL is not setCONFIG_MPILIB=yCONFIG_OID_REGISTRY=yCONFIG_UCS2_STRING=yCONFIG_HAVE_GENERIC_VDSO=yCONFIG_GENERIC_GETTIMEOFDAY=yCONFIG_GENERIC_VDSO_TIME_NS=yCONFIG_FONT_SUPPORT=y
CONFIG_FONT_8x16=yCONFIG_FONT_AUTOSELECT=yCONFIG_SG_POOL=yCONFIG_ARCH_HAS_PMEM_API=yCONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=yCONFIG_ARCH_HAS_COPY_MC=yCONFIG_ARCH_STACKWALK=yCONFIG_STACKDEPOT=yCONFIG_SBITMAP=y
# end of Library routines
#
# Kernel hacking
#
#
# printk and dmesg options # CONFIG_PRINTK_TIME=y # CONFIG_PRINTK_CALLER is not set # CONFIG_STACKTRACE_BUILD_ID is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_DYNAMIC_DEBUG is not set # CONFIG_DYNAMIC_DEBUG_CORE is not set CONFIG_SYMBOLIC_ERRNAME=y CONFIG_DEBUG_BUGVERBOSE=y # end of printk and dmesg options
CONFIG_DEBUG_KERNEL=yCONFIG_DEBUG_MISC=y
#
# Compile-time checks and compiler options
#CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_NONE is not set
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set # CONFIG_DEBUG_INFO_DWARF4 is not set CONFIG_DEBUG_INFO_DWARF5=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_COMPRESSED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_BTF is not set CONFIG_PAHOLE_HAS_SPLIT_BTF=y CONFIG_GDB_SCRIPTS=yCONFIG_FRAME_WARN=2048
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_READABLE_ASM is not set
# CONFIG_HEADERS_INSTALL is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y CONFIG_OBJTOOL=y
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# end of Compile-time checks and compiler options
#
# Generic Kernel Debugging Instruments
#CONFIG_MAGIC_SYSRQ=yCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1CONFIG_MAGIC_SYSRQ_SERIAL=yCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""CONFIG_DEBUG_FS=yCONFIG_DEBUG_FS_ALLOW_ALL=y
# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set
# CONFIG_DEBUG_FS_ALLOW_NONE is not setCONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not setCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y
# CONFIG_UBSAN is not setCONFIG_HAVE_ARCH_KCSAN=yCONFIG_HAVE_KCSAN_COMPILER=y
# CONFIG_KCSAN is not set
# end of Generic Kernel Debugging Instruments
#
# Networking Debugging
#
# CONFIG_NET_DEV_REFCNT_TRACKER is not set
# CONFIG_NET_NS_REFCNT_TRACKER is not set
# CONFIG_DEBUG_NET is not set
# end of Networking Debugging
#
# Memory Debugging
#
# CONFIG_PAGE_EXTENSION is not set
# CONFIG_DEBUG_PAGEALLOC is not setCONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_PAGE_OWNER is not set
# CONFIG_PAGE_TABLE_CHECK is not set
# CONFIG_PAGE_POISONING is not set
# CONFIG_DEBUG_PAGE_REF is not set
# CONFIG_DEBUG_RODATA_TEST is not setCONFIG_ARCH_HAS_DEBUG_WX=y
# CONFIG_DEBUG_WX is not setCONFIG_GENERIC_PTDUMP=y
# CONFIG_PTDUMP_DEBUGFS is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SHRINKER_DEBUG is not setCONFIG_HAVE_DEBUG_KMEMLEAK=y
# CONFIG_DEBUG_KMEMLEAK is not setCONFIG_DEBUG_STACK_USAGE=y
# CONFIG_SCHED_STACK_END_CHECK is not setCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_VM_PGTABLE is not setCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
# CONFIG_DEBUG_VIRTUAL is not setCONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_PER_CPU_MAPS is not setCONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
# CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is not setCONFIG_HAVE_ARCH_KASAN=yCONFIG_HAVE_ARCH_KASAN_VMALLOC=yCONFIG_CC_HAS_KASAN_GENERIC=yCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
# CONFIG_KASAN is not setCONFIG_HAVE_ARCH_KFENCE=y
# CONFIG_KFENCE is not set
# end of Memory Debugging
# CONFIG_DEBUG_SHIRQ is not set
#
# Debug Oops, Lockups and Hangs
#
# CONFIG_PANIC_ON_OOPS is not setCONFIG_PANIC_ON_OOPS_VALUE=0CONFIG_PANIC_TIMEOUT=0
# CONFIG_SOFTLOCKUP_DETECTOR is not setCONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
# CONFIG_HARDLOCKUP_DETECTOR is not set
# CONFIG_DETECT_HUNG_TASK is not set
# CONFIG_WQ_WATCHDOG is not set
# CONFIG_TEST_LOCKUP is not set
# end of Debug Oops, Lockups and Hangs
#
# Scheduler Debugging
#
# CONFIG_SCHED_DEBUG is not setCONFIG_SCHED_INFO=yCONFIG_SCHEDSTATS=y
# end of Scheduler Debugging
# CONFIG_DEBUG_TIMEKEEPING is not setCONFIG_DEBUG_PREEMPT=y
#
# Lock Debugging (spinlocks, mutexes, etc...)
#CONFIG_LOCK_DEBUGGING_SUPPORT=y
# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
# CONFIG_DEBUG_RWSEMS is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_DEBUG_ATOMIC_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_LOCK_TORTURE_TEST is not set
# CONFIG_WW_MUTEX_SELFTEST is not set
# CONFIG_SCF_TORTURE_TEST is not set
# CONFIG_CSD_LOCK_WAIT_DEBUG is not set
# end of Lock Debugging (spinlocks, mutexes, etc...)
# CONFIG_DEBUG_IRQFLAGS is not setCONFIG_STACKTRACE=y
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
# CONFIG_DEBUG_KOBJECT is not set
#
# Debug kernel data structures
#
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_PLIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_BUG_ON_DATA_CORRUPTION is not set
# end of Debug kernel data structures
# CONFIG_DEBUG_CREDENTIALS is not set
#
# RCU Debugging
#
# CONFIG_RCU_SCALE_TEST is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_REF_SCALE_TEST is not setCONFIG_RCU_CPU_STALL_TIMEOUT=21CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0CONFIG_RCU_TRACE=y
# CONFIG_RCU_EQS_DEBUG is not set
# end of RCU Debugging
# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set # CONFIG_LATENCYTOP is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=yCONFIG_HAVE_RETHOOK=yCONFIG_RETHOOK=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y CONFIG_HAVE_DYNAMIC_FTRACE_NO_PATCHABLE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_FENTRY=y CONFIG_HAVE_OBJTOOL_MCOUNT=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y CONFIG_BUILDTIME_MCOUNT_SORT=y CONFIG_TRACE_CLOCK=yCONFIG_RING_BUFFER=yCONFIG_EVENT_TRACING=y CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_TRACING=yCONFIG_GENERIC_TRACER=y CONFIG_TRACING_SUPPORT=yCONFIG_FTRACE=y
# CONFIG_BOOTTIME_TRACING is not set CONFIG_FUNCTION_TRACER=y CONFIG_FUNCTION_GRAPH_TRACER=y CONFIG_DYNAMIC_FTRACE=y CONFIG_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y CONFIG_DYNAMIC_FTRACE_WITH_ARGS=y
# CONFIG_FPROBE is not set
# CONFIG_FUNCTION_PROFILER is not set
# CONFIG_STACK_TRACER is not set
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_HWLAT_TRACER is not set
# CONFIG_OSNOISE_TRACER is not set
# CONFIG_TIMERLAT_TRACER is not set
# CONFIG_MMIOTRACE is not set CONFIG_FTRACE_SYSCALLS=y
# CONFIG_TRACER_SNAPSHOT is not set CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set # CONFIG_PROFILE_ALL_BRANCHES is not set CONFIG_BLK_DEV_IO_TRACE=y CONFIG_KPROBE_EVENTS=y
# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set CONFIG_UPROBE_EVENTS=yCONFIG_BPF_EVENTS=yCONFIG_DYNAMIC_EVENTS=y CONFIG_PROBE_EVENTS=y
# CONFIG_BPF_KPROBE_OVERRIDE is not set CONFIG_FTRACE_MCOUNT_RECORD=y CONFIG_FTRACE_MCOUNT_USE_CC=y
# CONFIG_SYNTH_EVENTS is not set
# CONFIG_HIST_TRIGGERS is not set
# CONFIG_TRACE_EVENT_INJECT is not set
# CONFIG_TRACEPOINT_BENCHMARK is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_TRACE_EVAL_MAP_FILE is not set
# CONFIG_FTRACE_RECORD_RECURSION is not set CONFIG_FTRACE_SELFTEST=y CONFIG_FTRACE_STARTUP_TEST=y CONFIG_EVENT_TRACE_STARTUP_TEST=y
# CONFIG_EVENT_TRACE_TEST_SYSCALLS is not set # CONFIG_FTRACE_SORT_STARTUP_TEST is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set # CONFIG_PREEMPTIRQ_DELAY_TEST is not set
# CONFIG_KPROBE_EVENT_GEN_TEST is not set
# CONFIG_RV is not set CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
# CONFIG_SAMPLES is not set CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y CONFIG_STRICT_DEVMEM=y
# CONFIG_IO_STRICT_DEVMEM is not set
#
# x86 Debugging # CONFIG_EARLY_PRINTK_USB=y CONFIG_X86_VERBOSE_BOOTUP=y CONFIG_EARLY_PRINTK=y CONFIG_EARLY_PRINTK_DBGP=y # CONFIG_EARLY_PRINTK_USB_XDBC is not set # CONFIG_EFI_PGT_DUMP is not set # CONFIG_DEBUG_TLBFLUSH is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y # CONFIG_X86_DECODER_SELFTEST is not set CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_0XED is not set # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEBUG_BOOT_PARAMS=y # CONFIG_CPA_DEBUG is not set # CONFIG_DEBUG_ENTRY is not set # CONFIG_DEBUG_NMI_SELFTEST is not set CONFIG_X86_DEBUG_FPU=y # CONFIG_PUNIT_ATOM_DEBUG is not set CONFIG_UNWINDER_ORC=y # CONFIG_UNWINDER_FRAME_POINTER is not set # end of x86 Debugging
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not setCONFIG_FUNCTION_ERROR_INJECTION=y
# CONFIG_FAULT_INJECTION is not setCONFIG_ARCH_HAS_KCOV=yCONFIG_CC_HAS_SANCOV_TRACE_PC=y
# CONFIG_KCOV is not setCONFIG_RUNTIME_TESTING_MENU=y
# CONFIG_LKDTM is not set
# CONFIG_TEST_MIN_HEAP is not set
# CONFIG_TEST_DIV64 is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_TEST_REF_TRACKER is not set
# CONFIG_RBTREE_TEST is not set
# CONFIG_REED_SOLOMON_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
# CONFIG_PERCPU_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_TEST_HEXDUMP is not set
# CONFIG_STRING_SELFTEST is not set
# CONFIG_TEST_STRING_HELPERS is not set
# CONFIG_TEST_STRSCPY is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_TEST_PRINTF is not set
# CONFIG_TEST_SCANF is not set
# CONFIG_TEST_BITMAP is not set
# CONFIG_TEST_UUID is not set
# CONFIG_TEST_XARRAY is not set
# CONFIG_TEST_RHASHTABLE is not set
# CONFIG_TEST_SIPHASH is not set
# CONFIG_TEST_IDA is not set
# CONFIG_TEST_LKM is not set
# CONFIG_TEST_BITOPS is not set
# CONFIG_TEST_VMALLOC is not set
# CONFIG_TEST_USER_COPY is not set
# CONFIG_TEST_BPF is not set
# CONFIG_TEST_BLACKHOLE_DEV is not set
# CONFIG_FIND_BIT_BENCHMARK is not set
# CONFIG_TEST_FIRMWARE is not set
# CONFIG_TEST_SYSCTL is not set
# CONFIG_TEST_UDELAY is not set
# CONFIG_TEST_STATIC_KEYS is not set
# CONFIG_TEST_KMOD is not set
# CONFIG_TEST_MEMCAT_P is not set
# CONFIG_TEST_MEMINIT is not set
# CONFIG_TEST_FREE_PAGES is not set
# CONFIG_TEST_FPU is not set
# CONFIG_TEST_CLOCKSOURCE_WATCHDOG is not setCONFIG_ARCH_USE_MEMTEST=y
# CONFIG_MEMTEST is not set
# end of Kernel Testing and Coverage # end of Kernel hacking
Peter Zijlstra
maintainerRe: [PATCH v3 32/59] objtool: Allow STT_NOTYPE -> STT_FUNC+0 tail-calls
Quoted 28 lines · Pawan Gupta
Quoted 15 lines · Peter Zijlstra
From: Peter Zijlstra <[email protected]>
Allow
STT_NOTYPEto tail-call intoSTT_FUNC, per definitionSTT_NOTYPEis not a sub-function of theSTT_FUNC.Signed-off-by Peter Zijlstra (Intel) <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>--- tools/objtool/check.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-)tools/objtool/check.c static void add_return_call(struct objto · line 1378
Quoted 9 lines
tools/objtool/check.c +6
-0@@ -1370,6 +1370,16 @@ static void add_return_call(struct objtostatic bool same_function (struct instruction *insn1,struct instruction *insn2) { +if (!insn1->func && !insn2->func) +return true; + +/* Allow STT_NOTYPE -> STT_FUNC+0 tail-calls */ +if (!insn1->func && insn1->func != insn2->func) +return false;Looks like this check is triggering below warning:
Quoted 2 lines
vmlinux.o: warning: objtool:
ftrace_replace_code.cold+0x0: unreachable instruction
I managed to reproduce with 12.2.0 -- my 12.1.0 compiler didn't reproduce.
$ ./scripts/objdump-func vmlinux.o ftrace_replace_code 0000 00000000001032f0 <ftrace_replace_code>: 0000 1032f0: f3 0f 1e fa endbr64 0004 1032f4: 41 57 push %r15 0006 1032f6: 41 56 push %r14 0008 1032f8: 41 55 push %r13 000a 1032fa: 41 89 fd mov %edi,%r13d 000d 1032fd: 41 54 push %r12 000f 1032ff: 55 push %rbp 0010 103300: 53 push %rbx 0011 103301: 48 83 ec 10 sub $0x10,%rsp 0015 103305: 65 48 8b 04 25 28 00 00 00 mov %gs:0x28,%rax 001e 10330e: 48 89 44 24 08 mov %rax,0x8(%rsp) 0023 103313: 31 c0 xor %eax,%eax 0025 103315: e8 00 00 00 00 call 10331a <ftrace_replace_code+0x2a> 103316: R_X86_64_PLT32 ftrace_rec_iter_start-0x4 002a 10331a: 45 85 ed test %r13d,%r13d 002d 10331d: 41 0f 95 c4 setne %r12b 0031 103321: 48 85 c0 test %rax,%rax 0034 103324: 0f 84 e1 00 00 00 je 10340b <ftrace_replace_code+0x11b> 003a 10332a: 48 89 c3 mov %rax,%rbx 003d 10332d: 45 0f b6 e4 movzbl %r12b,%r12d 0041 103331: 48 c7 c5 00 00 00 00 mov $0x0,%rbp 103334: R_X86_64_32S .bss+0x16538 0048 103338: 48 89 df mov %rbx,%rdi 004b 10333b: e8 00 00 00 00 call 103340 <ftrace_replace_code+0x50> 10333c: R_X86_64_PLT32 ftrace_rec_iter_record-0x4 0050 103340: 44 89 e6 mov %r12d,%esi 0053 103343: 48 89 c7 mov %rax,%rdi 0056 103346: 49 89 c6 mov %rax,%r14 0059 103349: e8 00 00 00 00 call 10334e <ftrace_replace_code+0x5e> 10334a: R_X86_64_PLT32 ftrace_test_record-0x4 005e 10334e: 83 f8 01 cmp $0x1,%eax 0061 103351: 0f 84 61 01 00 00 je 1034b8 <ftrace_replace_code+0x1c8> 0067 103357: 83 e8 02 sub $0x2,%eax 006a 10335a: 83 f8 01 cmp $0x1,%eax 006d 10335d: 0f 87 94 00 00 00 ja 1033f7 <ftrace_replace_code+0x107> 0073 103363: 4c 89 f7 mov %r14,%rdi 0076 103366: 49 c7 c7 00 00 00 00 mov $0x0,%r15 103369: R_X86_64_32S .bss+0x16538 007d 10336d: e8 00 00 00 00 call 103372 <ftrace_replace_code+0x82> 10336e: R_X86_64_PLT32 ftrace_get_addr_curr-0x4 0082 103372: 49 8b 16 mov (%r14),%rdx 0085 103375: c6 45 00 e8 movb $0xe8,0x0(%rbp) 0089 103379: 48 83 c2 05 add $0x5,%rdx 008d 10337d: 48 29 d0 sub %rdx,%rax 0090 103380: 89 45 01 mov %eax,0x1(%rbp) 0093 103383: 49 8b 36 mov (%r14),%rsi 0096 103386: ba 05 00 00 00 mov $0x5,%edx 009b 10338b: 48 8d 7c 24 03 lea 0x3(%rsp),%rdi 00a0 103390: c7 44 24 03 00 00 00 00 movl $0x0,0x3(%rsp) 00a8 103398: c6 44 24 07 00 movb $0x0,0x7(%rsp) 00ad 10339d: e8 00 00 00 00 call 1033a2 <ftrace_replace_code+0xb2> 10339e: R_X86_64_PLT32 copy_from_kernel_nofault-0x4 00b2 1033a2: 48 85 c0 test %rax,%rax 00b5 1033a5: 0f 85 3e 01 00 00 jne 1034e9 <ftrace_replace_code+0x1f9> 00bb 1033ab: 41 8b 07 mov (%r15),%eax 00be 1033ae: 39 44 24 03 cmp %eax,0x3(%rsp) 00c2 1033b2: 74 38 je 1033ec <ftrace_replace_code+0xfc> 00c4 1033b4: 4c 89 3d 00 00 00 00 mov %r15,0x0(%rip) # 1033bb <ftrace_replace_code+0xcb> 1033b7: R_X86_64_PC32 ftrace_expected-0x4 00cb 1033bb: 0f 0b ud2 00cd 1033bd: bf ea ff ff ff mov $0xffffffea,%edi 00d2 1033c2: 48 8b 44 24 08 mov 0x8(%rsp),%rax 00d7 1033c7: 65 48 2b 04 25 28 00 00 00 sub %gs:0x28,%rax 00e0 1033d0: 0f 85 1f 01 00 00 jne 1034f5 <ftrace_replace_code+0x205> 00e6 1033d6: 48 83 c4 10 add $0x10,%rsp 00ea 1033da: 4c 89 f6 mov %r14,%rsi 00ed 1033dd: 5b pop %rbx 00ee 1033de: 5d pop %rbp 00ef 1033df: 41 5c pop %r12 00f1 1033e1: 41 5d pop %r13 00f3 1033e3: 41 5e pop %r14 00f5 1033e5: 41 5f pop %r15 00f7 1033e7: e9 00 00 00 00 jmp 1033ec <ftrace_replace_code+0xfc> 1033e8: R_X86_64_PLT32 ftrace_bug-0x4 00fc 1033ec: 41 0f b6 47 04 movzbl 0x4(%r15),%eax 0101 1033f1: 38 44 24 07 cmp %al,0x7(%rsp) 0105 1033f5: 75 bd jne 1033b4 <ftrace_replace_code+0xc4> 0107 1033f7: 48 89 df mov %rbx,%rdi 010a 1033fa: e8 00 00 00 00 call 1033ff <ftrace_replace_code+0x10f> 1033fb: R_X86_64_PLT32 ftrace_rec_iter_next-0x4 010f 1033ff: 48 89 c3 mov %rax,%rbx 0112 103402: 48 85 c0 test %rax,%rax 0115 103405: 0f 85 2d ff ff ff jne 103338 <ftrace_replace_code+0x48> 011b 10340b: e8 00 00 00 00 call 103410 <ftrace_replace_code+0x120> 10340c: R_X86_64_PLT32 ftrace_rec_iter_start-0x4 0120 103410: 45 31 e4 xor %r12d,%r12d 0123 103413: 45 85 ed test %r13d,%r13d 0126 103416: 49 c7 c5 00 00 00 00 mov $0x0,%r13 103419: R_X86_64_32S .bss+0x16538 012d 10341d: 41 0f 95 c4 setne %r12b 0131 103421: 48 89 c3 mov %rax,%rbx 0134 103424: 48 85 c0 test %rax,%rax 0137 103427: 75 1a jne 103443 <ftrace_replace_code+0x153> 0139 103429: eb 6a jmp 103495 <ftrace_replace_code+0x1a5> 013b 10342b: 85 c0 test %eax,%eax 013d 10342d: 0f 8f 91 00 00 00 jg 1034c4 <ftrace_replace_code+0x1d4> 0143 103433: 48 89 df mov %rbx,%rdi 0146 103436: e8 00 00 00 00 call 10343b <ftrace_replace_code+0x14b> 103437: R_X86_64_PLT32 ftrace_rec_iter_next-0x4 014b 10343b: 48 89 c3 mov %rax,%rbx 014e 10343e: 48 85 c0 test %rax,%rax 0151 103441: 74 52 je 103495 <ftrace_replace_code+0x1a5> 0153 103443: 48 89 df mov %rbx,%rdi 0156 103446: e8 00 00 00 00 call 10344b <ftrace_replace_code+0x15b> 103447: R_X86_64_PLT32 ftrace_rec_iter_record-0x4 015b 10344b: 44 89 e6 mov %r12d,%esi 015e 10344e: 48 89 c7 mov %rax,%rdi 0161 103451: 48 89 c5 mov %rax,%rbp 0164 103454: e8 00 00 00 00 call 103459 <ftrace_replace_code+0x169> 103455: R_X86_64_PLT32 ftrace_test_record-0x4 0169 103459: 83 f8 02 cmp $0x2,%eax 016c 10345c: 7e cd jle 10342b <ftrace_replace_code+0x13b> 016e 10345e: 83 f8 03 cmp $0x3,%eax 0171 103461: 75 d0 jne 103433 <ftrace_replace_code+0x143> 0173 103463: 48 8b 35 00 00 00 00 mov 0x0(%rip),%rsi # 10346a <ftrace_replace_code+0x17a> 103466: R_X86_64_PC32 x86_nops+0x24 017a 10346a: 48 8b 7d 00 mov 0x0(%rbp),%rdi 017e 10346e: 31 c9 xor %ecx,%ecx 0180 103470: ba 05 00 00 00 mov $0x5,%edx 0185 103475: e8 00 00 00 00 call 10347a <ftrace_replace_code+0x18a> 103476: R_X86_64_PLT32 text_poke_queue-0x4 018a 10347a: 44 89 e6 mov %r12d,%esi 018d 10347d: 48 89 ef mov %rbp,%rdi 0190 103480: e8 00 00 00 00 call 103485 <ftrace_replace_code+0x195> 103481: R_X86_64_PLT32 ftrace_update_record-0x4 0195 103485: 48 89 df mov %rbx,%rdi 0198 103488: e8 00 00 00 00 call 10348d <ftrace_replace_code+0x19d> 103489: R_X86_64_PLT32 ftrace_rec_iter_next-0x4 019d 10348d: 48 89 c3 mov %rax,%rbx 01a0 103490: 48 85 c0 test %rax,%rax 01a3 103493: 75 ae jne 103443 <ftrace_replace_code+0x153> 01a5 103495: 48 8b 44 24 08 mov 0x8(%rsp),%rax 01aa 10349a: 65 48 2b 04 25 28 00 00 00 sub %gs:0x28,%rax 01b3 1034a3: 75 50 jne 1034f5 <ftrace_replace_code+0x205> 01b5 1034a5: 48 83 c4 10 add $0x10,%rsp 01b9 1034a9: 5b pop %rbx 01ba 1034aa: 5d pop %rbp 01bb 1034ab: 41 5c pop %r12 01bd 1034ad: 41 5d pop %r13 01bf 1034af: 41 5e pop %r14 01c1 1034b1: 41 5f pop %r15 01c3 1034b3: e9 00 00 00 00 jmp 1034b8 <ftrace_replace_code+0x1c8> 1034b4: R_X86_64_PLT32 text_poke_finish-0x4 01c8 1034b8: 4c 8b 3d 00 00 00 00 mov 0x0(%rip),%r15 # 1034bf <ftrace_replace_code+0x1cf> 1034bb: R_X86_64_PC32 x86_nops+0x24 01cf 1034bf: e9 bf fe ff ff jmp 103383 <ftrace_replace_code+0x93> 01d4 1034c4: 48 89 ef mov %rbp,%rdi 01d7 1034c7: e8 00 00 00 00 call 1034cc <ftrace_replace_code+0x1dc> 1034c8: R_X86_64_PLT32 ftrace_get_addr_new-0x4 01dc 1034cc: 48 8b 55 00 mov 0x0(%rbp),%rdx 01e0 1034d0: 48 c7 c6 00 00 00 00 mov $0x0,%rsi 1034d3: R_X86_64_32S .bss+0x16538 01e7 1034d7: 41 c6 45 00 e8 movb $0xe8,0x0(%r13) 01ec 1034dc: 48 83 c2 05 add $0x5,%rdx 01f0 1034e0: 48 29 d0 sub %rdx,%rax 01f3 1034e3: 41 89 45 01 mov %eax,0x1(%r13) 01f7 1034e7: eb 81 jmp 10346a <ftrace_replace_code+0x17a> 01f9 1034e9: 0f 0b ud2 01fb 1034eb: bf f2 ff ff ff mov $0xfffffff2,%edi 0200 1034f0: e9 cd fe ff ff jmp 1033c2 <ftrace_replace_code+0xd2> 0205 1034f5: e8 00 00 00 00 call 1034fa <ftrace_replace_code+0x20a> 1034f6: R_X86_64_PLT32 __stack_chk_fail-0x4 020a 1034fa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 0210 103500: 90 nop 0211 103501: 90 nop 0212 103502: 90 nop 0213 103503: 90 nop 0214 103504: 90 nop 0215 103505: 90 nop 0216 103506: 90 nop 0217 103507: 90 nop 0218 103508: 90 nop 0219 103509: 90 nop 021a 10350a: 90 nop 021b 10350b: 90 nop 021c 10350c: 90 nop 021d 10350d: 90 nop 021e 10350e: 90 nop 021f 10350f: 90 nop 0000 0000000000012a83 <ftrace_replace_code.cold>: 0000 12a83: 48 89 de mov %rbx,%rsi 0003 12a86: 89 c7 mov %eax,%edi 0005 12a88: 5b pop %rbx 0006 12a89: 5d pop %rbp 0007 12a8a: 41 5c pop %r12 0009 12a8c: 41 5d pop %r13 000b 12a8e: 41 5e pop %r14 000d 12a90: e9 62 fd ff ff jmp 127f7 <ftrace_bug>
Seems to suggest objtool is actually right; I cannot find a reference to that cold symbol.
Peter Zijlstra
maintainerRe: [PATCH v3 32/59] objtool: Allow STT_NOTYPE -> STT_FUNC+0 tail-calls
Quoted 16 lines · Peter Zijlstra
I managed to reproduce with 12.2.0 -- my 12.1.0 compiler didn't reproduce.
$ ./scripts/objdump-func vmlinux.o ftrace_replace_code0000
0000000000012a83<ftrace_replace_code.cold>:0000 12a83: 48 89 de mov %rbx,%rsi 0003 12a86: 89 c7 mov %eax,%edi 0005 12a88: 5b pop %rbx 0006 12a89: 5d pop %rbp 0007 12a8a: 41 5c pop %r12 0009 12a8c: 41 5d pop %r13 000b 12a8e: 41 5e pop %r14 000d 12a90: e9 62 fd ff ff jmp 127f7 <ftrace_bug>
Quoted 2 lines
Seems to suggest objtool is actually right; I cannot find a reference to that cold symbol.
Ohhhh, ftrace_replace_cold is a weak function, so it could be the original weak symbol had a reference to the cold thing.
We have some code to deal with crap like that, lemme try and figure out what went wrong.
Peter Zijlstra
maintainerRe: [PATCH v3 32/59] objtool: Allow STT_NOTYPE -> STT_FUNC+0 tail-calls
Quoted 17 lines · Peter Zijlstra
Quoted 16 lines · Peter Zijlstra
I managed to reproduce with 12.2.0 -- my 12.1.0 compiler didn't reproduce.
$ ./scripts/objdump-func vmlinux.o ftrace_replace_code0000
0000000000012a83<ftrace_replace_code.cold>:0000 12a83: 48 89 de mov %rbx,%rsi 0003 12a86: 89 c7 mov %eax,%edi 0005 12a88: 5b pop %rbx 0006 12a89: 5d pop %rbp 0007 12a8a: 41 5c pop %r12 0009 12a8c: 41 5d pop %r13 000b 12a8e: 41 5e pop %r14 000d 12a90: e9 62 fd ff ff jmp 127f7 <ftrace_bug>
Quoted 8 lines
Quoted 2 lines
Seems to suggest objtool is actually right; I cannot find a reference to that cold symbol.
Ohhhh,
ftrace_replace_coldis a weak function, so it could be the original weak symbol had a reference to the cold thing.We have some code to deal with crap like that, lemme try and figure out what went wrong.
The original weak function:
$ ./scripts/objdump-func kernel/trace/ftrace.o ftrace_replace_code 0000 0000000000003bc0 <ftrace_replace_code>: 0000 3bc0: f3 0f 1e fa endbr64 0004 3bc4: 8b 15 00 00 00 00 mov 0x0(%rip),%edx # 3bca <ftrace_replace_code+0xa> 3bc6: R_X86_64_PC32 .data..read_mostly+0xc 000a 3bca: 41 56 push %r14 000c 3bcc: 41 55 push %r13 000e 3bce: 41 89 fd mov %edi,%r13d 0011 3bd1: 41 54 push %r12 0013 3bd3: 41 83 e5 02 and $0x2,%r13d 0017 3bd7: 55 push %rbp 0018 3bd8: 53 push %rbx 0019 3bd9: 85 d2 test %edx,%edx 001b 3bdb: 75 67 jne 3c44 <ftrace_replace_code+0x84> 001d 3bdd: 4c 8b 35 00 00 00 00 mov 0x0(%rip),%r14 # 3be4 <ftrace_replace_code+0x24> 3be0: R_X86_64_PC32 .bss+0x54 0024 3be4: 41 89 fc mov %edi,%r12d 0027 3be7: 41 83 e4 01 and $0x1,%r12d 002b 3beb: 4d 85 f6 test %r14,%r14 002e 3bee: 74 54 je 3c44 <ftrace_replace_code+0x84> 0030 3bf0: 41 8b 46 10 mov 0x10(%r14),%eax 0034 3bf4: 31 ed xor %ebp,%ebp 0036 3bf6: 85 c0 test %eax,%eax 0038 3bf8: 7f 0b jg 3c05 <ftrace_replace_code+0x45> 003a 3bfa: eb 40 jmp 3c3c <ftrace_replace_code+0x7c> 003c 3bfc: 83 c5 01 add $0x1,%ebp 003f 3bff: 41 39 6e 10 cmp %ebp,0x10(%r14) 0043 3c03: 7e 37 jle 3c3c <ftrace_replace_code+0x7c> 0045 3c05: 48 63 dd movslq %ebp,%rbx 0048 3c08: 48 c1 e3 04 shl $0x4,%rbx 004c 3c0c: 49 03 5e 08 add 0x8(%r14),%rbx 0050 3c10: f6 43 0b 02 testb $0x2,0xb(%rbx) 0054 3c14: 75 e6 jne 3bfc <ftrace_replace_code+0x3c> 0056 3c16: 44 89 e6 mov %r12d,%esi 0059 3c19: 48 89 df mov %rbx,%rdi 005c 3c1c: e8 3f fb ff ff call 3760 <__ftrace_replace_code> 0061 3c21: 85 c0 test %eax,%eax 0063 3c23: 0f 85 00 00 00 00 jne 3c29 <ftrace_replace_code+0x69> 3c25: R_X86_64_PC32 .text.unlikely+0x368
Jumps to the cold subfunction right here ^
0069 3c29: 45 85 ed test %r13d,%r13d 006c 3c2c: 74 ce je 3bfc <ftrace_replace_code+0x3c> 006e 3c2e: e8 00 00 00 00 call 3c33 <ftrace_replace_code+0x73> 3c2f: R_X86_64_PLT32 __SCT__cond_resched-0x4 0073 3c33: 83 c5 01 add $0x1,%ebp 0076 3c36: 41 39 6e 10 cmp %ebp,0x10(%r14) 007a 3c3a: 7f c9 jg 3c05 <ftrace_replace_code+0x45> 007c 3c3c: 4d 8b 36 mov (%r14),%r14 007f 3c3f: 4d 85 f6 test %r14,%r14 0082 3c42: 75 ac jne 3bf0 <ftrace_replace_code+0x30> 0084 3c44: 5b pop %rbx 0085 3c45: 5d pop %rbp 0086 3c46: 41 5c pop %r12 0088 3c48: 41 5d pop %r13 008a 3c4a: 41 5e pop %r14 008c 3c4c: e9 00 00 00 00 jmp 3c51 <ftrace_replace_code+0x91> 3c4d: R_X86_64_PLT32 __x86_return_thunk-0x4 0091 3c51: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 cs nopw 0x0(%rax,%rax,1) 009c 3c5c: 0f 1f 40 00 nopl 0x0(%rax) 00a0 3c60: 90 nop 00a1 3c61: 90 nop 00a2 3c62: 90 nop 00a3 3c63: 90 nop 00a4 3c64: 90 nop 00a5 3c65: 90 nop 00a6 3c66: 90 nop 00a7 3c67: 90 nop 00a8 3c68: 90 nop 00a9 3c69: 90 nop 00aa 3c6a: 90 nop 00ab 3c6b: 90 nop 00ac 3c6c: 90 nop 00ad 3c6d: 90 nop 00ae 3c6e: 90 nop 00af 3c6f: 90 nop 0000 000000000000036c <ftrace_replace_code.cold>: 0000 36c: 48 89 de mov %rbx,%rsi 0003 36f: 89 c7 mov %eax,%edi 0005 371: 5b pop %rbx 0006 372: 5d pop %rbp 0007 373: 41 5c pop %r12 0009 375: 41 5d pop %r13 000b 377: 41 5e pop %r14 000d 379: e9 62 fd ff ff jmp e0 <ftrace_bug>
And yes, you're right this patch broke it.
Because the weak function symbol gets deleted by the linker, these instructions will belong to no function and insn->func will be NULL.
Then the new: STT_NOTYPE -> STT_FUNC+0 logic kicks in and turns this into a tail-call.
That means insn->jump_dest is unset in favour of insn->call_dest, and then the unreachable logic falls on it's face because that doesn't deal with call_dest.
Ho-Humm.. let me find a non hacky solution.
Peter Zijlstra
maintainerRe: [PATCH v3 32/59] objtool: Allow STT_NOTYPE -> STT_FUNC+0 tail-calls
Quoted 1 line · Peter Zijlstra
Ho-Humm.. let me find a non hacky solution.
I've ended up here:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=call-depth-tracking&id=c2a8b8187418956af92d2d954ee4574f87f5e188
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=call-depth-tracking&id=c74976b9664fb6a1856d85ce246d84db3fd2c2cd
which is arguably quite a lot of work for something relatively minor, but I do think it leaves us in a better place.
Combo patch below..
---
tools/objtool/check.c +94 -72
@@ -62,12 +62,12 @@ static struct instruction *next_insn_sam struct instruction *insn) {struct instruction *next =list_next_entry (insn, list); -struct symbol *func = insn->func; +struct symbol *func =insn_func (insn);if (!func)return NULL ; -if (&next->list != &file->insn_list && next->func == func) +if (&next->list != &file->insn_list &&insn_func (next) == func)return next;/* Check if we're already in the subfunction: */
@@ -83,7 +83,7 @@ static struct instruction *prev_insn_sam {struct instruction *prev =list_prev_entry (insn, list); -if (&prev->list != &file->insn_list && prev->func == insn->func) +if (&prev->list != &file->insn_list &&insn_func (prev) ==insn_func (insn))return prev;return NULL ;
@@ -129,16 +129,13 @@ static bool is_jump_table_jump(struct instatic bool is_sibling_call (struct instruction *insn) {/* -* Assume only ELF functions can make sibling calls. This ensures -* sibling call detection consistency between vmlinux.o and individual -* objects. +* Assume only STT_FUNC calls have jump-tables. */ -if (!insn->func) -return false; - -/* An indirect jump is either a sibling call or a jump to a table. */ -if (insn->type ==INSN_JUMP_DYNAMIC ) -return !is_jump_table_jump (insn); +if (insn_func (insn)) { +/* An indirect jump is either a sibling call or a jump to a table. */ +if (insn->type ==INSN_JUMP_DYNAMIC ) +return !is_jump_table_jump (insn); + }/* add_jump_destinations() sets insn->call_dest for sibling calls. */ return (is_static_jump (insn) && insn->call_dest);
@@ -207,7 +204,7 @@ static bool __dead_end_function(struct oreturn false; insn =find_insn (file, func->sec, func->offset); -if (!insn->func) +if (!insn_func (insn))return false;func_for_each_insn (file, func, insn) {
@@ -243,7 +240,7 @@ static bool __dead_end_function(struct oreturn false; } -return __dead_end_function (file, dest->func, recursion+1 ); +return __dead_end_function (file,insn_func (dest), recursion+1 ); } }
@@ -427,7 +424,7 @@ static int decode_instructions(struct ob }list_for_each_entry (func, &sec->symbol_list, list) { -if (func->type !=STT_FUNC || func->alias != func) +if (func->return_thunk || func->alias != func)continue ;if (!find_insn (file, sec, func->offset)) {
@@ -437,9 +434,11 @@ static int decode_instructions(struct ob }sym_for_each_insn (file, func, insn) { - insn->func = func; -if (insn->type ==INSN_ENDBR &&list_empty (&insn->call_node)) { -if (insn->offset == insn->func->offset) { + insn->sym = func; +if (func->type ==STT_FUNC && + insn->type ==INSN_ENDBR && +list_empty (&insn->call_node)) { +if (insn->offset == func->offset) {list_add_tail (&insn->call_node, &file->endbr_list); file->nr_endbr++; }else {
@@ -1372,21 +1371,18 @@ static void add_return_call(struct objtolist_add_tail (&insn->call_node, &file->return_thunk_list); } -static bool same_function (struct instruction *insn1,struct instruction *insn2) -{ -return insn1->func->pfunc == insn2->func->pfunc; -} - -static bool is_first_func_insn (struct objtool_file *file,struct instruction *insn) +static bool is_first_func_insn (struct objtool_file *file, +struct instruction *insn,struct symbol *sym) { -if (insn->offset == insn->func->offset) +if (insn->offset == sym->offset)return true; +/* Allow direct CALL/JMP past ENDBR */ if (opts.ibt) {struct instruction *prev =prev_insn_same_sym (file, insn);if (prev && prev->type ==INSN_ENDBR && - insn->offset == insn->func->offset + prev->len) + insn->offset == sym->offset + prev->len)return true; }
@@ -1394,6 +1390,32 @@ static bool is_first_func_insn(struct ob }/* +* A sibling call is a tail-call to another symbol -- to differentiate from a +* recursive tail-call which is to the same symbol. +*/ +static bool jump_is_sibling_call (struct objtool_file *file, +struct instruction *from,struct instruction *to) +{ +struct symbol *fs = from->sym; +struct symbol *ts = to->sym; + +/* Not a sibling call if from/to a symbol hole */ +if (!fs || !ts) +return false; + +/* Not a sibling call if not targeting the start of a symbol. */ +if (!is_first_func_insn (file, to, ts)) +return false; + +/* Disallow sibling calls into STT_NOTYPE */ +if (ts->type ==STT_NOTYPE ) +return false; + +/* Must not be self to be a sibling */ +return fs->pfunc != ts->pfunc; +} + +/* * Find the destination instructions for all jumps. */ static int add_jump_destinations (struct objtool_file *file)
@@ -1427,7 +1449,7 @@ static int add_jump_destinations(struct }else if (reloc->sym->return_thunk) {add_return_call (file, insn, true);continue ; - }else if (insn->func) { + }else if (insn_func (insn)) {/* * External sibling call or internal sibling call with * STT_FUNC reloc.
@@ -1469,8 +1491,8 @@ static int add_jump_destinations(struct/* * Cross-function jump. */ -if (insn->func && jump_dest->func && - insn->func != jump_dest->func) { +if (insn_func (insn) &&insn_func (jump_dest) && +insn_func (insn) !=insn_func (jump_dest)) {/* * For GCC 8+, create parent/child links for any cold
@@ -1487,22 +1509,22 @@ static int add_jump_destinations(struct* case where the parent function's only reference to a * subfunction is through a jump table. */ -if (!strstr (insn->func->name,".cold" ) && -strstr (jump_dest->func->name,".cold" )) { - insn->func->cfunc = jump_dest->func; - jump_dest->func->pfunc = insn->func; - - }else if (!same_function (insn, jump_dest) && -is_first_func_insn (file, jump_dest)) { -/* -* Internal sibling call without reloc or with -* STT_SECTION reloc. -*/ -add_call_dest (file, insn, jump_dest->func, true); -continue ; +if (!strstr (insn_func (insn)->name,".cold" ) && +strstr (insn_func (jump_dest)->name,".cold" )) { +insn_func (insn)->cfunc =insn_func (jump_dest); +insn_func (jump_dest)->pfunc =insn_func (insn); } } +if (jump_is_sibling_call (file, insn, jump_dest)) { +/* +* Internal sibling call without reloc or with +* STT_SECTION reloc. +*/ +add_call_dest (file, insn,insn_func (jump_dest), true); +continue ; + } + insn->jump_dest = jump_dest; }
@@ -1549,7 +1571,7 @@ static int add_call_destinations(structreturn -1 ; } -if (insn->func && insn->call_dest->type !=STT_FUNC ) { +if (insn_func (insn) && insn->call_dest->type !=STT_FUNC ) {WARN_FUNC ("unsupported call to non-function" , insn->sec, insn->offset);return -1 ;
@@ -1645,7 +1667,7 @@ static int handle_group_alt(struct objto nop->offset = special_alt->new_off + special_alt->new_len; nop->len = special_alt->orig_len - special_alt->new_len; nop->type =INSN_NOP ; - nop->func = orig_insn->func; + nop->sym = orig_insn->sym; nop->alt_group = new_alt_group; nop->ignore = orig_insn->ignore_alts; }
@@ -1665,7 +1687,7 @@ static int handle_group_alt(struct objto last_new_insn = insn; insn->ignore = orig_insn->ignore_alts; - insn->func = orig_insn->func; + insn->sym = orig_insn->sym; insn->alt_group = new_alt_group;/*
@@ -1859,7 +1881,7 @@ static int add_jump_table(struct objtoolstruct reloc *reloc = table;struct instruction *dest_insn;struct alternative *alt; -struct symbol *pfunc = insn->func->pfunc; +struct symbol *pfunc =insn_func (insn)->pfunc;unsigned int prev_offset =0 ;/*
@@ -1886,7 +1908,7 @@ static int add_jump_table(struct objtoolbreak ;/* Make sure the destination is in the same function: */ -if (!dest_insn->func || dest_insn->func->pfunc != pfunc) +if (!insn_func (dest_insn) ||insn_func (dest_insn)->pfunc != pfunc)break ; alt =malloc (sizeof (*alt));
@@ -1926,7 +1948,7 @@ static struct reloc *find_jump_table(str* it. */ for (; - insn && insn->func && insn->func->pfunc == func; + insn &&insn_func (insn) &&insn_func (insn)->pfunc == func; insn = insn->first_jump_src ?:prev_insn_same_sym (file, insn)) {if (insn != orig_insn && insn->type ==INSN_JUMP_DYNAMIC )
@@ -1943,7 +1965,7 @@ static struct reloc *find_jump_table(strif (!table_reloc)continue ; dest_insn =find_insn (file, table_reloc->sym->sec, table_reloc->addend); -if (!dest_insn || !dest_insn->func || dest_insn->func->pfunc != func) +if (!dest_insn || !insn_func (dest_insn) ||insn_func (dest_insn)->pfunc != func)continue ;return table_reloc;
@@ -2395,6 +2417,13 @@ static int decode_sections(struct objtooif (ret)return ret; +/* +* Must be before add_{jump_call}_destination. +*/ + ret =classify_symbols (file); +if (ret) +return ret; + ret =decode_instructions (file);if (ret)return ret;
@@ -2414,13 +2443,6 @@ static int decode_sections(struct objtooreturn ret;/* -* Must be before add_{jump_call}_destination. -*/ - ret =classify_symbols (file); -if (ret) -return ret; - -/* * Must be before add_jump_destinations(), which depends on 'func' * being set for alternatives, to enable proper sibling call detection. */
@@ -2628,7 +2650,7 @@ static int update_cfi_state(struct instr/* stack operations don't make sense with an undefined CFA */ if (cfa->base ==CFI_UNDEFINED ) { -if (insn->func) { +if (insn_func (insn)) {WARN_FUNC ("undefined stack state" , insn->sec, insn->offset);return -1 ; }
@@ -2974,7 +2996,7 @@ static int update_cfi_state(struct instr }/* detect when asm code uses rbp as a scratch register */ -if (opts.stackval && insn->func && op->src.reg ==CFI_BP && +if (opts.stackval &&insn_func (insn) && op->src.reg ==CFI_BP && cfa->base !=CFI_BP ) cfi->bp_scratch = true;break ;
@@ -3284,7 +3306,7 @@ static int validate_sibling_call(struct struct instruction *insn, struct insn_state *state) { - if (has_modified_stack_frame(insn, state)) { + if (insn_func(insn) && has_modified_stack_frame(insn, state)) { WARN_FUNC("sibling call from callable instruction with modified stack frame", insn->sec, insn->offset);return 1 ;
@@ -3370,9 +3392,9 @@ static int validate_branch(struct objtoowhile (1 ) { next_insn =next_insn_to_validate (file, insn); -if (func && insn->func && func != insn->func->pfunc) { +if (func &&insn_func (insn) && func !=insn_func (insn)->pfunc) {WARN ("%s() falls through to next function %s()" , - func->name, insn->func->name); + func->name,insn_func (insn)->name);return 1 ; }
@@ -3614,7 +3636,7 @@ static int validate_unwind_hints(structwhile (&insn->list != &file->insn_list && (!sec || insn->sec == sec)) {if (insn->hint && !insn->visited && !insn->ignore) { - ret =validate_branch (file, insn->func, insn, state); + ret =validate_branch (file,insn_func (insn), insn, state);if (ret && opts.backtrace)BT_FUNC ("<=== (hint)" , insn); warnings += ret;
@@ -3837,7 +3859,7 @@ static bool ignore_unreachable_insn(stru* In this case we'll find a piece of code (whole function) that is not * covered by a !section symbol. Ignore them. */ -if (opts.link && !insn->func) { +if (opts.link && !insn_func (insn)) {int size =find_symbol_hole_containing (insn->sec, insn->offset);unsigned long end = insn->offset + size;
@@ -3861,10 +3883,10 @@ static bool ignore_unreachable_insn(stru/* * If this hole jumps to a .cold function, mark it ignore too. */ -if (insn->jump_dest && insn->jump_dest->func && -strstr (insn->jump_dest->func->name,".cold" )) { +if (insn->jump_dest &&insn_func (insn->jump_dest) && +strstr (insn_func (insn->jump_dest)->name,".cold" )) {struct instruction *dest = insn->jump_dest; -func_for_each_insn (file, dest->func, dest) +func_for_each_insn (file,insn_func (dest), dest) dest->ignore = true; } }
@@ -3872,10 +3894,10 @@ static bool ignore_unreachable_insn(strureturn false; } -if (!insn->func) +if (!insn_func (insn))return false; -if (insn->func->static_call_tramp) +if (insn_func (insn)->static_call_tramp)return true;/*
@@ -3906,7 +3928,7 @@ static bool ignore_unreachable_insn(struif (insn->type ==INSN_JUMP_UNCONDITIONAL ) {if (insn->jump_dest && - insn->jump_dest->func == insn->func) { +insn_func (insn->jump_dest) ==insn_func (insn)) { insn = insn->jump_dest;continue ; }
@@ -3914,7 +3936,7 @@ static bool ignore_unreachable_insn(strubreak ; } -if (insn->offset + insn->len >= insn->func->offset + insn->func->len) +if (insn->offset + insn->len >=insn_func (insn)->offset +insn_func (insn)->len)break ; insn =list_next_entry (insn, list);
@@ -3943,7 +3965,7 @@ static int validate_symbol(struct objtoo state->uaccess = sym->uaccess_safe; - ret =validate_branch (file, insn->func, insn, *state); + ret =validate_branch (file,insn_func (insn), insn, *state);if (ret && opts.backtrace)BT_FUNC ("<=== (sym)" , insn);return ret;
@@ -4080,7 +4102,7 @@ static int validate_ibt_insn(struct objtcontinue ; } -if (dest->func && dest->func == insn->func) { +if (insn_func (dest) &&insn_func (dest) ==insn_func (insn)) {/* * Anything from->to self is either _THIS_IP_ or * IRET-to-self.
tools/objtool/include/objtool/check.h +11 -1
@@ -67,11 +67,21 @@ struct instruction {struct reloc *jump_table;struct reloc *reloc;struct list_head alts; -struct symbol *func; +struct symbol *sym;struct list_head stack_ops;struct cfi_state *cfi; }; +static inline struct symbol *insn_func (struct instruction *insn) +{ +struct symbol *sym = insn->sym; + +if (sym && sym->type !=STT_FUNC ) + sym =NULL ; + +return sym; +} +#define VISITED_BRANCH 0x01#define VISITED_BRANCH_UACCESS 0x02#define VISITED_BRANCH_MASK 0x03
Pawan Gupta
reviewerRe: [PATCH v3 32/59] objtool: Allow STT_NOTYPE -> STT_FUNC+0 tail-calls
Quoted 6 lines · Peter Zijlstra
Quoted 1 line · Peter Zijlstra
Ho-Humm.. let me find a non hacky solution.
I've ended up here:
Quoted 7 lines
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=call-depth-tracking&id=c2a8b8187418956af92d2d954ee4574f87f5e188
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=call-depth-tracking&id=c74976b9664fb6a1856d85ce246d84db3fd2c2cdwhich is arguably quite a lot of work for something relatively minor, but I do think it leaves us in a better place.
Combo patch below..
Confirming that the patch fixes the warning. Thanks.
Peter Zijlstra
maintainerPATCH v3 33/59 objtool: Fix find_{symbol,func}_containing()
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
The current find_{symbol,func}_containing() functions are broken in the face of overlapping symbols, exactly the case that is needed for a new ibt/endbr supression.
Import interval_tree_generic.h into the tools tree and convert the symbol tree to an interval tree to support proper range stabs.
--- tools/include/linux/interval_tree_generic.h | 187 ++++++++++++++++++++++++++++ tools/objtool/elf.c | 93 +++++-------- tools/objtool/include/objtool/elf.h | 3 3 files changed, 229 insertions(+), 54 deletions(-)
tools/include/linux/interval_tree_generic.h new file +187 -0
@@ -0,0 +1,187 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +Interval Trees +(C) 2012 Michel Lespinasse <[email protected]> + + +include/linux/interval_tree_generic.h +*/ + +#include <linux/rbtree_augmented.h> + +/* +* Template for implementing interval trees +* +* ITSTRUCT: struct type of the interval tree nodes +* ITRB: name of struct rb_node field within ITSTRUCT +* ITTYPE: type of the interval endpoints +* ITSUBTREE: name of ITTYPE field within ITSTRUCT holding last-in-subtree +* ITSTART(n): start endpoint of ITSTRUCT node n +* ITLAST(n): last endpoint of ITSTRUCT node n +* ITSTATIC: 'static' or empty +* ITPREFIX: prefix to use for the inline tree definitions +* +* Note - before using this, please consider if generic version +* (interval_tree.h) would work for you... +*/ + +#define INTERVAL_TREE_DEFINE (ITSTRUCT ,ITRB ,ITTYPE ,ITSUBTREE , \ +ITSTART ,ITLAST ,ITSTATIC ,ITPREFIX ) \ + \ +/* Callbacks for augmented rbtree insert and remove */ \ + \ +RB_DECLARE_CALLBACKS_MAX(static, ITPREFIX ## _augment, \ + ITSTRUCT, ITRB, ITTYPE, ITSUBTREE, ITLAST) \ + \ +/* Insert / remove interval nodes from the tree */ \ + \ +ITSTATIC void ITPREFIX ## _insert(ITSTRUCT *node, \ +struct rb_root_cached *root) \ +{ \ +struct rb_node **link = &root->rb_root.rb_node, *rb_parent =NULL ; \ +ITTYPE start =ITSTART (node), last =ITLAST (node); \ +ITSTRUCT *parent; \ +bool leftmost = true; \ + \ +while (*link) { \ + rb_parent = *link; \ + parent =rb_entry (rb_parent,ITSTRUCT ,ITRB ); \ +if (parent->ITSUBTREE < last) \ + parent->ITSUBTREE = last; \ +if (start <ITSTART (parent)) \ + link = &parent->ITRB.rb_left; \ +else { \ + link = &parent->ITRB.rb_right; \ + leftmost = false; \ + } \ + } \ + \ + node->ITSUBTREE = last; \ +rb_link_node (&node->ITRB, rb_parent, link); \ +rb_insert_augmented_cached (&node->ITRB, root, \ + leftmost, &ITPREFIX ## _augment); \ +} \ + \ +ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node, \ +struct rb_root_cached *root) \ +{ \ + rb_erase_augmented_cached(&node->ITRB, root, &ITPREFIX ## _augment); \ +} \ + \ +/* \ +* Iterate over intervals intersecting [start;last] \ +* \ +* Note that a node's interval intersects [start;last] iff: \ +* Cond1: ITSTART(node) <= last \ +* and \ +* Cond2: start <= ITLAST(node) \ +*/ \ + \ +static ITSTRUCT * \ +ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last) \ +{ \ +while (true) { \ +/* \ +* Loop invariant: start <= node->ITSUBTREE \ +* (Cond2 is satisfied by one of the subtree nodes) \ +*/ \ +if (node->ITRB.rb_left) { \ +ITSTRUCT *left =rb_entry (node->ITRB.rb_left, \ +ITSTRUCT ,ITRB ); \ +if (start <= left->ITSUBTREE) { \ +/* \ +* Some nodes in left subtree satisfy Cond2. \ +* Iterate to find the leftmost such node N. \ +* If it also satisfies Cond1, that's the \ +* match we are looking for. Otherwise, there \ +* is no matching interval as nodes to the \ +* right of N can't satisfy Cond1 either. \ +*/ \ + node = left; \ +continue ; \ + } \ + } \ +if (ITSTART (node) <= last) {/* Cond1 */ \ +if (start <=ITLAST (node))/* Cond2 */ \ +return node;/* node is leftmost match */ \ +if (node->ITRB.rb_right) { \ + node =rb_entry (node->ITRB.rb_right, \ +ITSTRUCT ,ITRB ); \ +if (start <= node->ITSUBTREE) \ +continue ; \ + } \ + } \ +return NULL ;/* No match */ \ + } \ +} \ + \ +ITSTATIC ITSTRUCT * \ +ITPREFIX ## _iter_first(struct rb_root_cached *root, \ +ITTYPE start,ITTYPE last) \ +{ \ +ITSTRUCT *node, *leftmost; \ + \ +if (!root->rb_root.rb_node) \ +return NULL ; \ + \ +/* \ +* Fastpath range intersection/overlap between A: [a0, a1] and \ +* B: [b0, b1] is given by: \ +* \ +* a0 <= b1 && b0 <= a1 \ +* \ +* ... where A holds the lock range and B holds the smallest \ +* 'start' and largest 'last' in the tree. For the later, we \ +* rely on the root node, which by augmented interval tree \ +* property, holds the largest value in its last-in-subtree. \ +* This allows mitigating some of the tree walk overhead for \ +* for non-intersecting ranges, maintained and consulted in O(1). \ +*/ \ + node =rb_entry (root->rb_root.rb_node,ITSTRUCT ,ITRB ); \ +if (node->ITSUBTREE < start) \ +return NULL ; \ + \ + leftmost =rb_entry (root->rb_leftmost,ITSTRUCT ,ITRB ); \ +if (ITSTART (leftmost) > last) \ +return NULL ; \ + \ + return ITPREFIX ## _subtree_search(node, start, last); \ +} \ + \ +ITSTATIC ITSTRUCT * \ +ITPREFIX ## _iter_next(ITSTRUCT *node, ITTYPE start, ITTYPE last) \ +{ \ +struct rb_node *rb = node->ITRB.rb_right, *prev; \ + \ +while (true) { \ +/* \ +* Loop invariants: \ +* Cond1: ITSTART(node) <= last \ +* rb == node->ITRB.rb_right \ +* \ +* First, search right subtree if suitable \ +*/ \ +if (rb) { \ +ITSTRUCT *right =rb_entry (rb,ITSTRUCT ,ITRB ); \ +if (start <= right->ITSUBTREE) \ + return ITPREFIX ## _subtree_search(right, \ + start, last); \ + } \ + \ +/* Move up the tree until we come from a node's left child */ \ +do { \ + rb =rb_parent (&node->ITRB); \ +if (!rb) \ +return NULL ; \ + prev = &node->ITRB; \ + node =rb_entry (rb,ITSTRUCT ,ITRB ); \ + rb = node->ITRB.rb_right; \ + }while (prev == rb); \ + \ +/* Check if the node intersects [start;last] */ \ +if (last <ITSTART (node))/* !Cond1 */ \ +return NULL ; \ +else if (start <=ITLAST (node))/* Cond2 */ \ +return node; \ + } \ +}
tools/objtool/elf.c +40 -53
163 lines not on this page · raw message
tools/objtool/include/objtool/elf.h +2 -1
@@ -30,7 +30,7 @@ struct section {struct hlist_node hash;struct hlist_node name_hash;GElf_Shdr sh; -struct rb_root symbol_tree; +struct rb_root_cached symbol_tree;struct list_head symbol_list;struct list_head reloc_list;struct section *base, *reloc;
@@ -53,6 +53,7 @@ struct symbol {unsigned char bind, type;unsigned long offset;unsigned int len; +unsigned long __subtree_last;struct symbol *pfunc, *cfunc, *alias; u8 uaccess_safe : 1; u8 static_call_tramp : 1;
[tip: x86/core] objtool: Fix find_{symbol,func}_containing()
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 5da6aea375cde499fdfac3cde4f26df4a840eb9f Gitweb: https://git.kernel.org/tip/5da6aea375cde499fdfac3cde4f26df4a840eb9f Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:12 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:08 +02:00
objtool: Fix find_{symbol,func}_containing()
The current find_{symbol,func}_containing() functions are broken in the face of overlapping symbols, exactly the case that is needed for a new ibt/endbr supression.
Import interval_tree_generic.h into the tools tree and convert the symbol tree to an interval tree to support proper range stabs.
--- tools/include/linux/interval_tree_generic.h | 187 +++++++++++++++++++- tools/objtool/elf.c | 93 +++------ tools/objtool/include/objtool/elf.h | 3 +- 3 files changed, 229 insertions(+), 54 deletions(-) create mode 100644 tools/include/linux/interval_tree_generic.h
tools/include/linux/interval_tree_generic.h new file +187 -0
@@ -0,0 +1,187 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +Interval Trees +(C) 2012 Michel Lespinasse <[email protected]> + + +include/linux/interval_tree_generic.h +*/ + +#include <linux/rbtree_augmented.h> + +/* +* Template for implementing interval trees +* +* ITSTRUCT: struct type of the interval tree nodes +* ITRB: name of struct rb_node field within ITSTRUCT +* ITTYPE: type of the interval endpoints +* ITSUBTREE: name of ITTYPE field within ITSTRUCT holding last-in-subtree +* ITSTART(n): start endpoint of ITSTRUCT node n +* ITLAST(n): last endpoint of ITSTRUCT node n +* ITSTATIC: 'static' or empty +* ITPREFIX: prefix to use for the inline tree definitions +* +* Note - before using this, please consider if generic version +* (interval_tree.h) would work for you... +*/ + +#define INTERVAL_TREE_DEFINE (ITSTRUCT ,ITRB ,ITTYPE ,ITSUBTREE , \ +ITSTART ,ITLAST ,ITSTATIC ,ITPREFIX ) \ + \ +/* Callbacks for augmented rbtree insert and remove */ \ + \ +RB_DECLARE_CALLBACKS_MAX(static, ITPREFIX ## _augment, \ + ITSTRUCT, ITRB, ITTYPE, ITSUBTREE, ITLAST) \ + \ +/* Insert / remove interval nodes from the tree */ \ + \ +ITSTATIC void ITPREFIX ## _insert(ITSTRUCT *node, \ +struct rb_root_cached *root) \ +{ \ +struct rb_node **link = &root->rb_root.rb_node, *rb_parent =NULL ; \ +ITTYPE start =ITSTART (node), last =ITLAST (node); \ +ITSTRUCT *parent; \ +bool leftmost = true; \ + \ +while (*link) { \ + rb_parent = *link; \ + parent =rb_entry (rb_parent,ITSTRUCT ,ITRB ); \ +if (parent->ITSUBTREE < last) \ + parent->ITSUBTREE = last; \ +if (start <ITSTART (parent)) \ + link = &parent->ITRB.rb_left; \ +else { \ + link = &parent->ITRB.rb_right; \ + leftmost = false; \ + } \ + } \ + \ + node->ITSUBTREE = last; \ +rb_link_node (&node->ITRB, rb_parent, link); \ +rb_insert_augmented_cached (&node->ITRB, root, \ + leftmost, &ITPREFIX ## _augment); \ +} \ + \ +ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node, \ +struct rb_root_cached *root) \ +{ \ + rb_erase_augmented_cached(&node->ITRB, root, &ITPREFIX ## _augment); \ +} \ + \ +/* \ +* Iterate over intervals intersecting [start;last] \ +* \ +* Note that a node's interval intersects [start;last] iff: \ +* Cond1: ITSTART(node) <= last \ +* and \ +* Cond2: start <= ITLAST(node) \ +*/ \ + \ +static ITSTRUCT * \ +ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last) \ +{ \ +while (true) { \ +/* \ +* Loop invariant: start <= node->ITSUBTREE \ +* (Cond2 is satisfied by one of the subtree nodes) \ +*/ \ +if (node->ITRB.rb_left) { \ +ITSTRUCT *left =rb_entry (node->ITRB.rb_left, \ +ITSTRUCT ,ITRB ); \ +if (start <= left->ITSUBTREE) { \ +/* \ +* Some nodes in left subtree satisfy Cond2. \ +* Iterate to find the leftmost such node N. \ +* If it also satisfies Cond1, that's the \ +* match we are looking for. Otherwise, there \ +* is no matching interval as nodes to the \ +* right of N can't satisfy Cond1 either. \ +*/ \ + node = left; \ +continue ; \ + } \ + } \ +if (ITSTART (node) <= last) {/* Cond1 */ \ +if (start <=ITLAST (node))/* Cond2 */ \ +return node;/* node is leftmost match */ \ +if (node->ITRB.rb_right) { \ + node =rb_entry (node->ITRB.rb_right, \ +ITSTRUCT ,ITRB ); \ +if (start <= node->ITSUBTREE) \ +continue ; \ + } \ + } \ +return NULL ;/* No match */ \ + } \ +} \ + \ +ITSTATIC ITSTRUCT * \ +ITPREFIX ## _iter_first(struct rb_root_cached *root, \ +ITTYPE start,ITTYPE last) \ +{ \ +ITSTRUCT *node, *leftmost; \ + \ +if (!root->rb_root.rb_node) \ +return NULL ; \ + \ +/* \ +* Fastpath range intersection/overlap between A: [a0, a1] and \ +* B: [b0, b1] is given by: \ +* \ +* a0 <= b1 && b0 <= a1 \ +* \ +* ... where A holds the lock range and B holds the smallest \ +* 'start' and largest 'last' in the tree. For the later, we \ +* rely on the root node, which by augmented interval tree \ +* property, holds the largest value in its last-in-subtree. \ +* This allows mitigating some of the tree walk overhead for \ +* for non-intersecting ranges, maintained and consulted in O(1). \ +*/ \ + node =rb_entry (root->rb_root.rb_node,ITSTRUCT ,ITRB ); \ +if (node->ITSUBTREE < start) \ +return NULL ; \ + \ + leftmost =rb_entry (root->rb_leftmost,ITSTRUCT ,ITRB ); \ +if (ITSTART (leftmost) > last) \ +return NULL ; \ + \ + return ITPREFIX ## _subtree_search(node, start, last); \ +} \ + \ +ITSTATIC ITSTRUCT * \ +ITPREFIX ## _iter_next(ITSTRUCT *node, ITTYPE start, ITTYPE last) \ +{ \ +struct rb_node *rb = node->ITRB.rb_right, *prev; \ + \ +while (true) { \ +/* \ +* Loop invariants: \ +* Cond1: ITSTART(node) <= last \ +* rb == node->ITRB.rb_right \ +* \ +* First, search right subtree if suitable \ +*/ \ +if (rb) { \ +ITSTRUCT *right =rb_entry (rb,ITSTRUCT ,ITRB ); \ +if (start <= right->ITSUBTREE) \ + return ITPREFIX ## _subtree_search(right, \ + start, last); \ + } \ + \ +/* Move up the tree until we come from a node's left child */ \ +do { \ + rb =rb_parent (&node->ITRB); \ +if (!rb) \ +return NULL ; \ + prev = &node->ITRB; \ + node =rb_entry (rb,ITSTRUCT ,ITRB ); \ + rb = node->ITRB.rb_right; \ + }while (prev == rb); \ + \ +/* Check if the node intersects [start;last] */ \ +if (last <ITSTART (node))/* !Cond1 */ \ +return NULL ; \ +else if (start <=ITLAST (node))/* Cond2 */ \ +return node; \ + } \ +}
tools/objtool/elf.c +40 -53
163 lines not on this page · raw message
tools/objtool/include/objtool/elf.h +2 -1
@@ -30,7 +30,7 @@ struct section {struct hlist_node hash;struct hlist_node name_hash;GElf_Shdr sh; -struct rb_root symbol_tree; +struct rb_root_cached symbol_tree;struct list_head symbol_list;struct list_head reloc_list;struct section *base, *reloc;
@@ -53,6 +53,7 @@ struct symbol {unsigned char bind, type;unsigned long offset;unsigned int len; +unsigned long __subtree_last;struct symbol *pfunc, *cfunc, *alias; u8 uaccess_safe : 1; u8 static_call_tramp : 1;
Peter Zijlstra
maintainerPATCH v3 34/59 objtool: Allow symbol range comparisons for IBT/ENDBR
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
A semi common pattern is where code checks if a code address is within a specific range. All text addresses require either ENDBR or ANNOTATE_ENDBR, however the ANNOTATE_NOENDBR past the range is unnatural.
Instead, suppress this warning when this is exactly at the end of a symbol that itself starts with either ENDBR/ANNOTATE_ENDBR.
--- arch/x86/entry/entry_64_compat.S | 1 - tools/objtool/check.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-)
arch/x86/entry/entry_64_compat.S +0 -1
@@ -128,7 +128,6 @@ SYM_INNER_LABEL(entry_SYSENTER_compat_af popfq jmp .Lsysenter_flags_fixed SYM_INNER_LABEL(__end_entry_SYSENTER_compat, SYM_L_GLOBAL) - ANNOTATE_NOENDBR // is_sysenter_singlestep SYM_CODE_END(entry_SYSENTER_compat) /*
tools/objtool/check.c +28 -0
@@ -4016,6 +4016,24 @@ static void mark_endbr_used(struct instrlist_del_init (&insn->call_node); } +static bool noendbr_range (struct objtool_file *file,struct instruction *insn) +{ +struct symbol *sym =find_symbol_containing (insn->sec, insn->offset-1 ); +struct instruction *first; + +if (!sym) +return false; + + first =find_insn (file, sym->sec, sym->offset); +if (!first) +return false; + +if (first->type !=INSN_ENDBR && !first->noendbr) +return false; + +return insn->offset == sym->offset + sym->len; +} +static int validate_ibt_insn (struct objtool_file *file,struct instruction *insn) {struct instruction *dest;
@@ -4088,9 +4106,19 @@ static int validate_ibt_insn(struct objtcontinue ; } +/* +* Accept anything ANNOTATE_NOENDBR. +*/ if (dest->noendbr)continue ; +/* +* Accept if this is the instruction after a symbol +* that is (no)endbr -- typical code-range usage. +*/ +if (noendbr_range (file, dest)) +continue ; +WARN_FUNC ("relocation to !ENDBR: %s" , insn->sec, insn->offset,offstr (dest->sec, dest->offset));
[tip: x86/core] objtool: Allow symbol range comparisons for IBT/ENDBR
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 08ef8c40112b8cd157515cd532f65cb82c934a76 Gitweb: https://git.kernel.org/tip/08ef8c40112b8cd157515cd532f65cb82c934a76 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:13 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:08 +02:00
objtool: Allow symbol range comparisons for IBT/ENDBR
A semi common pattern is where code checks if a code address is within a specific range. All text addresses require either ENDBR or ANNOTATE_ENDBR, however the ANNOTATE_NOENDBR past the range is unnatural.
Instead, suppress this warning when this is exactly at the end of a symbol that itself starts with either ENDBR/ANNOTATE_ENDBR.
--- arch/x86/entry/entry_64_compat.S | 1 - tools/objtool/check.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-)
arch/x86/entry/entry_64_compat.S +0 -1
@@ -128,7 +128,6 @@ SYM_INNER_LABEL(entry_SYSENTER_compat_after_hwframe, SYM_L_GLOBAL) popfq jmp .Lsysenter_flags_fixed SYM_INNER_LABEL(__end_entry_SYSENTER_compat, SYM_L_GLOBAL) - ANNOTATE_NOENDBR // is_sysenter_singlestep SYM_CODE_END(entry_SYSENTER_compat) /*
tools/objtool/check.c +28 -0
@@ -4033,6 +4033,24 @@ static void mark_endbr_used(struct instruction *insn)list_del_init (&insn->call_node); } +static bool noendbr_range (struct objtool_file *file,struct instruction *insn) +{ +struct symbol *sym =find_symbol_containing (insn->sec, insn->offset-1 ); +struct instruction *first; + +if (!sym) +return false; + + first =find_insn (file, sym->sec, sym->offset); +if (!first) +return false; + +if (first->type !=INSN_ENDBR && !first->noendbr) +return false; + +return insn->offset == sym->offset + sym->len; +} +static int validate_ibt_insn (struct objtool_file *file,struct instruction *insn) {struct instruction *dest;
@@ -4105,9 +4123,19 @@ static int validate_ibt_insn(struct objtool_file *file, struct instruction *insncontinue ; } +/* +* Accept anything ANNOTATE_NOENDBR. +*/ if (dest->noendbr)continue ; +/* +* Accept if this is the instruction after a symbol +* that is (no)endbr -- typical code-range usage. +*/ +if (noendbr_range (file, dest)) +continue ; +WARN_FUNC ("relocation to !ENDBR: %s" , insn->sec, insn->offset,offstr (dest->sec, dest->offset));
Peter Zijlstra
maintainerPATCH v3 35/59 x86/entry: Make sync_regs() invocation a tail call
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
No point in having a call there. Spare the call/ret overhead.
--- arch/x86/entry/entry_64.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
arch/x86/entry/entry_64.S +2 -5
@@ -1062,11 +1062,8 @@ SYM_CODE_START_LOCAL(error_entry) UNTRAIN_RET leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */ -.Lerror_entry_from_usermode_after_swapgs: - /* Put us onto the real thread stack. */ - call sync_regs - RET + jmp sync_regs /* * There are two places in the kernel that can potentially fault with
@@ -1124,7 +1121,7 @@ SYM_CODE_START_LOCAL(error_entry) leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */ call fixup_bad_iret mov %rax, %rdi - jmp .Lerror_entry_from_usermode_after_swapgs + jmp sync_regs SYM_CODE_END(error_entry) SYM_CODE_START_LOCAL(error_return)
[tip: x86/core] x86/entry: Make sync_regs() invocation a tail call
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: ef79ed20e3ae9ee9ac2e0f3a4e12814893972e63 Gitweb: https://git.kernel.org/tip/ef79ed20e3ae9ee9ac2e0f3a4e12814893972e63 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:14 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:09 +02:00
x86/entry: Make sync_regs() invocation a tail call
No point in having a call there. Spare the call/ret overhead.
--- arch/x86/entry/entry_64.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
arch/x86/entry/entry_64.S +2 -5
@@ -1062,11 +1062,8 @@ SYM_CODE_START_LOCAL(error_entry) UNTRAIN_RET leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */ -.Lerror_entry_from_usermode_after_swapgs: - /* Put us onto the real thread stack. */ - call sync_regs - RET + jmp sync_regs /* * There are two places in the kernel that can potentially fault with
@@ -1124,7 +1121,7 @@ SYM_CODE_START_LOCAL(error_entry) leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */ call fixup_bad_iret mov %rax, %rdi - jmp .Lerror_entry_from_usermode_after_swapgs + jmp sync_regs SYM_CODE_END(error_entry) SYM_CODE_START_LOCAL(error_return)
Peter Zijlstra
maintainerPATCH v3 36/59 ftrace: Add HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
x86 will shortly start using -fpatchable-function-entry for purposes other than ftrace, make sure the __patchable_function_entry section isn't merged in the mcount_loc section.
--- include/asm-generic/vmlinux.lds.h | 11 ++++++++++- kernel/trace/Kconfig | 6 ++++++ tools/objtool/check.c | 3 ++- 3 files changed, 18 insertions(+), 2 deletions(-)
include/asm-generic/vmlinux.lds.h +10 -1
@@ -159,6 +159,14 @@#define MEM_DISCARD (sec) *(.mem##sec)#endif +#ifndef CONFIG_HAVE_DYNAMIC_FTRACE_NO_PATCHABLE +#define KEEP_PATCHABLE KEEP(*(__patchable_function_entries)) +#define PATCHABLE_DISCARDS +#else +#define KEEP_PATCHABLE +#define PATCHABLE_DISCARDS *(__patchable_function_entries) +#endif +#ifdef CONFIG_FTRACE_MCOUNT_RECORD /* * The ftrace call sites are logged to a section whose name depends on the
@@ -177,7 +185,7 @@#define MCOUNT_REC () . = ALIGN(8); \ __start_mcount_loc = .; \ KEEP(*(__mcount_loc)) \ - KEEP(*(__patchable_function_entries)) \ + KEEP_PATCHABLE \ __stop_mcount_loc = .; \ ftrace_stub_graph = ftrace_stub; \ ftrace_ops_list_func = arch_ftrace_ops_list_func;
@@ -1029,6 +1037,7 @@#define COMMON_DISCARDS \ SANITIZER_DISCARDS \ + PATCHABLE_DISCARDS \ *(.discard) \ *(.discard.*) \ *(.modinfo) \
kernel/trace/Kconfig +6 -0
@@ -51,6 +51,12 @@ config HAVE_DYNAMIC_FTRACE_WITH_ARGS This allows for use of regs_get_kernel_argument() and kernel_stack_pointer(). +config HAVE_DYNAMIC_FTRACE_NO_PATCHABLE + bool + help + If the architecture generates __patchable_function_entries sections + but does not want them included in the ftrace locations. + config HAVE_FTRACE_MCOUNT_RECORD bool help
tools/objtool/check.c +2 -1
@@ -4196,7 +4196,8 @@ static int validate_ibt(struct objtool_f !strcmp (sec->name,"__bug_table" ) || !strcmp (sec->name,"__ex_table" ) || !strcmp (sec->name,"__jump_table" ) || - !strcmp(sec->name, "__mcount_loc")) + !strcmp (sec->name,"__mcount_loc" ) || + strstr(sec->name, "__patchable_function_entries")) continue;list_for_each_entry (reloc, &sec->reloc->reloc_list, list)
Peter Zijlstra
maintainerPATCH v3 37/59 x86/putuser: Provide room for padding
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
--- arch/x86/lib/putuser.S | 62 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 13 deletions(-)
arch/x86/lib/putuser.S +49 -13
@@ -47,8 +47,6 @@ SYM_FUNC_START(__put_user_1) LOAD_TASK_SIZE_MINUS_N(0) cmp %_ASM_BX,%_ASM_CX jae .Lbad_put_user -SYM_INNER_LABEL(__put_user_nocheck_1, SYM_L_GLOBAL) - ENDBR ASM_STAC 1: movb %al,(%_ASM_CX) xor %ecx,%ecx
@@ -56,54 +54,87 @@ SYM_INNER_LABEL(__put_user_nocheck_1, SY RET SYM_FUNC_END(__put_user_1) EXPORT_SYMBOL(__put_user_1) + +SYM_FUNC_START(__put_user_nocheck_1) + ENDBR + ASM_STAC +2: movb %al,(%_ASM_CX) + xor %ecx,%ecx + ASM_CLAC + RET +SYM_FUNC_END(__put_user_nocheck_1) EXPORT_SYMBOL(__put_user_nocheck_1) SYM_FUNC_START(__put_user_2) LOAD_TASK_SIZE_MINUS_N(1) cmp %_ASM_BX,%_ASM_CX jae .Lbad_put_user -SYM_INNER_LABEL(__put_user_nocheck_2, SYM_L_GLOBAL) - ENDBR ASM_STAC -2: movw %ax,(%_ASM_CX) +3: movw %ax,(%_ASM_CX) xor %ecx,%ecx ASM_CLAC RET SYM_FUNC_END(__put_user_2) EXPORT_SYMBOL(__put_user_2) + +SYM_FUNC_START(__put_user_nocheck_2) + ENDBR + ASM_STAC +4: movw %ax,(%_ASM_CX) + xor %ecx,%ecx + ASM_CLAC + RET +SYM_FUNC_END(__put_user_nocheck_2) EXPORT_SYMBOL(__put_user_nocheck_2) SYM_FUNC_START(__put_user_4) LOAD_TASK_SIZE_MINUS_N(3) cmp %_ASM_BX,%_ASM_CX jae .Lbad_put_user -SYM_INNER_LABEL(__put_user_nocheck_4, SYM_L_GLOBAL) - ENDBR ASM_STAC -3: movl %eax,(%_ASM_CX) +5: movl %eax,(%_ASM_CX) xor %ecx,%ecx ASM_CLAC RET SYM_FUNC_END(__put_user_4) EXPORT_SYMBOL(__put_user_4) + +SYM_FUNC_START(__put_user_nocheck_4) + ENDBR + ASM_STAC +6: movl %eax,(%_ASM_CX) + xor %ecx,%ecx + ASM_CLAC + RET +SYM_FUNC_END(__put_user_nocheck_4) EXPORT_SYMBOL(__put_user_nocheck_4) SYM_FUNC_START(__put_user_8) LOAD_TASK_SIZE_MINUS_N(7) cmp %_ASM_BX,%_ASM_CX jae .Lbad_put_user -SYM_INNER_LABEL(__put_user_nocheck_8, SYM_L_GLOBAL) - ENDBR ASM_STAC -4: mov %_ASM_AX,(%_ASM_CX) +7: mov %_ASM_AX,(%_ASM_CX) #ifdef CONFIG_X86_32 -5: movl %edx,4(%_ASM_CX) +8: movl %edx,4(%_ASM_CX) #endif xor %ecx,%ecx ASM_CLAC RET SYM_FUNC_END(__put_user_8) EXPORT_SYMBOL(__put_user_8) + +SYM_FUNC_START(__put_user_nocheck_8) + ENDBR + ASM_STAC +9: mov %_ASM_AX,(%_ASM_CX) +#ifdef CONFIG_X86_32 +10: movl %edx,4(%_ASM_CX) +#endif + xor %ecx,%ecx + ASM_CLAC + RET +SYM_FUNC_END(__put_user_nocheck_8) EXPORT_SYMBOL(__put_user_nocheck_8) SYM_CODE_START_LOCAL(.Lbad_put_user_clac)
@@ -117,6 +148,11 @@ SYM_CODE_END(.Lbad_put_user_clac) _ASM_EXTABLE_UA(2b, .Lbad_put_user_clac) _ASM_EXTABLE_UA(3b, .Lbad_put_user_clac) _ASM_EXTABLE_UA(4b, .Lbad_put_user_clac) -#ifdef CONFIG_X86_32 _ASM_EXTABLE_UA(5b, .Lbad_put_user_clac) + _ASM_EXTABLE_UA(6b, .Lbad_put_user_clac) + _ASM_EXTABLE_UA(7b, .Lbad_put_user_clac) + _ASM_EXTABLE_UA(9b, .Lbad_put_user_clac) +#ifdef CONFIG_X86_32 + _ASM_EXTABLE_UA(8b, .Lbad_put_user_clac) + _ASM_EXTABLE_UA(10b, .Lbad_put_user_clac) #endif
[tip: x86/core] x86/putuser: Provide room for padding
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: cb855971d717a2dd752241f66fedad9dc178388c Gitweb: https://git.kernel.org/tip/cb855971d717a2dd752241f66fedad9dc178388c Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:16 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:10 +02:00
x86/putuser: Provide room for padding
--- arch/x86/lib/putuser.S | 62 ++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 13 deletions(-)
arch/x86/lib/putuser.S +49 -13
@@ -47,8 +47,6 @@ SYM_FUNC_START(__put_user_1) LOAD_TASK_SIZE_MINUS_N(0) cmp %_ASM_BX,%_ASM_CX jae .Lbad_put_user -SYM_INNER_LABEL(__put_user_nocheck_1, SYM_L_GLOBAL) - ENDBR ASM_STAC 1: movb %al,(%_ASM_CX) xor %ecx,%ecx
@@ -56,54 +54,87 @@ SYM_INNER_LABEL(__put_user_nocheck_1, SYM_L_GLOBAL) RET SYM_FUNC_END(__put_user_1) EXPORT_SYMBOL(__put_user_1) + +SYM_FUNC_START(__put_user_nocheck_1) + ENDBR + ASM_STAC +2: movb %al,(%_ASM_CX) + xor %ecx,%ecx + ASM_CLAC + RET +SYM_FUNC_END(__put_user_nocheck_1) EXPORT_SYMBOL(__put_user_nocheck_1) SYM_FUNC_START(__put_user_2) LOAD_TASK_SIZE_MINUS_N(1) cmp %_ASM_BX,%_ASM_CX jae .Lbad_put_user -SYM_INNER_LABEL(__put_user_nocheck_2, SYM_L_GLOBAL) - ENDBR ASM_STAC -2: movw %ax,(%_ASM_CX) +3: movw %ax,(%_ASM_CX) xor %ecx,%ecx ASM_CLAC RET SYM_FUNC_END(__put_user_2) EXPORT_SYMBOL(__put_user_2) + +SYM_FUNC_START(__put_user_nocheck_2) + ENDBR + ASM_STAC +4: movw %ax,(%_ASM_CX) + xor %ecx,%ecx + ASM_CLAC + RET +SYM_FUNC_END(__put_user_nocheck_2) EXPORT_SYMBOL(__put_user_nocheck_2) SYM_FUNC_START(__put_user_4) LOAD_TASK_SIZE_MINUS_N(3) cmp %_ASM_BX,%_ASM_CX jae .Lbad_put_user -SYM_INNER_LABEL(__put_user_nocheck_4, SYM_L_GLOBAL) - ENDBR ASM_STAC -3: movl %eax,(%_ASM_CX) +5: movl %eax,(%_ASM_CX) xor %ecx,%ecx ASM_CLAC RET SYM_FUNC_END(__put_user_4) EXPORT_SYMBOL(__put_user_4) + +SYM_FUNC_START(__put_user_nocheck_4) + ENDBR + ASM_STAC +6: movl %eax,(%_ASM_CX) + xor %ecx,%ecx + ASM_CLAC + RET +SYM_FUNC_END(__put_user_nocheck_4) EXPORT_SYMBOL(__put_user_nocheck_4) SYM_FUNC_START(__put_user_8) LOAD_TASK_SIZE_MINUS_N(7) cmp %_ASM_BX,%_ASM_CX jae .Lbad_put_user -SYM_INNER_LABEL(__put_user_nocheck_8, SYM_L_GLOBAL) - ENDBR ASM_STAC -4: mov %_ASM_AX,(%_ASM_CX) +7: mov %_ASM_AX,(%_ASM_CX) #ifdef CONFIG_X86_32 -5: movl %edx,4(%_ASM_CX) +8: movl %edx,4(%_ASM_CX) #endif xor %ecx,%ecx ASM_CLAC RET SYM_FUNC_END(__put_user_8) EXPORT_SYMBOL(__put_user_8) + +SYM_FUNC_START(__put_user_nocheck_8) + ENDBR + ASM_STAC +9: mov %_ASM_AX,(%_ASM_CX) +#ifdef CONFIG_X86_32 +10: movl %edx,4(%_ASM_CX) +#endif + xor %ecx,%ecx + ASM_CLAC + RET +SYM_FUNC_END(__put_user_nocheck_8) EXPORT_SYMBOL(__put_user_nocheck_8) SYM_CODE_START_LOCAL(.Lbad_put_user_clac)
@@ -117,6 +148,11 @@ SYM_CODE_END(.Lbad_put_user_clac) _ASM_EXTABLE_UA(2b, .Lbad_put_user_clac) _ASM_EXTABLE_UA(3b, .Lbad_put_user_clac) _ASM_EXTABLE_UA(4b, .Lbad_put_user_clac) -#ifdef CONFIG_X86_32 _ASM_EXTABLE_UA(5b, .Lbad_put_user_clac) + _ASM_EXTABLE_UA(6b, .Lbad_put_user_clac) + _ASM_EXTABLE_UA(7b, .Lbad_put_user_clac) + _ASM_EXTABLE_UA(9b, .Lbad_put_user_clac) +#ifdef CONFIG_X86_32 + _ASM_EXTABLE_UA(8b, .Lbad_put_user_clac) + _ASM_EXTABLE_UA(10b, .Lbad_put_user_clac) #endif
Peter Zijlstra
maintainerPATCH v3 38/59 x86/Kconfig: Add CONFIG_CALL_THUNKS
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
In preparation for mitigating the Intel SKL RSB underflow issue in software, add a new configuration symbol which allows to build the required call thunk infrastructure conditionally.
--- arch/x86/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/x86/Kconfig +8 -0
@@ -2429,6 +2429,14 @@ config CC_HAS_SLS config CC_HAS_RETURN_THUNK def_bool $(cc-option,-mfunction-return=thunk-extern) +config HAVE_CALL_THUNKS + def_bool y + depends on RETHUNK && OBJTOOL + +config CALL_THUNKS + def_bool n + select FUNCTION_ALIGNMENT_16B + menuconfig SPECULATION_MITIGATIONS bool "Mitigations for speculative execution vulnerabilities" default y
[tip: x86/core] x86/Kconfig: Add CONFIG_CALL_THUNKS
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 8f7c0d8b23c3f5f740a48db31ebadef28af17a22 Gitweb: https://git.kernel.org/tip/8f7c0d8b23c3f5f740a48db31ebadef28af17a22 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:17 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:10 +02:00
x86/Kconfig: Add CONFIG_CALL_THUNKS
In preparation for mitigating the Intel SKL RSB underflow issue in software, add a new configuration symbol which allows to build the required call thunk infrastructure conditionally.
--- arch/x86/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/x86/Kconfig +8 -0
@@ -2446,6 +2446,14 @@ config CC_HAS_SLS config CC_HAS_RETURN_THUNK def_bool $(cc-option,-mfunction-return=thunk-extern) +config HAVE_CALL_THUNKS + def_bool y + depends on RETHUNK && OBJTOOL + +config CALL_THUNKS + def_bool n + select FUNCTION_ALIGNMENT_16B + menuconfig SPECULATION_MITIGATIONS bool "Mitigations for speculative execution vulnerabilities" default y
Peter Zijlstra
maintainerPATCH v3 39/59 x86/Kconfig: Introduce function padding
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Now that all functions are 16 byte aligned, add 16 bytes of NOP padding in front of each function. This prepares things for software call stack tracking and kCFI/FineIBT.
This significantly increases kernel .text size, around 5.1% on a x86_64-defconfig-ish build.
However, per the random access argument used for alignment, these 16 extra bytes are code that wouldn't be used. Performance measurements back this up by showing no significant performance regressions.
--- arch/x86/Kconfig | 20 +++++++++++++++++++- arch/x86/Makefile | 6 ++++++ arch/x86/entry/vdso/Makefile | 3 ++- arch/x86/include/asm/linkage.h | 15 +++++++++++++-- 4 files changed, 40 insertions(+), 4 deletions(-)
arch/x86/Kconfig +19 -1
@@ -2429,9 +2429,27 @@ config CC_HAS_SLS config CC_HAS_RETURN_THUNK def_bool $(cc-option,-mfunction-return=thunk-extern) +config CC_HAS_ENTRY_PADDING + def_bool $(cc-option,-fpatchable-function-entry=16,16) + +config FUNCTION_PADDING_CFI + int + default 59 if FUNCTION_ALIGNMENT_64B + default 27 if FUNCTION_ALIGNMENT_32B + default 11 if FUNCTION_ALIGNMENT_16B + default 3 if FUNCTION_ALIGNMENT_8B + default 0 + +# Basically: FUNCTION_ALIGNMENT - 5*CFI_CLANG +# except Kconfig can't do arithmetic :/ +config FUNCTION_PADDING_BYTES + int + default FUNCTION_PADDING_CFI if CFI_CLANG + default FUNCTION_ALIGNMENT + config HAVE_CALL_THUNKS def_bool y - depends on RETHUNK && OBJTOOL + depends on CC_HAS_ENTRY_PADDING && RETHUNK && OBJTOOL config CALL_THUNKS def_bool n
arch/x86/Makefile +6 -0
@@ -198,6 +198,12 @@ ifdef CONFIG_SLS KBUILD_CFLAGS += -mharden-sls=all endif +ifdef CONFIG_CALL_THUNKS +PADDING_CFLAGS := -fpatchable-function-entry=$(CONFIG_FUNCTION_PADDING_BYTES),$(CONFIG_FUNCTION_PADDING_BYTES) +KBUILD_CFLAGS += $(PADDING_CFLAGS) +export PADDING_CFLAGS +endif + KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE) ifdef CONFIG_LTO_CLANG
arch/x86/entry/vdso/Makefile +2 -1
@@ -92,7 +92,7 @@ ifneq ($(RETPOLINE_VDSO_CFLAGS),) endif endif -$(vobjs): KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO) $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) +$(vobjs): KBUILD_CFLAGS := $(filter-out $(PADDING_CFLAGS) $(CC_FLAGS_LTO) $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) $(vobjs): KBUILD_AFLAGS += -DBUILD_VDSO #
@@ -154,6 +154,7 @@ KBUILD_CFLAGS_32 := $(filter-out $(RANDS KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(CC_FLAGS_LTO),$(KBUILD_CFLAGS_32)) +KBUILD_CFLAGS_32 := $(filter-out $(PADDING_CFLAGS),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic KBUILD_CFLAGS_32 += -fno-stack-protector KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)
arch/x86/include/asm/linkage.h +13 -2
@@ -15,8 +15,19 @@#define __ALIGN .balign CONFIG_FUNCTION_ALIGNMENT, 0x90;#define __ALIGN_STR __stringify(__ALIGN) -#define ASM_FUNC_ALIGN __ALIGN_STR -#define __FUNC_ALIGN __ALIGN +#if defined(CONFIG_CALL_THUNKS ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO ) +#define FUNCTION_PADDING .skip CONFIG_FUNCTION_ALIGNMENT, 0x90; +#else +#define FUNCTION_PADDING +#endif + +#if (CONFIG_FUNCTION_ALIGNMENT >8 ) && !defined(__DISABLE_EXPORTS) && !defined(BULID_VDSO ) +# define __FUNC_ALIGN __ALIGN; FUNCTION_PADDING +#else +# define __FUNC_ALIGN __ALIGN +#endif + +#define ASM_FUNC_ALIGN __stringify(__FUNC_ALIGN)#define SYM_F_ALIGN __FUNC_ALIGN#ifdef __ASSEMBLY__
[tip: x86/core] x86/Kconfig: Introduce function padding
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: bea75b33895f7f87f0c40023e36a2d087e87ffa1 Gitweb: https://git.kernel.org/tip/bea75b33895f7f87f0c40023e36a2d087e87ffa1 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:18 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:10 +02:00
x86/Kconfig: Introduce function padding
Now that all functions are 16 byte aligned, add 16 bytes of NOP padding in front of each function. This prepares things for software call stack tracking and kCFI/FineIBT.
This significantly increases kernel .text size, around 5.1% on a x86_64-defconfig-ish build.
However, per the random access argument used for alignment, these 16 extra bytes are code that wouldn't be used. Performance measurements back this up by showing no significant performance regressions.
--- arch/x86/Kconfig | 20 ++++++++++++- arch/x86/Makefile | 6 ++++- arch/x86/entry/vdso/Makefile | 3 +- arch/x86/include/asm/linkage.h | 51 +++++++++++++++++++++++++++++++-- include/linux/bpf.h | 4 +++- 5 files changed, 79 insertions(+), 5 deletions(-)
arch/x86/Kconfig +19 -1
@@ -2446,9 +2446,27 @@ config CC_HAS_SLS config CC_HAS_RETURN_THUNK def_bool $(cc-option,-mfunction-return=thunk-extern) +config CC_HAS_ENTRY_PADDING + def_bool $(cc-option,-fpatchable-function-entry=16,16) + +config FUNCTION_PADDING_CFI + int + default 59 if FUNCTION_ALIGNMENT_64B + default 27 if FUNCTION_ALIGNMENT_32B + default 11 if FUNCTION_ALIGNMENT_16B + default 3 if FUNCTION_ALIGNMENT_8B + default 0 + +# Basically: FUNCTION_ALIGNMENT - 5*CFI_CLANG +# except Kconfig can't do arithmetic :/ +config FUNCTION_PADDING_BYTES + int + default FUNCTION_PADDING_CFI if CFI_CLANG + default FUNCTION_ALIGNMENT + config HAVE_CALL_THUNKS def_bool y - depends on RETHUNK && OBJTOOL + depends on CC_HAS_ENTRY_PADDING && RETHUNK && OBJTOOL config CALL_THUNKS def_bool n
arch/x86/Makefile +6 -0
@@ -208,6 +208,12 @@ ifdef CONFIG_SLS KBUILD_CFLAGS += -mharden-sls=all endif +ifdef CONFIG_CALL_THUNKS +PADDING_CFLAGS := -fpatchable-function-entry=$(CONFIG_FUNCTION_PADDING_BYTES),$(CONFIG_FUNCTION_PADDING_BYTES) +KBUILD_CFLAGS += $(PADDING_CFLAGS) +export PADDING_CFLAGS +endif + KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE) ifdef CONFIG_LTO_CLANG
arch/x86/entry/vdso/Makefile +2 -1
@@ -95,7 +95,7 @@ ifneq ($(RETPOLINE_VDSO_CFLAGS),) endif endif -$(vobjs): KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO) $(CC_FLAGS_CFI) $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) +$(vobjs): KBUILD_CFLAGS := $(filter-out $(PADDING_CFLAGS) $(CC_FLAGS_LTO) $(CC_FLAGS_CFI) $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) $(vobjs): KBUILD_AFLAGS += -DBUILD_VDSO #
@@ -158,6 +158,7 @@ KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(CC_FLAGS_LTO),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(CC_FLAGS_CFI),$(KBUILD_CFLAGS_32)) +KBUILD_CFLAGS_32 := $(filter-out $(PADDING_CFLAGS),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic KBUILD_CFLAGS_32 += -fno-stack-protector KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)
arch/x86/include/asm/linkage.h +48 -3
67 lines not on this page · raw message
include/linux/bpf.h +4 -0
@@ -984,7 +984,11 @@ int arch_prepare_bpf_dispatcher(void *image, void *buf, s64 *funcs, int num_func }#ifdef CONFIG_X86_64 +#ifdef CONFIG_CALL_THUNKS +#define BPF_DISPATCHER_ATTRIBUTES __attribute__((patchable_function_entry(5+CONFIG_FUNCTION_PADDING_BYTES,CONFIG_FUNCTION_PADDING_BYTES))) +#else #define BPF_DISPATCHER_ATTRIBUTES __attribute__((patchable_function_entry(5))) +#endif #else #define BPF_DISPATCHER_ATTRIBUTES #endif
Peter Zijlstra
maintainerPATCH v3 40/59 x86/retbleed: Add X86_FEATURE_CALL_DEPTH
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Intel SKL CPUs fall back to other predictors when the RSB underflows. The only microcode mitigation is IBRS which is insanely expensive. It comes with performance drops of up to 30% depending on the workload.
A way less expensive, but nevertheless horrible mitigation is to track the call depth in software and overeagerly fill the RSB when returns underflow the software counter.
Provide a configuration symbol and a CPU misfeature bit.
--- arch/x86/Kconfig | 19 +++++++++++++++++++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/disabled-features.h | 9 ++++++++- 3 files changed, 28 insertions(+), 1 deletion(-)
arch/x86/Kconfig +19 -0
@@ -2501,6 +2501,25 @@ config CPU_UNRET_ENTRY help Compile the kernel with support for the retbleed=unret mitigation. +config CALL_DEPTH_TRACKING + bool "Mitigate RSB underflow with call depth tracking" + depends on CPU_SUP_INTEL && HAVE_CALL_THUNKS + select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE + select CALL_THUNKS + default y + help + Compile the kernel with call depth tracking to mitigate the Intel + SKL Return-Speculation-Buffer (RSB) underflow issue. The + mitigation is off by default and needs to be enabled on the + kernel command line via the retbleed=stuff option. For + non-affected systems the overhead of this option is marginal as + the call depth tracking is using run-time generated call thunks + in a compiler generated padding area and call patching. This + increases text size by ~5%. For non affected systems this space + is unused. On affected SKL systems this results in a significant + performance gain over the IBRS mitigation. + + config CPU_IBPB_ENTRY bool "Enable IBPB on kernel entry" depends on CPU_SUP_AMD && X86_64
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -304,6 +304,7 @@#define X86_FEATURE_UNRET (11*32+15)/* "" AMD BTB untrain return */ #define X86_FEATURE_USE_IBPB_FW (11*32+16)/* "" Use IBPB during runtime firmware calls */ #define X86_FEATURE_RSB_VMEXIT_LITE (11*32+17)/* "" Fill RSB on VM exit when EIBRS is enabled */ +#define X86_FEATURE_CALL_DEPTH (11*32+18)/* "" Call depth tracking for RSB stuffing */ /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */ #define X86_FEATURE_AVX_VNNI (12*32+ 4)/* AVX VNNI instructions */
arch/x86/include/asm/disabled-features.h +8 -1
@@ -69,6 +69,12 @@# define DISABLE_UNRET (1 << (X86_FEATURE_UNRET & 31))#endif +#ifdef CONFIG_CALL_DEPTH_TRACKING +# define DISABLE_CALL_DEPTH_TRACKING 0 +#else +# define DISABLE_CALL_DEPTH_TRACKING (1 << (X86_FEATURE_CALL_DEPTH & 31)) +#endif +#ifdef CONFIG_INTEL_IOMMU_SVM # define DISABLE_ENQCMD 0#else
@@ -101,7 +107,8 @@#define DISABLED_MASK8 (DISABLE_TDX_GUEST)#define DISABLED_MASK9 (DISABLE_SGX)#define DISABLED_MASK10 0 -#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET) +#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ + DISABLE_CALL_DEPTH_TRACKING)#define DISABLED_MASK12 0#define DISABLED_MASK13 0#define DISABLED_MASK14 0
[tip: x86/core] x86/retbleed: Add X86_FEATURE_CALL_DEPTH
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 80e4c1cd42fff110bfdae8fce7ac4f22465f9664 Gitweb: https://git.kernel.org/tip/80e4c1cd42fff110bfdae8fce7ac4f22465f9664 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:19 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:11 +02:00
x86/retbleed: Add X86_FEATURE_CALL_DEPTH
Intel SKL CPUs fall back to other predictors when the RSB underflows. The only microcode mitigation is IBRS which is insanely expensive. It comes with performance drops of up to 30% depending on the workload.
A way less expensive, but nevertheless horrible mitigation is to track the call depth in software and overeagerly fill the RSB when returns underflow the software counter.
Provide a configuration symbol and a CPU misfeature bit.
--- arch/x86/Kconfig | 19 +++++++++++++++++++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/disabled-features.h | 9 ++++++++- 3 files changed, 28 insertions(+), 1 deletion(-)
arch/x86/Kconfig +19 -0
@@ -2523,6 +2523,25 @@ config CPU_UNRET_ENTRY help Compile the kernel with support for the retbleed=unret mitigation. +config CALL_DEPTH_TRACKING + bool "Mitigate RSB underflow with call depth tracking" + depends on CPU_SUP_INTEL && HAVE_CALL_THUNKS + select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE + select CALL_THUNKS + default y + help + Compile the kernel with call depth tracking to mitigate the Intel + SKL Return-Speculation-Buffer (RSB) underflow issue. The + mitigation is off by default and needs to be enabled on the + kernel command line via the retbleed=stuff option. For + non-affected systems the overhead of this option is marginal as + the call depth tracking is using run-time generated call thunks + in a compiler generated padding area and call patching. This + increases text size by ~5%. For non affected systems this space + is unused. On affected SKL systems this results in a significant + performance gain over the IBRS mitigation. + + config CPU_IBPB_ENTRY bool "Enable IBPB on kernel entry" depends on CPU_SUP_AMD && X86_64
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -304,6 +304,7 @@#define X86_FEATURE_UNRET (11*32+15)/* "" AMD BTB untrain return */ #define X86_FEATURE_USE_IBPB_FW (11*32+16)/* "" Use IBPB during runtime firmware calls */ #define X86_FEATURE_RSB_VMEXIT_LITE (11*32+17)/* "" Fill RSB on VM exit when EIBRS is enabled */ +#define X86_FEATURE_CALL_DEPTH (11*32+18)/* "" Call depth tracking for RSB stuffing */ /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */ #define X86_FEATURE_AVX_VNNI (12*32+ 4)/* AVX VNNI instructions */
arch/x86/include/asm/disabled-features.h +8 -1
@@ -69,6 +69,12 @@# define DISABLE_UNRET (1 << (X86_FEATURE_UNRET & 31))#endif +#ifdef CONFIG_CALL_DEPTH_TRACKING +# define DISABLE_CALL_DEPTH_TRACKING 0 +#else +# define DISABLE_CALL_DEPTH_TRACKING (1 << (X86_FEATURE_CALL_DEPTH & 31)) +#endif +#ifdef CONFIG_INTEL_IOMMU_SVM # define DISABLE_ENQCMD 0#else
@@ -101,7 +107,8 @@#define DISABLED_MASK8 (DISABLE_TDX_GUEST)#define DISABLED_MASK9 (DISABLE_SGX)#define DISABLED_MASK10 0 -#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET) +#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ + DISABLE_CALL_DEPTH_TRACKING)#define DISABLED_MASK12 0#define DISABLED_MASK13 0#define DISABLED_MASK14 0
Peter Zijlstra
maintainerPATCH v3 41/59 x86/alternatives: Provide text_poke_copy_locked()
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
The upcoming call thunk patching must hold text_mutex and needs access to text_poke_copy(), which takes text_mutex.
Provide a _locked postfixed variant to expose the inner workings.
--- arch/x86/include/asm/text-patching.h | 1 arch/x86/kernel/alternative.c | 37 ++++++++++++++++++++--------------- 2 files changed, 23 insertions(+), 15 deletions(-)
arch/x86/include/asm/text-patching.h +1 -0
@@ -45,6 +45,7 @@ extern void *text_poke(void *addr, constextern void text_poke_sync (void );extern void *text_poke_kgdb (void *addr,const void *opcode,size_t len);extern void *text_poke_copy (void *addr,const void *opcode,size_t len); +extern void *text_poke_copy_locked (void *addr,const void *opcode,size_t len,bool core_ok);extern void *text_poke_set (void *addr,int c,size_t len);extern int poke_int3_handler (struct pt_regs *regs);extern void text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate);
arch/x86/kernel/alternative.c +22 -15
@@ -1227,27 +1227,15 @@ void *text_poke_kgdb(void *addr, const vreturn __text_poke (text_poke_memcpy, addr, opcode, len); } -/** -* text_poke_copy - Copy instructions into (an unused part of) RX memory -* @addr: address to modify -* @opcode: source of the copy -* @len: length to copy, could be more than 2x PAGE_SIZE -* -* Not safe against concurrent execution; useful for JITs to dump -* new code blocks into unused regions of RX memory. Can be used in -* conjunction with synchronize_rcu_tasks() to wait for existing -* execution to quiesce after having made sure no existing functions -* pointers are live. -*/ -void *text_poke_copy (void *addr,const void *opcode,size_t len) +void *text_poke_copy_locked (void *addr,const void *opcode,size_t len, +bool core_ok) {unsigned long start = (unsigned long )addr;size_t patched =0 ; -if (WARN_ON_ONCE (core_kernel_text (start))) +if (WARN_ON_ONCE (!core_ok &&core_kernel_text (start)))return NULL ; -mutex_lock (&text_mutex);while (patched < len) {unsigned long ptr = start + patched;size_t s;
@@ -1257,6 +1245,25 @@ void *text_poke_copy(void *addr, const v__text_poke (text_poke_memcpy, (void *)ptr, opcode + patched, s); patched += s; } +return addr; +} + +/** +* text_poke_copy - Copy instructions into (an unused part of) RX memory +* @addr: address to modify +* @opcode: source of the copy +* @len: length to copy, could be more than 2x PAGE_SIZE +* +* Not safe against concurrent execution; useful for JITs to dump +* new code blocks into unused regions of RX memory. Can be used in +* conjunction with synchronize_rcu_tasks() to wait for existing +* execution to quiesce after having made sure no existing functions +* pointers are live. +*/ +void *text_poke_copy (void *addr,const void *opcode,size_t len) +{ +mutex_lock (&text_mutex); + addr =text_poke_copy_locked (addr, opcode, len, false);mutex_unlock (&text_mutex);return addr; }
[tip: x86/core] x86/alternatives: Provide text_poke_copy_locked()
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: fe54d0793796ccdb213d8ea7bff0b49903b6afaa Gitweb: https://git.kernel.org/tip/fe54d0793796ccdb213d8ea7bff0b49903b6afaa Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:20 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:11 +02:00
x86/alternatives: Provide text_poke_copy_locked()
The upcoming call thunk patching must hold text_mutex and needs access to text_poke_copy(), which takes text_mutex.
Provide a _locked postfixed variant to expose the inner workings.
--- arch/x86/include/asm/text-patching.h | 1 +- arch/x86/kernel/alternative.c | 37 ++++++++++++++++----------- 2 files changed, 23 insertions(+), 15 deletions(-)
arch/x86/include/asm/text-patching.h +1 -0
@@ -45,6 +45,7 @@ extern void *text_poke(void *addr, const void *opcode, size_t len);extern void text_poke_sync (void );extern void *text_poke_kgdb (void *addr,const void *opcode,size_t len);extern void *text_poke_copy (void *addr,const void *opcode,size_t len); +extern void *text_poke_copy_locked (void *addr,const void *opcode,size_t len,bool core_ok);extern void *text_poke_set (void *addr,int c,size_t len);extern int poke_int3_handler (struct pt_regs *regs);extern void text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate);
arch/x86/kernel/alternative.c +22 -15
@@ -1236,27 +1236,15 @@ void *text_poke_kgdb(void *addr, const void *opcode, size_t len)return __text_poke (text_poke_memcpy, addr, opcode, len); } -/** -* text_poke_copy - Copy instructions into (an unused part of) RX memory -* @addr: address to modify -* @opcode: source of the copy -* @len: length to copy, could be more than 2x PAGE_SIZE -* -* Not safe against concurrent execution; useful for JITs to dump -* new code blocks into unused regions of RX memory. Can be used in -* conjunction with synchronize_rcu_tasks() to wait for existing -* execution to quiesce after having made sure no existing functions -* pointers are live. -*/ -void *text_poke_copy (void *addr,const void *opcode,size_t len) +void *text_poke_copy_locked (void *addr,const void *opcode,size_t len, +bool core_ok) {unsigned long start = (unsigned long )addr;size_t patched =0 ; -if (WARN_ON_ONCE (core_kernel_text (start))) +if (WARN_ON_ONCE (!core_ok &&core_kernel_text (start)))return NULL ; -mutex_lock (&text_mutex);while (patched < len) {unsigned long ptr = start + patched;size_t s;
@@ -1266,6 +1254,25 @@ void *text_poke_copy(void *addr, const void *opcode, size_t len)__text_poke (text_poke_memcpy, (void *)ptr, opcode + patched, s); patched += s; } +return addr; +} + +/** +* text_poke_copy - Copy instructions into (an unused part of) RX memory +* @addr: address to modify +* @opcode: source of the copy +* @len: length to copy, could be more than 2x PAGE_SIZE +* +* Not safe against concurrent execution; useful for JITs to dump +* new code blocks into unused regions of RX memory. Can be used in +* conjunction with synchronize_rcu_tasks() to wait for existing +* execution to quiesce after having made sure no existing functions +* pointers are live. +*/ +void *text_poke_copy (void *addr,const void *opcode,size_t len) +{ +mutex_lock (&text_mutex); + addr =text_poke_copy_locked (addr, opcode, len, false);mutex_unlock (&text_mutex);return addr; }
Peter Zijlstra
maintainerPATCH v3 42/59 x86/entry: Make some entry symbols global
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
paranoid_entry(), error_entry() and xen_error_entry() have to be exempted from call accounting by thunk patching because they are before UNTRAIN_RET.
Expose them so they are available in the alternative code.
--- arch/x86/entry/entry_64.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
arch/x86/entry/entry_64.S +6 -3
@@ -327,7 +327,8 @@ SYM_CODE_END(ret_from_fork) #endif .endm -SYM_CODE_START_LOCAL(xen_error_entry) +SYM_CODE_START(xen_error_entry) + ANNOTATE_NOENDBR UNWIND_HINT_FUNC PUSH_AND_CLEAR_REGS save_ret=1 ENCODE_FRAME_POINTER 8
@@ -906,7 +907,8 @@ SYM_CODE_END(xen_failsafe_callback) * R14 - old CR3 * R15 - old SPEC_CTRL */ -SYM_CODE_START_LOCAL(paranoid_entry) +SYM_CODE_START(paranoid_entry) + ANNOTATE_NOENDBR UNWIND_HINT_FUNC PUSH_AND_CLEAR_REGS save_ret=1 ENCODE_FRAME_POINTER 8
@@ -1041,7 +1043,8 @@ SYM_CODE_END(paranoid_exit) /* * Switch GS and CR3 if needed. */ -SYM_CODE_START_LOCAL(error_entry) +SYM_CODE_START(error_entry) + ANNOTATE_NOENDBR UNWIND_HINT_FUNC PUSH_AND_CLEAR_REGS save_ret=1
[tip: x86/core] x86/entry: Make some entry symbols global
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: c22cf380c79c4bb0e502b0343f57271b17626424 Gitweb: https://git.kernel.org/tip/c22cf380c79c4bb0e502b0343f57271b17626424 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:21 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:12 +02:00
x86/entry: Make some entry symbols global
paranoid_entry(), error_entry() and xen_error_entry() have to be exempted from call accounting by thunk patching because they are before UNTRAIN_RET.
Expose them so they are available in the alternative code.
--- arch/x86/entry/entry_64.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
arch/x86/entry/entry_64.S +6 -3
@@ -327,7 +327,8 @@ SYM_CODE_END(ret_from_fork) #endif .endm -SYM_CODE_START_LOCAL(xen_error_entry) +SYM_CODE_START(xen_error_entry) + ANNOTATE_NOENDBR UNWIND_HINT_FUNC PUSH_AND_CLEAR_REGS save_ret=1 ENCODE_FRAME_POINTER 8
@@ -906,7 +907,8 @@ SYM_CODE_END(xen_failsafe_callback) * R14 - old CR3 * R15 - old SPEC_CTRL */ -SYM_CODE_START_LOCAL(paranoid_entry) +SYM_CODE_START(paranoid_entry) + ANNOTATE_NOENDBR UNWIND_HINT_FUNC PUSH_AND_CLEAR_REGS save_ret=1 ENCODE_FRAME_POINTER 8
@@ -1041,7 +1043,8 @@ SYM_CODE_END(paranoid_exit) /* * Switch GS and CR3 if needed. */ -SYM_CODE_START_LOCAL(error_entry) +SYM_CODE_START(error_entry) + ANNOTATE_NOENDBR UNWIND_HINT_FUNC PUSH_AND_CLEAR_REGS save_ret=1
Peter Zijlstra
maintainerPATCH v3 43/59 x86/paravirt: Make struct paravirt_call_site unconditionally available
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
For the upcoming call thunk patching it's less ifdeffery when the data structure is unconditionally available. The code can then be trivially fenced off with IS_ENABLED().
--- arch/x86/include/asm/paravirt.h | 4 ++-- arch/x86/include/asm/paravirt_types.h | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-)
arch/x86/include/asm/paravirt.h +2 -2
@@ -4,13 +4,13 @@/* Various instructions on x86 need to be replaced for * para-virtualization: those hooks are defined here. */ +#include <asm/paravirt_types.h> +#ifdef CONFIG_PARAVIRT #include <asm/pgtable_types.h> #include <asm/asm.h> #include <asm/nospec-branch.h> -#include <asm/paravirt_types.h> -#ifndef __ASSEMBLY__#include <linux/bug.h> #include <linux/types.h>
arch/x86/include/asm/paravirt_types.h +12 -8
@@ -2,6 +2,17 @@#ifndef _ASM_X86_PARAVIRT_TYPES_H#define _ASM_X86_PARAVIRT_TYPES_H +#ifndef __ASSEMBLY__ +/* These all sit in the .parainstructions section to tell us what to patch. */ +struct paravirt_patch_site { +u8 *instr;/* original instructions */ +u8 type;/* type of this instruction */ +u8 len;/* length of original instruction */ +}; +#endif + +#ifdef CONFIG_PARAVIRT +/* Bitmask of what can be clobbered: usually at least eax. */ #define CLBR_EAX (1 << 0)#define CLBR_ECX (1 << 1)
@@ -584,16 +595,9 @@ unsigned long paravirt_ret0(void);#define paravirt_nop ((void *)_paravirt_nop) -/* These all sit in the .parainstructions section to tell us what to patch. */ -struct paravirt_patch_site { -u8 *instr;/* original instructions */ -u8 type;/* type of this instruction */ -u8 len;/* length of original instruction */ -}; -extern struct paravirt_patch_site __parainstructions[], __parainstructions_end[];#endif /* __ASSEMBLY__ */ - +#endif /* CONFIG_PARAVIRT */ #endif /* _ASM_X86_PARAVIRT_TYPES_H */
[tip: x86/core] x86/paravirt: Make struct paravirt_call_site unconditionally available
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 239f2e248ef12840178a3ed1a217f19b5fbfde26 Gitweb: https://git.kernel.org/tip/239f2e248ef12840178a3ed1a217f19b5fbfde26 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:22 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:12 +02:00
x86/paravirt: Make struct paravirt_call_site unconditionally available
For the upcoming call thunk patching it's less ifdeffery when the data structure is unconditionally available. The code can then be trivially fenced off with IS_ENABLED().
--- arch/x86/include/asm/paravirt.h | 4 ++-- arch/x86/include/asm/paravirt_types.h | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-)
arch/x86/include/asm/paravirt.h +2 -2
@@ -4,13 +4,13 @@/* Various instructions on x86 need to be replaced for * para-virtualization: those hooks are defined here. */ +#include <asm/paravirt_types.h> +#ifdef CONFIG_PARAVIRT #include <asm/pgtable_types.h> #include <asm/asm.h> #include <asm/nospec-branch.h> -#include <asm/paravirt_types.h> -#ifndef __ASSEMBLY__#include <linux/bug.h> #include <linux/types.h>
arch/x86/include/asm/paravirt_types.h +12 -8
@@ -2,6 +2,17 @@#ifndef _ASM_X86_PARAVIRT_TYPES_H#define _ASM_X86_PARAVIRT_TYPES_H +#ifndef __ASSEMBLY__ +/* These all sit in the .parainstructions section to tell us what to patch. */ +struct paravirt_patch_site { +u8 *instr;/* original instructions */ +u8 type;/* type of this instruction */ +u8 len;/* length of original instruction */ +}; +#endif + +#ifdef CONFIG_PARAVIRT +/* Bitmask of what can be clobbered: usually at least eax. */ #define CLBR_EAX (1 << 0)#define CLBR_ECX (1 << 1)
@@ -593,16 +604,9 @@ unsigned long paravirt_ret0(void);#define paravirt_nop ((void *)_paravirt_nop) -/* These all sit in the .parainstructions section to tell us what to patch. */ -struct paravirt_patch_site { -u8 *instr;/* original instructions */ -u8 type;/* type of this instruction */ -u8 len;/* length of original instruction */ -}; -extern struct paravirt_patch_site __parainstructions[], __parainstructions_end[];#endif /* __ASSEMBLY__ */ - +#endif /* CONFIG_PARAVIRT */ #endif /* _ASM_X86_PARAVIRT_TYPES_H */
Peter Zijlstra
maintainerPATCH v3 44/59 x86/callthunks: Add call patching for call depth tracking
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
Mitigating the Intel SKL RSB underflow issue in software requires to track the call depth. That is every CALL and every RET need to be intercepted and additional code injected.
The existing retbleed mitigations already include means of redirecting RET to __x86_return_thunk; this can be re-purposed and RET can be redirected to another function doing RET accounting.
CALL accounting will use the function padding introduced in prior patches. For each CALL instruction, the destination symbol's padding is rewritten to do the accounting and the CALL instruction is adjusted to call into the padding.
This ensures only affected CPUs pay the overhead of this accounting. Unaffected CPUs will leave the padding unused and have their 'JMP __x86_return_thunk' replaced with an actual 'RET' instruction.
Objtool has been modified to supply a .call_sites section that lists all the 'CALL' instructions. Additionally the paravirt instruction sites are iterated since they will have been patched from an indirect call to direct calls (or direct instructions in which case it'll be ignored).
Module handling and the actual thunk code for SKL will be added in subsequent steps.
--- arch/x86/Kconfig | 12 + arch/x86/include/asm/alternative.h | 12 + arch/x86/kernel/Makefile | 2 arch/x86/kernel/alternative.c | 6 arch/x86/kernel/callthunks.c | 251 +++++++++++++++++++++++++++++++++++ arch/x86/kernel/head_64.S | 1 arch/x86/kernel/relocate_kernel_64.S | 5 arch/x86/kernel/vmlinux.lds.S | 8 - 8 files changed, 287 insertions(+), 10 deletions(-)
arch/x86/Kconfig +12 -0
@@ -2524,6 +2524,18 @@ config CALL_DEPTH_TRACKING is unused. On affected SKL systems this results in a significant performance gain over the IBRS mitigation. +config CALL_THUNKS_DEBUG + bool "Enable call thunks and call depth tracking debugging" + depends on CALL_DEPTH_TRACKING + select FUNCTION_ALIGNMENT_32B + default n + help + Enable call/ret counters for imbalance detection and build in + a noisy dmesg about callthunks generation and call patching for + trouble shooting. The debug prints need to be enabled on the + kernel command line with 'debug-callthunks'. + Only enable this, when you are debugging call thunks as this + creates a noticable runtime overhead. If unsure say N. config CPU_IBPB_ENTRY bool "Enable IBPB on kernel entry"
arch/x86/include/asm/alternative.h +12 -0
@@ -80,6 +80,18 @@ extern void apply_returns(s32 *start, s3extern void apply_ibt_endbr (s32 *start,s32 *end);struct module ; +struct paravirt_patch_site ; + +struct callthunk_sites { +s32 *call_start, *call_end; +struct paravirt_patch_site *pv_start, *pv_end; +}; + +#ifdef CONFIG_CALL_THUNKS +extern void callthunks_patch_builtin_calls (void ); +#else +static __always_inline void callthunks_patch_builtin_calls(void) {} +#endif #ifdef CONFIG_SMP extern void alternatives_smp_module_add(struct module *mod, char *name,
arch/x86/kernel/Makefile +2 -0
@@ -139,6 +139,8 @@ obj-$(CONFIG_UNWINDER_GUESS) += unwind_ obj-$(CONFIG_AMD_MEM_ENCRYPT) += sev.o +obj-$(CONFIG_CALL_THUNKS) += callthunks.o + ### # 64 bit specific files ifeq ($(CONFIG_X86_64),y)
arch/x86/kernel/alternative.c +6 -0
@@ -938,6 +938,12 @@ void __init alternative_instructions(voi*/ apply_alternatives (__alt_instructions, __alt_instructions_end); +/* +* Now all calls are established. Apply the call thunks if +* required. +*/ +callthunks_patch_builtin_calls (); +apply_ibt_endbr (__ibt_endbr_seal, __ibt_endbr_seal_end);#ifdef CONFIG_SMP
arch/x86/kernel/callthunks.c new file +251 -0
251 lines not on this page · raw message
arch/x86/kernel/head_64.S +1 -0
@@ -370,6 +370,7 @@ SYM_CODE_END(secondary_startup_64) * start_secondary() via .Ljump_to_C_code. */ SYM_CODE_START(start_cpu0) + ANNOTATE_NOENDBR UNWIND_HINT_EMPTY movq initial_stack(%rip), %rsp jmp .Ljump_to_C_code
arch/x86/kernel/relocate_kernel_64.S +3 -2
@@ -41,6 +41,7 @@ .text .align PAGE_SIZE .code64 +SYM_CODE_START_NOALIGN(relocate_range) SYM_CODE_START_NOALIGN(relocate_kernel) UNWIND_HINT_EMPTY ANNOTATE_NOENDBR
@@ -312,5 +313,5 @@ SYM_CODE_START_LOCAL_NOALIGN(swap_pages) int3 SYM_CODE_END(swap_pages) - .globl kexec_control_code_size -.set kexec_control_code_size, . - relocate_kernel + .skip KEXEC_CONTROL_CODE_MAX_SIZE - (. - relocate_kernel), 0xcc +SYM_CODE_END(relocate_range);
arch/x86/kernel/vmlinux.lds.S +0 -8
@@ -501,11 +501,3 @@ INIT_PER_CPU(irq_stack_backing_store); #endif #endif /* CONFIG_X86_64 */ - -#ifdef CONFIG_KEXEC_CORE -#include <asm/kexec.h> - -. = ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE, - "kexec control code size is too big"); -#endif -
[tip: x86/core] x86/callthunks: Add call patching for call depth tracking
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: e81dc127ef69887c72735a3e3868930e2bf313ed Gitweb: https://git.kernel.org/tip/e81dc127ef69887c72735a3e3868930e2bf313ed Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:23 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:13 +02:00
x86/callthunks: Add call patching for call depth tracking
Mitigating the Intel SKL RSB underflow issue in software requires to track the call depth. That is every CALL and every RET need to be intercepted and additional code injected.
The existing retbleed mitigations already include means of redirecting RET to __x86_return_thunk; this can be re-purposed and RET can be redirected to another function doing RET accounting.
CALL accounting will use the function padding introduced in prior patches. For each CALL instruction, the destination symbol's padding is rewritten to do the accounting and the CALL instruction is adjusted to call into the padding.
This ensures only affected CPUs pay the overhead of this accounting. Unaffected CPUs will leave the padding unused and have their 'JMP __x86_return_thunk' replaced with an actual 'RET' instruction.
Objtool has been modified to supply a .call_sites section that lists all the 'CALL' instructions. Additionally the paravirt instruction sites are iterated since they will have been patched from an indirect call to direct calls (or direct instructions in which case it'll be ignored).
Module handling and the actual thunk code for SKL will be added in subsequent steps.
--- arch/x86/Kconfig | 12 +- arch/x86/include/asm/alternative.h | 12 +- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/alternative.c | 6 +- arch/x86/kernel/callthunks.c | 251 ++++++++++++++++++++++++++- arch/x86/kernel/head_64.S | 1 +- arch/x86/kernel/relocate_kernel_64.S | 5 +- arch/x86/kernel/vmlinux.lds.S | 8 +- 8 files changed, 287 insertions(+), 10 deletions(-) create mode 100644 arch/x86/kernel/callthunks.c
arch/x86/Kconfig +12 -0
@@ -2541,6 +2541,18 @@ config CALL_DEPTH_TRACKING is unused. On affected SKL systems this results in a significant performance gain over the IBRS mitigation. +config CALL_THUNKS_DEBUG + bool "Enable call thunks and call depth tracking debugging" + depends on CALL_DEPTH_TRACKING + select FUNCTION_ALIGNMENT_32B + default n + help + Enable call/ret counters for imbalance detection and build in + a noisy dmesg about callthunks generation and call patching for + trouble shooting. The debug prints need to be enabled on the + kernel command line with 'debug-callthunks'. + Only enable this, when you are debugging call thunks as this + creates a noticable runtime overhead. If unsure say N. config CPU_IBPB_ENTRY bool "Enable IBPB on kernel entry"
arch/x86/include/asm/alternative.h +12 -0
@@ -80,6 +80,18 @@ extern void apply_returns(s32 *start, s32 *end);extern void apply_ibt_endbr (s32 *start,s32 *end);struct module ; +struct paravirt_patch_site ; + +struct callthunk_sites { +s32 *call_start, *call_end; +struct paravirt_patch_site *pv_start, *pv_end; +}; + +#ifdef CONFIG_CALL_THUNKS +extern void callthunks_patch_builtin_calls (void ); +#else +static __always_inline void callthunks_patch_builtin_calls(void) {} +#endif #ifdef CONFIG_SMP extern void alternatives_smp_module_add(struct module *mod, char *name,
arch/x86/kernel/Makefile +2 -0
@@ -143,6 +143,8 @@ obj-$(CONFIG_AMD_MEM_ENCRYPT) += sev.o obj-$(CONFIG_CFI_CLANG) += cfi.o +obj-$(CONFIG_CALL_THUNKS) += callthunks.o + ### # 64 bit specific files ifeq ($(CONFIG_X86_64),y)
arch/x86/kernel/alternative.c +6 -0
@@ -947,6 +947,12 @@ void __init alternative_instructions(void)*/ apply_alternatives (__alt_instructions, __alt_instructions_end); +/* +* Now all calls are established. Apply the call thunks if +* required. +*/ +callthunks_patch_builtin_calls (); +apply_ibt_endbr (__ibt_endbr_seal, __ibt_endbr_seal_end);#ifdef CONFIG_SMP
arch/x86/kernel/callthunks.c new file +251 -0
251 lines not on this page · raw message
arch/x86/kernel/head_64.S +1 -0
@@ -370,6 +370,7 @@ SYM_CODE_END(secondary_startup_64) * start_secondary() via .Ljump_to_C_code. */ SYM_CODE_START(start_cpu0) + ANNOTATE_NOENDBR UNWIND_HINT_EMPTY movq initial_stack(%rip), %rsp jmp .Ljump_to_C_code
arch/x86/kernel/relocate_kernel_64.S +3 -2
@@ -41,6 +41,7 @@ .text .align PAGE_SIZE .code64 +SYM_CODE_START_NOALIGN(relocate_range) SYM_CODE_START_NOALIGN(relocate_kernel) UNWIND_HINT_EMPTY ANNOTATE_NOENDBR
@@ -312,5 +313,5 @@ SYM_CODE_START_LOCAL_NOALIGN(swap_pages) int3 SYM_CODE_END(swap_pages) - .globl kexec_control_code_size -.set kexec_control_code_size, . - relocate_kernel + .skip KEXEC_CONTROL_CODE_MAX_SIZE - (. - relocate_kernel), 0xcc +SYM_CODE_END(relocate_range);
arch/x86/kernel/vmlinux.lds.S +0 -8
@@ -501,11 +501,3 @@ INIT_PER_CPU(irq_stack_backing_store); #endif #endif /* CONFIG_X86_64 */ - -#ifdef CONFIG_KEXEC_CORE -#include <asm/kexec.h> - -. = ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE, - "kexec control code size is too big"); -#endif -
Peter Zijlstra
maintainerPATCH v3 45/59 x86/modules: Add call patching
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
As for the builtins create call thunks and patch the call sites to call the thunk on Intel SKL CPUs for retbleed mitigation.
Note, that module init functions are ignored for sake of simplicity because loading modules is not something which is done in high frequent loops and the attacker has not really a handle on when this happens in order to launch a matching attack. The depth tracking will still work for calls into the builtins and because the call is not accounted it will underflow faster and overstuff, but that's mitigated by the saturating counter and the side effect is only temporary.
--- arch/x86/include/asm/alternative.h | 5 +++++ arch/x86/kernel/callthunks.c | 19 +++++++++++++++++++ arch/x86/kernel/module.c | 20 +++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-)
arch/x86/include/asm/alternative.h +5 -0
@@ -89,8 +89,13 @@ struct callthunk_sites {#ifdef CONFIG_CALL_THUNKS extern void callthunks_patch_builtin_calls (void ); +extern void callthunks_patch_module_calls (struct callthunk_sites *sites, +struct module *mod);#else static __always_inline void callthunks_patch_builtin_calls(void) {} +static __always_inline void +callthunks_patch_module_calls (struct callthunk_sites *sites, +struct module *mod) {}#endif #ifdef CONFIG_SMP
arch/x86/kernel/callthunks.c +19 -0
@@ -249,3 +249,22 @@ void __init callthunks_patch_builtin_cal thunks_initialized = true;mutex_unlock (&text_mutex); } + +#ifdef CONFIG_MODULES +void noinline callthunks_patch_module_calls(struct callthunk_sites *cs, +struct module *mod) +{ +struct core_text ct = { + .base = (unsigned long )mod->core_layout.base, + .end = (unsigned long )mod->core_layout.base + mod->core_layout.size, + .name = mod->name, + }; + +if (!thunks_initialized) +return ; + +mutex_lock (&text_mutex); +callthunks_setup (cs, &ct); +mutex_unlock (&text_mutex); +} +#endif /* CONFIG_MODULES */
arch/x86/kernel/module.c +19 -1
@@ -254,7 +254,8 @@ int module_finalize(const Elf_Ehdr *hdr, {const Elf_Shdr *s, *text =NULL , *alt =NULL , *locks =NULL , *para =NULL , *orc =NULL , *orc_ip =NULL , - *retpolines =NULL , *returns =NULL , *ibt_endbr =NULL ; + *retpolines =NULL , *returns =NULL , *ibt_endbr =NULL , + *calls =NULL ;char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
@@ -274,6 +275,8 @@ int module_finalize(const Elf_Ehdr *hdr, retpolines = s;if (!strcmp (".return_sites" , secstrings + s->sh_name)) returns = s; +if (!strcmp (".call_sites" , secstrings + s->sh_name)) + calls = s;if (!strcmp (".ibt_endbr_seal" , secstrings + s->sh_name)) ibt_endbr = s; }
@@ -299,6 +302,21 @@ int module_finalize(const Elf_Ehdr *hdr,void *aseg = (void *)alt->sh_addr;apply_alternatives (aseg, aseg + alt->sh_size); } +if (calls || para) { +struct callthunk_sites cs = {}; + +if (calls) { + cs.call_start = (void *)calls->sh_addr; + cs.call_end = (void *)calls->sh_addr + calls->sh_size; + } + +if (para) { + cs.pv_start = (void *)para->sh_addr; + cs.pv_end = (void *)para->sh_addr + para->sh_size; + } + +callthunks_patch_module_calls (&cs, me); + }if (ibt_endbr) {void *iseg = (void *)ibt_endbr->sh_addr;apply_ibt_endbr (iseg, iseg + ibt_endbr->sh_size);
[tip: x86/core] x86/modules: Add call patching
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: eaf44c816ed8d1ef94c354e3ed47d53cd5a5cb13 Gitweb: https://git.kernel.org/tip/eaf44c816ed8d1ef94c354e3ed47d53cd5a5cb13 Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:24 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:13 +02:00
x86/modules: Add call patching
As for the builtins create call thunks and patch the call sites to call the thunk on Intel SKL CPUs for retbleed mitigation.
Note, that module init functions are ignored for sake of simplicity because loading modules is not something which is done in high frequent loops and the attacker has not really a handle on when this happens in order to launch a matching attack. The depth tracking will still work for calls into the builtins and because the call is not accounted it will underflow faster and overstuff, but that's mitigated by the saturating counter and the side effect is only temporary.
--- arch/x86/include/asm/alternative.h | 5 +++++ arch/x86/kernel/callthunks.c | 19 +++++++++++++++++++ arch/x86/kernel/module.c | 20 +++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-)
arch/x86/include/asm/alternative.h +5 -0
@@ -89,8 +89,13 @@ struct callthunk_sites {#ifdef CONFIG_CALL_THUNKS extern void callthunks_patch_builtin_calls (void ); +extern void callthunks_patch_module_calls (struct callthunk_sites *sites, +struct module *mod);#else static __always_inline void callthunks_patch_builtin_calls(void) {} +static __always_inline void +callthunks_patch_module_calls (struct callthunk_sites *sites, +struct module *mod) {}#endif #ifdef CONFIG_SMP
arch/x86/kernel/callthunks.c +19 -0
@@ -249,3 +249,22 @@ void __init callthunks_patch_builtin_calls(void) thunks_initialized = true;mutex_unlock (&text_mutex); } + +#ifdef CONFIG_MODULES +void noinline callthunks_patch_module_calls(struct callthunk_sites *cs, +struct module *mod) +{ +struct core_text ct = { + .base = (unsigned long )mod->core_layout.base, + .end = (unsigned long )mod->core_layout.base + mod->core_layout.size, + .name = mod->name, + }; + +if (!thunks_initialized) +return ; + +mutex_lock (&text_mutex); +callthunks_setup (cs, &ct); +mutex_unlock (&text_mutex); +} +#endif /* CONFIG_MODULES */
arch/x86/kernel/module.c +19 -1
@@ -254,7 +254,8 @@ int module_finalize(const Elf_Ehdr *hdr, {const Elf_Shdr *s, *text =NULL , *alt =NULL , *locks =NULL , *para =NULL , *orc =NULL , *orc_ip =NULL , - *retpolines =NULL , *returns =NULL , *ibt_endbr =NULL ; + *retpolines =NULL , *returns =NULL , *ibt_endbr =NULL , + *calls =NULL ;char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
@@ -274,6 +275,8 @@ int module_finalize(const Elf_Ehdr *hdr, retpolines = s;if (!strcmp (".return_sites" , secstrings + s->sh_name)) returns = s; +if (!strcmp (".call_sites" , secstrings + s->sh_name)) + calls = s;if (!strcmp (".ibt_endbr_seal" , secstrings + s->sh_name)) ibt_endbr = s; }
@@ -299,6 +302,21 @@ int module_finalize(const Elf_Ehdr *hdr,void *aseg = (void *)alt->sh_addr;apply_alternatives (aseg, aseg + alt->sh_size); } +if (calls || para) { +struct callthunk_sites cs = {}; + +if (calls) { + cs.call_start = (void *)calls->sh_addr; + cs.call_end = (void *)calls->sh_addr + calls->sh_size; + } + +if (para) { + cs.pv_start = (void *)para->sh_addr; + cs.pv_end = (void *)para->sh_addr + para->sh_size; + } + +callthunks_patch_module_calls (&cs, me); + }if (ibt_endbr) {void *iseg = (void *)ibt_endbr->sh_addr;apply_ibt_endbr (iseg, iseg + ibt_endbr->sh_size);
Peter Zijlstra
maintainerPATCH v3 46/59 x86/returnthunk: Allow different return thunks
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
In preparation for call depth tracking on Intel SKL CPUs, make it possible to patch in a SKL specific return thunk.
--- arch/x86/include/asm/nospec-branch.h | 6 ++++++ arch/x86/kernel/alternative.c | 19 ++++++++++++++----- arch/x86/kernel/ftrace.c | 2 +- arch/x86/kernel/static_call.c | 2 +- arch/x86/net/bpf_jit_comp.c | 2 +- 5 files changed, 23 insertions(+), 8 deletions(-)
arch/x86/include/asm/nospec-branch.h +6 -0
@@ -198,6 +198,12 @@ extern void __x86_return_thunk(void);extern void zen_untrain_ret (void );extern void entry_ibpb (void ); +#ifdef CONFIG_CALL_THUNKS +extern void (*x86_return_thunk)(void ); +#else +#define x86_return_thunk (&__x86_return_thunk) +#endif +#ifdef CONFIG_RETPOLINE #define GEN (reg) \
arch/x86/kernel/alternative.c +14 -5
@@ -509,6 +509,11 @@ void __init_or_module noinline apply_ret }#ifdef CONFIG_RETHUNK + +#ifdef CONFIG_CALL_THUNKS +void (*x86_return_thunk)(void )__ro_after_init = &__x86_return_thunk; +#endif +/* * Rewrite the compiler generated return thunk tail-calls. *
@@ -524,14 +529,18 @@ static int patch_return(void *addr, stru {int i =0 ; -if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) -return -1 ; - - bytes[i++] =RET_INSN_OPCODE ; +if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) { +if (x86_return_thunk == __x86_return_thunk) +return -1 ; + + i =JMP32_INSN_SIZE ; +__text_gen_insn (bytes,JMP32_INSN_OPCODE , addr, x86_return_thunk, i); + }else { + bytes[i++] =RET_INSN_OPCODE ; + }for (; i < insn->length;) bytes[i++] =INT3_INSN_OPCODE ; -return i; }
arch/x86/kernel/ftrace.c +1 -1
@@ -359,7 +359,7 @@ create_trampoline(struct ftrace_ops *ops ip = trampoline + size;if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) -__text_gen_insn (ip,JMP32_INSN_OPCODE , ip, &__x86_return_thunk,JMP32_INSN_SIZE ); +__text_gen_insn (ip,JMP32_INSN_OPCODE , ip, x86_return_thunk,JMP32_INSN_SIZE );else memcpy (ip, retq,sizeof (retq));
arch/x86/kernel/static_call.c +1 -1
@@ -52,7 +52,7 @@ static void __ref __static_call_transforcase RET :if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) - code =text_gen_insn (JMP32_INSN_OPCODE , insn, &__x86_return_thunk); + code =text_gen_insn (JMP32_INSN_OPCODE , insn, x86_return_thunk);else code = &retinsn;break ;
arch/x86/net/bpf_jit_comp.c +1 -1
@@ -430,7 +430,7 @@ static void emit_return(u8 **pprog, u8 *u8 *prog = *pprog;if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) { -emit_jump (&prog, &__x86_return_thunk, ip); +emit_jump (&prog, x86_return_thunk, ip); }else {EMIT1 (0xC3 );/* ret */ if (IS_ENABLED (CONFIG_SLS ))
[tip: x86/core] x86/returnthunk: Allow different return thunks
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 770ae1b709528a6a173b5c7b183818ee9b45e376 Gitweb: https://git.kernel.org/tip/770ae1b709528a6a173b5c7b183818ee9b45e376 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:25 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:14 +02:00
x86/returnthunk: Allow different return thunks
In preparation for call depth tracking on Intel SKL CPUs, make it possible to patch in a SKL specific return thunk.
--- arch/x86/include/asm/nospec-branch.h | 6 ++++++ arch/x86/kernel/alternative.c | 17 +++++++++++++---- arch/x86/kernel/ftrace.c | 2 +- arch/x86/kernel/static_call.c | 2 +- arch/x86/net/bpf_jit_comp.c | 2 +- 5 files changed, 22 insertions(+), 7 deletions(-)
arch/x86/include/asm/nospec-branch.h +6 -0
@@ -208,6 +208,12 @@ extern void __x86_return_thunk(void);extern void zen_untrain_ret (void );extern void entry_ibpb (void ); +#ifdef CONFIG_CALL_THUNKS +extern void (*x86_return_thunk)(void ); +#else +#define x86_return_thunk (&__x86_return_thunk) +#endif +#ifdef CONFIG_RETPOLINE #define GEN (reg) \
arch/x86/kernel/alternative.c +13 -4
@@ -518,6 +518,11 @@ void __init_or_module noinline apply_retpolines(s32 *start, s32 *end) }#ifdef CONFIG_RETHUNK + +#ifdef CONFIG_CALL_THUNKS +void (*x86_return_thunk)(void )__ro_after_init = &__x86_return_thunk; +#endif +/* * Rewrite the compiler generated return thunk tail-calls. *
@@ -533,14 +538,18 @@ static int patch_return(void *addr, struct insn *insn, u8 *bytes) {int i =0 ; -if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) -return -1 ; +if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) { +if (x86_return_thunk == __x86_return_thunk) +return -1 ; - bytes[i++] =RET_INSN_OPCODE ; + i =JMP32_INSN_SIZE ; +__text_gen_insn (bytes,JMP32_INSN_OPCODE , addr, x86_return_thunk, i); + }else { + bytes[i++] =RET_INSN_OPCODE ; + }for (; i < insn->length;) bytes[i++] =INT3_INSN_OPCODE ; -return i; }
arch/x86/kernel/ftrace.c +1 -1
@@ -359,7 +359,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size) ip = trampoline + size;if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) -__text_gen_insn (ip,JMP32_INSN_OPCODE , ip, &__x86_return_thunk,JMP32_INSN_SIZE ); +__text_gen_insn (ip,JMP32_INSN_OPCODE , ip, x86_return_thunk,JMP32_INSN_SIZE );else memcpy (ip, retq,sizeof (retq));
arch/x86/kernel/static_call.c +1 -1
@@ -52,7 +52,7 @@ static void __ref __static_call_transform(void *insn, enum insn_type type,case RET :if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) - code =text_gen_insn (JMP32_INSN_OPCODE , insn, &__x86_return_thunk); + code =text_gen_insn (JMP32_INSN_OPCODE , insn, x86_return_thunk);else code = &retinsn;break ;
arch/x86/net/bpf_jit_comp.c +1 -1
@@ -432,7 +432,7 @@ static void emit_return(u8 **pprog, u8 *ip)u8 *prog = *pprog;if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) { -emit_jump (&prog, &__x86_return_thunk, ip); +emit_jump (&prog, x86_return_thunk, ip); }else {EMIT1 (0xC3 );/* ret */ if (IS_ENABLED (CONFIG_SLS ))
Peter Zijlstra
maintainerPATCH v3 47/59 x86/asm: Provide ALTERNATIVE_3
In reply to Peter ZijlstraFrom: Peter Zijlstra <[email protected]>
Fairly straight forward adaptation/extention of ALTERNATIVE_2.
Required for call depth tracking.
--- arch/x86/include/asm/alternative.h | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-)
arch/x86/include/asm/alternative.h +30 -3
@@ -364,6 +364,7 @@ static inline int alternatives_text_rese#define old_len 141b-140b#define new_len1 144f-143f#define new_len2 145f-144f +#define new_len3 146f-145f/* * gas compatible max based on the idea from:
@@ -371,7 +372,8 @@ static inline int alternatives_text_rese* * The additional "-" is needed because gas uses a "true" value of -1. */ -#define alt_max_short (a, b) ((a) ^ (((a) ^ (b)) & -(-((a) < (b))))) +#define alt_max_2 (a, b) ((a) ^ (((a) ^ (b)) & -(-((a) < (b))))) +#define alt_max_3 (a, b, c) (alt_max_2(alt_max_2(a, b), c))/*
@@ -383,8 +385,8 @@ static inline int alternatives_text_rese 140: \oldinstr 141: - .skip -((alt_max_short (new_len1, new_len2) - (old_len)) >0 ) * \ - (alt_max_short (new_len1, new_len2) - (old_len)),0x90 + .skip -((alt_max_2 (new_len1, new_len2) - (old_len)) >0 ) * \ + (alt_max_2 (new_len1, new_len2) - (old_len)),0x90 142: .pushsection .altinstructions,"a"
@@ -401,6 +403,31 @@ static inline int alternatives_text_rese .popsection .endm +.macro ALTERNATIVE_3 oldinstr, newinstr1, feature1, newinstr2, feature2, newinstr3, feature3 +140: + \oldinstr +141: + .skip -((alt_max_3(new_len1, new_len2, new_len3) - (old_len)) > 0) * \ + (alt_max_3(new_len1, new_len2, new_len3) - (old_len)),0x90 +142: + + .pushsection .altinstructions,"a" + altinstruction_entry 140b,143f,\feature1,142b-140b,144f-143f + altinstruction_entry 140b,144f,\feature2,142b-140b,145f-144f + altinstruction_entry 140b,145f,\feature3,142b-140b,146f-145f + .popsection + + .pushsection .altinstr_replacement,"ax" +143: + \newinstr1 +144: + \newinstr2 +145: + \newinstr3 +146: + .popsection +.endm + /* If @feature is set, patch in @newinstr_yes, otherwise @newinstr_no. */ #define ALTERNATIVE_TERNARY(oldinstr, feature, newinstr_yes, newinstr_no) \ ALTERNATIVE_2 oldinstr, newinstr_no, X86_FEATURE_ALWAYS, \
[tip: x86/core] x86/asm: Provide ALTERNATIVE_3
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 52354973573cc260ff2fc661cb28ff8eaa7b879b Gitweb: https://git.kernel.org/tip/52354973573cc260ff2fc661cb28ff8eaa7b879b Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:26 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:14 +02:00
x86/asm: Provide ALTERNATIVE_3
Fairly straight forward adaptation/extention of ALTERNATIVE_2.
Required for call depth tracking.
--- arch/x86/include/asm/alternative.h | 33 ++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-)
arch/x86/include/asm/alternative.h +30 -3
@@ -364,6 +364,7 @@ static inline int alternatives_text_reserved(void *start, void *end)#define old_len 141b-140b#define new_len1 144f-143f#define new_len2 145f-144f +#define new_len3 146f-145f/* * gas compatible max based on the idea from:
@@ -371,7 +372,8 @@ static inline int alternatives_text_reserved(void *start, void *end)* * The additional "-" is needed because gas uses a "true" value of -1. */ -#define alt_max_short (a, b) ((a) ^ (((a) ^ (b)) & -(-((a) < (b))))) +#define alt_max_2 (a, b) ((a) ^ (((a) ^ (b)) & -(-((a) < (b))))) +#define alt_max_3 (a, b, c) (alt_max_2(alt_max_2(a, b), c))/*
@@ -383,8 +385,8 @@ static inline int alternatives_text_reserved(void *start, void *end) 140: \oldinstr 141: - .skip -((alt_max_short (new_len1, new_len2) - (old_len)) >0 ) * \ - (alt_max_short (new_len1, new_len2) - (old_len)),0x90 + .skip -((alt_max_2 (new_len1, new_len2) - (old_len)) >0 ) * \ + (alt_max_2 (new_len1, new_len2) - (old_len)),0x90 142: .pushsection .altinstructions,"a"
@@ -401,6 +403,31 @@ static inline int alternatives_text_reserved(void *start, void *end) .popsection .endm +.macro ALTERNATIVE_3 oldinstr, newinstr1, feature1, newinstr2, feature2, newinstr3, feature3 +140: + \oldinstr +141: + .skip -((alt_max_3(new_len1, new_len2, new_len3) - (old_len)) > 0) * \ + (alt_max_3(new_len1, new_len2, new_len3) - (old_len)),0x90 +142: + + .pushsection .altinstructions,"a" + altinstruction_entry 140b,143f,\feature1,142b-140b,144f-143f + altinstruction_entry 140b,144f,\feature2,142b-140b,145f-144f + altinstruction_entry 140b,145f,\feature3,142b-140b,146f-145f + .popsection + + .pushsection .altinstr_replacement,"ax" +143: + \newinstr1 +144: + \newinstr2 +145: + \newinstr3 +146: + .popsection +.endm + /* If @feature is set, patch in @newinstr_yes, otherwise @newinstr_no. */ #define ALTERNATIVE_TERNARY(oldinstr, feature, newinstr_yes, newinstr_no) \ ALTERNATIVE_2 oldinstr, newinstr_no, X86_FEATURE_ALWAYS, \
Peter Zijlstra
maintainerPATCH v3 48/59 x86/retbleed: Add SKL return thunk
In reply to Peter ZijlstraFrom: Thomas Gleixner <[email protected]>
To address the Intel SKL RSB underflow issue in software it's required to do call depth tracking.
Provide a return thunk for call depth tracking on Intel SKL CPUs.
The tracking does not use a counter. It uses uses arithmetic shift right on call entry and logical shift left on return.
The depth tracking variable is initialized to 0x8000.... when the call depth is zero. The arithmetic shift right sign extends the MSB and saturates after the 12th call. The shift count is 5 so the tracking covers 12 nested calls. On return the variable is shifted left logically so it becomes zero again.
CALL RET
0: 0x8000000000000000 0x0000000000000000
1: 0xfc00000000000000 0xf000000000000000
...
11: 0xfffffffffffffff8 0xfffffffffffffc00
12: 0xffffffffffffffff 0xffffffffffffffe0
After a return buffer fill the depth is credited 12 calls before the next stuffing has to take place.
There is a inaccuracy for situations like this:
10 calls
5 returns
3 calls
4 returns
3 calls
....The shift count might cause this to be off by one in either direction, but there is still a cushion vs. the RSB depth. The algorithm does not claim to be perfect, but it should obfuscate the problem enough to make exploitation extremly difficult.
The theory behind this is:
RSB is a stack with depth 16 which is filled on every call. On the return path speculation "pops" entries to speculate down the call chain. Once the speculative RSB is empty it switches to other predictors, e.g. the Branch History Buffer, which can be mistrained by user space and misguide the speculation path to a gadget.
Call depth tracking is designed to break this speculation path by stuffing speculation trap calls into the RSB which are never getting a corresponding return executed. This stalls the prediction path until it gets resteered,
The assumption is that stuffing at the 12th return is sufficient to break the speculation before it hits the underflow and the fallback to the other predictors. Testing confirms that it works. Johannes, one of the retbleed researchers. tried to attack this approach but failed.
There is obviously no scientific proof that this will withstand future research progress, but all we can do right now is to speculate about it.
The SAR/SHL usage was suggested by Andi Kleen.
--- arch/x86/entry/entry_64.S | 10 +- arch/x86/include/asm/current.h | 3 arch/x86/include/asm/nospec-branch.h | 118 +++++++++++++++++++++++++++++++++-- arch/x86/kernel/asm-offsets.c | 3 arch/x86/kvm/svm/vmenter.S | 1 arch/x86/lib/retpoline.S | 31 +++++++++ 6 files changed, 156 insertions(+), 10 deletions(-)
arch/x86/entry/entry_64.S +6 -4
@@ -288,6 +288,7 @@ SYM_FUNC_END(__switch_to_asm) SYM_CODE_START_NOALIGN(ret_from_fork) UNWIND_HINT_EMPTY ANNOTATE_NOENDBR // copy_thread + CALL_DEPTH_ACCOUNT movq %rax, %rdi call schedule_tail /* rdi: 'prev' task parameter */
@@ -332,7 +333,7 @@ SYM_CODE_START(xen_error_entry) UNWIND_HINT_FUNC PUSH_AND_CLEAR_REGS save_ret=1 ENCODE_FRAME_POINTER 8 - UNTRAIN_RET + UNTRAIN_RET_FROM_CALL RET SYM_CODE_END(xen_error_entry)
@@ -977,7 +978,7 @@ SYM_CODE_START(paranoid_entry) * CR3 above, keep the old value in a callee saved register. */ IBRS_ENTER save_reg=%r15 - UNTRAIN_RET + UNTRAIN_RET_FROM_CALL RET SYM_CODE_END(paranoid_entry)
@@ -1062,7 +1063,7 @@ SYM_CODE_START(error_entry) /* We have user CR3. Change to kernel CR3. */ SWITCH_TO_KERNEL_CR3 scratch_reg=%rax IBRS_ENTER - UNTRAIN_RET + UNTRAIN_RET_FROM_CALL leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */ /* Put us onto the real thread stack. */
@@ -1097,6 +1098,7 @@ SYM_CODE_START(error_entry) */ .Lerror_entry_done_lfence: FENCE_SWAPGS_KERNEL_ENTRY + CALL_DEPTH_ACCOUNT leaq 8(%rsp), %rax /* return pt_regs pointer */ ANNOTATE_UNRET_END RET
@@ -1115,7 +1117,7 @@ SYM_CODE_START(error_entry) FENCE_SWAPGS_USER_ENTRY SWITCH_TO_KERNEL_CR3 scratch_reg=%rax IBRS_ENTER - UNTRAIN_RET + UNTRAIN_RET_FROM_CALL /* * Pretend that the exception came from user mode: set up pt_regs
arch/x86/include/asm/current.h +3 -0
@@ -17,6 +17,9 @@ struct pcpu_hot {struct task_struct *current_task;int preempt_count;int cpu_number; +#ifdef CONFIG_CALL_DEPTH_TRACKING +u64 call_depth; +#endif unsigned long top_of_stack;void *hardirq_stack_ptr;u16 softirq_pending;
arch/x86/include/asm/nospec-branch.h +112 -6
150 lines not on this page · raw message
arch/x86/kernel/asm-offsets.c +3 -0
@@ -110,6 +110,9 @@ static void __used common(void)OFFSET (TSS_sp2, tss_struct, x86_tss.sp2);OFFSET (X86_top_of_stack, pcpu_hot, top_of_stack); +#ifdef CONFIG_CALL_DEPTH_TRACKING +OFFSET (X86_call_depth, pcpu_hot, call_depth); +#endif if (IS_ENABLED (CONFIG_KVM_INTEL )) {BLANK ();
arch/x86/kvm/svm/vmenter.S +1 -0
@@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/linkage.h> #include <asm/asm.h> +#include <asm/asm-offsets.h> #include <asm/bitsperlong.h> #include <asm/kvm_vcpu_regs.h> #include <asm/nospec-branch.h>
arch/x86/lib/retpoline.S +31 -0
@@ -5,9 +5,11 @@ #include <asm/dwarf2.h> #include <asm/cpufeatures.h> #include <asm/alternative.h> +#include <asm/asm-offsets.h> #include <asm/export.h> #include <asm/nospec-branch.h> #include <asm/unwind_hints.h> +#include <asm/percpu.h> #include <asm/frame.h> .section .text.__x86.indirect_thunk
@@ -140,3 +142,32 @@ SYM_FUNC_END(zen_untrain_ret) EXPORT_SYMBOL(__x86_return_thunk) #endif /* CONFIG_RETHUNK */ + +#ifdef CONFIG_CALL_DEPTH_TRACKING + + .align 64 +SYM_FUNC_START(__x86_return_skl) + ANNOTATE_NOENDBR + /* Keep the hotpath in a 16byte I-fetch */ + shlq $5, PER_CPU_VAR(pcpu_hot + X86_call_depth) + jz 1f + ANNOTATE_UNRET_SAFE + ret + int3 +1: + .rept 16 + ANNOTATE_INTRA_FUNCTION_CALL + call 2f + int3 +2: + .endr + add $(8*16), %rsp + + CREDIT_CALL_DEPTH + + ANNOTATE_UNRET_SAFE + ret + int3 +SYM_FUNC_END(__x86_return_skl) + +#endif /* CONFIG_CALL_DEPTH_TRACKING */
[tip: x86/core] x86/retbleed: Add SKL return thunk
The following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 5d8213864ade86b48fc492584ea86d65a62f892e Gitweb: https://git.kernel.org/tip/5d8213864ade86b48fc492584ea86d65a62f892e Author: Thomas Gleixner <[email protected]> AuthorDate: Thu, 15 Sep 2022 13:11:27 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 17 Oct 2022 16:41:15 +02:00
x86/retbleed: Add SKL return thunk
To address the Intel SKL RSB underflow issue in software it's required to do call depth tracking.
Provide a return thunk for call depth tracking on Intel SKL CPUs.
The tracking does not use a counter. It uses uses arithmetic shift right on call entry and logical shift left on return.
The depth tracking variable is initialized to 0x8000.... when the call depth is zero. The arithmetic shift right sign extends the MSB and saturates after the 12th call. The shift count is 5 so the tracking covers 12 nested calls. On return the variable is shifted left logically so it becomes zero again.
CALL RET
0: 0x8000000000000000 0x0000000000000000
1: 0xfc00000000000000 0xf000000000000000
...
11: 0xfffffffffffffff8 0xfffffffffffffc00
12: 0xffffffffffffffff 0xffffffffffffffe0
After a return buffer fill the depth is credited 12 calls before the next stuffing has to take place.
There is a inaccuracy for situations like this:
10 calls
5 returns
3 calls
4 returns
3 calls
....The shift count might cause this to be off by one in either direction, but there is still a cushion vs. the RSB depth. The algorithm does not claim to be perfect, but it should obfuscate the problem enough to make exploitation extremly difficult.
The theory behind this is:
RSB is a stack with depth 16 which is filled on every call. On the return path speculation "pops" entries to speculate down the call chain. Once the speculative RSB is empty it switches to other predictors, e.g. the Branch History Buffer, which can be mistrained by user space and misguide the speculation path to a gadget.
Call depth tracking is designed to break this speculation path by stuffing speculation trap calls into the RSB which are never getting a corresponding return executed. This stalls the prediction path until it gets resteered,
The assumption is that stuffing at the 12th return is sufficient to break the speculation before it hits the underflow and the fallback to the other predictors. Testing confirms that it works. Johannes, one of the retbleed researchers. tried to attack this approach but failed.
There is obviously no scientific proof that this will withstand future research progress, but all we can do right now is to speculate about it.
The SAR/SHL usage was suggested by Andi Kleen.
--- arch/x86/entry/entry_64.S | 10 +- arch/x86/include/asm/current.h | 3 +- arch/x86/include/asm/nospec-branch.h | 121 ++++++++++++++++++++++++-- arch/x86/kernel/asm-offsets.c | 3 +- arch/x86/kvm/svm/vmenter.S | 1 +- arch/x86/lib/retpoline.S | 31 +++++++- 6 files changed, 159 insertions(+), 10 deletions(-)
arch/x86/entry/entry_64.S +6 -4
@@ -288,6 +288,7 @@ SYM_FUNC_END(__switch_to_asm) SYM_CODE_START_NOALIGN(ret_from_fork) UNWIND_HINT_EMPTY ANNOTATE_NOENDBR // copy_thread + CALL_DEPTH_ACCOUNT movq %rax, %rdi call schedule_tail /* rdi: 'prev' task parameter */
@@ -332,7 +333,7 @@ SYM_CODE_START(xen_error_entry) UNWIND_HINT_FUNC PUSH_AND_CLEAR_REGS save_ret=1 ENCODE_FRAME_POINTER 8 - UNTRAIN_RET + UNTRAIN_RET_FROM_CALL RET SYM_CODE_END(xen_error_entry)
@@ -977,7 +978,7 @@ SYM_CODE_START(paranoid_entry) * CR3 above, keep the old value in a callee saved register. */ IBRS_ENTER save_reg=%r15 - UNTRAIN_RET + UNTRAIN_RET_FROM_CALL RET SYM_CODE_END(paranoid_entry)
@@ -1062,7 +1063,7 @@ SYM_CODE_START(error_entry) /* We have user CR3. Change to kernel CR3. */ SWITCH_TO_KERNEL_CR3 scratch_reg=%rax IBRS_ENTER - UNTRAIN_RET + UNTRAIN_RET_FROM_CALL leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */ /* Put us onto the real thread stack. */
@@ -1097,6 +1098,7 @@ SYM_CODE_START(error_entry) */ .Lerror_entry_done_lfence: FENCE_SWAPGS_KERNEL_ENTRY + CALL_DEPTH_ACCOUNT leaq 8(%rsp), %rax /* return pt_regs pointer */ ANNOTATE_UNRET_END RET
@@ -1115,7 +1117,7 @@ SYM_CODE_START(error_entry) FENCE_SWAPGS_USER_ENTRY SWITCH_TO_KERNEL_CR3 scratch_reg=%rax IBRS_ENTER - UNTRAIN_RET + UNTRAIN_RET_FROM_CALL /* * Pretend that the exception came from user mode: set up pt_regs
arch/x86/include/asm/current.h +3 -0
@@ -17,6 +17,9 @@ struct pcpu_hot {struct task_struct *current_task;int preempt_count;int cpu_number; +#ifdef CONFIG_CALL_DEPTH_TRACKING +u64 call_depth; +#endif unsigned long top_of_stack;void *hardirq_stack_ptr;u16 softirq_pending;
arch/x86/include/asm/nospec-branch.h +115 -6
153 lines not on this page · raw message
arch/x86/kernel/asm-offsets.c +3 -0
@@ -110,6 +110,9 @@ static void __used common(void)OFFSET (TSS_sp2, tss_struct, x86_tss.sp2);OFFSET (X86_top_of_stack, pcpu_hot, top_of_stack); +#ifdef CONFIG_CALL_DEPTH_TRACKING +OFFSET (X86_call_depth, pcpu_hot, call_depth); +#endif if (IS_ENABLED (CONFIG_KVM_INTEL )) {BLANK ();
arch/x86/kvm/svm/vmenter.S +1 -0
@@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/linkage.h> #include <asm/asm.h> +#include <asm/asm-offsets.h> #include <asm/bitsperlong.h> #include <asm/kvm_vcpu_regs.h> #include <asm/nospec-branch.h>
arch/x86/lib/retpoline.S +31 -0
@@ -5,9 +5,11 @@ #include <asm/dwarf2.h> #include <asm/cpufeatures.h> #include <asm/alternative.h> +#include <asm/asm-offsets.h> #include <asm/export.h> #include <asm/nospec-branch.h> #include <asm/unwind_hints.h> +#include <asm/percpu.h> #include <asm/frame.h> .section .text.__x86.indirect_thunk
@@ -140,3 +142,32 @@ __EXPORT_THUNK(zen_untrain_ret) EXPORT_SYMBOL(__x86_return_thunk) #endif /* CONFIG_RETHUNK */ + +#ifdef CONFIG_CALL_DEPTH_TRACKING + + .align 64 +SYM_FUNC_START(__x86_return_skl) + ANNOTATE_NOENDBR + /* Keep the hotpath in a 16byte I-fetch */ + shlq $5, PER_CPU_VAR(pcpu_hot + X86_call_depth) + jz 1f + ANNOTATE_UNRET_SAFE + ret + int3 +1: + .rept 16 + ANNOTATE_INTRA_FUNCTION_CALL + call 2f + int3 +2: + .endr + add $(8*16), %rsp + + CREDIT_CALL_DEPTH + + ANNOTATE_UNRET_SAFE + ret + int3 +SYM_FUNC_END(__x86_return_skl) + +#endif /* CONFIG_CALL_DEPTH_TRACKING */