From: Marco Elver <elver@google.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
Peter Zijlstra <peterz@infradead.org>,
kasan-dev <kasan-dev@googlegroups.com>, X86 ML <x86@kernel.org>,
open list <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
regressions@lists.linux.dev, lkft-triage@lists.linaro.org,
Andrew Morton <akpm@linux-foundation.org>,
Alexander Potapenko <glider@google.com>
Subject: Re: WARNING: CPU: 0 PID: 0 at arch/x86/include/asm/kfence.h:46 kfence_protect
Date: Fri, 18 Nov 2022 10:19:24 +0100 [thread overview]
Message-ID: <Y3dOHNh82NQboctR@elver.google.com> (raw)
In-Reply-To: <41ac24c4-6c95-d946-2679-c1be2cb20536@intel.com>
On Thu, Nov 17, 2022 at 03:54PM -0800, Dave Hansen wrote:
> On 11/17/22 15:23, Marco Elver wrote:
> > Yes - it's the 'level != PG_LEVEL_4K'.
>
> That plus the bisect made it pretty easy to find, thanks for the effort!
>
> Could you double-check that the attached patch fixes it? It seemed to
> for me.
Yes, that works - thanks!
> The issue was that the new "No changes, easy!" check in the suspect
> commit didn't check the cpa->force_split option. It didn't split down
> to 4k and then all hell broke loose.
>
> Oh, and I totally misread the kfence ability to tolerate partial TLB
> flushes. Sorry for the noise there!
> diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c
> index 220361ceb997..9b4e2ad957f6 100644
> --- a/arch/x86/mm/pat/set_memory.c
> +++ b/arch/x86/mm/pat/set_memory.c
> @@ -1727,7 +1727,8 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int primary)
> /*
> * No changes, easy!
> */
> - if (!(pgprot_val(cpa->mask_set) | pgprot_val(cpa->mask_clr)))
> + if (!(pgprot_val(cpa->mask_set) | pgprot_val(cpa->mask_clr))
> + && !cpa->force_split)
> return ret;
>
> while (rempages) {
Tested-by: Marco Elver <elver@google.com>
next prev parent reply other threads:[~2022-11-18 9:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 11:31 WARNING: CPU: 0 PID: 0 at arch/x86/include/asm/kfence.h:46 kfence_protect Naresh Kamboju
2022-11-17 13:58 ` Marco Elver
2022-11-17 14:34 ` Dave Hansen
2022-11-17 23:23 ` Marco Elver
2022-11-17 23:54 ` Dave Hansen
2022-11-18 9:19 ` Marco Elver [this message]
2022-11-18 10:32 ` Peter Zijlstra
2022-11-21 7:28 ` Naresh Kamboju
2022-11-21 8:43 ` Marco Elver
2022-11-21 5:40 ` Naresh Kamboju
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=Y3dOHNh82NQboctR@elver.google.com \
--to=elver@google.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkft-triage@lists.linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=peterz@infradead.org \
--cc=regressions@lists.linux.dev \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.