From patchwork Wed Aug 26 16:15:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 7078401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E8549FB54 for ; Wed, 26 Aug 2015 16:17:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2F46520952 for ; Wed, 26 Aug 2015 16:17:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66B3220950 for ; Wed, 26 Aug 2015 16:17:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZUdMc-0001MD-Bt; Wed, 26 Aug 2015 16:15:50 +0000 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZUdMP-0001Bq-8R for linux-arm-kernel@lists.infradead.org; Wed, 26 Aug 2015 16:15:37 +0000 Received: by labns7 with SMTP id ns7so5241159lab.0 for ; Wed, 26 Aug 2015 09:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3FALMfBuST6Gy0zKj0MUhfpEPtIJMU4P9WM7zoB/RX0=; b=KacV2WbQ6HaZbBCvahW9BKNZjbwQi2Zl4Y9h/dwTujNBaDgO4zrcKvjOeTFLrQp/o8 zgg2jbPa/oQ9QdJ/gX89Oe/CJvB+Xs+qI4LHmiEGp9tQFSvwotNrcJwXOKbe3iWlcWwk FIoJOu3RXbbCCzRXgEN6bQRqsbmqlOVseprEECEBuXBjPXKLC8gU2J/LOzyRi5nzTTWe O6v1ed0Gk/ucHsUh3bOSUbAIuKQd3EX0AdYMnG+Rmmt15a3k5W3NxVYT7fYhx7cE90HC WImT3Fuv/sfE8fmqXhnE/wMGZvzVsCoo5KLLbjbcpfQJLdrA6nMd4uhKug1EM0u8B6TJ 6bXw== X-Received: by 10.112.169.97 with SMTP id ad1mr31453120lbc.90.1440605713241; Wed, 26 Aug 2015 09:15:13 -0700 (PDT) Received: from localhost.sw.ru (swsoft-msk-nat.sw.ru. [195.214.232.10]) by smtp.gmail.com with ESMTPSA id ad1sm6866031lbc.5.2015.08.26.09.15.12 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 26 Aug 2015 09:15:12 -0700 (PDT) From: Andrey Ryabinin To: Will Deacon , Catalin Marinas , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] efi/runtime-wrappers, kasan: don't sanitize runtime wrappers. Date: Wed, 26 Aug 2015 19:15:05 +0300 Message-Id: <1440605707-8325-3-git-send-email-ryabinin.a.a@gmail.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1440605707-8325-1-git-send-email-ryabinin.a.a@gmail.com> References: <1440605707-8325-1-git-send-email-ryabinin.a.a@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150826_091537_487688_184F10E9 X-CRM114-Status: UNSURE ( 8.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-efi@vger.kernel.org, Andrey Ryabinin , Arnd Bergmann , Linus Walleij , linux-kernel@vger.kernel.org, Matt Fleming , Alexander Potapenko , Dmitry Vyukov MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ARM64 maps efi runtime services in userspace addresses which don't have KASAN shadow. So dereferencing these addresses in efi_call_virt() will cause crash if this code instrumented. Signed-off-by: Andrey Ryabinin --- drivers/firmware/efi/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile index 6fd3da9..413fcf2 100644 --- a/drivers/firmware/efi/Makefile +++ b/drivers/firmware/efi/Makefile @@ -1,6 +1,14 @@ # # Makefile for linux kernel # + +# +# ARM64 maps efi runtime services in userspace addresses +# which don't have KASAN shadow. So dereference of these addresses +# in efi_call_virt() will cause crash if this code instrumented. +# +KASAN_SANITIZE_runtime-wrappers.o := n + obj-$(CONFIG_EFI) += efi.o vars.o reboot.o obj-$(CONFIG_EFI_VARS) += efivars.o obj-$(CONFIG_EFI_ESRT) += esrt.o