Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752241AbcCIFda (ORCPT ); Wed, 9 Mar 2016 00:33:30 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36598 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752341AbcCIFdI (ORCPT ); Wed, 9 Mar 2016 00:33:08 -0500 From: David Long To: Catalin Marinas , Will Deacon , Sandeepa Prabhu , William Cohen , Pratyush Anand , Steve Capper , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marc Zyngier Cc: Dave P Martin , Mark Rutland , Robin Murphy , Ard Biesheuvel , Jens Wiklander , Christoffer Dall , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yang Shi , Greg Kroah-Hartman , Viresh Kumar , "Suzuki K. Poulose" , Kees Cook , Zi Shen Lim , John Blackwood , Feng Kan , Balamurugan Shanmugam , James Morse , Vladimir Murzin , Mark Salyzyn , Petr Mladek , Andrew Morton , Mark Brown Subject: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist Date: Wed, 9 Mar 2016 00:32:17 -0500 Message-Id: <1457501543-24197-4-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457501543-24197-1-git-send-email-dave.long@linaro.org> References: <1457501543-24197-1-git-send-email-dave.long@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1141 Lines: 38 From: "David A. Long" Currrently taking exceptions when accessing user data from a kprobe'd instruction doesn't work. Avoid this situation by blacklisting the relevant functions. Signed-off-by: David A. Long --- arch/arm64/lib/copy_from_user.S | 1 + arch/arm64/lib/copy_to_user.S | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/lib/copy_from_user.S b/arch/arm64/lib/copy_from_user.S index 4699cd7..0ac2131 100644 --- a/arch/arm64/lib/copy_from_user.S +++ b/arch/arm64/lib/copy_from_user.S @@ -66,6 +66,7 @@ .endm end .req x5 + .section .kprobes.text,"ax",%progbits ENTRY(__copy_from_user) ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(0)), ARM64_HAS_PAN, \ CONFIG_ARM64_PAN) diff --git a/arch/arm64/lib/copy_to_user.S b/arch/arm64/lib/copy_to_user.S index 7512bbb..e4eb84c 100644 --- a/arch/arm64/lib/copy_to_user.S +++ b/arch/arm64/lib/copy_to_user.S @@ -65,6 +65,7 @@ .endm end .req x5 + .section .kprobes.text,"ax",%progbits ENTRY(__copy_to_user) ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(0)), ARM64_HAS_PAN, \ CONFIG_ARM64_PAN) -- 2.5.0