From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DCEAC07E96 for ; Thu, 8 Jul 2021 14:45:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C7546101E for ; Thu, 8 Jul 2021 14:45:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C7546101E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc: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=Dy6XKh6mWMLq6nPis66UJyjbPIWZEbP3wrHYkdH6paY=; b=MPpJt4PgT8JErc 4s+JXDIShskpa/kmhdVWaHyHSZjMAhvGJv3XMYEJJH1D4H9f9Ec4tJF1DmlDJB3l78IpJA7snoPxc 3RIm7zAO7p5GSg6PAuW/Y+oRzqHxlKziL7h56IKUhz7TAr2vFLKltAg60wjgxOLAzAFNwstDl9Vay 4/OlhlOwu8PUaTBG61g8IEhdfhg9Ie0rQOVfgOB5pJeLkq6tWelC05xt8L5cgUz9WdoY15sNzpnAR VpBVzXI/Gk3S/RFQAY07Krl1CFidwd+rax/iuBynXiCoud8DWuASG046PkIzHhW4iE/3s5Dfq6Ry0 5RPc4Tkuo44SX3Cnmi8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1VGR-00HE7x-HA; Thu, 08 Jul 2021 14:44:31 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1VGN-00HE7N-RC for linux-arm-kernel@lists.infradead.org; Thu, 08 Jul 2021 14:44:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 32791D6E; Thu, 8 Jul 2021 07:44:23 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D57693F66F; Thu, 8 Jul 2021 07:44:21 -0700 (PDT) From: Mark Rutland To: akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: andreyknvl@gmail.com, catalin.marinas@arm.com, dvyukov@google.com, glider@google.com, mark.rutland@arm.com, ryabinin.a.a@gmail.com, will@kernel.org Subject: [PATCH] kasan: fix build for CONFIG_KASAN_HW_TAGS Date: Thu, 8 Jul 2021 15:44:11 +0100 Message-Id: <20210708144411.25467-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210708_074427_972231_88E2AEE1 X-CRM114-Status: GOOD ( 16.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When CONFIG_KASAN_HW_TAGS is selected, uses _RET_IP_, but doesn't explicitly include where this is defined. We used to get this via a transitive include, but since commit: f39650de687e3576 ("kernel.h: split out panic and oops helpers") ... this is no longer the case, and so we get a build failure: | CC arch/arm64/mm/kasan_init.o | In file included from arch/arm64/mm/kasan_init.c:10: | ./include/linux/kasan.h: In function 'kasan_slab_free': | ./include/linux/kasan.h:211:39: error: '_RET_IP_' undeclared (first use in this function) | 211 | return __kasan_slab_free(s, object, _RET_IP_, init); | | ^~~~~~~~ | ./include/linux/kasan.h:211:39: note: each undeclared identifier is reported only once for each function it appears in | ./include/linux/kasan.h: In function 'kasan_kfree_large': | ./include/linux/kasan.h:219:28: error: '_RET_IP_' undeclared (first use in this function) | 219 | __kasan_kfree_large(ptr, _RET_IP_); | | ^~~~~~~~ | ./include/linux/kasan.h: In function 'kasan_slab_free_mempool': | ./include/linux/kasan.h:226:34: error: '_RET_IP_' undeclared (first use in this function) | 226 | __kasan_slab_free_mempool(ptr, _RET_IP_); | | ^~~~~~~~ | ./include/linux/kasan.h: In function 'kasan_check_byte': | ./include/linux/kasan.h:277:35: error: '_RET_IP_' undeclared (first use in this function) | 277 | return __kasan_check_byte(addr, _RET_IP_); | | ^~~~~~~~ Fix this by including explicitly. Fixes: 6028bf777417 ("kernel.h: split out panic and oops helpers") Signed-off-by: Mark Rutland Cc: Alexander Potapenko Cc: Andrew Morton Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Will Deacon --- include/linux/kasan.h | 1 + 1 file changed, 1 insertion(+) As a heads-up, there are some unrelated runtime issues with CONFIG_KASAN_HW_TAGS and the recent arm64 string routines rework, which I'm looking into now. If you boot-test with this applied, you should expect to see those. Andrew, I assume you'd be the one to pick this up? Thanks, Mark. diff --git a/include/linux/kasan.h b/include/linux/kasan.h index 5310e217bd74..dd874a1ee862 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h @@ -3,6 +3,7 @@ #define _LINUX_KASAN_H #include +#include #include #include -- 2.11.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel