From patchwork Sat Apr 20 09:06:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongfeng Wang X-Patchwork-Id: 10910093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFB9214DB for ; Sat, 20 Apr 2019 09:08:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3DF528D32 for ; Sat, 20 Apr 2019 09:08:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B601C28D78; Sat, 20 Apr 2019 09:08:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2C0C228D32 for ; Sat, 20 Apr 2019 09:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=e1LYuCo1oG5DDRihg5g5710haidlOqiMKFANUPDuLkE=; b=oKkuxe6P6MUE8O PGCiL8oGhEte7z8RuPLKk76gFY2zCY51WebQAaKWiXNV79qyWONQSmkR87JRuTM3/I65oy93qAqlr Etqo7HDK21Pkqh5+/+iceoUDQxISFSiL8OuYRV1kB5JJONp6DkIoGGiJ23wwoZESwile5GQ9ivu8g qsOk3S4L2IcelQZsDDWlQ/yNVRxyrCkzKzshD+v3WTxdw9UumDv0au6X2Mi02k2VlRABDrBciJliI JB5PM07XOrG+MBDfJSUdYpZjxxQaE2v4XK67XPKPnYCWWS0zq/dRSMSuxNdXio+uOSRdXLaF8r7GN r48Z6gtr4IaXaPXjCQdQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHlzK-0007sj-CZ; Sat, 20 Apr 2019 09:08:46 +0000 Received: from szxga06-in.huawei.com ([45.249.212.32] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHlzG-0007rq-Dx for linux-arm-kernel@lists.infradead.org; Sat, 20 Apr 2019 09:08:43 +0000 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id CA352B28733F359D52FD; Sat, 20 Apr 2019 17:08:27 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Sat, 20 Apr 2019 17:08:19 +0800 From: Xiongfeng Wang To: , Subject: [RFC PATCH] kprobes/arm64: Blacklist functions called in '_sdei_handler' Date: Sat, 20 Apr 2019 17:06:57 +0800 Message-ID: <1555751217-54310-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190420_020842_645520_D92EA14A X-CRM114-Status: UNSURE ( 9.02 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Functions called in '_sdei_handler' are needed to be marked as 'nokprobe'. Signed-off-by: Xiongfeng Wang Reviewed-by: James Morse --- When I kprobe 'sdei_smccc_smc', the cpu hungs. I am not sure if it is becase when SDEI events interrupt EL0, '__sdei_asm_entry_trampoline' didn't restore vbar_el1 with kernel vectors. Or is it becasue brk exception corrupt elr_el1 and trust firmware didn't preserve it for us? --- drivers/firmware/arm_sdei.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c index e6376f9..9cd70d1 100644 --- a/drivers/firmware/arm_sdei.c +++ b/drivers/firmware/arm_sdei.c @@ -165,6 +165,7 @@ static int invoke_sdei_fn(unsigned long function_id, unsigned long arg0, return err; } +NOKPROBE_SYMBOL(invoke_sdei_fn); static struct sdei_event *sdei_event_find(u32 event_num) { @@ -879,6 +880,7 @@ static void sdei_smccc_smc(unsigned long function_id, { arm_smccc_smc(function_id, arg0, arg1, arg2, arg3, arg4, 0, 0, res); } +NOKPROBE_SYMBOL(sdei_smccc_smc); static void sdei_smccc_hvc(unsigned long function_id, unsigned long arg0, unsigned long arg1, @@ -887,6 +889,7 @@ static void sdei_smccc_hvc(unsigned long function_id, { arm_smccc_hvc(function_id, arg0, arg1, arg2, arg3, arg4, 0, 0, res); } +NOKPROBE_SYMBOL(sdei_smccc_hvc); int sdei_register_ghes(struct ghes *ghes, sdei_event_callback *normal_cb, sdei_event_callback *critical_cb)