From: Alexander Potapenko <glider@google.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Dmitriy Vyukov <dvyukov@google.com>,
"H.J. Lu" <hjl.tools@gmail.com>,
Kostya Serebryany <kcc@google.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Rick Edgecombe <rick.p.edgecombe@intel.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Taras Madan <tarasmadan@google.com>,
"the arch/x86 maintainers" <x86@kernel.org>
Subject: Re: [PATCHv5.1 04/13] x86/mm: Handle LAM on context switch
Date: Wed, 20 Jul 2022 10:57:01 +0200 [thread overview]
Message-ID: <CAG_fn=VVBOe8cvbWSMLfJf577yirThABQOMmihNW4pg55Sfhfg@mail.gmail.com> (raw)
In-Reply-To: <20220713150200.17080-1-kirill.shutemov@linux.intel.com>
> /*
> @@ -491,6 +493,8 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
> {
> struct mm_struct *real_prev = this_cpu_read(cpu_tlbstate.loaded_mm);
> u16 prev_asid = this_cpu_read(cpu_tlbstate.loaded_mm_asid);
> + unsigned long prev_lam = tlbstate_lam_cr3_mask();
Note: this variable is never used if CONFIG_DEBUG_VM is off.
> #ifdef CONFIG_DEBUG_VM
> - if (WARN_ON_ONCE(__read_cr3() != build_cr3(real_prev->pgd, prev_asid))) {
> + if (WARN_ON_ONCE(__read_cr3() != build_cr3(real_prev->pgd, prev_asid, prev_lam))) {
> /*
> * If we were to BUG here, we'd be very likely to kill
> * the system so hard that we don't see the call trace.
next prev parent reply other threads:[~2022-07-20 8:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 23:13 [PATCHv5 00/13] Linear Address Masking enabling Kirill A. Shutemov
2022-07-12 23:13 ` [PATCHv5 01/13] x86/mm: Fix CR3_ADDR_MASK Kirill A. Shutemov
2022-07-21 13:10 ` Alexander Potapenko
2022-07-29 3:00 ` Hu, Robert
2022-07-12 23:13 ` [PATCHv5 02/13] x86: CPUID and CR3/CR4 flags for Linear Address Masking Kirill A. Shutemov
2022-07-21 13:10 ` Alexander Potapenko
2022-07-12 23:13 ` [PATCHv5 03/13] mm: Pass down mm_struct to untagged_addr() Kirill A. Shutemov
2022-07-21 13:12 ` Alexander Potapenko
2022-07-12 23:13 ` [PATCHv5 04/13] x86/mm: Handle LAM on context switch Kirill A. Shutemov
2022-07-12 23:13 ` [PATCHv5 05/13] x86/uaccess: Provide untagged_addr() and remove tags before address check Kirill A. Shutemov
2022-07-13 15:02 ` [PATCHv5.1 04/13] x86/mm: Handle LAM on context switch Kirill A. Shutemov
2022-07-20 8:57 ` Alexander Potapenko [this message]
2022-07-20 12:38 ` Kirill A. Shutemov
2022-07-21 13:13 ` Alexander Potapenko
2022-07-21 13:14 ` [PATCHv5 05/13] x86/uaccess: Provide untagged_addr() and remove tags before address check Alexander Potapenko
2022-07-12 23:13 ` [PATCHv5 06/13] x86/mm: Provide ARCH_GET_UNTAG_MASK and ARCH_ENABLE_TAGGED_ADDR Kirill A. Shutemov
2022-07-18 17:47 ` Alexander Potapenko
2022-07-20 0:57 ` Kirill A. Shutemov
2022-07-20 8:19 ` Alexander Potapenko
2022-07-20 12:47 ` Kirill A. Shutemov
2022-07-20 12:54 ` Alexander Potapenko
2022-07-12 23:13 ` [PATCHv5 07/13] x86: Expose untagging mask in /proc/$PID/arch_status Kirill A. Shutemov
2022-07-21 13:47 ` Alexander Potapenko
2022-07-12 23:13 ` [PATCHv5 08/13] selftests/x86/lam: Add malloc test cases for linear-address masking Kirill A. Shutemov
2022-07-12 23:13 ` [PATCHv5 09/13] selftests/x86/lam: Add mmap and SYSCALL " Kirill A. Shutemov
2022-07-12 23:13 ` [PATCHv5 10/13] selftests/x86/lam: Add io_uring " Kirill A. Shutemov
2022-07-12 23:13 ` [PATCHv5 11/13] selftests/x86/lam: Add inherit " Kirill A. Shutemov
2022-07-12 23:13 ` [PATCHv5 OPTIONAL 12/13] x86/mm: Extend LAM to support to LAM_U48 Kirill A. Shutemov
2022-07-12 23:13 ` [PATCHv5 OPTIONAL 13/13] selftests/x86/lam: Add tests cases for LAM_U48 Kirill A. Shutemov
2022-07-18 17:39 ` [PATCHv5 00/13] Linear Address Masking enabling Alexander Potapenko
2022-07-20 0:59 ` Kirill A. Shutemov
2022-07-21 13:09 ` Alexander Potapenko
2022-07-21 17:07 ` Dave Hansen
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=VVBOe8cvbWSMLfJf577yirThABQOMmihNW4pg55Sfhfg@mail.gmail.com' \
--to=glider@google.com \
--cc=ak@linux.intel.com \
--cc=andreyknvl@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=dvyukov@google.com \
--cc=hjl.tools@gmail.com \
--cc=kcc@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=ryabinin.a.a@gmail.com \
--cc=tarasmadan@google.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).