Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1634986pxp; Sun, 6 Mar 2022 21:45:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlhGgscVVHEqAEehHfpj+PqW9g8W+s5OGkL791ydF0IG0uQCZqfJXgAzoNOjjXGRJo+Nm0 X-Received: by 2002:a17:906:c14f:b0:6da:bd6f:f03 with SMTP id dp15-20020a170906c14f00b006dabd6f0f03mr7730127ejc.561.1646631902469; Sun, 06 Mar 2022 21:45:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646631902; cv=none; d=google.com; s=arc-20160816; b=OZNbi44v0PULclkBUKXop8c243hh18f399oaZUU+9KLe9510JuxgzElp9lhxOo3rUD IxEKcI6TX+wLDKpg32IFeb8goRMPTwPG/ku6tY2whzpHuw4ahPUS1k7+ouLpB1cYdpYU lu6E0ynHDGVDp/dD3oEvWMV5IfS9wQO6JBmWL/CNVXc4GSDfpQzjMTy/54nN2RoubPLl DkyjXiFnz4fs5X3VFt3ctWSIJEFjT+Wev/Hv5Ee2ITX71I8F9QlLaRlTY0+lqfP8MOYy FbNJlvkuJ4P+ajxNcDu5P1h52e2Zm0s7Yu84WW7VX+u886AzsR7vF+ama/Oyc/+n/9Br vJhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=MABB9jbYy82t2uep+ZIaOcEDc6tX3sRenZED6Ge1JDM=; b=CbFBKJNLFzh3Ww266uBjvcUMtIkvi8yWSTP6aQl0Ibk9jvzZAli18na9oJmBCYe+4r i/1ZXHlHUaJvfBL/THFkrPoMnsorwmkBia9cvjl62dH1icbIK5OaPq/cZ1PHwJ2Xse00 BwD+N1okA0lMQIaQfFNFMJdXDQmUTOWq9Yb05mVgfOAzIiBK1wu+xvejaE7pt2bHArXk HcODVzvQeTWtElb9ihEOqyfV2278dfDjAND7gmfZBn3A8j5w2B9D7+yp++C01MwaAk4F qPSOvWBId6UW9mvIDMw/Tf3ySk3Fzc62gYj3YIdaqAPviwpxLbUODQoxgy+eSGfIytFG s5kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=IHktzUDV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa12-20020a170907868c00b006dab8393b8fsi5777822ejc.46.2022.03.06.21.44.39; Sun, 06 Mar 2022 21:45:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=IHktzUDV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232454AbiCFXyU (ORCPT + 99 others); Sun, 6 Mar 2022 18:54:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231562AbiCFXyS (ORCPT ); Sun, 6 Mar 2022 18:54:18 -0500 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F28833FDA9 for ; Sun, 6 Mar 2022 15:53:25 -0800 (PST) Received: by mail-yb1-xb33.google.com with SMTP id u61so27728084ybi.11 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=znsD6Nzn6+b/ZNaU+Oaz8rP5UQ+lDs5nVfJ0Uk28rxj4zGrlHggDtqk7FagWqaPDbd tQISYQUEeJNjKY0BN4Yf7kimW/T5GWX4is1kmKci1xgkd+kLNuwAHfvv5z10BKP5Qsf/ Yvkur+UzKTGB8YCqvSzPpIwk2hKTHn9YAuBwMLfy2PfBiHxR80JLnWxiF8tlzIqg9+Yn VRWsyFOsyUdt4o6z4v4h3NbnvREuXOu+vdRnI0Rv/MhAzo2sJX1jDYDOPO9Iz8Vx0Eu0 9Qb5F5uM5UFBtCGhK6wZouZUa8Pmy+Py0gNNFFXgBewgpro8YpRYoEJgI/RkMJCog0Ic PVrA== X-Gm-Message-State: AOAM5327fXs2JL2ndhk2gWTtJITFckJGt/IrHb9iT6SG81hPaQAKzcSA gmCF9v6sVwTnhv0l13grOOoUvZeI41TRcqit8YGzTA== 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-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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