From patchwork Mon Jul 5 07:27:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Elver X-Patchwork-Id: 12358371 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=-26.7 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham 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 6BD05C07E98 for ; Mon, 5 Jul 2021 07:27:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 172C5613CB for ; Mon, 5 Jul 2021 07:27:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 172C5613CB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C4B7C6B0011; Mon, 5 Jul 2021 03:27:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C229A6B0036; Mon, 5 Jul 2021 03:27:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC2846B005D; Mon, 5 Jul 2021 03:27:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0191.hostedemail.com [216.40.44.191]) by kanga.kvack.org (Postfix) with ESMTP id 8518C6B0011 for ; Mon, 5 Jul 2021 03:27:43 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0523C20306 for ; Mon, 5 Jul 2021 07:27:43 +0000 (UTC) X-FDA: 78327704406.03.6C63816 Received: from mail-qk1-f202.google.com (mail-qk1-f202.google.com [209.85.222.202]) by imf26.hostedemail.com (Postfix) with ESMTP id BC8B12001712 for ; Mon, 5 Jul 2021 07:27:42 +0000 (UTC) Received: by mail-qk1-f202.google.com with SMTP id r190-20020a375dc70000b02903acea04c19fso13518487qkb.8 for ; Mon, 05 Jul 2021 00:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=mDcwhPTUrel2btqXWeFaBd7hJh1LLe+zyIffNYoVAO4=; b=qAMqrCJFNODTwzQ7AnOWbR2A/o+Ir6oB9pMB+LVwQumUEGcyEo6L7b2A7LYszuWNqY L1OZYgDiHtyhQWCzXtRi5q4yUozGsuPBljxtT2+MsIk1RECQJF75UFLldzfMn2Znrbc2 h0CvJeOGSq8yzFC8eAVVU1j28ectyr2FxWQyvrDdSTZD9z3dgl+xpi9e4LWQhCgwibTo /bMTMtR9vnirqBIQy7pQyZp2BqBb+94uz4Ne7jv8Ta5/YM38SvCmHSIdM2aqzelFOApg XvOcL+10emMXCPHezqnyOryq69EJZZdPuIVtnRsVWipaqnwlwVY30wIXtw+w0LtEchT8 9KDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=mDcwhPTUrel2btqXWeFaBd7hJh1LLe+zyIffNYoVAO4=; b=pCZjikL5tzkNSKhkT0Dx8a7tzg9OxDzVjpWa0PUJb0+ZbXLzk1a+KZn3o/l4Hh4Es4 6RBjxe2f5e3A2R+KDtDx7NvpvEcpRAP8MK9ZPe0YIRY2fufQ/qNO260J9+02x8tbdjam Du2fAY/cwNvkBOz8tyAAmB/ZPVlp6r/oT32XrNybXX65Yy7Qr47M1Yzp3lSyj2G6uXrT 7BiAQmJeuixSP7LKvKPn2SVuHV2o/GSzJIaOCbYkomkW48HT6fFQRGgOMjHrlO6A+C9u EYAFIlpXVzLNwACm8TCEmJsFLCw1JibqP+iPnWDbz+f5n6QGT3lGRuZpbS0lKRiPuLqf lANg== X-Gm-Message-State: AOAM531DlKvlMI67M8w/xdvLGguioqXU54nzgmQ017EtWTzxDJZ37s3G EfN9b5U40j0NyLG6+zarxXViPHsxBQ== X-Google-Smtp-Source: ABdhPJy+5/fiU25MluGALZh833fd3YBtRXmlxtDJ6t6m9azmVvhEwK5nGVYmpILtK2FQSxUxniC2PyXhqQ== X-Received: from elver.muc.corp.google.com ([2a00:79e0:15:13:dddd:647c:7745:e5f7]) (user=elver job=sendgmr) by 2002:a05:6214:d49:: with SMTP id 9mr11847977qvr.30.1625470061873; Mon, 05 Jul 2021 00:27:41 -0700 (PDT) Date: Mon, 5 Jul 2021 09:27:16 +0200 Message-Id: <20210705072716.2125074-1-elver@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog Subject: [PATCH] kasan: fix build by including kernel.h From: Marco Elver To: elver@google.com, akpm@linux-foundation.org Cc: glider@google.com, dvyukov@google.com, pcc@google.com, catalin.marinas@arm.com, vincenzo.frascino@arm.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, ryabinin.a.a@gmail.com, andreyknvl@gmail.com, Andy Shevchenko Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=qAMqrCJF; spf=pass (imf26.hostedemail.com: domain of 3bbTiYAUKCG4QXhQdSaaSXQ.OaYXUZgj-YYWhMOW.adS@flex--elver.bounces.google.com designates 209.85.222.202 as permitted sender) smtp.mailfrom=3bbTiYAUKCG4QXhQdSaaSXQ.OaYXUZgj-YYWhMOW.adS@flex--elver.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: 4tico8axagbn5ttt3e3ouyan4oid5ed5 X-Rspamd-Queue-Id: BC8B12001712 X-Rspamd-Server: rspam06 X-HE-Tag: 1625470062-207820 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The header relies on _RET_IP_ being defined, and had been receiving that definition via inclusion of bug.h which includes kernel.h. However, since f39650de687e that is no longer the case and get the following build error when building CONFIG_KASAN_HW_TAGS on arm64: In file included from arch/arm64/mm/kasan_init.c:10: ./include/linux/kasan.h: In function 'kasan_slab_free': ./include/linux/kasan.h:230:39: error: '_RET_IP_' undeclared (first use in this function) 230 | return __kasan_slab_free(s, object, _RET_IP_, init); Fix it by including kernel.h from kasan.h. Fixes: f39650de687e ("kernel.h: split out panic and oops helpers") Cc: Andy Shevchenko Cc: Andrew Morton Signed-off-by: Marco Elver Reviewed-by: Andy Shevchenko Reviewed-by: Andrey Konovalov Reviewed-by: Andy Shevchenko --- include/linux/kasan.h | 1 + 1 file changed, 1 insertion(+) 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