Rewrite x86/ftrace to use text_poke (and more)
Subsystems (18)
Peter Zijlstra
maintainercover Rewrite x86/ftrace to use text_poke (and more)
Ftrace is one of the last W^X violators (after this only KLP is left). These patches move it over to the generic text_poke() interface and thereby get rid of this oddity.
The first 14 patches are the same as in the -v4 posting. The last 3 patches are new.
Will, patch 13, arm/ftrace, is unchanged. This is because this way it preserves behaviour, but if you can provide me a tested-by for the simpler variant I can drop that in.
Patch 15 reworks ftrace's event_create_dir(), which ran module code before the module was finished loading (before we even applied jump_labels and all that).
Patch 16 and 17 address minor review feedback.
Ingo, Alexei wants patch #1 for some BPF stuff, can he get that in a topic branch?
Peter Zijlstra
maintainerPATCH 1/17 x86/alternatives: Teach text_poke_bp() to emulate instructions
In preparation for static_call and variable size jump_label support, teach text_poke_bp() to emulate instructions, namely:
JMP32, JMP8, CALL, NOP2, NOP_ATOMIC5, INT3
The current text_poke_bp() takes a @handler argument which is used as a jump target when the temporary INT3 is hit by a different CPU.
When patching CALL instructions, this doesn't work because we'd miss the PUSH of the return address. Instead, teach poke_int3_handler() to emulate an instruction, typically the instruction we're patching in.
This fits almost all text_poke_bp() users, except arch_unoptimize_kprobe() which restores random text, and for that site we have to build an explicit emulate instruction.
--- arch/x86/include/asm/text-patching.h | 24 ++++-- arch/x86/kernel/alternative.c | 132 ++++++++++++++++++++++++++--------- arch/x86/kernel/jump_label.c | 9 -- arch/x86/kernel/kprobes/opt.c | 11 ++ 4 files changed, 130 insertions(+), 46 deletions(-)
arch/x86/include/asm/text-patching.h +18 -6
@@ -26,10 +26,11 @@ static inline void apply_paravirt(struct#define POKE_MAX_OPCODE_SIZE 5struct text_poke_loc { -void *detour;void *addr; -size_t len; -const char opcode[POKE_MAX_OPCODE_SIZE ]; +int len; +s32 rel32; +u8 opcode; +const u8 text[POKE_MAX_OPCODE_SIZE ]; };extern void text_poke_early (void *addr,const void *opcode,size_t len);
@@ -51,8 +52,10 @@ extern void text_poke_early(void *addr,extern void *text_poke (void *addr,const void *opcode,size_t len);extern void *text_poke_kgdb (void *addr,const void *opcode,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,void *handler); +extern void text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate);extern void text_poke_bp_batch (struct text_poke_loc *tp,unsigned int nr_entries); +extern void text_poke_loc_init (struct text_poke_loc *tp,void *addr, +const void *opcode,size_t len,const void *emulate);extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;extern __ro_after_init unsigned long poking_addr;
@@ -63,8 +66,17 @@ static inline void int3_emulate_jmp(stru regs->ip = ip; } -#define INT3_INSN_SIZE 1 -#define CALL_INSN_SIZE 5 +#define INT3_INSN_SIZE 1 +#define INT3_INSN_OPCODE 0xCC + +#define CALL_INSN_SIZE 5 +#define CALL_INSN_OPCODE 0xE8 + +#define JMP32_INSN_SIZE 5 +#define JMP32_INSN_OPCODE 0xE9 + +#define JMP8_INSN_SIZE 2 +#define JMP8_INSN_OPCODE 0xEBstatic inline void int3_emulate_push (struct pt_regs *regs,unsigned long val) {
arch/x86/kernel/alternative.c +101 -31
202 lines not on this page · raw message
arch/x86/kernel/jump_label.c +3 -6
@@ -89,8 +89,7 @@ static void __ref __jump_label_transformreturn ; } -text_poke_bp ((void *)jump_entry_code (entry), &code,JUMP_LABEL_NOP_SIZE , - (void *)jump_entry_code (entry) +JUMP_LABEL_NOP_SIZE ); +text_poke_bp ((void *)jump_entry_code (entry), &code,JUMP_LABEL_NOP_SIZE ,NULL ); } void arch_jump_label_transform(struct jump_entry *entry,
@@ -147,11 +146,9 @@ bool arch_jump_label_transform_queue(str }__jump_label_set_jump_code (entry, type, - (union jump_code_union *) &tp->opcode,0 ); + (union jump_code_union *)&tp->text,0 ); - tp->addr = entry_code; - tp->detour = entry_code +JUMP_LABEL_NOP_SIZE ; - tp->len =JUMP_LABEL_NOP_SIZE ; +text_poke_loc_init (tp, entry_code,NULL ,JUMP_LABEL_NOP_SIZE ,NULL ); tp_vec_nr++;
arch/x86/kernel/kprobes/opt.c +8 -3
@@ -437,8 +437,7 @@ void arch_optimize_kprobes(struct list_h insn_buff[0 ] =RELATIVEJUMP_OPCODE ; *(s32 *)(&insn_buff[1 ]) = rel; -text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE , - op->optinsn.insn); +text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE ,NULL );list_del_init (&op->list); }
@@ -448,12 +447,18 @@ void arch_optimize_kprobes(struct list_hvoid arch_unoptimize_kprobe (struct optimized_kprobe *op) {u8 insn_buff[RELATIVEJUMP_SIZE ]; +u8 emulate_buff[RELATIVEJUMP_SIZE ];/* Set int3 to first byte for kprobes */ insn_buff[0 ] =BREAKPOINT_INSTRUCTION ;memcpy (insn_buff +1 , op->optinsn.copied_insn,RELATIVE_ADDR_SIZE ); + + emulate_buff[0 ] =RELATIVEJUMP_OPCODE ; + *(s32 *)(&emulate_buff[1 ]) = (s32)((long )op->optinsn.insn - + ((long )op->kp.addr +RELATIVEJUMP_SIZE )); +text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE , - op->optinsn.insn); + emulate_buff); }/*
[tip: core/kprobes] x86/alternatives: Teach text_poke_bp() to emulate instructions
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 8c7eebc10687af45ac8e40ad1bac0cf7893dba9f Gitweb: https://git.kernel.org/tip/8c7eebc10687af45ac8e40ad1bac0cf7893dba9f Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 05 Jun 2019 10:48:37 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:41 +01:00
x86/alternatives: Teach text_poke_bp() to emulate instructions
In preparation for static_call and variable size jump_label support, teach text_poke_bp() to emulate instructions, namely:
JMP32, JMP8, CALL, NOP2, NOP_ATOMIC5, INT3
The current text_poke_bp() takes a @handler argument which is used as a jump target when the temporary INT3 is hit by a different CPU.
When patching CALL instructions, this doesn't work because we'd miss the PUSH of the return address. Instead, teach poke_int3_handler() to emulate an instruction, typically the instruction we're patching in.
This fits almost all text_poke_bp() users, except arch_unoptimize_kprobe() which restores random text, and for that site we have to build an explicit emulate instruction.
--- arch/x86/include/asm/text-patching.h | 24 +++-- arch/x86/kernel/alternative.c | 132 +++++++++++++++++++------- arch/x86/kernel/jump_label.c | 9 +-- arch/x86/kernel/kprobes/opt.c | 11 +- 4 files changed, 130 insertions(+), 46 deletions(-)
arch/x86/include/asm/text-patching.h +18 -6
@@ -26,10 +26,11 @@ static inline void apply_paravirt(struct paravirt_patch_site *start,#define POKE_MAX_OPCODE_SIZE 5struct text_poke_loc { -void *detour;void *addr; -size_t len; -const char opcode[POKE_MAX_OPCODE_SIZE ]; +int len; +s32 rel32; +u8 opcode; +const u8 text[POKE_MAX_OPCODE_SIZE ]; };extern void text_poke_early (void *addr,const void *opcode,size_t len);
@@ -51,8 +52,10 @@ extern void text_poke_early(void *addr, const void *opcode, size_t len);extern void *text_poke (void *addr,const void *opcode,size_t len);extern void *text_poke_kgdb (void *addr,const void *opcode,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,void *handler); +extern void text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate);extern void text_poke_bp_batch (struct text_poke_loc *tp,unsigned int nr_entries); +extern void text_poke_loc_init (struct text_poke_loc *tp,void *addr, +const void *opcode,size_t len,const void *emulate);extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;extern __ro_after_init unsigned long poking_addr;
@@ -63,8 +66,17 @@ static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip) regs->ip = ip; } -#define INT3_INSN_SIZE 1 -#define CALL_INSN_SIZE 5 +#define INT3_INSN_SIZE 1 +#define INT3_INSN_OPCODE 0xCC + +#define CALL_INSN_SIZE 5 +#define CALL_INSN_OPCODE 0xE8 + +#define JMP32_INSN_SIZE 5 +#define JMP32_INSN_OPCODE 0xE9 + +#define JMP8_INSN_SIZE 2 +#define JMP8_INSN_OPCODE 0xEBstatic inline void int3_emulate_push (struct pt_regs *regs,unsigned long val) {
arch/x86/kernel/alternative.c +101 -31
202 lines not on this page · raw message
arch/x86/kernel/jump_label.c +3 -6
@@ -89,8 +89,7 @@ static void __ref __jump_label_transform(struct jump_entry *entry,return ; } -text_poke_bp ((void *)jump_entry_code (entry), &code,JUMP_LABEL_NOP_SIZE , - (void *)jump_entry_code (entry) +JUMP_LABEL_NOP_SIZE ); +text_poke_bp ((void *)jump_entry_code (entry), &code,JUMP_LABEL_NOP_SIZE ,NULL ); } void arch_jump_label_transform(struct jump_entry *entry,
@@ -147,11 +146,9 @@ bool arch_jump_label_transform_queue(struct jump_entry *entry, }__jump_label_set_jump_code (entry, type, - (union jump_code_union *) &tp->opcode,0 ); + (union jump_code_union *)&tp->text,0 ); - tp->addr = entry_code; - tp->detour = entry_code +JUMP_LABEL_NOP_SIZE ; - tp->len =JUMP_LABEL_NOP_SIZE ; +text_poke_loc_init (tp, entry_code,NULL ,JUMP_LABEL_NOP_SIZE ,NULL ); tp_vec_nr++;
arch/x86/kernel/kprobes/opt.c +8 -3
@@ -437,8 +437,7 @@ void arch_optimize_kprobes(struct list_head *oplist) insn_buff[0 ] =RELATIVEJUMP_OPCODE ; *(s32 *)(&insn_buff[1 ]) = rel; -text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE , - op->optinsn.insn); +text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE ,NULL );list_del_init (&op->list); }
@@ -448,12 +447,18 @@ void arch_optimize_kprobes(struct list_head *oplist)void arch_unoptimize_kprobe (struct optimized_kprobe *op) {u8 insn_buff[RELATIVEJUMP_SIZE ]; +u8 emulate_buff[RELATIVEJUMP_SIZE ];/* Set int3 to first byte for kprobes */ insn_buff[0 ] =BREAKPOINT_INSTRUCTION ;memcpy (insn_buff +1 , op->optinsn.copied_insn,RELATIVE_ADDR_SIZE ); + + emulate_buff[0 ] =RELATIVEJUMP_OPCODE ; + *(s32 *)(&emulate_buff[1 ]) = (s32)((long )op->optinsn.insn - + ((long )op->kp.addr +RELATIVEJUMP_SIZE )); +text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE , - op->optinsn.insn); + emulate_buff); }/*
Peter Zijlstra
maintainerPATCH 2/17 x86/alternatives: Update int3_emulate_push() comment
In reply to Peter ZijlstraUpdate the comment now that we've merged x86_32 support.
--- arch/x86/include/asm/text-patching.h | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/include/asm/text-patching.h +3 -0
@@ -85,6 +85,9 @@ static inline void int3_emulate_push(str* stack where the break point happened, and the saving of * pt_regs. We can extend the original stack because of * this gap. See the idtentry macro's create_gap option. +* +* Similarly entry_32.S will have a gap on the stack for (any) hardware +* exception and pt_regs; see FIXUP_FRAME. */ regs->sp -=sizeof (unsigned long ); *(unsigned long *)regs->sp = val;
[tip: core/kprobes] x86/alternatives: Update int3_emulate_push() comment
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 8959eb6ef5b86512452ef3bad167511dace61d84 Gitweb: https://git.kernel.org/tip/8959eb6ef5b86512452ef3bad167511dace61d84 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 03 Sep 2019 13:43:24 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:41 +01:00
x86/alternatives: Update int3_emulate_push() comment
Update the comment now that we've merged x86_32 support.
--- arch/x86/include/asm/text-patching.h | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/include/asm/text-patching.h +3 -0
@@ -85,6 +85,9 @@ static inline void int3_emulate_push(struct pt_regs *regs, unsigned long val)* stack where the break point happened, and the saving of * pt_regs. We can extend the original stack because of * this gap. See the idtentry macro's create_gap option. +* +* Similarly entry_32.S will have a gap on the stack for (any) hardware +* exception and pt_regs; see FIXUP_FRAME. */ regs->sp -=sizeof (unsigned long ); *(unsigned long *)regs->sp = val;
[tip: core/kprobes] x86/alternatives: Update int3_emulate_push() comment
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 8f4a4160c618434e76f7d68673a6be50fac0549a Gitweb: https://git.kernel.org/tip/8f4a4160c618434e76f7d68673a6be50fac0549a Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 03 Sep 2019 13:43:24 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/alternatives: Update int3_emulate_push() comment
Update the comment now that we've merged x86_32 support.
--- arch/x86/include/asm/text-patching.h | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/include/asm/text-patching.h +3 -0
@@ -85,6 +85,9 @@ static inline void int3_emulate_push(struct pt_regs *regs, unsigned long val)* stack where the break point happened, and the saving of * pt_regs. We can extend the original stack because of * this gap. See the idtentry macro's create_gap option. +* +* Similarly entry_32.S will have a gap on the stack for (any) hardware +* exception and pt_regs; see FIXUP_FRAME. */ regs->sp -=sizeof (unsigned long ); *(unsigned long *)regs->sp = val;
Peter Zijlstra
maintainerPATCH 3/17 x86/alternatives,jump_label: Provide better text_poke() batching interface
In reply to Peter ZijlstraAdding another text_poke_bp_batch() user made me realize the interface is all sorts of wrong. The text poke vector should be internal to the implementation.
This then results in a trivial interface:
text_poke_queue() - which has the 'normal' text_poke_bp() interface text_poke_finish() - which takes no arguments and flushes any
pending text_poke()s.
--- arch/x86/include/asm/text-patching.h | 15 +---- arch/x86/kernel/alternative.c | 64 ++++++++++++++++++++-- arch/x86/kernel/jump_label.c | 99 ++++++++++++----------------------- 3 files changed, 96 insertions(+), 82 deletions(-)
arch/x86/include/asm/text-patching.h +4 -11
@@ -25,14 +25,6 @@ static inline void apply_paravirt(struct*/ #define POKE_MAX_OPCODE_SIZE 5 -struct text_poke_loc { -void *addr; -int len; -s32 rel32; -u8 opcode; -const u8 text[POKE_MAX_OPCODE_SIZE ]; -}; -extern void text_poke_early (void *addr,const void *opcode,size_t len);/*
@@ -53,9 +45,10 @@ extern void *text_poke(void *addr, constextern void *text_poke_kgdb (void *addr,const void *opcode,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); -extern void text_poke_bp_batch (struct text_poke_loc *tp,unsigned int nr_entries); -extern void text_poke_loc_init (struct text_poke_loc *tp,void *addr, -const void *opcode,size_t len,const void *emulate); + +extern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate); +extern void text_poke_finish (void ); +extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;extern __ro_after_init unsigned long poking_addr;
arch/x86/kernel/alternative.c +58 -6
94 lines not on this page · raw message
arch/x86/kernel/jump_label.c +34 -65
164 lines not on this page · raw message
[tip: core/kprobes] x86/alternatives, jump_label: Provide better text_poke() batching interface
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: bc258962afa8c14558b74cac7adc23770ad4968a Gitweb: https://git.kernel.org/tip/bc258962afa8c14558b74cac7adc23770ad4968a Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 26 Aug 2019 13:38:58 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:42 +01:00
x86/alternatives, jump_label: Provide better text_poke() batching interface
Adding another text_poke_bp_batch() user made me realize the interface is all sorts of wrong. The text poke vector should be internal to the implementation.
This then results in a trivial interface:
text_poke_queue() - which has the 'normal' text_poke_bp() interface text_poke_finish() - which takes no arguments and flushes any
pending text_poke()s.
--- arch/x86/include/asm/text-patching.h | 15 +--- arch/x86/kernel/alternative.c | 64 +++++++++++++++-- arch/x86/kernel/jump_label.c | 99 ++++++++------------------ 3 files changed, 96 insertions(+), 82 deletions(-)
arch/x86/include/asm/text-patching.h +4 -11
@@ -25,14 +25,6 @@ static inline void apply_paravirt(struct paravirt_patch_site *start,*/ #define POKE_MAX_OPCODE_SIZE 5 -struct text_poke_loc { -void *addr; -int len; -s32 rel32; -u8 opcode; -const u8 text[POKE_MAX_OPCODE_SIZE ]; -}; -extern void text_poke_early (void *addr,const void *opcode,size_t len);/*
@@ -53,9 +45,10 @@ extern void *text_poke(void *addr, const void *opcode, size_t len);extern void *text_poke_kgdb (void *addr,const void *opcode,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); -extern void text_poke_bp_batch (struct text_poke_loc *tp,unsigned int nr_entries); -extern void text_poke_loc_init (struct text_poke_loc *tp,void *addr, -const void *opcode,size_t len,const void *emulate); + +extern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate); +extern void text_poke_finish (void ); +extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;extern __ro_after_init unsigned long poking_addr;
arch/x86/kernel/alternative.c +58 -6
94 lines not on this page · raw message
arch/x86/kernel/jump_label.c +34 -65
164 lines not on this page · raw message
[tip: core/kprobes] x86/alternatives, jump_label: Provide better text_poke() batching interface
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 18cbc8bed0c70795d2064217c89894e28eafdf04 Gitweb: https://git.kernel.org/tip/18cbc8bed0c70795d2064217c89894e28eafdf04 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 26 Aug 2019 13:38:58 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/alternatives, jump_label: Provide better text_poke() batching interface
Adding another text_poke_bp_batch() user made me realize the interface is all sorts of wrong. The text poke vector should be internal to the implementation.
This then results in a trivial interface:
text_poke_queue() - which has the 'normal' text_poke_bp() interface text_poke_finish() - which takes no arguments and flushes any
pending text_poke()s.
--- arch/x86/include/asm/text-patching.h | 15 +--- arch/x86/kernel/alternative.c | 64 +++++++++++++++-- arch/x86/kernel/jump_label.c | 99 ++++++++------------------ 3 files changed, 96 insertions(+), 82 deletions(-)
arch/x86/include/asm/text-patching.h +4 -11
@@ -25,14 +25,6 @@ static inline void apply_paravirt(struct paravirt_patch_site *start,*/ #define POKE_MAX_OPCODE_SIZE 5 -struct text_poke_loc { -void *addr; -int len; -s32 rel32; -u8 opcode; -const u8 text[POKE_MAX_OPCODE_SIZE ]; -}; -extern void text_poke_early (void *addr,const void *opcode,size_t len);/*
@@ -53,9 +45,10 @@ extern void *text_poke(void *addr, const void *opcode, size_t len);extern void *text_poke_kgdb (void *addr,const void *opcode,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); -extern void text_poke_bp_batch (struct text_poke_loc *tp,unsigned int nr_entries); -extern void text_poke_loc_init (struct text_poke_loc *tp,void *addr, -const void *opcode,size_t len,const void *emulate); + +extern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate); +extern void text_poke_finish (void ); +extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;extern __ro_after_init unsigned long poking_addr;
arch/x86/kernel/alternative.c +58 -6
94 lines not on this page · raw message
arch/x86/kernel/jump_label.c +34 -65
164 lines not on this page · raw message
Peter Zijlstra
maintainerPATCH 4/17 x86/alternatives: Add and use text_gen_insn() helper
In reply to Peter ZijlstraProvide a simple helper function to create common instruction encodings.
--- arch/x86/include/asm/text-patching.h | 2 + arch/x86/kernel/alternative.c | 36 +++++++++++++++++++++++++++++++++++ arch/x86/kernel/jump_label.c | 31 ++++++++++-------------------- arch/x86/kernel/kprobes/opt.c | 7 ------ 4 files changed, 50 insertions(+), 26 deletions(-)
arch/x86/include/asm/text-patching.h +2 -0
@@ -49,6 +49,8 @@ extern void text_poke_bp(void *addr, conextern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate);extern void text_poke_finish (void ); +extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); +extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;extern __ro_after_init unsigned long poking_addr;
arch/x86/kernel/alternative.c +36 -0
@@ -1237,3 +1237,39 @@ void text_poke_bp(void *addr, const voidtext_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); } + +union text_poke_insn { +u8 text[POKE_MAX_OPCODE_SIZE ]; +struct { +u8 opcode; +s32 disp; + } __attribute__((packed)); +}; + +void *text_gen_insn (u8 opcode,const void *addr,const void *dest) +{ +static union text_poke_insn insn;/* text_mutex */ +int size =0 ; + +lockdep_assert_held (&text_mutex); + + insn.opcode = opcode; + +#define __CASE (insn) \ + case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break + +switch (opcode) { +__CASE (INT3 ); +__CASE (CALL ); +__CASE (JMP32 ); +__CASE (JMP8 ); + } + +if (size >1 ) { + insn.disp = (long )dest - (long )(addr + size); +if (size ==2 ) +BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); + } + +return &insn.text; +}
arch/x86/kernel/jump_label.c +11 -20
@@ -16,15 +16,7 @@#include <asm/alternative.h> #include <asm/text-patching.h> -union jump_code_union { -char code[JUMP_LABEL_NOP_SIZE ]; -struct { -char jump; -int offset; - } __attribute__((packed)); -}; - -static void bug_at (unsigned char *ip,int line) +static void bug_at (const void *ip,int line) {/* * The location is not an op that we were expecting.
@@ -38,33 +30,32 @@ static void bug_at(unsigned char *ip, instatic const void *__jump_label_set_jump_code (struct jump_entry *entry,enum jump_label_type type,int init) { -static union jump_code_union code;/* relies on text_mutex */ const unsigned char default_nop[] = {STATIC_KEY_INIT_NOP };const unsigned char *ideal_nop = ideal_nops[NOP_ATOMIC5 ]; -const void *expect; +const void *expect, *code; +const void *addr, *dest;int line; -lockdep_assert_held (&text_mutex); + addr = (void *)jump_entry_code (entry); + dest = (void *)jump_entry_target (entry); - code.jump =JMP32_INSN_OPCODE ; - code.offset =jump_entry_target (entry) - - (jump_entry_code (entry) +JUMP_LABEL_NOP_SIZE ); + code =text_gen_insn (JMP32_INSN_OPCODE , addr, dest);if (init) { expect = default_nop; line = __LINE__; }else if (type ==JUMP_LABEL_JMP ) { expect = ideal_nop; line = __LINE__; }else { - expect = code.code; line = __LINE__; + expect = code; line = __LINE__; } -if (memcmp ((void *)jump_entry_code (entry), expect,JUMP_LABEL_NOP_SIZE )) -bug_at ((void *)jump_entry_code (entry), line); +if (memcmp (addr, expect,JUMP_LABEL_NOP_SIZE )) +bug_at (addr, line);if (type ==JUMP_LABEL_NOP ) -memcpy (&code, ideal_nop,JUMP_LABEL_NOP_SIZE ); + code = ideal_nop; -return &code; +return code; } static void inline __jump_label_transform(struct jump_entry *entry,
arch/x86/kernel/kprobes/opt.c +1 -6
@@ -447,18 +447,13 @@ void arch_optimize_kprobes(struct list_hvoid arch_unoptimize_kprobe (struct optimized_kprobe *op) {u8 insn_buff[RELATIVEJUMP_SIZE ]; -u8 emulate_buff[RELATIVEJUMP_SIZE ];/* Set int3 to first byte for kprobes */ insn_buff[0 ] =BREAKPOINT_INSTRUCTION ;memcpy (insn_buff +1 , op->optinsn.copied_insn,RELATIVE_ADDR_SIZE ); - emulate_buff[0 ] =RELATIVEJUMP_OPCODE ; - *(s32 *)(&emulate_buff[1 ]) = (s32)((long )op->optinsn.insn - - ((long )op->kp.addr +RELATIVEJUMP_SIZE )); -text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE , - emulate_buff); +text_gen_insn (JMP32_INSN_OPCODE , op->kp.addr, op->optinsn.insn)); }/*
Steven Rostedt
maintainerRe: [PATCH -v5 04/17] x86/alternatives: Add and use text_gen_insn() helper
Quoted 12 lines · On Mon, 11 Nov 2019 14:12:56 +0100 Peter Zijlstra <[email protected]> wrote:
arch/x86/kernel/alternative.c +12
-0+void *text_gen_insn (u8 opcode,const void *addr,const void *dest) +{ +static union text_poke_insn insn;/* text_mutex */ +int size =0 ; + +lockdep_assert_held (&text_mutex); + + insn.opcode = opcode; + +#define __CASE (insn) \ + case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break +
arch/x86/kernel/alternative.c void text_poke_bp(void *addr, const void · line 1270
Quoted 10 lines
arch/x86/kernel/alternative.c +10
-0+switch (opcode) { +__CASE (INT3 ); +__CASE (CALL ); +__CASE (JMP32 ); +__CASE (JMP8 ); + } + +if (size >1 ) { + insn.disp = (long )dest - (long )(addr + size); +if (size ==2 )
Could we add a comment here. It took me a little bit to figure out why you have this BUG_ON().
-- Steve
Quoted 5 lines
arch/x86/kernel/alternative.c +5
-0+BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); + } + +return &insn.text; +}
Peter Zijlstra
maintainerRe: [PATCH -v5 04/17] x86/alternatives: Add and use text_gen_insn() helper
Quoted 20 lines · Steven Rostedt
Quoted 17 lines · On Mon, 11 Nov 2019 14:12:56 +0100 Peter Zijlstra <[email protected]> wrote:
arch/x86/kernel/alternative.c +17
-0+void *text_gen_insn (u8 opcode,const void *addr,const void *dest) +{ +static union text_poke_insn insn;/* text_mutex */ +int size =0 ; + +lockdep_assert_held (&text_mutex); + + insn.opcode = opcode; + +#define __CASE (insn) \ + case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break + +switch (opcode) { +__CASE (INT3 ); +__CASE (CALL ); +__CASE (JMP32 ); +__CASE (JMP8 );
Quoted 8 lines
arch/x86/kernel/alternative.c void text_poke_bp(void *addr, const void · line 1270
Quoted 5 lines
arch/x86/kernel/alternative.c +5
-0+ } + +if (size >1 ) { + insn.disp = (long )dest - (long )(addr + size); +if (size ==2 )Could we add a comment here. It took me a little bit to figure out why you have this
BUG_ON().
:-)
Sure, I'll add something like:
/* * Ensure that for JMP.d8 the displacement * actually fits the signed byte. */
Quoted 5 lines
Quoted 5 lines
arch/x86/kernel/alternative.c +5
-0+BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); + } + +return &insn.text; +}
[tip: core/kprobes] x86/alternatives: Add and use text_gen_insn() helper
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 7eb9fe7b170c81970cc14a9f6bcfed063c2e9ab6 Gitweb: https://git.kernel.org/tip/7eb9fe7b170c81970cc14a9f6bcfed063c2e9ab6 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 03 Oct 2019 14:50:42 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:42 +01:00
x86/alternatives: Add and use text_gen_insn() helper
Provide a simple helper function to create common instruction encodings.
--- arch/x86/include/asm/text-patching.h | 2 ++- arch/x86/kernel/alternative.c | 36 +++++++++++++++++++++++++++- arch/x86/kernel/jump_label.c | 31 ++++++++--------------- arch/x86/kernel/kprobes/opt.c | 7 +----- 4 files changed, 50 insertions(+), 26 deletions(-)
arch/x86/include/asm/text-patching.h +2 -0
@@ -49,6 +49,8 @@ extern void text_poke_bp(void *addr, const void *opcode, size_t len, const voidextern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate);extern void text_poke_finish (void ); +extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); +extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;extern __ro_after_init unsigned long poking_addr;
arch/x86/kernel/alternative.c +36 -0
@@ -1237,3 +1237,39 @@ void text_poke_bp(void *addr, const void *opcode, size_t len, const void *emulattext_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); } + +union text_poke_insn { +u8 text[POKE_MAX_OPCODE_SIZE ]; +struct { +u8 opcode; +s32 disp; + } __attribute__((packed)); +}; + +void *text_gen_insn (u8 opcode,const void *addr,const void *dest) +{ +static union text_poke_insn insn;/* text_mutex */ +int size =0 ; + +lockdep_assert_held (&text_mutex); + + insn.opcode = opcode; + +#define __CASE (insn) \ + case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break + +switch (opcode) { +__CASE (INT3 ); +__CASE (CALL ); +__CASE (JMP32 ); +__CASE (JMP8 ); + } + +if (size >1 ) { + insn.disp = (long )dest - (long )(addr + size); +if (size ==2 ) +BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); + } + +return &insn.text; +}
arch/x86/kernel/jump_label.c +11 -20
@@ -16,15 +16,7 @@#include <asm/alternative.h> #include <asm/text-patching.h> -union jump_code_union { -char code[JUMP_LABEL_NOP_SIZE ]; -struct { -char jump; -int offset; - } __attribute__((packed)); -}; - -static void bug_at (unsigned char *ip,int line) +static void bug_at (const void *ip,int line) {/* * The location is not an op that we were expecting.
@@ -38,33 +30,32 @@ static void bug_at(unsigned char *ip, int line)static const void *__jump_label_set_jump_code (struct jump_entry *entry,enum jump_label_type type,int init) { -static union jump_code_union code;/* relies on text_mutex */ const unsigned char default_nop[] = {STATIC_KEY_INIT_NOP };const unsigned char *ideal_nop = ideal_nops[NOP_ATOMIC5 ]; -const void *expect; +const void *expect, *code; +const void *addr, *dest;int line; -lockdep_assert_held (&text_mutex); + addr = (void *)jump_entry_code (entry); + dest = (void *)jump_entry_target (entry); - code.jump =JMP32_INSN_OPCODE ; - code.offset =jump_entry_target (entry) - - (jump_entry_code (entry) +JUMP_LABEL_NOP_SIZE ); + code =text_gen_insn (JMP32_INSN_OPCODE , addr, dest);if (init) { expect = default_nop; line = __LINE__; }else if (type ==JUMP_LABEL_JMP ) { expect = ideal_nop; line = __LINE__; }else { - expect = code.code; line = __LINE__; + expect = code; line = __LINE__; } -if (memcmp ((void *)jump_entry_code (entry), expect,JUMP_LABEL_NOP_SIZE )) -bug_at ((void *)jump_entry_code (entry), line); +if (memcmp (addr, expect,JUMP_LABEL_NOP_SIZE )) +bug_at (addr, line);if (type ==JUMP_LABEL_NOP ) -memcpy (&code, ideal_nop,JUMP_LABEL_NOP_SIZE ); + code = ideal_nop; -return &code; +return code; } static void inline __jump_label_transform(struct jump_entry *entry,
arch/x86/kernel/kprobes/opt.c +1 -6
@@ -447,18 +447,13 @@ void arch_optimize_kprobes(struct list_head *oplist)void arch_unoptimize_kprobe (struct optimized_kprobe *op) {u8 insn_buff[RELATIVEJUMP_SIZE ]; -u8 emulate_buff[RELATIVEJUMP_SIZE ];/* Set int3 to first byte for kprobes */ insn_buff[0 ] =BREAKPOINT_INSTRUCTION ;memcpy (insn_buff +1 , op->optinsn.copied_insn,RELATIVE_ADDR_SIZE ); - emulate_buff[0 ] =RELATIVEJUMP_OPCODE ; - *(s32 *)(&emulate_buff[1 ]) = (s32)((long )op->optinsn.insn - - ((long )op->kp.addr +RELATIVEJUMP_SIZE )); -text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE , - emulate_buff); +text_gen_insn (JMP32_INSN_OPCODE , op->kp.addr, op->optinsn.insn)); }/*
[tip: core/kprobes] x86/alternatives: Add and use text_gen_insn() helper
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 63f62addb88ec4b358cf4574789bc3180c689e9a Gitweb: https://git.kernel.org/tip/63f62addb88ec4b358cf4574789bc3180c689e9a Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 03 Oct 2019 14:50:42 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/alternatives: Add and use text_gen_insn() helper
Provide a simple helper function to create common instruction encodings.
--- arch/x86/include/asm/text-patching.h | 2 ++- arch/x86/kernel/alternative.c | 36 +++++++++++++++++++++++++++- arch/x86/kernel/jump_label.c | 31 ++++++++--------------- arch/x86/kernel/kprobes/opt.c | 7 +----- 4 files changed, 50 insertions(+), 26 deletions(-)
arch/x86/include/asm/text-patching.h +2 -0
@@ -49,6 +49,8 @@ extern void text_poke_bp(void *addr, const void *opcode, size_t len, const voidextern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate);extern void text_poke_finish (void ); +extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); +extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;extern __ro_after_init unsigned long poking_addr;
arch/x86/kernel/alternative.c +36 -0
@@ -1237,3 +1237,39 @@ void text_poke_bp(void *addr, const void *opcode, size_t len, const void *emulattext_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); } + +union text_poke_insn { +u8 text[POKE_MAX_OPCODE_SIZE ]; +struct { +u8 opcode; +s32 disp; + } __attribute__((packed)); +}; + +void *text_gen_insn (u8 opcode,const void *addr,const void *dest) +{ +static union text_poke_insn insn;/* text_mutex */ +int size =0 ; + +lockdep_assert_held (&text_mutex); + + insn.opcode = opcode; + +#define __CASE (insn) \ + case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break + +switch (opcode) { +__CASE (INT3 ); +__CASE (CALL ); +__CASE (JMP32 ); +__CASE (JMP8 ); + } + +if (size >1 ) { + insn.disp = (long )dest - (long )(addr + size); +if (size ==2 ) +BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); + } + +return &insn.text; +}
arch/x86/kernel/jump_label.c +11 -20
@@ -16,15 +16,7 @@#include <asm/alternative.h> #include <asm/text-patching.h> -union jump_code_union { -char code[JUMP_LABEL_NOP_SIZE ]; -struct { -char jump; -int offset; - } __attribute__((packed)); -}; - -static void bug_at (unsigned char *ip,int line) +static void bug_at (const void *ip,int line) {/* * The location is not an op that we were expecting.
@@ -38,33 +30,32 @@ static void bug_at(unsigned char *ip, int line)static const void *__jump_label_set_jump_code (struct jump_entry *entry,enum jump_label_type type,int init) { -static union jump_code_union code;/* relies on text_mutex */ const unsigned char default_nop[] = {STATIC_KEY_INIT_NOP };const unsigned char *ideal_nop = ideal_nops[NOP_ATOMIC5 ]; -const void *expect; +const void *expect, *code; +const void *addr, *dest;int line; -lockdep_assert_held (&text_mutex); + addr = (void *)jump_entry_code (entry); + dest = (void *)jump_entry_target (entry); - code.jump =JMP32_INSN_OPCODE ; - code.offset =jump_entry_target (entry) - - (jump_entry_code (entry) +JUMP_LABEL_NOP_SIZE ); + code =text_gen_insn (JMP32_INSN_OPCODE , addr, dest);if (init) { expect = default_nop; line = __LINE__; }else if (type ==JUMP_LABEL_JMP ) { expect = ideal_nop; line = __LINE__; }else { - expect = code.code; line = __LINE__; + expect = code; line = __LINE__; } -if (memcmp ((void *)jump_entry_code (entry), expect,JUMP_LABEL_NOP_SIZE )) -bug_at ((void *)jump_entry_code (entry), line); +if (memcmp (addr, expect,JUMP_LABEL_NOP_SIZE )) +bug_at (addr, line);if (type ==JUMP_LABEL_NOP ) -memcpy (&code, ideal_nop,JUMP_LABEL_NOP_SIZE ); + code = ideal_nop; -return &code; +return code; } static void inline __jump_label_transform(struct jump_entry *entry,
arch/x86/kernel/kprobes/opt.c +1 -6
@@ -447,18 +447,13 @@ void arch_optimize_kprobes(struct list_head *oplist)void arch_unoptimize_kprobe (struct optimized_kprobe *op) {u8 insn_buff[RELATIVEJUMP_SIZE ]; -u8 emulate_buff[RELATIVEJUMP_SIZE ];/* Set int3 to first byte for kprobes */ insn_buff[0 ] =BREAKPOINT_INSTRUCTION ;memcpy (insn_buff +1 , op->optinsn.copied_insn,RELATIVE_ADDR_SIZE ); - emulate_buff[0 ] =RELATIVEJUMP_OPCODE ; - *(s32 *)(&emulate_buff[1 ]) = (s32)((long )op->optinsn.insn - - ((long )op->kp.addr +RELATIVEJUMP_SIZE )); -text_poke_bp (op->kp.addr, insn_buff,RELATIVEJUMP_SIZE , - emulate_buff); +text_gen_insn (JMP32_INSN_OPCODE , op->kp.addr, op->optinsn.insn)); }/*
Peter Zijlstra
maintainerPATCH 5/17 x86/ftrace: Use text_poke()
In reply to Peter ZijlstraMove ftrace over to using the generic x86 text_poke functions; this avoids having a second/different copy of that code around.
This also avoids ftrace violating the (new) W^X rule and avoids fragmenting the kernel text page-tables, due to no longer having to toggle them RW.
--- arch/x86/include/asm/ftrace.h | 2 arch/x86/kernel/alternative.c | 18 - arch/x86/kernel/ftrace.c | 666 +++++++----------------------------------- arch/x86/kernel/traps.c | 9 4 files changed, 133 insertions(+), 562 deletions(-)
arch/x86/include/asm/ftrace.h +0 -2
@@ -34,8 +34,6 @@ struct dyn_arch_ftrace { /* No extra data needed for x86 */ }; -int ftrace_int3_handler (struct pt_regs *regs); -#define FTRACE_GRAPH_TRAMP_ADDR FTRACE_GRAPH_ADDR#endif /* CONFIG_DYNAMIC_FTRACE */
arch/x86/kernel/alternative.c +14 -4
@@ -949,7 +949,7 @@ static struct bp_patching_desc {int nr_entries; } bp_patching; -static int patch_cmp (const void *key,const void *elt) +static int notrace patch_cmp(const void *key, const void *elt) {struct text_poke_loc *tp = (struct text_poke_loc *) elt;
@@ -961,7 +961,7 @@ static int patch_cmp(const void *key, co }NOKPROBE_SYMBOL (patch_cmp); -int poke_int3_handler (struct pt_regs *regs) +int notrace poke_int3_handler(struct pt_regs *regs) {struct text_poke_loc *tp;void *ip;
@@ -1209,10 +1209,15 @@ void text_poke_finish(void)text_poke_flush (NULL ); } -void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate) +void __ref text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate) {struct text_poke_loc *tp; +if (unlikely (system_state ==SYSTEM_BOOTING )) { +text_poke_early (addr, opcode, len); +return ; + } +text_poke_flush (addr); tp = &tp_vec[tp_vec_nr++];
@@ -1230,10 +1235,15 @@ void text_poke_queue(void *addr, const v* dynamically allocated memory. This function should be used when it is * not possible to allocate memory. */ -void text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate) +void __ref text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate) {struct text_poke_loc tp; +if (unlikely (system_state ==SYSTEM_BOOTING )) { +text_poke_early (addr, opcode, len); +return ; + } +text_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); }
arch/x86/kernel/ftrace.c +119 -547
857 lines not on this page · raw message
arch/x86/kernel/traps.c +0 -9
@@ -563,15 +563,6 @@ NOKPROBE_SYMBOL(do_general_protection); dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code) { -#ifdef CONFIG_DYNAMIC_FTRACE -/* -* ftrace must be first, everything else may cause a recursive crash. -* See note by declaration of modifying_ftrace_code in ftrace.c -*/ -if (unlikely (atomic_read (&modifying_ftrace_code)) && -ftrace_int3_handler (regs)) -return ; -#endif if (poke_int3_handler (regs))return ;
Steven Rostedt
maintainerRe: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
Quoted 17 lines · On Mon, 11 Nov 2019 14:12:57 +0100 Peter Zijlstra <[email protected]> wrote:
arch/x86/kernel/ftrace.c +2
-2@@ -34,6 +34,8 @@#ifdef CONFIG_DYNAMIC_FTRACE +static int ftrace_poke_late =0 ; +int ftrace_arch_code_modify_prepare (void ) __acquires(&text_mutex) {@@ -43,16 +45,15 @@ int ftrace_arch_code_modify_prepare(void* ftrace has it set to "read/write". */ mutex_lock (&text_mutex); -set_kernel_text_rw (); -set_all_modules_text_rw ();
arch/x86/kernel/ftrace.c int ftrace_arch_code_modify_prepare(void · line 55
Quoted 10 lines
arch/x86/kernel/ftrace.c +2
-2+ ftrace_poke_late =1 ;return 0 ; }int ftrace_arch_code_modify_post_process (void ) __releases(&text_mutex) { -set_all_modules_text_ro (); -set_kernel_text_ro (); +text_poke_finish ();
Why is the text_poke_finish() needed here? Can we add a comment about why?
Quoted 32 lines
arch/x86/kernel/ftrace.c +5
-10+ ftrace_poke_late =0 ;mutex_unlock (&text_mutex);return 0 ; }@@ -60,67 +61,34 @@ int ftrace_arch_code_modify_post_processunion ftrace_code_union {char code[MCOUNT_INSN_SIZE ];struct { -unsigned char op; +char op;int offset; } __attribute__((packed)); }; -static int ftrace_calc_offset (long ip,long addr) -{ -return (int )(addr - ip); -} - -static unsigned char * -ftrace_text_replace (unsigned char op,unsigned long ip,unsigned long addr) +static const char *ftrace_text_replace (char op,unsigned long ip,unsigned long addr) {static union ftrace_code_union calc; - calc.op = op; - calc.offset =ftrace_calc_offset (ip +MCOUNT_INSN_SIZE , addr); + calc.op = op; + calc.offset = (int )(addr - (ip +MCOUNT_INSN_SIZE ));return calc.code; }
[..]
Quoted 12 lines
/* Return the address of the function the trampoline calls */
arch/x86/kernel/ftrace.c +2
-2@@ -981,19 +555,18 @@ void arch_ftrace_trampoline_free(struct#ifdef CONFIG_DYNAMIC_FTRACE extern void ftrace_graph_call (void ); -static unsigned char *ftrace_jmp_replace (unsigned long ip,unsigned long addr) +static const char *ftrace_jmp_replace (unsigned long ip,unsigned long addr) { -return ftrace_text_replace (0xe9 , ip, addr); +return ftrace_text_replace (JMP32_INSN_OPCODE , ip, addr); }
arch/x86/kernel/ftrace.c void arch_ftrace_trampoline_free(struct · line 568
Quoted 10 lines
arch/x86/kernel/ftrace.c +2
-4static int ftrace_mod_jmp (unsigned long ip,void *func) { -unsigned char *new; +const char *new; - ftrace_update_func_call =0UL ; new =ftrace_jmp_replace (ip, (unsigned long )func); - -return update_ftrace_func (ip, new); +text_poke_bp ((void *)ip, new,MCOUNT_INSN_SIZE ,NULL );// BATCH
What do you mean by "BATCH" ?
-- Steve
Quoted 35 lines
arch/x86/kernel/ftrace.c +2
-2+return 0 ; }int ftrace_enable_ftrace_graph_caller (void )@@ -1019,10 +592,9 @@ int ftrace_disable_ftrace_graph_caller(vvoid prepare_ftrace_return (unsigned long self_addr,unsigned long *parent,unsigned long frame_pointer) { +unsigned long return_hooker = (unsigned long )&return_to_handler;unsigned long old;int faulted; -unsigned long return_hooker = (unsigned long ) - &return_to_handler;/* * When resuming from suspend-to-ram, this function can be indirectly arch/x86/kernel/traps.c +0
-9@@ -563,15 +563,6 @@ NOKPROBE_SYMBOL(do_general_protection); dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code) { -#ifdef CONFIG_DYNAMIC_FTRACE -/* -* ftrace must be first, everything else may cause a recursive crash. -* See note by declaration of modifying_ftrace_code in ftrace.c -*/ -if (unlikely (atomic_read (&modifying_ftrace_code)) && -ftrace_int3_handler (regs)) -return ; -#endif if (poke_int3_handler (regs))return ;
Peter Zijlstra
maintainerRe: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
Quoted 12 lines · Steven Rostedt
arch/x86/kernel/ftrace.c int ftrace_arch_code_modify_prepare(void · line 55
Quoted 6 lines · On Mon, 11 Nov 2019 14:12:57 +0100 Peter Zijlstra <[email protected]> wrote:
int
ftrace_arch_code_modify_post_process(void)__releases(&text_mutex){
arch/x86/kernel/ftrace.c +1
-2-set_all_modules_text_ro (); -set_kernel_text_ro (); +text_poke_finish ();Why is the
text_poke_finish()needed here? Can we add a comment about why?
I think this is because of the text_poke_queue() in ftrace_modify_code_direct(). I seem to have forgotten the code-flow between the core and arch parts of ftrace again.
But sure, I can try and dig that out again and write a comment.
Quoted 3 lines
arch/x86/kernel/ftrace.c void arch_ftrace_trampoline_free(struct · line 568
Quoted 1 line
arch/x86/kernel/ftrace.c +1
-0+text_poke_bp ((void *)ip, new,MCOUNT_INSN_SIZE ,NULL );// BATCH What do you mean by "BATCH" ?
Ah, that was a question, can/should we use text_poke_queue() there?
Steven Rostedt
maintainerRe: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
Quoted 14 lines · On Tue, 12 Nov 2019 23:24:13 +0100 Peter Zijlstra <[email protected]> wrote:
Quoted 12 lines · Steven Rostedt
arch/x86/kernel/ftrace.c int ftrace_arch_code_modify_prepare(void · line 55
Quoted 6 lines · On Mon, 11 Nov 2019 14:12:57 +0100 Peter Zijlstra <[email protected]> wrote:
int
ftrace_arch_code_modify_post_process(void)__releases(&text_mutex){
arch/x86/kernel/ftrace.c +1
-2-set_all_modules_text_ro (); -set_kernel_text_ro (); +text_poke_finish ();Why is the
text_poke_finish()needed here? Can we add a comment about why?
Quoted 3 lines
I think this is because of the
text_poke_queue()inftrace_modify_code_direct(). I seem to have forgotten the code-flow between the core and arch parts of ftrace again.
Hmm, I don't think there's a case where ftrace_make_nop() or ftrace_make_call() ever use the queued function. I added this:
static int
ftrace_modify_code_direct(unsigned long ip, const char *old_code,
const char *new_code)
{
int ret = ftrace_verify_code(ip, old_code);
if (ret)
return ret;
/* replace the text with the new text */
- if (ftrace_poke_late)
+ if (ftrace_poke_late) {
+ printk("POKE LATE!\n");
text_poke_queue((void *)ip, new_code, MCOUNT_INSN_SIZE, NULL);
- else
+ } else
text_poke_early((void *)ip, new_code, MCOUNT_INSN_SIZE);
return 0;
}
And that printk() never printed, even after running the ftracetests.
Quoted 9 lines
But sure, I can try and dig that out again and write a comment.
Quoted 3 lines
arch/x86/kernel/ftrace.c void arch_ftrace_trampoline_free(struct · line 568
Quoted 1 line
arch/x86/kernel/ftrace.c +1
-0+text_poke_bp ((void *)ip, new,MCOUNT_INSN_SIZE ,NULL );// BATCH What do you mean by "BATCH" ?
Ah, that was a question, can/should we use
text_poke_queue()there?
Probably not, as that's just a single location or two. It modifies the static trampolines if only a single user is registered to ftrace.
-- Steve
Peter Zijlstra
maintainerRe: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
Quoted 43 lines · Steven Rostedt
Quoted 14 lines · On Tue, 12 Nov 2019 23:24:13 +0100 Peter Zijlstra <[email protected]> wrote:
Quoted 12 lines · Steven Rostedt
arch/x86/kernel/ftrace.c int ftrace_arch_code_modify_prepare(void · line 55
Quoted 6 lines · On Mon, 11 Nov 2019 14:12:57 +0100 Peter Zijlstra <[email protected]> wrote:
int
ftrace_arch_code_modify_post_process(void)__releases(&text_mutex){
arch/x86/kernel/ftrace.c +1
-2-set_all_modules_text_ro (); -set_kernel_text_ro (); +text_poke_finish ();Why is the
text_poke_finish()needed here? Can we add a comment about why?Quoted 3 lines
I think this is because of the
text_poke_queue()inftrace_modify_code_direct(). I seem to have forgotten the code-flow between the core and arch parts of ftrace again.Hmm, I don't think there's a case where
ftrace_make_nop()orftrace_make_call()ever use the queued function. I added this:static int
ftrace_modify_code_direct(unsigned long ip, const char*old_code,(quoted diff) +3
-2const char *new_code) { int ret = ftrace_verify_code(ip, old_code); if (ret) return ret; /* replace the text with the new text */ - if (ftrace_poke_late) + if (ftrace_poke_late) { + printk("POKE LATE!\n"); text_poke_queue((void *)ip, new_code, MCOUNT_INSN_SIZE, NULL); - else + } else text_poke_early((void *)ip, new_code, MCOUNT_INSN_SIZE); return 0; }
Quoted 1 line
And that
printk()never printed, even after running the ftracetests.
Well, then wth did it do that set_all_modules_text_rw() nonsense? Because all I did was preserve that semantic.
Anyway, all this can be greatly simplified once we get KLP fixed and can move where we flip modules RO,X.
At that point we can merge ftrace_module_init() and ftrace_module_enable() (both will run before RO,X) and the core code will loose the ftrace_arch_code_modify_*() calls (for that callchain) and then we can remove ftrace_poke_late.
So I'll keep this for now, because it does exactly what the old code did, and then we can clean it all up once the other stuff lands and everything gets simpler.
Steven Rostedt
maintainerRe: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
Quoted 4 lines · On Wed, 13 Nov 2019 10:01:04 +0100 Peter Zijlstra <[email protected]> wrote:
Quoted 1 line
And that
printk()never printed, even after running the ftracetests.Well, then wth did it do that
set_all_modules_text_rw()nonsense? Because all I did was preserve that semantic.
Because the ftracetests obviously is missing a check :-p
It never printed when running those tests, but when I did a simple:
# trace-cmd start -p function # modprobe <some-module>
The printk appeared.
Yeah, let's keep it this way, but still needs a comment.
-- Steve
Peter Zijlstra
maintainerRe: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
Quoted 1 line · Steven Rostedt
Yeah, let's keep it this way, but still needs a comment.
The function now reads:
int ftrace_arch_code_modify_post_process(void)
__releases(&text_mutex)
{
/*
* ftrace_module_enable()
* ftrace_arch_code_modify_prepare()
* do_for_each_ftrace_rec()
* __ftrace_replace_code()
* ftrace_make_{call,nop}()
* ftrace_modify_code_direct()
* text_poke_queue()
* ftrace_arch_code_modify_post_process()
* text_poke_finish()
*/
text_poke_finish();
ftrace_poke_late = 0;
mutex_unlock(&text_mutex);
return 0;
}
Patch is otherwise unchanged.
Re: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
Quoted 8 lines · On Thu, 14 Nov 2019 14:18:27 +0100 Peter Zijlstra <[email protected]> wrote:
Quoted 1 line · Steven Rostedt
Yeah, let's keep it this way, but still needs a comment.
The function now reads:
int
ftrace_arch_code_modify_post_process(void)__releases(&text_mutex)
Quoted 11 lines
{
/*
*ftrace_module_enable()
*ftrace_arch_code_modify_prepare()
*do_for_each_ftrace_rec()
*__ftrace_replace_code()
* ftrace_make_{call,nop}()
*ftrace_modify_code_direct()
*text_poke_queue()
*ftrace_arch_code_modify_post_process()
*text_poke_finish()
Perhaps just:
/*
* ftrace_make_{call,nop}() may be called during
* module load, and we need to finish the text_poke_queue()
* that they do, here.
Quoted 10 lines
*/ text_poke_finish(); ftrace_poke_late = 0; mutex_unlock(&text_mutex); return 0; }Patch is otherwise unchanged.
Other than that:
-- Steve
Peter Zijlstra
maintainerRe: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
Quoted 38 lines · Steven Rostedt
Quoted 8 lines · On Thu, 14 Nov 2019 14:18:27 +0100 Peter Zijlstra <[email protected]> wrote:
Quoted 1 line · Steven Rostedt
Yeah, let's keep it this way, but still needs a comment.
The function now reads:
int
ftrace_arch_code_modify_post_process(void)__releases(&text_mutex)Quoted 11 lines
{
/*
*ftrace_module_enable()
*ftrace_arch_code_modify_prepare()
*do_for_each_ftrace_rec()
*__ftrace_replace_code()
* ftrace_make_{call,nop}()
*ftrace_modify_code_direct()
*text_poke_queue()
*ftrace_arch_code_modify_post_process()
*text_poke_finish()Perhaps just:
/*
* ftrace_make_{call,nop}() may be called during
* module load, and we need to finish thetext_poke_queue()
* that they do, here.Quoted 9 lines
*/ text_poke_finish(); ftrace_poke_late = 0; mutex_unlock(&text_mutex); return 0; }
Quoted 5 lines
Quoted 1 line
Patch is otherwise unchanged.
Other than that:
Reviewed-by Steven Rostedt (VMware) <[email protected]>
Done and thanks!
Peter Zijlstra
maintainerRe: [PATCH -v5 05/17] x86/ftrace: Use text_poke()
In reply to Peter ZijlstraQuoted 14 lines · Peter Zijlstra
Quoted 12 lines · Steven Rostedt
arch/x86/kernel/ftrace.c int ftrace_arch_code_modify_prepare(void · line 55
Quoted 6 lines · On Mon, 11 Nov 2019 14:12:57 +0100 Peter Zijlstra <[email protected]> wrote:
int
ftrace_arch_code_modify_post_process(void)__releases(&text_mutex){
arch/x86/kernel/ftrace.c +1
-2-set_all_modules_text_ro (); -set_kernel_text_ro (); +text_poke_finish ();Why is the
text_poke_finish()needed here? Can we add a comment about why?
Quoted 5 lines
I think this is because of the
text_poke_queue()inftrace_modify_code_direct(). I seem to have forgotten the code-flow between the core and arch parts of ftrace again.But sure, I can try and dig that out again and write a comment.
These are the two callgraphs:
ftrace_module_enable()
ftrace_arch_code_modify_prepare()
do_for_each_ftrace_rec()
__ftrace_replace_code()
ftrace_make_{call,nop}()
ftrace_modify_code_direct()
text_poke_queue()
ftrace_arch_code_modify_post_process()
text_poke_finish(); ftrace_run_update_code()
ftrace_arch_code_modify_prepare()
arch_ftrace_update_code()
ftrace_modify_all_code()
ftrace_replace_code()
for_ftrace_rec_iter()
text_poke_queue()
text_poke_finish()
ftrace_arch_code_modify_post_process()
text_poke_finish()
So while it is superfluous for ftrace_run_update_code() it is required for ftrace_module_enable(), and, as I said, pairs with the text_poke_queue() in ftrace_modify_code_direct().
I'll stick in a comment.
[tip: core/kprobes] x86/ftrace: Use text_poke()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 9706f7c3531fee00505ebd03bf3aa0af76510877 Gitweb: https://git.kernel.org/tip/9706f7c3531fee00505ebd03bf3aa0af76510877 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 26 Aug 2019 14:48:23 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:42 +01:00
x86/ftrace: Use text_poke()
Move ftrace over to using the generic x86 text_poke functions; this avoids having a second/different copy of that code around.
This also avoids ftrace violating the (new) W^X rule and avoids fragmenting the kernel text page-tables, due to no longer having to toggle them RW.
--- arch/x86/include/asm/ftrace.h | 2 +- arch/x86/kernel/alternative.c | 18 +- arch/x86/kernel/ftrace.c | 663 +++++---------------------------- arch/x86/kernel/traps.c | 9 +- 4 files changed, 134 insertions(+), 558 deletions(-)
arch/x86/include/asm/ftrace.h +0 -2
@@ -34,8 +34,6 @@ struct dyn_arch_ftrace { /* No extra data needed for x86 */ }; -int ftrace_int3_handler (struct pt_regs *regs); -#define FTRACE_GRAPH_TRAMP_ADDR FTRACE_GRAPH_ADDR#endif /* CONFIG_DYNAMIC_FTRACE */
arch/x86/kernel/alternative.c +14 -4
@@ -949,7 +949,7 @@ static struct bp_patching_desc {int nr_entries; } bp_patching; -static int patch_cmp (const void *key,const void *elt) +static int notrace patch_cmp(const void *key, const void *elt) {struct text_poke_loc *tp = (struct text_poke_loc *) elt;
@@ -961,7 +961,7 @@ static int patch_cmp(const void *key, const void *elt) }NOKPROBE_SYMBOL (patch_cmp); -int poke_int3_handler (struct pt_regs *regs) +int notrace poke_int3_handler(struct pt_regs *regs) {struct text_poke_loc *tp;void *ip;
@@ -1209,10 +1209,15 @@ void text_poke_finish(void)text_poke_flush (NULL ); } -void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate) +void __ref text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate) {struct text_poke_loc *tp; +if (unlikely (system_state ==SYSTEM_BOOTING )) { +text_poke_early (addr, opcode, len); +return ; + } +text_poke_flush (addr); tp = &tp_vec[tp_vec_nr++];
@@ -1230,10 +1235,15 @@ void text_poke_queue(void *addr, const void *opcode, size_t len, const void *emu* dynamically allocated memory. This function should be used when it is * not possible to allocate memory. */ -void text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate) +void __ref text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate) {struct text_poke_loc tp; +if (unlikely (system_state ==SYSTEM_BOOTING )) { +text_poke_early (addr, opcode, len); +return ; + } +text_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); }
arch/x86/kernel/ftrace.c +120 -543
858 lines not on this page · raw message
arch/x86/kernel/traps.c +0 -9
@@ -568,15 +568,6 @@ NOKPROBE_SYMBOL(do_general_protection); dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code) { -#ifdef CONFIG_DYNAMIC_FTRACE -/* -* ftrace must be first, everything else may cause a recursive crash. -* See note by declaration of modifying_ftrace_code in ftrace.c -*/ -if (unlikely (atomic_read (&modifying_ftrace_code)) && -ftrace_int3_handler (regs)) -return ; -#endif if (poke_int3_handler (regs))return ;
Borislav Petkov
maintainerRe: [tip: core/kprobes] x86/ftrace: Use text_poke()
Quoted 38 lines · On Fri, Nov 15, 2019 at 09:43:10AM -0000, tip-bot2 for Peter Zijlstra wrote:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 9706f7c3531fee00505ebd03bf3aa0af76510877 Gitweb: https://git.kernel.org/tip/9706f7c3531fee00505ebd03bf3aa0af76510877 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 26 Aug 2019 14:48:23 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:42 +01:00x86/ftrace: Use
text_poke()Move ftrace over to using the generic x86
text_pokefunctions; this avoids having a second/different copy of that code around.This also avoids ftrace violating the (new) W^X rule and avoids fragmenting the kernel text page-tables, due to no longer having to toggle them RW.
Tested-by Alexei Starovoitov <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>Reviewed-by Steven Rostedt (VMware) <[email protected]>Cc Andy Lutomirski <[email protected]>Cc Borislav Petkov <[email protected]>Cc Daniel Bristot de Oliveira <[email protected]>Cc H. Peter Anvin <[email protected]>Cc Josh Poimboeuf <[email protected]>Cc Linus Torvalds <[email protected]>Cc Thomas Gleixner <[email protected]>Signed-off-by Ingo Molnar <[email protected]>--- arch/x86/include/asm/ftrace.h | 2 +- arch/x86/kernel/alternative.c | 18 +- arch/x86/kernel/ftrace.c | 663 +++++---------------------------- arch/x86/kernel/traps.c | 9 +- 4 files changed, 134 insertions(+), 558 deletions(-)
...
arch/x86/kernel/ftrace.c ftrace_modify_code_direct(unsigned long ip, unsigned const char *old_code, · line 132
Quoted 13 lines
arch/x86/kernel/ftrace.c +12
-0+static int +ftrace_modify_code_direct (unsigned long ip,const char *old_code, +const char *new_code) +{ +int ret =ftrace_verify_code (ip, old_code); +if (ret) +return ret; +/* replace the text with the new text */ +if (ftrace_poke_late) +text_poke_queue ((void *)ip, new_code,MCOUNT_INSN_SIZE ,NULL ); +else +text_poke_early ((void *)ip, new_code,MCOUNT_INSN_SIZE );
Btw:
WARNING: vmlinux.o(.text+0x8c0b1): Section mismatch in reference from the function ftrace_modify_code_direct() to the function .init.text:text_poke_early() The function ftrace_modify_code_direct() references
the function __init text_poke_early().
This is often because ftrace_modify_code_direct lacks a __init
annotation or the annotation of text_poke_early is wrong.
FATAL: modpost: Section mismatches detected.
Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. make[1]: *** [scripts/Makefile.modpost:66: __modpost] Error 1
make: *** [Makefile:1077: vmlinux] Error 2
random .config attached.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 5.4.0-rc7 Kernel Configuration
#
#
# Compiler: gcc-8 (Debian 8.3.0-23) 8.3.0
#CONFIG_CC_IS_GCC=yCONFIG_GCC_VERSION=80300CONFIG_CLANG_VERSION=0CONFIG_CC_CAN_LINK=yCONFIG_CC_HAS_ASM_GOTO=yCONFIG_CC_HAS_ASM_INLINE=yCONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=yCONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=yCONFIG_CONSTRUCTORS=yCONFIG_IRQ_WORK=yCONFIG_BUILDTIME_EXTABLE_SORT=yCONFIG_THREAD_INFO_IN_TASK=y
#
# General setup
#CONFIG_BROKEN_ON_SMP=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_COMPILE_TEST=yCONFIG_HEADER_TEST=yCONFIG_KERNEL_HEADER_TEST=yCONFIG_UAPI_HEADER_TEST=yCONFIG_LOCALVERSION=""CONFIG_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=y
# CONFIG_KERNEL_GZIP is not setCONFIG_KERNEL_BZIP2=y
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not setCONFIG_DEFAULT_HOSTNAME="(none)"CONFIG_SWAP=y
# CONFIG_SYSVIPC is not set
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_CROSS_MEMORY_ATTACH is not setCONFIG_USELIB=y
# CONFIG_AUDIT is not setCONFIG_HAVE_ARCH_AUDITSYSCALL=y
#
# IRQ subsystem
#CONFIG_GENERIC_IRQ_PROBE=yCONFIG_GENERIC_IRQ_SHOW=yCONFIG_GENERIC_IRQ_CHIP=yCONFIG_IRQ_DOMAIN=yCONFIG_IRQ_SIM=yCONFIG_IRQ_DOMAIN_HIERARCHY=yCONFIG_GENERIC_MSI_IRQ=yCONFIG_GENERIC_MSI_IRQ_DOMAIN=yCONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=yCONFIG_GENERIC_IRQ_RESERVATION_MODE=yCONFIG_IRQ_FORCED_THREADING=yCONFIG_SPARSE_IRQ=yCONFIG_GENERIC_IRQ_DEBUGFS=y
# end of IRQ subsystem
CONFIG_CLOCKSOURCE_WATCHDOG=yCONFIG_ARCH_CLOCKSOURCE_DATA=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=y
#
# Timers subsystem
#CONFIG_TICK_ONESHOT=yCONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not setCONFIG_NO_HZ_IDLE=yCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=y
# end of Timers subsystem
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
#
# CPU/Task time and stats accounting
#CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not setCONFIG_IRQ_TIME_ACCOUNTING=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_PSI is not set
# end of CPU/Task time and stats accounting
CONFIG_CPU_ISOLATION=y
#
# RCU Subsystem
#CONFIG_TINY_RCU=y
# CONFIG_RCU_EXPERT is not setCONFIG_SRCU=yCONFIG_TINY_SRCU=y
# end of RCU Subsystem
CONFIG_BUILD_BIN2C=y
# CONFIG_IKCONFIG is not setCONFIG_IKHEADERS=yCONFIG_LOG_BUF_SHIFT=17CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
#
# Scheduler features
#
# end of Scheduler features
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=yCONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=yCONFIG_ARCH_SUPPORTS_INT128=yCONFIG_CGROUPS=yCONFIG_PAGE_COUNTER=yCONFIG_MEMCG=yCONFIG_MEMCG_SWAP=yCONFIG_MEMCG_SWAP_ENABLED=yCONFIG_MEMCG_KMEM=y
# CONFIG_BLK_CGROUP is not setCONFIG_CGROUP_SCHED=y
# CONFIG_FAIR_GROUP_SCHED is not set
# CONFIG_RT_GROUP_SCHED is not set
# CONFIG_CGROUP_PIDS is not set
# CONFIG_CGROUP_RDMA is not set
# CONFIG_CGROUP_FREEZER is not set
# CONFIG_CGROUP_HUGETLB is not set
# CONFIG_CGROUP_DEVICE is not setCONFIG_CGROUP_CPUACCT=y
# CONFIG_CGROUP_PERF is not set
# CONFIG_CGROUP_DEBUG is not setCONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not setCONFIG_USER_NS=yCONFIG_PID_NS=yCONFIG_NET_NS=y
# CONFIG_CHECKPOINT_RESTORE is not set
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not setCONFIG_RELAY=y
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not setCONFIG_CC_OPTIMIZE_FOR_SIZE=yCONFIG_SYSCTL=yCONFIG_HAVE_UID16=yCONFIG_SYSCTL_EXCEPTION_TRACE=yCONFIG_HAVE_PCSPKR_PLATFORM=yCONFIG_BPF=y
# CONFIG_EXPERT is not setCONFIG_UID16=yCONFIG_MULTIUSER=yCONFIG_SGETMASK_SYSCALL=yCONFIG_SYSFS_SYSCALL=yCONFIG_FHANDLE=yCONFIG_POSIX_TIMERS=yCONFIG_PRINTK=yCONFIG_PRINTK_NMI=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=y
# CONFIG_KALLSYMS_ALL is not setCONFIG_KALLSYMS_BASE_RELATIVE=y
# CONFIG_BPF_SYSCALL is not set
# CONFIG_USERFAULTFD is not setCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=yCONFIG_RSEQ=y
# CONFIG_EMBEDDED is not setCONFIG_HAVE_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_VM_EVENT_COUNTERS=yCONFIG_COMPAT_BRK=yCONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLAB_MERGE_DEFAULT is not set
# CONFIG_SLAB_FREELIST_RANDOM is not setCONFIG_SHUFFLE_PAGE_ALLOCATOR=yCONFIG_PROFILING=yCONFIG_TRACEPOINTS=y
# end of General setup
CONFIG_64BIT=yCONFIG_X86_64=yCONFIG_X86=yCONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf64-x86-64" CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=yCONFIG_MMU=yCONFIG_ARCH_MMAP_RND_BITS_MIN=28 CONFIG_ARCH_MMAP_RND_BITS_MAX=32 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 CONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_BUG=y CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_ARCH_HAS_FILTER_PGPROT=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ZONE_DMA32=yCONFIG_AUDIT_ARCH=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000 CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_DYNAMIC_PHYSICAL_MASK=y CONFIG_PGTABLE_LEVELS=4 CONFIG_CC_HAS_SANE_STACKPROTECTOR=y
#
# Processor type and features
#CONFIG_ZONE_DMA=y
# CONFIG_SMP is not set CONFIG_X86_FEATURE_NAMES=y
# CONFIG_X86_X2APIC is not set
# CONFIG_X86_MPPARSE is not set
# CONFIG_GOLDFISH is not set CONFIG_RETPOLINE=yCONFIG_X86_CPU_RESCTRL=y CONFIG_X86_EXTENDED_PLATFORM=y CONFIG_X86_GOLDFISH=y
# CONFIG_X86_INTEL_MID is not set
# CONFIG_IOSF_MBI is not set
# CONFIG_SCHED_OMIT_FRAME_POINTER is not set CONFIG_HYPERVISOR_GUEST=yCONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_DEBUG is not set
# CONFIG_XEN is not setCONFIG_KVM_GUEST=y CONFIG_ARCH_CPUIDLE_HALTPOLL=y
# CONFIG_PVH is not set
# CONFIG_KVM_DEBUG_FS is not set CONFIG_PARAVIRT_TIME_ACCOUNTING=y CONFIG_PARAVIRT_CLOCK=y
# CONFIG_JAILHOUSE_GUEST is not set
# CONFIG_ACRN_GUEST is not set
# CONFIG_MK8 is not setCONFIG_MPSC=y
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
# CONFIG_GENERIC_CPU is not set CONFIG_X86_INTERNODE_CACHE_SHIFT=7 CONFIG_X86_L1_CACHE_SHIFT=7 CONFIG_X86_P6_NOP=yCONFIG_X86_TSC=yCONFIG_X86_CMPXCHG64=yCONFIG_X86_CMOV=y CONFIG_X86_MINIMUM_CPU_FAMILY=64 CONFIG_X86_DEBUGCTLMSR=y CONFIG_CPU_SUP_INTEL=yCONFIG_CPU_SUP_AMD=yCONFIG_CPU_SUP_HYGON=y CONFIG_CPU_SUP_CENTAUR=y CONFIG_CPU_SUP_ZHAOXIN=yCONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=yCONFIG_DMI=y
# CONFIG_GART_IOMMU is not set CONFIG_NR_CPUS_RANGE_BEGIN=1 CONFIG_NR_CPUS_RANGE_END=1 CONFIG_NR_CPUS_DEFAULT=1CONFIG_NR_CPUS=1CONFIG_UP_LATE_INIT=y CONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=y
# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set # CONFIG_X86_MCE is not set
#
# Performance monitoring
#CONFIG_PERF_EVENTS_INTEL_UNCORE=yCONFIG_PERF_EVENTS_INTEL_RAPL=yCONFIG_PERF_EVENTS_INTEL_CSTATE=yCONFIG_PERF_EVENTS_AMD_POWER=y
# end of Performance monitoring
CONFIG_X86_16BIT=yCONFIG_X86_ESPFIX64=y CONFIG_X86_VSYSCALL_EMULATION=y
# CONFIG_X86_IOPL_IOPERM is not set
# CONFIG_I8K is not setCONFIG_MICROCODE=yCONFIG_MICROCODE_INTEL=yCONFIG_MICROCODE_AMD=y
# CONFIG_MICROCODE_OLD_INTERFACE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_X86_5LEVEL is not set CONFIG_X86_DIRECT_GBPAGES=y
# CONFIG_X86_CPA_STATISTICS is not set CONFIG_AMD_MEM_ENCRYPT=y
# CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT is not set CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_MEMORY_PROBE=y CONFIG_ARCH_PROC_KCORE_TEXT=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_X86_PMEM_LEGACY_DEVICE=y CONFIG_X86_PMEM_LEGACY=y CONFIG_X86_CHECK_BIOS_CORRUPTION=y
# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set CONFIG_X86_RESERVE_LOW=64CONFIG_MTRR=yCONFIG_MTRR_SANITIZER=y CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 CONFIG_X86_PAT=yCONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_ARCH_RANDOM=yCONFIG_X86_SMAP=yCONFIG_X86_UMIP=y
# CONFIG_X86_INTEL_MPX is not set CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y CONFIG_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_SECCOMP is not setCONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not setCONFIG_HZ=100CONFIG_SCHED_HRTICK=yCONFIG_KEXEC=yCONFIG_KEXEC_FILE=y CONFIG_ARCH_HAS_KEXEC_PURGATORY=y
# CONFIG_KEXEC_SIG is not set CONFIG_CRASH_DUMP=yCONFIG_KEXEC_JUMP=y CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x200000
# CONFIG_COMPAT_VDSO is not set
# CONFIG_LEGACY_VSYSCALL_EMULATE is not set CONFIG_LEGACY_VSYSCALL_XONLY=y
# CONFIG_LEGACY_VSYSCALL_NONE is not set CONFIG_CMDLINE_BOOL=yCONFIG_CMDLINE=""CONFIG_CMDLINE_OVERRIDE=y CONFIG_MODIFY_LDT_SYSCALL=y CONFIG_HAVE_LIVEPATCH=y
# end of Processor type and features
CONFIG_ARCH_HAS_ADD_PAGES=yCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=yCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=yCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=yCONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=yCONFIG_ARCH_ENABLE_THP_MIGRATION=y
#
# Power management and ACPI options
#CONFIG_ARCH_HIBERNATION_HEADER=y
# CONFIG_SUSPEND is not setCONFIG_HIBERNATE_CALLBACKS=yCONFIG_HIBERNATION=yCONFIG_PM_STD_PARTITION=""CONFIG_PM_SLEEP=yCONFIG_PM_AUTOSLEEP=y
# CONFIG_PM_WAKELOCKS is not setCONFIG_PM=y
# CONFIG_PM_DEBUG is not setCONFIG_PM_CLK=yCONFIG_PM_GENERIC_DOMAINS=yCONFIG_WQ_POWER_EFFICIENT_DEFAULT=yCONFIG_PM_GENERIC_DOMAINS_SLEEP=yCONFIG_PM_GENERIC_DOMAINS_OF=yCONFIG_ARCH_SUPPORTS_ACPI=y
# CONFIG_ACPI is not setCONFIG_SFI=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=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
#
# CPU frequency scaling drivers
#
# CONFIG_CPUFREQ_DT is not set
# CONFIG_X86_INTEL_PSTATE is not setCONFIG_X86_P4_CLOCKMOD=y
#
# shared options # CONFIG_X86_SPEEDSTEP_LIB=y # end of CPU Frequency scaling
#
# CPU Idle
#
# CONFIG_CPU_IDLE is not set
# end of CPU Idle # end of Power management and ACPI options
#
# Bus options (PCI etc.)
#CONFIG_PCI_DIRECT=yCONFIG_PCI_MMCONFIG=yCONFIG_ISA_DMA_API=yCONFIG_AMD_NB=yCONFIG_X86_SYSFB=y
# end of Bus options (PCI etc.)
#
# Binary Emulations
#CONFIG_IA32_EMULATION=y
# CONFIG_X86_X32 is not setCONFIG_COMPAT_32=yCONFIG_COMPAT=yCONFIG_COMPAT_FOR_U64_ALIGNMENT=y
# end of Binary Emulations
#
# Firmware Drivers
#
# CONFIG_ARM_SCMI_PROTOCOL is not setCONFIG_ARM_SCMI_POWER_DOMAIN=yCONFIG_ARM_SCPI_PROTOCOL=yCONFIG_ARM_SCPI_POWER_DOMAIN=y
# CONFIG_EDD is not setCONFIG_FIRMWARE_MEMMAP=yCONFIG_DMIID=yCONFIG_DMI_SYSFS=yCONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# CONFIG_FW_CFG_SYSFS is not setCONFIG_TURRIS_MOX_RWTM=y
# CONFIG_BCM47XX_NVRAM is not setCONFIG_GOOGLE_FIRMWARE=yCONFIG_GOOGLE_COREBOOT_TABLE=yCONFIG_GOOGLE_MEMCONSOLE=yCONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=yCONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y
# CONFIG_GOOGLE_VPD is not setCONFIG_EFI_EARLYCON=y
#
# Tegra firmware driver
#
# end of Tegra firmware driver # end of Firmware Drivers
CONFIG_HAVE_KVM=yCONFIG_VIRTUALIZATION=y
# CONFIG_KVM is not set
# CONFIG_VHOST_NET is not set
# CONFIG_VHOST_SCSI is not set
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
#
# General architecture-dependent options
#CONFIG_CRASH_CORE=yCONFIG_KEXEC_CORE=y
# CONFIG_OPROFILE is not setCONFIG_HAVE_OPROFILE=yCONFIG_OPROFILE_NMI_TIMER=yCONFIG_JUMP_LABEL=yCONFIG_STATIC_KEYS_SELFTEST=yCONFIG_UPROBES=yCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=yCONFIG_ARCH_USE_BUILTIN_BSWAP=yCONFIG_HAVE_IOREMAP_PROT=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_OPTPROBES=yCONFIG_HAVE_KPROBES_ON_FTRACE=yCONFIG_HAVE_FUNCTION_ERROR_INJECTION=yCONFIG_HAVE_NMI=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_HAVE_DMA_CONTIGUOUS=yCONFIG_GENERIC_SMP_IDLE_THREAD=yCONFIG_ARCH_HAS_FORTIFY_SOURCE=yCONFIG_ARCH_HAS_SET_MEMORY=yCONFIG_ARCH_HAS_SET_DIRECT_MAP=yCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=yCONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=yCONFIG_HAVE_ASM_MODVERSIONS=yCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=yCONFIG_HAVE_RSEQ=yCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=yCONFIG_HAVE_CLK=yCONFIG_HAVE_HW_BREAKPOINT=yCONFIG_HAVE_MIXED_BREAKPOINTS_REGS=yCONFIG_HAVE_USER_RETURN_NOTIFIER=yCONFIG_HAVE_PERF_EVENTS_NMI=yCONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=yCONFIG_HAVE_PERF_REGS=yCONFIG_HAVE_PERF_USER_STACK_DUMP=yCONFIG_HAVE_ARCH_JUMP_LABEL=yCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=yCONFIG_HAVE_RCU_TABLE_FREE=yCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=yCONFIG_HAVE_CMPXCHG_LOCAL=yCONFIG_HAVE_CMPXCHG_DOUBLE=yCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=yCONFIG_ARCH_WANT_OLD_COMPAT_IPC=yCONFIG_HAVE_ARCH_SECCOMP_FILTER=yCONFIG_HAVE_ARCH_STACKLEAK=yCONFIG_HAVE_STACKPROTECTOR=yCONFIG_CC_HAS_STACKPROTECTOR_NONE=yCONFIG_STACKPROTECTOR=yCONFIG_STACKPROTECTOR_STRONG=yCONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=yCONFIG_HAVE_CONTEXT_TRACKING=yCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=yCONFIG_HAVE_IRQ_TIME_ACCOUNTING=yCONFIG_HAVE_MOVE_PMD=yCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=yCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=yCONFIG_HAVE_ARCH_HUGE_VMAP=yCONFIG_ARCH_WANT_HUGE_PMD_SHARE=yCONFIG_HAVE_ARCH_SOFT_DIRTY=yCONFIG_HAVE_MOD_ARCH_SPECIFIC=yCONFIG_MODULES_USE_ELF_RELA=yCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=yCONFIG_ARCH_HAS_ELF_RANDOMIZE=yCONFIG_HAVE_ARCH_MMAP_RND_BITS=yCONFIG_HAVE_EXIT_THREAD=yCONFIG_ARCH_MMAP_RND_BITS=28CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=yCONFIG_ARCH_MMAP_RND_COMPAT_BITS=8CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=yCONFIG_HAVE_COPY_THREAD_TLS=yCONFIG_HAVE_STACK_VALIDATION=yCONFIG_HAVE_RELIABLE_STACKTRACE=yCONFIG_OLD_SIGSUSPEND3=yCONFIG_COMPAT_OLD_SIGACTION=yCONFIG_64BIT_TIME=yCONFIG_COMPAT_32BIT_TIME=yCONFIG_HAVE_ARCH_VMAP_STACK=yCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=yCONFIG_STRICT_KERNEL_RWX=yCONFIG_ARCH_HAS_STRICT_MODULE_RWX=yCONFIG_ARCH_HAS_REFCOUNT=yCONFIG_REFCOUNT_FULL=yCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=yCONFIG_ARCH_USE_MEMREMAP_PROT=y
# CONFIG_LOCK_EVENT_COUNTS is not setCONFIG_ARCH_HAS_MEM_ENCRYPT=y
#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not setCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling
CONFIG_PLUGIN_HOSTCC=""CONFIG_HAVE_GCC_PLUGINS=y
# end of General architecture-dependent options
CONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0
# CONFIG_MODULES is not setCONFIG_MODULES_TREE_LOOKUP=yCONFIG_BLOCK=yCONFIG_BLK_SCSI_REQUEST=yCONFIG_BLK_DEV_BSG=yCONFIG_BLK_DEV_BSGLIB=yCONFIG_BLK_DEV_INTEGRITY=y
# CONFIG_BLK_DEV_ZONED is not setCONFIG_BLK_CMDLINE_PARSER=y
# CONFIG_BLK_WBT is not set
# CONFIG_BLK_DEBUG_FS is not set
# CONFIG_BLK_SED_OPAL is not set
#
# Partition Types
#CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_AIX_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not setCONFIG_ATARI_PARTITION=y
# CONFIG_MAC_PARTITION is not set
# CONFIG_MSDOS_PARTITION is not setCONFIG_LDM_PARTITION=yCONFIG_LDM_DEBUG=y
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
# CONFIG_SYSV68_PARTITION is not set
# CONFIG_CMDLINE_PARTITION is not set
# end of Partition Types
CONFIG_BLOCK_COMPAT=yCONFIG_BLK_MQ_PCI=yCONFIG_BLK_MQ_VIRTIO=yCONFIG_BLK_PM=y
#
# IO Schedulers
#CONFIG_MQ_IOSCHED_DEADLINE=y
# CONFIG_MQ_IOSCHED_KYBER is not setCONFIG_IOSCHED_BFQ=y
# end of IO Schedulers
CONFIG_ASN1=yCONFIG_INLINE_SPIN_UNLOCK_IRQ=yCONFIG_INLINE_READ_UNLOCK=yCONFIG_INLINE_READ_UNLOCK_IRQ=yCONFIG_INLINE_WRITE_UNLOCK=yCONFIG_INLINE_WRITE_UNLOCK_IRQ=yCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=yCONFIG_ARCH_USE_QUEUED_SPINLOCKS=yCONFIG_ARCH_USE_QUEUED_RWLOCKS=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=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
# CONFIG_BINFMT_SCRIPT is not set
# CONFIG_BINFMT_MISC is not setCONFIG_COREDUMP=y
# end of Executable file formats
#
# Memory Management options
#CONFIG_SELECT_MEMORY_MODEL=yCONFIG_SPARSEMEM_MANUAL=yCONFIG_SPARSEMEM=yCONFIG_HAVE_MEMORY_PRESENT=yCONFIG_SPARSEMEM_EXTREME=yCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
# CONFIG_SPARSEMEM_VMEMMAP is not setCONFIG_HAVE_MEMBLOCK_NODE_MAP=yCONFIG_HAVE_FAST_GUP=yCONFIG_MEMORY_ISOLATION=yCONFIG_HAVE_BOOTMEM_INFO_NODE=yCONFIG_MEMORY_HOTPLUG=yCONFIG_MEMORY_HOTPLUG_SPARSE=yCONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=yCONFIG_MEMORY_HOTREMOVE=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_COMPACTION=yCONFIG_MIGRATION=yCONFIG_CONTIG_ALLOC=yCONFIG_PHYS_ADDR_T_64BIT=y
# CONFIG_BOUNCE is not setCONFIG_VIRT_TO_BUS=yCONFIG_KSM=yCONFIG_DEFAULT_MMAP_MIN_ADDR=4096CONFIG_TRANSPARENT_HUGEPAGE=yCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not setCONFIG_ARCH_WANTS_THP_SWAP=yCONFIG_THP_SWAP=yCONFIG_TRANSPARENT_HUGE_PAGECACHE=yCONFIG_NEED_PER_CPU_KM=y
# CONFIG_CLEANCACHE is not set
# CONFIG_FRONTSWAP is not setCONFIG_CMA=y
# CONFIG_CMA_DEBUG is not setCONFIG_CMA_DEBUGFS=yCONFIG_CMA_AREAS=7CONFIG_ZPOOL=y
# CONFIG_ZBUD is not setCONFIG_Z3FOLD=yCONFIG_ZSMALLOC=y
# CONFIG_PGTABLE_MAPPING is not setCONFIG_ZSMALLOC_STAT=yCONFIG_GENERIC_EARLY_IOREMAP=yCONFIG_IDLE_PAGE_TRACKING=yCONFIG_ARCH_HAS_PTE_DEVMAP=yCONFIG_FRAME_VECTOR=yCONFIG_ARCH_USES_HIGH_VMA_FLAGS=yCONFIG_ARCH_HAS_PKEYS=y
# CONFIG_PERCPU_STATS is not setCONFIG_GUP_BENCHMARK=y
# CONFIG_READ_ONLY_THP_FOR_FS is not setCONFIG_ARCH_HAS_PTE_SPECIAL=y
# end of Memory Management options
CONFIG_NET=y
#
# Networking options
#
# CONFIG_PACKET is not set
# CONFIG_UNIX is not set
# CONFIG_TLS is not set
# CONFIG_XFRM_USER is not set
# CONFIG_NET_KEY is not setCONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not setCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=y
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE_DEMUX is not setCONFIG_NET_IP_TUNNEL=y
# CONFIG_SYN_COOKIES is not set
# 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=yCONFIG_INET_DIAG=yCONFIG_INET_TCP_DIAG=y
# CONFIG_INET_UDP_DIAG is not set
# CONFIG_INET_RAW_DIAG is not set
# CONFIG_INET_DIAG_DESTROY is not set
# CONFIG_TCP_CONG_ADVANCED is not setCONFIG_TCP_CONG_CUBIC=yCONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not setCONFIG_IPV6=y
# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_IPV6_MIP6 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_NETWORK_SECMARK is not set
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
# CONFIG_NETFILTER 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 setCONFIG_HAVE_NET_DSA=y
# 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 set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set
# 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 set
# CONFIG_CGROUP_NET_PRIO is not set
# CONFIG_CGROUP_NET_CLASSID is not setCONFIG_NET_RX_BUSY_POLL=yCONFIG_BQL=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 setCONFIG_WIRELESS=y
# CONFIG_CFG80211 is not set
#
# CFG80211 needs to be enabled for MAC80211
#CONFIG_MAC80211_STA_HASH_MAX_SIZE=0
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not setCONFIG_NET_9P=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_FAILOVER=yCONFIG_HAVE_EBPF_JIT=y
#
# Device Drivers
#CONFIG_HAVE_EISA=y
# CONFIG_EISA is not setCONFIG_HAVE_PCI=yCONFIG_PCI=yCONFIG_PCI_DOMAINS=y
# CONFIG_PCIEPORTBUS 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_LOCKLESS_CONFIG=y
# CONFIG_PCI_IOV is not set
# CONFIG_PCI_PRI is not set
# CONFIG_PCI_PASID is not setCONFIG_PCI_LABEL=y
# CONFIG_HOTPLUG_PCI is not set
#
# PCI controller drivers
#
# CONFIG_PCI_AARDVARK is not set
#
# Cadence PCIe controllers support
#
# CONFIG_PCIE_CADENCE_HOST is not set
# end of Cadence PCIe controllers support
# CONFIG_PCIE_XILINX_NWL is not set
# CONFIG_PCI_FTPCI100 is not set
# CONFIG_PCI_TEGRA is not set
# CONFIG_PCIE_RCAR is not set
# CONFIG_PCI_HOST_GENERIC is not set
# CONFIG_PCIE_XILINX is not set
# CONFIG_PCI_XGENE is not set
# CONFIG_PCI_V3_SEMI is not set
# CONFIG_PCIE_ALTERA is not set
# CONFIG_PCI_HOST_THUNDER_PEM is not set
# CONFIG_PCI_HOST_THUNDER_ECAM is not set
# CONFIG_PCIE_ROCKCHIP_HOST is not set
# CONFIG_PCIE_MEDIATEK is not set
# CONFIG_PCIE_MOBIVEIL is not set
# CONFIG_VMD is not set
#
# DesignWare PCI Core Support
#CONFIG_PCIE_DW=yCONFIG_PCIE_DW_HOST=yCONFIG_PCI_DRA7XX=yCONFIG_PCI_DRA7XX_HOST=y
# CONFIG_PCIE_DW_PLAT_HOST is not set
# CONFIG_PCI_EXYNOS is not set
# CONFIG_PCI_IMX6 is not set
# CONFIG_PCIE_SPEAR13XX is not set
# CONFIG_PCI_LAYERSCAPE is not set
# CONFIG_PCI_HISI is not set
# CONFIG_PCIE_QCOM is not set
# CONFIG_PCIE_ARMADA_8K is not set
# CONFIG_PCIE_ARTPEC6_HOST is not set
# CONFIG_PCIE_KIRIN is not set
# CONFIG_PCIE_HISI_STB is not set
# CONFIG_PCI_MESON is not set
# CONFIG_PCIE_TEGRA194 is not set
# CONFIG_PCIE_UNIPHIER is not set
# CONFIG_PCIE_AL is not set
# end of DesignWare PCI Core 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_PCCARD=y
# CONFIG_PCMCIA is not setCONFIG_CARDBUS=y
#
# PC-card bridges
#
# CONFIG_YENTA is not set
# CONFIG_RAPIDIO is not set
#
# Generic Driver Options
#
# CONFIG_UEVENT_HELPER is not setCONFIG_DEVTMPFS=yCONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not setCONFIG_PREVENT_FIRMWARE_BUILD=y
#
# Firmware loader
#CONFIG_FW_LOADER=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set # CONFIG_FW_LOADER_COMPRESS is not set
# end of Firmware loader
CONFIG_WANT_DEV_COREDUMP=yCONFIG_ALLOW_DEV_COREDUMP=yCONFIG_DEV_COREDUMP=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not setCONFIG_GENERIC_CPU_AUTOPROBE=yCONFIG_GENERIC_CPU_VULNERABILITIES=yCONFIG_SOC_BUS=yCONFIG_REGMAP=yCONFIG_REGMAP_I2C=yCONFIG_REGMAP_W1=yCONFIG_REGMAP_MMIO=yCONFIG_REGMAP_IRQ=yCONFIG_REGMAP_SCCB=yCONFIG_REGMAP_I3C=yCONFIG_DMA_SHARED_BUFFER=y
# CONFIG_DMA_FENCE_TRACE is not set
# end of Generic Driver Options
#
# Bus devices
#
# CONFIG_QCOM_EBI2 is not set
# CONFIG_SIMPLE_PM_BUS is not setCONFIG_FSL_MC_BUS=y
# end of Bus devices
# CONFIG_CONNECTOR is not set
# CONFIG_GNSS is not setCONFIG_MTD=y
#
# Partition parsers
#
# CONFIG_MTD_AR7_PARTS is not setCONFIG_MTD_BCM63XX_PARTS=yCONFIG_MTD_CMDLINE_PARTS=yCONFIG_MTD_OF_PARTS=yCONFIG_MTD_PARSER_IMAGETAG=yCONFIG_MTD_PARSER_TRX=yCONFIG_MTD_SHARPSL_PARTS=y
# CONFIG_MTD_REDBOOT_PARTS is not set
# end of Partition parsers
#
# User Modules And Translation Layers
#CONFIG_MTD_BLKDEVS=yCONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not setCONFIG_INFTL=yCONFIG_RFD_FTL=yCONFIG_SSFDC=yCONFIG_SM_FTL=yCONFIG_MTD_OOPS=yCONFIG_MTD_SWAP=yCONFIG_MTD_PARTITIONED_MASTER=y
#
# RAM/ROM/Flash chip drivers
#CONFIG_MTD_CFI=yCONFIG_MTD_JEDECPROBE=yCONFIG_MTD_GEN_PROBE=yCONFIG_MTD_CFI_ADV_OPTIONS=y
# CONFIG_MTD_CFI_NOSWAP is not setCONFIG_MTD_CFI_BE_BYTE_SWAP=y
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not setCONFIG_MTD_CFI_GEOMETRY=yCONFIG_MTD_MAP_BANK_WIDTH_1=yCONFIG_MTD_MAP_BANK_WIDTH_2=yCONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not setCONFIG_MTD_CFI_I1=y
# CONFIG_MTD_CFI_I2 is not set
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
# CONFIG_MTD_OTP is not setCONFIG_MTD_CFI_INTELEXT=yCONFIG_MTD_CFI_AMDSTD=y
# CONFIG_MTD_CFI_STAA is not setCONFIG_MTD_CFI_UTIL=yCONFIG_MTD_RAM=y
# CONFIG_MTD_ROM is not setCONFIG_MTD_ABSENT=y
# end of RAM/ROM/Flash chip drivers
#
# Mapping drivers for chip access
#CONFIG_MTD_COMPLEX_MAPPINGS=yCONFIG_MTD_PHYSMAP=yCONFIG_MTD_PHYSMAP_COMPAT=yCONFIG_MTD_PHYSMAP_START=0x8000000CONFIG_MTD_PHYSMAP_LEN=0CONFIG_MTD_PHYSMAP_BANKWIDTH=2
# CONFIG_MTD_PHYSMAP_OF is not setCONFIG_MTD_PHYSMAP_GPIO_ADDR=yCONFIG_MTD_SC520CDP=y
# CONFIG_MTD_NETSC520 is not setCONFIG_MTD_TS5500=yCONFIG_MTD_SBC_GXX=y
# CONFIG_MTD_AMD76XROM is not setCONFIG_MTD_ICHXROM=y
# CONFIG_MTD_ESB2ROM is not set
# CONFIG_MTD_CK804XROM is not set
# CONFIG_MTD_SCB2_FLASH is not set
# CONFIG_MTD_NETtel is not setCONFIG_MTD_L440GX=y
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_INTEL_VR_NOR is not set
# CONFIG_MTD_PLATRAM is not set
# end of Mapping drivers for chip access
#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not setCONFIG_MTD_MTDRAM=yCONFIG_MTDRAM_TOTAL_SIZE=4096CONFIG_MTDRAM_ERASE_SIZE=128CONFIG_MTD_BLOCK2MTD=y
#
# Disk-On-Chip Device Drivers
#CONFIG_MTD_DOCG3=yCONFIG_BCH_CONST_M=14CONFIG_BCH_CONST_T=4
# end of Self-contained MTD device drivers
CONFIG_MTD_ONENAND=y
# CONFIG_MTD_ONENAND_VERIFY_WRITE is not setCONFIG_MTD_ONENAND_GENERIC=yCONFIG_MTD_ONENAND_OTP=y
# CONFIG_MTD_ONENAND_2X_PROGRAM is not setCONFIG_MTD_NAND_ECC_SW_HAMMING=y
# CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC is not set
# CONFIG_MTD_RAW_NAND is not set
#
# LPDDR & LPDDR2 PCM memory drivers
#CONFIG_MTD_LPDDR=yCONFIG_MTD_QINFO_PROBE=y
# end of LPDDR & LPDDR2 PCM memory drivers
# CONFIG_MTD_UBI is not setCONFIG_MTD_HYPERBUS=yCONFIG_HBMC_AM654=yCONFIG_DTC=yCONFIG_OF=y
# CONFIG_OF_UNITTEST is not setCONFIG_OF_ALL_DTBS=yCONFIG_OF_FLATTREE=yCONFIG_OF_KOBJ=yCONFIG_OF_DYNAMIC=yCONFIG_OF_ADDRESS=yCONFIG_OF_IRQ=yCONFIG_OF_NET=yCONFIG_OF_RESOLVE=yCONFIG_OF_OVERLAY=yCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=yCONFIG_PARPORT=yCONFIG_PARPORT_PC=y
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not setCONFIG_PARPORT_AX88796=y
# CONFIG_PARPORT_1284 is not setCONFIG_PARPORT_NOT_PC=yCONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_NULL_BLK is not setCONFIG_BLK_DEV_FD=yCONFIG_CDROM=yCONFIG_PARIDE=y
#
# Parallel IDE high-level drivers
#CONFIG_PARIDE_PD=y
# CONFIG_PARIDE_PCD is not set
# CONFIG_PARIDE_PF is not setCONFIG_PARIDE_PT=y
# CONFIG_PARIDE_PG is not set
#
# Parallel IDE protocol modules
#
# CONFIG_PARIDE_ATEN is not set
# CONFIG_PARIDE_BPCK is not set
# CONFIG_PARIDE_COMM is not setCONFIG_PARIDE_DSTR=yCONFIG_PARIDE_FIT2=yCONFIG_PARIDE_FIT3=y
# CONFIG_PARIDE_EPAT is not setCONFIG_PARIDE_EPIA=yCONFIG_PARIDE_FRIQ=y
# CONFIG_PARIDE_FRPW is not setCONFIG_PARIDE_KBIC=yCONFIG_PARIDE_KTTI=yCONFIG_PARIDE_ON20=yCONFIG_PARIDE_ON26=y
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not setCONFIG_ZRAM=y
# CONFIG_ZRAM_WRITEBACK is not set
# CONFIG_ZRAM_MEMORY_TRACKING is not set
# CONFIG_BLK_DEV_UMEM is not setCONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_LOOP_MIN_COUNT=8CONFIG_BLK_DEV_CRYPTOLOOP=y
# CONFIG_BLK_DEV_DRBD is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SKD is not set
# CONFIG_BLK_DEV_SX8 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_VIRTIO_BLK_SCSI is not set
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_BLK_DEV_RSXX is not set
#
# NVME Support
#CONFIG_NVME_CORE=y
# CONFIG_BLK_DEV_NVME is not set
# CONFIG_NVME_MULTIPATH is not setCONFIG_NVME_FABRICS=yCONFIG_NVME_FC=yCONFIG_NVME_TARGET=yCONFIG_NVME_TARGET_LOOP=y
# CONFIG_NVME_TARGET_FC is not set
# CONFIG_NVME_TARGET_TCP is not set
# end of NVME Support
#
# Misc devices
#CONFIG_SENSORS_LIS3LV02D=yCONFIG_AD525X_DPOT=yCONFIG_AD525X_DPOT_I2C=yCONFIG_DUMMY_IRQ=y
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_INTEL_MID_PTI is not set
# CONFIG_TIFM_CORE is not setCONFIG_ICS932S401=yCONFIG_ATMEL_SSC=yCONFIG_ENCLOSURE_SERVICES=y
# CONFIG_HP_ILO is not set
# CONFIG_QCOM_COINCELL is not set
# CONFIG_QCOM_FASTRPC is not setCONFIG_APDS9802ALS=y
# CONFIG_ISL29003 is not setCONFIG_ISL29020=y
# CONFIG_SENSORS_TSL2550 is not setCONFIG_SENSORS_BH1770=yCONFIG_SENSORS_APDS990X=y
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_PCH_PHUB is not setCONFIG_SRAM=y
# CONFIG_PCI_ENDPOINT_TEST is not setCONFIG_XILINX_SDFEC=yCONFIG_MISC_RTSX=y
# CONFIG_PVPANIC is not set
# CONFIG_C2PORT is not set
#
# EEPROM support
#CONFIG_EEPROM_AT24=yCONFIG_EEPROM_LEGACY=yCONFIG_EEPROM_MAX6875=y
# CONFIG_EEPROM_93CX6 is not setCONFIG_EEPROM_IDT_89HPESX=yCONFIG_EEPROM_EE1004=y
# end of EEPROM support
# CONFIG_CB710_CORE is not set
#
# Texas Instruments shared transport line discipline #
# CONFIG_TI_ST is not set
# end of Texas Instruments shared transport line discipline
CONFIG_SENSORS_LIS3_I2C=yCONFIG_ALTERA_STAPL=y
# CONFIG_INTEL_MEI is not set
# CONFIG_INTEL_MEI_ME is not set
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_VMWARE_VMCI is not set
#
# Intel MIC & related support
#
#
# Intel MIC Bus Driver
#
# CONFIG_INTEL_MIC_BUS is not set
#
# SCIF Bus Driver
#
# CONFIG_SCIF_BUS is not set
#
# VOP Bus Driver
#CONFIG_VOP_BUS=y
#
# Intel MIC Host Driver
#
#
# Intel MIC Card Driver
#
#
# SCIF Driver
#
#
# Intel MIC Coprocessor State Management (COSM) Drivers #
#
# VOP Driver
#CONFIG_VOP=yCONFIG_VHOST_RING=y
# end of Intel MIC & related support
# CONFIG_GENWQE is not setCONFIG_ECHO=y
# CONFIG_MISC_ALCOR_PCI is not set
# CONFIG_MISC_RTSX_PCI is not setCONFIG_MISC_RTSX_USB=y
# CONFIG_HABANA_AI is not set
# end of Misc devices
CONFIG_HAVE_IDE=yCONFIG_IDE=y
#
# Please see Documentation/ide/ide.rst for help/info on IDE drives #CONFIG_IDE_XFER_MODE=yCONFIG_IDE_TIMINGS=yCONFIG_IDE_ATAPI=yCONFIG_BLK_DEV_IDE_SATA=y
# CONFIG_IDE_GD is not set
# CONFIG_BLK_DEV_DELKIN is not set CONFIG_BLK_DEV_IDECD=y CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y CONFIG_BLK_DEV_IDETAPE=yCONFIG_IDE_TASK_IOCTL=yCONFIG_IDE_PROC_FS=y
#
# IDE chipset support/bugfixes
#CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_PLATFORM is not setCONFIG_BLK_DEV_CMD640=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
#
# PCI IDE chipsets support
#
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_IT8172 is not set
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
#
# SCSI device support
#CONFIG_SCSI_MOD=yCONFIG_RAID_ATTRS=yCONFIG_SCSI=yCONFIG_SCSI_DMA=y
# CONFIG_SCSI_PROC_FS is not set
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=yCONFIG_CHR_DEV_ST=yCONFIG_BLK_DEV_SR=yCONFIG_BLK_DEV_SR_VENDOR=y
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not setCONFIG_SCSI_ENCLOSURE=y
# CONFIG_SCSI_CONSTANTS is not setCONFIG_SCSI_LOGGING=y
# 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 setCONFIG_SCSI_SAS_ATTRS=y
# CONFIG_SCSI_SAS_LIBSAS is not setCONFIG_SCSI_SRP_ATTRS=y
# 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_HISI_SAS is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_MVUMI is not set
# CONFIG_SCSI_DPT_I2O 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_SMARTPQI is not set
# CONFIG_SCSI_UFSHCD 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_GDTH 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_PPA is not set
# CONFIG_SCSI_IMM 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_DH is not set
# end of SCSI device support
CONFIG_ATA=yCONFIG_ATA_VERBOSE_ERROR=yCONFIG_SATA_PMP=y
#
# Controllers with non-SFF native interface
#CONFIG_SATA_AHCI=yCONFIG_SATA_MOBILE_LPM_POLICY=0CONFIG_SATA_AHCI_PLATFORM=yCONFIG_AHCI_IMX=y
# CONFIG_AHCI_CEVA is not set
# CONFIG_AHCI_XGENE is not set
# CONFIG_AHCI_QORIQ is not set
# CONFIG_SATA_GEMINI 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_HIGHBANK is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_RCAR 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 set
# CONFIG_PATA_AMD is not set
# 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_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5536 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 set
# CONFIG_PATA_OLDPIIX is not set
# 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 set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SCH is not set
# 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_RZ1000 is not set
#
# Generic fallback / legacy drivers
#
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_LEGACY is not setCONFIG_MD=y
# CONFIG_BLK_DEV_MD is not setCONFIG_BCACHE=y
# CONFIG_BCACHE_DEBUG is not setCONFIG_BCACHE_CLOSURES_DEBUG=yCONFIG_BLK_DEV_DM_BUILTIN=yCONFIG_BLK_DEV_DM=yCONFIG_DM_DEBUG=yCONFIG_DM_BUFIO=yCONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING=y
# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not setCONFIG_DM_BIO_PRISON=yCONFIG_DM_PERSISTENT_DATA=y
# CONFIG_DM_UNSTRIPED is not set
# CONFIG_DM_CRYPT is not set
# CONFIG_DM_SNAPSHOT is not setCONFIG_DM_THIN_PROVISIONING=y
# CONFIG_DM_CACHE is not setCONFIG_DM_WRITECACHE=y
# CONFIG_DM_ERA is not setCONFIG_DM_CLONE=yCONFIG_DM_MIRROR=y
# CONFIG_DM_LOG_USERSPACE is not set
# CONFIG_DM_RAID is not setCONFIG_DM_ZERO=yCONFIG_DM_MULTIPATH=y
# CONFIG_DM_MULTIPATH_QL is not setCONFIG_DM_MULTIPATH_ST=yCONFIG_DM_DELAY=yCONFIG_DM_DUST=yCONFIG_DM_INIT=y
# CONFIG_DM_UEVENT is not setCONFIG_DM_FLAKEY=yCONFIG_DM_VERITY=y
# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set
# CONFIG_DM_VERITY_FEC is not set
# CONFIG_DM_SWITCH is not set
# CONFIG_DM_LOG_WRITES is not setCONFIG_DM_INTEGRITY=yCONFIG_TARGET_CORE=yCONFIG_TCM_IBLOCK=yCONFIG_TCM_FILEIO=yCONFIG_TCM_PSCSI=yCONFIG_LOOPBACK_TARGET=y
# CONFIG_ISCSI_TARGET is not setCONFIG_SBP_TARGET=y
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#CONFIG_FIREWIRE=y
# CONFIG_FIREWIRE_OHCI is not set
# CONFIG_FIREWIRE_SBP2 is not set
# CONFIG_FIREWIRE_NET is not set
# CONFIG_FIREWIRE_NOSY is not set
# end of IEEE 1394 (FireWire) support
CONFIG_MACINTOSH_DRIVERS=yCONFIG_MAC_EMUMOUSEBTN=yCONFIG_NETDEVICES=yCONFIG_NET_CORE=y
# CONFIG_BONDING is not set
# CONFIG_DUMMY 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_GTP is not set
# CONFIG_MACSEC is not set
# CONFIG_NETCONSOLE is not set
# 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 set
#
# CAIF transport drivers
#
#
# Distributed Switch Architecture drivers
#
# end of Distributed Switch Architecture drivers
CONFIG_ETHERNET=yCONFIG_NET_VENDOR_3COM=y
# 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_AMD_XGBE is not set
# CONFIG_NET_XGENE is not set
# CONFIG_NET_XGENE_V2 is not setCONFIG_NET_VENDOR_AQUANTIA=y
# CONFIG_AQTION is not setCONFIG_NET_VENDOR_ARC=y
# CONFIG_ARC_EMAC is not set
# CONFIG_EMAC_ROCKCHIP is not setCONFIG_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 setCONFIG_NET_VENDOR_AURORA=y
# CONFIG_AURORA_NB8800 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 set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2X is not set
# CONFIG_BGMAC_PLATFORM is not set
# CONFIG_SYSTEMPORT is not set
# CONFIG_BNXT is not setCONFIG_NET_VENDOR_BROCADE=y
# CONFIG_BNA is not setCONFIG_NET_VENDOR_CADENCE=y
# CONFIG_MACB is not set
# CONFIG_NET_CALXEDA_XGMAC 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=y
# CONFIG_GEMINI_ETHERNET is not set
# CONFIG_CX_ECAT is not set
# CONFIG_DNET is not setCONFIG_NET_VENDOR_DEC=y
# CONFIG_NET_TULIP 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_EZCHIP=y
# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not setCONFIG_NET_VENDOR_FARADAY=yCONFIG_NET_VENDOR_FREESCALE=y
# CONFIG_FEC is not set
# CONFIG_FSL_FMAN is not set
# CONFIG_FSL_PQ_MDIO is not set
# CONFIG_FSL_XGMAC_MDIO is not set
# CONFIG_GIANFAR is not set
# CONFIG_FSL_DPAA2_ETH is not set
# CONFIG_FSL_ENETC is not set
# CONFIG_FSL_ENETC_VF is not set
# CONFIG_FSL_ENETC_MDIO is not setCONFIG_NET_VENDOR_GOOGLE=y
# CONFIG_GVE is not setCONFIG_NET_VENDOR_HISILICON=y
# CONFIG_HIX5HD2_GMAC is not set
# CONFIG_HISI_FEMAC is not set
# CONFIG_HIP04_ETH is not set
# CONFIG_HNS is not set
# CONFIG_HNS_DSAF is not set
# CONFIG_HNS_ENET is not set
# CONFIG_HNS3 is not setCONFIG_NET_VENDOR_HP=y
# CONFIG_HP100 is not setCONFIG_NET_VENDOR_HUAWEI=y
# CONFIG_HINIC is not setCONFIG_NET_VENDOR_I825XX=yCONFIG_NET_VENDOR_INTEL=y
# CONFIG_E100 is not set
# CONFIG_E1000 is not set
# CONFIG_E1000E is not set
# 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 set
# CONFIG_JME is not setCONFIG_NET_VENDOR_MARVELL=y
# CONFIG_MV643XX_ETH is not set
# CONFIG_MVMDIO is not set
# CONFIG_MVNETA is not set
# CONFIG_MVPP2 is not set
# CONFIG_PXA168_ETH is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_OCTEONTX2_AF 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_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_MYRI=y
# CONFIG_MYRI10GE is not set
# CONFIG_FEALNX 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 set
# CONFIG_VXGE is not setCONFIG_NET_VENDOR_NETRONOME=y
# CONFIG_NFP is not setCONFIG_NET_VENDOR_NI=y
# CONFIG_NI_XGE_MANAGEMENT_ENET is not setCONFIG_NET_VENDOR_8390=y
# CONFIG_AX88796 is not set
# CONFIG_NE2K_PCI is not setCONFIG_NET_VENDOR_NVIDIA=y
# CONFIG_FORCEDETH is not set
# CONFIG_LPC_ENET is not setCONFIG_NET_VENDOR_OKI=y
# CONFIG_PCH_GBE is not set
# 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_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_ATP is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_R8169 is not setCONFIG_NET_VENDOR_RENESAS=y
# CONFIG_SH_ETH is not set
# CONFIG_RAVB is not setCONFIG_NET_VENDOR_ROCKER=yCONFIG_NET_VENDOR_SAMSUNG=y
# CONFIG_SXGBE_ETH is not setCONFIG_NET_VENDOR_SEEQ=yCONFIG_NET_VENDOR_SOLARFLARE=y
# CONFIG_SFC is not set
# CONFIG_SFC_FALCON is not setCONFIG_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_SMSC=y
# CONFIG_EPIC100 is not set
# CONFIG_SMSC911X is not set
# CONFIG_SMSC9420 is not setCONFIG_NET_VENDOR_SOCIONEXT=y
# CONFIG_SNI_AVE is not set
# CONFIG_SNI_NETSEC is not setCONFIG_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_DAVINCI_EMAC is not set
# CONFIG_TI_DAVINCI_MDIO is not set
# CONFIG_TI_CPSW_PHY_SEL is not set
# CONFIG_TI_CPSW is not set
# CONFIG_TI_CPTS is not set
# CONFIG_TLAN is not setCONFIG_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_AXI_EMAC is not set
# CONFIG_XILINX_LL_TEMAC is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_MDIO_DEVICE is not set
# CONFIG_PHYLIB is not set
# CONFIG_PLIP is not set
# 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_IPHETH is not setCONFIG_WLAN=yCONFIG_WLAN_VENDOR_ADMTEK=yCONFIG_WLAN_VENDOR_ATH=y
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K_PCI is not setCONFIG_WLAN_VENDOR_ATMEL=yCONFIG_WLAN_VENDOR_BROADCOM=yCONFIG_WLAN_VENDOR_CISCO=yCONFIG_WLAN_VENDOR_INTEL=yCONFIG_WLAN_VENDOR_INTERSIL=y
# CONFIG_HOSTAP is not set
# CONFIG_PRISM54 is not setCONFIG_WLAN_VENDOR_MARVELL=yCONFIG_WLAN_VENDOR_MEDIATEK=yCONFIG_WLAN_VENDOR_RALINK=yCONFIG_WLAN_VENDOR_REALTEK=yCONFIG_WLAN_VENDOR_RSI=yCONFIG_WLAN_VENDOR_ST=yCONFIG_WLAN_VENDOR_TI=yCONFIG_WLAN_VENDOR_ZYDAS=yCONFIG_WLAN_VENDOR_QUANTENNA=y
#
# Enable WiMAX (Networking options) to see the WiMAX drivers #
# CONFIG_WAN is not set
# CONFIG_VMXNET3 is not set
# CONFIG_NETDEVSIM is not set CONFIG_NET_FAILOVER=y
# CONFIG_ISDN is not set
# CONFIG_NVM is not set
#
# Input device support
#CONFIG_INPUT=yCONFIG_INPUT_LEDS=yCONFIG_INPUT_FF_MEMLESS=yCONFIG_INPUT_POLLDEV=y
# CONFIG_INPUT_SPARSEKMAP is not setCONFIG_INPUT_MATRIXKMAP=y
#
# Userland interfaces
#CONFIG_INPUT_MOUSEDEV=yCONFIG_INPUT_MOUSEDEV_PSAUX=yCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_INPUT_JOYDEV=yCONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not setCONFIG_INPUT_MOUSE=y
# CONFIG_MOUSE_PS2 is not setCONFIG_MOUSE_SERIAL=y
# CONFIG_MOUSE_APPLETOUCH is not setCONFIG_MOUSE_BCM5974=yCONFIG_MOUSE_CYAPA=y
# CONFIG_MOUSE_ELAN_I2C is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_GPIO is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not setCONFIG_MOUSE_SYNAPTICS_USB=yCONFIG_INPUT_JOYSTICK=yCONFIG_JOYSTICK_ANALOG=yCONFIG_JOYSTICK_A3D=y
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not setCONFIG_JOYSTICK_GF2K=yCONFIG_JOYSTICK_GRIP=yCONFIG_JOYSTICK_GRIP_MP=yCONFIG_JOYSTICK_GUILLEMOT=y
# CONFIG_JOYSTICK_INTERACT is not setCONFIG_JOYSTICK_SIDEWINDER=y
# CONFIG_JOYSTICK_TMDC is not setCONFIG_JOYSTICK_IFORCE=yCONFIG_JOYSTICK_IFORCE_USB=yCONFIG_JOYSTICK_IFORCE_232=yCONFIG_JOYSTICK_WARRIOR=yCONFIG_JOYSTICK_MAGELLAN=yCONFIG_JOYSTICK_SPACEORB=yCONFIG_JOYSTICK_SPACEBALL=yCONFIG_JOYSTICK_STINGER=yCONFIG_JOYSTICK_TWIDJOY=y
# CONFIG_JOYSTICK_ZHENHUA is not setCONFIG_JOYSTICK_DB9=y
# CONFIG_JOYSTICK_GAMECON is not setCONFIG_JOYSTICK_TURBOGRAFX=yCONFIG_JOYSTICK_AS5011=yCONFIG_JOYSTICK_JOYDUMP=yCONFIG_JOYSTICK_XPAD=yCONFIG_JOYSTICK_XPAD_FF=yCONFIG_JOYSTICK_XPAD_LEDS=yCONFIG_JOYSTICK_WALKERA0701=yCONFIG_JOYSTICK_PXRC=y
# CONFIG_JOYSTICK_FSIA6B is not setCONFIG_INPUT_TABLET=yCONFIG_TABLET_USB_ACECAD=yCONFIG_TABLET_USB_AIPTEK=y
# CONFIG_TABLET_USB_GTCO is not set
# CONFIG_TABLET_USB_HANWANG is not set
# CONFIG_TABLET_USB_KBTAB is not setCONFIG_TABLET_USB_PEGASUS=yCONFIG_TABLET_SERIAL_WACOM4=y
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not setCONFIG_RMI4_CORE=yCONFIG_RMI4_I2C=yCONFIG_RMI4_SMB=yCONFIG_RMI4_F03=yCONFIG_RMI4_F03_SERIO=yCONFIG_RMI4_2D_SENSOR=yCONFIG_RMI4_F11=yCONFIG_RMI4_F12=yCONFIG_RMI4_F30=yCONFIG_RMI4_F34=y
# CONFIG_RMI4_F54 is not setCONFIG_RMI4_F55=y
#
# Hardware I/O ports
#CONFIG_SERIO=yCONFIG_ARCH_MIGHT_HAVE_PC_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_SERPORT=yCONFIG_SERIO_CT82C710=yCONFIG_SERIO_PARKBD=y
# CONFIG_SERIO_PCIPS2 is not setCONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not setCONFIG_SERIO_ALTERA_PS2=yCONFIG_SERIO_PS2MULT=yCONFIG_SERIO_ARC_PS2=yCONFIG_SERIO_APBPS2=yCONFIG_SERIO_OLPC_APSP=yCONFIG_SERIO_SUN4I_PS2=y
# CONFIG_SERIO_GPIO_PS2 is not setCONFIG_USERIO=yCONFIG_GAMEPORT=yCONFIG_GAMEPORT_NS558=yCONFIG_GAMEPORT_L4=y
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_FM801 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=yCONFIG_VT_HW_CONSOLE_BINDING=yCONFIG_UNIX98_PTYS=yCONFIG_LEGACY_PTYS=yCONFIG_LEGACY_PTY_COUNT=256CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_ROCKETPORT is not set
# CONFIG_CYCLADES is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_SYNCLINK is not set
# CONFIG_SYNCLINKMP is not set
# CONFIG_SYNCLINK_GT is not set
# CONFIG_NOZOMI is not set
# CONFIG_ISI is not set
# CONFIG_N_HDLC is not set
# CONFIG_N_GSM is not setCONFIG_TRACE_ROUTER=yCONFIG_TRACE_SINK=y
# CONFIG_NULL_TTY is not setCONFIG_LDISC_AUTOLOAD=yCONFIG_DEVMEM=y
# CONFIG_DEVKMEM is not set
#
# Serial drivers
#CONFIG_SERIAL_EARLYCON=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=yCONFIG_SERIAL_8250_FINTEK=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_EXAR=yCONFIG_SERIAL_8250_MEN_MCB=yCONFIG_SERIAL_8250_NR_UARTS=4CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not setCONFIG_SERIAL_8250_ASPEED_VUART=yCONFIG_SERIAL_8250_DWLIB=yCONFIG_SERIAL_8250_DW=yCONFIG_SERIAL_8250_RT288X=yCONFIG_SERIAL_8250_LPC18XX=y
# CONFIG_SERIAL_8250_UNIPHIER is not set
# CONFIG_SERIAL_8250_INGENIC is not setCONFIG_SERIAL_8250_LPSS=yCONFIG_SERIAL_8250_MID=yCONFIG_SERIAL_OF_PLATFORM=y
#
# Non-8250 serial port support
#CONFIG_SERIAL_ATMEL=y CONFIG_SERIAL_ATMEL_CONSOLE=y
# CONFIG_SERIAL_ATMEL_PDC is not set CONFIG_SERIAL_ATMEL_TTYAT=y CONFIG_SERIAL_CLPS711X=y
# CONFIG_SERIAL_CLPS711X_CONSOLE is not set CONFIG_SERIAL_IMX=y
# CONFIG_SERIAL_IMX_CONSOLE is not set CONFIG_SERIAL_UARTLITE=y
# CONFIG_SERIAL_UARTLITE_CONSOLE is not set CONFIG_SERIAL_UARTLITE_NR_UARTS=1 CONFIG_SERIAL_SH_SCI=y CONFIG_SERIAL_SH_SCI_NR_UARTS=2 CONFIG_SERIAL_SH_SCI_CONSOLE=y
# CONFIG_SERIAL_HS_LPC32XX is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set CONFIG_SERIAL_QCOM_GENI=y
# CONFIG_SERIAL_QCOM_GENI_CONSOLE is not set # CONFIG_SERIAL_SIFIVE is not set
# CONFIG_SERIAL_SCCNXP is not set CONFIG_SERIAL_SC16IS7XX_CORE=y CONFIG_SERIAL_SC16IS7XX=y CONFIG_SERIAL_SC16IS7XX_I2C=y
# CONFIG_SERIAL_TIMBERDALE is not set CONFIG_SERIAL_BCM63XX=y CONFIG_SERIAL_BCM63XX_CONSOLE=y
# CONFIG_SERIAL_ALTERA_JTAGUART is not set CONFIG_SERIAL_ALTERA_UART=y CONFIG_SERIAL_ALTERA_UART_MAXPORTS=4 CONFIG_SERIAL_ALTERA_UART_BAUDRATE=115200 CONFIG_SERIAL_ALTERA_UART_CONSOLE=y
# CONFIG_SERIAL_PCH_UART is not set CONFIG_SERIAL_MXS_AUART=y
# CONFIG_SERIAL_MXS_AUART_CONSOLE is not set CONFIG_SERIAL_XILINX_PS_UART=y CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y CONFIG_SERIAL_MPS2_UART_CONSOLE=y CONFIG_SERIAL_MPS2_UART=yCONFIG_SERIAL_ARC=y CONFIG_SERIAL_ARC_CONSOLE=y CONFIG_SERIAL_ARC_NR_PORTS=1
# CONFIG_SERIAL_RP2 is not set CONFIG_SERIAL_FSL_LPUART=y
# CONFIG_SERIAL_FSL_LPUART_CONSOLE is not set CONFIG_SERIAL_FSL_LINFLEXUART=y CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y CONFIG_SERIAL_CONEXANT_DIGICOLOR=y
# CONFIG_SERIAL_CONEXANT_DIGICOLOR_CONSOLE is not set # CONFIG_SERIAL_ST_ASC is not set
# CONFIG_SERIAL_MEN_Z135 is not set CONFIG_SERIAL_STM32=y
# CONFIG_SERIAL_STM32_CONSOLE is not set
# CONFIG_SERIAL_MVEBU_UART is not set
# CONFIG_SERIAL_OWL is not set
# CONFIG_SERIAL_RDA is not set CONFIG_SERIAL_MILBEAUT_USIO=y CONFIG_SERIAL_MILBEAUT_USIO_PORTS=4 CONFIG_SERIAL_MILBEAUT_USIO_CONSOLE=y
# end of Serial drivers
CONFIG_SERIAL_MCTRL_GPIO=y
# CONFIG_SERIAL_DEV_BUS is not setCONFIG_PRINTER=yCONFIG_LP_CONSOLE=y
# CONFIG_PPDEV is not setCONFIG_HVC_DRIVER=yCONFIG_VIRTIO_CONSOLE=yCONFIG_IPMI_HANDLER=yCONFIG_IPMI_DMI_DECODE=yCONFIG_IPMI_PLAT_DATA=yCONFIG_IPMI_PANIC_EVENT=yCONFIG_IPMI_PANIC_STRING=yCONFIG_IPMI_DEVICE_INTERFACE=yCONFIG_IPMI_SI=yCONFIG_IPMI_SSIF=y
# CONFIG_IPMI_WATCHDOG is not set
# CONFIG_IPMI_POWEROFF is not setCONFIG_IPMI_KCS_BMC=y
# CONFIG_ASPEED_KCS_IPMI_BMC is not setCONFIG_NPCM7XX_KCS_IPMI_BMC=y
# CONFIG_ASPEED_BT_IPMI_BMC is not set
# CONFIG_IPMB_DEVICE_INTERFACE is not setCONFIG_HW_RANDOM=yCONFIG_HW_RANDOM_TIMERIOMEM=yCONFIG_HW_RANDOM_INTEL=yCONFIG_HW_RANDOM_AMD=y
# CONFIG_HW_RANDOM_VIA is not set
# CONFIG_HW_RANDOM_VIRTIO is not set
# CONFIG_HW_RANDOM_STM32 is not setCONFIG_HW_RANDOM_MESON=yCONFIG_HW_RANDOM_CAVIUM=y
# CONFIG_HW_RANDOM_MTK is not setCONFIG_HW_RANDOM_EXYNOS=yCONFIG_NVRAM=y
# CONFIG_APPLICOM is not setCONFIG_MWAVE=yCONFIG_RAW_DRIVER=yCONFIG_MAX_RAW_DEVS=256CONFIG_HANGCHECK_TIMER=yCONFIG_TCG_TPM=y
# CONFIG_HW_RANDOM_TPM is not set
# CONFIG_TCG_TIS is not setCONFIG_TCG_TIS_I2C_ATMEL=y
# CONFIG_TCG_TIS_I2C_INFINEON is not set
# CONFIG_TCG_TIS_I2C_NUVOTON is not set
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not setCONFIG_TCG_VTPM_PROXY=yCONFIG_TCG_TIS_ST33ZP24=yCONFIG_TCG_TIS_ST33ZP24_I2C=y
# CONFIG_TELCLOCK is not setCONFIG_DEVPORT=yCONFIG_XILLYBUS=y
# CONFIG_XILLYBUS_PCIE is not set
# CONFIG_XILLYBUS_OF is not set
# end of Character devices
CONFIG_RANDOM_TRUST_CPU=y
# CONFIG_RANDOM_TRUST_BOOTLOADER is not set
#
# I2C support
#CONFIG_I2C=yCONFIG_I2C_BOARDINFO=yCONFIG_I2C_COMPAT=yCONFIG_I2C_CHARDEV=yCONFIG_I2C_MUX=y
#
# Multiplexer I2C Chip support
#CONFIG_I2C_ARB_GPIO_CHALLENGE=yCONFIG_I2C_MUX_GPIO=yCONFIG_I2C_MUX_GPMUX=yCONFIG_I2C_MUX_LTC4306=y
# CONFIG_I2C_MUX_PCA9541 is not set
CONFIG_I2C_MUX_PCA954x=yCONFIG_I2C_MUX_PINCTRL=y
# CONFIG_I2C_MUX_REG is not set
# CONFIG_I2C_DEMUX_PINCTRL is not setCONFIG_I2C_MUX_MLXCPLD=y
# end of Multiplexer I2C Chip support
CONFIG_I2C_HELPER_AUTO=yCONFIG_I2C_SMBUS=yCONFIG_I2C_ALGOBIT=yCONFIG_I2C_ALGOPCA=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 setCONFIG_I2C_HIX5HD2=y
# CONFIG_I2C_I801 is not set
# 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
#
# I2C system bus drivers (mostly embedded / system-on-chip) #CONFIG_I2C_ASPEED=yCONFIG_I2C_AXXIA=y
# CONFIG_I2C_BCM_IPROC is not set CONFIG_I2C_BRCMSTB=yCONFIG_I2C_CBUS_GPIO=y CONFIG_I2C_DESIGNWARE_CORE=y CONFIG_I2C_DESIGNWARE_PLATFORM=y
# CONFIG_I2C_DESIGNWARE_SLAVE is not set
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EFM32 is not set
# CONFIG_I2C_EG20T is not set
# CONFIG_I2C_EMEV2 is not setCONFIG_I2C_GPIO=yCONFIG_I2C_GPIO_FAULT_INJECTOR=yCONFIG_I2C_IMG=yCONFIG_I2C_IMX_LPI2C=yCONFIG_I2C_JZ4780=yCONFIG_I2C_KEMPLD=yCONFIG_I2C_LPC2K=yCONFIG_I2C_MESON=yCONFIG_I2C_MT65XX=y
# CONFIG_I2C_MT7621 is not set
# CONFIG_I2C_OCORES is not setCONFIG_I2C_OWL=yCONFIG_I2C_PCA_PLATFORM=yCONFIG_I2C_QCOM_GENI=y
# CONFIG_I2C_RIIC is not set
# CONFIG_I2C_RK3X is not set
# CONFIG_I2C_SH_MOBILE is not set CONFIG_I2C_SIMTEC=yCONFIG_I2C_STM32F4=y
# CONFIG_I2C_STM32F7 is not set CONFIG_I2C_SUN6I_P2WI=yCONFIG_I2C_SYNQUACER=y
# CONFIG_I2C_UNIPHIER is not set
# CONFIG_I2C_UNIPHIER_F is not set CONFIG_I2C_VERSATILE=y
# CONFIG_I2C_THUNDERX is not set CONFIG_I2C_XILINX=y
# CONFIG_I2C_XLP9XX is not setCONFIG_I2C_RCAR=y
#
# External I2C/SMBus adapter drivers
#CONFIG_I2C_DIOLAN_U2C=yCONFIG_I2C_DLN2=y
# CONFIG_I2C_PARPORT is not setCONFIG_I2C_PARPORT_LIGHT=yCONFIG_I2C_ROBOTFUZZ_OSIF=yCONFIG_I2C_TAOS_EVM=y
# CONFIG_I2C_TINY_USB is not set
#
# Other I2C/SMBus bus drivers
#CONFIG_I2C_MLXCPLD=y
# CONFIG_I2C_FSI is not set
# end of I2C Hardware Bus support
CONFIG_I2C_SLAVE=y
# CONFIG_I2C_SLAVE_EEPROM is not setCONFIG_I2C_DEBUG_CORE=yCONFIG_I2C_DEBUG_ALGO=yCONFIG_I2C_DEBUG_BUS=y
# end of I2C support
CONFIG_I3C=yCONFIG_CDNS_I3C_MASTER=y
# CONFIG_DW_I3C_MASTER is not set
# CONFIG_SPI is not set
# CONFIG_SPMI is not set
# CONFIG_HSI is not setCONFIG_PPS=yCONFIG_PPS_DEBUG=y
#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not setCONFIG_PPS_CLIENT_LDISC=yCONFIG_PPS_CLIENT_PARPORT=yCONFIG_PPS_CLIENT_GPIO=y
#
# PPS generators support
#
#
# PTP clock support
#
# CONFIG_PTP_1588_CLOCK is not set
#
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. #
# CONFIG_PTP_1588_CLOCK_PCH is not set
# end of PTP clock support
CONFIG_PINCTRL=yCONFIG_GENERIC_PINCTRL_GROUPS=yCONFIG_PINMUX=yCONFIG_GENERIC_PINMUX_FUNCTIONS=yCONFIG_PINCONF=yCONFIG_GENERIC_PINCONF=y
# CONFIG_DEBUG_PINCTRL is not setCONFIG_PINCTRL_AS3722=y
# CONFIG_PINCTRL_AXP209 is not set
# CONFIG_PINCTRL_AMD is not set
# CONFIG_PINCTRL_BM1880 is not setCONFIG_PINCTRL_DA850_PUPD=yCONFIG_PINCTRL_LPC18XX=yCONFIG_PINCTRL_MCP23S08=yCONFIG_PINCTRL_RZA1=yCONFIG_PINCTRL_RZA2=yCONFIG_PINCTRL_RZN1=y
# CONFIG_PINCTRL_SINGLE is not set
# CONFIG_PINCTRL_SX150X is not setCONFIG_PINCTRL_STMFX=yCONFIG_PINCTRL_MAX77620=yCONFIG_PINCTRL_PALMAS=y
# CONFIG_PINCTRL_INGENIC is not set
# CONFIG_PINCTRL_OCELOT is not setCONFIG_PINCTRL_OWL=y
# CONFIG_PINCTRL_S700 is not setCONFIG_PINCTRL_S900=yCONFIG_PINCTRL_ASPEED=y
# CONFIG_PINCTRL_ASPEED_G4 is not setCONFIG_PINCTRL_ASPEED_G5=yCONFIG_PINCTRL_ASPEED_G6=yCONFIG_PINCTRL_BCM281XX=y
# CONFIG_PINCTRL_BCM2835 is not setCONFIG_PINCTRL_IPROC_GPIO=yCONFIG_PINCTRL_CYGNUS_MUX=y
# CONFIG_PINCTRL_NS is not setCONFIG_PINCTRL_NSP_GPIO=y
# CONFIG_PINCTRL_NS2_MUX is not setCONFIG_PINCTRL_NSP_MUX=yCONFIG_PINCTRL_BERLIN=yCONFIG_PINCTRL_AS370=yCONFIG_PINCTRL_BERLIN_BG4CT=yCONFIG_PINCTRL_NPCM7XX=yCONFIG_PINCTRL_PXA=y
# CONFIG_PINCTRL_PXA25X is not setCONFIG_PINCTRL_PXA27X=yCONFIG_PINCTRL_MSM=y
# CONFIG_PINCTRL_APQ8064 is not set
# CONFIG_PINCTRL_APQ8084 is not setCONFIG_PINCTRL_IPQ4019=yCONFIG_PINCTRL_IPQ8064=yCONFIG_PINCTRL_IPQ8074=yCONFIG_PINCTRL_MSM8660=y
# CONFIG_PINCTRL_MSM8960 is not setCONFIG_PINCTRL_MDM9615=y
# CONFIG_PINCTRL_MSM8X74 is not set
# CONFIG_PINCTRL_MSM8916 is not set
# CONFIG_PINCTRL_MSM8994 is not set
# CONFIG_PINCTRL_MSM8996 is not setCONFIG_PINCTRL_MSM8998=yCONFIG_PINCTRL_QCS404=yCONFIG_PINCTRL_QCOM_SSBI_PMIC=y
# CONFIG_PINCTRL_SC7180 is not setCONFIG_PINCTRL_SDM660=y
# CONFIG_PINCTRL_SDM845 is not set
# CONFIG_PINCTRL_SM8150 is not setCONFIG_PINCTRL_SH_PFC=yCONFIG_PINCTRL_SH_PFC_GPIO=yCONFIG_PINCTRL_SH_FUNC_GPIO=y
# CONFIG_PINCTRL_PFC_EMEV2 is not set
# CONFIG_PINCTRL_PFC_R8A73A4 is not setCONFIG_PINCTRL_PFC_R8A7740=yCONFIG_PINCTRL_PFC_R8A7743=y
# CONFIG_PINCTRL_PFC_R8A7744 is not set
# CONFIG_PINCTRL_PFC_R8A7745 is not set
# CONFIG_PINCTRL_PFC_R8A77470 is not set
# CONFIG_PINCTRL_PFC_R8A774A1 is not setCONFIG_PINCTRL_PFC_R8A774C0=y
# CONFIG_PINCTRL_PFC_R8A7778 is not set
# CONFIG_PINCTRL_PFC_R8A7779 is not setCONFIG_PINCTRL_PFC_R8A7790=y
# CONFIG_PINCTRL_PFC_R8A7791 is not setCONFIG_PINCTRL_PFC_R8A7792=y
# CONFIG_PINCTRL_PFC_R8A7793 is not set
# CONFIG_PINCTRL_PFC_R8A7794 is not set
# CONFIG_PINCTRL_PFC_R8A7795 is not set
# CONFIG_PINCTRL_PFC_R8A7796 is not set
# CONFIG_PINCTRL_PFC_R8A77965 is not set
# CONFIG_PINCTRL_PFC_R8A77970 is not setCONFIG_PINCTRL_PFC_R8A77980=y
# CONFIG_PINCTRL_PFC_R8A77990 is not set
# CONFIG_PINCTRL_PFC_R8A77995 is not set
# CONFIG_PINCTRL_PFC_SH7203 is not setCONFIG_PINCTRL_PFC_SH7264=yCONFIG_PINCTRL_PFC_SH7269=yCONFIG_PINCTRL_PFC_SH73A0=y
# CONFIG_PINCTRL_PFC_SH7720 is not setCONFIG_PINCTRL_PFC_SH7722=yCONFIG_PINCTRL_PFC_SH7723=yCONFIG_PINCTRL_PFC_SH7724=yCONFIG_PINCTRL_PFC_SH7734=yCONFIG_PINCTRL_PFC_SH7757=yCONFIG_PINCTRL_PFC_SH7785=yCONFIG_PINCTRL_PFC_SH7786=yCONFIG_PINCTRL_PFC_SHX3=yCONFIG_PINCTRL_SPRD=yCONFIG_PINCTRL_SPRD_SC9860=yCONFIG_PINCTRL_STM32=yCONFIG_PINCTRL_STM32F429=y
# CONFIG_PINCTRL_STM32F469 is not setCONFIG_PINCTRL_STM32F746=yCONFIG_PINCTRL_STM32F769=yCONFIG_PINCTRL_STM32H743=yCONFIG_PINCTRL_STM32MP157=yCONFIG_PINCTRL_TI_IODELAY=y
# CONFIG_PINCTRL_UNIPHIER is not set
#
# MediaTek pinctrl drivers
#CONFIG_EINT_MTK=yCONFIG_PINCTRL_MTK_MOORE=yCONFIG_PINCTRL_MTK_PARIS=y
# CONFIG_PINCTRL_MT2701 is not set
# CONFIG_PINCTRL_MT7623 is not set
# CONFIG_PINCTRL_MT7629 is not set
# CONFIG_PINCTRL_MT8135 is not set
# CONFIG_PINCTRL_MT8127 is not set
# CONFIG_PINCTRL_MT2712 is not setCONFIG_PINCTRL_MT6765=y
# CONFIG_PINCTRL_MT6797 is not setCONFIG_PINCTRL_MT7622=y
# CONFIG_PINCTRL_MT8173 is not set
# CONFIG_PINCTRL_MT8183 is not set
# CONFIG_PINCTRL_MT8516 is not set
# CONFIG_PINCTRL_MT6397 is not set
# end of MediaTek pinctrl drivers
CONFIG_GPIOLIB=yCONFIG_GPIOLIB_FASTPATH_LIMIT=512CONFIG_OF_GPIO=yCONFIG_GPIOLIB_IRQCHIP=y
# CONFIG_DEBUG_GPIO is not set
# CONFIG_GPIO_SYSFS is not setCONFIG_GPIO_GENERIC=y
#
# Memory mapped GPIO drivers
#CONFIG_GPIO_74XX_MMIO=yCONFIG_GPIO_ALTERA=yCONFIG_GPIO_ASPEED=y
# CONFIG_GPIO_ATH79 is not setCONFIG_GPIO_RASPBERRYPI_EXP=yCONFIG_GPIO_BCM_KONA=yCONFIG_GPIO_BRCMSTB=yCONFIG_GPIO_CADENCE=yCONFIG_GPIO_CLPS711X=yCONFIG_GPIO_DWAPB=y
# CONFIG_GPIO_EIC_SPRD is not set
# CONFIG_GPIO_EM is not set
# CONFIG_GPIO_EXAR is not set
# CONFIG_GPIO_FTGPIO010 is not set
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_GRGPIO is not setCONFIG_GPIO_HLWD=y
# CONFIG_GPIO_ICH is not setCONFIG_GPIO_IOP=yCONFIG_GPIO_LPC18XX=yCONFIG_GPIO_LPC32XX=yCONFIG_GPIO_MB86S7X=yCONFIG_GPIO_MENZ127=yCONFIG_GPIO_MPC8XXX=y
# CONFIG_GPIO_MT7621 is not setCONFIG_GPIO_PMIC_EIC_SPRD=yCONFIG_GPIO_RCAR=yCONFIG_GPIO_SAMA5D2_PIOBU=yCONFIG_GPIO_SIOX=y
# CONFIG_GPIO_SNPS_CREG is not set
# CONFIG_GPIO_SPRD is not setCONFIG_GPIO_STP_XWAY=yCONFIG_GPIO_SYSCON=y
# CONFIG_GPIO_TEGRA is not setCONFIG_GPIO_TEGRA186=y
# CONFIG_GPIO_TS4800 is not set
# CONFIG_GPIO_THUNDERX is not setCONFIG_GPIO_UNIPHIER=y
# CONFIG_GPIO_VX855 is not setCONFIG_GPIO_XILINX=y
# CONFIG_GPIO_XLP is not setCONFIG_GPIO_ZX=yCONFIG_GPIO_AMD_FCH=y
# end of Memory mapped GPIO drivers
#
# Port-mapped I/O GPIO drivers
#
# CONFIG_GPIO_F7188X is not set
# CONFIG_GPIO_IT87 is not set
# CONFIG_GPIO_SCH is not setCONFIG_GPIO_SCH311X=y
# CONFIG_GPIO_TS5500 is not set
# CONFIG_GPIO_WINBOND is not set
# CONFIG_GPIO_WS16C48 is not set
# end of Port-mapped I/O GPIO drivers
#
# I2C GPIO expanders
#CONFIG_GPIO_ADP5588=yCONFIG_GPIO_ADP5588_IRQ=yCONFIG_GPIO_ADNP=y
# CONFIG_GPIO_GW_PLD is not set
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not setCONFIG_GPIO_PCA953X=y
# CONFIG_GPIO_PCA953X_IRQ is not set
# CONFIG_GPIO_PCF857X is not set
# CONFIG_GPIO_TPIC2810 is not setCONFIG_GPIO_TS4900=y
# end of I2C GPIO expanders
#
# MFD GPIO expanders
#CONFIG_GPIO_ADP5520=yCONFIG_GPIO_ARIZONA=y
# CONFIG_GPIO_BD70528 is not setCONFIG_GPIO_BD9571MWV=yCONFIG_GPIO_DLN2=yCONFIG_GPIO_KEMPLD=yCONFIG_GPIO_LP3943=y
# CONFIG_GPIO_LP873X is not set
# CONFIG_GPIO_LP87565 is not set
# CONFIG_GPIO_MAX77620 is not setCONFIG_GPIO_MAX77650=yCONFIG_GPIO_PALMAS=yCONFIG_GPIO_STMPE=yCONFIG_GPIO_TPS65086=yCONFIG_GPIO_TPS65218=y
# CONFIG_GPIO_TQMX86 is not set
# CONFIG_GPIO_WM831X is not setCONFIG_GPIO_WM8994=y
# end of MFD GPIO expanders
#
# PCI GPIO expanders
#
# CONFIG_GPIO_AMD8111 is not set
# CONFIG_GPIO_BT8XX is not set
# CONFIG_GPIO_MLXBF is not set
# CONFIG_GPIO_ML_IOH is not set
# CONFIG_GPIO_PCH is not set
# CONFIG_GPIO_PCI_IDIO_16 is not set
# CONFIG_GPIO_PCIE_IDIO_24 is not set
# CONFIG_GPIO_RDC321X is not set
# CONFIG_GPIO_SODAVILLE is not set
# end of PCI GPIO expanders
#
# USB GPIO expanders
#
# end of USB GPIO expanders
CONFIG_GPIO_MOCKUP=yCONFIG_W1=y
#
# 1-wire Bus Masters
#
# CONFIG_W1_MASTER_MATROX is not setCONFIG_W1_MASTER_DS2490=yCONFIG_W1_MASTER_DS2482=yCONFIG_W1_MASTER_MXC=yCONFIG_W1_MASTER_DS1WM=yCONFIG_W1_MASTER_GPIO=yCONFIG_W1_MASTER_SGI=y
# end of 1-wire Bus Masters
#
# 1-wire Slaves
#CONFIG_W1_SLAVE_THERM=y
# CONFIG_W1_SLAVE_SMEM is not setCONFIG_W1_SLAVE_DS2405=yCONFIG_W1_SLAVE_DS2408=y
# CONFIG_W1_SLAVE_DS2408_READBACK is not setCONFIG_W1_SLAVE_DS2413=yCONFIG_W1_SLAVE_DS2406=yCONFIG_W1_SLAVE_DS2423=yCONFIG_W1_SLAVE_DS2805=y
# CONFIG_W1_SLAVE_DS2431 is not set
# CONFIG_W1_SLAVE_DS2433 is not setCONFIG_W1_SLAVE_DS2438=y
# CONFIG_W1_SLAVE_DS250X is not setCONFIG_W1_SLAVE_DS2780=yCONFIG_W1_SLAVE_DS2781=y
# CONFIG_W1_SLAVE_DS28E04 is not set
# CONFIG_W1_SLAVE_DS28E17 is not set
# end of 1-wire Slaves
# CONFIG_POWER_AVS is not set CONFIG_POWER_RESET=y CONFIG_POWER_RESET_AS3722=y CONFIG_POWER_RESET_BRCMKONA=y
# CONFIG_POWER_RESET_BRCMSTB is not set
# CONFIG_POWER_RESET_GEMINI_POWEROFF is not set CONFIG_POWER_RESET_GPIO=y
# CONFIG_POWER_RESET_GPIO_RESTART is not set CONFIG_POWER_RESET_OCELOT_RESET=y
# CONFIG_POWER_RESET_PIIX4_POWEROFF is not set CONFIG_POWER_RESET_LTC2952=y CONFIG_POWER_RESET_RESTART=y
# CONFIG_POWER_RESET_KEYSTONE is not set CONFIG_POWER_RESET_SYSCON=y CONFIG_POWER_RESET_SYSCON_POWEROFF=y
# CONFIG_POWER_RESET_RMOBILE is not set CONFIG_POWER_RESET_ZX=yCONFIG_REBOOT_MODE=y CONFIG_SYSCON_REBOOT_MODE=y CONFIG_POWER_RESET_SC27XX=y
# CONFIG_NVMEM_REBOOT_MODE is not set CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set CONFIG_PDA_POWER=y CONFIG_GENERIC_ADC_BATTERY=y
# CONFIG_MAX8925_POWER is not set CONFIG_WM831X_BACKUP=y
# CONFIG_WM831X_POWER is not set CONFIG_TEST_POWER=y
# CONFIG_CHARGER_ADP5061 is not set CONFIG_BATTERY_ACT8945A=y CONFIG_BATTERY_DS2760=y
# CONFIG_BATTERY_DS2780 is not set CONFIG_BATTERY_DS2781=y
# CONFIG_BATTERY_DS2782 is not set CONFIG_BATTERY_LEGO_EV3=yCONFIG_BATTERY_SBS=yCONFIG_CHARGER_SBS=y
# CONFIG_MANAGER_SBS is not set CONFIG_BATTERY_BQ27XXX=y
# CONFIG_BATTERY_BQ27XXX_I2C is not set CONFIG_BATTERY_BQ27XXX_HDQ=y CONFIG_CHARGER_DA9150=y CONFIG_BATTERY_DA9150=y
# CONFIG_CHARGER_AXP20X is not set CONFIG_BATTERY_AXP20X=yCONFIG_AXP20X_POWER=y CONFIG_AXP288_FUEL_GAUGE=y
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set CONFIG_BATTERY_MAX1721X=y CONFIG_CHARGER_PCF50633=y
# CONFIG_CHARGER_ISP1704 is not set CONFIG_CHARGER_MAX8903=y CONFIG_CHARGER_LP8727=yCONFIG_CHARGER_GPIO=y
# CONFIG_CHARGER_MANAGER is not set CONFIG_CHARGER_LT3651=y
# CONFIG_CHARGER_MAX14577 is not set
# CONFIG_CHARGER_DETECTOR_MAX14656 is not set CONFIG_CHARGER_MAX77650=y CONFIG_CHARGER_MAX77693=y CONFIG_CHARGER_MAX8997=y
# CONFIG_CHARGER_QCOM_SMBB is not set CONFIG_CHARGER_BQ2415X=y CONFIG_CHARGER_BQ24190=y CONFIG_CHARGER_BQ24257=y CONFIG_CHARGER_BQ24735=y CONFIG_CHARGER_BQ25890=y CONFIG_CHARGER_SMB347=y CONFIG_CHARGER_TPS65090=y CONFIG_CHARGER_TPS65217=y CONFIG_BATTERY_GAUGE_LTC2941=y CONFIG_BATTERY_GOLDFISH=y
# CONFIG_BATTERY_RT5033 is not set CONFIG_CHARGER_RT9455=y
# CONFIG_CHARGER_SC2731 is not set CONFIG_FUEL_GAUGE_SC27XX=y
# CONFIG_CHARGER_UCS1002 is not set CONFIG_CHARGER_BD70528=y
# CONFIG_HWMON is not setCONFIG_THERMAL=y
# CONFIG_THERMAL_STATISTICS is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
# CONFIG_THERMAL_OF is not set CONFIG_THERMAL_WRITABLE_TRIPS=y
# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE=y
# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set CONFIG_THERMAL_GOV_FAIR_SHARE=y CONFIG_THERMAL_GOV_STEP_WISE=y
# CONFIG_THERMAL_GOV_BANG_BANG is not set CONFIG_THERMAL_GOV_USER_SPACE=y
# CONFIG_THERMAL_GOV_POWER_ALLOCATOR is not set # CONFIG_CLOCK_THERMAL is not set CONFIG_DEVFREQ_THERMAL=y
# CONFIG_THERMAL_EMULATION is not set CONFIG_THERMAL_MMIO=yCONFIG_HISI_THERMAL=yCONFIG_IMX_THERMAL=y
# CONFIG_MAX77620_THERMAL is not set CONFIG_SPEAR_THERMAL=y CONFIG_ROCKCHIP_THERMAL=y CONFIG_RCAR_THERMAL=y CONFIG_RCAR_GEN3_THERMAL=y CONFIG_KIRKWOOD_THERMAL=y CONFIG_DOVE_THERMAL=yCONFIG_ARMADA_THERMAL=y
# CONFIG_DA9062_THERMAL is not set
# CONFIG_MTK_THERMAL is not set
#
# Intel thermal drivers
#CONFIG_INTEL_POWERCLAMP=y
#
# ACPI INT340X thermal drivers
#
# end of ACPI INT340X thermal drivers
# CONFIG_INTEL_PCH_THERMAL is not set
# end of Intel thermal drivers
#
# Broadcom thermal drivers
#CONFIG_BRCMSTB_THERMAL=yCONFIG_BCM_NS_THERMAL=yCONFIG_BCM_SR_THERMAL=y
# end of Broadcom thermal drivers
#
# Texas Instruments thermal drivers
#CONFIG_TI_SOC_THERMAL=y
# CONFIG_TI_THERMAL is not set
# CONFIG_OMAP3_THERMAL is not setCONFIG_OMAP4_THERMAL=yCONFIG_OMAP5_THERMAL=yCONFIG_DRA752_THERMAL=y
# end of Texas Instruments thermal drivers
#
# Samsung thermal drivers
#
# end of Samsung thermal drivers
CONFIG_TANGO_THERMAL=yCONFIG_GENERIC_ADC_THERMAL=y
#
# Qualcomm thermal drivers
#CONFIG_QCOM_TSENS=y
# end of Qualcomm thermal drivers
CONFIG_ZX2967_THERMAL=y
# CONFIG_WATCHDOG is not setCONFIG_SSB_POSSIBLE=yCONFIG_SSB=yCONFIG_SSB_SPROM=yCONFIG_SSB_PCIHOST_POSSIBLE=yCONFIG_SSB_PCIHOST=yCONFIG_SSB_SDIOHOST_POSSIBLE=yCONFIG_SSB_SDIOHOST=yCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
# CONFIG_SSB_DRIVER_PCICORE is not setCONFIG_SSB_DRIVER_GPIO=yCONFIG_BCMA_POSSIBLE=yCONFIG_BCMA=yCONFIG_BCMA_HOST_PCI_POSSIBLE=yCONFIG_BCMA_HOST_PCI=y
# CONFIG_BCMA_HOST_SOC is not setCONFIG_BCMA_DRIVER_PCI=y
# CONFIG_BCMA_DRIVER_MIPS is not set
# CONFIG_BCMA_DRIVER_GMAC_CMN is not setCONFIG_BCMA_DRIVER_GPIO=y
# CONFIG_BCMA_DEBUG is not set
#
# Multifunction device drivers
#CONFIG_MFD_CORE=y
# CONFIG_MFD_CS5535 is not setCONFIG_MFD_ACT8945A=y
# CONFIG_MFD_SUN4I_GPADC is not set
# CONFIG_MFD_AS3711 is not setCONFIG_MFD_AS3722=yCONFIG_PMIC_ADP5520=yCONFIG_MFD_AAT2870_CORE=yCONFIG_MFD_AT91_USART=y
# CONFIG_MFD_ATMEL_FLEXCOM is not setCONFIG_MFD_ATMEL_HLCDC=y
# CONFIG_MFD_BCM590XX is not setCONFIG_MFD_BD9571MWV=yCONFIG_MFD_AXP20X=yCONFIG_MFD_AXP20X_I2C=y
# CONFIG_MFD_MADERA is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_DA9052_I2C is not set
# CONFIG_MFD_DA9055 is not setCONFIG_MFD_DA9062=yCONFIG_MFD_DA9063=yCONFIG_MFD_DA9150=yCONFIG_MFD_DLN2=y
# CONFIG_MFD_EXYNOS_LPASS is not setCONFIG_MFD_MC13XXX=yCONFIG_MFD_MC13XXX_I2C=y
# CONFIG_MFD_MXS_LRADC is not set
# CONFIG_MFD_MX25_TSADC is not setCONFIG_MFD_HI6421_PMIC=y
# CONFIG_MFD_HI655X_PMIC is not setCONFIG_HTC_PASIC3=y
# CONFIG_HTC_I2CPLD 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_PCI is not set
# CONFIG_MFD_JANZ_CMODIO is not setCONFIG_MFD_KEMPLD=yCONFIG_MFD_88PM800=yCONFIG_MFD_88PM805=y
# CONFIG_MFD_88PM860X is not setCONFIG_MFD_MAX14577=yCONFIG_MFD_MAX77620=yCONFIG_MFD_MAX77650=yCONFIG_MFD_MAX77686=yCONFIG_MFD_MAX77693=y
# CONFIG_MFD_MAX77843 is not setCONFIG_MFD_MAX8907=yCONFIG_MFD_MAX8925=yCONFIG_MFD_MAX8997=y
# CONFIG_MFD_MAX8998 is not setCONFIG_MFD_MT6397=y
# CONFIG_MFD_MENF21BMC is not set
# CONFIG_MFD_VIPERBOARD is not set
# CONFIG_MFD_RETU is not setCONFIG_MFD_PCF50633=y
# CONFIG_PCF50633_ADC is not setCONFIG_PCF50633_GPIO=yCONFIG_MFD_PM8XXX=y
# CONFIG_MFD_RDC321X is not setCONFIG_MFD_RT5033=y
# CONFIG_MFD_RC5T583 is not set
# CONFIG_MFD_RK808 is not set
# CONFIG_MFD_RN5T618 is not setCONFIG_MFD_SEC_CORE=yCONFIG_MFD_SI476X_CORE=yCONFIG_MFD_SM501=yCONFIG_MFD_SM501_GPIO=y
# CONFIG_MFD_SKY81452 is not setCONFIG_MFD_SMSC=yCONFIG_ABX500_CORE=y
# CONFIG_AB3100_CORE is not setCONFIG_MFD_STMPE=y
#
# STMicroelectronics STMPE Interface Drivers
#
# CONFIG_STMPE_I2C is not set
# end of STMicroelectronics STMPE Interface Drivers
CONFIG_MFD_SUN6I_PRCM=yCONFIG_MFD_SYSCON=y
# CONFIG_MFD_TI_AM335X_TSCADC is not setCONFIG_MFD_LP3943=y
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not setCONFIG_MFD_PALMAS=yCONFIG_TPS6105X=y
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not setCONFIG_MFD_TPS65086=yCONFIG_MFD_TPS65090=yCONFIG_MFD_TPS65217=yCONFIG_MFD_TI_LP873X=yCONFIG_MFD_TI_LP87565=yCONFIG_MFD_TPS65218=y
# CONFIG_MFD_TPS6586X is not set
# CONFIG_MFD_TPS65910 is not set
# CONFIG_MFD_TPS65912_I2C is not setCONFIG_MFD_TPS80031=y
# CONFIG_TWL4030_CORE is not set
# CONFIG_TWL6040_CORE is not setCONFIG_MFD_WL1273_CORE=yCONFIG_MFD_LM3533=y
# CONFIG_MFD_TIMBERDALE is not set
# CONFIG_MFD_TC3589X is not setCONFIG_MFD_TQMX86=y
# CONFIG_MFD_VX855 is not set
# CONFIG_MFD_LOCHNAGAR is not setCONFIG_MFD_ARIZONA=yCONFIG_MFD_ARIZONA_I2C=y
# CONFIG_MFD_CS47L24 is not setCONFIG_MFD_WM5102=y
# CONFIG_MFD_WM5110 is not set
# CONFIG_MFD_WM8997 is not setCONFIG_MFD_WM8998=y
# CONFIG_MFD_WM8400 is not setCONFIG_MFD_WM831X=yCONFIG_MFD_WM831X_I2C=y
# CONFIG_MFD_WM8350_I2C is not setCONFIG_MFD_WM8994=y
# CONFIG_MFD_STW481X is not setCONFIG_MFD_ROHM_BD718XX=yCONFIG_MFD_ROHM_BD70528=yCONFIG_MFD_STM32_LPTIMER=yCONFIG_MFD_STM32_TIMERS=y
# CONFIG_MFD_STPMIC1 is not setCONFIG_MFD_STMFX=y
# end of Multifunction device drivers
CONFIG_REGULATOR=yCONFIG_REGULATOR_DEBUG=yCONFIG_REGULATOR_FIXED_VOLTAGE=yCONFIG_REGULATOR_VIRTUAL_CONSUMER=y
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not setCONFIG_REGULATOR_88PG86X=yCONFIG_REGULATOR_88PM800=yCONFIG_REGULATOR_ACT8865=yCONFIG_REGULATOR_ACT8945A=yCONFIG_REGULATOR_AD5398=yCONFIG_REGULATOR_ANATOP=yCONFIG_REGULATOR_AAT2870=yCONFIG_REGULATOR_AS3722=yCONFIG_REGULATOR_AXP20X=yCONFIG_REGULATOR_BD70528=yCONFIG_REGULATOR_BD718XX=yCONFIG_REGULATOR_BD9571MWV=y
# CONFIG_REGULATOR_DA9062 is not setCONFIG_REGULATOR_DA9063=yCONFIG_REGULATOR_DA9210=y
# CONFIG_REGULATOR_DA9211 is not setCONFIG_REGULATOR_FAN53555=yCONFIG_REGULATOR_GPIO=yCONFIG_REGULATOR_HI6421=y
# CONFIG_REGULATOR_HI6421V530 is not set
# CONFIG_REGULATOR_ISL9305 is not set
# CONFIG_REGULATOR_ISL6271A is not setCONFIG_REGULATOR_LP3971=y
# CONFIG_REGULATOR_LP3972 is not set
# CONFIG_REGULATOR_LP872X is not setCONFIG_REGULATOR_LP873X=y
# CONFIG_REGULATOR_LP8755 is not setCONFIG_REGULATOR_LP87565=yCONFIG_REGULATOR_LTC3589=yCONFIG_REGULATOR_LTC3676=yCONFIG_REGULATOR_MAX14577=yCONFIG_REGULATOR_MAX1586=y
# CONFIG_REGULATOR_MAX77620 is not setCONFIG_REGULATOR_MAX77650=yCONFIG_REGULATOR_MAX8649=yCONFIG_REGULATOR_MAX8660=yCONFIG_REGULATOR_MAX8907=yCONFIG_REGULATOR_MAX8925=yCONFIG_REGULATOR_MAX8952=yCONFIG_REGULATOR_MAX8997=y
# CONFIG_REGULATOR_MAX77686 is not set
# CONFIG_REGULATOR_MAX77693 is not setCONFIG_REGULATOR_MAX77802=yCONFIG_REGULATOR_MC13XXX_CORE=yCONFIG_REGULATOR_MC13783=y
# CONFIG_REGULATOR_MC13892 is not setCONFIG_REGULATOR_MCP16502=yCONFIG_REGULATOR_MT6311=yCONFIG_REGULATOR_MT6323=yCONFIG_REGULATOR_MT6397=yCONFIG_REGULATOR_PALMAS=yCONFIG_REGULATOR_PBIAS=y
# CONFIG_REGULATOR_PCF50633 is not setCONFIG_REGULATOR_PFUZE100=yCONFIG_REGULATOR_PV88060=yCONFIG_REGULATOR_PV88080=y
# CONFIG_REGULATOR_PV88090 is not set
# CONFIG_REGULATOR_PWM is not set
# CONFIG_REGULATOR_QCOM_RPMH is not setCONFIG_REGULATOR_QCOM_SPMI=y
# CONFIG_REGULATOR_RT5033 is not setCONFIG_REGULATOR_S2MPA01=yCONFIG_REGULATOR_S2MPS11=y
# CONFIG_REGULATOR_S5M8767 is not setCONFIG_REGULATOR_SC2731=yCONFIG_REGULATOR_SLG51000=yCONFIG_REGULATOR_STM32_BOOSTER=yCONFIG_REGULATOR_STM32_VREFBUF=y
# CONFIG_REGULATOR_STM32_PWR is not set
# CONFIG_REGULATOR_STW481X_VMMC is not set
# CONFIG_REGULATOR_SY8106A is not setCONFIG_REGULATOR_SY8824X=y
# CONFIG_REGULATOR_TPS51632 is not set
# CONFIG_REGULATOR_TPS6105X is not setCONFIG_REGULATOR_TPS62360=y
# CONFIG_REGULATOR_TPS65023 is not set
# CONFIG_REGULATOR_TPS6507X is not setCONFIG_REGULATOR_TPS65086=yCONFIG_REGULATOR_TPS65090=yCONFIG_REGULATOR_TPS65132=yCONFIG_REGULATOR_TPS65217=yCONFIG_REGULATOR_TPS65218=y
# CONFIG_REGULATOR_TPS80031 is not set
# CONFIG_REGULATOR_UNIPHIER is not setCONFIG_REGULATOR_VCTRL=yCONFIG_REGULATOR_WM831X=yCONFIG_REGULATOR_WM8994=yCONFIG_CEC_CORE=yCONFIG_CEC_NOTIFIER=yCONFIG_RC_CORE=y
# CONFIG_RC_MAP is not set
# CONFIG_LIRC is not setCONFIG_RC_DECODERS=yCONFIG_IR_NEC_DECODER=yCONFIG_IR_RC5_DECODER=yCONFIG_IR_RC6_DECODER=yCONFIG_IR_JVC_DECODER=yCONFIG_IR_SONY_DECODER=yCONFIG_IR_SANYO_DECODER=y
# CONFIG_IR_SHARP_DECODER is not setCONFIG_IR_MCE_KBD_DECODER=yCONFIG_IR_XMP_DECODER=yCONFIG_IR_IMON_DECODER=yCONFIG_IR_RCMM_DECODER=yCONFIG_RC_DEVICES=yCONFIG_RC_ATI_REMOTE=yCONFIG_IR_ENE=yCONFIG_IR_HIX5HD2=yCONFIG_IR_IMON=y
# CONFIG_IR_IMON_RAW is not set
# CONFIG_IR_MCEUSB is not setCONFIG_IR_ITE_CIR=y
# CONFIG_IR_FINTEK is not setCONFIG_IR_MESON=yCONFIG_IR_MTK=yCONFIG_IR_NUVOTON=yCONFIG_IR_REDRAT3=yCONFIG_IR_STREAMZAP=yCONFIG_IR_WINBOND_CIR=yCONFIG_IR_IGORPLUGUSB=y
# CONFIG_IR_IGUANA is not set
# CONFIG_IR_TTUSBIR is not setCONFIG_IR_RX51=yCONFIG_IR_IMG=y
# CONFIG_IR_IMG_RAW is not setCONFIG_IR_IMG_HW=y
# CONFIG_IR_IMG_NEC is not set
# CONFIG_IR_IMG_JVC is not setCONFIG_IR_IMG_SONY=yCONFIG_IR_IMG_SHARP=y
# CONFIG_IR_IMG_SANYO is not setCONFIG_IR_IMG_RC5=yCONFIG_IR_IMG_RC6=yCONFIG_RC_LOOPBACK=yCONFIG_IR_GPIO_CIR=yCONFIG_RC_ST=yCONFIG_IR_SUNXI=y
# CONFIG_IR_SERIAL is not set
# CONFIG_IR_SIR is not set
# CONFIG_IR_TANGO is not setCONFIG_RC_XBOX_DVD=y
# CONFIG_IR_ZX is not setCONFIG_MEDIA_SUPPORT=y
#
# Multimedia core support
#CONFIG_MEDIA_CAMERA_SUPPORT=y
# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not setCONFIG_MEDIA_DIGITAL_TV_SUPPORT=yCONFIG_MEDIA_RADIO_SUPPORT=y
# CONFIG_MEDIA_SDR_SUPPORT is not set
# CONFIG_MEDIA_CEC_SUPPORT is not setCONFIG_MEDIA_CEC_RC=yCONFIG_MEDIA_CONTROLLER=yCONFIG_MEDIA_CONTROLLER_DVB=yCONFIG_VIDEO_DEV=y
# CONFIG_VIDEO_V4L2_SUBDEV_API is not setCONFIG_VIDEO_V4L2=yCONFIG_VIDEO_V4L2_I2C=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not setCONFIG_V4L2_MEM2MEM_DEV=yCONFIG_V4L2_FWNODE=yCONFIG_DVB_CORE=yCONFIG_DVB_MMAP=yCONFIG_DVB_NET=yCONFIG_DVB_MAX_ADAPTERS=16CONFIG_DVB_DYNAMIC_MINORS=yCONFIG_DVB_DEMUX_SECTION_LOSS_LOG=y
# CONFIG_DVB_ULE_DEBUG is not set
#
# Media drivers
#
# CONFIG_MEDIA_USB_SUPPORT is not set
# CONFIG_MEDIA_PCI_SUPPORT is not set
# CONFIG_V4L_PLATFORM_DRIVERS is not setCONFIG_V4L_MEM2MEM_DRIVERS=yCONFIG_VIDEO_CODA=yCONFIG_VIDEO_IMX_VDOA=yCONFIG_VIDEO_IMX_PXP=yCONFIG_VIDEO_MEDIATEK_JPEG=yCONFIG_VIDEO_MEDIATEK_VPU=yCONFIG_VIDEO_MEDIATEK_MDP=yCONFIG_VIDEO_MEDIATEK_VCODEC=yCONFIG_VIDEO_MEM2MEM_DEINTERLACE=yCONFIG_VIDEO_SAMSUNG_S5P_G2D=yCONFIG_VIDEO_SAMSUNG_S5P_JPEG=y
# CONFIG_VIDEO_SAMSUNG_S5P_MFC is not setCONFIG_VIDEO_MX2_EMMAPRP=yCONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=yCONFIG_VIDEO_STI_BDISP=yCONFIG_VIDEO_STI_HVA=yCONFIG_VIDEO_STI_HVA_DEBUGFS=y
# CONFIG_VIDEO_STI_DELTA is not setCONFIG_VIDEO_SH_VEU=yCONFIG_VIDEO_RENESAS_FDP1=y
# CONFIG_VIDEO_RENESAS_JPU is not set
# CONFIG_VIDEO_RENESAS_FCP is not setCONFIG_VIDEO_ROCKCHIP_RGA=yCONFIG_VIDEO_TI_VPE=yCONFIG_VIDEO_TI_VPE_DEBUG=yCONFIG_VIDEO_QCOM_VENUS=yCONFIG_VIDEO_TI_VPDMA=yCONFIG_VIDEO_TI_SC=yCONFIG_VIDEO_TI_CSC=y
# CONFIG_V4L_TEST_DRIVERS is not set
# CONFIG_DVB_PLATFORM_DRIVERS is not set
#
# Supported MMC/SDIO adapters
#
# CONFIG_SMS_SDIO_DRV is not setCONFIG_RADIO_ADAPTERS=yCONFIG_RADIO_TEA575X=y
# CONFIG_RADIO_SI470X is not setCONFIG_RADIO_SI4713=y
# CONFIG_USB_SI4713 is not setCONFIG_PLATFORM_SI4713=yCONFIG_I2C_SI4713=yCONFIG_USB_MR800=y
# CONFIG_USB_DSBR is not set
# CONFIG_RADIO_MAXIRADIO is not setCONFIG_RADIO_SHARK=y
# CONFIG_RADIO_SHARK2 is not setCONFIG_USB_KEENE=yCONFIG_USB_RAREMONO=yCONFIG_USB_MA901=y
# CONFIG_RADIO_TEA5764 is not setCONFIG_RADIO_SAA7706H=yCONFIG_RADIO_TEF6862=yCONFIG_RADIO_WL1273=y
#
# Texas Instruments WL128x FM driver (ST based)
#
# end of Texas Instruments WL128x FM driver (ST based)
CONFIG_V4L_RADIO_ISA_DRIVERS=yCONFIG_RADIO_ISA=y
# CONFIG_RADIO_CADET is not setCONFIG_RADIO_RTRACK=yCONFIG_RADIO_RTRACK_PORT=30f
# CONFIG_RADIO_RTRACK2 is not setCONFIG_RADIO_AZTECH=yCONFIG_RADIO_AZTECH_PORT=350CONFIG_RADIO_GEMTEK=yCONFIG_RADIO_GEMTEK_PORT=34c
# CONFIG_RADIO_GEMTEK_PROBE is not setCONFIG_RADIO_MIROPCM20=yCONFIG_RADIO_SF16FMI=yCONFIG_RADIO_SF16FMR2=yCONFIG_RADIO_TERRATEC=yCONFIG_RADIO_TRUST=yCONFIG_RADIO_TRUST_PORT=350CONFIG_RADIO_TYPHOON=yCONFIG_RADIO_TYPHOON_PORT=316CONFIG_RADIO_TYPHOON_MUTEFREQ=87500CONFIG_RADIO_ZOLTRIX=yCONFIG_RADIO_ZOLTRIX_PORT=20c
#
# Supported FireWire (IEEE 1394) Adapters
#CONFIG_DVB_FIREDTV=yCONFIG_DVB_FIREDTV_INPUT=yCONFIG_CYPRESS_FIRMWARE=yCONFIG_VIDEOBUF2_CORE=yCONFIG_VIDEOBUF2_V4L2=yCONFIG_VIDEOBUF2_MEMOPS=yCONFIG_VIDEOBUF2_DMA_CONTIG=yCONFIG_VIDEOBUF2_VMALLOC=yCONFIG_VIDEOBUF2_DMA_SG=y
#
# Media ancillary drivers (tuners, sensors, i2c, spi, frontends) #CONFIG_MEDIA_SUBDRV_AUTOSELECT=yCONFIG_VIDEO_IR_I2C=y
#
# I2C Encoders, decoders, sensors and other helper chips #
#
# Audio decoders, processors and mixers
#
# CONFIG_VIDEO_TVAUDIO is not setCONFIG_VIDEO_TDA7432=yCONFIG_VIDEO_TDA9840=y
# CONFIG_VIDEO_TEA6415C is not setCONFIG_VIDEO_TEA6420=yCONFIG_VIDEO_MSP3400=yCONFIG_VIDEO_CS3308=yCONFIG_VIDEO_CS5345=yCONFIG_VIDEO_CS53L32A=y
# CONFIG_VIDEO_TLV320AIC23B is not setCONFIG_VIDEO_UDA1342=yCONFIG_VIDEO_WM8775=yCONFIG_VIDEO_WM8739=yCONFIG_VIDEO_VP27SMPX=yCONFIG_VIDEO_SONY_BTF_MPX=y
#
# RDS decoders
#
# CONFIG_VIDEO_SAA6588 is not set
#
# Video decoders
#CONFIG_VIDEO_ADV7183=y
# CONFIG_VIDEO_BT819 is not setCONFIG_VIDEO_BT856=yCONFIG_VIDEO_BT866=y
# CONFIG_VIDEO_KS0127 is not setCONFIG_VIDEO_ML86V7667=yCONFIG_VIDEO_SAA7110=y
# CONFIG_VIDEO_SAA711X is not setCONFIG_VIDEO_TVP514X=y
# CONFIG_VIDEO_TVP5150 is not set
# CONFIG_VIDEO_TVP7002 is not setCONFIG_VIDEO_TW2804=yCONFIG_VIDEO_TW9903=y
# CONFIG_VIDEO_TW9906 is not setCONFIG_VIDEO_TW9910=yCONFIG_VIDEO_VPX3220=y
#
# Video and audio decoders
#CONFIG_VIDEO_SAA717X=yCONFIG_VIDEO_CX25840=y
#
# Video encoders
#CONFIG_VIDEO_SAA7127=y
# CONFIG_VIDEO_SAA7185 is not set
# CONFIG_VIDEO_ADV7170 is not setCONFIG_VIDEO_ADV7175=yCONFIG_VIDEO_ADV7343=yCONFIG_VIDEO_ADV7393=y
# CONFIG_VIDEO_AK881X is not setCONFIG_VIDEO_THS8200=y
#
# Camera sensor devices
#CONFIG_VIDEO_OV2640=yCONFIG_VIDEO_OV2659=yCONFIG_VIDEO_OV2680=yCONFIG_VIDEO_OV2685=yCONFIG_VIDEO_OV6650=yCONFIG_VIDEO_OV5695=yCONFIG_VIDEO_OV772X=yCONFIG_VIDEO_OV7640=yCONFIG_VIDEO_OV7670=yCONFIG_VIDEO_OV7740=y
# CONFIG_VIDEO_OV9640 is not set
# CONFIG_VIDEO_VS6624 is not set
# CONFIG_VIDEO_MT9M111 is not set
# CONFIG_VIDEO_MT9T112 is not set
# CONFIG_VIDEO_MT9V011 is not setCONFIG_VIDEO_MT9V111=yCONFIG_VIDEO_SR030PC30=yCONFIG_VIDEO_RJ54N1=y
#
# Lens drivers
#CONFIG_VIDEO_AD5820=y
#
# Flash devices
#CONFIG_VIDEO_ADP1653=yCONFIG_VIDEO_LM3560=yCONFIG_VIDEO_LM3646=y
#
# Video improvement chips
#CONFIG_VIDEO_UPD64031A=y
# CONFIG_VIDEO_UPD64083 is not set
#
# Audio/Video compression chips
#CONFIG_VIDEO_SAA6752HS=y
#
# SDR tuner chips
#
#
# Miscellaneous helper chips
#CONFIG_VIDEO_THS7303=yCONFIG_VIDEO_M52790=yCONFIG_VIDEO_I2C=y
# end of I2C Encoders, decoders, sensors and other helper chips
#
# SPI helper chips
#
# end of SPI helper chips
CONFIG_MEDIA_TUNER=y
#
# Customize TV tuners
#CONFIG_MEDIA_TUNER_SIMPLE=y
# CONFIG_MEDIA_TUNER_TDA18250 is not setCONFIG_MEDIA_TUNER_TDA8290=yCONFIG_MEDIA_TUNER_TDA827X=yCONFIG_MEDIA_TUNER_TDA18271=yCONFIG_MEDIA_TUNER_TDA9887=yCONFIG_MEDIA_TUNER_TEA5761=yCONFIG_MEDIA_TUNER_TEA5767=yCONFIG_MEDIA_TUNER_MT20XX=yCONFIG_MEDIA_TUNER_MT2060=yCONFIG_MEDIA_TUNER_MT2063=yCONFIG_MEDIA_TUNER_MT2266=yCONFIG_MEDIA_TUNER_MT2131=yCONFIG_MEDIA_TUNER_QT1010=yCONFIG_MEDIA_TUNER_XC2028=yCONFIG_MEDIA_TUNER_XC5000=yCONFIG_MEDIA_TUNER_XC4000=y
# CONFIG_MEDIA_TUNER_MXL5005S is not setCONFIG_MEDIA_TUNER_MXL5007T=yCONFIG_MEDIA_TUNER_MC44S803=yCONFIG_MEDIA_TUNER_MAX2165=y
# CONFIG_MEDIA_TUNER_TDA18218 is not setCONFIG_MEDIA_TUNER_FC0011=yCONFIG_MEDIA_TUNER_FC0012=yCONFIG_MEDIA_TUNER_FC0013=y
# CONFIG_MEDIA_TUNER_TDA18212 is not set
# CONFIG_MEDIA_TUNER_E4000 is not set
# CONFIG_MEDIA_TUNER_FC2580 is not setCONFIG_MEDIA_TUNER_M88RS6000T=y
# CONFIG_MEDIA_TUNER_TUA9001 is not setCONFIG_MEDIA_TUNER_SI2157=y
# CONFIG_MEDIA_TUNER_IT913X is not setCONFIG_MEDIA_TUNER_R820T=yCONFIG_MEDIA_TUNER_MXL301RF=yCONFIG_MEDIA_TUNER_QM1D1C0042=yCONFIG_MEDIA_TUNER_QM1D1B0004=y
# end of Customize TV tuners
#
# Customise DVB Frontends
#
#
# Multistandard (satellite) frontends
#CONFIG_DVB_STB0899=yCONFIG_DVB_STB6100=y
CONFIG_DVB_STV090x=yCONFIG_DVB_STV0910=y
CONFIG_DVB_STV6110x=y
# CONFIG_DVB_STV6111 is not set
# CONFIG_DVB_MXL5XX is not setCONFIG_DVB_M88DS3103=y
#
# Multistandard (cable + terrestrial) frontends
#CONFIG_DVB_DRXK=yCONFIG_DVB_TDA18271C2DD=y
# CONFIG_DVB_SI2165 is not setCONFIG_DVB_MN88472=yCONFIG_DVB_MN88473=y
#
# DVB-S (satellite) frontends
#CONFIG_DVB_CX24110=yCONFIG_DVB_CX24123=y
# CONFIG_DVB_MT312 is not set
# CONFIG_DVB_ZL10036 is not setCONFIG_DVB_ZL10039=y
# CONFIG_DVB_S5H1420 is not setCONFIG_DVB_STV0288=yCONFIG_DVB_STB6000=yCONFIG_DVB_STV0299=yCONFIG_DVB_STV6110=yCONFIG_DVB_STV0900=y
# CONFIG_DVB_TDA8083 is not setCONFIG_DVB_TDA10086=yCONFIG_DVB_TDA8261=yCONFIG_DVB_VES1X93=yCONFIG_DVB_TUNER_ITD1000=yCONFIG_DVB_TUNER_CX24113=y
# CONFIG_DVB_TDA826X is not setCONFIG_DVB_TUA6100=y
# CONFIG_DVB_CX24116 is not setCONFIG_DVB_CX24117=y
# CONFIG_DVB_CX24120 is not set
# CONFIG_DVB_SI21XX is not setCONFIG_DVB_TS2020=y
# CONFIG_DVB_DS3000 is not set
# CONFIG_DVB_MB86A16 is not setCONFIG_DVB_TDA10071=y
#
# DVB-T (terrestrial) frontends
#CONFIG_DVB_SP8870=y
# CONFIG_DVB_SP887X is not set
# CONFIG_DVB_CX22700 is not setCONFIG_DVB_CX22702=y
# CONFIG_DVB_S5H1432 is not setCONFIG_DVB_DRXD=yCONFIG_DVB_L64781=yCONFIG_DVB_TDA1004X=yCONFIG_DVB_NXT6000=y
# CONFIG_DVB_MT352 is not setCONFIG_DVB_ZL10353=yCONFIG_DVB_DIB3000MB=yCONFIG_DVB_DIB3000MC=yCONFIG_DVB_DIB7000M=yCONFIG_DVB_DIB7000P=yCONFIG_DVB_DIB9000=yCONFIG_DVB_TDA10048=yCONFIG_DVB_AF9013=yCONFIG_DVB_EC100=y
# CONFIG_DVB_STV0367 is not setCONFIG_DVB_CXD2820R=yCONFIG_DVB_CXD2841ER=y
# CONFIG_DVB_RTL2830 is not set
# CONFIG_DVB_RTL2832 is not set
# CONFIG_DVB_SI2168 is not setCONFIG_DVB_ZD1301_DEMOD=y
#
# DVB-C (cable) frontends
#CONFIG_DVB_VES1820=y
# CONFIG_DVB_TDA10021 is not set
# CONFIG_DVB_TDA10023 is not set
# CONFIG_DVB_STV0297 is not set
#
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends #CONFIG_DVB_NXT200X=yCONFIG_DVB_OR51211=yCONFIG_DVB_OR51132=yCONFIG_DVB_BCM3510=yCONFIG_DVB_LGDT330X=yCONFIG_DVB_LGDT3305=yCONFIG_DVB_LGDT3306A=yCONFIG_DVB_LG2160=yCONFIG_DVB_S5H1409=yCONFIG_DVB_AU8522=yCONFIG_DVB_AU8522_DTV=y
# CONFIG_DVB_AU8522_V4L is not set CONFIG_DVB_S5H1411=y
#
# ISDB-T (terrestrial) frontends
#
# CONFIG_DVB_S921 is not set
# CONFIG_DVB_DIB8000 is not set
# CONFIG_DVB_MB86A20S is not set
#
# ISDB-S (satellite) & ISDB-T (terrestrial) frontends #CONFIG_DVB_TC90522=yCONFIG_DVB_MN88443X=y
#
# Digital terrestrial only tuners/PLL
#CONFIG_DVB_PLL=y
# CONFIG_DVB_TUNER_DIB0070 is not setCONFIG_DVB_TUNER_DIB0090=y
#
# SEC control devices for DVB-S
#CONFIG_DVB_DRX39XYJ=yCONFIG_DVB_LNBH25=yCONFIG_DVB_LNBH29=yCONFIG_DVB_LNBP21=y
# CONFIG_DVB_LNBP22 is not set
# CONFIG_DVB_ISL6405 is not setCONFIG_DVB_ISL6421=y
# CONFIG_DVB_ISL6423 is not setCONFIG_DVB_A8293=yCONFIG_DVB_LGS8GL5=yCONFIG_DVB_LGS8GXX=yCONFIG_DVB_ATBM8830=y
# CONFIG_DVB_TDA665x is not setCONFIG_DVB_IX2505V=yCONFIG_DVB_M88RS2000=y
# CONFIG_DVB_AF9033 is not setCONFIG_DVB_HORUS3A=yCONFIG_DVB_ASCOT2E=yCONFIG_DVB_HELENE=y
#
# Common Interface (EN50221) controller drivers
#CONFIG_DVB_CXD2099=y
# CONFIG_DVB_SP2 is not set
#
# Tools to develop new frontends
#CONFIG_DVB_DUMMY_FE=y
# end of Customise DVB Frontends
#
# Graphics support
#
# CONFIG_AGP is not setCONFIG_VGA_ARB=yCONFIG_VGA_ARB_MAX_GPUS=16CONFIG_IMX_IPUV3_CORE=yCONFIG_DRM=yCONFIG_DRM_MIPI_DSI=y
# CONFIG_DRM_DP_AUX_CHARDEV is not set
# CONFIG_DRM_DEBUG_MM is not set
# CONFIG_DRM_DEBUG_SELFTEST is not setCONFIG_DRM_KMS_HELPER=yCONFIG_DRM_KMS_FB_HELPER=yCONFIG_DRM_FBDEV_EMULATION=yCONFIG_DRM_FBDEV_OVERALLOC=100
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not setCONFIG_DRM_DP_CEC=yCONFIG_DRM_TTM=yCONFIG_DRM_GEM_CMA_HELPER=yCONFIG_DRM_KMS_CMA_HELPER=yCONFIG_DRM_GEM_SHMEM_HELPER=yCONFIG_DRM_SCHED=y
#
# I2C encoder or helper chips
#
# CONFIG_DRM_I2C_CH7006 is not setCONFIG_DRM_I2C_SIL164=y
# CONFIG_DRM_I2C_NXP_TDA998X is not setCONFIG_DRM_I2C_NXP_TDA9950=y
# end of I2C encoder or helper chips
#
# ARM devices
#
# CONFIG_DRM_KOMEDA is not set
# end of ARM devices
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_AMDGPU is not set
#
# ACP (Audio CoProcessor) Configuration
#
# end of ACP (Audio CoProcessor) Configuration
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_I915 is not setCONFIG_DRM_VGEM=yCONFIG_DRM_VKMS=yCONFIG_DRM_EXYNOS=y
#
# CRTCs
#
# CONFIG_DRM_EXYNOS_FIMD is not setCONFIG_DRM_EXYNOS5433_DECON=y
# CONFIG_DRM_EXYNOS7_DECON is not setCONFIG_DRM_EXYNOS_MIXER=yCONFIG_DRM_EXYNOS_VIDI=y
#
# Encoders and Bridges
#
# CONFIG_DRM_EXYNOS_DSI is not set
# CONFIG_DRM_EXYNOS_HDMI is not setCONFIG_DRM_EXYNOS_MIC=y
#
# Sub-drivers
#CONFIG_DRM_EXYNOS_G2D=yCONFIG_DRM_EXYNOS_IPP=yCONFIG_DRM_EXYNOS_FIMC=yCONFIG_DRM_EXYNOS_ROTATOR=yCONFIG_DRM_EXYNOS_SCALER=y
# CONFIG_DRM_EXYNOS_GSC 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_CIRRUS_QEMU is not set
# CONFIG_DRM_RCAR_DW_HDMI is not set
# CONFIG_DRM_RCAR_LVDS is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not setCONFIG_DRM_VIRTIO_GPU=yCONFIG_DRM_PANEL=y
#
# Display Panels
#
# CONFIG_DRM_PANEL_ARM_VERSATILE is not set
# CONFIG_DRM_PANEL_LVDS is not set CONFIG_DRM_PANEL_SIMPLE=y CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D=y CONFIG_DRM_PANEL_ILITEK_ILI9881C=y CONFIG_DRM_PANEL_INNOLUX_P079ZCA=y
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set # CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set # CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set # CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS=y CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=y
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set CONFIG_DRM_PANEL_RAYDIUM_RM67191=y CONFIG_DRM_PANEL_RAYDIUM_RM68200=y
# CONFIG_DRM_PANEL_ROCKTECH_JH057N00900 is not set # CONFIG_DRM_PANEL_RONBO_RB070D30 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03=y CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=y CONFIG_DRM_PANEL_SEIKO_43WVF1G=y CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=y
# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set CONFIG_DRM_PANEL_SHARP_LS043T1LE01=y CONFIG_DRM_PANEL_SITRONIX_ST7701=y CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=y
# end of Display Panels
CONFIG_DRM_BRIDGE=yCONFIG_DRM_PANEL_BRIDGE=y
#
# Display Interface Bridges
#
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_CDNS_DSI is not setCONFIG_DRM_DUMB_VGA_DAC=yCONFIG_DRM_LVDS_ENCODER=yCONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW=y
# CONFIG_DRM_NXP_PTN3460 is not setCONFIG_DRM_PARADE_PS8622=yCONFIG_DRM_SIL_SII8620=yCONFIG_DRM_SII902X=yCONFIG_DRM_SII9234=yCONFIG_DRM_THINE_THC63LVD1024=yCONFIG_DRM_TOSHIBA_TC358764=yCONFIG_DRM_TOSHIBA_TC358767=y
# CONFIG_DRM_TI_TFP410 is not setCONFIG_DRM_TI_SN65DSI86=yCONFIG_DRM_I2C_ADV7511=yCONFIG_DRM_I2C_ADV7533=yCONFIG_DRM_I2C_ADV7511_CEC=yCONFIG_DRM_DW_HDMI=yCONFIG_DRM_DW_HDMI_AHB_AUDIO=yCONFIG_DRM_DW_HDMI_CEC=y
# end of Display Interface Bridges
CONFIG_DRM_IMX=yCONFIG_DRM_IMX_PARALLEL_DISPLAY=y
# CONFIG_DRM_IMX_TVE is not setCONFIG_DRM_IMX_LDB=yCONFIG_DRM_IMX_HDMI=yCONFIG_DRM_INGENIC=y
# CONFIG_DRM_V3D is not setCONFIG_DRM_ETNAVIV=yCONFIG_DRM_ETNAVIV_THERMAL=y
# CONFIG_DRM_ARCPGU is not set
# CONFIG_DRM_MXSFB is not setCONFIG_DRM_GM12U320=y
# CONFIG_DRM_PL111 is not set
# CONFIG_DRM_TVE200 is not set
# CONFIG_DRM_VBOXVIDEO is not set
# CONFIG_DRM_LIMA is not setCONFIG_DRM_PANFROST=y
# CONFIG_DRM_ASPEED_GFX is not setCONFIG_DRM_MCDE=y
# CONFIG_DRM_LEGACY is not setCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
#
# Frame buffer Devices
#CONFIG_FB_CMDLINE=yCONFIG_FB_NOTIFY=yCONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not setCONFIG_FB_BOOT_VESA_SUPPORT=yCONFIG_FB_CFB_FILLRECT=yCONFIG_FB_CFB_COPYAREA=yCONFIG_FB_CFB_IMAGEBLIT=yCONFIG_FB_SYS_FILLRECT=yCONFIG_FB_SYS_COPYAREA=yCONFIG_FB_SYS_IMAGEBLIT=yCONFIG_FB_FOREIGN_ENDIAN=y
# CONFIG_FB_BOTH_ENDIAN is not setCONFIG_FB_BIG_ENDIAN=y
# CONFIG_FB_LITTLE_ENDIAN is not setCONFIG_FB_SYS_FOPS=yCONFIG_FB_DEFERRED_IO=yCONFIG_FB_HECUBA=yCONFIG_FB_BACKLIGHT=yCONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_TILEBLITTING is not set
#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CLPS711X is not set
# CONFIG_FB_IMX is not set
# CONFIG_FB_CYBER2000 is not setCONFIG_FB_ARC=y
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not setCONFIG_FB_VESA=yCONFIG_FB_N411=y
# CONFIG_FB_HGA is not setCONFIG_FB_GBE=yCONFIG_FB_GBE_MEM=4CONFIG_FB_PVR2=yCONFIG_FB_OPENCORES=yCONFIG_FB_S1D13XXX=y
# CONFIG_FB_ATMEL is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I740 is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_PXA168 is not setCONFIG_FB_TMIO=yCONFIG_FB_TMIO_ACCELL=y
# CONFIG_FB_S3C is not set
# CONFIG_FB_SM501 is not setCONFIG_FB_SMSCUFX=y
# CONFIG_FB_UDL is not setCONFIG_FB_IBM_GXT4500=yCONFIG_FB_GOLDFISH=y
# CONFIG_FB_DA8XX is not setCONFIG_FB_VIRTUAL=yCONFIG_FB_METRONOME=y
# CONFIG_FB_MB862XX is not setCONFIG_FB_BROADSHEET=yCONFIG_FB_SIMPLE=yCONFIG_FB_SSD1307=y
# CONFIG_FB_SM712 is not set
# CONFIG_FB_OMAP2 is not set
# end of Frame buffer Devices
#
# Backlight & LCD device support
#
# CONFIG_LCD_CLASS_DEVICE is not setCONFIG_BACKLIGHT_CLASS_DEVICE=yCONFIG_BACKLIGHT_GENERIC=yCONFIG_BACKLIGHT_LM3533=yCONFIG_BACKLIGHT_PWM=y
# CONFIG_BACKLIGHT_MAX8925 is not setCONFIG_BACKLIGHT_PM8941_WLED=yCONFIG_BACKLIGHT_SAHARA=yCONFIG_BACKLIGHT_WM831X=yCONFIG_BACKLIGHT_ADP5520=y
# CONFIG_BACKLIGHT_ADP8860 is not setCONFIG_BACKLIGHT_ADP8870=y
# CONFIG_BACKLIGHT_PCF50633 is not setCONFIG_BACKLIGHT_AAT2870=y
# CONFIG_BACKLIGHT_LM3630A is not setCONFIG_BACKLIGHT_LM3639=y
# CONFIG_BACKLIGHT_LP855X is not setCONFIG_BACKLIGHT_TPS65217=y
# CONFIG_BACKLIGHT_GPIO is not setCONFIG_BACKLIGHT_LV5207LP=y
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set
# end of Backlight & LCD device support
CONFIG_VIDEOMODE_HELPERS=yCONFIG_HDMI=y
#
# Console display driver support
#CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT=y CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=80 CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set
# end of Console display driver support
CONFIG_LOGO=yCONFIG_LOGO_LINUX_MONO=yCONFIG_LOGO_LINUX_VGA16=yCONFIG_LOGO_LINUX_CLUT224=y
# end of Graphics support
CONFIG_SOUND=yCONFIG_SOUND_OSS_CORE=yCONFIG_SOUND_OSS_CORE_PRECLAIM=yCONFIG_SND=yCONFIG_SND_TIMER=yCONFIG_SND_PCM=yCONFIG_SND_PCM_ELD=yCONFIG_SND_PCM_IEC958=yCONFIG_SND_HWDEP=yCONFIG_SND_SEQ_DEVICE=yCONFIG_SND_RAWMIDI=yCONFIG_SND_OSSEMUL=yCONFIG_SND_MIXER_OSS=yCONFIG_SND_PCM_OSS=y
# CONFIG_SND_PCM_OSS_PLUGINS is not setCONFIG_SND_PCM_TIMER=yCONFIG_SND_HRTIMER=yCONFIG_SND_DYNAMIC_MINORS=yCONFIG_SND_MAX_CARDS=32CONFIG_SND_SUPPORT_OLD_API=yCONFIG_SND_PROC_FS=y
# CONFIG_SND_VERBOSE_PROCFS is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not setCONFIG_SND_DMA_SGBUF=yCONFIG_SND_SEQUENCER=yCONFIG_SND_SEQ_DUMMY=yCONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_SEQ_HRTIMER_DEFAULT is not setCONFIG_SND_SEQ_MIDI_EVENT=yCONFIG_SND_SEQ_MIDI=yCONFIG_SND_SEQ_MIDI_EMUL=yCONFIG_SND_SEQ_VIRMIDI=yCONFIG_SND_MPU401_UART=yCONFIG_SND_OPL3_LIB=yCONFIG_SND_OPL4_LIB=yCONFIG_SND_OPL3_LIB_SEQ=yCONFIG_SND_OPL4_LIB_SEQ=y
# CONFIG_SND_DRIVERS is not setCONFIG_SND_WSS_LIB=yCONFIG_SND_SB_COMMON=yCONFIG_SND_SB16_DSP=yCONFIG_SND_ISA=yCONFIG_SND_ADLIB=y
# CONFIG_SND_AD1848 is not setCONFIG_SND_AZT1605=y
# CONFIG_SND_AZT2316 is not setCONFIG_SND_CMI8328=yCONFIG_SND_CMI8330=y
# CONFIG_SND_CS4231 is not set
# CONFIG_SND_CS4236 is not setCONFIG_SND_ES1688=y
# CONFIG_SND_ES18XX is not setCONFIG_SND_SC6000=y
# CONFIG_SND_GUSCLASSIC is not setCONFIG_SND_GUSEXTREME=yCONFIG_SND_GUSMAX=y
# CONFIG_SND_JAZZ16 is not setCONFIG_SND_OPL3SA2=yCONFIG_SND_OPTI92X_AD1848=y
# CONFIG_SND_OPTI92X_CS4231 is not setCONFIG_SND_OPTI93X=yCONFIG_SND_MIRO=y
# CONFIG_SND_SB8 is not setCONFIG_SND_SB16=yCONFIG_SND_SBAWE=yCONFIG_SND_SBAWE_SEQ=y
# CONFIG_SND_SB16_CSP is not set
# CONFIG_SND_SSCAPE is not setCONFIG_SND_WAVEFRONT=yCONFIG_SND_MSND_PINNACLE=yCONFIG_SND_MSND_CLASSIC=yCONFIG_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_CS5530 is not set
# CONFIG_SND_CS5535AUDIO 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_INTEL is not set
# end of HD-Audio
CONFIG_SND_HDA_PREALLOC_SIZE=64CONFIG_SND_USB=yCONFIG_SND_USB_AUDIO=yCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=yCONFIG_SND_USB_UA101=y
# CONFIG_SND_USB_USX2Y is not setCONFIG_SND_USB_CAIAQ=y
# CONFIG_SND_USB_CAIAQ_INPUT is not setCONFIG_SND_USB_US122L=y
# CONFIG_SND_USB_6FIRE is not set
# CONFIG_SND_USB_HIFACE is not set
# CONFIG_SND_BCD2000 is not setCONFIG_SND_USB_LINE6=y
# CONFIG_SND_USB_POD is not set
# CONFIG_SND_USB_PODHD is not setCONFIG_SND_USB_TONEPORT=yCONFIG_SND_USB_VARIAX=y
# CONFIG_SND_FIREWIRE is not set
# CONFIG_SND_SOC is not setCONFIG_SND_X86=yCONFIG_SND_SYNTH_EMUX=y
#
# HID support
#CONFIG_HID=yCONFIG_HID_BATTERY_STRENGTH=y
# CONFIG_HIDRAW is not setCONFIG_UHID=y
# CONFIG_HID_GENERIC is not set
#
# Special HID drivers
#CONFIG_HID_A4TECH=y
# CONFIG_HID_ACCUTOUCH is not setCONFIG_HID_ACRUX=yCONFIG_HID_ACRUX_FF=yCONFIG_HID_APPLE=y
# CONFIG_HID_APPLEIR is not set
# CONFIG_HID_ASUS is not setCONFIG_HID_AUREAL=yCONFIG_HID_BELKIN=yCONFIG_HID_BETOP_FF=yCONFIG_HID_BIGBEN_FF=yCONFIG_HID_CHERRY=yCONFIG_HID_CHICONY=yCONFIG_HID_CORSAIR=yCONFIG_HID_COUGAR=yCONFIG_HID_MACALLY=yCONFIG_HID_PRODIKEYS=y
# CONFIG_HID_CMEDIA is not setCONFIG_HID_CREATIVE_SB0540=y
# CONFIG_HID_CYPRESS is not set
# CONFIG_HID_DRAGONRISE is not setCONFIG_HID_EMS_FF=yCONFIG_HID_ELAN=y
# CONFIG_HID_ELECOM is not setCONFIG_HID_ELO=yCONFIG_HID_EZKEY=y
# CONFIG_HID_GEMBIRD is not setCONFIG_HID_GFRM=yCONFIG_HID_HOLTEK=yCONFIG_HOLTEK_FF=yCONFIG_HID_GT683R=yCONFIG_HID_KEYTOUCH=yCONFIG_HID_KYE=yCONFIG_HID_UCLOGIC=y
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_VIEWSONIC is not setCONFIG_HID_GYRATION=yCONFIG_HID_ICADE=y
# CONFIG_HID_ITE is not set
# CONFIG_HID_JABRA is not setCONFIG_HID_TWINHAN=yCONFIG_HID_KENSINGTON=y
# CONFIG_HID_LCPOWER is not setCONFIG_HID_LED=yCONFIG_HID_LENOVO=yCONFIG_HID_LOGITECH=yCONFIG_HID_LOGITECH_HIDPP=y
# CONFIG_LOGITECH_FF is not setCONFIG_LOGIRUMBLEPAD2_FF=y
# CONFIG_LOGIG940_FF is not set
# CONFIG_LOGIWHEELS_FF is not setCONFIG_HID_MAGICMOUSE=y
# CONFIG_HID_MALTRON is not set
# CONFIG_HID_MAYFLASH is not setCONFIG_HID_REDRAGON=y
# CONFIG_HID_MICROSOFT is not set
# CONFIG_HID_MONTEREY is not setCONFIG_HID_MULTITOUCH=yCONFIG_HID_NTI=y
# CONFIG_HID_NTRIG is not set
# CONFIG_HID_ORTEK is not setCONFIG_HID_PANTHERLORD=y
# CONFIG_PANTHERLORD_FF is not setCONFIG_HID_PENMOUNT=yCONFIG_HID_PETALYNX=yCONFIG_HID_PICOLCD=yCONFIG_HID_PICOLCD_FB=yCONFIG_HID_PICOLCD_BACKLIGHT=yCONFIG_HID_PICOLCD_LEDS=yCONFIG_HID_PICOLCD_CIR=yCONFIG_HID_PLANTRONICS=yCONFIG_HID_PRIMAX=yCONFIG_HID_RETRODE=y
# CONFIG_HID_ROCCAT is not setCONFIG_HID_SAITEK=yCONFIG_HID_SAMSUNG=yCONFIG_HID_SONY=yCONFIG_SONY_FF=y
# CONFIG_HID_SPEEDLINK is not set
# CONFIG_HID_STEAM is not setCONFIG_HID_STEELSERIES=y
# CONFIG_HID_SUNPLUS is not setCONFIG_HID_RMI=yCONFIG_HID_GREENASIA=y
# CONFIG_GREENASIA_FF is not setCONFIG_HID_SMARTJOYPLUS=y
# CONFIG_SMARTJOYPLUS_FF is not set
# CONFIG_HID_TIVO is not set
# CONFIG_HID_TOPSEED is not setCONFIG_HID_THINGM=yCONFIG_HID_THRUSTMASTER=yCONFIG_THRUSTMASTER_FF=y
# CONFIG_HID_UDRAW_PS3 is not setCONFIG_HID_U2FZERO=y
# CONFIG_HID_WACOM is not setCONFIG_HID_WIIMOTE=yCONFIG_HID_XINMO=y
# CONFIG_HID_ZEROPLUS is not setCONFIG_HID_ZYDACRON=y
# 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=y
# CONFIG_USB_HIDDEV is not set
# end of USB HID support
#
# I2C HID support
#CONFIG_I2C_HID=y
# end of I2C HID support
#
# Intel ISH HID support
#
# CONFIG_INTEL_ISH_HID is not set
# end of Intel ISH 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_CONN_GPIO=yCONFIG_USB_ARCH_HAS_HCD=yCONFIG_USB=yCONFIG_USB_PCI=y
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
#
# Miscellaneous USB options
#CONFIG_USB_DEFAULT_PERSIST=y
# CONFIG_USB_DYNAMIC_MINORS is not setCONFIG_USB_OTG=y
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not setCONFIG_USB_OTG_FSM=y
# 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 set
# CONFIG_USB_XHCI_HCD is not set
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_OXU210HP_HCD is not setCONFIG_USB_ISP116X_HCD=yCONFIG_USB_ISP1362_HCD=y
# CONFIG_USB_FOTG210_HCD is not setCONFIG_USB_OHCI_HCD=yCONFIG_USB_OHCI_HCD_PCI=yCONFIG_USB_OHCI_HCD_SSB=yCONFIG_USB_OHCI_HCD_PLATFORM=y
# CONFIG_USB_UHCI_HCD is not setCONFIG_USB_U132_HCD=y
# CONFIG_USB_SL811_HCD is not setCONFIG_USB_R8A66597_HCD=yCONFIG_USB_HCD_BCMA=yCONFIG_USB_HCD_SSB=y
# CONFIG_USB_HCD_TEST_MODE is not set
#
# USB Device Class drivers
#CONFIG_USB_ACM=y
# CONFIG_USB_PRINTER is not setCONFIG_USB_WDM=y
# 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 is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not setCONFIG_USB_MICROTEK=y
# CONFIG_USBIP_CORE is not setCONFIG_USB_CDNS3=y
# CONFIG_USB_CDNS3_HOST is not set
# CONFIG_USB_MTU3 is not setCONFIG_USB_MUSB_HDRC=yCONFIG_USB_MUSB_HOST=y
#
# Platform Glue Layer
#
# CONFIG_USB_MUSB_TUSB6010 is not setCONFIG_USB_MUSB_DSPS=yCONFIG_USB_MUSB_UX500=yCONFIG_USB_MUSB_AM335X_CHILD=y
#
# MUSB DMA mode
#CONFIG_MUSB_PIO_ONLY=yCONFIG_USB_DWC3=yCONFIG_USB_DWC3_HOST=y
#
# Platform Glue Driver Support
#CONFIG_USB_DWC3_OMAP=yCONFIG_USB_DWC3_EXYNOS=yCONFIG_USB_DWC3_HAPS=yCONFIG_USB_DWC3_KEYSTONE=yCONFIG_USB_DWC3_MESON_G12A=yCONFIG_USB_DWC3_OF_SIMPLE=yCONFIG_USB_DWC3_ST=yCONFIG_USB_DWC3_QCOM=yCONFIG_USB_DWC2=yCONFIG_USB_DWC2_HOST=y
#
# Gadget/Dual-role mode requires USB Gadget support to be enabled #
# CONFIG_USB_DWC2_PCI is not set CONFIG_USB_DWC2_DEBUG=y
# CONFIG_USB_DWC2_VERBOSE is not set
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
# CONFIG_USB_DWC2_DEBUG_PERIODIC is not set
# CONFIG_USB_ISP1760 is not set
#
# USB port drivers
#CONFIG_USB_USS720=y
# CONFIG_USB_SERIAL is not set
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not setCONFIG_USB_EMI26=yCONFIG_USB_ADUTUX=y
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_LEGOTOWER is not setCONFIG_USB_LCD=yCONFIG_USB_CYPRESS_CY7C63=yCONFIG_USB_CYTHERM=yCONFIG_USB_IDMOUSE=yCONFIG_USB_FTDI_ELAN=yCONFIG_USB_APPLEDISPLAY=y
# CONFIG_USB_SISUSBVGA is not setCONFIG_USB_LD=yCONFIG_USB_TRANCEVIBRATOR=yCONFIG_USB_IOWARRIOR=y
# CONFIG_USB_TEST is not set
# CONFIG_USB_EHSET_TEST_FIXTURE is not setCONFIG_USB_ISIGHTFW=yCONFIG_USB_YUREX=y
# 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 setCONFIG_USB_LINK_LAYER_TEST=yCONFIG_USB_CHAOSKEY=y
#
# USB Physical Layer drivers
#CONFIG_USB_PHY=yCONFIG_KEYSTONE_USB_PHY=yCONFIG_NOP_USB_XCEIV=y
# CONFIG_AM335X_PHY_USB is not setCONFIG_USB_GPIO_VBUS=y
# CONFIG_USB_ISP1301 is not set
# end of USB Physical Layer drivers
# CONFIG_USB_GADGET is not setCONFIG_TYPEC=yCONFIG_TYPEC_TCPM=y
# CONFIG_TYPEC_TCPCI is not setCONFIG_TYPEC_FUSB302=yCONFIG_TYPEC_UCSI=yCONFIG_UCSI_CCG=y
# CONFIG_TYPEC_TPS6598X is not set
#
# USB Type-C Multiplexer/DeMultiplexer Switch support #
# CONFIG_TYPEC_MUX_PI3USB30532 is not set
# end of USB Type-C Multiplexer/DeMultiplexer Switch support
#
# USB Type-C Alternate Mode drivers
#CONFIG_TYPEC_DP_ALTMODE=yCONFIG_TYPEC_NVIDIA_ALTMODE=y
# end of USB Type-C Alternate Mode drivers
CONFIG_USB_ROLE_SWITCH=yCONFIG_MMC=y
# CONFIG_PWRSEQ_EMMC is not set
# CONFIG_PWRSEQ_SIMPLE is not setCONFIG_MMC_BLOCK=yCONFIG_MMC_BLOCK_MINORS=8CONFIG_SDIO_UART=yCONFIG_MMC_TEST=y
#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_DEBUG is not setCONFIG_MMC_SDHCI=y
# CONFIG_MMC_SDHCI_PCI is not set
# CONFIG_MMC_SDHCI_PLTFM is not set
# CONFIG_MMC_MESON_MX_SDIO is not setCONFIG_MMC_OMAP_HS=yCONFIG_MMC_WBSD=y
# CONFIG_MMC_TIFM_SD is not set
# CONFIG_MMC_GOLDFISH is not setCONFIG_MMC_TMIO_CORE=y
# CONFIG_MMC_SDHI is not setCONFIG_MMC_UNIPHIER=y
# CONFIG_MMC_CB710 is not set
# CONFIG_MMC_VIA_SDMMC is not setCONFIG_MMC_DW=yCONFIG_MMC_DW_PLTFM=y
# CONFIG_MMC_DW_BLUEFIELD is not setCONFIG_MMC_DW_EXYNOS=y
# CONFIG_MMC_DW_HI3798CV200 is not set
# CONFIG_MMC_DW_K3 is not set
# CONFIG_MMC_DW_PCI is not set
# CONFIG_MMC_SH_MMCIF is not setCONFIG_MMC_VUB300=y
# CONFIG_MMC_USHC is not set
# CONFIG_MMC_USDHI6ROL0 is not set
# CONFIG_MMC_REALTEK_USB is not setCONFIG_MMC_CQHCI=y
# CONFIG_MMC_TOSHIBA_PCI is not setCONFIG_MMC_BCM2835=yCONFIG_MMC_MTK=yCONFIG_MEMSTICK=yCONFIG_MEMSTICK_DEBUG=y
#
# MemoryStick drivers
#CONFIG_MEMSTICK_UNSAFE_RESUME=yCONFIG_MSPRO_BLOCK=yCONFIG_MS_BLOCK=y
#
# MemoryStick Host Controller Drivers
#
# CONFIG_MEMSTICK_TIFM_MS is not set
# CONFIG_MEMSTICK_JMICRON_38X is not set
# CONFIG_MEMSTICK_R592 is not setCONFIG_MEMSTICK_REALTEK_USB=yCONFIG_NEW_LEDS=yCONFIG_LEDS_CLASS=yCONFIG_LEDS_CLASS_FLASH=yCONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y
#
# LED drivers
#
# CONFIG_LEDS_AAT1290 is not setCONFIG_LEDS_AN30259A=y
# CONFIG_LEDS_APU is not setCONFIG_LEDS_AS3645A=yCONFIG_LEDS_BCM6328=yCONFIG_LEDS_BCM6358=y
# CONFIG_LEDS_LM3530 is not set
# CONFIG_LEDS_LM3532 is not setCONFIG_LEDS_LM3533=yCONFIG_LEDS_LM3642=y
# CONFIG_LEDS_LM3692X is not set
# CONFIG_LEDS_LM3601X is not setCONFIG_LEDS_MT6323=yCONFIG_LEDS_PCA9532=yCONFIG_LEDS_PCA9532_GPIO=yCONFIG_LEDS_GPIO=yCONFIG_LEDS_LP3944=yCONFIG_LEDS_LP3952=yCONFIG_LEDS_LP55XX_COMMON=y
# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_LP5523 is not setCONFIG_LEDS_LP5562=yCONFIG_LEDS_LP8501=yCONFIG_LEDS_LP8860=y
# CONFIG_LEDS_CLEVO_MAIL is not set
# CONFIG_LEDS_PCA955X is not setCONFIG_LEDS_PCA963X=yCONFIG_LEDS_WM831X_STATUS=y
# CONFIG_LEDS_PWM is not set
# CONFIG_LEDS_REGULATOR is not setCONFIG_LEDS_BD2802=y
# CONFIG_LEDS_INTEL_SS4200 is not setCONFIG_LEDS_LT3593=yCONFIG_LEDS_ADP5520=yCONFIG_LEDS_MC13783=yCONFIG_LEDS_TCA6507=yCONFIG_LEDS_TLC591XX=yCONFIG_LEDS_MAX77650=yCONFIG_LEDS_MAX77693=yCONFIG_LEDS_MAX8997=y
CONFIG_LEDS_LM355x=yCONFIG_LEDS_OT200=yCONFIG_LEDS_KTD2692=y
# CONFIG_LEDS_IS31FL319X is not setCONFIG_LEDS_IS31FL32XX=y
#
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) #CONFIG_LEDS_BLINKM=y
# CONFIG_LEDS_SYSCON is not set
# CONFIG_LEDS_PM8058 is not set
# CONFIG_LEDS_MLXCPLD is not setCONFIG_LEDS_MLXREG=yCONFIG_LEDS_USER=y
# CONFIG_LEDS_TI_LMU_COMMON is not set
#
# LED Triggers
#CONFIG_LEDS_TRIGGERS=yCONFIG_LEDS_TRIGGER_TIMER=y
# CONFIG_LEDS_TRIGGER_ONESHOT is not setCONFIG_LEDS_TRIGGER_DISK=yCONFIG_LEDS_TRIGGER_MTD=yCONFIG_LEDS_TRIGGER_HEARTBEAT=yCONFIG_LEDS_TRIGGER_BACKLIGHT=yCONFIG_LEDS_TRIGGER_CPU=yCONFIG_LEDS_TRIGGER_ACTIVITY=yCONFIG_LEDS_TRIGGER_GPIO=yCONFIG_LEDS_TRIGGER_DEFAULT_ON=y
#
# iptables trigger is under Netfilter config (LED target) # CONFIG_LEDS_TRIGGER_TRANSIENT=y CONFIG_LEDS_TRIGGER_CAMERA=y # CONFIG_LEDS_TRIGGER_PANIC is not set # CONFIG_LEDS_TRIGGER_NETDEV is not set CONFIG_LEDS_TRIGGER_PATTERN=y CONFIG_LEDS_TRIGGER_AUDIO=y CONFIG_ACCESSIBILITY=y # CONFIG_A11Y_BRAILLE_CONSOLE is not set # CONFIG_INFINIBAND is not set CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y CONFIG_EDAC=y # CONFIG_EDAC_LEGACY_SYSFS is not set # CONFIG_EDAC_DEBUG is not set # CONFIG_EDAC_E752X is not set # CONFIG_EDAC_I82975X is not set # CONFIG_EDAC_I3000 is not set # CONFIG_EDAC_I3200 is not set # CONFIG_EDAC_IE31200 is not set # CONFIG_EDAC_X38 is not set # CONFIG_EDAC_I5400 is not set # CONFIG_EDAC_I5000 is not set # CONFIG_EDAC_I5100 is not set # CONFIG_EDAC_I7300 is not set # CONFIG_EDAC_XGENE is not set CONFIG_RTC_LIB=y CONFIG_RTC_MC146818_LIB=y CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y CONFIG_RTC_HCTOSYS_DEVICE="rtc0" # CONFIG_RTC_SYSTOHC is not set # CONFIG_RTC_DEBUG is not set # CONFIG_RTC_NVMEM is not set
#
# RTC interfaces
#
# CONFIG_RTC_INTF_SYSFS is not set
# CONFIG_RTC_INTF_PROC is not set
# CONFIG_RTC_INTF_DEV is not setCONFIG_RTC_DRV_TEST=y
#
# I2C RTC drivers
#CONFIG_RTC_DRV_88PM80X=yCONFIG_RTC_DRV_ABB5ZES3=yCONFIG_RTC_DRV_ABEOZ9=yCONFIG_RTC_DRV_ABX80X=y
# CONFIG_RTC_DRV_BRCMSTB is not set
# CONFIG_RTC_DRV_AS3722 is not setCONFIG_RTC_DRV_DS1307=yCONFIG_RTC_DRV_DS1307_CENTURY=yCONFIG_RTC_DRV_DS1374=y
# CONFIG_RTC_DRV_DS1374_WDT is not setCONFIG_RTC_DRV_DS1672=y
# CONFIG_RTC_DRV_HYM8563 is not setCONFIG_RTC_DRV_MAX6900=yCONFIG_RTC_DRV_MAX8907=yCONFIG_RTC_DRV_MAX8925=yCONFIG_RTC_DRV_MAX8997=yCONFIG_RTC_DRV_MAX77686=yCONFIG_RTC_DRV_MESON_VRTC=yCONFIG_RTC_DRV_RS5C372=yCONFIG_RTC_DRV_ISL1208=yCONFIG_RTC_DRV_ISL12022=yCONFIG_RTC_DRV_ISL12026=yCONFIG_RTC_DRV_X1205=yCONFIG_RTC_DRV_PCF8523=y
# CONFIG_RTC_DRV_PCF85063 is not setCONFIG_RTC_DRV_PCF85363=y
# CONFIG_RTC_DRV_PCF8563 is not setCONFIG_RTC_DRV_PCF8583=yCONFIG_RTC_DRV_M41T80=yCONFIG_RTC_DRV_M41T80_WDT=yCONFIG_RTC_DRV_BD70528=yCONFIG_RTC_DRV_BQ32K=yCONFIG_RTC_DRV_PALMAS=y
# CONFIG_RTC_DRV_TPS80031 is not setCONFIG_RTC_DRV_S35390A=yCONFIG_RTC_DRV_FM3130=y
# CONFIG_RTC_DRV_RX8010 is not setCONFIG_RTC_DRV_RX8581=y
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not setCONFIG_RTC_DRV_RV3028=yCONFIG_RTC_DRV_RV8803=y
# CONFIG_RTC_DRV_S5M 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=y
# CONFIG_RTC_DRV_PCF2127 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set
#
# Platform RTC drivers
#CONFIG_RTC_DRV_CMOS=yCONFIG_RTC_DRV_DS1286=yCONFIG_RTC_DRV_DS1511=y
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1685_FAMILY is not setCONFIG_RTC_DRV_DS1742=yCONFIG_RTC_DRV_DS2404=yCONFIG_RTC_DRV_DA9063=yCONFIG_RTC_DRV_STK17TA8=yCONFIG_RTC_DRV_M48T86=yCONFIG_RTC_DRV_M48T35=yCONFIG_RTC_DRV_M48T59=yCONFIG_RTC_DRV_MSM6242=yCONFIG_RTC_DRV_BQ4802=y
# CONFIG_RTC_DRV_RP5C01 is not setCONFIG_RTC_DRV_V3020=yCONFIG_RTC_DRV_WM831X=y
# CONFIG_RTC_DRV_SC27XX is not set
# CONFIG_RTC_DRV_SPEAR is not setCONFIG_RTC_DRV_PCF50633=y
# CONFIG_RTC_DRV_ZYNQMP is not set
#
# on-CPU RTC drivers
#
# CONFIG_RTC_DRV_ASM9260 is not setCONFIG_RTC_DRV_DAVINCI=yCONFIG_RTC_DRV_DIGICOLOR=yCONFIG_RTC_DRV_MESON=yCONFIG_RTC_DRV_OMAP=y
# CONFIG_RTC_DRV_S3C is not set
# CONFIG_RTC_DRV_EP93XX is not setCONFIG_RTC_DRV_VR41XX=yCONFIG_RTC_DRV_AT91RM9200=y
# CONFIG_RTC_DRV_AT91SAM9 is not setCONFIG_RTC_DRV_GENERIC=yCONFIG_RTC_DRV_VT8500=y
# CONFIG_RTC_DRV_SUN6I is not setCONFIG_RTC_DRV_SUNXI=yCONFIG_RTC_DRV_TX4939=yCONFIG_RTC_DRV_MV=yCONFIG_RTC_DRV_ARMADA38X=y
# CONFIG_RTC_DRV_CADENCE is not set
# CONFIG_RTC_DRV_FTRTC010 is not setCONFIG_RTC_DRV_COH901331=y
# CONFIG_RTC_DRV_STMP is not setCONFIG_RTC_DRV_MC13XXX=yCONFIG_RTC_DRV_JZ4740=yCONFIG_RTC_DRV_LPC24XX=yCONFIG_RTC_DRV_LPC32XX=yCONFIG_RTC_DRV_PM8XXX=yCONFIG_RTC_DRV_TEGRA=yCONFIG_RTC_DRV_SNVS=yCONFIG_RTC_DRV_MOXART=y
# CONFIG_RTC_DRV_MT6397 is not setCONFIG_RTC_DRV_MT7622=yCONFIG_RTC_DRV_XGENE=yCONFIG_RTC_DRV_R7301=yCONFIG_RTC_DRV_STM32=yCONFIG_RTC_DRV_RTD119X=yCONFIG_RTC_DRV_ASPEED=y
#
# HID Sensor RTC drivers
#CONFIG_RTC_DRV_GOLDFISH=y
# CONFIG_DMADEVICES is not set
#
# DMABUF options
#CONFIG_SYNC_FILE=y
# CONFIG_SW_SYNC is not setCONFIG_UDMABUF=yCONFIG_DMABUF_SELFTESTS=y
# end of DMABUF options
CONFIG_AUXDISPLAY=yCONFIG_HD44780=yCONFIG_KS0108=yCONFIG_KS0108_PORT=0x378CONFIG_KS0108_DELAY=2CONFIG_CFAG12864B=yCONFIG_CFAG12864B_RATE=20CONFIG_IMG_ASCII_LCD=yCONFIG_HT16K33=yCONFIG_PARPORT_PANEL=yCONFIG_PANEL_PARPORT=0CONFIG_PANEL_PROFILE=5
# CONFIG_PANEL_CHANGE_MESSAGE is not set
# CONFIG_CHARLCD_BL_OFF is not setCONFIG_CHARLCD_BL_ON=y
# CONFIG_CHARLCD_BL_FLASH is not setCONFIG_PANEL=yCONFIG_CHARLCD=y
# CONFIG_UIO is not set
# CONFIG_VFIO is not set
# CONFIG_VIRT_DRIVERS is not setCONFIG_VIRTIO=yCONFIG_VIRTIO_MENU=yCONFIG_VIRTIO_PCI=yCONFIG_VIRTIO_PCI_LEGACY=y
# CONFIG_VIRTIO_PMEM is not set
# CONFIG_VIRTIO_BALLOON is not setCONFIG_VIRTIO_INPUT=y
# CONFIG_VIRTIO_MMIO is not set
#
# Microsoft Hyper-V guest support
#
# end of Microsoft Hyper-V guest support
CONFIG_GREYBUS=y
# CONFIG_GREYBUS_ES2 is not set
# CONFIG_STAGING is not setCONFIG_X86_PLATFORM_DEVICES=y
# CONFIG_DCDBAS is not setCONFIG_DELL_SMBIOS=yCONFIG_DELL_LAPTOP=yCONFIG_DELL_RBU=yCONFIG_SENSORS_HDAPS=y
# CONFIG_INTEL_PMC_CORE is not set
# CONFIG_IBM_RTL is not setCONFIG_SAMSUNG_LAPTOP=yCONFIG_INTEL_PUNIT_IPC=yCONFIG_MLX_PLATFORM=y
#
# Intel Speed Select Technology interface support
#
# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set
# end of Intel Speed Select Technology interface support
CONFIG_PMC_ATOM=y
# CONFIG_MFD_CROS_EC is not set
# CONFIG_CHROME_PLATFORMS is not set
# CONFIG_MELLANOX_PLATFORM is not set
# CONFIG_OLPC_XO175 is not setCONFIG_CLKDEV_LOOKUP=yCONFIG_HAVE_CLK_PREPARE=yCONFIG_COMMON_CLK=y
#
# Common Clock Framework
#
# CONFIG_COMMON_CLK_WM831X is not set
# CONFIG_COMMON_CLK_VERSATILE is not set
# CONFIG_CLK_HSDK is not set
# CONFIG_COMMON_CLK_MAX77686 is not set
# CONFIG_COMMON_CLK_MAX9485 is not set
# CONFIG_COMMON_CLK_SCMI is not set
# CONFIG_COMMON_CLK_SCPI is not set
# CONFIG_COMMON_CLK_SI5341 is not set
# CONFIG_COMMON_CLK_SI5351 is not set
# CONFIG_COMMON_CLK_SI514 is not set
# CONFIG_COMMON_CLK_SI544 is not set
# CONFIG_COMMON_CLK_SI570 is not set
# CONFIG_COMMON_CLK_CDCE706 is not set
# CONFIG_COMMON_CLK_CDCE925 is not set
# CONFIG_COMMON_CLK_CS2000_CP is not set
# CONFIG_COMMON_CLK_GEMINI is not set
# CONFIG_COMMON_CLK_ASPEED is not set
# CONFIG_COMMON_CLK_S2MPS11 is not set
# CONFIG_COMMON_CLK_AXI_CLKGEN is not set
# CONFIG_CLK_QORIQ is not set
# CONFIG_COMMON_CLK_XGENE is not set
# CONFIG_COMMON_CLK_PALMAS is not set
# CONFIG_COMMON_CLK_PWM is not set
# CONFIG_COMMON_CLK_OXNAS is not set
# CONFIG_COMMON_CLK_VC5 is not set
# CONFIG_COMMON_CLK_BD718XX is not set
# CONFIG_COMMON_CLK_FIXED_MMIO is not set
# CONFIG_CLK_ACTIONS is not set
# CONFIG_CLK_BCM2835 is not set
# CONFIG_CLK_BCM_63XX is not set
# CONFIG_CLK_BCM_63XX_GATE is not set
# CONFIG_CLK_BCM_KONA is not set
# CONFIG_CLK_BCM_CYGNUS is not set
# CONFIG_CLK_BCM_HR2 is not set
# CONFIG_CLK_BCM_NSP is not set
# CONFIG_CLK_BCM_NS2 is not set
# CONFIG_CLK_BCM_SR is not set
# CONFIG_CLK_RASPBERRYPI is not set
# CONFIG_COMMON_CLK_HI3516CV300 is not set
# CONFIG_COMMON_CLK_HI3519 is not set
# CONFIG_COMMON_CLK_HI3660 is not set
# CONFIG_COMMON_CLK_HI3670 is not set
# CONFIG_COMMON_CLK_HI3798CV200 is not set
# CONFIG_COMMON_CLK_HI6220 is not set
# CONFIG_RESET_HISI is not set
# CONFIG_COMMON_CLK_BOSTON is not set
# CONFIG_COMMON_CLK_KEYSTONE is not set
#
# Clock driver for MediaTek SoC
#
# CONFIG_COMMON_CLK_MT2701 is not set
# CONFIG_COMMON_CLK_MT2712 is not set
# CONFIG_COMMON_CLK_MT6779 is not set
# CONFIG_COMMON_CLK_MT6797 is not set
# CONFIG_COMMON_CLK_MT7622 is not set
# CONFIG_COMMON_CLK_MT7629 is not set
# CONFIG_COMMON_CLK_MT8135 is not set
# CONFIG_COMMON_CLK_MT8173 is not set
# CONFIG_COMMON_CLK_MT8183 is not set
# CONFIG_COMMON_CLK_MT8516 is not set
# end of Clock driver for MediaTek SoC
# CONFIG_COMMON_CLK_QCOM is not set
# CONFIG_CLK_RENESAS is not set
# CONFIG_COMMON_CLK_SAMSUNG is not set
# CONFIG_S3C2410_COMMON_CLK is not set
# CONFIG_S3C2412_COMMON_CLK is not set
# CONFIG_S3C2443_COMMON_CLK is not set
# CONFIG_CLK_SIFIVE is not set
# CONFIG_SPRD_COMMON_CLK is not setCONFIG_CLK_SUNXI=yCONFIG_CLK_SUNXI_CLOCKS=yCONFIG_CLK_SUNXI_PRCM_SUN6I=yCONFIG_CLK_SUNXI_PRCM_SUN8I=yCONFIG_CLK_SUNXI_PRCM_SUN9I=y
# CONFIG_SUNXI_CCU is not set
# CONFIG_COMMON_CLK_TI_ADPLL is not set
# CONFIG_CLK_UNIPHIER is not set
# end of Common Clock Framework
CONFIG_HWSPINLOCK=y
#
# Clock Source drivers
#CONFIG_TIMER_OF=yCONFIG_TIMER_PROBE=yCONFIG_CLKEVT_I8253=yCONFIG_I8253_LOCK=yCONFIG_CLKBLD_I8253=yCONFIG_CLKSRC_MMIO=yCONFIG_BCM2835_TIMER=yCONFIG_BCM_KONA_TIMER=yCONFIG_DAVINCI_TIMER=yCONFIG_DIGICOLOR_TIMER=y
# CONFIG_DW_APB_TIMER is not setCONFIG_FTTMR010_TIMER=yCONFIG_IXP4XX_TIMER=yCONFIG_MESON6_TIMER=yCONFIG_OWL_TIMER=y
# CONFIG_RDA_TIMER is not set
# CONFIG_SUN4I_TIMER is not set
# CONFIG_SUN5I_HSTIMER is not set
# CONFIG_TEGRA_TIMER is not setCONFIG_VT8500_TIMER=yCONFIG_NPCM7XX_TIMER=y
# CONFIG_CADENCE_TTC_TIMER is not setCONFIG_ASM9260_TIMER=yCONFIG_CLKSRC_DBX500_PRCMU=y
# CONFIG_CLPS711X_TIMER is not set
# CONFIG_ATLAS7_TIMER is not setCONFIG_MXS_TIMER=y
# CONFIG_PRIMA2_TIMER is not setCONFIG_NSPIRE_TIMER=yCONFIG_INTEGRATOR_AP_TIMER=y
# CONFIG_CLKSRC_PISTACHIO is not setCONFIG_ARMV7M_SYSTICK=y
# CONFIG_ATMEL_PIT is not set
# CONFIG_ATMEL_ST is not setCONFIG_CLKSRC_SAMSUNG_PWM=yCONFIG_FSL_FTM_TIMER=yCONFIG_OXNAS_RPS_TIMER=y
# CONFIG_MTK_TIMER is not set
# CONFIG_CLKSRC_JCORE_PIT is not setCONFIG_SH_TIMER_CMT=y
# CONFIG_SH_TIMER_MTU2 is not set
# CONFIG_RENESAS_OSTM is not setCONFIG_SH_TIMER_TMU=yCONFIG_EM_TIMER_STI=yCONFIG_CLKSRC_PXA=yCONFIG_H8300_TMR8=yCONFIG_H8300_TMR16=y
# CONFIG_H8300_TPU is not set
# CONFIG_TIMER_IMX_SYS_CTR is not setCONFIG_CLKSRC_ST_LPC=y
# CONFIG_ATCPIT100_TIMER is not set
# CONFIG_INGENIC_TIMER is not set
# end of Clock Source drivers
CONFIG_MAILBOX=y
# CONFIG_IMX_MBOX is not setCONFIG_PLATFORM_MHU=yCONFIG_ARMADA_37XX_RWTM_MBOX=yCONFIG_ROCKCHIP_MBOX=yCONFIG_ALTERA_MBOX=yCONFIG_MAILBOX_TEST=y
# CONFIG_QCOM_APCS_IPC is not setCONFIG_BCM_PDC_MBOX=yCONFIG_MTK_CMDQ_MBOX=yCONFIG_IOMMU_API=yCONFIG_IOMMU_SUPPORT=y
#
# Generic IOMMU Pagetable Support
#CONFIG_IOMMU_IO_PGTABLE=yCONFIG_IOMMU_IO_PGTABLE_LPAE=yCONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST=yCONFIG_IOMMU_IO_PGTABLE_ARMV7S=yCONFIG_IOMMU_IO_PGTABLE_ARMV7S_SELFTEST=y
# end of Generic IOMMU Pagetable Support
# CONFIG_IOMMU_DEBUGFS is not setCONFIG_IOMMU_DEFAULT_PASSTHROUGH=yCONFIG_OF_IOMMU=yCONFIG_QCOM_IOMMU=y
#
# Remoteproc drivers
#
# CONFIG_REMOTEPROC is not set
# end of Remoteproc drivers
#
# Rpmsg drivers
#CONFIG_RPMSG=y
# CONFIG_RPMSG_CHAR is not setCONFIG_RPMSG_QCOM_GLINK_NATIVE=yCONFIG_RPMSG_QCOM_GLINK_RPM=yCONFIG_RPMSG_QCOM_GLINK_SMEM=yCONFIG_RPMSG_QCOM_SMD=yCONFIG_RPMSG_VIRTIO=y
# end of Rpmsg drivers
# CONFIG_SOUNDWIRE is not set
#
# SOC (System On Chip) specific Drivers
#
# CONFIG_OWL_PM_DOMAINS is not set
#
# Amlogic SoC drivers
#
# CONFIG_MESON_CANVAS is not set
# CONFIG_MESON_CLK_MEASURE is not setCONFIG_MESON_GX_SOCINFO=y
# CONFIG_MESON_GX_PM_DOMAINS is not setCONFIG_MESON_EE_PM_DOMAINS=yCONFIG_MESON_MX_SOCINFO=y
# end of Amlogic SoC drivers
#
# Aspeed SoC drivers
#CONFIG_SOC_ASPEED=yCONFIG_ASPEED_LPC_CTRL=yCONFIG_ASPEED_LPC_SNOOP=y
# CONFIG_ASPEED_P2A_CTRL is not set
# end of Aspeed SoC drivers
# CONFIG_AT91_SOC_ID is not set
#
# Broadcom SoC drivers
#CONFIG_BCM2835_POWER=y
# CONFIG_SOC_BRCMSTB is not set
# end of Broadcom SoC drivers
#
# NXP/Freescale QorIQ SoC drivers
#CONFIG_FSL_MC_DPIO=yCONFIG_DPAA2_CONSOLE=y
# end of NXP/Freescale QorIQ SoC drivers
#
# i.MX SoC drivers
#
# CONFIG_IMX_GPCV2_PM_DOMAINS is not set
# end of i.MX SoC drivers
#
# IXP4xx SoC drivers
#CONFIG_IXP4XX_QMGR=y
# CONFIG_IXP4XX_NPE is not set
# end of IXP4xx SoC drivers
#
# MediaTek SoC drivers
#CONFIG_MTK_CMDQ=yCONFIG_MTK_INFRACFG=y
# CONFIG_MTK_PMIC_WRAP is not set
# CONFIG_MTK_SCPSYS is not set
# end of MediaTek SoC drivers
#
# Qualcomm SoC drivers
#
# CONFIG_QCOM_AOSS_QMP is not setCONFIG_QCOM_GENI_SE=y
# CONFIG_QCOM_GSBI is not set
# CONFIG_QCOM_LLCC is not setCONFIG_QCOM_RPMH=yCONFIG_QCOM_SMEM=y
# CONFIG_QCOM_SMD_RPM is not setCONFIG_QCOM_SMEM_STATE=y
# CONFIG_QCOM_SMP2P is not setCONFIG_QCOM_SMSM=y
# CONFIG_QCOM_SOCINFO is not setCONFIG_QCOM_WCNSS_CTRL=yCONFIG_QCOM_APR=y
# end of Qualcomm SoC drivers
# CONFIG_SOC_RENESAS is not setCONFIG_ROCKCHIP_GRF=y
# CONFIG_ROCKCHIP_PM_DOMAINS is not set
# CONFIG_SOC_SAMSUNG is not set
# CONFIG_SOC_TI is not setCONFIG_UX500_SOC_ID=y
#
# Xilinx SoC drivers
#
# CONFIG_XILINX_VCU is not set
# end of Xilinx SoC drivers
CONFIG_SOC_ZTE=y
# CONFIG_ZX2967_PM_DOMAINS is not set
# end of SOC (System On Chip) specific Drivers
CONFIG_PM_DEVFREQ=y
#
# DEVFREQ Governors
#CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=yCONFIG_DEVFREQ_GOV_PERFORMANCE=y
# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
# CONFIG_DEVFREQ_GOV_USERSPACE is not setCONFIG_DEVFREQ_GOV_PASSIVE=y
#
# DEVFREQ Drivers
#
# CONFIG_ARM_EXYNOS_BUS_DEVFREQ is not setCONFIG_ARM_TEGRA_DEVFREQ=y
# CONFIG_ARM_TEGRA20_DEVFREQ is not setCONFIG_PM_DEVFREQ_EVENT=y
# CONFIG_DEVFREQ_EVENT_EXYNOS_NOCP is not set
# CONFIG_DEVFREQ_EVENT_EXYNOS_PPMU is not setCONFIG_EXTCON=y
#
# Extcon Device Drivers
#CONFIG_EXTCON_ADC_JACK=yCONFIG_EXTCON_FSA9480=yCONFIG_EXTCON_GPIO=yCONFIG_EXTCON_MAX14577=y
# CONFIG_EXTCON_MAX3355 is not setCONFIG_EXTCON_MAX77693=yCONFIG_EXTCON_MAX8997=y
# CONFIG_EXTCON_PALMAS is not setCONFIG_EXTCON_PTN5150=y
# CONFIG_EXTCON_QCOM_SPMI_MISC is not setCONFIG_EXTCON_RT8973A=y
# CONFIG_EXTCON_SM5502 is not setCONFIG_EXTCON_USB_GPIO=y
# CONFIG_MEMORY is not setCONFIG_IIO=yCONFIG_IIO_BUFFER=yCONFIG_IIO_BUFFER_CB=y
# CONFIG_IIO_BUFFER_HW_CONSUMER is not setCONFIG_IIO_KFIFO_BUF=yCONFIG_IIO_TRIGGERED_BUFFER=yCONFIG_IIO_CONFIGFS=yCONFIG_IIO_TRIGGER=yCONFIG_IIO_CONSUMERS_PER_TRIGGER=2CONFIG_IIO_SW_DEVICE=yCONFIG_IIO_SW_TRIGGER=y
#
# Accelerometers
#CONFIG_ADXL345=yCONFIG_ADXL345_I2C=y
# CONFIG_ADXL372_I2C is not setCONFIG_BMA180=yCONFIG_BMC150_ACCEL=yCONFIG_BMC150_ACCEL_I2C=y
# CONFIG_DA280 is not setCONFIG_DA311=yCONFIG_DMARD06=y
# CONFIG_DMARD09 is not set
# CONFIG_DMARD10 is not setCONFIG_KXSD9=yCONFIG_KXSD9_I2C=y
# CONFIG_KXCJK1013 is not setCONFIG_MC3230=yCONFIG_MMA7455=yCONFIG_MMA7455_I2C=y
# CONFIG_MMA7660 is not set
# CONFIG_MMA8452 is not setCONFIG_MMA9551_CORE=yCONFIG_MMA9551=yCONFIG_MMA9553=yCONFIG_MXC4005=yCONFIG_MXC6255=yCONFIG_STK8312=y
# CONFIG_STK8BA50 is not set
# end of Accelerometers
#
# Analog to digital converters
#
# CONFIG_AD7291 is not setCONFIG_AD7606=yCONFIG_AD7606_IFACE_PARALLEL=yCONFIG_AD799X=y
# CONFIG_ASPEED_ADC is not setCONFIG_AT91_SAMA5D2_ADC=yCONFIG_AXP20X_ADC=yCONFIG_AXP288_ADC=y
# CONFIG_BCM_IPROC_ADC is not set
# CONFIG_CC10001_ADC is not setCONFIG_DA9150_GPADC=yCONFIG_DLN2_ADC=y
# CONFIG_ENVELOPE_DETECTOR is not set
# CONFIG_EXYNOS_ADC is not set
# CONFIG_HX711 is not setCONFIG_INA2XX_ADC=y
# CONFIG_INGENIC_ADC is not setCONFIG_IMX7D_ADC=y
# CONFIG_LPC18XX_ADC is not set
# CONFIG_LPC32XX_ADC is not set
# CONFIG_LTC2471 is not set
# CONFIG_LTC2485 is not set
# CONFIG_LTC2497 is not setCONFIG_MAX1363=yCONFIG_MAX9611=y
# CONFIG_MCP3422 is not set
# CONFIG_MEDIATEK_MT6577_AUXADC is not setCONFIG_MEN_Z188_ADC=y
# CONFIG_MESON_SARADC is not setCONFIG_NAU7802=yCONFIG_NPCM_ADC=yCONFIG_PALMAS_GPADC=y
# CONFIG_QCOM_PM8XXX_XOADC is not set
# CONFIG_RCAR_GYRO_ADC is not setCONFIG_SC27XX_ADC=yCONFIG_SPEAR_ADC=y
# CONFIG_SD_ADC_MODULATOR is not setCONFIG_STM32_ADC_CORE=yCONFIG_STM32_ADC=yCONFIG_STM32_DFSDM_CORE=y
# CONFIG_STM32_DFSDM_ADC is not set
# CONFIG_STMPE_ADC is not setCONFIG_TI_ADC081C=y
# CONFIG_TI_ADS1015 is not setCONFIG_VF610_ADC=y
# CONFIG_XILINX_XADC is not set
# end of Analog to digital converters
#
# Analog Front Ends
#CONFIG_IIO_RESCALE=y
# end of Analog Front Ends
#
# Amplifiers
#
# end of Amplifiers
#
# Chemical Sensors
#CONFIG_ATLAS_PH_SENSOR=yCONFIG_BME680=yCONFIG_BME680_I2C=yCONFIG_CCS811=y
# CONFIG_IAQCORE is not setCONFIG_SENSIRION_SGP30=yCONFIG_SPS30=yCONFIG_VZ89X=y
# end of Chemical Sensors
#
# Hid Sensor IIO Common
#
# end of Hid Sensor IIO Common
CONFIG_IIO_MS_SENSORS_I2C=y
#
# SSP Sensor Common
#
# end of SSP Sensor Common
CONFIG_IIO_ST_SENSORS_I2C=yCONFIG_IIO_ST_SENSORS_CORE=y
#
# Digital to analog converters
#CONFIG_AD5064=yCONFIG_AD5380=yCONFIG_AD5446=y
# CONFIG_AD5593R is not set
# CONFIG_AD5696_I2C is not setCONFIG_DPOT_DAC=yCONFIG_DS4424=y
# CONFIG_LPC18XX_DAC is not setCONFIG_M62332=yCONFIG_MAX517=y
# CONFIG_MAX5821 is not set
# CONFIG_MCP4725 is not set
# CONFIG_STM32_DAC is not setCONFIG_TI_DAC5571=y
# CONFIG_VF610_DAC is not set
# end of Digital to analog converters
#
# IIO dummy driver
#CONFIG_IIO_DUMMY_EVGEN=yCONFIG_IIO_SIMPLE_DUMMY=yCONFIG_IIO_SIMPLE_DUMMY_EVENTS=yCONFIG_IIO_SIMPLE_DUMMY_BUFFER=y
# end of IIO dummy driver
#
# Frequency Synthesizers DDS/PLL
#
#
# Clock Generator/Distribution
#
# end of Clock Generator/Distribution
#
# Phase-Locked Loop (PLL) frequency synthesizers
#
# end of Phase-Locked Loop (PLL) frequency synthesizers # end of Frequency Synthesizers DDS/PLL
#
# Digital gyroscope sensors
#
# CONFIG_BMG160 is not setCONFIG_FXAS21002C=yCONFIG_FXAS21002C_I2C=y
# CONFIG_MPU3050_I2C is not setCONFIG_IIO_ST_GYRO_3AXIS=yCONFIG_IIO_ST_GYRO_I2C_3AXIS=y
# CONFIG_ITG3200 is not set
# end of Digital gyroscope sensors
#
# Health Sensors
#
#
# Heart Rate Monitors
#
# CONFIG_AFE4404 is not setCONFIG_MAX30100=yCONFIG_MAX30102=y
# end of Heart Rate Monitors # end of Health Sensors
#
# Humidity sensors
#CONFIG_AM2315=y
# CONFIG_DHT11 is not setCONFIG_HDC100X=yCONFIG_HTS221=yCONFIG_HTS221_I2C=yCONFIG_HTU21=yCONFIG_SI7005=y
# CONFIG_SI7020 is not set
# end of Humidity sensors
#
# Inertial measurement units
#CONFIG_BMI160=yCONFIG_BMI160_I2C=y
# CONFIG_KMX61 is not setCONFIG_INV_MPU6050_IIO=yCONFIG_INV_MPU6050_I2C=yCONFIG_IIO_ST_LSM6DSX=yCONFIG_IIO_ST_LSM6DSX_I2C=yCONFIG_IIO_ST_LSM6DSX_I3C=y
# end of Inertial measurement units
#
# Light sensors
#
# CONFIG_ADJD_S311 is not setCONFIG_AL3320A=yCONFIG_APDS9300=yCONFIG_APDS9960=yCONFIG_BH1750=yCONFIG_BH1780=y
# CONFIG_CM32181 is not set
# CONFIG_CM3232 is not setCONFIG_CM3323=yCONFIG_CM3605=y
# CONFIG_CM36651 is not setCONFIG_GP2AP020A00F=yCONFIG_SENSORS_ISL29018=yCONFIG_SENSORS_ISL29028=yCONFIG_ISL29125=yCONFIG_JSA1212=yCONFIG_RPR0521=yCONFIG_SENSORS_LM3533=yCONFIG_LTR501=y
# CONFIG_LV0104CS is not setCONFIG_MAX44000=yCONFIG_MAX44009=y
# CONFIG_NOA1305 is not set
# CONFIG_OPT3001 is not set
# CONFIG_PA12203001 is not set
# CONFIG_SI1133 is not setCONFIG_SI1145=y
# CONFIG_STK3310 is not set
# CONFIG_ST_UVIS25 is not setCONFIG_TCS3414=yCONFIG_TCS3472=y
# CONFIG_SENSORS_TSL2563 is not set
# CONFIG_TSL2583 is not setCONFIG_TSL2772=yCONFIG_TSL4531=yCONFIG_US5182D=yCONFIG_VCNL4000=y
# CONFIG_VCNL4035 is not setCONFIG_VEML6070=yCONFIG_VL6180=yCONFIG_ZOPT2201=y
# end of Light sensors
#
# Magnetometer sensors
#CONFIG_AK8974=yCONFIG_AK8975=y
# CONFIG_AK09911 is not setCONFIG_BMC150_MAGN=yCONFIG_BMC150_MAGN_I2C=yCONFIG_MAG3110=yCONFIG_MMC35240=y
# CONFIG_IIO_ST_MAGN_3AXIS is not set
# CONFIG_SENSORS_HMC5843_I2C is not setCONFIG_SENSORS_RM3100=yCONFIG_SENSORS_RM3100_I2C=y
# end of Magnetometer sensors
#
# Multiplexers
#
# CONFIG_IIO_MUX is not set
# end of Multiplexers
#
# Inclinometer sensors
#
# end of Inclinometer sensors
#
# Triggers - standalone
#
# CONFIG_IIO_HRTIMER_TRIGGER is not setCONFIG_IIO_INTERRUPT_TRIGGER=yCONFIG_IIO_STM32_LPTIMER_TRIGGER=yCONFIG_IIO_STM32_TIMER_TRIGGER=yCONFIG_IIO_TIGHTLOOP_TRIGGER=yCONFIG_IIO_SYSFS_TRIGGER=y
# end of Triggers - standalone
#
# Digital potentiometers
#CONFIG_AD5272=yCONFIG_DS1803=y
# CONFIG_MAX5432 is not setCONFIG_MCP4018=yCONFIG_MCP4531=yCONFIG_TPL0102=y
# end of Digital potentiometers
#
# Digital potentiostats
#CONFIG_LMP91000=y
# end of Digital potentiostats
#
# Pressure sensors
#CONFIG_ABP060MG=yCONFIG_BMP280=yCONFIG_BMP280_I2C=y
# CONFIG_DPS310 is not set
# CONFIG_HP03 is not set
# CONFIG_MPL115_I2C is not setCONFIG_MPL3115=y
# CONFIG_MS5611 is not set
# CONFIG_MS5637 is not setCONFIG_IIO_ST_PRESS=yCONFIG_IIO_ST_PRESS_I2C=yCONFIG_T5403=yCONFIG_HP206C=yCONFIG_ZPA2326=yCONFIG_ZPA2326_I2C=y
# end of Pressure sensors
#
# Lightning sensors
#
# end of Lightning sensors
#
# Proximity and distance sensors
#CONFIG_ISL29501=yCONFIG_LIDAR_LITE_V2=yCONFIG_MB1232=yCONFIG_RFD77402=yCONFIG_SRF04=y
# CONFIG_SX9500 is not setCONFIG_SRF08=yCONFIG_VL53L0X_I2C=y
# end of Proximity and distance sensors
#
# Resolver to digital converters
#
# end of Resolver to digital converters
#
# Temperature sensors
#CONFIG_MLX90614=yCONFIG_MLX90632=yCONFIG_TMP006=yCONFIG_TMP007=yCONFIG_TSYS01=y
# CONFIG_TSYS02D is not set
# end of Temperature sensors
# CONFIG_NTB is not set
# CONFIG_VME_BUS is not setCONFIG_PWM=yCONFIG_PWM_SYSFS=y
# CONFIG_PWM_ATMEL_HLCDC_PWM is not set
# CONFIG_PWM_BCM_IPROC is not set
# CONFIG_PWM_BCM_KONA is not set
# CONFIG_PWM_CLPS711X is not set
# CONFIG_PWM_FSL_FTM is not setCONFIG_PWM_HIBVT=y
# CONFIG_PWM_IMG is not set
# CONFIG_PWM_IMX_TPM is not setCONFIG_PWM_LP3943=y
# CONFIG_PWM_LPSS_PCI is not setCONFIG_PWM_MTK_DISP=y
# CONFIG_PWM_MEDIATEK is not setCONFIG_PWM_PCA9685=yCONFIG_PWM_RCAR=yCONFIG_PWM_RENESAS_TPU=y
# CONFIG_PWM_SIFIVE is not setCONFIG_PWM_SPRD=y
# CONFIG_PWM_STM32 is not setCONFIG_PWM_STM32_LP=y
# CONFIG_PWM_STMPE is not set
# CONFIG_PWM_SUN4I is not set
#
# IRQ chip support
#CONFIG_IRQCHIP=y
# CONFIG_AL_FIC is not set
# CONFIG_JCORE_AIC is not set
# CONFIG_RENESAS_INTC_IRQPIN is not setCONFIG_RENESAS_IRQC=y
# CONFIG_RENESAS_RZA1_IRQC is not setCONFIG_TS4800_IRQ=y
# CONFIG_INGENIC_TCU_IRQ is not set
# CONFIG_RENESAS_H8S_INTC is not set
# CONFIG_IRQ_UNIPHIER_AIDET is not set
# CONFIG_IMX_IRQSTEER is not set
# end of IRQ chip support
CONFIG_IPACK_BUS=y
# CONFIG_BOARD_TPCI200 is not set
# CONFIG_SERIAL_IPOCTAL is not setCONFIG_RESET_CONTROLLER=yCONFIG_RESET_ATH79=y
# CONFIG_RESET_AXS10X is not set
# CONFIG_RESET_BERLIN is not setCONFIG_RESET_BRCMSTB=yCONFIG_RESET_HSDK=yCONFIG_RESET_IMX7=yCONFIG_RESET_LANTIQ=y
# CONFIG_RESET_LPC18XX is not set
# CONFIG_RESET_MESON is not setCONFIG_RESET_MESON_AUDIO_ARB=y
# CONFIG_RESET_PISTACHIO is not set
# CONFIG_RESET_QCOM_AOSS is not set
# CONFIG_RESET_QCOM_PDC is not setCONFIG_RESET_SCMI=yCONFIG_RESET_SIMPLE=yCONFIG_RESET_STM32MP157=y
# CONFIG_RESET_SOCFPGA is not set
# CONFIG_RESET_SUNXI is not set
# CONFIG_RESET_TI_SYSCON is not setCONFIG_RESET_UNIPHIER=yCONFIG_RESET_UNIPHIER_GLUE=y
# CONFIG_RESET_ZYNQ is not setCONFIG_COMMON_RESET_HI3660=yCONFIG_COMMON_RESET_HI6220=y
#
# PHY Subsystem
#CONFIG_GENERIC_PHY=yCONFIG_GENERIC_PHY_MIPI_DPHY=y
# CONFIG_PHY_LPC18XX_USB_OTG is not setCONFIG_PHY_XGENE=y
# CONFIG_PHY_SUN4I_USB is not setCONFIG_PHY_SUN6I_MIPI_DPHY=yCONFIG_PHY_SUN9I_USB=yCONFIG_PHY_MESON8B_USB2=y
# CONFIG_PHY_MESON_GXL_USB2 is not set
# CONFIG_PHY_MESON_GXL_USB3 is not setCONFIG_PHY_MESON_G12A_USB2=yCONFIG_PHY_MESON_G12A_USB3_PCIE=y
# CONFIG_PHY_CYGNUS_PCIE is not set
# CONFIG_PHY_BCM_SR_USB is not setCONFIG_BCM_KONA_USB2_PHY=yCONFIG_PHY_BCM_NS_USB2=yCONFIG_PHY_NS2_USB_DRD=y
# CONFIG_PHY_BRCM_SATA is not setCONFIG_PHY_BCM_SR_PCIE=yCONFIG_PHY_CADENCE_DP=y
# CONFIG_PHY_CADENCE_DPHY is not set
# CONFIG_PHY_CADENCE_SIERRA is not setCONFIG_PHY_FSL_IMX8MQ_USB=y
# CONFIG_PHY_MIXEL_MIPI_DPHY is not setCONFIG_PHY_HI6220_USB=yCONFIG_PHY_HI3660_USB=yCONFIG_PHY_HISTB_COMBPHY=y
# CONFIG_PHY_HISI_INNO_USB2 is not setCONFIG_PHY_LANTIQ_VRX200_PCIE=y
# CONFIG_PHY_LANTIQ_RCU_USB2 is not setCONFIG_ARMADA375_USBCLUSTER_PHY=yCONFIG_PHY_MVEBU_A3700_UTMI=y
# CONFIG_PHY_MVEBU_A38X_COMPHY is not set
# CONFIG_PHY_PXA_28NM_HSIC is not setCONFIG_PHY_PXA_28NM_USB2=yCONFIG_PHY_CPCAP_USB=y
# CONFIG_PHY_MAPPHONE_MDM6600 is not setCONFIG_PHY_OCELOT_SERDES=y
# CONFIG_PHY_ATH79_USB is not set
# CONFIG_PHY_QCOM_PCIE2 is not set
# CONFIG_PHY_QCOM_QMP is not setCONFIG_PHY_QCOM_QUSB2=yCONFIG_PHY_RALINK_USB=y
# CONFIG_PHY_RCAR_GEN3_USB3 is not set
# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set
# CONFIG_PHY_ROCKCHIP_INNO_USB2 is not setCONFIG_PHY_ROCKCHIP_PCIE=yCONFIG_PHY_ROCKCHIP_TYPEC=yCONFIG_PHY_EXYNOS_DP_VIDEO=yCONFIG_PHY_EXYNOS_MIPI_VIDEO=y
# CONFIG_PHY_EXYNOS_PCIE is not set
# CONFIG_PHY_SAMSUNG_USB2 is not set
# CONFIG_PHY_UNIPHIER_USB2 is not set
# CONFIG_PHY_UNIPHIER_USB3 is not set
# CONFIG_PHY_UNIPHIER_PCIE is not setCONFIG_PHY_ST_SPEAR1310_MIPHY=yCONFIG_PHY_ST_SPEAR1340_MIPHY=yCONFIG_PHY_STIH407_USB=yCONFIG_PHY_STM32_USBPHYC=yCONFIG_PHY_TEGRA194_P2U=y
# CONFIG_PHY_AM654_SERDES is not setCONFIG_OMAP_CONTROL_PHY=yCONFIG_TI_PIPE3=yCONFIG_PHY_TI_GMII_SEL=y
# end of PHY Subsystem
CONFIG_POWERCAP=yCONFIG_MCB=y
# CONFIG_MCB_PCI is not set
# CONFIG_MCB_LPC is not set
#
# Performance monitor support
#
# end of Performance monitor support
CONFIG_RAS=y
# CONFIG_THUNDERBOLT is not set
#
# Android
#
# CONFIG_ANDROID is not set
# end of Android
CONFIG_LIBNVDIMM=yCONFIG_BLK_DEV_PMEM=yCONFIG_ND_BLK=yCONFIG_ND_CLAIM=yCONFIG_ND_BTT=yCONFIG_BTT=yCONFIG_OF_PMEM=yCONFIG_DAX_DRIVER=yCONFIG_DAX=y
# CONFIG_DEV_DAX is not setCONFIG_NVMEM=yCONFIG_NVMEM_SYSFS=yCONFIG_NVMEM_IMX_IIM=yCONFIG_NVMEM_IMX_OCOTP=yCONFIG_NVMEM_LPC18XX_EEPROM=yCONFIG_NVMEM_LPC18XX_OTP=yCONFIG_NVMEM_MXS_OCOTP=y
# CONFIG_MTK_EFUSE is not setCONFIG_QCOM_QFPROM=yCONFIG_ROCKCHIP_EFUSE=yCONFIG_NVMEM_BCM_OCOTP=y
# CONFIG_NVMEM_STM32_ROMEM is not setCONFIG_UNIPHIER_EFUSE=yCONFIG_NVMEM_VF610_OCOTP=yCONFIG_MESON_MX_EFUSE=yCONFIG_NVMEM_SNVS_LPGPR=yCONFIG_SC27XX_EFUSE=y
#
# HW tracing support
#
# CONFIG_STM is not setCONFIG_INTEL_TH=y
# CONFIG_INTEL_TH_PCI is not set
# CONFIG_INTEL_TH_GTH is not setCONFIG_INTEL_TH_MSU=y
# CONFIG_INTEL_TH_PTI is not setCONFIG_INTEL_TH_DEBUG=y
# end of HW tracing support
# CONFIG_FPGA is not setCONFIG_FSI=yCONFIG_FSI_NEW_DEV_NODE=y
# CONFIG_FSI_MASTER_GPIO is not setCONFIG_FSI_MASTER_HUB=yCONFIG_FSI_MASTER_AST_CF=yCONFIG_FSI_SCOM=yCONFIG_FSI_SBEFIFO=yCONFIG_FSI_OCC=y
# CONFIG_TEE is not setCONFIG_MULTIPLEXER=y
#
# Multiplexer drivers
#CONFIG_MUX_ADG792A=y
# CONFIG_MUX_GPIO is not set
# CONFIG_MUX_MMIO is not set
# end of Multiplexer drivers
CONFIG_PM_OPP=yCONFIG_SIOX=y
# CONFIG_SIOX_BUS_GPIO is not set
# CONFIG_SLIMBUS is not set
# CONFIG_INTERCONNECT is not setCONFIG_COUNTER=y
# CONFIG_STM32_TIMER_CNT is not setCONFIG_STM32_LPTIMER_CNT=yCONFIG_FTM_QUADDEC=y
# end of Device Drivers
#
# File systems
#CONFIG_DCACHE_WORD_ACCESS=yCONFIG_VALIDATE_FS_PARSER=yCONFIG_FS_IOMAP=y
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not setCONFIG_EXT4_FS=y
# CONFIG_EXT4_USE_FOR_EXT2 is not set
# CONFIG_EXT4_FS_POSIX_ACL is not set
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_DEBUG is not setCONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not setCONFIG_FS_MBCACHE=yCONFIG_REISERFS_FS=yCONFIG_REISERFS_CHECK=yCONFIG_REISERFS_PROC_INFO=yCONFIG_REISERFS_FS_XATTR=yCONFIG_REISERFS_FS_POSIX_ACL=y
# CONFIG_REISERFS_FS_SECURITY is not setCONFIG_JFS_FS=yCONFIG_JFS_POSIX_ACL=y
# CONFIG_JFS_SECURITY is not setCONFIG_JFS_DEBUG=y
# CONFIG_JFS_STATISTICS is not setCONFIG_XFS_FS=yCONFIG_XFS_QUOTA=y
# CONFIG_XFS_POSIX_ACL is not set
# CONFIG_XFS_RT is not setCONFIG_XFS_ONLINE_SCRUB=y
# CONFIG_XFS_ONLINE_REPAIR is not set
# CONFIG_XFS_WARN is not set
# CONFIG_XFS_DEBUG is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not setCONFIG_BTRFS_FS=yCONFIG_BTRFS_FS_POSIX_ACL=y
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not setCONFIG_BTRFS_FS_RUN_SANITY_TESTS=y
# CONFIG_BTRFS_DEBUG is not setCONFIG_BTRFS_ASSERT=yCONFIG_BTRFS_FS_REF_VERIFY=yCONFIG_NILFS2_FS=y
# CONFIG_F2FS_FS is not setCONFIG_FS_DAX=yCONFIG_FS_POSIX_ACL=yCONFIG_EXPORTFS=y
# CONFIG_EXPORTFS_BLOCK_OPS is not setCONFIG_FILE_LOCKING=yCONFIG_MANDATORY_FILE_LOCKING=y
# CONFIG_FS_ENCRYPTION is not set
# CONFIG_FS_VERITY is not setCONFIG_FSNOTIFY=y
# CONFIG_DNOTIFY is not setCONFIG_INOTIFY_USER=yCONFIG_FANOTIFY=y
# CONFIG_QUOTA is not set
# CONFIG_QUOTA_NETLINK_INTERFACE is not setCONFIG_QUOTACTL=yCONFIG_QUOTACTL_COMPAT=yCONFIG_AUTOFS4_FS=yCONFIG_AUTOFS_FS=yCONFIG_FUSE_FS=y
# CONFIG_CUSE is not setCONFIG_VIRTIO_FS=yCONFIG_OVERLAY_FS=yCONFIG_OVERLAY_FS_REDIRECT_DIR=yCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
# CONFIG_OVERLAY_FS_INDEX is not setCONFIG_OVERLAY_FS_XINO_AUTO=yCONFIG_OVERLAY_FS_METACOPY=y
#
# Caches
#CONFIG_FSCACHE=y
# CONFIG_FSCACHE_STATS is not setCONFIG_FSCACHE_HISTOGRAM=y
# CONFIG_FSCACHE_DEBUG is not set
# CONFIG_FSCACHE_OBJECT_LIST is not set
# CONFIG_CACHEFILES is not set
# end of Caches
#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set
# end of CD-ROM/DVD Filesystems
#
# DOS/FAT/NT Filesystems
#CONFIG_FAT_FS=yCONFIG_MSDOS_FS=y
# CONFIG_VFAT_FS is not setCONFIG_FAT_DEFAULT_CODEPAGE=437CONFIG_NTFS_FS=y
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
# end of DOS/FAT/NT Filesystems
#
# Pseudo filesystems
#CONFIG_PROC_FS=yCONFIG_PROC_KCORE=yCONFIG_PROC_VMCORE=yCONFIG_PROC_VMCORE_DEVICE_DUMP=yCONFIG_PROC_SYSCTL=yCONFIG_PROC_PAGE_MONITOR=y
# CONFIG_PROC_CHILDREN is not setCONFIG_PROC_PID_ARCH_STATUS=yCONFIG_KERNFS=yCONFIG_SYSFS=yCONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_TMPFS_XATTR is not setCONFIG_HUGETLBFS=yCONFIG_HUGETLB_PAGE=yCONFIG_MEMFD_CREATE=yCONFIG_ARCH_HAS_GIGANTIC_PAGE=yCONFIG_CONFIGFS_FS=y
# end of Pseudo filesystems
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ORANGEFS_FS is not setCONFIG_ADFS_FS=y
# CONFIG_ADFS_FS_RW is not setCONFIG_AFFS_FS=yCONFIG_HFS_FS=yCONFIG_HFSPLUS_FS=yCONFIG_BEFS_FS=yCONFIG_BEFS_DEBUG=y
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not setCONFIG_JFFS2_FS=yCONFIG_JFFS2_FS_DEBUG=0CONFIG_JFFS2_FS_WRITEBUFFER=yCONFIG_JFFS2_FS_WBUF_VERIFY=yCONFIG_JFFS2_SUMMARY=yCONFIG_JFFS2_FS_XATTR=y
# CONFIG_JFFS2_FS_POSIX_ACL is not set
# CONFIG_JFFS2_FS_SECURITY is not setCONFIG_JFFS2_COMPRESSION_OPTIONS=yCONFIG_JFFS2_ZLIB=yCONFIG_JFFS2_LZO=yCONFIG_JFFS2_RTIME=yCONFIG_JFFS2_RUBIN=yCONFIG_JFFS2_CMODE_NONE=y
# CONFIG_JFFS2_CMODE_PRIORITY is not set
# CONFIG_JFFS2_CMODE_SIZE is not set
# CONFIG_JFFS2_CMODE_FAVOURLZO is not setCONFIG_CRAMFS=yCONFIG_CRAMFS_BLOCKDEV=yCONFIG_CRAMFS_MTD=yCONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_FILE_CACHE is not setCONFIG_SQUASHFS_FILE_DIRECT=y
# CONFIG_SQUASHFS_DECOMP_SINGLE is not set
# CONFIG_SQUASHFS_DECOMP_MULTI is not setCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
# CONFIG_SQUASHFS_XATTR is not set
# CONFIG_SQUASHFS_ZLIB is not setCONFIG_SQUASHFS_LZ4=yCONFIG_SQUASHFS_LZO=y
# CONFIG_SQUASHFS_XZ is not set
# CONFIG_SQUASHFS_ZSTD is not set
# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not setCONFIG_SQUASHFS_EMBEDDED=yCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3CONFIG_VXFS_FS=y
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not setCONFIG_HPFS_FS=yCONFIG_QNX4FS_FS=yCONFIG_QNX6FS_FS=y
# CONFIG_QNX6FS_DEBUG is not setCONFIG_ROMFS_FS=y
# CONFIG_ROMFS_BACKED_BY_BLOCK is not setCONFIG_ROMFS_BACKED_BY_MTD=y
# CONFIG_ROMFS_BACKED_BY_BOTH is not setCONFIG_ROMFS_ON_MTD=yCONFIG_PSTORE=yCONFIG_PSTORE_DEFLATE_COMPRESS=yCONFIG_PSTORE_LZO_COMPRESS=yCONFIG_PSTORE_LZ4_COMPRESS=y
# CONFIG_PSTORE_LZ4HC_COMPRESS is not set
# CONFIG_PSTORE_842_COMPRESS is not setCONFIG_PSTORE_ZSTD_COMPRESS=yCONFIG_PSTORE_COMPRESS=yCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
# CONFIG_PSTORE_LZO_COMPRESS_DEFAULT is not set
# CONFIG_PSTORE_LZ4_COMPRESS_DEFAULT is not set
# CONFIG_PSTORE_ZSTD_COMPRESS_DEFAULT is not setCONFIG_PSTORE_COMPRESS_DEFAULT="deflate"
# CONFIG_PSTORE_CONSOLE is not setCONFIG_PSTORE_PMSG=y
# CONFIG_PSTORE_FTRACE is not setCONFIG_PSTORE_RAM=yCONFIG_SYSV_FS=y
# CONFIG_UFS_FS is not set
# CONFIG_EROFS_FS is not setCONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_CEPH_FS is not set
# CONFIG_CIFS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not setCONFIG_9P_FS=y
# CONFIG_9P_FSCACHE is not set
# CONFIG_9P_FS_POSIX_ACL is not set
# CONFIG_9P_FS_SECURITY is not setCONFIG_NLS=yCONFIG_NLS_DEFAULT="iso8859-1"CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not setCONFIG_NLS_CODEPAGE_850=yCONFIG_NLS_CODEPAGE_852=yCONFIG_NLS_CODEPAGE_855=yCONFIG_NLS_CODEPAGE_857=y
# CONFIG_NLS_CODEPAGE_860 is not setCONFIG_NLS_CODEPAGE_861=yCONFIG_NLS_CODEPAGE_862=yCONFIG_NLS_CODEPAGE_863=yCONFIG_NLS_CODEPAGE_864=yCONFIG_NLS_CODEPAGE_865=yCONFIG_NLS_CODEPAGE_866=y
# CONFIG_NLS_CODEPAGE_869 is not setCONFIG_NLS_CODEPAGE_936=yCONFIG_NLS_CODEPAGE_950=y
# CONFIG_NLS_CODEPAGE_932 is not setCONFIG_NLS_CODEPAGE_949=yCONFIG_NLS_CODEPAGE_874=y
# CONFIG_NLS_ISO8859_8 is not setCONFIG_NLS_CODEPAGE_1250=y
# CONFIG_NLS_CODEPAGE_1251 is not setCONFIG_NLS_ASCII=yCONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not setCONFIG_NLS_ISO8859_3=yCONFIG_NLS_ISO8859_4=yCONFIG_NLS_ISO8859_5=yCONFIG_NLS_ISO8859_6=yCONFIG_NLS_ISO8859_7=y
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not setCONFIG_NLS_ISO8859_14=yCONFIG_NLS_ISO8859_15=yCONFIG_NLS_KOI8_R=yCONFIG_NLS_KOI8_U=y
# CONFIG_NLS_MAC_ROMAN is not set
# CONFIG_NLS_MAC_CELTIC is not set
# CONFIG_NLS_MAC_CENTEURO is not setCONFIG_NLS_MAC_CROATIAN=yCONFIG_NLS_MAC_CYRILLIC=y
# CONFIG_NLS_MAC_GAELIC is not setCONFIG_NLS_MAC_GREEK=yCONFIG_NLS_MAC_ICELAND=y
# CONFIG_NLS_MAC_INUIT is not setCONFIG_NLS_MAC_ROMANIAN=y
# CONFIG_NLS_MAC_TURKISH is not setCONFIG_NLS_UTF8=y
# CONFIG_DLM is not set
# CONFIG_UNICODE is not set
# end of File systems
#
# Security options
#
# CONFIG_KEYS is not set CONFIG_SECURITY_DMESG_RESTRICT=y
# CONFIG_SECURITY is not setCONFIG_SECURITYFS=y
# CONFIG_PAGE_TABLE_ISOLATION is not set CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y
# CONFIG_HARDENED_USERCOPY is not set
# CONFIG_FORTIFY_SOURCE is not set CONFIG_STATIC_USERMODEHELPER=y CONFIG_STATIC_USERMODEHELPER_PATH="/sbin/usermode-helper" CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity"
#
# Kernel hardening options
#
#
# Memory initialization
#CONFIG_INIT_STACK_NONE=yCONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
# end of Memory initialization # end of Kernel hardening options # end of Security options
CONFIG_XOR_BLOCKS=yCONFIG_ASYNC_CORE=yCONFIG_ASYNC_XOR=yCONFIG_CRYPTO=y
#
# Crypto core or helper
#CONFIG_CRYPTO_FIPS=yCONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_AEAD=yCONFIG_CRYPTO_AEAD2=yCONFIG_CRYPTO_BLKCIPHER=yCONFIG_CRYPTO_BLKCIPHER2=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_KPP=yCONFIG_CRYPTO_ACOMP2=yCONFIG_CRYPTO_MANAGER=yCONFIG_CRYPTO_MANAGER2=y
# CONFIG_CRYPTO_USER is not set
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not setCONFIG_CRYPTO_GF128MUL=yCONFIG_CRYPTO_NULL=yCONFIG_CRYPTO_NULL2=yCONFIG_CRYPTO_CRYPTD=yCONFIG_CRYPTO_AUTHENC=yCONFIG_CRYPTO_SIMD=yCONFIG_CRYPTO_GLUE_HELPER_X86=yCONFIG_CRYPTO_ENGINE=y
#
# Public-key cryptography
#CONFIG_CRYPTO_RSA=y
# CONFIG_CRYPTO_DH is not setCONFIG_CRYPTO_ECC=yCONFIG_CRYPTO_ECDH=yCONFIG_CRYPTO_ECRDSA=y
#
# Authenticated Encryption with Associated Data
#CONFIG_CRYPTO_CCM=yCONFIG_CRYPTO_GCM=yCONFIG_CRYPTO_CHACHA20POLY1305=yCONFIG_CRYPTO_AEGIS128=yCONFIG_CRYPTO_AEGIS128_AESNI_SSE2=yCONFIG_CRYPTO_SEQIV=yCONFIG_CRYPTO_ECHAINIV=y
#
# Block modes
#CONFIG_CRYPTO_CBC=y
# CONFIG_CRYPTO_CFB is not setCONFIG_CRYPTO_CTR=yCONFIG_CRYPTO_CTS=yCONFIG_CRYPTO_ECB=yCONFIG_CRYPTO_LRW=yCONFIG_CRYPTO_OFB=yCONFIG_CRYPTO_PCBC=yCONFIG_CRYPTO_XTS=yCONFIG_CRYPTO_KEYWRAP=yCONFIG_CRYPTO_NHPOLY1305=y
# CONFIG_CRYPTO_NHPOLY1305_SSE2 is not setCONFIG_CRYPTO_NHPOLY1305_AVX2=yCONFIG_CRYPTO_ADIANTUM=yCONFIG_CRYPTO_ESSIV=y
#
# Hash modes
#CONFIG_CRYPTO_CMAC=yCONFIG_CRYPTO_HMAC=yCONFIG_CRYPTO_XCBC=y
# CONFIG_CRYPTO_VMAC is not set
#
# Digest
#CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_CRC32C_INTEL is not setCONFIG_CRYPTO_CRC32=yCONFIG_CRYPTO_CRC32_PCLMUL=yCONFIG_CRYPTO_XXHASH=yCONFIG_CRYPTO_CRCT10DIF=y
# CONFIG_CRYPTO_CRCT10DIF_PCLMUL is not setCONFIG_CRYPTO_GHASH=yCONFIG_CRYPTO_POLY1305=yCONFIG_CRYPTO_POLY1305_X86_64=yCONFIG_CRYPTO_MD4=yCONFIG_CRYPTO_MD5=yCONFIG_CRYPTO_MICHAEL_MIC=yCONFIG_CRYPTO_RMD128=y
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not setCONFIG_CRYPTO_RMD320=yCONFIG_CRYPTO_SHA1=yCONFIG_CRYPTO_SHA1_SSSE3=yCONFIG_CRYPTO_SHA256_SSSE3=yCONFIG_CRYPTO_SHA512_SSSE3=yCONFIG_CRYPTO_LIB_SHA256=yCONFIG_CRYPTO_SHA256=yCONFIG_CRYPTO_SHA512=y
# CONFIG_CRYPTO_SHA3 is not setCONFIG_CRYPTO_SM3=yCONFIG_CRYPTO_STREEBOG=yCONFIG_CRYPTO_TGR192=y
# CONFIG_CRYPTO_WP512 is not setCONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=y
#
# Ciphers
#CONFIG_CRYPTO_LIB_AES=yCONFIG_CRYPTO_AES=yCONFIG_CRYPTO_AES_TI=yCONFIG_CRYPTO_AES_NI_INTEL=y
# CONFIG_CRYPTO_ANUBIS is not setCONFIG_CRYPTO_LIB_ARC4=yCONFIG_CRYPTO_ARC4=yCONFIG_CRYPTO_BLOWFISH=yCONFIG_CRYPTO_BLOWFISH_COMMON=yCONFIG_CRYPTO_BLOWFISH_X86_64=yCONFIG_CRYPTO_CAMELLIA=yCONFIG_CRYPTO_CAMELLIA_X86_64=yCONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=yCONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=yCONFIG_CRYPTO_CAST_COMMON=yCONFIG_CRYPTO_CAST5=yCONFIG_CRYPTO_CAST5_AVX_X86_64=yCONFIG_CRYPTO_CAST6=y
# CONFIG_CRYPTO_CAST6_AVX_X86_64 is not setCONFIG_CRYPTO_LIB_DES=yCONFIG_CRYPTO_DES=yCONFIG_CRYPTO_DES3_EDE_X86_64=yCONFIG_CRYPTO_FCRYPT=yCONFIG_CRYPTO_KHAZAD=yCONFIG_CRYPTO_SALSA20=yCONFIG_CRYPTO_CHACHA20=yCONFIG_CRYPTO_CHACHA20_X86_64=yCONFIG_CRYPTO_SEED=yCONFIG_CRYPTO_SERPENT=yCONFIG_CRYPTO_SERPENT_SSE2_X86_64=yCONFIG_CRYPTO_SERPENT_AVX_X86_64=y
# CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not setCONFIG_CRYPTO_SM4=y
# CONFIG_CRYPTO_TEA is not setCONFIG_CRYPTO_TWOFISH=yCONFIG_CRYPTO_TWOFISH_COMMON=yCONFIG_CRYPTO_TWOFISH_X86_64=yCONFIG_CRYPTO_TWOFISH_X86_64_3WAY=yCONFIG_CRYPTO_TWOFISH_AVX_X86_64=y
#
# Compression
#CONFIG_CRYPTO_DEFLATE=yCONFIG_CRYPTO_LZO=yCONFIG_CRYPTO_842=yCONFIG_CRYPTO_LZ4=y
# CONFIG_CRYPTO_LZ4HC is not setCONFIG_CRYPTO_ZSTD=y
371 lines not shown · raw message
Part of this message is not shown here. View the raw message.
Borislav Petkov
maintainerPATCH 1/1 x86/ftrace: Mark ftrace_modify_code_direct() __ref
Quoted 10 lines · Borislav Petkov
WARNING:
vmlinux.o(.text+0x8c0b1): Section mismatch in reference from the functionftrace_modify_code_direct()to the function .init.text:text_poke_early() The functionftrace_modify_code_direct()references
the function__inittext_poke_early().
This is often becauseftrace_modify_code_directlacks a__init
annotation or the annotation oftext_poke_earlyis wrong.FATAL: modpost: Section mismatches detected.
SetCONFIG_SECTION_MISMATCH_WARN_ONLY=yto allow them. make[1]: *** [scripts/Makefile.modpost:66:__modpost] Error 1
make: *** [Makefile:1077: vmlinux] Error 2
Here's a fix suggested by Peter:
---
From: Borislav Petkov <[email protected]>
Subject: [PATCH] x86/ftrace: Mark ftrace_modify_code_direct() __ref
... because it calls the .init.text function text_poke_early(). That is ok because it does call that function early, during boot.
--- arch/x86/kernel/ftrace.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/kernel/ftrace.c +6 -1
@@ -99,7 +99,12 @@ static int ftrace_verify_code(unsigned long ip, const char *old_code)return 0 ; } -static int +/* +* Marked __ref because it calls text_poke_early() which is .init.text. That is +* ok because that call will happen early, during boot, when .init sections are +* still present. +*/ +static int __ref ftrace_modify_code_direct (unsigned long ip,const char *old_code,const char *new_code) {
Signature · 7 lines
2.21.0
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteRe: [PATCH] x86/ftrace: Mark ftrace_modify_code_direct() __ref
Quoted 5 lines · On Mon, 18 Nov 2019 18:35:10 +0100 Borislav Petkov <[email protected]> wrote:
arch/x86/kernel/ftrace.c +0
-0
arch/x86/kernel/ftrace.c static int ftrace_verify_code(unsigned long ip, const char *old_code) · line 107
Quoted 10 lines
arch/x86/kernel/ftrace.c +6
-1@@ -99,7 +99,12 @@ static int ftrace_verify_code(unsigned long ip, const char *old_code)return 0 ; } -static int +/* +* Marked __ref because it calls text_poke_early() which is .init.text. That is +* ok because that call will happen early, during boot, when .init sections are +* still present. +*/ +static int __ref
-- Steve
Quoted 3 lines
arch/x86/kernel/ftrace.c +0
-0ftrace_modify_code_direct(unsigned long ip, const char *old_code, const char *new_code) {
[tip: core/kprobes] x86/ftrace: Mark ftrace_modify_code_direct() __ref
In reply to Borislav PetkovThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 994795481ddb8efbeda9e5924aca7d0c275efcd9 Gitweb: https://git.kernel.org/tip/994795481ddb8efbeda9e5924aca7d0c275efcd9 Author: Borislav Petkov <[email protected]> AuthorDate: Mon, 18 Nov 2019 18:20:12 +01:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Tue, 19 Nov 2019 10:50:12 +01:00
x86/ftrace: Mark ftrace_modify_code_direct() __ref
... because it calls the .init.text function text_poke_early(). That is ok because it does call that function early, during boot.
--- arch/x86/kernel/ftrace.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/kernel/ftrace.c +6 -1
@@ -99,7 +99,12 @@ static int ftrace_verify_code(unsigned long ip, const char *old_code)return 0 ; } -static int +/* +* Marked __ref because it calls text_poke_early() which is .init.text. That is +* ok because that call will happen early, during boot, when .init sections are +* still present. +*/ +static int __ref ftrace_modify_code_direct (unsigned long ip,const char *old_code,const char *new_code) {
[tip: core/kprobes] x86/ftrace: Mark ftrace_modify_code_direct() __ref
In reply to Borislav PetkovThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 38ebd8d119245eecb99fe00b0f57e269baf22767 Gitweb: https://git.kernel.org/tip/38ebd8d119245eecb99fe00b0f57e269baf22767 Author: Borislav Petkov <[email protected]> AuthorDate: Mon, 18 Nov 2019 18:20:12 +01:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/ftrace: Mark ftrace_modify_code_direct() __ref
... because it calls the .init.text function text_poke_early(). That is ok because it does call that function early, during boot.
--- arch/x86/kernel/ftrace.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/kernel/ftrace.c +6 -1
@@ -99,7 +99,12 @@ static int ftrace_verify_code(unsigned long ip, const char *old_code)return 0 ; } -static int +/* +* Marked __ref because it calls text_poke_early() which is .init.text. That is +* ok because that call will happen early, during boot, when .init sections are +* still present. +*/ +static int __ref ftrace_modify_code_direct (unsigned long ip,const char *old_code,const char *new_code) {
[tip: core/kprobes] x86/ftrace: Use text_poke()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 768ae4406a5cab7e8702550f2446dbeb377b798d Gitweb: https://git.kernel.org/tip/768ae4406a5cab7e8702550f2446dbeb377b798d Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 26 Aug 2019 14:48:23 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/ftrace: Use text_poke()
Move ftrace over to using the generic x86 text_poke functions; this avoids having a second/different copy of that code around.
This also avoids ftrace violating the (new) W^X rule and avoids fragmenting the kernel text page-tables, due to no longer having to toggle them RW.
--- arch/x86/include/asm/ftrace.h | 2 +- arch/x86/kernel/alternative.c | 18 +- arch/x86/kernel/ftrace.c | 663 +++++---------------------------- arch/x86/kernel/traps.c | 9 +- 4 files changed, 134 insertions(+), 558 deletions(-)
arch/x86/include/asm/ftrace.h +0 -2
@@ -34,8 +34,6 @@ struct dyn_arch_ftrace { /* No extra data needed for x86 */ }; -int ftrace_int3_handler (struct pt_regs *regs); -#define FTRACE_GRAPH_TRAMP_ADDR FTRACE_GRAPH_ADDR#endif /* CONFIG_DYNAMIC_FTRACE */
arch/x86/kernel/alternative.c +14 -4
@@ -949,7 +949,7 @@ static struct bp_patching_desc {int nr_entries; } bp_patching; -static int patch_cmp (const void *key,const void *elt) +static int notrace patch_cmp(const void *key, const void *elt) {struct text_poke_loc *tp = (struct text_poke_loc *) elt;
@@ -961,7 +961,7 @@ static int patch_cmp(const void *key, const void *elt) }NOKPROBE_SYMBOL (patch_cmp); -int poke_int3_handler (struct pt_regs *regs) +int notrace poke_int3_handler(struct pt_regs *regs) {struct text_poke_loc *tp;void *ip;
@@ -1209,10 +1209,15 @@ void text_poke_finish(void)text_poke_flush (NULL ); } -void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate) +void __ref text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate) {struct text_poke_loc *tp; +if (unlikely (system_state ==SYSTEM_BOOTING )) { +text_poke_early (addr, opcode, len); +return ; + } +text_poke_flush (addr); tp = &tp_vec[tp_vec_nr++];
@@ -1230,10 +1235,15 @@ void text_poke_queue(void *addr, const void *opcode, size_t len, const void *emu* dynamically allocated memory. This function should be used when it is * not possible to allocate memory. */ -void text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate) +void __ref text_poke_bp (void *addr,const void *opcode,size_t len,const void *emulate) {struct text_poke_loc tp; +if (unlikely (system_state ==SYSTEM_BOOTING )) { +text_poke_early (addr, opcode, len); +return ; + } +text_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); }
arch/x86/kernel/ftrace.c +120 -543
858 lines not on this page · raw message
arch/x86/kernel/traps.c +0 -9
@@ -563,15 +563,6 @@ NOKPROBE_SYMBOL(do_general_protection); dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code) { -#ifdef CONFIG_DYNAMIC_FTRACE -/* -* ftrace must be first, everything else may cause a recursive crash. -* See note by declaration of modifying_ftrace_code in ftrace.c -*/ -if (unlikely (atomic_read (&modifying_ftrace_code)) && -ftrace_int3_handler (regs)) -return ; -#endif if (poke_int3_handler (regs))return ;
Peter Zijlstra
maintainerPATCH 6/17 x86/mm: Remove set_kernel_text_r[ow]()
In reply to Peter ZijlstraWith the last and only user of these functions gone (ftrace) remove them as well to avoid ever growing new users.
--- arch/x86/include/asm/set_memory.h | 2 -- arch/x86/mm/init_32.c | 28 ---------------------------- arch/x86/mm/init_64.c | 36 ------------------------------------ 3 files changed, 66 deletions(-)
arch/x86/include/asm/set_memory.h +0 -2
@@ -81,8 +81,6 @@ int set_direct_map_invalid_noflush(strucint set_direct_map_default_noflush (struct page *page);extern int kernel_set_to_readonly; -void set_kernel_text_rw (void ); -void set_kernel_text_ro (void );#ifdef CONFIG_X86_64 static inline int set_mce_nospec (unsigned long pfn)
arch/x86/mm/init_32.c +0 -28
@@ -874,34 +874,6 @@ void arch_remove_memory(int nid, u64 staint kernel_set_to_readonly__read_mostly ; -void set_kernel_text_rw (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long size =PFN_ALIGN (_etext) - start; - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read write\n" , - start, start+size); - -set_pages_rw (virt_to_page (start), size >>PAGE_SHIFT ); -} - -void set_kernel_text_ro (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long size =PFN_ALIGN (_etext) - start; - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read only\n" , - start, start+size); - -set_pages_ro (virt_to_page (start), size >>PAGE_SHIFT ); -} -static void mark_nxdata_nx (void ) {/*
arch/x86/mm/init_64.c +0 -36
@@ -1260,42 +1260,6 @@ void __init mem_init(void)int kernel_set_to_readonly; -void set_kernel_text_rw (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long end =PFN_ALIGN (__stop___ex_table); - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read write\n" , - start, end); - -/* -* Make the kernel identity mapping for text RW. Kernel text -* mapping will always be RO. Refer to the comment in -* static_protections() in pageattr.c -*/ -set_memory_rw (start, (end - start) >>PAGE_SHIFT ); -} - -void set_kernel_text_ro (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long end =PFN_ALIGN (__stop___ex_table); - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read only\n" , - start, end); - -/* -* Set the kernel identity mapping for text RO. -*/ -set_memory_ro (start, (end - start) >>PAGE_SHIFT ); -} -void mark_rodata_ro (void ) {unsigned long start =PFN_ALIGN (_text);
[tip: core/kprobes] x86/mm: Remove set_kernel_text_r[ow]()
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 1091902b2bd0075178fa9181adbc988b85a0116a Gitweb: https://git.kernel.org/tip/1091902b2bd0075178fa9181adbc988b85a0116a Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 02 Sep 2019 10:16:12 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:42 +01:00
x86/mm: Remove set_kernel_text_r[ow]()
With the last and only user of these functions gone (ftrace) remove them as well to avoid ever growing new users.
--- arch/x86/include/asm/set_memory.h | 2 +-- arch/x86/mm/init_32.c | 28 +----------------------- arch/x86/mm/init_64.c | 36 +------------------------------ 3 files changed, 66 deletions(-)
arch/x86/include/asm/set_memory.h +0 -2
@@ -81,8 +81,6 @@ int set_direct_map_invalid_noflush(struct page *page);int set_direct_map_default_noflush (struct page *page);extern int kernel_set_to_readonly; -void set_kernel_text_rw (void ); -void set_kernel_text_ro (void );#ifdef CONFIG_X86_64 static inline int set_mce_nospec (unsigned long pfn)
arch/x86/mm/init_32.c +0 -28
@@ -874,34 +874,6 @@ void arch_remove_memory(int nid, u64 start, u64 size,int kernel_set_to_readonly__read_mostly ; -void set_kernel_text_rw (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long size =PFN_ALIGN (_etext) - start; - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read write\n" , - start, start+size); - -set_pages_rw (virt_to_page (start), size >>PAGE_SHIFT ); -} - -void set_kernel_text_ro (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long size =PFN_ALIGN (_etext) - start; - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read only\n" , - start, start+size); - -set_pages_ro (virt_to_page (start), size >>PAGE_SHIFT ); -} -static void mark_nxdata_nx (void ) {/*
arch/x86/mm/init_64.c +0 -36
@@ -1260,42 +1260,6 @@ void __init mem_init(void)int kernel_set_to_readonly; -void set_kernel_text_rw (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long end =PFN_ALIGN (_etext); - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read write\n" , - start, end); - -/* -* Make the kernel identity mapping for text RW. Kernel text -* mapping will always be RO. Refer to the comment in -* static_protections() in pageattr.c -*/ -set_memory_rw (start, (end - start) >>PAGE_SHIFT ); -} - -void set_kernel_text_ro (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long end =PFN_ALIGN (_etext); - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read only\n" , - start, end); - -/* -* Set the kernel identity mapping for text RO. -*/ -set_memory_ro (start, (end - start) >>PAGE_SHIFT ); -} -void mark_rodata_ro (void ) {unsigned long start =PFN_ALIGN (_text);
[tip: core/kprobes] x86/mm: Remove set_kernel_text_r[ow]()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: c12af4407fa5a3fc6396bde379e0882a132df49b Gitweb: https://git.kernel.org/tip/c12af4407fa5a3fc6396bde379e0882a132df49b Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 02 Sep 2019 10:16:12 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/mm: Remove set_kernel_text_r[ow]()
With the last and only user of these functions gone (ftrace) remove them as well to avoid ever growing new users.
--- arch/x86/include/asm/set_memory.h | 2 +-- arch/x86/mm/init_32.c | 28 +----------------------- arch/x86/mm/init_64.c | 36 +------------------------------ 3 files changed, 66 deletions(-)
arch/x86/include/asm/set_memory.h +0 -2
@@ -81,8 +81,6 @@ int set_direct_map_invalid_noflush(struct page *page);int set_direct_map_default_noflush (struct page *page);extern int kernel_set_to_readonly; -void set_kernel_text_rw (void ); -void set_kernel_text_ro (void );#ifdef CONFIG_X86_64 static inline int set_mce_nospec (unsigned long pfn)
arch/x86/mm/init_32.c +0 -28
@@ -874,34 +874,6 @@ void arch_remove_memory(int nid, u64 start, u64 size,int kernel_set_to_readonly__read_mostly ; -void set_kernel_text_rw (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long size =PFN_ALIGN (_etext) - start; - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read write\n" , - start, start+size); - -set_pages_rw (virt_to_page (start), size >>PAGE_SHIFT ); -} - -void set_kernel_text_ro (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long size =PFN_ALIGN (_etext) - start; - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read only\n" , - start, start+size); - -set_pages_ro (virt_to_page (start), size >>PAGE_SHIFT ); -} -static void mark_nxdata_nx (void ) {/*
arch/x86/mm/init_64.c +0 -36
@@ -1260,42 +1260,6 @@ void __init mem_init(void)int kernel_set_to_readonly; -void set_kernel_text_rw (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long end =PFN_ALIGN (_etext); - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read write\n" , - start, end); - -/* -* Make the kernel identity mapping for text RW. Kernel text -* mapping will always be RO. Refer to the comment in -* static_protections() in pageattr.c -*/ -set_memory_rw (start, (end - start) >>PAGE_SHIFT ); -} - -void set_kernel_text_ro (void ) -{ -unsigned long start =PFN_ALIGN (_text); -unsigned long end =PFN_ALIGN (_etext); - -if (!kernel_set_to_readonly) -return ; - -pr_debug ("Set kernel text: %lx - %lx for read only\n" , - start, end); - -/* -* Set the kernel identity mapping for text RO. -*/ -set_memory_ro (start, (end - start) >>PAGE_SHIFT ); -} -void mark_rodata_ro (void ) {unsigned long start =PFN_ALIGN (_text);
Peter Zijlstra
maintainerPATCH 7/17 x86/alternative: Add text_opcode_size()
In reply to Peter ZijlstraIntroduce a common helper to map *_INSN_OPCODE to *_INSN_SIZE.
--- arch/x86/include/asm/text-patching.h | 43 +++++++++++++++++++++++++---------- arch/x86/kernel/alternative.c | 12 --------- 2 files changed, 32 insertions(+), 23 deletions(-)
arch/x86/include/asm/text-patching.h +31 -12
@@ -49,18 +49,6 @@ extern void text_poke_bp(void *addr, conextern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate);extern void text_poke_finish (void ); -extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); - -extern int after_bootmem; -extern __ro_after_init struct mm_struct *poking_mm; -extern __ro_after_init unsigned long poking_addr; - -#ifndef CONFIG_UML_X86 -static inline void int3_emulate_jmp (struct pt_regs *regs,unsigned long ip) -{ - regs->ip = ip; -} -#define INT3_INSN_SIZE 1#define INT3_INSN_OPCODE 0xCC
@@ -73,6 +61,37 @@ static inline void int3_emulate_jmp(stru#define JMP8_INSN_SIZE 2#define JMP8_INSN_OPCODE 0xEB +static inline int text_opcode_size (u8 opcode) +{ +int size =0 ; + +#define __CASE (insn) \ + case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break + +switch (opcode) { +__CASE (INT3 ); +__CASE (CALL ); +__CASE (JMP32 ); +__CASE (JMP8 ); + } + +#undef __CASE + +return size; +} + +extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); + +extern int after_bootmem; +extern __ro_after_init struct mm_struct *poking_mm; +extern __ro_after_init unsigned long poking_addr; + +#ifndef CONFIG_UML_X86 +static inline void int3_emulate_jmp (struct pt_regs *regs,unsigned long ip) +{ + regs->ip = ip; +} +static inline void int3_emulate_push (struct pt_regs *regs,unsigned long val) {/*
arch/x86/kernel/alternative.c +1 -11
@@ -1259,22 +1259,12 @@ union text_poke_insn {void *text_gen_insn (u8 opcode,const void *addr,const void *dest) {static union text_poke_insn insn;/* text_mutex */ -int size =0 ; +int size =text_opcode_size (opcode);lockdep_assert_held (&text_mutex); insn.opcode = opcode; -#define __CASE (insn) \ - case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break - -switch (opcode) { -__CASE (INT3 ); -__CASE (CALL ); -__CASE (JMP32 ); -__CASE (JMP8 ); - } -if (size >1 ) { insn.disp = (long )dest - (long )(addr + size);if (size ==2 )
[tip: core/kprobes] x86/alternative: Add text_opcode_size()
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 56a1c2b14349caee65d038ddbccd6bcf555ccd93 Gitweb: https://git.kernel.org/tip/56a1c2b14349caee65d038ddbccd6bcf555ccd93 Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 12:44:17 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:42 +01:00
x86/alternative: Add text_opcode_size()
Introduce a common helper to map *_INSN_OPCODE to *_INSN_SIZE.
--- arch/x86/include/asm/text-patching.h | 43 +++++++++++++++++++-------- arch/x86/kernel/alternative.c | 12 +-------- 2 files changed, 32 insertions(+), 23 deletions(-)
arch/x86/include/asm/text-patching.h +31 -12
@@ -49,18 +49,6 @@ extern void text_poke_bp(void *addr, const void *opcode, size_t len, const voidextern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate);extern void text_poke_finish (void ); -extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); - -extern int after_bootmem; -extern __ro_after_init struct mm_struct *poking_mm; -extern __ro_after_init unsigned long poking_addr; - -#ifndef CONFIG_UML_X86 -static inline void int3_emulate_jmp (struct pt_regs *regs,unsigned long ip) -{ - regs->ip = ip; -} -#define INT3_INSN_SIZE 1#define INT3_INSN_OPCODE 0xCC
@@ -73,6 +61,37 @@ static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip)#define JMP8_INSN_SIZE 2#define JMP8_INSN_OPCODE 0xEB +static inline int text_opcode_size (u8 opcode) +{ +int size =0 ; + +#define __CASE (insn) \ + case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break + +switch (opcode) { +__CASE (INT3 ); +__CASE (CALL ); +__CASE (JMP32 ); +__CASE (JMP8 ); + } + +#undef __CASE + +return size; +} + +extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); + +extern int after_bootmem; +extern __ro_after_init struct mm_struct *poking_mm; +extern __ro_after_init unsigned long poking_addr; + +#ifndef CONFIG_UML_X86 +static inline void int3_emulate_jmp (struct pt_regs *regs,unsigned long ip) +{ + regs->ip = ip; +} +static inline void int3_emulate_push (struct pt_regs *regs,unsigned long val) {/*
arch/x86/kernel/alternative.c +1 -11
@@ -1259,22 +1259,12 @@ union text_poke_insn {void *text_gen_insn (u8 opcode,const void *addr,const void *dest) {static union text_poke_insn insn;/* text_mutex */ -int size =0 ; +int size =text_opcode_size (opcode);lockdep_assert_held (&text_mutex); insn.opcode = opcode; -#define __CASE (insn) \ - case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break - -switch (opcode) { -__CASE (INT3 ); -__CASE (CALL ); -__CASE (JMP32 ); -__CASE (JMP8 ); - } -if (size >1 ) { insn.disp = (long )dest - (long )(addr + size);if (size ==2 )
[tip: core/kprobes] x86/alternative: Add text_opcode_size()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 254d2c04515ea4532a503cc5d8649e1513042e56 Gitweb: https://git.kernel.org/tip/254d2c04515ea4532a503cc5d8649e1513042e56 Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 12:44:17 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/alternative: Add text_opcode_size()
Introduce a common helper to map *_INSN_OPCODE to *_INSN_SIZE.
--- arch/x86/include/asm/text-patching.h | 43 +++++++++++++++++++-------- arch/x86/kernel/alternative.c | 12 +-------- 2 files changed, 32 insertions(+), 23 deletions(-)
arch/x86/include/asm/text-patching.h +31 -12
@@ -49,18 +49,6 @@ extern void text_poke_bp(void *addr, const void *opcode, size_t len, const voidextern void text_poke_queue (void *addr,const void *opcode,size_t len,const void *emulate);extern void text_poke_finish (void ); -extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); - -extern int after_bootmem; -extern __ro_after_init struct mm_struct *poking_mm; -extern __ro_after_init unsigned long poking_addr; - -#ifndef CONFIG_UML_X86 -static inline void int3_emulate_jmp (struct pt_regs *regs,unsigned long ip) -{ - regs->ip = ip; -} -#define INT3_INSN_SIZE 1#define INT3_INSN_OPCODE 0xCC
@@ -73,6 +61,37 @@ static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip)#define JMP8_INSN_SIZE 2#define JMP8_INSN_OPCODE 0xEB +static inline int text_opcode_size (u8 opcode) +{ +int size =0 ; + +#define __CASE (insn) \ + case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break + +switch (opcode) { +__CASE (INT3 ); +__CASE (CALL ); +__CASE (JMP32 ); +__CASE (JMP8 ); + } + +#undef __CASE + +return size; +} + +extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); + +extern int after_bootmem; +extern __ro_after_init struct mm_struct *poking_mm; +extern __ro_after_init unsigned long poking_addr; + +#ifndef CONFIG_UML_X86 +static inline void int3_emulate_jmp (struct pt_regs *regs,unsigned long ip) +{ + regs->ip = ip; +} +static inline void int3_emulate_push (struct pt_regs *regs,unsigned long val) {/*
arch/x86/kernel/alternative.c +1 -11
@@ -1259,22 +1259,12 @@ union text_poke_insn {void *text_gen_insn (u8 opcode,const void *addr,const void *dest) {static union text_poke_insn insn;/* text_mutex */ -int size =0 ; +int size =text_opcode_size (opcode);lockdep_assert_held (&text_mutex); insn.opcode = opcode; -#define __CASE (insn) \ - case insn##_INSN_OPCODE: size = insn##_INSN_SIZE; break - -switch (opcode) { -__CASE (INT3 ); -__CASE (CALL ); -__CASE (JMP32 ); -__CASE (JMP8 ); - } -if (size >1 ) { insn.disp = (long )dest - (long )(addr + size);if (size ==2 )
Peter Zijlstra
maintainerPATCH 8/17 x86/ftrace: Use text_gen_insn()
In reply to Peter ZijlstraReplace the ftrace_code_union with the generic text_gen_insn() helper, which does exactly this.
--- arch/x86/include/asm/text-patching.h | 25 ++++++++++++++++++++++++- arch/x86/kernel/alternative.c | 26 -------------------------- arch/x86/kernel/ftrace.c | 32 +++++++------------------------- 3 files changed, 31 insertions(+), 52 deletions(-)
arch/x86/include/asm/text-patching.h +24 -1
@@ -80,7 +80,30 @@ static inline int text_opcode_size(u8 opreturn size; } -extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); +union text_poke_insn { +u8 text[POKE_MAX_OPCODE_SIZE ]; +struct { +u8 opcode; +s32 disp; + } __attribute__((packed)); +}; + +static __always_inline +void *text_gen_insn(u8 opcode, const void *addr, const void *dest) +{ +static union text_poke_insn insn;/* per instance */ +int size =text_opcode_size (opcode); + + insn.opcode = opcode; + +if (size >1 ) { + insn.disp = (long )dest - (long )(addr + size); +if (size ==2 ) +BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); + } + +return &insn.text; +}extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;
arch/x86/kernel/alternative.c +0 -26
@@ -1247,29 +1247,3 @@ void __ref text_poke_bp(void *addr, constext_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); } - -union text_poke_insn { -u8 text[POKE_MAX_OPCODE_SIZE ]; -struct { -u8 opcode; -s32 disp; - } __attribute__((packed)); -}; - -void *text_gen_insn (u8 opcode,const void *addr,const void *dest) -{ -static union text_poke_insn insn;/* text_mutex */ -int size =text_opcode_size (opcode); - -lockdep_assert_held (&text_mutex); - - insn.opcode = opcode; - -if (size >1 ) { - insn.disp = (long )dest - (long )(addr + size); -if (size ==2 ) -BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); - } - -return &insn.text; -}
arch/x86/kernel/ftrace.c +7 -25
@@ -58,24 +58,6 @@ int ftrace_arch_code_modify_post_processreturn 0 ; } -union ftrace_code_union { -char code[MCOUNT_INSN_SIZE ]; -struct { -char op; -int offset; - } __attribute__((packed)); -}; - -static const char *ftrace_text_replace (char op,unsigned long ip,unsigned long addr) -{ -static union ftrace_code_union calc; - - calc.op = op; - calc.offset = (int )(addr - (ip +MCOUNT_INSN_SIZE )); - -return calc.code; -} -static const char *ftrace_nop_replace (void ) {return ideal_nops[NOP_ATOMIC5 ];
@@ -83,7 +65,7 @@ static const char *ftrace_nop_replace(vostatic const char *ftrace_call_replace (unsigned long ip,unsigned long addr) { -return ftrace_text_replace (CALL_INSN_OPCODE , ip, addr); +return text_gen_insn (CALL_INSN_OPCODE , (void *)ip, (void *)addr); }static int ftrace_verify_code (unsigned long ip,const char *old_code)
@@ -475,20 +457,20 @@ void arch_ftrace_update_trampoline(struc/* Return the address of the function the trampoline calls */ static void *addr_from_call (void *ptr) { -union ftrace_code_union calc; +union text_poke_insn call;int ret; - ret =probe_kernel_read (&calc, ptr,MCOUNT_INSN_SIZE ); + ret =probe_kernel_read (&call, ptr,CALL_INSN_SIZE );if (WARN_ON_ONCE (ret <0 ))return NULL ;/* Make sure this is a call */ -if (WARN_ON_ONCE (calc.op !=0xe8 )) { -pr_warn ("Expected e8, got %x\n" , calc.op); +if (WARN_ON_ONCE (call.opcode !=CALL_INSN_OPCODE )) { +pr_warn ("Expected E8, got %x\n" , call.opcode);return NULL ; } -return ptr +MCOUNT_INSN_SIZE + calc.offset; +return ptr +CALL_INSN_SIZE + call.disp; } void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent,
@@ -557,7 +539,7 @@ extern void ftrace_graph_call(void);static const char *ftrace_jmp_replace (unsigned long ip,unsigned long addr) { -return ftrace_text_replace (JMP32_INSN_OPCODE , ip, addr); +return text_gen_insn (JMP32_INSN_OPCODE , (void *)ip, (void *)addr); }static int ftrace_mod_jmp (unsigned long ip,void *func)
[tip: core/kprobes] x86/ftrace: Use text_gen_insn()
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: a02273c89f76df917b49694a7f836b2d61c0ff87 Gitweb: https://git.kernel.org/tip/a02273c89f76df917b49694a7f836b2d61c0ff87 Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 12:44:14 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:43 +01:00
x86/ftrace: Use text_gen_insn()
Replace the ftrace_code_union with the generic text_gen_insn() helper, which does exactly this.
--- arch/x86/include/asm/text-patching.h | 30 ++++++++++++++++++++++++- arch/x86/kernel/alternative.c | 26 +---------------------- arch/x86/kernel/ftrace.c | 32 +++++---------------------- 3 files changed, 36 insertions(+), 52 deletions(-)
arch/x86/include/asm/text-patching.h +29 -1
@@ -80,7 +80,35 @@ static inline int text_opcode_size(u8 opcode)return size; } -extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); +union text_poke_insn { +u8 text[POKE_MAX_OPCODE_SIZE ]; +struct { +u8 opcode; +s32 disp; + } __attribute__((packed)); +}; + +static __always_inline +void *text_gen_insn(u8 opcode, const void *addr, const void *dest) +{ +static union text_poke_insn insn;/* per instance */ +int size =text_opcode_size (opcode); + + insn.opcode = opcode; + +if (size >1 ) { + insn.disp = (long )dest - (long )(addr + size); +if (size ==2 ) { +/* +* Ensure that for JMP9 the displacement +* actually fits the signed byte. +*/ +BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); + } + } + +return &insn.text; +}extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;
arch/x86/kernel/alternative.c +0 -26
@@ -1247,29 +1247,3 @@ void __ref text_poke_bp(void *addr, const void *opcode, size_t len, const void *text_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); } - -union text_poke_insn { -u8 text[POKE_MAX_OPCODE_SIZE ]; -struct { -u8 opcode; -s32 disp; - } __attribute__((packed)); -}; - -void *text_gen_insn (u8 opcode,const void *addr,const void *dest) -{ -static union text_poke_insn insn;/* text_mutex */ -int size =text_opcode_size (opcode); - -lockdep_assert_held (&text_mutex); - - insn.opcode = opcode; - -if (size >1 ) { - insn.disp = (long )dest - (long )(addr + size); -if (size ==2 ) -BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); - } - -return &insn.text; -}
arch/x86/kernel/ftrace.c +7 -25
@@ -63,24 +63,6 @@ int ftrace_arch_code_modify_post_process(void)return 0 ; } -union ftrace_code_union { -char code[MCOUNT_INSN_SIZE ]; -struct { -char op; -int offset; - } __attribute__((packed)); -}; - -static const char *ftrace_text_replace (char op,unsigned long ip,unsigned long addr) -{ -static union ftrace_code_union calc; - - calc.op = op; - calc.offset = (int )(addr - (ip +MCOUNT_INSN_SIZE )); - -return calc.code; -} -static const char *ftrace_nop_replace (void ) {return ideal_nops[NOP_ATOMIC5 ];
@@ -88,7 +70,7 @@ static const char *ftrace_nop_replace(void)static const char *ftrace_call_replace (unsigned long ip,unsigned long addr) { -return ftrace_text_replace (CALL_INSN_OPCODE , ip, addr); +return text_gen_insn (CALL_INSN_OPCODE , (void *)ip, (void *)addr); }static int ftrace_verify_code (unsigned long ip,const char *old_code)
@@ -480,20 +462,20 @@ void arch_ftrace_update_trampoline(struct ftrace_ops *ops)/* Return the address of the function the trampoline calls */ static void *addr_from_call (void *ptr) { -union ftrace_code_union calc; +union text_poke_insn call;int ret; - ret =probe_kernel_read (&calc, ptr,MCOUNT_INSN_SIZE ); + ret =probe_kernel_read (&call, ptr,CALL_INSN_SIZE );if (WARN_ON_ONCE (ret <0 ))return NULL ;/* Make sure this is a call */ -if (WARN_ON_ONCE (calc.op !=0xe8 )) { -pr_warn ("Expected e8, got %x\n" , calc.op); +if (WARN_ON_ONCE (call.opcode !=CALL_INSN_OPCODE )) { +pr_warn ("Expected E8, got %x\n" , call.opcode);return NULL ; } -return ptr +MCOUNT_INSN_SIZE + calc.offset; +return ptr +CALL_INSN_SIZE + call.disp; } void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent,
@@ -562,7 +544,7 @@ extern void ftrace_graph_call(void);static const char *ftrace_jmp_replace (unsigned long ip,unsigned long addr) { -return ftrace_text_replace (JMP32_INSN_OPCODE , ip, addr); +return text_gen_insn (JMP32_INSN_OPCODE , (void *)ip, (void *)addr); }static int ftrace_mod_jmp (unsigned long ip,void *func)
[tip: core/kprobes] x86/ftrace: Use text_gen_insn()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 67c1d4a28064f9ec63df03f7798e4a334176a9cd Gitweb: https://git.kernel.org/tip/67c1d4a28064f9ec63df03f7798e4a334176a9cd Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 12:44:14 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/ftrace: Use text_gen_insn()
Replace the ftrace_code_union with the generic text_gen_insn() helper, which does exactly this.
--- arch/x86/include/asm/text-patching.h | 30 ++++++++++++++++++++++++- arch/x86/kernel/alternative.c | 26 +---------------------- arch/x86/kernel/ftrace.c | 32 +++++---------------------- 3 files changed, 36 insertions(+), 52 deletions(-)
arch/x86/include/asm/text-patching.h +29 -1
@@ -80,7 +80,35 @@ static inline int text_opcode_size(u8 opcode)return size; } -extern void *text_gen_insn (u8 opcode,const void *addr,const void *dest); +union text_poke_insn { +u8 text[POKE_MAX_OPCODE_SIZE ]; +struct { +u8 opcode; +s32 disp; + } __attribute__((packed)); +}; + +static __always_inline +void *text_gen_insn(u8 opcode, const void *addr, const void *dest) +{ +static union text_poke_insn insn;/* per instance */ +int size =text_opcode_size (opcode); + + insn.opcode = opcode; + +if (size >1 ) { + insn.disp = (long )dest - (long )(addr + size); +if (size ==2 ) { +/* +* Ensure that for JMP9 the displacement +* actually fits the signed byte. +*/ +BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); + } + } + +return &insn.text; +}extern int after_bootmem;extern __ro_after_init struct mm_struct *poking_mm;
arch/x86/kernel/alternative.c +0 -26
@@ -1247,29 +1247,3 @@ void __ref text_poke_bp(void *addr, const void *opcode, size_t len, const void *text_poke_loc_init (&tp, addr, opcode, len, emulate);text_poke_bp_batch (&tp,1 ); } - -union text_poke_insn { -u8 text[POKE_MAX_OPCODE_SIZE ]; -struct { -u8 opcode; -s32 disp; - } __attribute__((packed)); -}; - -void *text_gen_insn (u8 opcode,const void *addr,const void *dest) -{ -static union text_poke_insn insn;/* text_mutex */ -int size =text_opcode_size (opcode); - -lockdep_assert_held (&text_mutex); - - insn.opcode = opcode; - -if (size >1 ) { - insn.disp = (long )dest - (long )(addr + size); -if (size ==2 ) -BUG_ON ((insn.disp >>31 ) != (insn.disp >>7 )); - } - -return &insn.text; -}
arch/x86/kernel/ftrace.c +7 -25
@@ -63,24 +63,6 @@ int ftrace_arch_code_modify_post_process(void)return 0 ; } -union ftrace_code_union { -char code[MCOUNT_INSN_SIZE ]; -struct { -char op; -int offset; - } __attribute__((packed)); -}; - -static const char *ftrace_text_replace (char op,unsigned long ip,unsigned long addr) -{ -static union ftrace_code_union calc; - - calc.op = op; - calc.offset = (int )(addr - (ip +MCOUNT_INSN_SIZE )); - -return calc.code; -} -static const char *ftrace_nop_replace (void ) {return ideal_nops[NOP_ATOMIC5 ];
@@ -88,7 +70,7 @@ static const char *ftrace_nop_replace(void)static const char *ftrace_call_replace (unsigned long ip,unsigned long addr) { -return ftrace_text_replace (CALL_INSN_OPCODE , ip, addr); +return text_gen_insn (CALL_INSN_OPCODE , (void *)ip, (void *)addr); }static int ftrace_verify_code (unsigned long ip,const char *old_code)
@@ -480,20 +462,20 @@ void arch_ftrace_update_trampoline(struct ftrace_ops *ops)/* Return the address of the function the trampoline calls */ static void *addr_from_call (void *ptr) { -union ftrace_code_union calc; +union text_poke_insn call;int ret; - ret =probe_kernel_read (&calc, ptr,MCOUNT_INSN_SIZE ); + ret =probe_kernel_read (&call, ptr,CALL_INSN_SIZE );if (WARN_ON_ONCE (ret <0 ))return NULL ;/* Make sure this is a call */ -if (WARN_ON_ONCE (calc.op !=0xe8 )) { -pr_warn ("Expected e8, got %x\n" , calc.op); +if (WARN_ON_ONCE (call.opcode !=CALL_INSN_OPCODE )) { +pr_warn ("Expected E8, got %x\n" , call.opcode);return NULL ; } -return ptr +MCOUNT_INSN_SIZE + calc.offset; +return ptr +CALL_INSN_SIZE + call.disp; } void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent,
@@ -562,7 +544,7 @@ extern void ftrace_graph_call(void);static const char *ftrace_jmp_replace (unsigned long ip,unsigned long addr) { -return ftrace_text_replace (JMP32_INSN_OPCODE , ip, addr); +return text_gen_insn (JMP32_INSN_OPCODE , (void *)ip, (void *)addr); }static int ftrace_mod_jmp (unsigned long ip,void *func)
Peter Zijlstra
maintainerPATCH 9/17 x86/alternative: Remove text_poke_loc::len
In reply to Peter ZijlstraPer the BUG_ON(len != insn.length) in text_poke_loc_init(), tp->len must indeed be the same as text_opcode_size(tp->opcode). Use this to remove this field from the structure.
Sadly, due to 8 byte alignment, this only increases the structure padding.
--- arch/x86/kernel/alternative.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
arch/x86/kernel/alternative.c +7 -5
@@ -938,7 +938,6 @@ static void do_sync_core(void *info)struct text_poke_loc {void *addr; -int len;s32 rel32;u8 opcode;const u8 text[POKE_MAX_OPCODE_SIZE ];
@@ -965,6 +964,7 @@ int notrace poke_int3_handler(struct pt_ {struct text_poke_loc *tp;void *ip; +int len;/* * Having observed our INT3 instruction, we now must observe
@@ -1004,7 +1004,8 @@ int notrace poke_int3_handler(struct pt_return 0 ; } - ip += tp->len; + len =text_opcode_size (tp->opcode); + ip += len;switch (tp->opcode) {case INT3_INSN_OPCODE :
@@ -1085,10 +1086,12 @@ static void text_poke_bp_batch(struct te* Second step: update all but the first byte of the patched range. */ for (do_sync =0 , i =0 ; i < nr_entries; i++) { -if (tp[i].len -sizeof (int3) >0 ) { +int len =text_opcode_size (tp[i].opcode); + +if (len -sizeof (int3) >0 ) {text_poke ((char *)tp[i].addr +sizeof (int3), (const char *)tp[i].text +sizeof (int3), - tp[i].len -sizeof (int3)); + len -sizeof (int3)); do_sync++; } }
@@ -1141,7 +1144,6 @@ void text_poke_loc_init(struct text_pokeBUG_ON (len != insn.length); tp->addr = addr; - tp->len = len; tp->opcode = insn.opcode.bytes[0 ];switch (tp->opcode) {
[tip: core/kprobes] x86/alternative: Remove text_poke_loc::len
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: a94d4b4a2a99d9c1277210ba7f74667e3a2bc76d Gitweb: https://git.kernel.org/tip/a94d4b4a2a99d9c1277210ba7f74667e3a2bc76d Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 12:44:20 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:43 +01:00
x86/alternative: Remove text_poke_loc::len
Per the BUG_ON(len != insn.length) in text_poke_loc_init(), tp->len must indeed be the same as text_opcode_size(tp->opcode). Use this to remove this field from the structure.
Sadly, due to 8 byte alignment, this only increases the structure padding.
--- arch/x86/kernel/alternative.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
arch/x86/kernel/alternative.c +7 -5
@@ -938,7 +938,6 @@ static void do_sync_core(void *info)struct text_poke_loc {void *addr; -int len;s32 rel32;u8 opcode;const u8 text[POKE_MAX_OPCODE_SIZE ];
@@ -965,6 +964,7 @@ int notrace poke_int3_handler(struct pt_regs *regs) {struct text_poke_loc *tp;void *ip; +int len;/* * Having observed our INT3 instruction, we now must observe
@@ -1004,7 +1004,8 @@ int notrace poke_int3_handler(struct pt_regs *regs)return 0 ; } - ip += tp->len; + len =text_opcode_size (tp->opcode); + ip += len;switch (tp->opcode) {case INT3_INSN_OPCODE :
@@ -1085,10 +1086,12 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries* Second step: update all but the first byte of the patched range. */ for (do_sync =0 , i =0 ; i < nr_entries; i++) { -if (tp[i].len -sizeof (int3) >0 ) { +int len =text_opcode_size (tp[i].opcode); + +if (len -sizeof (int3) >0 ) {text_poke ((char *)tp[i].addr +sizeof (int3), (const char *)tp[i].text +sizeof (int3), - tp[i].len -sizeof (int3)); + len -sizeof (int3)); do_sync++; } }
@@ -1141,7 +1144,6 @@ void text_poke_loc_init(struct text_poke_loc *tp, void *addr,BUG_ON (len != insn.length); tp->addr = addr; - tp->len = len; tp->opcode = insn.opcode.bytes[0 ];switch (tp->opcode) {
[tip: core/kprobes] x86/alternative: Remove text_poke_loc::len
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 97e6c977ccf128c3f34d6084ad53fc0021f90e03 Gitweb: https://git.kernel.org/tip/97e6c977ccf128c3f34d6084ad53fc0021f90e03 Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 12:44:20 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/alternative: Remove text_poke_loc::len
Per the BUG_ON(len != insn.length) in text_poke_loc_init(), tp->len must indeed be the same as text_opcode_size(tp->opcode). Use this to remove this field from the structure.
Sadly, due to 8 byte alignment, this only increases the structure padding.
--- arch/x86/kernel/alternative.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
arch/x86/kernel/alternative.c +7 -5
@@ -938,7 +938,6 @@ static void do_sync_core(void *info)struct text_poke_loc {void *addr; -int len;s32 rel32;u8 opcode;const u8 text[POKE_MAX_OPCODE_SIZE ];
@@ -965,6 +964,7 @@ int notrace poke_int3_handler(struct pt_regs *regs) {struct text_poke_loc *tp;void *ip; +int len;/* * Having observed our INT3 instruction, we now must observe
@@ -1004,7 +1004,8 @@ int notrace poke_int3_handler(struct pt_regs *regs)return 0 ; } - ip += tp->len; + len =text_opcode_size (tp->opcode); + ip += len;switch (tp->opcode) {case INT3_INSN_OPCODE :
@@ -1085,10 +1086,12 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries* Second step: update all but the first byte of the patched range. */ for (do_sync =0 , i =0 ; i < nr_entries; i++) { -if (tp[i].len -sizeof (int3) >0 ) { +int len =text_opcode_size (tp[i].opcode); + +if (len -sizeof (int3) >0 ) {text_poke ((char *)tp[i].addr +sizeof (int3), (const char *)tp[i].text +sizeof (int3), - tp[i].len -sizeof (int3)); + len -sizeof (int3)); do_sync++; } }
@@ -1141,7 +1144,6 @@ void text_poke_loc_init(struct text_poke_loc *tp, void *addr,BUG_ON (len != insn.length); tp->addr = addr; - tp->len = len; tp->opcode = insn.opcode.bytes[0 ];switch (tp->opcode) {
Peter Zijlstra
maintainerPATCH 10/17 x86/alternative: Shrink text_poke_loc
In reply to Peter ZijlstraEmploy the fact that all text must be within a s32 displacement of one another to shrink the text_poke_loc::addr field. Make it relative to _stext.
This then shrinks struct text_poke_loc to 16 bytes, and consequently increases TP_VEC_MAX from 170 to 256.
--- arch/x86/kernel/alternative.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
arch/x86/kernel/alternative.c +14 -9
@@ -937,7 +937,7 @@ static void do_sync_core(void *info) }struct text_poke_loc { -void *addr; +s32 rel_addr;/* addr := _stext + rel_addr */ s32 rel32;u8 opcode;const u8 text[POKE_MAX_OPCODE_SIZE ];
@@ -948,13 +948,18 @@ static struct bp_patching_desc {int nr_entries; } bp_patching; +static inline void *text_poke_addr (struct text_poke_loc *tp) +{ +return _stext + tp->rel_addr; +} + static int notrace patch_cmp(const void *key, const void *elt) {struct text_poke_loc *tp = (struct text_poke_loc *) elt; -if (key < tp->addr) +if (key <text_poke_addr (tp))return -1 ; -if (key > tp->addr) +if (key >text_poke_addr (tp))return 1 ;return 0 ; }
@@ -1000,7 +1005,7 @@ int notrace poke_int3_handler(struct pt_return 0 ; }else { tp = bp_patching.vec; -if (tp->addr != ip) +if (text_poke_addr (tp) != ip)return 0 ; }
@@ -1078,7 +1083,7 @@ static void text_poke_bp_batch(struct te* First step: add a int3 trap to the address that will be patched. */ for (i =0 ; i < nr_entries; i++) -text_poke (tp[i].addr, &int3,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3));on_each_cpu (do_sync_core,NULL ,1 );
@@ -1089,7 +1094,7 @@ static void text_poke_bp_batch(struct teint len =text_opcode_size (tp[i].opcode);if (len -sizeof (int3) >0 ) { -text_poke ((char *)tp[i].addr +sizeof (int3), +text_poke (text_poke_addr (&tp[i]) +sizeof (int3), (const char *)tp[i].text +sizeof (int3), len -sizeof (int3)); do_sync++;
@@ -1113,7 +1118,7 @@ static void text_poke_bp_batch(struct teif (tp[i].text[0 ] ==INT3_INSN_OPCODE )continue ; -text_poke (tp[i].addr, tp[i].text,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), tp[i].text,sizeof (int3)); do_sync++; }
@@ -1143,7 +1148,7 @@ void text_poke_loc_init(struct text_pokeBUG_ON (!insn_complete (&insn));BUG_ON (len != insn.length); - tp->addr = addr; + tp->rel_addr = addr - (void *)_stext; tp->opcode = insn.opcode.bytes[0 ];switch (tp->opcode) {
@@ -1192,7 +1197,7 @@ static bool tp_order_fail(void *addr)return true; tp = &tp_vec[tp_vec_nr -1 ]; -if ((unsigned long )tp->addr > (unsigned long )addr) +if ((unsigned long )text_poke_addr (tp) > (unsigned long )addr)return true;return false;
[tip: core/kprobes] x86/alternative: Shrink text_poke_loc
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 54d41ef26da6820cf31b243357108dbbf11c6129 Gitweb: https://git.kernel.org/tip/54d41ef26da6820cf31b243357108dbbf11c6129 Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 12:26:53 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 15 Nov 2019 09:07:43 +01:00
x86/alternative: Shrink text_poke_loc
Employ the fact that all text must be within a s32 displacement of one another to shrink the text_poke_loc::addr field. Make it relative to _stext.
This then shrinks struct text_poke_loc to 16 bytes, and consequently increases TP_VEC_MAX from 170 to 256.
--- arch/x86/kernel/alternative.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
arch/x86/kernel/alternative.c +14 -9
@@ -937,7 +937,7 @@ static void do_sync_core(void *info) }struct text_poke_loc { -void *addr; +s32 rel_addr;/* addr := _stext + rel_addr */ s32 rel32;u8 opcode;const u8 text[POKE_MAX_OPCODE_SIZE ];
@@ -948,13 +948,18 @@ static struct bp_patching_desc {int nr_entries; } bp_patching; +static inline void *text_poke_addr (struct text_poke_loc *tp) +{ +return _stext + tp->rel_addr; +} + static int notrace patch_cmp(const void *key, const void *elt) {struct text_poke_loc *tp = (struct text_poke_loc *) elt; -if (key < tp->addr) +if (key <text_poke_addr (tp))return -1 ; -if (key > tp->addr) +if (key >text_poke_addr (tp))return 1 ;return 0 ; }
@@ -1000,7 +1005,7 @@ int notrace poke_int3_handler(struct pt_regs *regs)return 0 ; }else { tp = bp_patching.vec; -if (tp->addr != ip) +if (text_poke_addr (tp) != ip)return 0 ; }
@@ -1078,7 +1083,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries* First step: add a int3 trap to the address that will be patched. */ for (i =0 ; i < nr_entries; i++) -text_poke (tp[i].addr, &int3,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3));on_each_cpu (do_sync_core,NULL ,1 );
@@ -1089,7 +1094,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesint len =text_opcode_size (tp[i].opcode);if (len -sizeof (int3) >0 ) { -text_poke ((char *)tp[i].addr +sizeof (int3), +text_poke (text_poke_addr (&tp[i]) +sizeof (int3), (const char *)tp[i].text +sizeof (int3), len -sizeof (int3)); do_sync++;
@@ -1113,7 +1118,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesif (tp[i].text[0 ] ==INT3_INSN_OPCODE )continue ; -text_poke (tp[i].addr, tp[i].text,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), tp[i].text,sizeof (int3)); do_sync++; }
@@ -1143,7 +1148,7 @@ void text_poke_loc_init(struct text_poke_loc *tp, void *addr,BUG_ON (!insn_complete (&insn));BUG_ON (len != insn.length); - tp->addr = addr; + tp->rel_addr = addr - (void *)_stext; tp->opcode = insn.opcode.bytes[0 ];switch (tp->opcode) {
@@ -1192,7 +1197,7 @@ static bool tp_order_fail(void *addr)return true; tp = &tp_vec[tp_vec_nr -1 ]; -if ((unsigned long )tp->addr > (unsigned long )addr) +if ((unsigned long )text_poke_addr (tp) > (unsigned long )addr)return true;return false;
[tip: core/kprobes] x86/alternative: Shrink text_poke_loc
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 4531ef6a8aaf132aa32e2e26670c652942540633 Gitweb: https://git.kernel.org/tip/4531ef6a8aaf132aa32e2e26670c652942540633 Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 12:26:53 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/alternative: Shrink text_poke_loc
Employ the fact that all text must be within a s32 displacement of one another to shrink the text_poke_loc::addr field. Make it relative to _stext.
This then shrinks struct text_poke_loc to 16 bytes, and consequently increases TP_VEC_MAX from 170 to 256.
--- arch/x86/kernel/alternative.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
arch/x86/kernel/alternative.c +14 -9
@@ -937,7 +937,7 @@ static void do_sync_core(void *info) }struct text_poke_loc { -void *addr; +s32 rel_addr;/* addr := _stext + rel_addr */ s32 rel32;u8 opcode;const u8 text[POKE_MAX_OPCODE_SIZE ];
@@ -948,13 +948,18 @@ static struct bp_patching_desc {int nr_entries; } bp_patching; +static inline void *text_poke_addr (struct text_poke_loc *tp) +{ +return _stext + tp->rel_addr; +} + static int notrace patch_cmp(const void *key, const void *elt) {struct text_poke_loc *tp = (struct text_poke_loc *) elt; -if (key < tp->addr) +if (key <text_poke_addr (tp))return -1 ; -if (key > tp->addr) +if (key >text_poke_addr (tp))return 1 ;return 0 ; }
@@ -1000,7 +1005,7 @@ int notrace poke_int3_handler(struct pt_regs *regs)return 0 ; }else { tp = bp_patching.vec; -if (tp->addr != ip) +if (text_poke_addr (tp) != ip)return 0 ; }
@@ -1078,7 +1083,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries* First step: add a int3 trap to the address that will be patched. */ for (i =0 ; i < nr_entries; i++) -text_poke (tp[i].addr, &int3,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3));on_each_cpu (do_sync_core,NULL ,1 );
@@ -1089,7 +1094,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesint len =text_opcode_size (tp[i].opcode);if (len -sizeof (int3) >0 ) { -text_poke ((char *)tp[i].addr +sizeof (int3), +text_poke (text_poke_addr (&tp[i]) +sizeof (int3), (const char *)tp[i].text +sizeof (int3), len -sizeof (int3)); do_sync++;
@@ -1113,7 +1118,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesif (tp[i].text[0 ] ==INT3_INSN_OPCODE )continue ; -text_poke (tp[i].addr, tp[i].text,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), tp[i].text,sizeof (int3)); do_sync++; }
@@ -1143,7 +1148,7 @@ void text_poke_loc_init(struct text_poke_loc *tp, void *addr,BUG_ON (!insn_complete (&insn));BUG_ON (len != insn.length); - tp->addr = addr; + tp->rel_addr = addr - (void *)_stext; tp->opcode = insn.opcode.bytes[0 ];switch (tp->opcode) {
@@ -1192,7 +1197,7 @@ static bool tp_order_fail(void *addr)return true; tp = &tp_vec[tp_vec_nr -1 ]; -if ((unsigned long )tp->addr > (unsigned long )addr) +if ((unsigned long )text_poke_addr (tp) > (unsigned long )addr)return true;return false;
Peter Zijlstra
maintainerPATCH 11/17 x86/kprobes: Convert to text-patching.h
In reply to Peter ZijlstraConvert kprobes to the new text-poke naming.
--- arch/x86/include/asm/kprobes.h | 14 +++-------- arch/x86/include/asm/text-patching.h | 2 + arch/x86/kernel/kprobes/core.c | 18 +++++++------- arch/x86/kernel/kprobes/opt.c | 44 ++++++++++++++++------------------- 4 files changed, 37 insertions(+), 41 deletions(-)
arch/x86/include/asm/kprobes.h +5 -9
@@ -11,12 +11,11 @@#include <asm-generic/kprobes.h> -#define BREAKPOINT_INSTRUCTION 0xcc -#ifdef CONFIG_KPROBES #include <linux/types.h> #include <linux/ptrace.h> #include <linux/percpu.h> +#include <asm/text-patching.h> #include <asm/insn.h> #define __ARCH_WANT_KPROBES_INSN_SLOT
@@ -25,10 +24,7 @@ struct pt_regs;struct kprobe ;typedef u8 kprobe_opcode_t ; -#define RELATIVEJUMP_OPCODE 0xe9 -#define RELATIVEJUMP_SIZE 5 -#define RELATIVECALL_OPCODE 0xe8 -#define RELATIVE_ADDR_SIZE 4 +#define MAX_STACK_SIZE 64#define CUR_STACK_SIZE (ADDR ) \ (current_top_of_stack() - (unsigned long)(ADDR))
@@ -43,11 +39,11 @@ extern __visible kprobe_opcode_t optprob extern __visible kprobe_opcode_t optprobe_template_val[]; extern __visible kprobe_opcode_t optprobe_template_call[]; extern __visible kprobe_opcode_t optprobe_template_end[]; -#define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) +#define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + DISP32_SIZE)#define MAX_OPTINSN_SIZE \ (((unsigned long)optprobe_template_end - \ (unsigned long)optprobe_template_entry) + \ - MAX_OPTIMIZED_LENGTH + RELATIVEJUMP_SIZE) + MAX_OPTIMIZED_LENGTH + JMP32_INSN_SIZE)extern const int kretprobe_blacklist_size;
@@ -73,7 +69,7 @@ struct arch_specific_insn {struct arch_optimized_insn {/* copy of the original instructions */ -kprobe_opcode_t copied_insn[RELATIVE_ADDR_SIZE ]; +kprobe_opcode_t copied_insn[DISP32_SIZE ];/* detour code buffer */ kprobe_opcode_t *insn;/* the size of instructions copied to detour code buffer */
arch/x86/include/asm/text-patching.h +2 -0
@@ -61,6 +61,8 @@ extern void text_poke_finish(void);#define JMP8_INSN_SIZE 2#define JMP8_INSN_OPCODE 0xEB +#define DISP32_SIZE 4 +static inline int text_opcode_size (u8 opcode) {int size =0 ;
arch/x86/kernel/kprobes/core.c +9 -9
@@ -119,14 +119,14 @@ __synthesize_relative_insn(void *dest, v/* Insert a jump instruction at address 'from', which jumps to address 'to'.*/ void synthesize_reljump (void *dest,void *from,void *to) { -__synthesize_relative_insn (dest, from, to,RELATIVEJUMP_OPCODE ); +__synthesize_relative_insn (dest, from, to,JMP32_INSN_OPCODE ); }NOKPROBE_SYMBOL (synthesize_reljump);/* Insert a call instruction at address 'from', which calls address 'to'.*/ void synthesize_relcall (void *dest,void *from,void *to) { -__synthesize_relative_insn (dest, from, to,RELATIVECALL_OPCODE ); +__synthesize_relative_insn (dest, from, to,CALL_INSN_OPCODE ); }NOKPROBE_SYMBOL (synthesize_relcall);
@@ -301,7 +301,7 @@ static int can_probe(unsigned long paddr* Another debugging subsystem might insert this breakpoint. * In that case, we can't recover it. */ -if (insn.opcode.bytes[0 ] ==BREAKPOINT_INSTRUCTION ) +if (insn.opcode.bytes[0 ] ==INT3_INSN_OPCODE )return 0 ; addr += insn.length; }
@@ -356,7 +356,7 @@ int __copy_instruction(u8 *dest, u8 *srcreturn 0 ;/* Another subsystem puts a breakpoint, failed to recover */ -if (insn->opcode.bytes[0 ] ==BREAKPOINT_INSTRUCTION ) +if (insn->opcode.bytes[0 ] ==INT3_INSN_OPCODE )return 0 ;/* We should not singlestep on the exception masking instructions */
@@ -400,14 +400,14 @@ static int prepare_boost(kprobe_opcode_tint len = insn->length;if (can_boost (insn, p->addr) && -MAX_INSN_SIZE - len >=RELATIVEJUMP_SIZE ) { +MAX_INSN_SIZE - len >=JMP32_INSN_SIZE ) {/* * These instructions can be executed directly if it * jumps back to correct address. */ synthesize_reljump (buf + len, p->ainsn.insn + len, p->addr + insn->length); - len +=RELATIVEJUMP_SIZE ; + len +=JMP32_INSN_SIZE ; p->ainsn.boostable = true; }else { p->ainsn.boostable = false;
@@ -501,7 +501,7 @@ int arch_prepare_kprobe(struct kprobe *pvoid arch_arm_kprobe (struct kprobe *p) { -text_poke (p->addr, ((unsigned char []){BREAKPOINT_INSTRUCTION }),1 ); +text_poke (p->addr, ((unsigned char []){INT3_INSN_OPCODE }),1 ); }void arch_disarm_kprobe (struct kprobe *p)
@@ -609,7 +609,7 @@ static void setup_singlestep(struct kpro regs->flags |=X86_EFLAGS_TF ; regs->flags &= ~X86_EFLAGS_IF ;/* single step inline if the instruction is an int3 */ -if (p->opcode ==BREAKPOINT_INSTRUCTION ) +if (p->opcode ==INT3_INSN_OPCODE ) regs->ip = (unsigned long )p->addr;else regs->ip = (unsigned long )p->ainsn.insn;
@@ -695,7 +695,7 @@ int kprobe_int3_handler(struct pt_regs *reset_current_kprobe ();return 1 ; } - }else if (*addr !=BREAKPOINT_INSTRUCTION ) { + }else if (*addr !=INT3_INSN_OPCODE ) {/* * The breakpoint instruction was removed right * after we hit it. Another cpu has removed
arch/x86/kernel/kprobes/opt.c +21 -23
131 lines not on this page · raw message
[tip: core/kprobes] x86/kprobes: Convert to text-patching.h
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 8986dec1a726cf565a226257a085abb781b22061 Gitweb: https://git.kernel.org/tip/8986dec1a726cf565a226257a085abb781b22061 Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 13:57:17 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 19 Nov 2019 13:13:05 +01:00
x86/kprobes: Convert to text-patching.h
Convert kprobes to the new text-poke naming.
--- arch/x86/include/asm/kprobes.h | 14 +++------ arch/x86/include/asm/text-patching.h | 2 +- arch/x86/kernel/kprobes/core.c | 18 +++++------ arch/x86/kernel/kprobes/opt.c | 44 ++++++++++++--------------- 4 files changed, 37 insertions(+), 41 deletions(-)
arch/x86/include/asm/kprobes.h +5 -9
@@ -11,12 +11,11 @@#include <asm-generic/kprobes.h> -#define BREAKPOINT_INSTRUCTION 0xcc -#ifdef CONFIG_KPROBES #include <linux/types.h> #include <linux/ptrace.h> #include <linux/percpu.h> +#include <asm/text-patching.h> #include <asm/insn.h> #define __ARCH_WANT_KPROBES_INSN_SLOT
@@ -25,10 +24,7 @@ struct pt_regs;struct kprobe ;typedef u8 kprobe_opcode_t ; -#define RELATIVEJUMP_OPCODE 0xe9 -#define RELATIVEJUMP_SIZE 5 -#define RELATIVECALL_OPCODE 0xe8 -#define RELATIVE_ADDR_SIZE 4 +#define MAX_STACK_SIZE 64#define CUR_STACK_SIZE (ADDR ) \ (current_top_of_stack() - (unsigned long)(ADDR))
@@ -43,11 +39,11 @@ extern __visible kprobe_opcode_t optprobe_template_entry[]; extern __visible kprobe_opcode_t optprobe_template_val[]; extern __visible kprobe_opcode_t optprobe_template_call[]; extern __visible kprobe_opcode_t optprobe_template_end[]; -#define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) +#define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + DISP32_SIZE)#define MAX_OPTINSN_SIZE \ (((unsigned long)optprobe_template_end - \ (unsigned long)optprobe_template_entry) + \ - MAX_OPTIMIZED_LENGTH + RELATIVEJUMP_SIZE) + MAX_OPTIMIZED_LENGTH + JMP32_INSN_SIZE)extern const int kretprobe_blacklist_size;
@@ -73,7 +69,7 @@ struct arch_specific_insn {struct arch_optimized_insn {/* copy of the original instructions */ -kprobe_opcode_t copied_insn[RELATIVE_ADDR_SIZE ]; +kprobe_opcode_t copied_insn[DISP32_SIZE ];/* detour code buffer */ kprobe_opcode_t *insn;/* the size of instructions copied to detour code buffer */
arch/x86/include/asm/text-patching.h +2 -0
@@ -61,6 +61,8 @@ extern void text_poke_finish(void);#define JMP8_INSN_SIZE 2#define JMP8_INSN_OPCODE 0xEB +#define DISP32_SIZE 4 +static inline int text_opcode_size (u8 opcode) {int size =0 ;
arch/x86/kernel/kprobes/core.c +9 -9
@@ -119,14 +119,14 @@ __synthesize_relative_insn(void *dest, void *from, void *to, u8 op)/* Insert a jump instruction at address 'from', which jumps to address 'to'.*/ void synthesize_reljump (void *dest,void *from,void *to) { -__synthesize_relative_insn (dest, from, to,RELATIVEJUMP_OPCODE ); +__synthesize_relative_insn (dest, from, to,JMP32_INSN_OPCODE ); }NOKPROBE_SYMBOL (synthesize_reljump);/* Insert a call instruction at address 'from', which calls address 'to'.*/ void synthesize_relcall (void *dest,void *from,void *to) { -__synthesize_relative_insn (dest, from, to,RELATIVECALL_OPCODE ); +__synthesize_relative_insn (dest, from, to,CALL_INSN_OPCODE ); }NOKPROBE_SYMBOL (synthesize_relcall);
@@ -301,7 +301,7 @@ static int can_probe(unsigned long paddr)* Another debugging subsystem might insert this breakpoint. * In that case, we can't recover it. */ -if (insn.opcode.bytes[0 ] ==BREAKPOINT_INSTRUCTION ) +if (insn.opcode.bytes[0 ] ==INT3_INSN_OPCODE )return 0 ; addr += insn.length; }
@@ -352,7 +352,7 @@ int __copy_instruction(u8 *dest, u8 *src, u8 *real, struct insn *insn)insn_get_length (insn);/* Another subsystem puts a breakpoint, failed to recover */ -if (insn->opcode.bytes[0 ] ==BREAKPOINT_INSTRUCTION ) +if (insn->opcode.bytes[0 ] ==INT3_INSN_OPCODE )return 0 ;/* We should not singlestep on the exception masking instructions */
@@ -396,14 +396,14 @@ static int prepare_boost(kprobe_opcode_t *buf, struct kprobe *p,int len = insn->length;if (can_boost (insn, p->addr) && -MAX_INSN_SIZE - len >=RELATIVEJUMP_SIZE ) { +MAX_INSN_SIZE - len >=JMP32_INSN_SIZE ) {/* * These instructions can be executed directly if it * jumps back to correct address. */ synthesize_reljump (buf + len, p->ainsn.insn + len, p->addr + insn->length); - len +=RELATIVEJUMP_SIZE ; + len +=JMP32_INSN_SIZE ; p->ainsn.boostable = true; }else { p->ainsn.boostable = false;
@@ -497,7 +497,7 @@ int arch_prepare_kprobe(struct kprobe *p)void arch_arm_kprobe (struct kprobe *p) { -text_poke (p->addr, ((unsigned char []){BREAKPOINT_INSTRUCTION }),1 ); +text_poke (p->addr, ((unsigned char []){INT3_INSN_OPCODE }),1 ); }void arch_disarm_kprobe (struct kprobe *p)
@@ -605,7 +605,7 @@ static void setup_singlestep(struct kprobe *p, struct pt_regs *regs, regs->flags |=X86_EFLAGS_TF ; regs->flags &= ~X86_EFLAGS_IF ;/* single step inline if the instruction is an int3 */ -if (p->opcode ==BREAKPOINT_INSTRUCTION ) +if (p->opcode ==INT3_INSN_OPCODE ) regs->ip = (unsigned long )p->addr;else regs->ip = (unsigned long )p->ainsn.insn;
@@ -691,7 +691,7 @@ int kprobe_int3_handler(struct pt_regs *regs)reset_current_kprobe ();return 1 ; } - }else if (*addr !=BREAKPOINT_INSTRUCTION ) { + }else if (*addr !=INT3_INSN_OPCODE ) {/* * The breakpoint instruction was removed right * after we hit it. Another cpu has removed
arch/x86/kernel/kprobes/opt.c +21 -23
131 lines not on this page · raw message
[tip: core/kprobes] x86/kprobes: Convert to text-patching.h
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: ab09e95ca0c697e67f986c4a45a179abf47e7bfc Gitweb: https://git.kernel.org/tip/ab09e95ca0c697e67f986c4a45a179abf47e7bfc Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 13:57:17 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/kprobes: Convert to text-patching.h
Convert kprobes to the new text-poke naming.
--- arch/x86/include/asm/kprobes.h | 14 +++------ arch/x86/include/asm/text-patching.h | 2 +- arch/x86/kernel/kprobes/core.c | 18 +++++------ arch/x86/kernel/kprobes/opt.c | 44 ++++++++++++--------------- 4 files changed, 37 insertions(+), 41 deletions(-)
arch/x86/include/asm/kprobes.h +5 -9
@@ -11,12 +11,11 @@#include <asm-generic/kprobes.h> -#define BREAKPOINT_INSTRUCTION 0xcc -#ifdef CONFIG_KPROBES #include <linux/types.h> #include <linux/ptrace.h> #include <linux/percpu.h> +#include <asm/text-patching.h> #include <asm/insn.h> #define __ARCH_WANT_KPROBES_INSN_SLOT
@@ -25,10 +24,7 @@ struct pt_regs;struct kprobe ;typedef u8 kprobe_opcode_t ; -#define RELATIVEJUMP_OPCODE 0xe9 -#define RELATIVEJUMP_SIZE 5 -#define RELATIVECALL_OPCODE 0xe8 -#define RELATIVE_ADDR_SIZE 4 +#define MAX_STACK_SIZE 64#define CUR_STACK_SIZE (ADDR ) \ (current_top_of_stack() - (unsigned long)(ADDR))
@@ -43,11 +39,11 @@ extern __visible kprobe_opcode_t optprobe_template_entry[]; extern __visible kprobe_opcode_t optprobe_template_val[]; extern __visible kprobe_opcode_t optprobe_template_call[]; extern __visible kprobe_opcode_t optprobe_template_end[]; -#define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) +#define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + DISP32_SIZE)#define MAX_OPTINSN_SIZE \ (((unsigned long)optprobe_template_end - \ (unsigned long)optprobe_template_entry) + \ - MAX_OPTIMIZED_LENGTH + RELATIVEJUMP_SIZE) + MAX_OPTIMIZED_LENGTH + JMP32_INSN_SIZE)extern const int kretprobe_blacklist_size;
@@ -73,7 +69,7 @@ struct arch_specific_insn {struct arch_optimized_insn {/* copy of the original instructions */ -kprobe_opcode_t copied_insn[RELATIVE_ADDR_SIZE ]; +kprobe_opcode_t copied_insn[DISP32_SIZE ];/* detour code buffer */ kprobe_opcode_t *insn;/* the size of instructions copied to detour code buffer */
arch/x86/include/asm/text-patching.h +2 -0
@@ -61,6 +61,8 @@ extern void text_poke_finish(void);#define JMP8_INSN_SIZE 2#define JMP8_INSN_OPCODE 0xEB +#define DISP32_SIZE 4 +static inline int text_opcode_size (u8 opcode) {int size =0 ;
arch/x86/kernel/kprobes/core.c +9 -9
@@ -119,14 +119,14 @@ __synthesize_relative_insn(void *dest, void *from, void *to, u8 op)/* Insert a jump instruction at address 'from', which jumps to address 'to'.*/ void synthesize_reljump (void *dest,void *from,void *to) { -__synthesize_relative_insn (dest, from, to,RELATIVEJUMP_OPCODE ); +__synthesize_relative_insn (dest, from, to,JMP32_INSN_OPCODE ); }NOKPROBE_SYMBOL (synthesize_reljump);/* Insert a call instruction at address 'from', which calls address 'to'.*/ void synthesize_relcall (void *dest,void *from,void *to) { -__synthesize_relative_insn (dest, from, to,RELATIVECALL_OPCODE ); +__synthesize_relative_insn (dest, from, to,CALL_INSN_OPCODE ); }NOKPROBE_SYMBOL (synthesize_relcall);
@@ -301,7 +301,7 @@ static int can_probe(unsigned long paddr)* Another debugging subsystem might insert this breakpoint. * In that case, we can't recover it. */ -if (insn.opcode.bytes[0 ] ==BREAKPOINT_INSTRUCTION ) +if (insn.opcode.bytes[0 ] ==INT3_INSN_OPCODE )return 0 ; addr += insn.length; }
@@ -356,7 +356,7 @@ int __copy_instruction(u8 *dest, u8 *src, u8 *real, struct insn *insn)return 0 ;/* Another subsystem puts a breakpoint, failed to recover */ -if (insn->opcode.bytes[0 ] ==BREAKPOINT_INSTRUCTION ) +if (insn->opcode.bytes[0 ] ==INT3_INSN_OPCODE )return 0 ;/* We should not singlestep on the exception masking instructions */
@@ -400,14 +400,14 @@ static int prepare_boost(kprobe_opcode_t *buf, struct kprobe *p,int len = insn->length;if (can_boost (insn, p->addr) && -MAX_INSN_SIZE - len >=RELATIVEJUMP_SIZE ) { +MAX_INSN_SIZE - len >=JMP32_INSN_SIZE ) {/* * These instructions can be executed directly if it * jumps back to correct address. */ synthesize_reljump (buf + len, p->ainsn.insn + len, p->addr + insn->length); - len +=RELATIVEJUMP_SIZE ; + len +=JMP32_INSN_SIZE ; p->ainsn.boostable = true; }else { p->ainsn.boostable = false;
@@ -501,7 +501,7 @@ int arch_prepare_kprobe(struct kprobe *p)void arch_arm_kprobe (struct kprobe *p) { -text_poke (p->addr, ((unsigned char []){BREAKPOINT_INSTRUCTION }),1 ); +text_poke (p->addr, ((unsigned char []){INT3_INSN_OPCODE }),1 ); }void arch_disarm_kprobe (struct kprobe *p)
@@ -609,7 +609,7 @@ static void setup_singlestep(struct kprobe *p, struct pt_regs *regs, regs->flags |=X86_EFLAGS_TF ; regs->flags &= ~X86_EFLAGS_IF ;/* single step inline if the instruction is an int3 */ -if (p->opcode ==BREAKPOINT_INSTRUCTION ) +if (p->opcode ==INT3_INSN_OPCODE ) regs->ip = (unsigned long )p->addr;else regs->ip = (unsigned long )p->ainsn.insn;
@@ -695,7 +695,7 @@ int kprobe_int3_handler(struct pt_regs *regs)reset_current_kprobe ();return 1 ; } - }else if (*addr !=BREAKPOINT_INSTRUCTION ) { + }else if (*addr !=INT3_INSN_OPCODE ) {/* * The breakpoint instruction was removed right * after we hit it. Another cpu has removed
arch/x86/kernel/kprobes/opt.c +21 -23
131 lines not on this page · raw message
Peter Zijlstra
maintainerPATCH 12/17 x86/kprobes: Fix ordering
In reply to Peter ZijlstraKprobes does something like:
register:
arch_arm_kprobe()
text_poke(INT3)
/* guarantees nothing, INT3 will become visible at some point, maybe */
kprobe_optimizer()
/* guarantees the bytes after INT3 are unused */
syncrhonize_rcu_tasks();
text_poke_bp(JMP32);
/* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe()
unoptimize_kprobe()
text_poke_bp(INT3 + tail);
/* implies IPI-sync, so tail is guaranteed visible */
arch_disarm_kprobe()
text_poke(old);
/* guarantees nothing, old will maybe become visible */
synchronize_rcu()
free-stuffNow the problem is that on register, the synchronize_rcu_tasks() does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practise this is exceedingly unlikely not to have happened) (similar to how MEMBARRIER_CMD_PRIVATE_EXPEDITED does not imply MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).
Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
Similar on unregister; the synchronize_rcu() between __unregister_kprobe_top() and __unregister_kprobe_bottom() does not guarantee all CPUs are free of the INT3 (and observe the old text).
Therefore, sprinkle some IPI-sync love around. This guarantees that all CPUs agree on the text and RCU once again provides the required guaranteed.
--- arch/x86/include/asm/text-patching.h | 1 + arch/x86/kernel/alternative.c | 11 ++++++++--- arch/x86/kernel/kprobes/core.c | 2 ++ arch/x86/kernel/kprobes/opt.c | 12 ++++-------- 4 files changed, 15 insertions(+), 11 deletions(-)
arch/x86/include/asm/text-patching.h +1 -0
@@ -42,6 +42,7 @@ extern void text_poke_early(void *addr,* an inconsistent instruction while you patch. */ 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 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 +8 -3
@@ -936,6 +936,11 @@ static void do_sync_core(void *info)sync_core (); } +void text_poke_sync (void ) +{ +on_each_cpu (do_sync_core,NULL ,1 ); +} +struct text_poke_loc {s32 rel_addr;/* addr := _stext + rel_addr */ s32 rel32;
@@ -1085,7 +1090,7 @@ static void text_poke_bp_batch(struct tefor (i =0 ; i < nr_entries; i++)text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3)); -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * Second step: update all but the first byte of the patched range.
@@ -1107,7 +1112,7 @@ static void text_poke_bp_batch(struct te* not necessary and we'd be safe even without it. But * better safe than sorry (plus there's not only Intel). */ -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync (); }/*
@@ -1123,7 +1128,7 @@ static void text_poke_bp_batch(struct te }if (do_sync) -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * sync_core() implies an smp_mb() and orders this store against
arch/x86/kernel/kprobes/core.c +2 -0
@@ -502,11 +502,13 @@ int arch_prepare_kprobe(struct kprobe *pvoid arch_arm_kprobe (struct kprobe *p) {text_poke (p->addr, ((unsigned char []){INT3_INSN_OPCODE }),1 ); +text_poke_sync (); }void arch_disarm_kprobe (struct kprobe *p) {text_poke (p->addr, &p->opcode,1 ); +text_poke_sync (); }void arch_remove_kprobe (struct kprobe *p)
arch/x86/kernel/kprobes/opt.c +4 -8
@@ -444,14 +444,10 @@ void arch_optimize_kprobes(struct list_h/* Replace a relative jump with a breakpoint (int3). */ void arch_unoptimize_kprobe (struct optimized_kprobe *op) { -u8 insn_buff[JMP32_INSN_SIZE ]; - -/* Set int3 to first byte for kprobes */ - insn_buff[0 ] =INT3_INSN_OPCODE ; -memcpy (insn_buff +1 , op->optinsn.copied_insn,DISP32_SIZE ); - -text_poke_bp (op->kp.addr, insn_buff,JMP32_INSN_SIZE , -text_gen_insn (JMP32_INSN_OPCODE , op->kp.addr, op->optinsn.insn)); +arch_arm_kprobe (&op->kp); +text_poke (op->kp.addr +INT3_INSN_SIZE , + op->optinsn.copied_insn,DISP32_SIZE ); +text_poke_sync (); }/*
Re: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 42 lines · Peter Zijlstra
Kprobes does something like:
register:
arch_arm_kprobe() text_poke(INT3) /* guarantees nothing, INT3 will become visible at some point, maybe */ kprobe_optimizer() /* guarantees the bytes after INT3 are unused */ syncrhonize_rcu_tasks(); text_poke_bp(JMP32); /* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe() unoptimize_kprobe() text_poke_bp(INT3 + tail); /* implies IPI-sync, so tail is guaranteed visible */ arch_disarm_kprobe() text_poke(old); /* guarantees nothing, old will maybe become visible */ synchronize_rcu() free-stuffNow the problem is that on register, the
synchronize_rcu_tasks()does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practise this is exceedingly unlikely not to have happened) (similar to howMEMBARRIER_CMD_PRIVATE_EXPEDITEDdoes not implyMEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
Similar on unregister; the
synchronize_rcu()between__unregister_kprobe_top()and__unregister_kprobe_bottom()does not guarantee all CPUs are free of the INT3 (and observe the old text).
Quoted 8 lines
Therefore, sprinkle some IPI-sync love around. This guarantees that all CPUs agree on the text and RCU once again provides the required guaranteed.
Signed-off-by Peter Zijlstra (Intel) <[email protected]>Acked-by Masami Hiramatsu <[email protected]>
With a phrase like "IPI-sync love" in the commit log... ;-)
Quoted 98 lines
--- arch/x86/include/asm/text-patching.h | 1 + arch/x86/kernel/alternative.c | 11 ++++++++--- arch/x86/kernel/kprobes/core.c | 2 ++ arch/x86/kernel/kprobes/opt.c | 12 ++++-------- 4 files changed, 15 insertions(+), 11 deletions(-)arch/x86/include/asm/text-patching.h +1
-0@@ -42,6 +42,7 @@ extern void text_poke_early(void *addr,* an inconsistent instruction while you patch. */ 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 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 +8
-3@@ -936,6 +936,11 @@ static void do_sync_core(void *info)sync_core (); } +void text_poke_sync (void ) +{ +on_each_cpu (do_sync_core,NULL ,1 ); +} +struct text_poke_loc {s32 rel_addr;/* addr := _stext + rel_addr */ s32 rel32;@@ -1085,7 +1090,7 @@ static void text_poke_bp_batch(struct tefor (i =0 ; i < nr_entries; i++)text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3)); -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * Second step: update all but the first byte of the patched range. @@ -1107,7 +1112,7 @@ static void text_poke_bp_batch(struct te* not necessary and we'd be safe even without it. But * better safe than sorry (plus there's not only Intel). */ -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync (); }/* @@ -1123,7 +1128,7 @@ static void text_poke_bp_batch(struct te }if (do_sync) -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * sync_core() implies an smp_mb() and orders this store against arch/x86/kernel/kprobes/core.c +2
-0@@ -502,11 +502,13 @@ int arch_prepare_kprobe(struct kprobe *pvoid arch_arm_kprobe (struct kprobe *p) {text_poke (p->addr, ((unsigned char []){INT3_INSN_OPCODE }),1 ); +text_poke_sync (); }void arch_disarm_kprobe (struct kprobe *p) {text_poke (p->addr, &p->opcode,1 ); +text_poke_sync (); }void arch_remove_kprobe (struct kprobe *p)arch/x86/kernel/kprobes/opt.c +4
-8@@ -444,14 +444,10 @@ void arch_optimize_kprobes(struct list_h/* Replace a relative jump with a breakpoint (int3). */ void arch_unoptimize_kprobe (struct optimized_kprobe *op) { -u8 insn_buff[JMP32_INSN_SIZE ]; - -/* Set int3 to first byte for kprobes */ - insn_buff[0 ] =INT3_INSN_OPCODE ; -memcpy (insn_buff +1 , op->optinsn.copied_insn,DISP32_SIZE ); - -text_poke_bp (op->kp.addr, insn_buff,JMP32_INSN_SIZE , -text_gen_insn (JMP32_INSN_OPCODE , op->kp.addr, op->optinsn.insn)); +arch_arm_kprobe (&op->kp); +text_poke (op->kp.addr +INT3_INSN_SIZE , + op->optinsn.copied_insn,DISP32_SIZE ); +text_poke_sync (); }/*
Mathieu Desnoyers
reviewerRe: [PATCH -v5 12/17] x86/kprobes: Fix ordering
In reply to Peter ZijlstraQuoted 10 lines · ----- On Nov 11, 2019, at 8:13 AM, Peter Zijlstra [email protected] wrote:
Kprobes does something like:
register:
arch_arm_kprobe() text_poke(INT3) /* guarantees nothing, INT3 will become visible at some point, maybe */ kprobe_optimizer() /* guarantees the bytes after INT3 are unused */ syncrhonize_rcu_tasks();
syncrhonize -> synchronize
Quoted 17 lines
text_poke_bp(JMP32); /* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe() unoptimize_kprobe() text_poke_bp(INT3 + tail); /* implies IPI-sync, so tail is guaranteed visible */ arch_disarm_kprobe() text_poke(old); /* guarantees nothing, old will maybe become visible */ synchronize_rcu() free-stuff
Quoted 3 lines
Now the problem is that on register, the
synchronize_rcu_tasks()does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practise this is exceedingly unlikely not to have
practise -> practice
Quoted 7 lines
happened) (similar to how
MEMBARRIER_CMD_PRIVATE_EXPEDITEDdoes not implyMEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
I'm not entirely convinced about this last statement though. AFAIU:
- Swapping between some instruction and INT3 is OK,
- Swapping back between that INT3 and _original_ instruction is OK,
- Anything else needs to have explicit core serialization.
So I understand the part about requiring the synchronize call to guarantee that nobody is then still using the instruction bytes following INT3, but not the rationale for the first synchronization. What operation would theoretically follow this first synchronize call ?
I understand that this patch modifies arch_{arm,disarm}_kprobe to add core serialization after inserting/removing the INT3 even in the case where no optimized kprobes are used, which is heavier than what is strictly required without optimized kprobes. I'm all fine for the added simplicity that comes with making this slow-path even slower, but it would be good to document this subtlety in the code.
Thanks,
Mathieu
Quoted 110 lines
Similar on unregister; the
synchronize_rcu()between__unregister_kprobe_top()and__unregister_kprobe_bottom()does not guarantee all CPUs are free of the INT3 (and observe the old text).Therefore, sprinkle some IPI-sync love around. This guarantees that all CPUs agree on the text and RCU once again provides the required guaranteed.
Signed-off-by Peter Zijlstra (Intel) <[email protected]>Acked-by Masami Hiramatsu <[email protected]>---
arch/x86/include/asm/text-patching.h | 1 + arch/x86/kernel/alternative.c | 11 ++++++++--- arch/x86/kernel/kprobes/core.c | 2 ++ arch/x86/kernel/kprobes/opt.c | 12 ++++-------- 4 files changed, 15 insertions(+), 11 deletions(-)arch/x86/include/asm/text-patching.h +1
-0@@ -42,6 +42,7 @@ extern void text_poke_early(void *addr,* an inconsistent instruction while you patch. */ 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 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 +8
-3@@ -936,6 +936,11 @@ static void do_sync_core(void *info)sync_core (); } +void text_poke_sync (void ) +{ +on_each_cpu (do_sync_core,NULL ,1 ); +} +struct text_poke_loc {s32 rel_addr;/* addr := _stext + rel_addr */ s32 rel32;@@ -1085,7 +1090,7 @@ static void text_poke_bp_batch(struct tefor (i =0 ; i < nr_entries; i++)text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3)); -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * Second step: update all but the first byte of the patched range. @@ -1107,7 +1112,7 @@ static void text_poke_bp_batch(struct te* not necessary and we'd be safe even without it. But * better safe than sorry (plus there's not only Intel). */ -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync (); }/* @@ -1123,7 +1128,7 @@ static void text_poke_bp_batch(struct te }if (do_sync) -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * sync_core() implies an smp_mb() and orders this store against arch/x86/kernel/kprobes/core.c +2
-0@@ -502,11 +502,13 @@ int arch_prepare_kprobe(struct kprobe *pvoid arch_arm_kprobe (struct kprobe *p) {text_poke (p->addr, ((unsigned char []){INT3_INSN_OPCODE }),1 ); +text_poke_sync (); }void arch_disarm_kprobe (struct kprobe *p) {text_poke (p->addr, &p->opcode,1 ); +text_poke_sync (); }void arch_remove_kprobe (struct kprobe *p)arch/x86/kernel/kprobes/opt.c +4
-8@@ -444,14 +444,10 @@ void arch_optimize_kprobes(struct list_h/* Replace a relative jump with a breakpoint (int3). */ void arch_unoptimize_kprobe (struct optimized_kprobe *op) { -u8 insn_buff[JMP32_INSN_SIZE ]; - -/* Set int3 to first byte for kprobes */ - insn_buff[0 ] =INT3_INSN_OPCODE ; -memcpy (insn_buff +1 , op->optinsn.copied_insn,DISP32_SIZE ); - -text_poke_bp (op->kp.addr, insn_buff,JMP32_INSN_SIZE , -text_gen_insn (JMP32_INSN_OPCODE , op->kp.addr, op->optinsn.insn)); +arch_arm_kprobe (&op->kp); +text_poke (op->kp.addr +INT3_INSN_SIZE , + op->optinsn.copied_insn,DISP32_SIZE ); +text_poke_sync (); }/*
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
Peter Zijlstra
maintainerRe: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 9 lines · Mathieu Desnoyers
Quoted 7 lines · ----- On Nov 11, 2019, at 8:13 AM, Peter Zijlstra [email protected] wrote:
Kprobes does something like:
register:
arch_arm_kprobe() text_poke(INT3) /* guarantees nothing, INT3 will become visible at some point, maybe */
Quoted 5 lines
Quoted 3 lines
kprobe_optimizer() /* guarantees the bytes after INT3 are unused */ syncrhonize_rcu_tasks();syncrhonize -> synchronize
Fixed.
Quoted 15 lines
Quoted 15 lines
text_poke_bp(JMP32); /* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe() unoptimize_kprobe() text_poke_bp(INT3 + tail); /* implies IPI-sync, so tail is guaranteed visible */ arch_disarm_kprobe() text_poke(old); /* guarantees nothing, old will maybe become visible */ synchronize_rcu()
Quoted 7 lines
Quoted 5 lines
free-stuff
Now the problem is that on register, the
synchronize_rcu_tasks()does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practise this is exceedingly unlikely not to havepractise -> practice
And fixed.
Quoted 8 lines
Quoted 7 lines
happened) (similar to how
MEMBARRIER_CMD_PRIVATE_EXPEDITEDdoes not implyMEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
Quoted 5 lines
I'm not entirely convinced about this last statement though. AFAIU:
- Swapping between some instruction and INT3 is OK,
- Swapping back between that INT3 and _original_ instruction is OK,
- Anything else needs to have explicit core serialization.
So far, agreed.
Quoted 4 lines
So I understand the part about requiring the synchronize call to guarantee that nobody is then still using the instruction bytes following INT3, but not the rationale for the first synchronization. What operation would theoretically follow this first synchronize call ?
I'm not completely sure what you're asking, so I'm going to explain too much and hope I answered your question along the way. If not, please be a little more specific.
First:
So what can happen with optimized kprobes is that the original instruction is <5 bytes and we want to write a JMP.d32 (5 bytes). Something like:
83e: 48 89 e5 mov %rsp,%rbp 841: 48 85 c0 test %rax,%rax
And we put a kprobe on the MOV. Then we poke INT3 at 0x83e and IPI-sync. At that point the kprobe is active:
83e: cc 89 e5 int3 ; 2 byte garbage 841: 48 85 c0 test %rax,%rax
Now we want to optimize that thing. But imagine a task being preempted at 0x841. If we poke in the JMP.d32 the above turns into gibberish
83e: e9 12 34 56 78 jmp +0x12345678
Then our task resumes, loads the instruction at 0x841, which then reads:
841: 56 78 c0
And goes *bang*.
So what we do, after enabling the regular kprobe, is call synchronize_rcu_tasks() to wait for each task to have passed through schedule(). That guarantees no task is preempted inside the kprobe shadow (when it triggers it ensures it resumes execution at an instruction boundary further than 5 bytes away).
Second:
The argument I was making was that if we didn't IPI-sync, and if synchronize_rcu_tasks() would imply the IPI-sync, we would still need two invocations of it to achieve the desired result. Because only after the implied IPI-sync must we guarantee no tasks is still inside the kprobe 'shadow'.
Did that answer your question?
Quoted 4 lines
I understand that this patch modifies arch_{arm,disarm}_kprobe to add core serialization after inserting/removing the INT3 even in the case where no optimized kprobes are used, which is heavier than what is strictly required without optimized kprobes.
I disagree, it is required even for normal kprobes, namely:
Without this additional sync it is uncertain when the kprobe would've taken effect (if ever).
Suppose a CPU is stuck in a tight loop around the probed instruction, then it would never have to re-fetch the changed text and thus never trigger.
Re: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 86 lines · ----- On Nov 14, 2019, at 8:53 AM, Peter Zijlstra [email protected] wrote:
Quoted 9 lines · Mathieu Desnoyers
Quoted 7 lines · ----- On Nov 11, 2019, at 8:13 AM, Peter Zijlstra [email protected] wrote:
Kprobes does something like:
register:
arch_arm_kprobe() text_poke(INT3) /* guarantees nothing, INT3 will become visible at some point, maybe */Quoted 5 lines
Quoted 3 lines
kprobe_optimizer() /* guarantees the bytes after INT3 are unused */ syncrhonize_rcu_tasks();syncrhonize -> synchronize
Fixed.
Quoted 15 lines
Quoted 15 lines
text_poke_bp(JMP32); /* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe() unoptimize_kprobe() text_poke_bp(INT3 + tail); /* implies IPI-sync, so tail is guaranteed visible */ arch_disarm_kprobe() text_poke(old); /* guarantees nothing, old will maybe become visible */ synchronize_rcu()Quoted 7 lines
Quoted 5 lines
free-stuff
Now the problem is that on register, the
synchronize_rcu_tasks()does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practise this is exceedingly unlikely not to havepractise -> practice
And fixed.
Quoted 8 lines
Quoted 7 lines
happened) (similar to how
MEMBARRIER_CMD_PRIVATE_EXPEDITEDdoes not implyMEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
Quoted 5 lines
I'm not entirely convinced about this last statement though. AFAIU:
- Swapping between some instruction and INT3 is OK,
- Swapping back between that INT3 and _original_ instruction is OK,
- Anything else needs to have explicit core serialization.So far, agreed.
Quoted 4 lines
So I understand the part about requiring the synchronize call to guarantee that nobody is then still using the instruction bytes following INT3, but not the rationale for the first synchronization. What operation would theoretically follow this first synchronize call ?
I'm not completely sure what you're asking, so I'm going to explain too much and hope I answered your question along the way. If not, please be a little more specific.
First:
So what can happen with optimized kprobes is that the original instruction is <5 bytes and we want to write a JMP.d32 (5 bytes). Something like:
83e: 48 89 e5 mov %rsp,%rbp 841: 48 85 c0 test %rax,%raxAnd we put a kprobe on the MOV. Then we poke INT3 at
0x83eand IPI-sync. At that point the kprobe is active:83e: cc 89 e5 int3 ; 2 byte garbage 841: 48 85 c0 test %rax,%raxNow we want to optimize that thing. But imagine a task being preempted at
0x841. If we poke in the JMP.d32 the above turns into gibberish
Quoted 7 lines
83e: e9 12 34 56 78 jmp +0x12345678Then our task resumes, loads the instruction at
0x841, which then reads:841: 56 78 c0And goes *bang*.
Thanks for the reminder. I somehow forgot that optimized kprobes covered instructions smaller than 5 bytes.
Quoted 6 lines
So what we do, after enabling the regular kprobe, is call
synchronize_rcu_tasks()to wait for each task to have passed throughschedule(). That guarantees no task is preempted inside the kprobe shadow (when it triggers it ensures it resumes execution at an instruction boundary further than 5 bytes away).
Indeed, given that synchronize_rcu_tasks() awaits for voluntary context switches (or user-space execution), it guarantees that no task was preempted within the kprobe shadow.
Considering that synchronize_rcu_tasks() is meant only for code rewriting, I wonder if it would make sense to include the core serializing guarantees within this RCU API ?
Quoted 4 lines
Second:
Quoted 8 lines
The argument I was making was that if we didn't IPI-sync, and if
synchronize_rcu_tasks()would imply the IPI-sync, we would still need two invocations of it to achieve the desired result. Because only after the implied IPI-sync must we guarantee no tasks is still inside the kprobe 'shadow'.Did that answer your question?
Yes.
Which makes me wonder if we should include the IPI-sync guarantees within synchronize_rcu_tasks(), _and_ issue the additional IPI-sync when a full synchronize_rcu_tasks() is not required. But this is a minor nit, I'm fine with the approach you propose.
Quoted 6 lines
Quoted 5 lines
I understand that this patch modifies arch_{arm,disarm}_kprobe to add core serialization after inserting/removing the INT3 even in the case where no optimized kprobes are used, which is heavier than what is strictly required without optimized kprobes.
Quoted 8 lines
I disagree, it is required even for normal kprobes, namely:
Without this additional sync it is uncertain when the kprobe would've taken effect (if ever).
Suppose a CPU is stuck in a tight loop around the probed instruction, then it would never have to re-fetch the changed text and thus never trigger.
If the instruction cache state is not presumed to be "eventually consistent", then this explicit core serialization is indeed required.
Please consider my comments about as food for thoughts, I'm fine with your proposed patch:
Thanks!
Mathieu
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
Re: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 106 lines · Mathieu Desnoyers
Quoted 86 lines · ----- On Nov 14, 2019, at 8:53 AM, Peter Zijlstra [email protected] wrote:
Quoted 9 lines · Mathieu Desnoyers
Quoted 7 lines · ----- On Nov 11, 2019, at 8:13 AM, Peter Zijlstra [email protected] wrote:
Kprobes does something like:
register:
arch_arm_kprobe() text_poke(INT3) /* guarantees nothing, INT3 will become visible at some point, maybe */Quoted 5 lines
Quoted 3 lines
kprobe_optimizer() /* guarantees the bytes after INT3 are unused */ syncrhonize_rcu_tasks();syncrhonize -> synchronize
Fixed.
Quoted 15 lines
Quoted 15 lines
text_poke_bp(JMP32); /* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe() unoptimize_kprobe() text_poke_bp(INT3 + tail); /* implies IPI-sync, so tail is guaranteed visible */ arch_disarm_kprobe() text_poke(old); /* guarantees nothing, old will maybe become visible */ synchronize_rcu()Quoted 7 lines
Quoted 5 lines
free-stuff
Now the problem is that on register, the
synchronize_rcu_tasks()does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practise this is exceedingly unlikely not to havepractise -> practice
And fixed.
Quoted 8 lines
Quoted 7 lines
happened) (similar to how
MEMBARRIER_CMD_PRIVATE_EXPEDITEDdoes not implyMEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
Quoted 5 lines
I'm not entirely convinced about this last statement though. AFAIU:
- Swapping between some instruction and INT3 is OK,
- Swapping back between that INT3 and _original_ instruction is OK,
- Anything else needs to have explicit core serialization.So far, agreed.
Quoted 4 lines
So I understand the part about requiring the synchronize call to guarantee that nobody is then still using the instruction bytes following INT3, but not the rationale for the first synchronization. What operation would theoretically follow this first synchronize call ?
I'm not completely sure what you're asking, so I'm going to explain too much and hope I answered your question along the way. If not, please be a little more specific.
First:
So what can happen with optimized kprobes is that the original instruction is <5 bytes and we want to write a JMP.d32 (5 bytes). Something like:
83e: 48 89 e5 mov %rsp,%rbp 841: 48 85 c0 test %rax,%raxAnd we put a kprobe on the MOV. Then we poke INT3 at
0x83eand IPI-sync. At that point the kprobe is active:83e: cc 89 e5 int3 ; 2 byte garbage 841: 48 85 c0 test %rax,%raxNow we want to optimize that thing. But imagine a task being preempted at
0x841. If we poke in the JMP.d32 the above turns into gibberishQuoted 7 lines
83e: e9 12 34 56 78 jmp +0x12345678Then our task resumes, loads the instruction at
0x841, which then reads:841: 56 78 c0And goes *bang*.
Thanks for the reminder. I somehow forgot that optimized kprobes covered instructions smaller than 5 bytes.
Quoted 6 lines
So what we do, after enabling the regular kprobe, is call
synchronize_rcu_tasks()to wait for each task to have passed throughschedule(). That guarantees no task is preempted inside the kprobe shadow (when it triggers it ensures it resumes execution at an instruction boundary further than 5 bytes away).
Quoted 7 lines
Indeed, given that
synchronize_rcu_tasks()awaits for voluntary context switches (or user-space execution), it guarantees that no task was preempted within the kprobe shadow.Considering that
synchronize_rcu_tasks()is meant only for code rewriting, I wonder if it would make sense to include the core serializing guarantees within this RCU API ?
As in have synchronize_rcu_tasks() do the IPI-sync love before doing the current wait-for-voluntary-context-switch work? I don't know of any objection to that approach. Certainly there is no possible argument based on latency. ;-)
Thanx, Paul
Mathieu Desnoyers
reviewerRe: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 111 lines · ----- On Nov 14, 2019, at 10:13 AM, paulmck [email protected] wrote:
Quoted 110 lines · Mathieu Desnoyers
Quoted 86 lines · ----- On Nov 14, 2019, at 8:53 AM, Peter Zijlstra [email protected] wrote:
Quoted 9 lines · Mathieu Desnoyers
Quoted 7 lines · ----- On Nov 11, 2019, at 8:13 AM, Peter Zijlstra [email protected] wrote:
Kprobes does something like:
register:
arch_arm_kprobe() text_poke(INT3) /* guarantees nothing, INT3 will become visible at some point, maybe */Quoted 5 lines
Quoted 3 lines
kprobe_optimizer() /* guarantees the bytes after INT3 are unused */ syncrhonize_rcu_tasks();syncrhonize -> synchronize
Fixed.
Quoted 15 lines
Quoted 15 lines
text_poke_bp(JMP32); /* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe() unoptimize_kprobe() text_poke_bp(INT3 + tail); /* implies IPI-sync, so tail is guaranteed visible */ arch_disarm_kprobe() text_poke(old); /* guarantees nothing, old will maybe become visible */ synchronize_rcu()Quoted 7 lines
Quoted 5 lines
free-stuff
Now the problem is that on register, the
synchronize_rcu_tasks()does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practise this is exceedingly unlikely not to havepractise -> practice
And fixed.
Quoted 8 lines
Quoted 7 lines
happened) (similar to how
MEMBARRIER_CMD_PRIVATE_EXPEDITEDdoes not implyMEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
Quoted 5 lines
I'm not entirely convinced about this last statement though. AFAIU:
- Swapping between some instruction and INT3 is OK,
- Swapping back between that INT3 and _original_ instruction is OK,
- Anything else needs to have explicit core serialization.So far, agreed.
Quoted 4 lines
So I understand the part about requiring the synchronize call to guarantee that nobody is then still using the instruction bytes following INT3, but not the rationale for the first synchronization. What operation would theoretically follow this first synchronize call ?
I'm not completely sure what you're asking, so I'm going to explain too much and hope I answered your question along the way. If not, please be a little more specific.
First:
So what can happen with optimized kprobes is that the original instruction is <5 bytes and we want to write a JMP.d32 (5 bytes). Something like:
83e: 48 89 e5 mov %rsp,%rbp 841: 48 85 c0 test %rax,%raxAnd we put a kprobe on the MOV. Then we poke INT3 at
0x83eand IPI-sync. At that point the kprobe is active:83e: cc 89 e5 int3 ; 2 byte garbage 841: 48 85 c0 test %rax,%raxNow we want to optimize that thing. But imagine a task being preempted at
0x841. If we poke in the JMP.d32 the above turns into gibberishQuoted 7 lines
83e: e9 12 34 56 78 jmp +0x12345678Then our task resumes, loads the instruction at
0x841, which then reads:841: 56 78 c0And goes *bang*.
Thanks for the reminder. I somehow forgot that optimized kprobes covered instructions smaller than 5 bytes.
Quoted 6 lines
So what we do, after enabling the regular kprobe, is call
synchronize_rcu_tasks()to wait for each task to have passed throughschedule(). That guarantees no task is preempted inside the kprobe shadow (when it triggers it ensures it resumes execution at an instruction boundary further than 5 bytes away).Indeed, given that
synchronize_rcu_tasks()awaits for voluntary context switches (or user-space execution), it guarantees that no task was preempted within the kprobe shadow.
Quoted 6 lines
Quoted 3 lines
Considering that
synchronize_rcu_tasks()is meant only for code rewriting, I wonder if it would make sense to include the core serializing guarantees within this RCU API ?As in have
synchronize_rcu_tasks()do the IPI-sync love before doing the current wait-for-voluntary-context-switch work?
This is what I have in mind, yes, based on the assumption that the only intended use-case for synchronize_rcu_tasks() is code patching.
Quoted 3 lines
I don't know of
any objection to that approach. Certainly there is no possible argument based on latency. ;-)
Indeed! :)
Thanks,
Mathieu
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
Peter Zijlstra
maintainerRe: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 14 lines · Mathieu Desnoyers
Quoted 14 lines
Quoted 13 lines
Quoted 5 lines
So what we do, after enabling the regular kprobe, is call
synchronize_rcu_tasks()to wait for each task to have passed throughschedule(). That guarantees no task is preempted inside the kprobe shadow (when it triggers it ensures it resumes execution at an instruction boundary further than 5 bytes away).Indeed, given that
synchronize_rcu_tasks()awaits for voluntary context switches (or user-space execution), it guarantees that no task was preempted within the kprobe shadow.Considering that
synchronize_rcu_tasks()is meant only for code rewriting, I wonder if it would make sense to include the core serializing guarantees within this RCU API ?
Quoted 5 lines
Quoted 2 lines
As in have
synchronize_rcu_tasks()do the IPI-sync love before doing the current wait-for-voluntary-context-switch work?This is what I have in mind, yes, based on the assumption that the only intended use-case for
synchronize_rcu_tasks()is code patching.
I don't think that is needed. As per the patch under discussion, we unconditionally need that IPI-sync (even for !optimized) but we only need the synchonize_rcu_tasks() thing for optimized kprobes.
Also, they really do two different things. Lets not tie them together.
Mathieu Desnoyers
reviewerRe: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 19 lines · ----- On Nov 14, 2019, at 10:28 AM, Peter Zijlstra [email protected] wrote:
Quoted 17 lines · Mathieu Desnoyers
Quoted 16 lines
Quoted 6 lines
Quoted 5 lines
So what we do, after enabling the regular kprobe, is call
synchronize_rcu_tasks()to wait for each task to have passed throughschedule(). That guarantees no task is preempted inside the kprobe shadow (when it triggers it ensures it resumes execution at an instruction boundary further than 5 bytes away).Quoted 7 lines
Indeed, given that
synchronize_rcu_tasks()awaits for voluntary context switches (or user-space execution), it guarantees that no task was preempted within the kprobe shadow.Considering that
synchronize_rcu_tasks()is meant only for code rewriting, I wonder if it would make sense to include the core serializing guarantees within this RCU API ?As in have
synchronize_rcu_tasks()do the IPI-sync love before doing the current wait-for-voluntary-context-switch work?
Quoted 8 lines
Quoted 2 lines
This is what I have in mind, yes, based on the assumption that the only intended use-case for
synchronize_rcu_tasks()is code patching.I don't think that is needed. As per the patch under discussion, we unconditionally need that IPI-sync (even for !optimized) but we only need the
synchonize_rcu_tasks()thing for optimized kprobes.Also, they really do two different things. Lets not tie them together.
I'm fine with this approach, I just thought it would be good to consider the alternative.
Thanks!
Mathieu
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
Peter Zijlstra
maintainerRe: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 10 lines · Mathieu Desnoyers
Quoted 5 lines · ----- On Nov 14, 2019, at 10:28 AM, Peter Zijlstra [email protected] wrote:
I don't think that is needed. As per the patch under discussion, we unconditionally need that IPI-sync (even for !optimized) but we only need the
synchonize_rcu_tasks()thing for optimized kprobes.Also, they really do two different things. Lets not tie them together.
I'm fine with this approach, I just thought it would be good to consider the alternative.
Fair enough; I also just remembered we use synchronize_rcu_tasks() in scenarios where we don't need to IPI-sync, for instrance when freeing ftrace trampolines. There we just want to make sure nothing is still preempted inside the trampoline when we free it -- which would be BAD :-)
Peter Zijlstra
maintainerRe: [PATCH -v5 12/17] x86/kprobes: Fix ordering
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Mathieu Desnoyers
Quoted 5 lines · ----- On Nov 14, 2019, at 10:28 AM, Peter Zijlstra [email protected] wrote:
I don't think that is needed. As per the patch under discussion, we unconditionally need that IPI-sync (even for !optimized) but we only need the
synchonize_rcu_tasks()thing for optimized kprobes.Also, they really do two different things. Lets not tie them together.
Quoted 8 lines
Quoted 2 lines
I'm fine with this approach, I just thought it would be good to consider the alternative.
Fair enough; I also just remembered we use
synchronize_rcu_tasks()in scenarios where we don't need to IPI-sync, for instrance when freeing ftrace trampolines. There we just want to make sure nothing is still preempted inside the trampoline when we free it -- which would be BAD :-)
One more thing. I have a TODO item for making text_poke_sync() more complicated.
Specifically we don't have to IPI CPUs that are in NOHZ_FULL userspace context, provided we can make the kernel entry perform the core-serialize thing.
It's not far up the TODO list though, but I figure I'd mention it just in case other people fancy having a go.
[tip: core/kprobes] x86/kprobes: Fix ordering while text-patching
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 5b8ad1c9bc4466c3c16ffde3ba0edac523e34652 Gitweb: https://git.kernel.org/tip/5b8ad1c9bc4466c3c16ffde3ba0edac523e34652 Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 21:15:28 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 19 Nov 2019 13:13:05 +01:00
x86/kprobes: Fix ordering while text-patching
Kprobes does something like:
register:
arch_arm_kprobe()
text_poke(INT3)
/* guarantees nothing, INT3 will become visible at some point, maybe */
kprobe_optimizer()
/* guarantees the bytes after INT3 are unused */
synchronize_rcu_tasks();
text_poke_bp(JMP32);
/* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe()
unoptimize_kprobe()
text_poke_bp(INT3 + tail);
/* implies IPI-sync, so tail is guaranteed visible */
arch_disarm_kprobe()
text_poke(old);
/* guarantees nothing, old will maybe become visible */
synchronize_rcu()
free-stuffNow the problem is that on register, the synchronize_rcu_tasks() does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practice this is exceedingly unlikely not to have happened) (similar to how MEMBARRIER_CMD_PRIVATE_EXPEDITED does not imply MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).
Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
Similar on unregister; the synchronize_rcu() between __unregister_kprobe_top() and __unregister_kprobe_bottom() does not guarantee all CPUs are free of the INT3 (and observe the old text).
Therefore, sprinkle some IPI-sync love around. This guarantees that all CPUs agree on the text and RCU once again provides the required guaranteed.
--- arch/x86/include/asm/text-patching.h | 1 + arch/x86/kernel/alternative.c | 11 ++++++++--- arch/x86/kernel/kprobes/core.c | 2 ++ arch/x86/kernel/kprobes/opt.c | 12 ++++-------- 4 files changed, 15 insertions(+), 11 deletions(-)
arch/x86/include/asm/text-patching.h +1 -0
@@ -42,6 +42,7 @@ extern void text_poke_early(void *addr, const void *opcode, size_t len);* an inconsistent instruction while you patch. */ 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 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 +8 -3
@@ -936,6 +936,11 @@ static void do_sync_core(void *info)sync_core (); } +void text_poke_sync (void ) +{ +on_each_cpu (do_sync_core,NULL ,1 ); +} +struct text_poke_loc {s32 rel_addr;/* addr := _stext + rel_addr */ s32 rel32;
@@ -1085,7 +1090,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesfor (i =0 ; i < nr_entries; i++)text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3)); -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * Second step: update all but the first byte of the patched range.
@@ -1107,7 +1112,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries* not necessary and we'd be safe even without it. But * better safe than sorry (plus there's not only Intel). */ -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync (); }/*
@@ -1123,7 +1128,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries }if (do_sync) -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * sync_core() implies an smp_mb() and orders this store against
arch/x86/kernel/kprobes/core.c +2 -0
@@ -498,11 +498,13 @@ int arch_prepare_kprobe(struct kprobe *p)void arch_arm_kprobe (struct kprobe *p) {text_poke (p->addr, ((unsigned char []){INT3_INSN_OPCODE }),1 ); +text_poke_sync (); }void arch_disarm_kprobe (struct kprobe *p) {text_poke (p->addr, &p->opcode,1 ); +text_poke_sync (); }void arch_remove_kprobe (struct kprobe *p)
arch/x86/kernel/kprobes/opt.c +4 -8
@@ -444,14 +444,10 @@ void arch_optimize_kprobes(struct list_head *oplist)/* Replace a relative jump with a breakpoint (int3). */ void arch_unoptimize_kprobe (struct optimized_kprobe *op) { -u8 insn_buff[JMP32_INSN_SIZE ]; - -/* Set int3 to first byte for kprobes */ - insn_buff[0 ] =INT3_INSN_OPCODE ; -memcpy (insn_buff +1 , op->optinsn.copied_insn,DISP32_SIZE ); - -text_poke_bp (op->kp.addr, insn_buff,JMP32_INSN_SIZE , -text_gen_insn (JMP32_INSN_OPCODE , op->kp.addr, op->optinsn.insn)); +arch_arm_kprobe (&op->kp); +text_poke (op->kp.addr +INT3_INSN_SIZE , + op->optinsn.copied_insn,DISP32_SIZE ); +text_poke_sync (); }/*
[tip: core/kprobes] x86/kprobes: Fix ordering while text-patching
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 5c02ece81848db29b411139cc923d66050a6a40c Gitweb: https://git.kernel.org/tip/5c02ece81848db29b411139cc923d66050a6a40c Author: Peter Zijlstra <[email protected]> AuthorDate: Wed, 09 Oct 2019 21:15:28 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/kprobes: Fix ordering while text-patching
Kprobes does something like:
register:
arch_arm_kprobe()
text_poke(INT3)
/* guarantees nothing, INT3 will become visible at some point, maybe */
kprobe_optimizer()
/* guarantees the bytes after INT3 are unused */
synchronize_rcu_tasks();
text_poke_bp(JMP32);
/* implies IPI-sync, kprobe really is enabled */unregister:
__disarm_kprobe()
unoptimize_kprobe()
text_poke_bp(INT3 + tail);
/* implies IPI-sync, so tail is guaranteed visible */
arch_disarm_kprobe()
text_poke(old);
/* guarantees nothing, old will maybe become visible */
synchronize_rcu()
free-stuffNow the problem is that on register, the synchronize_rcu_tasks() does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practice this is exceedingly unlikely not to have happened) (similar to how MEMBARRIER_CMD_PRIVATE_EXPEDITED does not imply MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE).
Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3.
Similar on unregister; the synchronize_rcu() between __unregister_kprobe_top() and __unregister_kprobe_bottom() does not guarantee all CPUs are free of the INT3 (and observe the old text).
Therefore, sprinkle some IPI-sync love around. This guarantees that all CPUs agree on the text and RCU once again provides the required guaranteed.
--- arch/x86/include/asm/text-patching.h | 1 + arch/x86/kernel/alternative.c | 11 ++++++++--- arch/x86/kernel/kprobes/core.c | 2 ++ arch/x86/kernel/kprobes/opt.c | 12 ++++-------- 4 files changed, 15 insertions(+), 11 deletions(-)
arch/x86/include/asm/text-patching.h +1 -0
@@ -42,6 +42,7 @@ extern void text_poke_early(void *addr, const void *opcode, size_t len);* an inconsistent instruction while you patch. */ 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 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 +8 -3
@@ -936,6 +936,11 @@ static void do_sync_core(void *info)sync_core (); } +void text_poke_sync (void ) +{ +on_each_cpu (do_sync_core,NULL ,1 ); +} +struct text_poke_loc {s32 rel_addr;/* addr := _stext + rel_addr */ s32 rel32;
@@ -1085,7 +1090,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesfor (i =0 ; i < nr_entries; i++)text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3)); -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * Second step: update all but the first byte of the patched range.
@@ -1107,7 +1112,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries* not necessary and we'd be safe even without it. But * better safe than sorry (plus there's not only Intel). */ -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync (); }/*
@@ -1123,7 +1128,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries }if (do_sync) -on_each_cpu (do_sync_core,NULL ,1 ); +text_poke_sync ();/* * sync_core() implies an smp_mb() and orders this store against
arch/x86/kernel/kprobes/core.c +2 -0
@@ -502,11 +502,13 @@ int arch_prepare_kprobe(struct kprobe *p)void arch_arm_kprobe (struct kprobe *p) {text_poke (p->addr, ((unsigned char []){INT3_INSN_OPCODE }),1 ); +text_poke_sync (); }void arch_disarm_kprobe (struct kprobe *p) {text_poke (p->addr, &p->opcode,1 ); +text_poke_sync (); }void arch_remove_kprobe (struct kprobe *p)
arch/x86/kernel/kprobes/opt.c +4 -8
@@ -444,14 +444,10 @@ void arch_optimize_kprobes(struct list_head *oplist)/* Replace a relative jump with a breakpoint (int3). */ void arch_unoptimize_kprobe (struct optimized_kprobe *op) { -u8 insn_buff[JMP32_INSN_SIZE ]; - -/* Set int3 to first byte for kprobes */ - insn_buff[0 ] =INT3_INSN_OPCODE ; -memcpy (insn_buff +1 , op->optinsn.copied_insn,DISP32_SIZE ); - -text_poke_bp (op->kp.addr, insn_buff,JMP32_INSN_SIZE , -text_gen_insn (JMP32_INSN_OPCODE , op->kp.addr, op->optinsn.insn)); +arch_arm_kprobe (&op->kp); +text_poke (op->kp.addr +INT3_INSN_SIZE , + op->optinsn.copied_insn,DISP32_SIZE ); +text_poke_sync (); }/*
Peter Zijlstra
maintainerPATCH 13/17 arm/ftrace: Use __patch_text_real()
In reply to Peter ZijlstraInstead of flipping text protection, use the patch_text infrastructure that uses a fixmap alias where required.
This removes the last user of set_all_modules_text_*().
--- arch/arm/kernel/ftrace.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm/kernel/ftrace.c +8 -8
@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */
@@ -31,13 +32,15 @@#ifdef CONFIG_DYNAMIC_FTRACE +static int patch_text_remap =0 ; +static int __ftrace_modify_code (void *data) {int *command = data; -set_kernel_text_rw (); + patch_text_remap++;ftrace_modify_all_code (*command); -set_kernel_text_ro (); + patch_text_remap--;return 0 ; }
@@ -59,13 +62,13 @@ static unsigned long adjust_address(struint ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw (); + patch_text_remap++;return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro (); + patch_text_remap--;/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;
@@ -97,10 +100,7 @@ static int ftrace_modify_code(unsigned lreturn -EINVAL ; } -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text_real ((void *)pc, new, patch_text_remap);return 0 ; }
Re: [PATCH -v5 13/17] arm/ftrace: Use __patch_text_real()
Quoted 60 lines · Peter Zijlstra
Instead of flipping text protection, use the
patch_textinfrastructure that uses a fixmap alias where required.This removes the last user of set_all_modules_text_*().
Signed-off-by Peter Zijlstra (Intel) <[email protected]>Cc Mark Rutland <[email protected]>Cc Will Deacon <[email protected]>--- arch/arm/kernel/ftrace.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)arch/arm/kernel/ftrace.c +7
-4@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */ @@ -31,13 +32,15 @@#ifdef CONFIG_DYNAMIC_FTRACE +static int patch_text_remap =0 ; +static int __ftrace_modify_code (void *data) {int *command = data; -set_kernel_text_rw (); + patch_text_remap++;ftrace_modify_all_code (*command); -set_kernel_text_ro (); + patch_text_remap--;return 0 ; }@@ -59,13 +62,13 @@ static unsigned long adjust_address(struint ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw (); + patch_text_remap++;return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro (); + patch_text_remap--;/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;
arch/arm/kernel/ftrace.c static int ftrace_modify_code(unsigned l · line 103
Quoted 8 lines
arch/arm/kernel/ftrace.c +1
-4@@ -97,10 +100,7 @@ static int ftrace_modify_code(unsigned lreturn -EINVAL ; } -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text_real ((void *)pc, new, patch_text_remap);
I'd still prefer to pass 'true' unconditionally here, since I don't think this is a hot path.
Will
Peter Zijlstra
maintainerRe: [PATCH -v5 13/17] arm/ftrace: Use __patch_text_real()
Quoted 2 lines · Will Deacon
I'd still prefer to pass 'true' unconditionally here, since I don't think this is a hot path.
If you can give me a Tested-by, I'll replace it with the below... :-)
arch/arm/kernel/ftrace.c +2 -8
@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */
@@ -35,9 +36,7 @@ static int __ftrace_modify_code(void *da {int *command = data; -set_kernel_text_rw ();ftrace_modify_all_code (*command); -set_kernel_text_ro ();return 0 ; }
@@ -59,13 +58,11 @@ static unsigned long adjust_address(struint ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw ();return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro ();/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;
@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned lreturn -EINVAL ; } -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text_real ((void *)pc, new, true);return 0 ; }
Peter Zijlstra
maintainerRe: [PATCH -v5 13/17] arm/ftrace: Use __patch_text_real()
Quoted 37 lines · Peter Zijlstra
If you can give me a Tested-by, I'll replace it with the below... :-)
arch/arm/kernel/ftrace.c +1
-4@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */ @@ -35,9 +36,7 @@ static int __ftrace_modify_code(void *da {int *command = data; -set_kernel_text_rw ();ftrace_modify_all_code (*command); -set_kernel_text_ro ();return 0 ; }@@ -59,13 +58,11 @@ static unsigned long adjust_address(struint ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw ();return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro ();/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;
arch/arm/kernel/ftrace.c static int ftrace_modify_code(unsigned l · line 97
Quoted 8 lines
arch/arm/kernel/ftrace.c +1
-4@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned lreturn -EINVAL ; } -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text_real ((void *)pc, new, true);
I'll even make that: __patch_text((void *)pc, new);
Quoted 3 lines
arch/arm/kernel/ftrace.c +0
-0return 0 ; }
Will Deacon
Tested-byRe: [PATCH -v5 13/17] arm/ftrace: Use __patch_text_real()
Quoted 42 lines · Peter Zijlstra
Quoted 40 lines · Peter Zijlstra
If you can give me a Tested-by, I'll replace it with the below... :-)
arch/arm/kernel/ftrace.c +1
-4@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */ @@ -35,9 +36,7 @@ static int __ftrace_modify_code(void *da {int *command = data; -set_kernel_text_rw ();ftrace_modify_all_code (*command); -set_kernel_text_ro ();return 0 ; }@@ -59,13 +58,11 @@ static unsigned long adjust_address(struint ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw ();return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro ();/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned lreturn -EINVAL ; }
Quoted 7 lines
arch/arm/kernel/ftrace.c static int ftrace_modify_code(unsigned l · line 97
Quoted 5 lines
arch/arm/kernel/ftrace.c +1
-4-if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text_real ((void *)pc, new, true);I'll even make that:
__patch_text((void *)pc, new);
This fails to compile. I bodged it as below, but maybe this stuff should actually live in insn.c. Not fussed either way. I ran the ftrace tests, loaded a module and toggled ftrace on/off with this applied and it looks like it works to me:
Will
--->8
arch/arm/kernel/Makefile +2 -2
@@ -49,8 +49,8 @@ obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.o -obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o -obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o patch.o +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o patch.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o # Main staffs in KPROBES are in arch/arm/probes/ .
Peter Zijlstra
maintainerPATCH 13/17 arm/ftrace: Use __patch_text()
Quoted 6 lines · Will Deacon
This fails to compile. I bodged it as below, but maybe this stuff should actually live in
insn.c. Not fussed either way. I ran the ftrace tests, loaded a module and toggled ftrace on/off with this applied and it looks like it works to me:Tested-by Will Deacon <[email protected]>
Thanks, I've folded that and will leave any further cleanup to some ARM person that is capable of testing :-)
---
Subject: arm/ftrace: Use __patch_text()
From: Peter Zijlstra <[email protected]>
Date: Tue Oct 15 21:07:35 CEST 2019
Instead of flipping text protection, use the patch_text infrastructure that uses a fixmap alias where required.
This removes the last user of set_all_modules_text_*().
--- arch/arm/kernel/Makefile | 4 ++-- arch/arm/kernel/ftrace.c | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/kernel/Makefile +2 -2
@@ -49,8 +49,8 @@ obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.o -obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o -obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o patch.o +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o patch.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o # Main staffs in KPROBES are in arch/arm/probes/ .
arch/arm/kernel/ftrace.c +2 -8
@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */
@@ -35,9 +36,7 @@ static int __ftrace_modify_code(void *da {int *command = data; -set_kernel_text_rw ();ftrace_modify_all_code (*command); -set_kernel_text_ro ();return 0 ; }
@@ -59,13 +58,11 @@ static unsigned long adjust_address(struint ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw ();return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro ();/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;
@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned lreturn -EINVAL ; } -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text ((void *)pc, new);return 0 ; }
[tip: core/kprobes] arm/ftrace: Use __patch_text()
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 42e51f187f869bf18199837acf2a412d6ca7f33f Gitweb: https://git.kernel.org/tip/42e51f187f869bf18199837acf2a412d6ca7f33f Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 15 Oct 2019 21:07:35 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 19 Nov 2019 13:13:06 +01:00
arm/ftrace: Use __patch_text()
Instead of flipping text protection, use the patch_text infrastructure that uses a fixmap alias where required.
This removes the last user of set_all_modules_text_*().
--- arch/arm/kernel/Makefile | 4 ++-- arch/arm/kernel/ftrace.c | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/kernel/Makefile +2 -2
@@ -49,8 +49,8 @@ obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.o -obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o -obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o patch.o +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o patch.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o # Main staffs in KPROBES are in arch/arm/probes/ .
arch/arm/kernel/ftrace.c +2 -8
@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */
@@ -35,9 +36,7 @@ static int __ftrace_modify_code(void *data) {int *command = data; -set_kernel_text_rw ();ftrace_modify_all_code (*command); -set_kernel_text_ro ();return 0 ; }
@@ -59,13 +58,11 @@ static unsigned long adjust_address(struct dyn_ftrace *rec, unsigned long addr)int ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw ();return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro ();/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;
@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old,return -EINVAL ; } -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text ((void *)pc, new);return 0 ; }
[tip: core/kprobes] arm/ftrace: Use __patch_text()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 5a735583b764750726621b0396d03e4782911b77 Gitweb: https://git.kernel.org/tip/5a735583b764750726621b0396d03e4782911b77 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 15 Oct 2019 21:07:35 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:25 +01:00
arm/ftrace: Use __patch_text()
Instead of flipping text protection, use the patch_text infrastructure that uses a fixmap alias where required.
This removes the last user of set_all_modules_text_*().
--- arch/arm/kernel/Makefile | 4 ++-- arch/arm/kernel/ftrace.c | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/kernel/Makefile +2 -2
@@ -49,8 +49,8 @@ obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.o -obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o -obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o patch.o +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o patch.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o # Main staffs in KPROBES are in arch/arm/probes/ .
arch/arm/kernel/ftrace.c +2 -8
@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */
@@ -35,9 +36,7 @@ static int __ftrace_modify_code(void *data) {int *command = data; -set_kernel_text_rw ();ftrace_modify_all_code (*command); -set_kernel_text_ro ();return 0 ; }
@@ -59,13 +58,11 @@ static unsigned long adjust_address(struct dyn_ftrace *rec, unsigned long addr)int ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw ();return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro ();/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;
@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old,return -EINVAL ; } -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text ((void *)pc, new);return 0 ; }
Re: [tip: core/kprobes] arm/ftrace: Use __patch_text()
04.12.2019 11:33, tip-bot2 for Peter Zijlstra пишет:
Quoted 91 lines
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 5a735583b764750726621b0396d03e4782911b77 Gitweb: https://git.kernel.org/tip/5a735583b764750726621b0396d03e4782911b77 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 15 Oct 2019 21:07:35 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:25 +01:00arm/ftrace: Use
__patch_text()Instead of flipping text protection, use the
patch_textinfrastructure that uses a fixmap alias where required.This removes the last user of set_all_modules_text_*().
Tested-by Will Deacon <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>Cc Andy Lutomirski <[email protected]>Cc Borislav Petkov <[email protected]>Cc Brian Gerst <[email protected]>Cc Denys Vlasenko <[email protected]>Cc H. Peter Anvin <[email protected]>Cc Linus Torvalds <torvalds-de/[email protected]>Cc Mark Rutland <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Thomas Gleixner <[email protected]>Link https://lkml.kernel.org/r/20191113092636.GG4131-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org open hereSigned-off-by Ingo Molnar <[email protected]>--- arch/arm/kernel/Makefile | 4 ++-- arch/arm/kernel/ftrace.c | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-)arch/arm/kernel/Makefile +2
-2@@ -49,8 +49,8 @@ obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.o -obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o -obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o patch.o +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o patch.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o # Main staffs in KPROBES are in arch/arm/probes/ .arch/arm/kernel/ftrace.c +1
-4@@ -22,6 +22,7 @@#include <asm/ftrace.h> #include <asm/insn.h> #include <asm/set_memory.h> +#include <asm/patch.h> #ifdef CONFIG_THUMB2_KERNEL #define NOP 0xf85deb04/* pop.w {lr} */ @@ -35,9 +36,7 @@ static int __ftrace_modify_code(void *data) {int *command = data; -set_kernel_text_rw ();ftrace_modify_all_code (*command); -set_kernel_text_ro ();return 0 ; }@@ -59,13 +58,11 @@ static unsigned long adjust_address(struct dyn_ftrace *rec, unsigned long addr)int ftrace_arch_code_modify_prepare (void ) { -set_all_modules_text_rw ();return 0 ; }int ftrace_arch_code_modify_post_process (void ) { -set_all_modules_text_ro ();/* Make sure any TLB misses during machine stop are cleared. */ flush_tlb_all ();return 0 ;@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old,return -EINVAL ;
arch/arm/kernel/ftrace.c static int ftrace_modify_code(unsigned long pc, unsigned long old, · line 100
Quoted 10 lines
arch/arm/kernel/ftrace.c +1
-4} -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text ((void *)pc, new);return 0 ; }
Hello,
NVIDIA Tegra20/30 are not booting with CONFIG_FTRACE=y, but even with CONFIG_FTRACE=n things are not working well.
Reverting this patch and "module: Remove set_all_modules_text_*()" (to fix compilation) helps.
[ 13.363523] 8<--- cut here --- [ 13.366887] Unable to handle kernel paging request at virtual address 3e24fca3 [ 13.370342] pgd = f9397380 [ 13.373625] [3e24fca3] *pgd=00000000 [ 13.377274] Internal error: Oops: 5 [#1] SMP THUMB2 [ 13.381086] Modules linked in: [ 13.384372] CPU: 1 PID: 209 Comm: systemd-journal Not tainted 5.5.0-rc7-next-20200122-00177-g9b7833ca2e7a #983 [ 13.387929] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) [ 13.391500] PC is at __seccomp_filter+0x86/0x370 [ 13.395103] LR is at __seccomp_filter+0x77/0x370 [ 13.398584] pc : [<c0194d56>] lr : [<c0194d47>] psr: 600e0033 [ 13.402211] sp : ee6f3ee0 ip : ee6f3f20 fp : ee6f2000 [ 13.405769] r10: ffff0000 r9 : 7fff0000 r8 : ee6f3f20 [ 13.409844] r7 : 7fff0000 r6 : ee6b7280 r5 : 00000014 r4 : 7fff0000 [ 13.413776] r3 : 3e24fc7f r2 : 00000000 r1 : 3e24fca7 r0 : ee6f3f20 [ 13.417382] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA Thumb Segment none [ 13.420991] Control: 50c5387d Table: 2e76404a DAC: 00000051 [ 13.424667] Process systemd-journal (pid: 209, stack limit = 0x90194d37) [ 13.428331] Stack: (0xee6f3ee0 to 0xee6f4000) [ 13.432082] 3ee0: 00000008 00000000 c0fa23a8 c0c65958 00000008 000000c5 00000006 00000000 [ 13.435959] 3f00: 00000004 00000002 00000000 00000000 00000014 b6f5d4d0 edc96ee8 ee600908 [ 13.439786] 3f20: 00000006 40000028 b6e3cd56 00000000 00000014 00000000 00000002 00000000 [ 13.444285] 3f40: 00000000 00000000 00000000 00000000 00000014 00000000 b6f5d4d0 00000000 [ 13.448432] 3f60: 00000000 9445a58a 00000000 00000014 ffffe000 00000000 00000006 c01011e4 [ 13.452202] 3f80: ee6f2000 00000080 00000000 c01080d5 00000014 b6f5d4d0 00000000 00000006 [ 13.456025] 3fa0: c01011e4 c0101195 00000014 b6f5d4d0 00000014 00000002 00000000 00000000 [ 13.459872] 3fc0: 00000014 b6f5d4d0 00000000 00000006 b6f5d4e0 befa5610 00000002 00000000 [ 13.463736] 3fe0: 00000006 befa5518 b6eb6c7d b6e3cd56 800e0030 00000014 00000000 00000000 [ 13.467570] [<c0194d56>] (__seccomp_filter) from [<c01080d5>] (syscall_trace_enter+0x45/0xac) [ 13.471520] [<c01080d5>] (syscall_trace_enter) from [<c0101195>] (__sys_trace+0x9/0x34) [ 13.475592] Exception stack(0xee6f3fa8 to 0xee6f3ff0) [ 13.480012] 3fa0: 00000014 b6f5d4d0 00000014 00000002 00000000 00000000 [ 13.484127] 3fc0: 00000014 b6f5d4d0 00000000 00000006 b6f5d4e0 befa5610 00000002 00000000 [ 13.488248] 3fe0: 00000006 befa5518 b6eb6c7d b6e3cd56 [ 13.492318] Code: 68f3 4640 f103 0128 (6a5b) 4798 [ 13.496597] ---[ end trace 2190b04c04a417a2 ]--- [ 13.520493] note: systemd-journal[209] exited with preempt_count 1 [ 13.532782] systemd[1]: systemd-journald.service: Service has no hold-off time (RestartSec=0), scheduling restart. [ 13.538055] systemd[1]: systemd-journald.service: Scheduled restart job, restart counter is at 1. [ 13.544960] systemd[1]: Stopped Journal Service. [ 13.555123] systemd[1]: Condition check resulted in Journal Audit Socket being skipped. [ 13.566066] systemd[1]: Starting Journal Service... [ 13.786668] systemd[1]: Started Journal Service.
[ 22.013861] BUG: Bad rss-counter state mm:26c62bde type:MM_ANONPAGES
val:170
This "Bad rss-counter" seems to be a new problem and unrelated to the offending patch, I don't recall seeing it in next-20200117 and earlier.
Peter Zijlstra
maintainerRe: [tip: core/kprobes] arm/ftrace: Use __patch_text()
Quoted 47 lines · Dmitry Osipenko
arch/arm/kernel/ftrace.c static int ftrace_modify_code(unsigned long pc, unsigned long old, · line 100
Quoted 13 lines
arch/arm/kernel/ftrace.c +1
-4@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old,return -EINVAL ; } -if (probe_kernel_write ((void *)pc, &new,MCOUNT_INSN_SIZE )) -return -EPERM ; - -flush_icache_range (pc, pc +MCOUNT_INSN_SIZE ); +__patch_text ((void *)pc, new);return 0 ; }Hello,
NVIDIA Tegra20/30 are not booting with
CONFIG_FTRACE=y, but even withCONFIG_FTRACE=nthings are not working well.[ 13.363523] 8<--- cut here --- [ 13.366887] Unable to handle kernel paging request at virtual address 3e24fca3 [ 13.370342] pgd = f9397380 [ 13.373625] [3e24fca3] *pgd=00000000 [ 13.377274] Internal error: Oops: 5 [#1] SMP THUMB2 [ 13.381086] Modules linked in: [ 13.384372] CPU: 1 PID: 209 Comm: systemd-journal Not tainted 5.5.0-rc7-next-20200122-00177-g9b7833ca2e7a #983 [ 13.387929] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) [ 13.391500] PC is at __seccomp_filter+0x86/0x370 [ 13.395103] LR is at __seccomp_filter+0x77/0x370 [ 13.398584] pc : [<c0194d56>] lr : [<c0194d47>] psr: 600e0033 [ 13.402211] sp : ee6f3ee0 ip : ee6f3f20 fp : ee6f2000 [ 13.405769] r10: ffff0000 r9 : 7fff0000 r8 : ee6f3f20 [ 13.409844] r7 : 7fff0000 r6 : ee6b7280 r5 : 00000014 r4 : 7fff0000 [ 13.413776] r3 : 3e24fc7f r2 : 00000000 r1 : 3e24fca7 r0 : ee6f3f20 [ 13.417382] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA Thumb Segment none [ 13.420991] Control: 50c5387d Table: 2e76404a DAC: 00000051 [ 13.424667] Process systemd-journal (pid: 209, stack limit = 0x90194d37) [ 13.428331] Stack: (0xee6f3ee0 to 0xee6f4000) [ 13.432082] 3ee0: 00000008 00000000 c0fa23a8 c0c65958 00000008 000000c5 00000006 00000000 [ 13.435959] 3f00: 00000004 00000002 00000000 00000000 00000014 b6f5d4d0 edc96ee8 ee600908 [ 13.439786] 3f20: 00000006 40000028 b6e3cd56 00000000 00000014 00000000 00000002 00000000 [ 13.444285] 3f40: 00000000 00000000 00000000 00000000 00000014 00000000 b6f5d4d0 00000000 [ 13.448432] 3f60: 00000000 9445a58a 00000000 00000014 ffffe000 00000000 00000006 c01011e4 [ 13.452202] 3f80: ee6f2000 00000080 00000000 c01080d5 00000014 b6f5d4d0 00000000 00000006 [ 13.456025] 3fa0: c01011e4 c0101195 00000014 b6f5d4d0 00000014 00000002 00000000 00000000 [ 13.459872] 3fc0: 00000014 b6f5d4d0 00000000 00000006 b6f5d4e0 befa5610 00000002 00000000 [ 13.463736] 3fe0: 00000006 befa5518 b6eb6c7d b6e3cd56 800e0030 00000014 00000000 00000000
Quoted 8 lines
[ 13.467570] [<c0194d56>] (__seccomp_filter) from [<c01080d5>] (syscall_trace_enter+0x45/0xac) [ 13.471520] [<c01080d5>] (syscall_trace_enter) from [<c0101195>] (__sys_trace+0x9/0x34) [ 13.475592] Exception stack(0xee6f3fa8 to 0xee6f3ff0) [ 13.480012] 3fa0: 00000014 b6f5d4d0 00000014 00000002 00000000 00000000 [ 13.484127] 3fc0: 00000014 b6f5d4d0 00000000 00000006 b6f5d4e0 befa5610 00000002 00000000 [ 13.488248] 3fe0: 00000006 befa5518 b6eb6c7d b6e3cd56 [ 13.492318] Code: 68f3 4640 f103 0128 (6a5b) 4798 [ 13.496597] ---[ end trace 2190b04c04a417a2 ]---
Is that crash with FTRACE=y or =n ?
This really isn't making much sense to me, Will, Mark, any clues?
Peter Zijlstra
maintainerRe: [tip: core/kprobes] arm/ftrace: Use __patch_text()
Quoted 3 lines · Peter Zijlstra
Is that crash with FTRACE=y or =n ?
This really isn't making much sense to me, Will, Mark, any clues?
Does the initial patch:
https://lkml.kernel.org/r/[email protected]
work, or does it crash the exact same?
Peter Zijlstra
maintainerRe: [tip: core/kprobes] arm/ftrace: Use __patch_text()
In reply to Dmitry OsipenkoQuoted 11 lines · Dmitry Osipenko
04.12.2019 11:33, tip-bot2 for Peter Zijlstra пишет:
Quoted 10 lines
(quoted diff) +1
-4@@ -97,10 +94,7 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old, return -EINVAL; } - if (probe_kernel_write((void *)pc, &new, MCOUNT_INSN_SIZE)) - return -EPERM; - - flush_icache_range(pc, pc + MCOUNT_INSN_SIZE); + __patch_text((void *)pc, new);
Quoted 8 lines
Review static int ftrace_modify_code(unsigned long pc, unsigned long old, · line 100
Quoted 3 lines
(quoted diff) +0
-0return 0; }Hello,
NVIDIA Tegra20/30 are not booting with
CONFIG_FTRACE=y, but even withCONFIG_FTRACE=nthings are not working well.
Ooh, I think I see. Can you try this:
arch/arm/kernel/ftrace.c +2 -5
@@ -78,13 +78,10 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old, {unsigned long replaced; -if (IS_ENABLED (CONFIG_THUMB2_KERNEL )) { +if (IS_ENABLED (CONFIG_THUMB2_KERNEL )) old =__opcode_to_mem_thumb32 (old); - new =__opcode_to_mem_thumb32 (new); - }else { +else old =__opcode_to_mem_arm (old); - new =__opcode_to_mem_arm (new); - }if (validate) {if (probe_kernel_read (&replaced, (void *)pc,MCOUNT_INSN_SIZE ))
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Dmitry Osipenko
Tested-byRe: [tip: core/kprobes] arm/ftrace: Use __patch_text()
07.02.2020 14:27, Peter Zijlstra пишет:
Quoted 16 lines
Quoted 2 lines
NVIDIA Tegra20/30 are not booting with
CONFIG_FTRACE=y, but even withCONFIG_FTRACE=nthings are not working well.Ooh, I think I see. Can you try this:
arch/arm/kernel/ftrace.c +1
-1@@ -78,13 +78,10 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old, {unsigned long replaced; -if (IS_ENABLED (CONFIG_THUMB2_KERNEL )) { +if (IS_ENABLED (CONFIG_THUMB2_KERNEL ))
arch/arm/kernel/ftrace.c static int ftrace_modify_code(unsigned long pc, unsigned long old, · line 87
Quoted 10 lines
arch/arm/kernel/ftrace.c +1
-4old =__opcode_to_mem_thumb32 (old); - new =__opcode_to_mem_thumb32 (new); - }else { + else old =__opcode_to_mem_arm (old); - new =__opcode_to_mem_arm (new); - }if (validate) {if (probe_kernel_read (&replaced, (void *)pc,MCOUNT_INSN_SIZE ))
Hello Peter,
It fixes the problem, at least kernel is booting fine now and I can't notice any problems. Thank you very much! :)
Re: [PATCH -v5mkII 13/17] arm/ftrace: Use __patch_text()
In reply to Peter ZijlstraReview obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o · line 55
Quoted 10 lines · Peter Zijlstra
(quoted diff) +2
-2@@ -49,8 +49,8 @@ obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.o -obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o -obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o patch.o +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o patch.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
This broke randconfig builds with big-endian ARMv5:
../arch/arm/kernel/patch.c: In function '__patch_text_real':../arch/arm/kernel/patch.c:94:11: error: implicit declaration of function '__opcode_to_mem_thumb32' [-Werror=implicit-function-declaration]
insn = __opcode_to_mem_thumb32(insn);
^~~~~~~~~~~~~~~~~~~~~~~The problem is that we don't have a BE32 definition of __opcode_to_mem_thumb32, mostly because no hardware supports that.
One possible workaround is a big ugly:
arch/arm/kernel/patch.c +0 -0
@@ -90,9 +90,11 @@ void __kprobes __patch_text_real(void *addr,
unsigned int insn, bool remap)
size = sizeof(u32);
} else {
+#ifdef CONFIG_THUMB2_KERNEL
if (thumb2)
insn = __opcode_to_mem_thumb32(insn);
else
+#endif
insn = __opcode_to_mem_arm(insn);
*(u32 *)waddr = insn;Any other suggestions?
Arnd
Steven Rostedt
maintainerRe: [PATCH -v5mkII 13/17] arm/ftrace: Use __patch_text()
Quoted 32 lines · On Wed, 8 Jan 2020 13:22:52 +0100 Arnd Bergmann <[email protected]> wrote:
Review obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o · line 55
Quoted 10 lines · Peter Zijlstra
(quoted diff) +2
-2@@ -49,8 +49,8 @@ obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.o -obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o -obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o patch.o +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o patch.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.oThis broke randconfig builds with big-endian ARMv5:
../arch/arm/kernel/patch.c: In function '__patch_text_real':../arch/arm/kernel/patch.c:94:11: error: implicit declaration of function '__opcode_to_mem_thumb32' [-Werror=implicit-function-declaration]insn = __opcode_to_mem_thumb32(insn); ^~~~~~~~~~~~~~~~~~~~~~~The problem is that we don't have a BE32 definition of
__opcode_to_mem_thumb32, mostly because no hardware supports that.One possible workaround is a big ugly:
arch/arm/kernel/patch.c +0
-0
arch/arm/kernel/patch.c void __kprobes __patch_text_real(void *addr, · line 95
Quoted 6 lines
arch/arm/kernel/patch.c +1
-0@@ -90,9 +90,11 @@ void __kprobes __patch_text_real(void *addr, unsigned int insn, bool remap) size =sizeof (u32); }else { +#ifdef CONFIG_THUMB2_KERNEL if (thumb2)
If we change the above to:
if (IS_ENABLED(CONFIG_THUMB2_KERNEL) && thumb2)
Would the compiler optmize out __opcode_to_mem_thumb32(). We would need to add a declaration for it, but wont need to define it. At least we wont have nasty #ifdef logic in the code.
-- Steve
Quoted 11 lines
arch/arm/kernel/patch.c +1
-0insn =__opcode_to_mem_thumb32 (insn); else +#endif insn =__opcode_to_mem_arm (insn);*(u32 *)waddr = insn;Any other suggestions?
Arnd
Re: [PATCH -v5mkII 13/17] arm/ftrace: Use __patch_text()
Quoted 24 lines · Steven Rostedt
Quoted 11 lines · On Wed, 8 Jan 2020 13:22:52 +0100 Arnd Bergmann <[email protected]> wrote:
The problem is that we don't have a BE32 definition of
__opcode_to_mem_thumb32, mostly because no hardware supports that.One possible workaround is a big ugly:
arch/arm/kernel/patch.c +0
-0arch/arm/kernel/patch.c void __kprobes __patch_text_real(void *addr, · line 95
Quoted 6 lines
arch/arm/kernel/patch.c +1
-0@@ -90,9 +90,11 @@ void __kprobes __patch_text_real(void *addr, unsigned int insn, bool remap) size =sizeof (u32); }else { +#ifdef CONFIG_THUMB2_KERNEL if (thumb2)If we change the above to:
Quoted 5 lines
if (IS_ENABLED(CONFIG_THUMB2_KERNEL) && thumb2)Would the compiler optmize out
__opcode_to_mem_thumb32(). We would need to add a declaration for it, but wont need to define it. At least we wont have nasty #ifdef logic in the code.
If we add a declaration for it, I think no change to patch.c is needed, as 'thumb2' already has compile-time constant value equal to IS_ENABLED(CONFIG_THUMB2_KERNEL).
I'll try it out.
Arnd
Peter Zijlstra
maintainerPATCH 14/17 module: Remove set_all_modules_text_*()
In reply to Peter ZijlstraNow that there are no users of set_all_modules_text_*() left, remove it.
While it appears nds32 uses it, it does not have STRICT_MODULE_RWX and therefore ends up with the NOP stubs.
--- arch/nds32/kernel/ftrace.c | 12 ------------ include/linux/module.h | 4 ---- kernel/module.c | 43 ------------------------------------------- 3 files changed, 59 deletions(-)
arch/nds32/kernel/ftrace.c +0 -12
@@ -89,18 +89,6 @@ int __init ftrace_dyn_arch_init(void)return 0 ; } -int ftrace_arch_code_modify_prepare (void ) -{ -set_all_modules_text_rw (); -return 0 ; -} - -int ftrace_arch_code_modify_post_process (void ) -{ -set_all_modules_text_ro (); -return 0 ; -} -static unsigned long gen_sethi_insn (unsigned long addr) {unsigned long opcode =0x46000000 ;
include/linux/module.h +0 -4
@@ -846,13 +846,9 @@ extern int module_sysfs_initialized;#define __MODULE_STRING (x) __stringify(x)#ifdef CONFIG_STRICT_MODULE_RWX -extern void set_all_modules_text_rw (void ); -extern void set_all_modules_text_ro (void );extern void module_enable_ro (const struct module *mod,bool after_init);extern void module_disable_ro (const struct module *mod);#else -static inline void set_all_modules_text_rw (void ) { } -static inline void set_all_modules_text_ro (void ) { }static inline void module_enable_ro (const struct module *mod,bool after_init) { }static inline void module_disable_ro (const struct module *mod) { }#endif
kernel/module.c +0 -43
49 lines not on this page · raw message
[tip: core/kprobes] module: Remove set_all_modules_text_*()
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 0e05d89d72e200f4c5129a6a80090dabf8c45a10 Gitweb: https://git.kernel.org/tip/0e05d89d72e200f4c5129a6a80090dabf8c45a10 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 15 Oct 2019 21:07:31 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 19 Nov 2019 13:13:07 +01:00
module: Remove set_all_modules_text_*()
Now that there are no users of set_all_modules_text_*() left, remove it.
While it appears nds32 uses it, it does not have STRICT_MODULE_RWX and therefore ends up with the NOP stubs.
--- arch/nds32/kernel/ftrace.c | 12 +---------- include/linux/module.h | 4 +--- kernel/module.c | 43 +------------------------------------- 3 files changed, 59 deletions(-)
arch/nds32/kernel/ftrace.c +0 -12
@@ -89,18 +89,6 @@ int __init ftrace_dyn_arch_init(void)return 0 ; } -int ftrace_arch_code_modify_prepare (void ) -{ -set_all_modules_text_rw (); -return 0 ; -} - -int ftrace_arch_code_modify_post_process (void ) -{ -set_all_modules_text_ro (); -return 0 ; -} -static unsigned long gen_sethi_insn (unsigned long addr) {unsigned long opcode =0x46000000 ;
include/linux/module.h +0 -4
@@ -846,13 +846,9 @@ extern int module_sysfs_initialized;#define __MODULE_STRING (x) __stringify(x)#ifdef CONFIG_STRICT_MODULE_RWX -extern void set_all_modules_text_rw (void ); -extern void set_all_modules_text_ro (void );extern void module_enable_ro (const struct module *mod,bool after_init);extern void module_disable_ro (const struct module *mod);#else -static inline void set_all_modules_text_rw (void ) { } -static inline void set_all_modules_text_ro (void ) { }static inline void module_enable_ro (const struct module *mod,bool after_init) { }static inline void module_disable_ro (const struct module *mod) { }#endif
kernel/module.c +0 -43
49 lines not on this page · raw message
[tip: core/kprobes] module: Remove set_all_modules_text_*()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 958de668197651bbf2b4b9528f204ab5a0f1af65 Gitweb: https://git.kernel.org/tip/958de668197651bbf2b4b9528f204ab5a0f1af65 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 15 Oct 2019 21:07:31 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:25 +01:00
module: Remove set_all_modules_text_*()
Now that there are no users of set_all_modules_text_*() left, remove it.
While it appears nds32 uses it, it does not have STRICT_MODULE_RWX and therefore ends up with the NOP stubs.
--- arch/nds32/kernel/ftrace.c | 12 +---------- include/linux/module.h | 4 +--- kernel/module.c | 43 +------------------------------------- 3 files changed, 59 deletions(-)
arch/nds32/kernel/ftrace.c +0 -12
@@ -89,18 +89,6 @@ int __init ftrace_dyn_arch_init(void)return 0 ; } -int ftrace_arch_code_modify_prepare (void ) -{ -set_all_modules_text_rw (); -return 0 ; -} - -int ftrace_arch_code_modify_post_process (void ) -{ -set_all_modules_text_ro (); -return 0 ; -} -static unsigned long gen_sethi_insn (unsigned long addr) {unsigned long opcode =0x46000000 ;
include/linux/module.h +0 -4
@@ -846,13 +846,9 @@ extern int module_sysfs_initialized;#define __MODULE_STRING (x) __stringify(x)#ifdef CONFIG_STRICT_MODULE_RWX -extern void set_all_modules_text_rw (void ); -extern void set_all_modules_text_ro (void );extern void module_enable_ro (const struct module *mod,bool after_init);extern void module_disable_ro (const struct module *mod);#else -static inline void set_all_modules_text_rw (void ) { } -static inline void set_all_modules_text_ro (void ) { }static inline void module_enable_ro (const struct module *mod,bool after_init) { }static inline void module_disable_ro (const struct module *mod) { }#endif
kernel/module.c +0 -43
49 lines not on this page · raw message
Peter Zijlstra
maintainerPATCH 15/17 ftrace: Rework event_create_dir()
In reply to Peter ZijlstraRework event_create_dir() to use an array of static data instead of function pointers where possible.
The problem is that it would call the function pointer on module load before parse_args(), possibly even before jump_labels were initialized. Luckily the generated functions don't use jump_labels but it still seems fragile. It also gets in the way of changing when we make the module map executable.
The generated function are basically calling trace_define_field() with a bunch of static arguments. So instead of a function, capture these arguments in a static array, avoiding the function call.
Now there are a number of cases where the fields are dynamic (syscall arguments, kprobes and uprobes), in which case a static array does not work, for these we preserve the function call. Luckily all these cases are not related to modules and so we can retain the function call for them.
--- drivers/infiniband/hw/hfi1/trace_tid.h | 8 +- drivers/infiniband/hw/hfi1/trace_tx.h | 2 drivers/lightnvm/pblk-trace.h | 8 +- drivers/net/fjes/fjes_trace.h | 2 drivers/net/wireless/ath/ath10k/trace.h | 6 - fs/xfs/scrub/trace.h | 6 - fs/xfs/xfs_trace.h | 4 - include/linux/trace_events.h | 18 +++++ include/trace/events/filemap.h | 2 include/trace/events/rpcrdma.h | 2 include/trace/trace_events.h | 64 ++++++------------- kernel/trace/trace.h | 31 ++++----- kernel/trace/trace_entries.h | 66 +++++-------------- kernel/trace/trace_events.c | 20 +++++- kernel/trace/trace_events_hist.c | 8 ++ kernel/trace/trace_export.c | 106 +++++++++++--------------------- kernel/trace/trace_kprobe.c | 16 ++++ kernel/trace/trace_syscalls.c | 50 ++++++--------- kernel/trace/trace_uprobe.c | 9 ++ net/mac80211/trace.h | 28 ++++---- net/wireless/trace.h | 6 - 21 files changed, 213 insertions(+), 249 deletions(-)
drivers/infiniband/hw/hfi1/trace_tid.h +4 -4
@@ -138,10 +138,10 @@ TRACE_EVENT(/* put_tid */ TP_ARGS(dd, index, type, pa, order),TP_STRUCT__entry (/* entry */ DD_DEV_ENTRY (dd ) - __field(unsigned long, pa); - __field(u32, index); - __field(u32, type); - __field(u16, order); + __field(unsigned long, pa) +__field (u32, index) +__field (u32, type) +__field (u16, order) ),TP_fast_assign (/* assign */ DD_DEV_ASSIGN(dd);
drivers/infiniband/hw/hfi1/trace_tx.h +1 -1
@@ -588,7 +588,7 @@ TRACE_EVENT(hfi1_sdma_user_reqinfo, TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u8 subctxt, u16 *i),TP_ARGS (dd, ctxt, subctxt, i),TP_STRUCT__entry ( - DD_DEV_ENTRY(dd); +DD_DEV_ENTRY (dd)__field (u16 ,ctxt )__field (u8, subctxt) __field(u8, ver_opcode)
drivers/lightnvm/pblk-trace.h +4 -4
@@ -46,7 +46,7 @@ TRACE_EVENT(pblk_chunk_reset,TP_STRUCT__entry (__string (name ,name )__field (u64, ppa) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -72,7 +72,7 @@ TRACE_EVENT(pblk_chunk_state,TP_STRUCT__entry (__string (name ,name )__field (u64, ppa) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -98,7 +98,7 @@ TRACE_EVENT(pblk_line_state,TP_STRUCT__entry (__string (name ,name )__field (int, line) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -121,7 +121,7 @@ TRACE_EVENT(pblk_state,TP_STRUCT__entry (__string (name ,name ) - __field(int, state); +__field (int, state) ), TP_fast_assign(
drivers/net/fjes/fjes_trace.h +1 -1
@@ -28,7 +28,7 @@ TRACE_EVENT(fjes_hw_issue_request_comman __field(u8, cs_busy) __field(u8, cs_complete) __field(int, timeout) -__field (int, ret); +__field (int, ret) ),TP_fast_assign ( __entry->cr_req = cr->bits.req_code;
drivers/net/wireless/ath/ath10k/trace.h +3 -3
@@ -239,7 +239,7 @@ TRACE_EVENT(ath10k_wmi_dbglog,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(size_t, buf_len)__dynamic_array (u8, buf, buf_len) ),
@@ -269,7 +269,7 @@ TRACE_EVENT(ath10k_htt_pktlog,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(u16, buf_len)__dynamic_array (u8, pktlog, buf_len) ),
@@ -435,7 +435,7 @@ TRACE_EVENT(ath10k_htt_rx_desc,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(u16, len)__dynamic_array (u8, rxdesc, len) ),
fs/xfs/scrub/trace.h +3 -3
@@ -329,7 +329,7 @@ TRACE_EVENT(xchk_btree_op_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(int, error) __field(void *, ret_ip) ),
@@ -414,7 +414,7 @@ TRACE_EVENT(xchk_btree_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(void *, ret_ip) ), TP_fast_assign(
@@ -452,7 +452,7 @@ TRACE_EVENT(xchk_ifork_btree_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(void *, ret_ip) ), TP_fast_assign(
fs/xfs/xfs_trace.h +2 -2
@@ -218,8 +218,8 @@ DECLARE_EVENT_CLASS(xfs_bmap_class,TP_STRUCT__entry (__field (dev_t ,dev )__field (xfs_ino_t, ino) - __field(void *, leaf); -__field (int, pos); + __field(void *, leaf) +__field (int, pos)__field (xfs_fileoff_t, startoff)__field (xfs_fsblock_t, startblock) __field(xfs_filblks_t, blockcount)
include/linux/trace_events.h +17 -1
@@ -187,6 +187,22 @@ enum trace_reg {struct trace_event_call ; +#define TRACE_FUNCTION_TYPE ((const char *)~0UL) + +struct trace_event_fields { +const char *type; +union { +struct { +const char *name; +const int size; +const int align; +const int is_signed; +const int filter_type; + }; +int (*define_fields)(struct trace_event_call *); + }; +}; +struct trace_event_class {const char *system;void *probe;
@@ -195,7 +211,7 @@ struct trace_event_class {#endif int (*reg)(struct trace_event_call *event,enum trace_reg type,void *data); -int (*define_fields)(struct trace_event_call *); +struct trace_event_fields *fields_array;struct list_head *(*get_fields)(struct trace_event_call *);struct list_head fields;int (*raw_init)(struct trace_event_call *);
include/trace/events/filemap.h +1 -1
@@ -85,7 +85,7 @@ TRACE_EVENT(file_check_and_advance_wb_er TP_ARGS(file, old),TP_STRUCT__entry ( - __field(struct file *, file); +__field (struct file *,file ) __field(unsigned long, i_ino)__field (dev_t, s_dev) __field(errseq_t, old)
include/trace/events/rpcrdma.h +1 -1
@@ -1507,7 +1507,7 @@ TRACE_EVENT(svcrdma_dma_map_page,TP_ARGS (rdma, page),TP_STRUCT__entry ( - __field(const void *, page); + __field(const void *, page) __string(device, rdma->sc_cm_id->device->name)__string (addr, rdma->sc_xprt.xpt_remotebuf) ),
include/trace/trace_events.h +21 -43
98 lines not on this page · raw message
kernel/trace/trace.h +14 -17
@@ -49,6 +49,9 @@ enum trace_type {#undef __field#define __field (type, item) type item; +#undef __field_fn +#define __field_fn (type, item) type item; +#undef __field_struct#define __field_struct (type, item) __field(type, item)
@@ -68,26 +71,22 @@ enum trace_type { #define F_STRUCT(args...) args#undef FTRACE_ENTRY -#define FTRACE_ENTRY (name, struct_name, id, tstruct, print, filter) \ +#define FTRACE_ENTRY (name, struct_name, id, tstruct, print) \ struct struct_name { \ struct trace_entry ent; \ tstruct \ }#undef FTRACE_ENTRY_DUP -#define FTRACE_ENTRY_DUP (name, name_struct, id, tstruct, printk, filter) +#define FTRACE_ENTRY_DUP (name, name_struct, id, tstruct, printk)#undef FTRACE_ENTRY_REG -#define FTRACE_ENTRY_REG (name, struct_name, id, tstruct, print, \ - filter, regfn) \ - FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_REG (name, struct_name, id, tstruct, print, regfn) \ + FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print))#undef FTRACE_ENTRY_PACKED -#define FTRACE_ENTRY_PACKED (name, struct_name, id, tstruct, print, \ - filter) \ - FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) __packed +#define FTRACE_ENTRY_PACKED (name, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print)) __packed#include "trace_entries.h"
@@ -1899,17 +1898,15 @@ extern void tracing_log_err(struct trace#define internal_trace_puts (str) __trace_puts(_THIS_IP_, str, strlen(str))#undef FTRACE_ENTRY -#define FTRACE_ENTRY (call, struct_name, id, tstruct, print, filter) \ +#define FTRACE_ENTRY (call, struct_name, id, tstruct, print) \ extern struct trace_event_call \ __aligned(4) event_##call;#undef FTRACE_ENTRY_DUP -#define FTRACE_ENTRY_DUP (call, struct_name, id, tstruct, print, filter) \ - FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_DUP (call, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))#undef FTRACE_ENTRY_PACKED -#define FTRACE_ENTRY_PACKED (call, struct_name, id, tstruct, print, filter) \ - FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_PACKED (call, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))#include "trace_entries.h"
kernel/trace/trace_entries.h +18 -48
178 lines not on this page · raw message
kernel/trace/trace_events.c +19 -1
@@ -24,6 +24,7 @@#include <linux/delay.h> #include <trace/events/sched.h> +#include <trace/syscall.h> #include <asm/setup.h>
@@ -1990,7 +1991,24 @@ event_create_dir(struct dentry *parent,*/ head =trace_get_fields (call);if (list_empty (head)) { - ret = call->class->define_fields (call); +struct trace_event_fields *field = call->class->fields_array; +unsigned int offset =sizeof (struct trace_entry ); + +for (; field->type; field++) { +if (field->type ==TRACE_FUNCTION_TYPE ) { + ret = field->define_fields (call); +break ; + } + + offset =ALIGN (offset, field->align); + ret =trace_define_field (call, field->type, field->name, + offset, field->size, + field->is_signed, field->filter_type); +if (ret) +break ; + + offset += field->size; + }if (ret <0 ) {pr_warn ("Could not initialize trace point events/%s\n" , name);
kernel/trace/trace_events_hist.c +7 -1
@@ -1133,6 +1133,12 @@ static struct synth_event *find_synth_evreturn NULL ; } +static struct trace_event_fields synth_event_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = synth_event_define_fields }, + {} +}; +static int register_synth_event (struct synth_event *event) {struct trace_event_call *call = &event->call;
@@ -1154,7 +1160,7 @@ static int register_synth_event(struct sINIT_LIST_HEAD (&call->class->fields); call->event.funcs = &synth_event_funcs; - call->class->define_fields = synth_event_define_fields; + call->class->fields_array = synth_event_fields_array; ret =register_trace_event (&call->event);if (!ret) {
kernel/trace/trace_export.c +39 -67
165 lines not on this page · raw message
kernel/trace/trace_kprobe.c +14 -2
@@ -1534,16 +1534,28 @@ static struct trace_event_functions kpro .trace = print_kprobe_event }; +static struct trace_event_fields kretprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = kretprobe_event_define_fields }, + {} +}; + +static struct trace_event_fields kprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = kprobe_event_define_fields }, + {} +}; +static inline void init_trace_event_call (struct trace_kprobe *tk) {struct trace_event_call *call =trace_probe_event_call (&tk->tp);if (trace_kprobe_is_return (tk)) { call->event.funcs = &kretprobe_funcs; - call->class->define_fields = kretprobe_event_define_fields; + call->class->fields_array = kretprobe_fields_array; }else { call->event.funcs = &kprobe_funcs; - call->class->define_fields = kprobe_event_define_fields; + call->class->fields_array = kprobe_fields_array; } call->flags =TRACE_EVENT_FL_KPROBE ;
kernel/trace/trace_syscalls.c +20 -30
93 lines not on this page · raw message
kernel/trace/trace_uprobe.c +7 -2
@@ -1507,12 +1507,17 @@ static struct trace_event_functions upro .trace = print_uprobe_event }; +static struct trace_event_fields uprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = uprobe_event_define_fields }, + {} +}; +static inline void init_trace_event_call (struct trace_uprobe *tu) {struct trace_event_call *call =trace_probe_event_call (&tu->tp); - call->event.funcs = &uprobe_funcs; - call->class->define_fields = uprobe_event_define_fields; + call->class->fields_array = uprobe_fields_array; call->flags =TRACE_EVENT_FL_UPROBE |TRACE_EVENT_FL_CAP_ANY ; call->class->reg = trace_uprobe_register;
net/mac80211/trace.h +14 -14
@@ -408,20 +408,20 @@ TRACE_EVENT(drv_bss_info_changed, __field(u32, basic_rates) __array(int, mcast_rate, NUM_NL80211_BANDS) __field(u16, ht_operation_mode) -__field (s32, cqm_rssi_thold); -__field (s32, cqm_rssi_hyst); -__field (u32, channel_width); -__field (u32, channel_cfreq1); + __field(s32, cqm_rssi_thold) + __field(s32, cqm_rssi_hyst) + __field(u32, channel_width) + __field(u32, channel_cfreq1)__dynamic_array (u32, arp_addr_list, info->arp_addr_cnt >IEEE80211_BSS_ARP_ADDR_LIST_LEN ?IEEE80211_BSS_ARP_ADDR_LIST_LEN : - info->arp_addr_cnt); -__field (int, arp_addr_cnt); -__field (bool, qos); -__field (bool, idle); -__field (bool, ps); -__dynamic_array (u8, ssid, info->ssid_len); -__field (bool, hidden_ssid); + info->arp_addr_cnt) + __field(int, arp_addr_cnt) + __field(bool, qos) + __field(bool, idle) + __field(bool, ps) + __dynamic_array(u8, ssid, info->ssid_len) + __field(bool, hidden_ssid) __field(int, txpower)__field (u8, p2p_oppps_ctwindow) ),
@@ -1672,8 +1672,8 @@ TRACE_EVENT(drv_start_ap, VIF_ENTRY __field(u8, dtimper) __field(u16, bcnint) - __dynamic_array(u8, ssid, info->ssid_len); -__field (bool ,hidden_ssid ); + __dynamic_array(u8, ssid, info->ssid_len) + __field(bool, hidden_ssid) ), TP_fast_assign(
@@ -1739,7 +1739,7 @@ TRACE_EVENT(drv_join_ibss, VIF_ENTRY __field(u8, dtimper) __field(u16, bcnint) - __dynamic_array(u8, ssid, info->ssid_len); + __dynamic_array(u8, ssid, info->ssid_len) ), TP_fast_assign(
net/wireless/trace.h +3 -3
@@ -2009,7 +2009,7 @@ TRACE_EVENT(rdev_start_nan,WIPHY_ENTRY WDEV_ENTRY __field(u8, master_pref) - __field(u8, bands); + __field(u8, bands) ),TP_fast_assign ( WIPHY_ASSIGN;
@@ -2031,8 +2031,8 @@ TRACE_EVENT(rdev_nan_change_conf,WIPHY_ENTRY WDEV_ENTRY __field(u8, master_pref) - __field(u8, bands); -__field (u32 ,changes ); + __field(u8, bands) + __field(u32, changes) ),TP_fast_assign ( WIPHY_ASSIGN;
Re: [PATCH -v5 15/17] ftrace: Rework event_create_dir()
Quoted 13 lines · On Mon, 11 Nov 2019 14:13:07 +0100 Peter Zijlstra <[email protected]> wrote:
Rework
event_create_dir()to use an array of static data instead of function pointers where possible.The problem is that it would call the function pointer on module load before
parse_args(), possibly even beforejump_labelswere initialized. Luckily the generated functions don't usejump_labelsbut it still seems fragile. It also gets in the way of changing when we make the module map executable.The generated function are basically calling
trace_define_field()with a bunch of static arguments. So instead of a function, capture these arguments in a static array, avoiding the function call.
Quoted 8 lines
Now there are a number of cases where the fields are dynamic (syscall arguments, kprobes and uprobes), in which case a static array does not work, for these we preserve the function call. Luckily all these cases are not related to modules and so we can retain the function call for them.
Signed-off-by Peter Zijlstra (Intel) <[email protected]>Cc Steven Rostedt <[email protected]>
-- Steve
Quoted 25 lines
--- drivers/infiniband/hw/hfi1/trace_tid.h | 8 +- drivers/infiniband/hw/hfi1/trace_tx.h | 2 drivers/lightnvm/pblk-trace.h | 8 +- drivers/net/fjes/fjes_trace.h | 2 drivers/net/wireless/ath/ath10k/trace.h | 6 - fs/xfs/scrub/trace.h | 6 - fs/xfs/xfs_trace.h | 4 - include/linux/trace_events.h | 18 +++++ include/trace/events/filemap.h | 2 include/trace/events/rpcrdma.h | 2 include/trace/trace_events.h | 64 ++++++------------- kernel/trace/trace.h | 31 ++++----- kernel/trace/trace_entries.h | 66 +++++-------------- kernel/trace/trace_events.c | 20 +++++- kernel/trace/trace_events_hist.c | 8 ++ kernel/trace/trace_export.c | 106 +++++++++++--------------------- kernel/trace/trace_kprobe.c | 16 ++++ kernel/trace/trace_syscalls.c | 50 ++++++--------- kernel/trace/trace_uprobe.c | 9 ++ net/mac80211/trace.h | 28 ++++---- net/wireless/trace.h | 6 - 21 files changed, 213 insertions(+), 249 deletions(-)
[tip: core/kprobes] ftrace: Rework event_create_dir()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 60fdad00827cd32b4217bc50f7f62df0771e0bb8 Gitweb: https://git.kernel.org/tip/60fdad00827cd32b4217bc50f7f62df0771e0bb8 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 24 Oct 2019 22:26:59 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 19 Nov 2019 13:13:07 +01:00
ftrace: Rework event_create_dir()
Rework event_create_dir() to use an array of static data instead of function pointers where possible.
The problem is that it would call the function pointer on module load before parse_args(), possibly even before jump_labels were initialized. Luckily the generated functions don't use jump_labels but it still seems fragile. It also gets in the way of changing when we make the module map executable.
The generated function are basically calling trace_define_field() with a bunch of static arguments. So instead of a function, capture these arguments in a static array, avoiding the function call.
Now there are a number of cases where the fields are dynamic (syscall arguments, kprobes and uprobes), in which case a static array does not work, for these we preserve the function call. Luckily all these cases are not related to modules and so we can retain the function call for them.
Also fix up all broken tracepoint definitions that now generate a compile error.
--- drivers/infiniband/hw/hfi1/trace_tid.h | 8 +- drivers/infiniband/hw/hfi1/trace_tx.h | 2 +- drivers/lightnvm/pblk-trace.h | 8 +- drivers/net/fjes/fjes_trace.h | 2 +- drivers/net/wireless/ath/ath10k/trace.h | 6 +- fs/xfs/scrub/trace.h | 6 +- fs/xfs/xfs_trace.h | 4 +- include/linux/trace_events.h | 18 +++- include/trace/events/filemap.h | 2 +- include/trace/events/rpcrdma.h | 2 +- include/trace/trace_events.h | 64 ++++---------- kernel/trace/trace.h | 31 +++---- kernel/trace/trace_entries.h | 66 +++----------- kernel/trace/trace_events.c | 20 +++- kernel/trace/trace_events_hist.c | 8 +- kernel/trace/trace_export.c | 106 ++++++++--------------- kernel/trace/trace_kprobe.c | 16 ++- kernel/trace/trace_syscalls.c | 50 ++++------- kernel/trace/trace_uprobe.c | 9 +- net/mac80211/trace.h | 28 +++--- net/wireless/trace.h | 6 +- 21 files changed, 213 insertions(+), 249 deletions(-)
drivers/infiniband/hw/hfi1/trace_tid.h +4 -4
@@ -138,10 +138,10 @@ TRACE_EVENT(/* put_tid */ TP_ARGS(dd, index, type, pa, order),TP_STRUCT__entry (/* entry */ DD_DEV_ENTRY (dd ) - __field(unsigned long, pa); - __field(u32, index); - __field(u32, type); - __field(u16, order); + __field(unsigned long, pa) +__field (u32, index) +__field (u32, type) +__field (u16, order) ),TP_fast_assign (/* assign */ DD_DEV_ASSIGN(dd);
drivers/infiniband/hw/hfi1/trace_tx.h +1 -1
@@ -588,7 +588,7 @@ TRACE_EVENT(hfi1_sdma_user_reqinfo, TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u8 subctxt, u16 *i),TP_ARGS (dd, ctxt, subctxt, i),TP_STRUCT__entry ( - DD_DEV_ENTRY(dd); +DD_DEV_ENTRY (dd)__field (u16 ,ctxt )__field (u8, subctxt) __field(u8, ver_opcode)
drivers/lightnvm/pblk-trace.h +4 -4
@@ -46,7 +46,7 @@ TRACE_EVENT(pblk_chunk_reset,TP_STRUCT__entry (__string (name ,name )__field (u64, ppa) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -72,7 +72,7 @@ TRACE_EVENT(pblk_chunk_state,TP_STRUCT__entry (__string (name ,name )__field (u64, ppa) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -98,7 +98,7 @@ TRACE_EVENT(pblk_line_state,TP_STRUCT__entry (__string (name ,name )__field (int, line) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -121,7 +121,7 @@ TRACE_EVENT(pblk_state,TP_STRUCT__entry (__string (name ,name ) - __field(int, state); +__field (int, state) ), TP_fast_assign(
drivers/net/fjes/fjes_trace.h +1 -1
@@ -28,7 +28,7 @@ TRACE_EVENT(fjes_hw_issue_request_command, __field(u8, cs_busy) __field(u8, cs_complete) __field(int, timeout) -__field (int, ret); +__field (int, ret) ),TP_fast_assign ( __entry->cr_req = cr->bits.req_code;
drivers/net/wireless/ath/ath10k/trace.h +3 -3
@@ -239,7 +239,7 @@ TRACE_EVENT(ath10k_wmi_dbglog,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(size_t, buf_len)__dynamic_array (u8, buf, buf_len) ),
@@ -269,7 +269,7 @@ TRACE_EVENT(ath10k_htt_pktlog,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(u16, buf_len)__dynamic_array (u8, pktlog, buf_len) ),
@@ -435,7 +435,7 @@ TRACE_EVENT(ath10k_htt_rx_desc,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(u16, len)__dynamic_array (u8, rxdesc, len) ),
fs/xfs/scrub/trace.h +3 -3
@@ -329,7 +329,7 @@ TRACE_EVENT(xchk_btree_op_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(int, error) __field(void *, ret_ip) ),
@@ -414,7 +414,7 @@ TRACE_EVENT(xchk_btree_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(void *, ret_ip) ), TP_fast_assign(
@@ -452,7 +452,7 @@ TRACE_EVENT(xchk_ifork_btree_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(void *, ret_ip) ), TP_fast_assign(
fs/xfs/xfs_trace.h +2 -2
@@ -218,8 +218,8 @@ DECLARE_EVENT_CLASS(xfs_bmap_class,TP_STRUCT__entry (__field (dev_t ,dev )__field (xfs_ino_t, ino) - __field(void *, leaf); -__field (int, pos); + __field(void *, leaf) +__field (int, pos)__field (xfs_fileoff_t, startoff)__field (xfs_fsblock_t, startblock) __field(xfs_filblks_t, blockcount)
include/linux/trace_events.h +17 -1
@@ -187,6 +187,22 @@ enum trace_reg {struct trace_event_call ; +#define TRACE_FUNCTION_TYPE ((const char *)~0UL) + +struct trace_event_fields { +const char *type; +union { +struct { +const char *name; +const int size; +const int align; +const int is_signed; +const int filter_type; + }; +int (*define_fields)(struct trace_event_call *); + }; +}; +struct trace_event_class {const char *system;void *probe;
@@ -195,7 +211,7 @@ struct trace_event_class {#endif int (*reg)(struct trace_event_call *event,enum trace_reg type,void *data); -int (*define_fields)(struct trace_event_call *); +struct trace_event_fields *fields_array;struct list_head *(*get_fields)(struct trace_event_call *);struct list_head fields;int (*raw_init)(struct trace_event_call *);
include/trace/events/filemap.h +1 -1
@@ -85,7 +85,7 @@ TRACE_EVENT(file_check_and_advance_wb_err, TP_ARGS(file, old),TP_STRUCT__entry ( - __field(struct file *, file); +__field (struct file *,file ) __field(unsigned long, i_ino)__field (dev_t, s_dev) __field(errseq_t, old)
include/trace/events/rpcrdma.h +1 -1
@@ -1507,7 +1507,7 @@ TRACE_EVENT(svcrdma_dma_map_page,TP_ARGS (rdma, page),TP_STRUCT__entry ( - __field(const void *, page); + __field(const void *, page) __string(device, rdma->sc_cm_id->device->name)__string (addr, rdma->sc_xprt.xpt_remotebuf) ),
include/trace/trace_events.h +21 -43
98 lines not on this page · raw message
kernel/trace/trace.h +14 -17
@@ -49,6 +49,9 @@ enum trace_type {#undef __field#define __field (type, item) type item; +#undef __field_fn +#define __field_fn (type, item) type item; +#undef __field_struct#define __field_struct (type, item) __field(type, item)
@@ -68,26 +71,22 @@ enum trace_type { #define F_STRUCT(args...) args#undef FTRACE_ENTRY -#define FTRACE_ENTRY (name, struct_name, id, tstruct, print, filter) \ +#define FTRACE_ENTRY (name, struct_name, id, tstruct, print) \ struct struct_name { \ struct trace_entry ent; \ tstruct \ }#undef FTRACE_ENTRY_DUP -#define FTRACE_ENTRY_DUP (name, name_struct, id, tstruct, printk, filter) +#define FTRACE_ENTRY_DUP (name, name_struct, id, tstruct, printk)#undef FTRACE_ENTRY_REG -#define FTRACE_ENTRY_REG (name, struct_name, id, tstruct, print, \ - filter, regfn) \ - FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_REG (name, struct_name, id, tstruct, print, regfn) \ + FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print))#undef FTRACE_ENTRY_PACKED -#define FTRACE_ENTRY_PACKED (name, struct_name, id, tstruct, print, \ - filter) \ - FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) __packed +#define FTRACE_ENTRY_PACKED (name, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print)) __packed#include "trace_entries.h"
@@ -1899,17 +1898,15 @@ extern void tracing_log_err(struct trace_array *tr,#define internal_trace_puts (str) __trace_puts(_THIS_IP_, str, strlen(str))#undef FTRACE_ENTRY -#define FTRACE_ENTRY (call, struct_name, id, tstruct, print, filter) \ +#define FTRACE_ENTRY (call, struct_name, id, tstruct, print) \ extern struct trace_event_call \ __aligned(4) event_##call;#undef FTRACE_ENTRY_DUP -#define FTRACE_ENTRY_DUP (call, struct_name, id, tstruct, print, filter) \ - FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_DUP (call, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))#undef FTRACE_ENTRY_PACKED -#define FTRACE_ENTRY_PACKED (call, struct_name, id, tstruct, print, filter) \ - FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_PACKED (call, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))#include "trace_entries.h"
kernel/trace/trace_entries.h +18 -48
178 lines not on this page · raw message
kernel/trace/trace_events.c +19 -1
@@ -24,6 +24,7 @@#include <linux/delay.h> #include <trace/events/sched.h> +#include <trace/syscall.h> #include <asm/setup.h>
@@ -1990,7 +1991,24 @@ event_create_dir(struct dentry *parent, struct trace_event_file *file)*/ head =trace_get_fields (call);if (list_empty (head)) { - ret = call->class->define_fields (call); +struct trace_event_fields *field = call->class->fields_array; +unsigned int offset =sizeof (struct trace_entry ); + +for (; field->type; field++) { +if (field->type ==TRACE_FUNCTION_TYPE ) { + ret = field->define_fields (call); +break ; + } + + offset =ALIGN (offset, field->align); + ret =trace_define_field (call, field->type, field->name, + offset, field->size, + field->is_signed, field->filter_type); +if (ret) +break ; + + offset += field->size; + }if (ret <0 ) {pr_warn ("Could not initialize trace point events/%s\n" , name);
kernel/trace/trace_events_hist.c +7 -1
@@ -1135,6 +1135,12 @@ static struct synth_event *find_synth_event(const char *name)return NULL ; } +static struct trace_event_fields synth_event_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = synth_event_define_fields }, + {} +}; +static int register_synth_event (struct synth_event *event) {struct trace_event_call *call = &event->call;
@@ -1156,7 +1162,7 @@ static int register_synth_event(struct synth_event *event)INIT_LIST_HEAD (&call->class->fields); call->event.funcs = &synth_event_funcs; - call->class->define_fields = synth_event_define_fields; + call->class->fields_array = synth_event_fields_array; ret =register_trace_event (&call->event);if (!ret) {
kernel/trace/trace_export.c +39 -67
165 lines not on this page · raw message
kernel/trace/trace_kprobe.c +14 -2
@@ -1534,16 +1534,28 @@ static struct trace_event_functions kprobe_funcs = { .trace = print_kprobe_event }; +static struct trace_event_fields kretprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = kretprobe_event_define_fields }, + {} +}; + +static struct trace_event_fields kprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = kprobe_event_define_fields }, + {} +}; +static inline void init_trace_event_call (struct trace_kprobe *tk) {struct trace_event_call *call =trace_probe_event_call (&tk->tp);if (trace_kprobe_is_return (tk)) { call->event.funcs = &kretprobe_funcs; - call->class->define_fields = kretprobe_event_define_fields; + call->class->fields_array = kretprobe_fields_array; }else { call->event.funcs = &kprobe_funcs; - call->class->define_fields = kprobe_event_define_fields; + call->class->fields_array = kprobe_fields_array; } call->flags =TRACE_EVENT_FL_KPROBE ;
kernel/trace/trace_syscalls.c +20 -30
93 lines not on this page · raw message
kernel/trace/trace_uprobe.c +7 -2
@@ -1507,12 +1507,17 @@ static struct trace_event_functions uprobe_funcs = { .trace = print_uprobe_event }; +static struct trace_event_fields uprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = uprobe_event_define_fields }, + {} +}; +static inline void init_trace_event_call (struct trace_uprobe *tu) {struct trace_event_call *call =trace_probe_event_call (&tu->tp); - call->event.funcs = &uprobe_funcs; - call->class->define_fields = uprobe_event_define_fields; + call->class->fields_array = uprobe_fields_array; call->flags =TRACE_EVENT_FL_UPROBE |TRACE_EVENT_FL_CAP_ANY ; call->class->reg = trace_uprobe_register;
net/mac80211/trace.h +14 -14
@@ -408,20 +408,20 @@ TRACE_EVENT(drv_bss_info_changed, __field(u32, basic_rates) __array(int, mcast_rate, NUM_NL80211_BANDS) __field(u16, ht_operation_mode) -__field (s32, cqm_rssi_thold); -__field (s32, cqm_rssi_hyst); -__field (u32, channel_width); -__field (u32, channel_cfreq1); + __field(s32, cqm_rssi_thold) + __field(s32, cqm_rssi_hyst) + __field(u32, channel_width) + __field(u32, channel_cfreq1)__dynamic_array (u32, arp_addr_list, info->arp_addr_cnt >IEEE80211_BSS_ARP_ADDR_LIST_LEN ?IEEE80211_BSS_ARP_ADDR_LIST_LEN : - info->arp_addr_cnt); -__field (int, arp_addr_cnt); -__field (bool, qos); -__field (bool, idle); -__field (bool, ps); -__dynamic_array (u8, ssid, info->ssid_len); -__field (bool, hidden_ssid); + info->arp_addr_cnt) + __field(int, arp_addr_cnt) + __field(bool, qos) + __field(bool, idle) + __field(bool, ps) + __dynamic_array(u8, ssid, info->ssid_len) + __field(bool, hidden_ssid) __field(int, txpower)__field (u8, p2p_oppps_ctwindow) ),
@@ -1672,8 +1672,8 @@ TRACE_EVENT(drv_start_ap, VIF_ENTRY __field(u8, dtimper) __field(u16, bcnint) - __dynamic_array(u8, ssid, info->ssid_len); -__field (bool ,hidden_ssid ); + __dynamic_array(u8, ssid, info->ssid_len) + __field(bool, hidden_ssid) ), TP_fast_assign(
@@ -1739,7 +1739,7 @@ TRACE_EVENT(drv_join_ibss, VIF_ENTRY __field(u8, dtimper) __field(u16, bcnint) - __dynamic_array(u8, ssid, info->ssid_len); + __dynamic_array(u8, ssid, info->ssid_len) ), TP_fast_assign(
net/wireless/trace.h +3 -3
@@ -2009,7 +2009,7 @@ TRACE_EVENT(rdev_start_nan,WIPHY_ENTRY WDEV_ENTRY __field(u8, master_pref) - __field(u8, bands); + __field(u8, bands) ),TP_fast_assign ( WIPHY_ASSIGN;
@@ -2031,8 +2031,8 @@ TRACE_EVENT(rdev_nan_change_conf,WIPHY_ENTRY WDEV_ENTRY __field(u8, master_pref) - __field(u8, bands); -__field (u32 ,changes ); + __field(u8, bands) + __field(u32, changes) ),TP_fast_assign ( WIPHY_ASSIGN;
[tip: core/kprobes] ftrace: Rework event_create_dir()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 04ae87a52074e2d448fc66143f1bd2c7d694d2b9 Gitweb: https://git.kernel.org/tip/04ae87a52074e2d448fc66143f1bd2c7d694d2b9 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 24 Oct 2019 22:26:59 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:25 +01:00
ftrace: Rework event_create_dir()
Rework event_create_dir() to use an array of static data instead of function pointers where possible.
The problem is that it would call the function pointer on module load before parse_args(), possibly even before jump_labels were initialized. Luckily the generated functions don't use jump_labels but it still seems fragile. It also gets in the way of changing when we make the module map executable.
The generated function are basically calling trace_define_field() with a bunch of static arguments. So instead of a function, capture these arguments in a static array, avoiding the function call.
Now there are a number of cases where the fields are dynamic (syscall arguments, kprobes and uprobes), in which case a static array does not work, for these we preserve the function call. Luckily all these cases are not related to modules and so we can retain the function call for them.
Also fix up all broken tracepoint definitions that now generate a compile error.
--- drivers/infiniband/hw/hfi1/trace_tid.h | 8 +- drivers/infiniband/hw/hfi1/trace_tx.h | 2 +- drivers/lightnvm/pblk-trace.h | 8 +- drivers/net/fjes/fjes_trace.h | 2 +- drivers/net/wireless/ath/ath10k/trace.h | 6 +- fs/xfs/scrub/trace.h | 6 +- fs/xfs/xfs_trace.h | 4 +- include/linux/trace_events.h | 18 +++- include/trace/events/filemap.h | 2 +- include/trace/events/rpcrdma.h | 2 +- include/trace/trace_events.h | 64 ++++---------- kernel/trace/trace.h | 31 +++---- kernel/trace/trace_entries.h | 66 +++----------- kernel/trace/trace_events.c | 20 +++- kernel/trace/trace_events_hist.c | 8 +- kernel/trace/trace_export.c | 106 ++++++++--------------- kernel/trace/trace_kprobe.c | 16 ++- kernel/trace/trace_syscalls.c | 50 ++++------- kernel/trace/trace_uprobe.c | 9 +- net/mac80211/trace.h | 28 +++--- net/wireless/trace.h | 6 +- 21 files changed, 213 insertions(+), 249 deletions(-)
drivers/infiniband/hw/hfi1/trace_tid.h +4 -4
@@ -138,10 +138,10 @@ TRACE_EVENT(/* put_tid */ TP_ARGS(dd, index, type, pa, order),TP_STRUCT__entry (/* entry */ DD_DEV_ENTRY (dd ) - __field(unsigned long, pa); - __field(u32, index); - __field(u32, type); - __field(u16, order); + __field(unsigned long, pa) +__field (u32, index) +__field (u32, type) +__field (u16, order) ),TP_fast_assign (/* assign */ DD_DEV_ASSIGN(dd);
drivers/infiniband/hw/hfi1/trace_tx.h +1 -1
@@ -588,7 +588,7 @@ TRACE_EVENT(hfi1_sdma_user_reqinfo, TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u8 subctxt, u16 *i),TP_ARGS (dd, ctxt, subctxt, i),TP_STRUCT__entry ( - DD_DEV_ENTRY(dd); +DD_DEV_ENTRY (dd)__field (u16 ,ctxt )__field (u8, subctxt) __field(u8, ver_opcode)
drivers/lightnvm/pblk-trace.h +4 -4
@@ -46,7 +46,7 @@ TRACE_EVENT(pblk_chunk_reset,TP_STRUCT__entry (__string (name ,name )__field (u64, ppa) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -72,7 +72,7 @@ TRACE_EVENT(pblk_chunk_state,TP_STRUCT__entry (__string (name ,name )__field (u64, ppa) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -98,7 +98,7 @@ TRACE_EVENT(pblk_line_state,TP_STRUCT__entry (__string (name ,name )__field (int, line) - __field(int, state); +__field (int, state) ), TP_fast_assign(
@@ -121,7 +121,7 @@ TRACE_EVENT(pblk_state,TP_STRUCT__entry (__string (name ,name ) - __field(int, state); +__field (int, state) ), TP_fast_assign(
drivers/net/fjes/fjes_trace.h +1 -1
@@ -28,7 +28,7 @@ TRACE_EVENT(fjes_hw_issue_request_command, __field(u8, cs_busy) __field(u8, cs_complete) __field(int, timeout) -__field (int, ret); +__field (int, ret) ),TP_fast_assign ( __entry->cr_req = cr->bits.req_code;
drivers/net/wireless/ath/ath10k/trace.h +3 -3
@@ -239,7 +239,7 @@ TRACE_EVENT(ath10k_wmi_dbglog,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(size_t, buf_len)__dynamic_array (u8, buf, buf_len) ),
@@ -269,7 +269,7 @@ TRACE_EVENT(ath10k_htt_pktlog,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(u16, buf_len)__dynamic_array (u8, pktlog, buf_len) ),
@@ -435,7 +435,7 @@ TRACE_EVENT(ath10k_htt_rx_desc,TP_STRUCT__entry ( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) - __field(u8, hw_type); + __field(u8, hw_type) __field(u16, len)__dynamic_array (u8, rxdesc, len) ),
fs/xfs/scrub/trace.h +3 -3
@@ -329,7 +329,7 @@ TRACE_EVENT(xchk_btree_op_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(int, error) __field(void *, ret_ip) ),
@@ -414,7 +414,7 @@ TRACE_EVENT(xchk_btree_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(void *, ret_ip) ), TP_fast_assign(
@@ -452,7 +452,7 @@ TRACE_EVENT(xchk_ifork_btree_error, __field(int, level) __field(xfs_agnumber_t, agno) __field(xfs_agblock_t, bno) -__field (int, ptr); + __field(int, ptr) __field(void *, ret_ip) ), TP_fast_assign(
fs/xfs/xfs_trace.h +2 -2
@@ -218,8 +218,8 @@ DECLARE_EVENT_CLASS(xfs_bmap_class,TP_STRUCT__entry (__field (dev_t ,dev )__field (xfs_ino_t, ino) - __field(void *, leaf); -__field (int, pos); + __field(void *, leaf) +__field (int, pos)__field (xfs_fileoff_t, startoff)__field (xfs_fsblock_t, startblock) __field(xfs_filblks_t, blockcount)
include/linux/trace_events.h +17 -1
@@ -187,6 +187,22 @@ enum trace_reg {struct trace_event_call ; +#define TRACE_FUNCTION_TYPE ((const char *)~0UL) + +struct trace_event_fields { +const char *type; +union { +struct { +const char *name; +const int size; +const int align; +const int is_signed; +const int filter_type; + }; +int (*define_fields)(struct trace_event_call *); + }; +}; +struct trace_event_class {const char *system;void *probe;
@@ -195,7 +211,7 @@ struct trace_event_class {#endif int (*reg)(struct trace_event_call *event,enum trace_reg type,void *data); -int (*define_fields)(struct trace_event_call *); +struct trace_event_fields *fields_array;struct list_head *(*get_fields)(struct trace_event_call *);struct list_head fields;int (*raw_init)(struct trace_event_call *);
include/trace/events/filemap.h +1 -1
@@ -85,7 +85,7 @@ TRACE_EVENT(file_check_and_advance_wb_err, TP_ARGS(file, old),TP_STRUCT__entry ( - __field(struct file *, file); +__field (struct file *,file ) __field(unsigned long, i_ino)__field (dev_t, s_dev) __field(errseq_t, old)
include/trace/events/rpcrdma.h +1 -1
@@ -1507,7 +1507,7 @@ TRACE_EVENT(svcrdma_dma_map_page,TP_ARGS (rdma, page),TP_STRUCT__entry ( - __field(const void *, page); + __field(const void *, page) __string(device, rdma->sc_cm_id->device->name)__string (addr, rdma->sc_xprt.xpt_remotebuf) ),
include/trace/trace_events.h +21 -43
98 lines not on this page · raw message
kernel/trace/trace.h +14 -17
@@ -49,6 +49,9 @@ enum trace_type {#undef __field#define __field (type, item) type item; +#undef __field_fn +#define __field_fn (type, item) type item; +#undef __field_struct#define __field_struct (type, item) __field(type, item)
@@ -68,26 +71,22 @@ enum trace_type { #define F_STRUCT(args...) args#undef FTRACE_ENTRY -#define FTRACE_ENTRY (name, struct_name, id, tstruct, print, filter) \ +#define FTRACE_ENTRY (name, struct_name, id, tstruct, print) \ struct struct_name { \ struct trace_entry ent; \ tstruct \ }#undef FTRACE_ENTRY_DUP -#define FTRACE_ENTRY_DUP (name, name_struct, id, tstruct, printk, filter) +#define FTRACE_ENTRY_DUP (name, name_struct, id, tstruct, printk)#undef FTRACE_ENTRY_REG -#define FTRACE_ENTRY_REG (name, struct_name, id, tstruct, print, \ - filter, regfn) \ - FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_REG (name, struct_name, id, tstruct, print, regfn) \ + FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print))#undef FTRACE_ENTRY_PACKED -#define FTRACE_ENTRY_PACKED (name, struct_name, id, tstruct, print, \ - filter) \ - FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) __packed +#define FTRACE_ENTRY_PACKED (name, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print)) __packed#include "trace_entries.h"
@@ -1899,17 +1898,15 @@ extern void tracing_log_err(struct trace_array *tr,#define internal_trace_puts (str) __trace_puts(_THIS_IP_, str, strlen(str))#undef FTRACE_ENTRY -#define FTRACE_ENTRY (call, struct_name, id, tstruct, print, filter) \ +#define FTRACE_ENTRY (call, struct_name, id, tstruct, print) \ extern struct trace_event_call \ __aligned(4) event_##call;#undef FTRACE_ENTRY_DUP -#define FTRACE_ENTRY_DUP (call, struct_name, id, tstruct, print, filter) \ - FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_DUP (call, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))#undef FTRACE_ENTRY_PACKED -#define FTRACE_ENTRY_PACKED (call, struct_name, id, tstruct, print, filter) \ - FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \ - filter) +#define FTRACE_ENTRY_PACKED (call, struct_name, id, tstruct, print) \ + FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))#include "trace_entries.h"
kernel/trace/trace_entries.h +18 -48
178 lines not on this page · raw message
kernel/trace/trace_events.c +19 -1
@@ -24,6 +24,7 @@#include <linux/delay.h> #include <trace/events/sched.h> +#include <trace/syscall.h> #include <asm/setup.h>
@@ -1990,7 +1991,24 @@ event_create_dir(struct dentry *parent, struct trace_event_file *file)*/ head =trace_get_fields (call);if (list_empty (head)) { - ret = call->class->define_fields (call); +struct trace_event_fields *field = call->class->fields_array; +unsigned int offset =sizeof (struct trace_entry ); + +for (; field->type; field++) { +if (field->type ==TRACE_FUNCTION_TYPE ) { + ret = field->define_fields (call); +break ; + } + + offset =ALIGN (offset, field->align); + ret =trace_define_field (call, field->type, field->name, + offset, field->size, + field->is_signed, field->filter_type); +if (ret) +break ; + + offset += field->size; + }if (ret <0 ) {pr_warn ("Could not initialize trace point events/%s\n" , name);
kernel/trace/trace_events_hist.c +7 -1
@@ -1135,6 +1135,12 @@ static struct synth_event *find_synth_event(const char *name)return NULL ; } +static struct trace_event_fields synth_event_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = synth_event_define_fields }, + {} +}; +static int register_synth_event (struct synth_event *event) {struct trace_event_call *call = &event->call;
@@ -1156,7 +1162,7 @@ static int register_synth_event(struct synth_event *event)INIT_LIST_HEAD (&call->class->fields); call->event.funcs = &synth_event_funcs; - call->class->define_fields = synth_event_define_fields; + call->class->fields_array = synth_event_fields_array; ret =register_trace_event (&call->event);if (!ret) {
kernel/trace/trace_export.c +39 -67
165 lines not on this page · raw message
kernel/trace/trace_kprobe.c +14 -2
@@ -1534,16 +1534,28 @@ static struct trace_event_functions kprobe_funcs = { .trace = print_kprobe_event }; +static struct trace_event_fields kretprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = kretprobe_event_define_fields }, + {} +}; + +static struct trace_event_fields kprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = kprobe_event_define_fields }, + {} +}; +static inline void init_trace_event_call (struct trace_kprobe *tk) {struct trace_event_call *call =trace_probe_event_call (&tk->tp);if (trace_kprobe_is_return (tk)) { call->event.funcs = &kretprobe_funcs; - call->class->define_fields = kretprobe_event_define_fields; + call->class->fields_array = kretprobe_fields_array; }else { call->event.funcs = &kprobe_funcs; - call->class->define_fields = kprobe_event_define_fields; + call->class->fields_array = kprobe_fields_array; } call->flags =TRACE_EVENT_FL_KPROBE ;
kernel/trace/trace_syscalls.c +20 -30
93 lines not on this page · raw message
kernel/trace/trace_uprobe.c +7 -2
@@ -1507,12 +1507,17 @@ static struct trace_event_functions uprobe_funcs = { .trace = print_uprobe_event }; +static struct trace_event_fields uprobe_fields_array[] = { + { .type =TRACE_FUNCTION_TYPE , + .define_fields = uprobe_event_define_fields }, + {} +}; +static inline void init_trace_event_call (struct trace_uprobe *tu) {struct trace_event_call *call =trace_probe_event_call (&tu->tp); - call->event.funcs = &uprobe_funcs; - call->class->define_fields = uprobe_event_define_fields; + call->class->fields_array = uprobe_fields_array; call->flags =TRACE_EVENT_FL_UPROBE |TRACE_EVENT_FL_CAP_ANY ; call->class->reg = trace_uprobe_register;
net/mac80211/trace.h +14 -14
@@ -408,20 +408,20 @@ TRACE_EVENT(drv_bss_info_changed, __field(u32, basic_rates) __array(int, mcast_rate, NUM_NL80211_BANDS) __field(u16, ht_operation_mode) -__field (s32, cqm_rssi_thold); -__field (s32, cqm_rssi_hyst); -__field (u32, channel_width); -__field (u32, channel_cfreq1); + __field(s32, cqm_rssi_thold) + __field(s32, cqm_rssi_hyst) + __field(u32, channel_width) + __field(u32, channel_cfreq1)__dynamic_array (u32, arp_addr_list, info->arp_addr_cnt >IEEE80211_BSS_ARP_ADDR_LIST_LEN ?IEEE80211_BSS_ARP_ADDR_LIST_LEN : - info->arp_addr_cnt); -__field (int, arp_addr_cnt); -__field (bool, qos); -__field (bool, idle); -__field (bool, ps); -__dynamic_array (u8, ssid, info->ssid_len); -__field (bool, hidden_ssid); + info->arp_addr_cnt) + __field(int, arp_addr_cnt) + __field(bool, qos) + __field(bool, idle) + __field(bool, ps) + __dynamic_array(u8, ssid, info->ssid_len) + __field(bool, hidden_ssid) __field(int, txpower)__field (u8, p2p_oppps_ctwindow) ),
@@ -1672,8 +1672,8 @@ TRACE_EVENT(drv_start_ap, VIF_ENTRY __field(u8, dtimper) __field(u16, bcnint) - __dynamic_array(u8, ssid, info->ssid_len); -__field (bool ,hidden_ssid ); + __dynamic_array(u8, ssid, info->ssid_len) + __field(bool, hidden_ssid) ), TP_fast_assign(
@@ -1739,7 +1739,7 @@ TRACE_EVENT(drv_join_ibss, VIF_ENTRY __field(u8, dtimper) __field(u16, bcnint) - __dynamic_array(u8, ssid, info->ssid_len); + __dynamic_array(u8, ssid, info->ssid_len) ), TP_fast_assign(
net/wireless/trace.h +3 -3
@@ -2009,7 +2009,7 @@ TRACE_EVENT(rdev_start_nan,WIPHY_ENTRY WDEV_ENTRY __field(u8, master_pref) - __field(u8, bands); + __field(u8, bands) ),TP_fast_assign ( WIPHY_ASSIGN;
@@ -2031,8 +2031,8 @@ TRACE_EVENT(rdev_nan_change_conf,WIPHY_ENTRY WDEV_ENTRY __field(u8, master_pref) - __field(u8, bands); -__field (u32 ,changes ); + __field(u8, bands) + __field(u32, changes) ),TP_fast_assign ( WIPHY_ASSIGN;
Peter Zijlstra
maintainerPATCH 16/17 x86/kprobe: Add comments to arch_{,un}optimize_kprobes()
In reply to Peter ZijlstraAdd a few words describing how it is safe to overwrite the 4 bytes after a kprobe. In specific it is possible the JMP.d32 required for the optimized kprobe overwrites multiple instructions.
--- arch/x86/kernel/kprobes/opt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes/opt.c +12 -2
@@ -414,8 +414,12 @@ int arch_prepare_optimized_kprobe(struct }/* -* Replace breakpoints (int3) with relative jumps. +* Replace breakpoints (INT3) with relative jumps (JMP.d32). * Caller must call with locking kprobe_mutex and text_mutex. +* +* The caller will have installed a regular kprobe and after that issued +* syncrhonize_rcu_tasks(), this ensures that the instruction(s) that live in +* the 4 bytes after the INT3 are unused and can now be overwritten. */ void arch_optimize_kprobes (struct list_head *oplist) {
@@ -441,7 +445,13 @@ void arch_optimize_kprobes(struct list_h } } -/* Replace a relative jump with a breakpoint (int3). */ +/* +* Replace a relative jump (JMP.d32) with a breakpoint (INT3). +* +* After that, we can restore the 4 bytes after the INT3 to undo what +* arch_optimize_kprobes() scribbled. This is safe since those bytes will be +* unused once the INT3 lands. +*/ void arch_unoptimize_kprobe (struct optimized_kprobe *op) {arch_arm_kprobe (&op->kp);
[tip: core/kprobes] x86/kprobe: Add comments to arch_{,un}optimize_kprobes()
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 654920255149b034ad5a8aee6b02cfa16e65e9c0 Gitweb: https://git.kernel.org/tip/654920255149b034ad5a8aee6b02cfa16e65e9c0 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 11 Nov 2019 14:02:10 +01:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 19 Nov 2019 13:13:08 +01:00
x86/kprobe: Add comments to arch_{,un}optimize_kprobes()
Add a few words describing how it is safe to overwrite the 4 bytes after a kprobe. In specific it is possible the JMP.d32 required for the optimized kprobe overwrites multiple instructions.
--- arch/x86/kernel/kprobes/opt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes/opt.c +12 -2
@@ -414,8 +414,12 @@ err: }/* -* Replace breakpoints (int3) with relative jumps. +* Replace breakpoints (INT3) with relative jumps (JMP.d32). * Caller must call with locking kprobe_mutex and text_mutex. +* +* The caller will have installed a regular kprobe and after that issued +* syncrhonize_rcu_tasks(), this ensures that the instruction(s) that live in +* the 4 bytes after the INT3 are unused and can now be overwritten. */ void arch_optimize_kprobes (struct list_head *oplist) {
@@ -441,7 +445,13 @@ void arch_optimize_kprobes(struct list_head *oplist) } } -/* Replace a relative jump with a breakpoint (int3). */ +/* +* Replace a relative jump (JMP.d32) with a breakpoint (INT3). +* +* After that, we can restore the 4 bytes after the INT3 to undo what +* arch_optimize_kprobes() scribbled. This is safe since those bytes will be +* unused once the INT3 lands. +*/ void arch_unoptimize_kprobe (struct optimized_kprobe *op) {arch_arm_kprobe (&op->kp);
[tip: core/kprobes] x86/kprobe: Add comments to arch_{,un}optimize_kprobes()
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: f2cb4f95b7571f2bebcf226cd92b448fd58950ca Gitweb: https://git.kernel.org/tip/f2cb4f95b7571f2bebcf226cd92b448fd58950ca Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 11 Nov 2019 14:02:10 +01:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:25 +01:00
x86/kprobe: Add comments to arch_{,un}optimize_kprobes()
Add a few words describing how it is safe to overwrite the 4 bytes after a kprobe. In specific it is possible the JMP.d32 required for the optimized kprobe overwrites multiple instructions.
--- arch/x86/kernel/kprobes/opt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes/opt.c +12 -2
@@ -414,8 +414,12 @@ err: }/* -* Replace breakpoints (int3) with relative jumps. +* Replace breakpoints (INT3) with relative jumps (JMP.d32). * Caller must call with locking kprobe_mutex and text_mutex. +* +* The caller will have installed a regular kprobe and after that issued +* syncrhonize_rcu_tasks(), this ensures that the instruction(s) that live in +* the 4 bytes after the INT3 are unused and can now be overwritten. */ void arch_optimize_kprobes (struct list_head *oplist) {
@@ -441,7 +445,13 @@ void arch_optimize_kprobes(struct list_head *oplist) } } -/* Replace a relative jump with a breakpoint (int3). */ +/* +* Replace a relative jump (JMP.d32) with a breakpoint (INT3). +* +* After that, we can restore the 4 bytes after the INT3 to undo what +* arch_optimize_kprobes() scribbled. This is safe since those bytes will be +* unused once the INT3 lands. +*/ void arch_unoptimize_kprobe (struct optimized_kprobe *op) {arch_arm_kprobe (&op->kp);
Peter Zijlstra
maintainerPATCH 17/17 x86/alternative: Use INT3_INSN_SIZE
In reply to Peter ZijlstraUse INT3_INSN_SIZE instead of sizeof(int3).
--- arch/x86/kernel/alternative.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/x86/kernel/alternative.c +6 -6
@@ -1088,7 +1088,7 @@ static void text_poke_bp_batch(struct te* First step: add a int3 trap to the address that will be patched. */ for (i =0 ; i < nr_entries; i++) -text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), &int3,INT3_INSN_SIZE );text_poke_sync ();
@@ -1098,10 +1098,10 @@ static void text_poke_bp_batch(struct tefor (do_sync =0 , i =0 ; i < nr_entries; i++) {int len =text_opcode_size (tp[i].opcode); -if (len -sizeof (int3) >0 ) { -text_poke (text_poke_addr (&tp[i]) +sizeof (int3), - (const char *)tp[i].text +sizeof (int3), - len -sizeof (int3)); +if (len -INT3_INSN_SIZE >0 ) { +text_poke (text_poke_addr (&tp[i]) +INT3_INSN_SIZE , + (const char *)tp[i].text +INT3_INSN_SIZE , + len -INT3_INSN_SIZE ); do_sync++; } }
@@ -1123,7 +1123,7 @@ static void text_poke_bp_batch(struct teif (tp[i].text[0 ] ==INT3_INSN_OPCODE )continue ; -text_poke (text_poke_addr (&tp[i]), tp[i].text,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), tp[i].text,INT3_INSN_SIZE ); do_sync++; }
[tip: core/kprobes] x86/alternatives: Use INT3_INSN_SIZE
The following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 0be6748cdf517626d10a055f3ac9f388a4ab1cce Gitweb: https://git.kernel.org/tip/0be6748cdf517626d10a055f3ac9f388a4ab1cce Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 11 Nov 2019 14:08:26 +01:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 19 Nov 2019 13:13:09 +01:00
x86/alternatives: Use INT3_INSN_SIZE
Use INT3_INSN_SIZE instead of sizeof(int3).
--- arch/x86/kernel/alternative.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/x86/kernel/alternative.c +6 -6
@@ -1088,7 +1088,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries* First step: add a int3 trap to the address that will be patched. */ for (i =0 ; i < nr_entries; i++) -text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), &int3,INT3_INSN_SIZE );text_poke_sync ();
@@ -1098,10 +1098,10 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesfor (do_sync =0 , i =0 ; i < nr_entries; i++) {int len =text_opcode_size (tp[i].opcode); -if (len -sizeof (int3) >0 ) { -text_poke (text_poke_addr (&tp[i]) +sizeof (int3), - (const char *)tp[i].text +sizeof (int3), - len -sizeof (int3)); +if (len -INT3_INSN_SIZE >0 ) { +text_poke (text_poke_addr (&tp[i]) +INT3_INSN_SIZE , + (const char *)tp[i].text +INT3_INSN_SIZE , + len -INT3_INSN_SIZE ); do_sync++; } }
@@ -1123,7 +1123,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesif (tp[i].text[0 ] ==INT3_INSN_OPCODE )continue ; -text_poke (text_poke_addr (&tp[i]), tp[i].text,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), tp[i].text,INT3_INSN_SIZE ); do_sync++; }
[tip: core/kprobes] x86/alternatives: Use INT3_INSN_SIZE
In reply to Peter ZijlstraThe following commit has been merged into the core/kprobes branch of tip:
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 76ffa7204b1ad7d321ac3a0292fdf3975d14866b Gitweb: https://git.kernel.org/tip/76ffa7204b1ad7d321ac3a0292fdf3975d14866b Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 11 Nov 2019 14:08:26 +01:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 27 Nov 2019 07:44:25 +01:00
x86/alternatives: Use INT3_INSN_SIZE
Use INT3_INSN_SIZE instead of sizeof(int3).
--- arch/x86/kernel/alternative.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/x86/kernel/alternative.c +6 -6
@@ -1088,7 +1088,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries* First step: add a int3 trap to the address that will be patched. */ for (i =0 ; i < nr_entries; i++) -text_poke (text_poke_addr (&tp[i]), &int3,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), &int3,INT3_INSN_SIZE );text_poke_sync ();
@@ -1098,10 +1098,10 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesfor (do_sync =0 , i =0 ; i < nr_entries; i++) {int len =text_opcode_size (tp[i].opcode); -if (len -sizeof (int3) >0 ) { -text_poke (text_poke_addr (&tp[i]) +sizeof (int3), - (const char *)tp[i].text +sizeof (int3), - len -sizeof (int3)); +if (len -INT3_INSN_SIZE >0 ) { +text_poke (text_poke_addr (&tp[i]) +INT3_INSN_SIZE , + (const char *)tp[i].text +INT3_INSN_SIZE , + len -INT3_INSN_SIZE ); do_sync++; } }
@@ -1123,7 +1123,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entriesif (tp[i].text[0 ] ==INT3_INSN_OPCODE )continue ; -text_poke (text_poke_addr (&tp[i]), tp[i].text,sizeof (int3)); +text_poke (text_poke_addr (&tp[i]), tp[i].text,INT3_INSN_SIZE ); do_sync++; }
Quoted 11 lines · Peter Zijlstra
Ftrace is one of the last W^X violators (after this only KLP is left). These patches move it over to the generic
text_poke()interface and thereby get rid of this oddity.The first 14 patches are the same as in the -v4 posting. The last 3 patches are new.
Will, patch 13, arm/ftrace, is unchanged. This is because this way it preserves behaviour, but if you can provide me a tested-by for the simpler variant I can drop that in.
Quoted 6 lines
Patch 15 reworks ftrace's
event_create_dir(), which ran module code before the module was finished loading (before we even appliedjump_labelsand all that).Patch 16 and 17 address minor review feedback.
Ingo, Alexei wants patch #1 for some BPF stuff, can he get that in a topic branch?
Thanks Peter!
Much appreciate it.
I've re-tested the patch 1 alone (it seems to be exactly the same as you posted it originally back on Aug 27 and then on Oct 7). And now I tested my stuff with this whole set. No conflicts. Feel free to add to patch 1 alone or the whole set:
Some of the patches I think are split too fine. I would have combined them, but we try hard to limit our sets to less than fifteen in bpf/netdev land fwiw.
It was a poor judgment on my side to use text_poke() in my patch (to avoid explicit dependency on your patch) and not mention the obvious race in the commit log and intended fix when trees converge:
case BPF_MOD_CALL_TO_CALL:
if (memcmp(ip, old_insn, X86_CALL_SIZE))
goto out;
- text_poke(ip, new_insn, X86_CALL_SIZE);
+ text_poke_bp(ip, new_insn, X86_CALL_SIZE, NULL);
break;To avoid the issue in the first place the best is to have your 1st patch in tip and bpf-next/net-next trees. We had "the same patch in multiple trees" situation in the past and git did the right thing during the merge window. So I don't anticipate any issues this time around.
One more question.
What is the reason you stick to int3 style poking when 8 byte write is atomic? Can text_poke() patch nop5 by combining the call/jmp5 insn with extra 3 bytes after the nop and write 8 ?
Peter Zijlstra
maintainerQuoted 4 lines · Alexei Starovoitov
One more question.
What is the reason you stick to int3 style poking when 8 byte write is atomic? Cantext_poke()patch nop5 by combining the call/jmp5 insn with extra 3 bytes after the nop and write 8 ?
I think that question came up a while back (in one of the many static_call threads IIRC), and it basically boils down to there being far too many x86 uarchs to be sure of anything.
Instruction fetch width is not always (well) specified and aligning instructions on i-fetch boundaries (or ensuring they don't cross) was deemed too fragile (also, it wastes space).
This scheme is blessed by the hardware folks, and while it might be a little cumbersome, it isn't too horrible. Also, actually using that exception turns out to be beneficial for tracing text changes, see also this thread:
Peter Zijlstra
maintainerQuoted 2 lines · Alexei Starovoitov
Some of the patches I think are split too fine. I would have combined them, but we try hard to limit our sets to less than fifteen in bpf/netdev land fwiw.
Yeah, the series is getting too long (in fact I have a whole pile more).
I tend to try and not re-arrange a series if I don't have to in order to avoid breaking things by accident when shuffling them around. But yes, I could avoid some things by folding and re-ordering.
Dunno, maybe if I'm forced to do another round :/
Quoted 5 lines · Peter Zijlstra
Quoted 2 lines · Alexei Starovoitov
Some of the patches I think are split too fine. I would have combined them, but we try hard to limit our sets to less than fifteen in bpf/netdev land fwiw.
Quoted 7 lines
Yeah, the series is getting too long (in fact I have a whole pile more).
I tend to try and not re-arrange a series if I don't have to in order to avoid breaking things by accident when shuffling them around. But yes, I could avoid some things by folding and re-ordering.
Dunno, maybe if I'm forced to do another round :/
I would just land what you already have and keep iterating on top if necessary. The core pieces were ready back in August. There is always some room for improvement. Your other static_call set can also land now. I'd like to play with it too.
Quoted 11 lines · On Mon, 11 Nov 2019 14:12:52 +0100 Peter Zijlstra <[email protected]> wrote:
Ftrace is one of the last W^X violators (after this only KLP is left). These patches move it over to the generic
text_poke()interface and thereby get rid of this oddity.The first 14 patches are the same as in the -v4 posting. The last 3 patches are new.
Will, patch 13, arm/ftrace, is unchanged. This is because this way it preserves behaviour, but if you can provide me a tested-by for the simpler variant I can drop that in.
Quoted 6 lines
Patch 15 reworks ftrace's
event_create_dir(), which ran module code before the module was finished loading (before we even appliedjump_labelsand all that).Patch 16 and 17 address minor review feedback.
Ingo, Alexei wants patch #1 for some BPF stuff, can he get that in a topic branch?
Hi Peter,
I ran this through my entire test suite and it actually passed :-)
series, at least the x86 and generic part).
I'm still reviewing this series, I had some questions about patch 5 that I sent out already.
-- Steve
Masami Hiramatsu
maintainerHi Peter,
I got a BUG in poke_int3_handler() on 8 threads qemu x86-64 while testing multi-probe testcase.
I couldn't reproduce it because maybe it is a timing bug.
(Sorry, since the terminal line-wrap is disabled, the last chars are overwritten)
BUG: kernel NULL pointer dereference, add8 [ 1475.147390] #PF: supervisor read access in kernel mode [ 1475.148380] #PF: error_code(0x0000) - not-present page [ 1475.149362] PGD 0 P4D 0 [ 1475.149970] Oops: 0000 [#1] PREEMPT SMP PTI [ 1475.150824] CPU: 6 PID: 0 Comm: swapper/6 Not tainted 5.4.0-rc6+ #19 [ 1475.151996] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a4 [ 1475.154078] RIP: 0010:poke_int3_handler+0x33/0x70 [ 1475.155008] Code: d2 75 04 31 c0 5b c3 f6 87 88 00 00 00 03 75 f3 48 8b 87 80 00 00 00 48 89 fb b [ 1475.158308] RSP: 0018:ffffc900001a8c10 EFLAGS: 00010046 [ 1475.159345] RAX: 0000000000000000 RBX: ffffc900001a8c38 RCX: ffffffff81800b57 [ 1475.160653] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffffffff81026ec5 [ 1475.162032] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 1475.163448] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 1475.164828] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1475.166180] FS: 0000000000000000(0000) GS:ffff88807d980000(0000) knlGS:0000000000000000 [ 1475.167876] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1475.169066] CR2: 0000000000000008 CR3: 000000000201e000 CR4: 00000000000006a0 [ 1475.170431] Call Trace: [ 1475.171064] <IRQ> [ 1475.171609] do_int3+0xd/0xf0 [ 1475.172302] int3+0x42/0x50 [ 1475.173014] RIP: 0010:sched_clock+0x6/0x10 [ 1475.174061] Code: d3 ea f6 c1 40 48 0f 45 c2 4c 01 c0 65 ff 0d 99 ee fe 7e 74 02 5d c3 e8 f8 ad f [ 1475.178461] RSP: 0018:ffffc900001a8d10 EFLAGS: 00000016 [ 1475.179475] RAX: 000001577e58ce4d RBX: ffff88807d261c00 RCX: 0000000000000000 [ 1475.180685] RDX: 0000000000000014 RSI: 0000000000000014 RDI: ffffffff82556180 [ 1475.181907] RBP: ffff88807d018600 R08: 000002ac502de60d R09: 0000000000000002 [ 1475.183213] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88807d261ce0 [ 1475.184365] R13: ffff88807d261d20 R14: 00000000000003e8 R15: 0000000000000002 [ 1475.185515] ? sched_clock+0x6/0x10 [ 1475.186173] trace_clock_local+0xc/0x20 [ 1475.186939] ring_buffer_lock_reserve+0x10d/0x410 [ 1475.187797] trace_event_buffer_lock_reserve+0x4a/0xf0 [ 1475.188740] kprobe_trace_func+0x10e/0x370 [ 1475.189489] ? sched_clock+0x6/0x10 [ 1475.190141] kprobe_dispatcher+0x39/0x60 [ 1475.190911] aggr_pre_handler+0x4c/0x90 [ 1475.191602] ? sched_clock+0x5/0x10 [ 1475.192317] kprobe_int3_handler+0x101/0x150 [ 1475.193133] do_int3+0x36/0xf0 [ 1475.193697] int3+0x42/0x50 [ 1475.194241] RIP: 0010:sched_clock+0x6/0x10 [ 1475.194947] Code: d3 ea f6 c1 40 48 0f 45 c2 4c 01 c0 65 ff 0d 99 ee fe 7e 74 02 5d c3 e8 f8 ad f [ 1475.197612] RSP: 0018:ffffc900001a8fc8 EFLAGS: 00000012 [ 1475.198466] RAX: 000001577e58cc7f RBX: 0000000000000000 RCX: 0000000000000000 [ 1475.199511] RDX: 0000000000000014 RSI: 0000000000000014 RDI: ffffffff82556180 [ 1475.200552] RBP: 0000000000000000 R08: 000002ac502de274 R09: 0000000000000001 [ 1475.201641] R10: 0000000000000000 R11: ffff88807d1a9e58 R12: 0000000000000000 [ 1475.202804] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1475.203932] ? sched_clock+0x6/0x10 [ 1475.204557] ? sched_clock+0x5/0x10 [ 1475.205176] sched_clock_cpu+0xe/0xd0 [ 1475.205830] irq_exit+0xb3/0xc0 [ 1475.206512] call_function_interrupt+0xf/0x20 [ 1475.207252] </IRQ> [ 1475.207714] RIP: 0010:default_idle+0x23/0x180 [ 1475.208449] Code: ff 90 90 90 90 90 90 41 55 41 54 55 53 e8 35 29 c7 ff 0f 1f 44 00 00 e8 8b af 5 [ 1475.211721] RSP: 0018:ffffc9000008feb8 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff03 [ 1475.213312] RAX: ffff88807d1a95c0 RBX: 0000000000000006 RCX: 0000000000000000 [ 1475.214687] RDX: 0000000000000046 RSI: 0000000000000006 RDI: ffff88807d1a95c0 [ 1475.216027] RBP: ffffffff8212da80 R08: 0000000000000001 R09: 0000000000000000 [ 1475.217399] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 1475.218867] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1475.220144] ? default_idle+0x15/0x180 [ 1475.220929] default_idle_call+0x26/0x30 [ 1475.221809] do_idle+0x1fe/0x220 [ 1475.222695] ? trace_hardirqs_on+0x2c/0xf0 [ 1475.223550] cpu_startup_entry+0x14/0x20 [ 1475.224390] start_secondary+0x152/0x180 [ 1475.225157] secondary_startup_64+0xa4/0xb0 [ 1475.226011] Modules linked in: [last unloaded: trace_printk] [ 1475.227028] CR2: 0000000000000008 [ 1475.227636] ---[ end trace 5d3d01238a02c9e8 ]--- [ 1475.228410] RIP: 0010:poke_int3_handler+0x33/0x70 [ 1475.229187] Code: d2 75 04 31 c0 5b c3 f6 87 88 00 00 00 03 75 f3 48 8b 87 80 00 00 00 48 89 fb b [ 1475.232231] RSP: 0018:ffffc900001a8c10 EFLAGS: 00010046 [ 1475.233180] RAX: 0000000000000000 RBX: ffffc900001a8c38 RCX: ffffffff81800b57 [ 1475.234374] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffffffff81026ec5 [ 1475.236003] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 1475.237818] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 1475.240007] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1475.242493] FS: 0000000000000000(0000) GS:ffff88807d980000(0000) knlGS:0000000000000000 [ 1475.245272] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1475.247136] CR2: 0000000000000008 CR3: 000000000201e000 CR4: 00000000000006a0 [ 1475.249053] Kernel panic - not syncing: Fatal exception [ 1475.250593] Kernel Offset: disabled [ 1475.251459] ---[ end Kernel panic - not syncing: Fatal exception ]---
$ eu-addr2line -e ./vmlinux poke_int3_handler+0x33 arch/x86/kernel/alternative.c:996:6
-----
int poke_int3_handler(struct pt_regs *regs)
{
struct text_poke_loc *tp;
unsigned char int3 = 0xcc;
void *ip;
/*
* Having observed our INT3 instruction, we now must observe
* bp_patching.nr_entries.
*
* nr_entries != 0 INT3
* WMB RMB
* write INT3 if (nr_entries)
*
* Idem for other elements in bp_patching.
*/
smp_rmb();
if (likely(!bp_patching.nr_entries))
return 0;
if (user_mode(regs))
return 0;
/*
* Discount the sizeof(int3). See text_poke_bp_batch().
*/
ip = (void *) regs->ip - sizeof(int3);
/*
* Skip the binary search if there is a single member in the vector.
*/
if (unlikely(bp_patching.nr_entries > 1)) {
tp = bsearch(ip, bp_patching.vec, bp_patching.nr_entries,
sizeof(struct text_poke_loc),
patch_cmp);
if (!tp)
return 0;
} else {
tp = bp_patching.vec;
if (tp->addr != ip) /* !!!! <-- HERE !!!!! */
return 0;
}
/* set up the specified breakpoint detour */
regs->ip = (unsigned long) tp->detour;
return 1;
}-----
This seems like caused by bp_patching.vec is NULL but bp_patching.nr_entries != 0. I think there is a small chance to do this, because we have no smp_wmb after cleaning bp_patching.nr_entries.
-----
void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries)
...
on_each_cpu(do_sync_core, NULL, 1);
/*
* sync_core() implies an smp_mb() and orders this store against
* the writing of the new instruction.
*/
bp_patching.vec = NULL;
bp_patching.nr_entries = 0;
}-----
I think the "on_each_cpu(do_sync_core, NULL, 1);" can sync the pipeline but doesn't ensure all ongoing int3 handling is done. Thus, we may need a bigger wait in between bp_patching.nr_entries = 0 and bp_patching.vec = NULL; e.g.
bp_patching.nr_entries = 0; synchronize_rcu(); bp_patching.vec = NULL;
What would you think about ?
Thank you,
Quoted 18 lines · On Mon, 11 Nov 2019 14:12:52 +0100 Peter Zijlstra <[email protected]> wrote:
Ftrace is one of the last W^X violators (after this only KLP is left). These patches move it over to the generic
text_poke()interface and thereby get rid of this oddity.The first 14 patches are the same as in the -v4 posting. The last 3 patches are new.
Will, patch 13, arm/ftrace, is unchanged. This is because this way it preserves behaviour, but if you can provide me a tested-by for the simpler variant I can drop that in.
Patch 15 reworks ftrace's
event_create_dir(), which ran module code before the module was finished loading (before we even appliedjump_labelsand all that).Patch 16 and 17 address minor review feedback.
Ingo, Alexei wants patch #1 for some BPF stuff, can he get that in a topic branch?
Signature · 1 line
Masami Hiramatsu <[email protected]>