Sometimes e.g. with crashme the compat layer warnings can be noisy. Add a way to turn them off by gating all output through compat_printk that checks a global sysctl. The default is not changed.
Showing the changes to kernel/sysctl.c (1 of 5 files). Show all
Unified · Split
| @@ -73,6 +73,7 @@ extern int printk_ratelimit_burst; · 72 unmodified lines | ||
| 73 | 73 | extern int pid_max_min, pid_max_max; |
| 74 | 74 | extern int sysctl_drop_caches; |
| 75 | 75 | extern int percpu_pagelist_fraction; |
| 76 | +extern int compat_log; | |
| 76 | 77 | |
| 77 | 78 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) |
| 78 | 79 | int unknown_nmi_panic; |
| @@ -676,6 +677,16 @@ static ctl_table kern_table[] = { · 597 unmodified lines | ||
| 676 | 677 | .mode = 0644, |
| 677 | 678 | .proc_handler = &proc_dointvec, |
| 678 | 679 | }, |
| 680 | +#endif | |
| 681 | +#ifdef CONFIG_COMPAT | |
| 682 | + { | |
| 683 | + .ctl_name = KERN_COMPAT_LOG, | |
| 684 | + .procname = "compat-log", | |
| 685 | + .data = &compat_log, | |
| 686 | + .maxlen = sizeof (int), | |
| 687 | + .mode = 0644, | |
| 688 | + .proc_handler = &proc_dointvec, | |
| 689 | + }, | |
| 679 | 690 | #endif |
| 680 | 691 | { .ctl_name = 0 } |
| 681 | 692 | }; |