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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49A53C433EF for ; Sun, 6 Mar 2022 23:53:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C30F38D0002; Sun, 6 Mar 2022 18:53:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BE0588D0001; Sun, 6 Mar 2022 18:53:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA8488D0002; Sun, 6 Mar 2022 18:53:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 9A5ED8D0001 for ; Sun, 6 Mar 2022 18:53:26 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6C54822ED3 for ; Sun, 6 Mar 2022 23:53:26 +0000 (UTC) X-FDA: 79215615612.02.A58B243 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by imf20.hostedemail.com (Postfix) with ESMTP id F087D1C0005 for ; Sun, 6 Mar 2022 23:53:25 +0000 (UTC) Received: by mail-yb1-f176.google.com with SMTP id h126so27802940ybc.1 for ; Sun, 06 Mar 2022 15:53:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=MABB9jbYy82t2uep+ZIaOcEDc6tX3sRenZED6Ge1JDM=; b=IHktzUDVKrKIVxQ4HDD3Rv7QGA73LmXaavAstRHiRzhkmC0G0hmVe+D6q49aG2U6EC Kd5YkkAIhToulRkgOuCXjoOTt5z59ECY0LYLH/tBHTgB6rbuK+uwu4oKbYuW08ZgFk+E gI7kMvaaOKx+HHuAMnsWu1hbhqI7VVyoXnx6Sb35SDMVzIidLE/1APJKUBuWZ1kDgEd/ hDBo25nu4RtmPBLaohIaOSJH1je7x+Fx2qtycn0jYimcaTqR/slb6UbQcPykMqtCJVFt XvxxXUVLXqsdJR7rfQObC4iGpJ2xAK9Va3MJpeRaxPbq9V9EGc3RhCvJevnWRPhf5nBe FBkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MABB9jbYy82t2uep+ZIaOcEDc6tX3sRenZED6Ge1JDM=; b=LjAIYI9nnEq0Dl6YUKeTSnaTAHHRiJvGdmPI2DvNy5KKKOwN8WtH2k5YA5wUmXj5y5 3X+cwlMusbrMGWzltvC8YOfIuSBO/GrGzZo3xfOuuxaJZZNjR/hUIDwVxEo4euJctofh Pk+RHZ3zuZba6rHN/FjAEBnGsDLN9GduoBnBKwJALMWWg/BbQIfrX3yT3+rgT4RD6imp +BbwEtrV8w+FVXuNayvKh4vOcN6GYAOL43NMNs7a6yEmqoo6Eg5c6LZXIfDG17M/2RXT 1MAU1Th+eZ5dcf4PHai9cz8PY023sSC65e9h6i7CNUcvMO2fZyaMgtYbJYHNlAPeuAuJ OlsA== X-Gm-Message-State: AOAM531rLOGS8KAQAsBfmkQqmixqxl6gj+/kbY+tbbsUKM5TsCKllTR+ O8UUNUbvtmeaI6GY4flwdeISvXhuxKrTeshEkvZ2lA== X-Google-Smtp-Source: ABdhPJygx1A2AusLyn9WPUOBSFcm7WnRpGHbgCIPuNrCg0pqSirO8cVnfajx0dHKvgz+KV/y14mXXxsh8J4kwjsSlYI= X-Received: by 2002:a25:6994:0:b0:629:1e05:b110 with SMTP id e142-20020a256994000000b006291e05b110mr4736034ybc.425.1646610804997; Sun, 06 Mar 2022 15:53:24 -0800 (PST) MIME-Version: 1.0 References: <20220305144858.17040-1-dtcccc@linux.alibaba.com> <20220305144858.17040-3-dtcccc@linux.alibaba.com> In-Reply-To: <20220305144858.17040-3-dtcccc@linux.alibaba.com> From: Marco Elver Date: Mon, 7 Mar 2022 00:52:48 +0100 Message-ID: Subject: Re: [PATCH v2 2/2] kfence: Alloc kfence_pool after system startup To: Tianchen Ding Cc: Alexander Potapenko , Dmitry Vyukov , Andrew Morton , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: F087D1C0005 X-Stat-Signature: f6seat3gb9fy4enferhgjxgs1juzm9t9 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=IHktzUDV; spf=pass (imf20.hostedemail.com: domain of elver@google.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=elver@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-HE-Tag: 1646610805-174417 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: On Sat, 5 Mar 2022 at 15:49, Tianchen Ding wrote= : [...] > +static int kfence_init_late(void) > +{ > + const unsigned long nr_pages =3D KFENCE_POOL_SIZE / PAGE_SIZE; > + struct page *pages; > + > + pages =3D alloc_contig_pages(nr_pages, GFP_KERNEL, first_online_n= ode, NULL); > mm/kfence/core.c:836:17: error: implicit declaration of function =E2=80= =98alloc_contig_pages=E2=80=99 [-Werror=3Dimplicit-function-declaration] This doesn't build without CMA. See ifdef CONFIG_CONTIG_ALLOC in gfp.h, which declares alloc_contig_pages. Will alloc_pages() work as you expect? If so, perhaps only use alloc_contig_pages() #ifdef CONFIG_CONTIG_ALLOC. Thanks, -- Marco