Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp724023pxb; Fri, 13 Aug 2021 05:05:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOjSpr7kdiosgA4m12uo9THzdamEHy7g/kNpvZV8dwHE/cFSuMEh2XA+mFlMHK0o7Dro+q X-Received: by 2002:a5e:830b:: with SMTP id x11mr1735852iom.185.1628856336704; Fri, 13 Aug 2021 05:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628856336; cv=none; d=google.com; s=arc-20160816; b=e2oQHIKyOC6B78s/B4I0VtO42cRdzO9S7gevfIXZc1kiJ7RVYIbb3VC0I9XfC4EVi2 KmIuizsG7GtrkpaCZY0OfJOox1APLSDxR2pN08QR3HObUtCG/73NoT7L0n7Y99LgADmM 5XfCIKlBV5Hw26KwpFrdF2FB0ND8IFQrDqU9UWecLcSr6/GN39AuKrgZeJhuasdHcKaE uYssj5st2y6kKfh+BnmNCY3wdXBMzlbvfzNrgUa/PyL5KrI/MMKnVQA+6f6a50H1VapL 8TMEih6O6RB62Wy5d0Z1M3Bm9Z88RErw2eHAYo3sXMTGN3BrLlKLVtIHSce3TN/1YU/V O14Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from; bh=IGHWbrUk89i23JbEK1TKThaFwABmRixhQU+qQAJf6H0=; b=Px55DGc9AeZK9ogNqSANI3G/XHeTl31AMd+8LmKslcOmdeyVyE8GrOzmUNgNj1P+38 6r33mVgHwBlVYyoIusbygYHJI/8yLGCw5kLxR27w2BhIRylrvW5a9yvhYlX8TJP9maKa IJ0iVS0Ufvcjqxnm6ZC8NfQUlPPiV0QjFCruiQCxLRgx+xQxGFTZc2j8mok8bhS8GSSs QjzX9+dsB9BgPBCuPiJCVEQVoYoJ1shg6AGaoekqkEWrPG1lU7CMfrWMPMN4gsA8j0dh sw/Z/XY8CI4+z1JAhJla1TIrtvxnRPh4yulgHuZnDjQNL/QtKmtgrc2gI1gGmMOrYKjd /jLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si1579641iot.103.2021.08.13.05.05.24; Fri, 13 Aug 2021 05:05:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240147AbhHML7i (ORCPT + 99 others); Fri, 13 Aug 2021 07:59:38 -0400 Received: from ozlabs.org ([203.11.71.1]:36491 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239493AbhHML7a (ORCPT ); Fri, 13 Aug 2021 07:59:30 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 4GmMXk48kvz9t5m; Fri, 13 Aug 2021 21:59:02 +1000 (AEST) From: Michael Ellerman To: mhiramat@kernel.org, benh@kernel.crashing.org, ruscur@russell.cc, naveen.n.rao@linux.vnet.ibm.com, christophe.leroy@csgroup.eu, npiggin@gmail.com, mpe@ellerman.id.au, peterz@infradead.org, Pu Lehui , paulus@samba.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, zhangjinhao2@huawei.com In-Reply-To: <20210809023658.218915-1-pulehui@huawei.com> References: <20210809023658.218915-1-pulehui@huawei.com> Subject: Re: [PATCH v2] powerpc/kprobes: Fix kprobe Oops happens in booke Message-Id: <162885586769.2317031.16207724458965456130.b4-ty@ellerman.id.au> Date: Fri, 13 Aug 2021 21:57:47 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Aug 2021 10:36:58 +0800, Pu Lehui wrote: > When using kprobe on powerpc booke series processor, Oops happens > as show bellow: > > / # echo "p:myprobe do_nanosleep" > /sys/kernel/debug/tracing/kprobe_events > / # echo 1 > /sys/kernel/debug/tracing/events/kprobes/myprobe/enable > / # sleep 1 > [ 50.076730] Oops: Exception in kernel mode, sig: 5 [#1] > [ 50.077017] BE PAGE_SIZE=4K SMP NR_CPUS=24 QEMU e500 > [ 50.077221] Modules linked in: > [ 50.077462] CPU: 0 PID: 77 Comm: sleep Not tainted 5.14.0-rc4-00022-g251a1524293d #21 > [ 50.077887] NIP: c0b9c4e0 LR: c00ebecc CTR: 00000000 > [ 50.078067] REGS: c3883de0 TRAP: 0700 Not tainted (5.14.0-rc4-00022-g251a1524293d) > [ 50.078349] MSR: 00029000 CR: 24000228 XER: 20000000 > [ 50.078675] > [ 50.078675] GPR00: c00ebdf0 c3883e90 c313e300 c3883ea0 00000001 00000000 c3883ecc 00000001 > [ 50.078675] GPR08: c100598c c00ea250 00000004 00000000 24000222 102490c2 bff4180c 101e60d4 > [ 50.078675] GPR16: 00000000 102454ac 00000040 10240000 10241100 102410f8 10240000 00500000 > [ 50.078675] GPR24: 00000002 00000000 c3883ea0 00000001 00000000 0000c350 3b9b8d50 00000000 > [ 50.080151] NIP [c0b9c4e0] do_nanosleep+0x0/0x190 > [ 50.080352] LR [c00ebecc] hrtimer_nanosleep+0x14c/0x1e0 > [ 50.080638] Call Trace: > [ 50.080801] [c3883e90] [c00ebdf0] hrtimer_nanosleep+0x70/0x1e0 (unreliable) > [ 50.081110] [c3883f00] [c00ec004] sys_nanosleep_time32+0xa4/0x110 > [ 50.081336] [c3883f40] [c001509c] ret_from_syscall+0x0/0x28 > [ 50.081541] --- interrupt: c00 at 0x100a4d08 > [ 50.081749] NIP: 100a4d08 LR: 101b5234 CTR: 00000003 > [ 50.081931] REGS: c3883f50 TRAP: 0c00 Not tainted (5.14.0-rc4-00022-g251a1524293d) > [ 50.082183] MSR: 0002f902 CR: 24000222 XER: 00000000 > [ 50.082457] > [ 50.082457] GPR00: 000000a2 bf980040 1024b4d0 bf980084 bf980084 64000000 00555345 fefefeff > [ 50.082457] GPR08: 7f7f7f7f 101e0000 00000069 00000003 28000422 102490c2 bff4180c 101e60d4 > [ 50.082457] GPR16: 00000000 102454ac 00000040 10240000 10241100 102410f8 10240000 00500000 > [ 50.082457] GPR24: 00000002 bf9803f4 10240000 00000000 00000000 100039e0 00000000 102444e8 > [ 50.083789] NIP [100a4d08] 0x100a4d08 > [ 50.083917] LR [101b5234] 0x101b5234 > [ 50.084042] --- interrupt: c00 > [ 50.084238] Instruction dump: > [ 50.084483] 4bfffc40 60000000 60000000 60000000 9421fff0 39400402 914200c0 38210010 > [ 50.084841] 4bfffc20 00000000 00000000 00000000 <7fe00008> 7c0802a6 7c892378 93c10048 > [ 50.085487] ---[ end trace f6fffe98e2fa8f3e ]--- > [ 50.085678] > Trace/breakpoint trap > > [...] Applied to powerpc/fixes. [1/1] powerpc/kprobes: Fix kprobe Oops happens in booke https://git.kernel.org/powerpc/c/43e8f76006592cb1573a959aa287c45421066f9c cheers