lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB5598608507B7EB38983113BCFB079@SJ0PR11MB5598.namprd11.prod.outlook.com>
Date:   Thu, 24 Jun 2021 06:32:25 +0000
From:   "Liu, Yujie" <yujie.liu@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Ingo Molnar <mingo@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "lkp@...ts.01.org" <lkp@...ts.01.org>, lkp <lkp@...el.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        "Sang, Oliver" <oliver.sang@...el.com>
Subject: RE: [LKP] Re: [jump_label, x86]  e7bf1ba97a:
 BUG:unable_to_handle_page_fault_for_address

> > [  222.094341] BUG: unable to handle page fault for address:
> > ffffffff83ccffe0
> 
> I *think* the below might help, can you try?

Hi Peter Z,

We try to apply the patch on commit e7bf1ba97afdd (jump_label, x86: Emit short JMP)
A new BUG appeared before reaching the BUG reported in previous mail.
Full dmesg in attachment.

Some brief dmesg:
[  143.438194] BUG: kernel NULL pointer dereference, address: 0000000000000000                               
[  143.445105] #PF: supervisor read access in kernel mode                                                    
[  143.450203] #PF: error_code(0x0000) - not-present page                                                    
[  143.455301] PGD 0 P4D 0                                                                                   
[  143.457814] Oops: 0000 [#1] PREEMPT SMP PTI                                                               
[  143.461964] CPU: 1 PID: 2812 Comm: ftracetest Not tainted 5.13.0-rc1-00010-g2e1ef7b15f89 #1               
[  143.470249] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.8.1 12/05/2017                          
[  143.477585] RIP: 0010:jump_label_text_reserved+0x82/0x100                                                 
[  143.482940] Code: 89 ef e8 61 fd ee ff 4c 89 f7 48 89 c5 e8 56 fd ee ff 48 39 c5 75 70 48 89 ef e8 c9 b5 e
e ff 84 c0 b8 00 00 00 00 48 0f 44 e8 <8b> 5d 00 bf 01 00 00 00 e8 31 7d e3 ff 65 8b 05 6a 84 c7 7e 85 c0    
[  143.501565] RSP: 0018:ffffc90000dcfcd8 EFLAGS: 00010202                                 
[  143.506747] RAX: 0000000000000000 RBX: ffff88880c633400 RCX: ffffffff81197c49           
[  143.513823] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000           
[  143.520899] RBP: 0000000000000000 R08: ffffc90000dcfc20 R09: 0000000000000001           
[  143.527975] R10: 000000000001ae21 R11: 0000000000024f61 R12: 0000000000000000           
[  143.535051] R13: ffffffff811dfe40 R14: ffffffff811dfe40 R15: 0000000000000000           
[  143.542126] FS:  00007f7558bb3740(0000) GS:ffff88881dc80000(0000) knlGS:0000000000000000
[  143.550149] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033                           
[  143.555849] CR2: 0000000000000000 CR3: 000000081239e002 CR4: 00000000003706e0           
[  143.562924] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000           
[  143.569999] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400           
[  143.577075] Call Trace:                                                                 
[  143.579501]  register_kprobe+0x3c9/0x600                                                
[  143.583997]  register_trace_kprobe+0x202/0x600                                          
[  143.588406]  __trace_kprobe_create+0x449/0x700                                          
[  143.592812]  ? __kmalloc+0x749/0x7c0                                                    
[  143.596372]  ? register_trace_kprobe+0x600/0x600                                        
[  143.600952]  ? probes_profile_seq_show+0xc0/0xc0                                        
[  143.605531]  trace_probe_create+0x76/0xc0                                               
[  143.609509]  create_or_delete_trace_kprobe+0x11/0x40                                    
[  143.614433]  trace_parse_run_command+0xbb/0x180                                         
[  143.618925]  vfs_write+0xcc/0x3c0                                                       
[  143.622213]  ksys_write+0x68/0x100                                                      
[  143.625588]  do_syscall_64+0x40/0x80                                                                      
[  143.629134]  entry_SYSCALL_64_after_hwframe+0x44/0xae                                                     
[  143.634147] RIP: 0033:0x7f7558ca0504                                                                      
[  143.637691] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b3 0f 1f 80 00 00 00 00 48 8d 05 f9 61 0d 00 8
b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53    
[  143.656310] RSP: 002b:00007ffe82aebca8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001                        
[  143.663817] RAX: ffffffffffffffda RBX: 0000000000000023 RCX: 00007f7558ca0504                             
[  143.670894] RDX: 0000000000000023 RSI: 000055bb6897ce30 RDI: 0000000000000001                             
[  143.677972] RBP: 000055bb6897ce30 R08: 000000000000000a R09: 00007f7558d30e80                             
[  143.685050] R10: 000000000000000a R11: 0000000000000246 R12: 00007f7558d72760                             
[  143.692128] R13: 0000000000000023 R14: 00007f7558d6d760 R15: 0000000000000023                             
[  143.699207] Modules linked in: btrfs blake2b_generic xor zstd_compress raid6_pq libcrc32c intel_rapl_msr i ntel_rapl_common i915 sd_mod t10_pi sg ipmi_devintf ipmi_msghandler x86_pkg_temp_thermal intel_powerclamp ahc i coretemp crct10dif_pclmul libahci mei_wdt wmi_bmof vfio_mdev crc32_pclmul vfio_iommu_type1 crc32c_intel gha sh_clmulni_intel rapl intel_cstate mei_me vfio mei intel_uncore libata mdev intel_pch_thermal i2c_i801 i2c_sm
bus intel_gtt wmi video acpi_pad intel_pmc_core ip_tables [last unloaded: ftrace_direct]                     
[  143.744567] CR2: 0000000000000000                                                                         
[  143.747855] ---[ end trace a8a384c1d6f5e7b7 ]---                                                          
[  143.752434] RIP: 0010:jump_label_text_reserved+0x82/0x100        
[  143.757789] Code: 89 ef e8 61 fd ee ff 4c 89 f7 48 89 c5 e8 56 fd ee ff 48 39 c5 75 70 48 89 ef e8 c9 b5 e
e ff 84 c0 b8 00 00 00 00 48 0f 44 e8 <8b> 5d 00 bf 01 00 00 00 e8 31 7d e3 ff 65 8b 05 6a 84 c7 7e 85 c0    
[  143.776410] RSP: 0018:ffffc90000dcfcd8 EFLAGS: 00010202                                                   
[  143.781594] RAX: 0000000000000000 RBX: ffff88880c633400 RCX: ffffffff81197c49                             
[  143.788674] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000                             
[  143.795752] RBP: 0000000000000000 R08: ffffc90000dcfc20 R09: 0000000000000001                             
[  143.802830] R10: 000000000001ae21 R11: 0000000000024f61 R12: 0000000000000000                             
[  143.809909] R13: ffffffff811dfe40 R14: ffffffff811dfe40 R15: 0000000000000000                             
[  143.816988] FS:  00007f7558bb3740(0000) GS:ffff88881dc80000(0000) knlGS:0000000000000000                  
[  143.825012] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033                
[  143.830710] CR2: 0000000000000000 CR3: 000000081239e002 CR4: 00000000003706e0 [  143.837786] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [  143.844861] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  143.851937] Kernel panic - not syncing: Fatal exception                      
[  143.857167] Kernel Offset: disabled                                          
ACPI MEMORY or I/O RESET_REG.                                                   


Thanks.

> ---
> diff --git a/kernel/jump_label.c b/kernel/jump_label.c index bdb0681bece8..c44381dcf25b 100644
> --- a/kernel/jump_label.c
> +++ b/kernel/jump_label.c
> @@ -316,14 +316,16 @@ static int addr_conflict(struct jump_entry *entry, void *start, void *end)  }
> 
>  static int __jump_label_text_reserved(struct jump_entry *iter_start,
> -		struct jump_entry *iter_stop, void *start, void *end)
> +		struct jump_entry *iter_stop, void *start, void *end, bool init)
>  {
>  	struct jump_entry *iter;
> 
>  	iter = iter_start;
>  	while (iter < iter_stop) {
> -		if (addr_conflict(iter, start, end))
> -			return 1;
> +		if (init || !jump_entry_is_init(iter)) {
> +			if (addr_conflict(iter, start, end))
> +				return 1;
> +		}
>  		iter++;
>  	}
> 
> @@ -548,6 +550,7 @@ static void static_key_set_mod(struct static_key *key,  static int __jump_label_mod_text_reserved(void *start, void
> *end)  {
>  	struct module *mod;
> +	bool init;
>  	int ret;
> 
>  	preempt_disable();
> @@ -555,6 +558,7 @@ static int __jump_label_mod_text_reserved(void *start, void *end)
>  	WARN_ON_ONCE(__module_text_address((unsigned long)end) != mod);
>  	if (!try_module_get(mod))
>  		mod = NULL;
> +	init = mod->state == MODULE_STATE_COMING;
>  	preempt_enable();
> 
>  	if (!mod)
> @@ -562,7 +566,7 @@ static int __jump_label_mod_text_reserved(void *start, void *end)
> 
>  	ret = __jump_label_text_reserved(mod->jump_entries,
>  				mod->jump_entries + mod->num_jump_entries,
> -				start, end);
> +				start, end, init);
> 
>  	module_put(mod);
> 
> @@ -788,8 +792,9 @@ early_initcall(jump_label_init_module);
>   */
>  int jump_label_text_reserved(void *start, void *end)  {
> +	bool init = system_state < SYSTEM_RUNNING;
>  	int ret = __jump_label_text_reserved(__start___jump_table,
> -			__stop___jump_table, start, end);
> +			__stop___jump_table, start, end, init);
> 
>  	if (ret)
>  		return ret;
> _______________________________________________
> LKP mailing list -- lkp@...ts.01.org
> To unsubscribe send an email to lkp-leave@...ts.01.org

Download attachment "dmesg.xz" of type "application/octet-stream" (29324 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ