lkml.org 
[lkml]   [2022]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCHv3 4/8] x86/mm: Handle LAM on context switch
    On Fri, Jun 10, 2022 at 4:35 PM Kirill A. Shutemov
    <kirill.shutemov@linux.intel.com> wrote:
    >
    > Linear Address Masking mode for userspace pointers encoded in CR3 bits.
    > The mode is selected per-thread. Add new thread features indicate that the
    > thread has Linear Address Masking enabled.
    >
    > switch_mm_irqs_off() now respects these flags and constructs CR3
    > accordingly.
    >
    > The active LAM mode gets recorded in the tlb_state.
    >
    > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>


    > +#ifdef CONFIG_X86_64
    > +static inline u64 mm_cr3_lam_mask(struct mm_struct *mm)
    > +{
    > + return mm->context.lam_cr3_mask;
    > +}

    Nit: can we have either "cr3_lam_mask" or "lam_cr3_mask" in both places?



    --
    Alexander Potapenko
    Software Engineer

    Google Germany GmbH
    Erika-Mann-Straße, 33
    80636 München

    Geschäftsführer: Paul Manicle, Liana Sebastian
    Registergericht und -nummer: Hamburg, HRB 86891
    Sitz der Gesellschaft: Hamburg

    Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise
    erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes
    weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich
    bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.


    This e-mail is confidential. If you received this communication by
    mistake, please don't forward it to anyone else, please erase all
    copies and attachments, and please let me know that it has gone to the
    wrong person.

    \
     
     \ /
      Last update: 2022-06-17 17:36    [W:4.048 / U:0.228 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site