Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1360181ybb; Sun, 29 Mar 2020 02:41:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtBzX3B2rK8zd3KYrblBhEMpw83fVwhHlfBaHAjAGzozHVNbdSCEHZYTdUodO8oymxEznoh X-Received: by 2002:a9d:949:: with SMTP id 67mr5217149otp.304.1585474911066; Sun, 29 Mar 2020 02:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585474911; cv=none; d=google.com; s=arc-20160816; b=DHhQM5aw3OiEirQLumYaNnVvjw9qLJ8MX9fUF+oQmlH2yC3LO+sI9OczU0/vzLg8h+ oN0CYP3/sHEkmEkQk0Kqs186wRpsUuMBIlNKF5WQ3+J3eUNNx+o4RXxS9vxfxfby1Xkf TGJkBEqhvZKNCkMVHgSCSo89aG7dpMRPCbXSgI19YzGTJUfUCjaq3XeAnWv0E4Et89jr 3/oDo0bEs3/JvitTVniVU1myWVsQbfHenqKvHbR5uYWEtjjsWCFO16rgGsNfjmXR/2kW kurRrJ+AJ10Gbi0i70lijI52rdKxtd9YIC++zDZ7j/uwmgFnsmTceGwvuayTU0Kh5bJe yOdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=gyc0KSG1MOaZHgdnpG7GtSJMQKPfyUcdPBh1LT8OAPs=; b=sIQZY8z6EqPz4dZQ51UGOoSM39xpKbDbkqiEYU8EyiRT/sQmWQfb3BuhfCksQtiWW9 y52XdV2odYpqKrxcz9GSGvJvHnKjyIZKtOrN95KPW1QL38c7il/3dPSfzkydl8ufG0JP jrCIYq0jp/nI08rkhNRxw33TDwSEx/FVGSZQ5+RED3rwAx4N66P2SdJdnJrnupaZelyE hCnRWBJLCzjFICbsZrmPkhUFagrad6YUBu0QJoMVcLh/GzOV6cIy9nS9vcjIRPlSNYpt bc++wTJchMrozyMzyaACzt9FuIQESLa0r5josccBX+FezgtuU8jgUvqD3QncjZU6Bp1x 4x0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=nZv9uTJv; 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 y1si5076699otq.87.2020.03.29.02.41.38; Sun, 29 Mar 2020 02:41:51 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b=nZv9uTJv; 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 S1727994AbgC2JlI (ORCPT + 99 others); Sun, 29 Mar 2020 05:41:08 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:63394 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727503AbgC2JlG (ORCPT ); Sun, 29 Mar 2020 05:41:06 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48qrFB0973z9tyY3; Sun, 29 Mar 2020 11:41:02 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=nZv9uTJv; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 2zmiWZ7-AHN8; Sun, 29 Mar 2020 11:41:01 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 48qrF967dnz9tyXy; Sun, 29 Mar 2020 11:41:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1585474861; bh=gyc0KSG1MOaZHgdnpG7GtSJMQKPfyUcdPBh1LT8OAPs=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=nZv9uTJvBi9sz3t0BN8DmBroEZznWR2oWX4vsucTq3Eha9WuP8SLt0UkhE2KVaGAi z/wM5T5YhxccumGLsvHs/B9RFf/+FnLA+DdXnEne969H6OtK41SW9GMyhqxF7RYLXQ Snkez6OnADZtyYvS/memwPWTYVm/BcD/fvzpCzjs= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CE9548B770; Sun, 29 Mar 2020 11:41:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id x0WEmDHMfGUF; Sun, 29 Mar 2020 11:41:04 +0200 (CEST) Received: from pc16570vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9787A8B752; Sun, 29 Mar 2020 11:41:04 +0200 (CEST) Received: by pc16570vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 6868A65653; Sun, 29 Mar 2020 09:41:04 +0000 (UTC) Message-Id: <29793874e2963d6fe072d2bbd184151a2798c36d.1585474724.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH 04/12] powerpc/powermac: Blacklist functions running with MMU disabled for kprobe To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , naveen.n.rao@linux.vnet.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Sun, 29 Mar 2020 09:41:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kprobe does not handle events happening in real mode, all functions running with MMU disabled have to be blacklisted. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/powermac/cache.S | 2 ++ arch/powerpc/platforms/powermac/sleep.S | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powermac/cache.S b/arch/powerpc/platforms/powermac/cache.S index da69e0fcb4f1..ced225415486 100644 --- a/arch/powerpc/platforms/powermac/cache.S +++ b/arch/powerpc/platforms/powermac/cache.S @@ -184,6 +184,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) mtlr r10 blr +_ASM_NOKPROBE_SYMBOL(flush_disable_75x) /* This code is for 745x processors */ flush_disable_745x: @@ -351,4 +352,5 @@ END_FTR_SECTION_IFSET(CPU_FTR_L3CR) mtmsr r11 /* restore DR and EE */ isync blr +_ASM_NOKPROBE_SYMBOL(flush_disable_745x) #endif /* CONFIG_PPC_BOOK3S_32 */ diff --git a/arch/powerpc/platforms/powermac/sleep.S b/arch/powerpc/platforms/powermac/sleep.S index bd6085b470b7..f9a680fdd9c4 100644 --- a/arch/powerpc/platforms/powermac/sleep.S +++ b/arch/powerpc/platforms/powermac/sleep.S @@ -244,7 +244,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450) mtmsr r2 isync b 1b - +_ASM_NOKPROBE_SYMBOL(low_cpu_die) /* * Here is the resume code. */ @@ -282,6 +282,7 @@ _GLOBAL(core99_wake_up) lwz r1,0(r3) /* Pass thru to older resume code ... */ +_ASM_NOKPROBE_SYMBOL(core99_wake_up) /* * Here is the resume code for older machines. * r1 has the physical address of SL_PC(sp). @@ -429,6 +430,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS) lwz r0,4(r1) mtlr r0 blr +_ASM_NOKPROBE_SYMBOL(grackle_wake_up) turn_on_mmu: mflr r4 @@ -438,6 +440,7 @@ turn_on_mmu: sync isync rfi +_ASM_NOKPROBE_SYMBOL(turn_on_mmu) #endif /* defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ) */ -- 2.25.0