Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2649079ybb; Mon, 30 Mar 2020 10:10:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vspluKu5CKtm/l8xb0WWY9udGndnjvz0eYiTGLDkY/GG4qs1+qIVBjkO7K/dI7pXAWDYqLE X-Received: by 2002:a05:6808:605:: with SMTP id y5mr256189oih.172.1585588205660; Mon, 30 Mar 2020 10:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585588205; cv=none; d=google.com; s=arc-20160816; b=dJZNZ2uA3vC0nTgw1fs/ZSZbNkMBX2dLgVoXNhpKOufKQ8oH9V6Xl3iCM7dRxPEope k4pR8kXwnwUcZX5CvyHnzlCNFEvMfqT51bqiUkfFPXaLD8aPMRc07D+O8MXjrKGbZCB7 EahHnAbtDEM2tHzAjMHXbMVxYHQhVqWRrMlqh4a4Cc7rYFwVB8drEaEfggfug731NxKD Gq7K/W22GWiS7f4m2Ew7/lmiw5XJi7EM7/n/4+y4fJhGVBIg97UTcGl17OZx0YSp1WIF 3uWQAR3XBA1hdZZYV6gexW8eRbiGETeXY048AdFEOWZVJ75p+jAJZLJ+Mzrl2tumJMPs ZhXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :user-agent:mime-version:in-reply-to:references:cc:to:subject:from :date; bh=Z9SECYuFW89WkcCiZusrtjr5U+bPJ64FuehWSXXmT/8=; b=lXr7mkdyzt8eZByNzLRMjU7eEPmNwur3ih/kQi1NjAUur7ONmooGKnyYa0Q69NVw26 3rcjk7qr0QPAvogUB9KViOoXzSXmQSC/s9LnM6V6IOO6sR1eElHHZydgtxyyIMoSeP7K 2rWzEKOle3f6cihFZCi26juYz3N3tXJ11Rtb9d6IE0nNz9tKgxlV0M0YvsjQQotznlT/ m+pzMphJSL+b6WoMSR8hBMX75hVl7dXeLOj9AgV3VdeKtDCKBwsapd4BBpSdwYy0D43n IA+Lp/BJMyWONlUTkx/y8LJoSth2zigP5yJK3MynukbeKBhDyTCYO//R0RVdEIcMRq9n lIGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z17si7095303oth.282.2020.03.30.10.09.51; Mon, 30 Mar 2020 10:10:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729616AbgC3RIN convert rfc822-to-8bit (ORCPT + 99 others); Mon, 30 Mar 2020 13:08:13 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:11096 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728261AbgC3RIM (ORCPT ); Mon, 30 Mar 2020 13:08:12 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02UH3rdC094018 for ; Mon, 30 Mar 2020 13:08:11 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3022f2j4kx-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 30 Mar 2020 13:08:11 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Mar 2020 18:08:03 +0100 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 30 Mar 2020 18:07:59 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02UH71LE36110660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Mar 2020 17:07:01 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7410352050; Mon, 30 Mar 2020 17:08:04 +0000 (GMT) Received: from localhost (unknown [9.85.126.25]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 16C655204F; Mon, 30 Mar 2020 17:08:03 +0000 (GMT) Date: Mon, 30 Mar 2020 22:38:02 +0530 From: "Naveen N. Rao" Subject: Re: [PATCH 10/12] powerpc/entry32: Blacklist exception entry points for kprobe. To: Benjamin Herrenschmidt , Christophe Leroy , Michael Ellerman , Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: In-Reply-To: MIME-Version: 1.0 User-Agent: astroid/v0.15-13-gb675b421 (https://github.com/astroidmail/astroid) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT X-TM-AS-GCONF: 00 x-cbid: 20033017-0012-0000-0000-0000039B1080 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20033017-0013-0000-0000-000021D8194E Message-Id: <1585588031.jvow7mwq4x.naveen@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-03-30_07:2020-03-30,2020-03-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 priorityscore=1501 bulkscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 impostorscore=0 phishscore=0 clxscore=1011 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003300151 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy wrote: > kprobe does not handle events happening in real mode. > > As exception entry points are running with MMU disabled, > blacklist them. > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/entry_32.S | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S > index 94f78c03cb79..9a1a45d6038a 100644 > --- a/arch/powerpc/kernel/entry_32.S > +++ b/arch/powerpc/kernel/entry_32.S > @@ -51,6 +51,7 @@ mcheck_transfer_to_handler: > mfspr r0,SPRN_DSRR1 > stw r0,_DSRR1(r11) > /* fall through */ > +_ASM_NOKPROBE_SYMBOL(mcheck_transfer_to_handler) > > .globl debug_transfer_to_handler > debug_transfer_to_handler: > @@ -59,6 +60,7 @@ debug_transfer_to_handler: > mfspr r0,SPRN_CSRR1 > stw r0,_CSRR1(r11) > /* fall through */ > +_ASM_NOKPROBE_SYMBOL(debug_transfer_to_handler) > > .globl crit_transfer_to_handler > crit_transfer_to_handler: > @@ -94,6 +96,7 @@ crit_transfer_to_handler: > rlwinm r0,r1,0,0,(31 - THREAD_SHIFT) > stw r0,KSP_LIMIT(r8) > /* fall through */ > +_ASM_NOKPROBE_SYMBOL(crit_transfer_to_handler) > #endif > > #ifdef CONFIG_40x > @@ -115,6 +118,7 @@ crit_transfer_to_handler: > rlwinm r0,r1,0,0,(31 - THREAD_SHIFT) > stw r0,KSP_LIMIT(r8) > /* fall through */ > +_ASM_NOKPROBE_SYMBOL(crit_transfer_to_handler) > #endif > > /* > @@ -127,6 +131,7 @@ crit_transfer_to_handler: > .globl transfer_to_handler_full > transfer_to_handler_full: > SAVE_NVGPRS(r11) > +_ASM_NOKPROBE_SYMBOL(transfer_to_handler_full) > /* fall through */ > > .globl transfer_to_handler > @@ -286,6 +291,8 @@ reenable_mmu: > lwz r2, GPR2(r11) > b fast_exception_return > #endif > +_ASM_NOKPROBE_SYMBOL(transfer_to_handler) > +_ASM_NOKPROBE_SYMBOL(transfer_to_handler_cont) These are added after 'reenable_mmu', which is itself not blacklisted. Is that intentional? - Naveen