Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp517551pxv; Thu, 8 Jul 2021 07:45:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3BrkTJD98xOfkT4wG7tlxlCMzg5x0eVz9fc71uwznjmxXj45c0gW8YOJpB4sBVubCuoh9 X-Received: by 2002:a17:907:1609:: with SMTP id hb9mr30626427ejc.368.1625755538074; Thu, 08 Jul 2021 07:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625755538; cv=none; d=google.com; s=arc-20160816; b=XacjBo4GCmws/P/frMyy7prQQX7yyGNugoyWrtLzsDiuVWzq5FIkDtnC0Xx4XprtUV xwvkD5x1ZRyQe7rbjnxg8MZYsqA4dbLF5qy1faJLUzJwZMmP5j69EYH4qVTDUo25Y7kN sHaDdHzsftE1WQtrNl30l/MhqoGV8zOiMuYwRZcxF4CzScEN5qS7BGnCxEPnlxFwWDcy 9MHtwvc97BYlZL3VidorwhGEjP+2W5qe+YVNfGtjduWGl/aq+J0jHkZMYXxFJv9vdLj4 xIh17CNtvujPhbIcFPMbqKYaUVxtbQzJUJuP6m57sldrzNbTp3J5Biosb1MTPjlTGPlk QMeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=O/zxH1+mzU9Ctu47AnIgpsGOB9bSDj5xJdz8tTf4nqw=; b=R5ptNlr5ne5TZVY0z+W0xn7rk43szyyGmF/6B61JQTWKwIqXmU81NJut8vbIfjA/1w k4NSzJ6sMAbMLdoWZjmZjoIyo3EXUNspMkruxo6D0KohB2/aV6d8f2duAXOPeAktcTRJ r/tjrbeXkrcSBsEN+fsjZ0+l6JEYzaGv+lJw6Erid0xZCRMf5/DVkEdBcLp0P8e2okP/ qOKN10e5kN/j2TNo1qppARaJeoAz/MdAy2kncEJrA5e8fOvtPmbKc2Fqd0ZO++iuhRIZ UHvqvzZbuTYAY3Q8RG7w5FUv8bFb14TzY5TI9yY3AWlNoJk3xXbretp7IIiRORX8voQX ZQIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq24si3371310edb.242.2021.07.08.07.45.15; Thu, 08 Jul 2021 07:45:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231977AbhGHOrF (ORCPT + 99 others); Thu, 8 Jul 2021 10:47:05 -0400 Received: from foss.arm.com ([217.140.110.172]:60630 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229738AbhGHOrF (ORCPT ); Thu, 8 Jul 2021 10:47:05 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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