Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp273221yba; Sat, 20 Apr 2019 02:10:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqydq3NmOKW9CYYd2nXIK+p0Hu/nWXCchsr2jYq3+M99BqY4wTU9GWTKxAXqKgpPn4ITzO8e X-Received: by 2002:a65:5304:: with SMTP id m4mr8243288pgq.281.1555751439833; Sat, 20 Apr 2019 02:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555751439; cv=none; d=google.com; s=arc-20160816; b=V1pQwCCOnumGOjJ8aMzAHqOEj78u0RS+/QWi3rnvUeZbtmPxSD9z5kFjUESaht37da SbiHWM33E82ipihvVuIGLkf6XkfKJxBTaf9K3ua0qs80b8+d6hm470yDqQPiGwUsq7sr dQQTBvQ4Bew9rAYupQGRjBtpXuE2yceYOkD9YUz0+YKRyeU9+vdRp7VlLiVojSgT3kYS fy8hIUsSm0fflNslRJgGd74HvW4H8wIfO+iUgiaP4AEOR19fCxx+833bfqCI+8bUQR19 GcVxSZZ2Rtost6yLodxfcfWjcCsCHAmTfkbbHgr2JVn5M6YkCspySmF9nzmyAVQPCPQV hQ9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=dnfCdk1WNZQFtDk0W6TZ/vUfEREon1mKlahKIz9e83s=; b=pd1hxSe/C39n4v4giP4WRNe4zzZhr0okI9fm0RWc6bjwyoX6jFm8snvOrofg8nnR28 vVXn4M+7TzKYOGISP3jq6SmTxGGypKlaVexzvb624Rby5ZptQ+LLm5g565uZvEemZoF3 vH9+q9WUYC8YnUMx1Fb+ktdtw3NCmaHY0U87f/rQTFLvsjYf4gzphfVMLNKNeRctiWHs zAU2zRi5AE8JaD1/GRZcGq4o1FzD3+X9zBPUbiS/raawHiilh+yKhJXwZeTu1+B+OOfm cveCK//ykqdpvlDGJ0hu7LYb5mK59vKQeyPwYvDhHACPXR8LGFf6ts20qOIOOmTl/u7U i3Ig== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r198si7250802pgr.153.2019.04.20.02.10.02; Sat, 20 Apr 2019 02:10:39 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726280AbfDTJIc (ORCPT + 99 others); Sat, 20 Apr 2019 05:08:32 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:52938 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725910AbfDTJIb (ORCPT ); Sat, 20 Apr 2019 05:08:31 -0400 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: , CC: , 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 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Functions called in '_sdei_handler' are needed to be marked as 'nokprobe'. Signed-off-by: Xiongfeng Wang --- 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) -- 1.7.12.4