linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Potapenko <glider@google.com>
To: Zhenhua Huang <quic_zhenhuah@quicinc.com>
Cc: Pavan Kondeti <quic_pkondeti@quicinc.com>,
	catalin.marinas@arm.com, will@kernel.org,  elver@google.com,
	dvyukov@google.com, akpm@linux-foundation.org,
	 robin.murphy@arm.com, mark.rutland@arm.com, jianyong.wu@arm.com,
	 james.morse@arm.com, wangkefeng.wang@huawei.com,
	 linux-arm-kernel@lists.infradead.org,
	kasan-dev@googlegroups.com,  linux-mm@kvack.org,
	quic_guptap@quicinc.com, quic_tingweiz@quicinc.com
Subject: Re: [PATCH v9] mm,kfence: decouple kfence from page granularity mapping judgement
Date: Thu, 16 Mar 2023 11:56:35 +0100	[thread overview]
Message-ID: <CAG_fn=UigFQX8ZrNPoAFfXiV-JCP5ZyrtkD0TUNPJcN5-99VtA@mail.gmail.com> (raw)
In-Reply-To: <e363fd76-67fb-5a0f-5ef9-59d55aa2f447@quicinc.com>

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

>
>
>
> >> +    /* Kfence pool needs page-level mapping */
> >> +    if (early_kfence_pool) {
> >> +            __map_memblock(pgdp, early_kfence_pool,
> >> +                    early_kfence_pool + KFENCE_POOL_SIZE,
> >> +                    pgprot_tagged(PAGE_KERNEL),
> >> +                    NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS);
> >> +            memblock_clear_nomap(early_kfence_pool, KFENCE_POOL_SIZE);
> >> +            /* kfence_pool really mapped now */
> >> +            kfence_set_pool(early_kfence_pool);
> >> +    }
> >
> > Why not wrap this under CONFIG_KFENCE ? early_kfence_pool can also go in
> > there?
>
> Because I didn't want to add CONFIG_KFENCE in function.. in the case of
> w/o CONFIG_KFENCE, early_kfence_pool should be always NULL.
>
> Please no. If the code is not used in non-KFENCE build, it should not be
compiled. Same holds for the variables that only exist in KFENCE builds.

[-- Attachment #2: Type: text/html, Size: 1298 bytes --]

  reply	other threads:[~2023-03-16 10:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  8:50 Zhenhua Huang
2023-03-16  9:58 ` Pavan Kondeti
2023-03-16 10:44   ` Zhenhua Huang
2023-03-16 10:56     ` Alexander Potapenko [this message]
2023-03-16 11:17       ` Zhenhua Huang
2023-03-16 10:06 ` Marco Elver
2023-03-16 10:36   ` Zhenhua Huang
2023-03-16 12:19     ` Zhenhua Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG_fn=UigFQX8ZrNPoAFfXiV-JCP5ZyrtkD0TUNPJcN5-99VtA@mail.gmail.com' \
    --to=glider@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=james.morse@arm.com \
    --cc=jianyong.wu@arm.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=quic_guptap@quicinc.com \
    --cc=quic_pkondeti@quicinc.com \
    --cc=quic_tingweiz@quicinc.com \
    --cc=quic_zhenhuah@quicinc.com \
    --cc=robin.murphy@arm.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox